repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
nohana/Amalgam
amalgam/src/main/java/com/amalgam/graphics/BitmapUtils.java
BitmapUtils.getSize
public static Point getSize(Resources res, int resId) { """ Get width and height of the bitmap specified with the resource id. @param res resource accessor. @param resId the resource id of the drawable. @return the drawable bitmap size. """ BitmapFactory.Options options = new BitmapFactory.Options()...
java
public static Point getSize(Resources res, int resId) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(res, resId, options); int width = options.outWidth; int height = options.outHeight; return ...
[ "public", "static", "Point", "getSize", "(", "Resources", "res", ",", "int", "resId", ")", "{", "BitmapFactory", ".", "Options", "options", "=", "new", "BitmapFactory", ".", "Options", "(", ")", ";", "options", ".", "inJustDecodeBounds", "=", "true", ";", ...
Get width and height of the bitmap specified with the resource id. @param res resource accessor. @param resId the resource id of the drawable. @return the drawable bitmap size.
[ "Get", "width", "and", "height", "of", "the", "bitmap", "specified", "with", "the", "resource", "id", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/graphics/BitmapUtils.java#L153-L160
io7m/jaffirm
com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java
Invariants.checkInvariantL
public static long checkInvariantL( final long value, final boolean condition, final LongFunction<String> describer) { """ A {@code long} specialized version of {@link #checkInvariant(Object, Predicate, Function)} @param condition The predicate @param value The value @param describer The desc...
java
public static long checkInvariantL( final long value, final boolean condition, final LongFunction<String> describer) { return innerCheckInvariantL(value, condition, describer); }
[ "public", "static", "long", "checkInvariantL", "(", "final", "long", "value", ",", "final", "boolean", "condition", ",", "final", "LongFunction", "<", "String", ">", "describer", ")", "{", "return", "innerCheckInvariantL", "(", "value", ",", "condition", ",", ...
A {@code long} specialized version of {@link #checkInvariant(Object, Predicate, Function)} @param condition The predicate @param value The value @param describer The describer of the predicate @return value @throws InvariantViolationException If the predicate is false
[ "A", "{", "@code", "long", "}", "specialized", "version", "of", "{", "@link", "#checkInvariant", "(", "Object", "Predicate", "Function", ")", "}" ]
train
https://github.com/io7m/jaffirm/blob/c97d246242d381e48832838737418cfe4cb57b4d/com.io7m.jaffirm.core/src/main/java/com/io7m/jaffirm/core/Invariants.java#L480-L486
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/database/CmsHtmlImportDialog.java
CmsHtmlImportDialog.getTemplates
private List getTemplates() { """ Returns a list with all available templates.<p> @return a list with all available templates """ ArrayList ret = new ArrayList(); TreeMap templates = null; try { templates = CmsNewResourceXmlPage.getTemplates(getJsp().getCmsObject(), nul...
java
private List getTemplates() { ArrayList ret = new ArrayList(); TreeMap templates = null; try { templates = CmsNewResourceXmlPage.getTemplates(getJsp().getCmsObject(), null); // loop through all templates and build the entries Iterator i = templates.entrySet...
[ "private", "List", "getTemplates", "(", ")", "{", "ArrayList", "ret", "=", "new", "ArrayList", "(", ")", ";", "TreeMap", "templates", "=", "null", ";", "try", "{", "templates", "=", "CmsNewResourceXmlPage", ".", "getTemplates", "(", "getJsp", "(", ")", "."...
Returns a list with all available templates.<p> @return a list with all available templates
[ "Returns", "a", "list", "with", "all", "available", "templates", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/database/CmsHtmlImportDialog.java#L536-L558
apache/groovy
src/main/java/org/codehaus/groovy/runtime/GroovyCategorySupport.java
GroovyCategorySupport.use
public static <T> T use(Class categoryClass, Closure<T> closure) { """ Create a scope based on given categoryClass and invoke closure within that scope. @param categoryClass the class containing category methods @param closure the closure during which to make the category class methods available @return the v...
java
public static <T> T use(Class categoryClass, Closure<T> closure) { return THREAD_INFO.getInfo().use(categoryClass, closure); }
[ "public", "static", "<", "T", ">", "T", "use", "(", "Class", "categoryClass", ",", "Closure", "<", "T", ">", "closure", ")", "{", "return", "THREAD_INFO", ".", "getInfo", "(", ")", ".", "use", "(", "categoryClass", ",", "closure", ")", ";", "}" ]
Create a scope based on given categoryClass and invoke closure within that scope. @param categoryClass the class containing category methods @param closure the closure during which to make the category class methods available @return the value returned from the closure
[ "Create", "a", "scope", "based", "on", "given", "categoryClass", "and", "invoke", "closure", "within", "that", "scope", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/GroovyCategorySupport.java#L261-L263
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java
RDBMEntityLockStore.primSelect
private IEntityLock[] primSelect(String sql) throws LockingException { """ Retrieve IEntityLocks from the underlying store. @param sql String - the sql string used to select the entity lock rows. @exception LockingException - wraps an Exception specific to the store. """ Connection conn = null; ...
java
private IEntityLock[] primSelect(String sql) throws LockingException { Connection conn = null; Statement stmnt = null; ResultSet rs = null; List locks = new ArrayList(); if (log.isDebugEnabled()) log.debug("RDBMEntityLockStore.primSelect(): " + sql); try { c...
[ "private", "IEntityLock", "[", "]", "primSelect", "(", "String", "sql", ")", "throws", "LockingException", "{", "Connection", "conn", "=", "null", ";", "Statement", "stmnt", "=", "null", ";", "ResultSet", "rs", "=", "null", ";", "List", "locks", "=", "new"...
Retrieve IEntityLocks from the underlying store. @param sql String - the sql string used to select the entity lock rows. @exception LockingException - wraps an Exception specific to the store.
[ "Retrieve", "IEntityLocks", "from", "the", "underlying", "store", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/concurrency/locking/RDBMEntityLockStore.java#L471-L502
arxanchain/java-common
src/main/java/com/arxanfintech/common/crypto/core/ECIESCoder.java
ECIESCoder.encryptSimple
public static byte[] encryptSimple(ECPoint pub, byte[] plaintext) throws IOException, InvalidCipherTextException { """ Encryption equivalent to the Crypto++ default ECIES ECP settings: DL_KeyAgreementAlgorithm: DL_KeyAgreementAlgorithm_DH struct ECPPoint,struct EnumToType enum CofactorMultiplicationOptio...
java
public static byte[] encryptSimple(ECPoint pub, byte[] plaintext) throws IOException, InvalidCipherTextException { ArxanIESEngine iesEngine = new ArxanIESEngine( new ECDHBasicAgreement(), new MGF1BytesGeneratorExt(new SHA1Digest(), 1), new HMac(new SHA1Digest()), ...
[ "public", "static", "byte", "[", "]", "encryptSimple", "(", "ECPoint", "pub", ",", "byte", "[", "]", "plaintext", ")", "throws", "IOException", ",", "InvalidCipherTextException", "{", "ArxanIESEngine", "iesEngine", "=", "new", "ArxanIESEngine", "(", "new", "ECDH...
Encryption equivalent to the Crypto++ default ECIES ECP settings: DL_KeyAgreementAlgorithm: DL_KeyAgreementAlgorithm_DH struct ECPPoint,struct EnumToType enum CofactorMultiplicationOption,0 DL_KeyDerivationAlgorithm: DL_KeyDerivationAlgorithm_P1363 struct ECPPoint,0,class P1363_KDF2 class SHA1 DL_Symmetri...
[ "Encryption", "equivalent", "to", "the", "Crypto", "++", "default", "ECIES", "ECP", "settings", ":" ]
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/core/ECIESCoder.java#L195-L233
sdl/Testy
src/main/java/com/sdl/selenium/web/XPathBuilder.java
XPathBuilder.getBasePathSelector
protected String getBasePathSelector() { """ Containing baseCls, class, name and style @return baseSelector """ // TODO use disabled // TODO verify what need to be equal OR contains List<String> selector = new ArrayList<>(); CollectionUtils.addIgnoreNull(selector, getBasePath...
java
protected String getBasePathSelector() { // TODO use disabled // TODO verify what need to be equal OR contains List<String> selector = new ArrayList<>(); CollectionUtils.addIgnoreNull(selector, getBasePath()); if (!WebDriverConfig.isIE()) { if (hasStyle()) { ...
[ "protected", "String", "getBasePathSelector", "(", ")", "{", "// TODO use disabled", "// TODO verify what need to be equal OR contains", "List", "<", "String", ">", "selector", "=", "new", "ArrayList", "<>", "(", ")", ";", "CollectionUtils", ".", "addIgnoreNull", "(", ...
Containing baseCls, class, name and style @return baseSelector
[ "Containing", "baseCls", "class", "name", "and", "style" ]
train
https://github.com/sdl/Testy/blob/b3ae061554016f926f04694a39ff00dab7576609/src/main/java/com/sdl/selenium/web/XPathBuilder.java#L766-L784
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.leftShift
public static JMenu leftShift(JMenu self, JMenuItem item) { """ Overloads the left shift operator to provide an easy way to add components to a menu.<p> @param self a JMenu @param item an item to be added to the menu. @return same menu, after the value was added to it. @since 1.6.4 """ self.add(...
java
public static JMenu leftShift(JMenu self, JMenuItem item) { self.add(item); return self; }
[ "public", "static", "JMenu", "leftShift", "(", "JMenu", "self", ",", "JMenuItem", "item", ")", "{", "self", ".", "add", "(", "item", ")", ";", "return", "self", ";", "}" ]
Overloads the left shift operator to provide an easy way to add components to a menu.<p> @param self a JMenu @param item an item to be added to the menu. @return same menu, after the value was added to it. @since 1.6.4
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "add", "components", "to", "a", "menu", ".", "<p", ">" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L795-L798
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java
DirectoryServiceClient.queryService
public void queryService(List<StringCommand> commands, final QueryServiceCallback cb, Object context) { """ Query service in Callback. @param commands the StringCommand list. @param cb the Callback. @param context the Callback context object. """ ProtocolHeader header = new ProtocolHeader(); ...
java
public void queryService(List<StringCommand> commands, final QueryServiceCallback cb, Object context){ ProtocolHeader header = new ProtocolHeader(); header.setType(ProtocolType.QueryService); List<QueryCommand> cs = new ArrayList<QueryCommand>(); for(StringCommand c : commands){ ...
[ "public", "void", "queryService", "(", "List", "<", "StringCommand", ">", "commands", ",", "final", "QueryServiceCallback", "cb", ",", "Object", "context", ")", "{", "ProtocolHeader", "header", "=", "new", "ProtocolHeader", "(", ")", ";", "header", ".", "setTy...
Query service in Callback. @param commands the StringCommand list. @param cb the Callback. @param context the Callback context object.
[ "Query", "service", "in", "Callback", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java#L846-L872
virgo47/javasimon
core/src/main/java/org/javasimon/callback/calltree/CallTreeCallback.java
CallTreeCallback.onRootStopwatchStop
public void onRootStopwatchStop(CallTree callTree, Split split) { """ When stopwatch corresponding to root tree node is stopped, this method is called. Logs call tree when split is longer than threshold. @param callTree call tree to log @param split stopped split """ callTreeLogTemplate.log(split, call...
java
public void onRootStopwatchStop(CallTree callTree, Split split) { callTreeLogTemplate.log(split, callTree); if (logThreshold != null && split.runningFor() > logThreshold) { split.getStopwatch().setAttribute(ATTR_NAME_LAST, callTree); } removeCallTree(); }
[ "public", "void", "onRootStopwatchStop", "(", "CallTree", "callTree", ",", "Split", "split", ")", "{", "callTreeLogTemplate", ".", "log", "(", "split", ",", "callTree", ")", ";", "if", "(", "logThreshold", "!=", "null", "&&", "split", ".", "runningFor", "(",...
When stopwatch corresponding to root tree node is stopped, this method is called. Logs call tree when split is longer than threshold. @param callTree call tree to log @param split stopped split
[ "When", "stopwatch", "corresponding", "to", "root", "tree", "node", "is", "stopped", "this", "method", "is", "called", ".", "Logs", "call", "tree", "when", "split", "is", "longer", "than", "threshold", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/calltree/CallTreeCallback.java#L145-L151
phax/ph-oton
ph-oton-security/src/main/java/com/helger/photon/security/usergroup/UserGroupManager.java
UserGroupManager.assignUserToUserGroup
@Nonnull public EChange assignUserToUserGroup (@Nullable final String sUserGroupID, @Nonnull @Nonempty final String sUserID) { """ Assign the passed user ID to the passed user group.<br> Note: no validity check must be performed for the user ID @param sUserGroupID ID of the user group to assign to @param s...
java
@Nonnull public EChange assignUserToUserGroup (@Nullable final String sUserGroupID, @Nonnull @Nonempty final String sUserID) { // Resolve user group final UserGroup aUserGroup = getOfID (sUserGroupID); if (aUserGroup == null) { AuditHelper.onAuditModifyFailure (UserGroup.OT, sUserGroupID, "no-...
[ "@", "Nonnull", "public", "EChange", "assignUserToUserGroup", "(", "@", "Nullable", "final", "String", "sUserGroupID", ",", "@", "Nonnull", "@", "Nonempty", "final", "String", "sUserID", ")", "{", "// Resolve user group", "final", "UserGroup", "aUserGroup", "=", "...
Assign the passed user ID to the passed user group.<br> Note: no validity check must be performed for the user ID @param sUserGroupID ID of the user group to assign to @param sUserID ID of the user to be assigned. @return {@link EChange#CHANGED} if the user group ID was valid, and the specified user ID was not already...
[ "Assign", "the", "passed", "user", "ID", "to", "the", "passed", "user", "group", ".", "<br", ">", "Note", ":", "no", "validity", "check", "must", "be", "performed", "for", "the", "user", "ID" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-security/src/main/java/com/helger/photon/security/usergroup/UserGroupManager.java#L430-L460
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/util/Convert.java
Convert.utf2string
public static String utf2string(byte[] src, int sindex, int len) { """ Return bytes in Utf8 representation as a string. @param src The array holding the bytes. @param sindex The start index from which bytes are converted. @param len The maximum number of bytes to convert. """ char ...
java
public static String utf2string(byte[] src, int sindex, int len) { char dst[] = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); return new String(dst, 0, len1); }
[ "public", "static", "String", "utf2string", "(", "byte", "[", "]", "src", ",", "int", "sindex", ",", "int", "len", ")", "{", "char", "dst", "[", "]", "=", "new", "char", "[", "len", "]", ";", "int", "len1", "=", "utf2chars", "(", "src", ",", "sin...
Return bytes in Utf8 representation as a string. @param src The array holding the bytes. @param sindex The start index from which bytes are converted. @param len The maximum number of bytes to convert.
[ "Return", "bytes", "in", "Utf8", "representation", "as", "a", "string", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Convert.java#L160-L164
meraki-analytics/datapipelines-java
src/main/java/com/merakianalytics/datapipelines/SinkHandler.java
SinkHandler.put
public void put(final A item, final PipelineContext context) { """ Converts some data and provides it to the underlying {@link com.merakianalytics.datapipelines.sinks.DataSink} @param item the data to provide to the underlying {@link com.merakianalytics.datapipelines.sinks.DataSink} @param context informatio...
java
public void put(final A item, final PipelineContext context) { final S transformed = transform.transform(item, context); sink.put(storedType, transformed, context); }
[ "public", "void", "put", "(", "final", "A", "item", ",", "final", "PipelineContext", "context", ")", "{", "final", "S", "transformed", "=", "transform", ".", "transform", "(", "item", ",", "context", ")", ";", "sink", ".", "put", "(", "storedType", ",", ...
Converts some data and provides it to the underlying {@link com.merakianalytics.datapipelines.sinks.DataSink} @param item the data to provide to the underlying {@link com.merakianalytics.datapipelines.sinks.DataSink} @param context information about the context of the request such as what {@link com.merakianalytics.da...
[ "Converts", "some", "data", "and", "provides", "it", "to", "the", "underlying", "{", "@link", "com", ".", "merakianalytics", ".", "datapipelines", ".", "sinks", ".", "DataSink", "}" ]
train
https://github.com/meraki-analytics/datapipelines-java/blob/376ff1e8e1f7c67f2f2a5521d2a66e91467e56b0/src/main/java/com/merakianalytics/datapipelines/SinkHandler.java#L92-L95
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.addCollectionAsync
public Observable<TaskAddCollectionResult> addCollectionAsync(String jobId, List<TaskAddParameter> value) { """ Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this ...
java
public Observable<TaskAddCollectionResult> addCollectionAsync(String jobId, List<TaskAddParameter> value) { return addCollectionWithServiceResponseAsync(jobId, value).map(new Func1<ServiceResponseWithHeaders<TaskAddCollectionResult, TaskAddCollectionHeaders>, TaskAddCollectionResult>() { @Override ...
[ "public", "Observable", "<", "TaskAddCollectionResult", ">", "addCollectionAsync", "(", "String", "jobId", ",", "List", "<", "TaskAddParameter", ">", "value", ")", "{", "return", "addCollectionWithServiceResponseAsync", "(", "jobId", ",", "value", ")", ".", "map", ...
Adds a collection of tasks to the specified job. Note that each task must have a unique ID. The Batch service may not return the results for each task in the same order the tasks were submitted in this request. If the server times out or the connection is closed during the request, the request may have been partially o...
[ "Adds", "a", "collection", "of", "tasks", "to", "the", "specified", "job", ".", "Note", "that", "each", "task", "must", "have", "a", "unique", "ID", ".", "The", "Batch", "service", "may", "not", "return", "the", "results", "for", "each", "task", "in", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L693-L700
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_install_templateCapabilities_GET
public OvhTemplateCaps serviceName_install_templateCapabilities_GET(String serviceName, String templateName) throws IOException { """ Gives some capabilities regarding the template for the current dedicated server. REST: GET /dedicated/server/{serviceName}/install/templateCapabilities @param templateName [requ...
java
public OvhTemplateCaps serviceName_install_templateCapabilities_GET(String serviceName, String templateName) throws IOException { String qPath = "/dedicated/server/{serviceName}/install/templateCapabilities"; StringBuilder sb = path(qPath, serviceName); query(sb, "templateName", templateName); String resp = exe...
[ "public", "OvhTemplateCaps", "serviceName_install_templateCapabilities_GET", "(", "String", "serviceName", ",", "String", "templateName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/install/templateCapabilities\"", ";", "StringBui...
Gives some capabilities regarding the template for the current dedicated server. REST: GET /dedicated/server/{serviceName}/install/templateCapabilities @param templateName [required] @param serviceName [required] The internal name of your dedicated server
[ "Gives", "some", "capabilities", "regarding", "the", "template", "for", "the", "current", "dedicated", "server", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1624-L1630
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/text/analyzers/TextSimilarity.java
TextSimilarity.oliverSimilarity
public static double oliverSimilarity(String text1, String text2) { """ This calculates the similarity between two strings as described in Programming Classics: Implementing the World's Best Algorithms by Oliver (ISBN 0-131-00413-1). @param text1 @param text2 @return """ preprocessDocument(text1)...
java
public static double oliverSimilarity(String text1, String text2) { preprocessDocument(text1); preprocessDocument(text2); String smallerDoc=text1; String biggerDoc=text2; if(text1.length()>text2.length()) { smallerDoc=text2; biggerDoc=text1; } ...
[ "public", "static", "double", "oliverSimilarity", "(", "String", "text1", ",", "String", "text2", ")", "{", "preprocessDocument", "(", "text1", ")", ";", "preprocessDocument", "(", "text2", ")", ";", "String", "smallerDoc", "=", "text1", ";", "String", "bigger...
This calculates the similarity between two strings as described in Programming Classics: Implementing the World's Best Algorithms by Oliver (ISBN 0-131-00413-1). @param text1 @param text2 @return
[ "This", "calculates", "the", "similarity", "between", "two", "strings", "as", "described", "in", "Programming", "Classics", ":", "Implementing", "the", "World", "s", "Best", "Algorithms", "by", "Oliver", "(", "ISBN", "0", "-", "131", "-", "00413", "-", "1", ...
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/common/text/analyzers/TextSimilarity.java#L44-L59
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/query/HBaseQuery.java
HBaseQuery.onQuery
private List onQuery(EntityMetadata m, Client client) { """ On query. @param m the m @param client the client @return the list """ boolean useLuceneOrES = !MetadataUtils.useSecondryIndex(((ClientBase) client).getClientMetadata()); QueryTranslator translator = new QueryTranslator(); ...
java
private List onQuery(EntityMetadata m, Client client) { boolean useLuceneOrES = !MetadataUtils.useSecondryIndex(((ClientBase) client).getClientMetadata()); QueryTranslator translator = new QueryTranslator(); List<Map<String, Object>> columnsToOutput = translator.getColumnsToOutput(m, getKund...
[ "private", "List", "onQuery", "(", "EntityMetadata", "m", ",", "Client", "client", ")", "{", "boolean", "useLuceneOrES", "=", "!", "MetadataUtils", ".", "useSecondryIndex", "(", "(", "(", "ClientBase", ")", "client", ")", ".", "getClientMetadata", "(", ")", ...
On query. @param m the m @param client the client @return the list
[ "On", "query", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/query/HBaseQuery.java#L163-L179
HsiangLeekwok/hlklib
hlklib/src/main/java/com/hlk/hlklib/lib/datetimepicker/CustomViewPager.java
CustomViewPager.isScrollingHorizontal
private boolean isScrollingHorizontal(float x1, float y1, float x2, float y2) { """ Determine whether the distance between the user's ACTION_DOWN event (x1, y1) and the current ACTION_MOVE event (x2, y2) should be interpreted as a horizontal swipe. @param x1 @param y1 @param x2 @param y2 @return """ ...
java
private boolean isScrollingHorizontal(float x1, float y1, float x2, float y2) { float deltaX = x2 - x1; float deltaY = y2 - y1; if (Math.abs(deltaX) > mTouchSlop && Math.abs(deltaX) > Math.abs(deltaY)) { return true; } return false; }
[ "private", "boolean", "isScrollingHorizontal", "(", "float", "x1", ",", "float", "y1", ",", "float", "x2", ",", "float", "y2", ")", "{", "float", "deltaX", "=", "x2", "-", "x1", ";", "float", "deltaY", "=", "y2", "-", "y1", ";", "if", "(", "Math", ...
Determine whether the distance between the user's ACTION_DOWN event (x1, y1) and the current ACTION_MOVE event (x2, y2) should be interpreted as a horizontal swipe. @param x1 @param y1 @param x2 @param y2 @return
[ "Determine", "whether", "the", "distance", "between", "the", "user", "s", "ACTION_DOWN", "event", "(", "x1", "y1", ")", "and", "the", "current", "ACTION_MOVE", "event", "(", "x2", "y2", ")", "should", "be", "interpreted", "as", "a", "horizontal", "swipe", ...
train
https://github.com/HsiangLeekwok/hlklib/blob/b122f6dcab7cec60c8e5455e0c31613d08bec6ad/hlklib/src/main/java/com/hlk/hlklib/lib/datetimepicker/CustomViewPager.java#L136-L147
ACRA/acra
acra-mail/src/main/java/org/acra/sender/EmailIntentSender.java
EmailIntentSender.buildResolveIntent
@NonNull protected Intent buildResolveIntent(@NonNull String subject, @NonNull String body) { """ Builds an intent used to resolve email clients and to send reports without attachments or as fallback if no attachments are supported @param subject the message subject @param body the message body @return...
java
@NonNull protected Intent buildResolveIntent(@NonNull String subject, @NonNull String body) { final Intent intent = new Intent(Intent.ACTION_SENDTO); intent.setData(Uri.fromParts("mailto", mailConfig.mailTo(), null)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra(In...
[ "@", "NonNull", "protected", "Intent", "buildResolveIntent", "(", "@", "NonNull", "String", "subject", ",", "@", "NonNull", "String", "body", ")", "{", "final", "Intent", "intent", "=", "new", "Intent", "(", "Intent", ".", "ACTION_SENDTO", ")", ";", "intent"...
Builds an intent used to resolve email clients and to send reports without attachments or as fallback if no attachments are supported @param subject the message subject @param body the message body @return email intent
[ "Builds", "an", "intent", "used", "to", "resolve", "email", "clients", "and", "to", "send", "reports", "without", "attachments", "or", "as", "fallback", "if", "no", "attachments", "are", "supported" ]
train
https://github.com/ACRA/acra/blob/bfa3235ab110328c5ab2f792ddf8ee87be4a32d1/acra-mail/src/main/java/org/acra/sender/EmailIntentSender.java#L161-L169
VoltDB/voltdb
src/frontend/org/voltdb/iv2/ReplaySequencer.java
ReplaySequencer.updateLastSeenUniqueId
public void updateLastSeenUniqueId(long inUniqueId, TransactionInfoBaseMessage in) { """ Update the last seen uniqueId for this partition if it's an initiate task message. @param inUniqueId @param in """ if (in instanceof Iv2InitiateTaskMessage && inUniqueId > m_lastSeenUniqueId) { m_la...
java
public void updateLastSeenUniqueId(long inUniqueId, TransactionInfoBaseMessage in) { if (in instanceof Iv2InitiateTaskMessage && inUniqueId > m_lastSeenUniqueId) { m_lastSeenUniqueId = inUniqueId; } }
[ "public", "void", "updateLastSeenUniqueId", "(", "long", "inUniqueId", ",", "TransactionInfoBaseMessage", "in", ")", "{", "if", "(", "in", "instanceof", "Iv2InitiateTaskMessage", "&&", "inUniqueId", ">", "m_lastSeenUniqueId", ")", "{", "m_lastSeenUniqueId", "=", "inUn...
Update the last seen uniqueId for this partition if it's an initiate task message. @param inUniqueId @param in
[ "Update", "the", "last", "seen", "uniqueId", "for", "this", "partition", "if", "it", "s", "an", "initiate", "task", "message", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/iv2/ReplaySequencer.java#L202-L207
powermock/powermock
powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/PowerMockito.java
PowerMockito.verifyNew
@SuppressWarnings("unchecked") public static <T> ConstructorArgumentsVerification verifyNew(Class<T> mock, VerificationMode mode) { """ Verifies certain behavior happened at least once / exact number of times / never. E.g: <p> <pre> verifyNew(ClassWithStaticMethod.class, times(5)); verifyNew(ClassWithSt...
java
@SuppressWarnings("unchecked") public static <T> ConstructorArgumentsVerification verifyNew(Class<T> mock, VerificationMode mode) { return POWERMOCKITO_CORE.verifyNew(mock, mode); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "ConstructorArgumentsVerification", "verifyNew", "(", "Class", "<", "T", ">", "mock", ",", "VerificationMode", "mode", ")", "{", "return", "POWERMOCKITO_CORE", ".", "verifyNew",...
Verifies certain behavior happened at least once / exact number of times / never. E.g: <p> <pre> verifyNew(ClassWithStaticMethod.class, times(5)); verifyNew(ClassWithStaticMethod.class, atLeast(2)); //you can use flexible argument matchers, e.g: verifyNew(ClassWithStaticMethod.class, atLeastOnce()); </pre> <p> <b>tim...
[ "Verifies", "certain", "behavior", "happened", "at", "least", "once", "/", "exact", "number", "of", "times", "/", "never", ".", "E", ".", "g", ":", "<p", ">", "<pre", ">", "verifyNew", "(", "ClassWithStaticMethod", ".", "class", "times", "(", "5", "))", ...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-mockito2/src/main/java/org/powermock/api/mockito/PowerMockito.java#L348-L351
davidcarboni/cryptolite-java
src/main/java/com/github/davidcarboni/cryptolite/KeyExchange.java
KeyExchange.encryptKey
public String encryptKey(SecretKey key, PublicKey destinationPublicKey) { """ This method encrypts the given {@link SecretKey} with the destination user's {@link PublicKey} so that it can be safely sent to them. @param key The {@link SecretKey} to be encrypted. @param destinationPublicKey The...
java
public String encryptKey(SecretKey key, PublicKey destinationPublicKey) { // Basic null check if (key == null) { return null; } // Convert the input key to a byte array: byte[] bytes = key.getEncoded(); // Encrypt the bytes: byte[] encryp...
[ "public", "String", "encryptKey", "(", "SecretKey", "key", ",", "PublicKey", "destinationPublicKey", ")", "{", "// Basic null check\r", "if", "(", "key", "==", "null", ")", "{", "return", "null", ";", "}", "// Convert the input key to a byte array:\r", "byte", "[", ...
This method encrypts the given {@link SecretKey} with the destination user's {@link PublicKey} so that it can be safely sent to them. @param key The {@link SecretKey} to be encrypted. @param destinationPublicKey The {@link PublicKey} of the user to whom you will be sending the {@link SecretKey}. This ...
[ "This", "method", "encrypts", "the", "given", "{", "@link", "SecretKey", "}", "with", "the", "destination", "user", "s", "{", "@link", "PublicKey", "}", "so", "that", "it", "can", "be", "safely", "sent", "to", "them", "." ]
train
https://github.com/davidcarboni/cryptolite-java/blob/e67954181a04ffc9beb1d9abca1421195fcf9764/src/main/java/com/github/davidcarboni/cryptolite/KeyExchange.java#L94-L116
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ListApi.java
ListApi.getOptional
public static <T> Optional<Optional<T>> getOptional(final List list, final Class<T> clazz, final Integer... path) { """ Get optional value by path. @param <T> optional value type @param clazz type of value @param list subject @param path nodes to walk in map @return value """ return get(list, Opti...
java
public static <T> Optional<Optional<T>> getOptional(final List list, final Class<T> clazz, final Integer... path) { return get(list, Optional.class, path).map(opt -> (Optional<T>) opt); }
[ "public", "static", "<", "T", ">", "Optional", "<", "Optional", "<", "T", ">", ">", "getOptional", "(", "final", "List", "list", ",", "final", "Class", "<", "T", ">", "clazz", ",", "final", "Integer", "...", "path", ")", "{", "return", "get", "(", ...
Get optional value by path. @param <T> optional value type @param clazz type of value @param list subject @param path nodes to walk in map @return value
[ "Get", "optional", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/ListApi.java#L244-L246
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.metrics/src/com/ibm/ws/microprofile/metrics/impl/MetricRegistryImpl.java
MetricRegistryImpl.getCounters
@Override public SortedMap<String, Counter> getCounters(MetricFilter filter) { """ Returns a map of all the counters in the registry and their names which match the given filter. @param filter the metric filter to match @return all the counters in the registry """ return getMetrics(Counter.cla...
java
@Override public SortedMap<String, Counter> getCounters(MetricFilter filter) { return getMetrics(Counter.class, filter); }
[ "@", "Override", "public", "SortedMap", "<", "String", ",", "Counter", ">", "getCounters", "(", "MetricFilter", "filter", ")", "{", "return", "getMetrics", "(", "Counter", ".", "class", ",", "filter", ")", ";", "}" ]
Returns a map of all the counters in the registry and their names which match the given filter. @param filter the metric filter to match @return all the counters in the registry
[ "Returns", "a", "map", "of", "all", "the", "counters", "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#L362-L365
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasModelUtils.java
KerasModelUtils.determineKerasMajorVersion
public static int determineKerasMajorVersion(Map<String, Object> modelConfig, KerasModelConfiguration config) throws InvalidKerasConfigurationException { """ Determine Keras major version @param modelConfig parsed model configuration for keras model @param config basic model configuration (Ker...
java
public static int determineKerasMajorVersion(Map<String, Object> modelConfig, KerasModelConfiguration config) throws InvalidKerasConfigurationException { int kerasMajorVersion; if (!modelConfig.containsKey(config.getFieldKerasVersion())) { log.warn("Could not read keras version u...
[ "public", "static", "int", "determineKerasMajorVersion", "(", "Map", "<", "String", ",", "Object", ">", "modelConfig", ",", "KerasModelConfiguration", "config", ")", "throws", "InvalidKerasConfigurationException", "{", "int", "kerasMajorVersion", ";", "if", "(", "!", ...
Determine Keras major version @param modelConfig parsed model configuration for keras model @param config basic model configuration (KerasModelConfiguration) @return Major Keras version (1 or 2) @throws InvalidKerasConfigurationException Invalid Keras config
[ "Determine", "Keras", "major", "version" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasModelUtils.java#L96-L116
mgormley/pacaya
src/main/java/edu/jhu/pacaya/autodiff/Tensor.java
Tensor.addTensor
public void addTensor(Tensor addend, int dim, int idx) { """ Adds a smaller tensor to this one, inserting it at a specified dimension and index. This can be thought of as selecting the sub-tensor of this tensor adding the smaller tensor to it. This is the larger tensor (i.e. the augend). @param addend The ...
java
public void addTensor(Tensor addend, int dim, int idx) { checkSameAlgebra(this, addend); DimIter yIter = new DimIter(addend.getDims()); while (yIter.hasNext()) { int[] yIdx = yIter.next(); int[] xIdx = IntArrays.insertEntry(yIdx, dim, idx); this.add(xIdx, adde...
[ "public", "void", "addTensor", "(", "Tensor", "addend", ",", "int", "dim", ",", "int", "idx", ")", "{", "checkSameAlgebra", "(", "this", ",", "addend", ")", ";", "DimIter", "yIter", "=", "new", "DimIter", "(", "addend", ".", "getDims", "(", ")", ")", ...
Adds a smaller tensor to this one, inserting it at a specified dimension and index. This can be thought of as selecting the sub-tensor of this tensor adding the smaller tensor to it. This is the larger tensor (i.e. the augend). @param addend The smaller tensor (i.e. the addend) @param dim The dimension which will be ...
[ "Adds", "a", "smaller", "tensor", "to", "this", "one", "inserting", "it", "at", "a", "specified", "dimension", "and", "index", ".", "This", "can", "be", "thought", "of", "as", "selecting", "the", "sub", "-", "tensor", "of", "this", "tensor", "adding", "t...
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/autodiff/Tensor.java#L539-L547
alkacon/opencms-core
src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java
CmsXmlContentPropertyHelper.convertPathsToIds
protected static String convertPathsToIds(CmsObject cms, String value) { """ Converts a string containing zero or more VFS paths into a string containing the corresponding structure ids.<p> @param cms the CmsObject to use for the VFS operations @param value a string representation of a list of paths @return...
java
protected static String convertPathsToIds(CmsObject cms, String value) { if (value == null) { return null; } // represent vfslists as lists of path in JSON List<String> paths = CmsStringUtil.splitAsList(value, CmsXmlContentProperty.PROP_SEPARATOR); List<String> ids =...
[ "protected", "static", "String", "convertPathsToIds", "(", "CmsObject", "cms", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "null", ";", "}", "// represent vfslists as lists of path in JSON", "List", "<", "String", ">",...
Converts a string containing zero or more VFS paths into a string containing the corresponding structure ids.<p> @param cms the CmsObject to use for the VFS operations @param value a string representation of a list of paths @return a string representation of a list of ids
[ "Converts", "a", "string", "containing", "zero", "or", "more", "VFS", "paths", "into", "a", "string", "containing", "the", "corresponding", "structure", "ids", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java#L828-L847
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentsInner.java
JobAgentsInner.getAsync
public Observable<JobAgentInner> getAsync(String resourceGroupName, String serverName, String jobAgentName) { """ Gets a job agent. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName ...
java
public Observable<JobAgentInner> getAsync(String resourceGroupName, String serverName, String jobAgentName) { return getWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName).map(new Func1<ServiceResponse<JobAgentInner>, JobAgentInner>() { @Override public JobAgentInner ca...
[ "public", "Observable", "<", "JobAgentInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "jobAgen...
Gets a job agent. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent to be retrieved. @throws IllegalArgumentException th...
[ "Gets", "a", "job", "agent", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentsInner.java#L266-L273
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/h/HomographyInducedStereo3Pts.java
HomographyInducedStereo3Pts.process
public boolean process(AssociatedPair p1, AssociatedPair p2, AssociatedPair p3) { """ Estimates the homography from view 1 to view 2 induced by a plane from 3 point associations. Each pair must pass the epipolar constraint. This can fail if the points are colinear. @param p1 Associated point observation @par...
java
public boolean process(AssociatedPair p1, AssociatedPair p2, AssociatedPair p3) { // Fill rows of M with observations from image 1 fillM(p1.p1,p2.p1,p3.p1); // Compute 'b' vector b.x = computeB(p1.p2); b.y = computeB(p2.p2); b.z = computeB(p3.p2); // A_inv_b = inv(A)*b if( !solver.setA(M) ) return...
[ "public", "boolean", "process", "(", "AssociatedPair", "p1", ",", "AssociatedPair", "p2", ",", "AssociatedPair", "p3", ")", "{", "// Fill rows of M with observations from image 1", "fillM", "(", "p1", ".", "p1", ",", "p2", ".", "p1", ",", "p3", ".", "p1", ")",...
Estimates the homography from view 1 to view 2 induced by a plane from 3 point associations. Each pair must pass the epipolar constraint. This can fail if the points are colinear. @param p1 Associated point observation @param p2 Associated point observation @param p3 Associated point observation @return True if succe...
[ "Estimates", "the", "homography", "from", "view", "1", "to", "view", "2", "induced", "by", "a", "plane", "from", "3", "point", "associations", ".", "Each", "pair", "must", "pass", "the", "epipolar", "constraint", ".", "This", "can", "fail", "if", "the", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/h/HomographyInducedStereo3Pts.java#L104-L128
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java
VectorUtil.randomVector
public static <V extends NumberVector> V randomVector(NumberVector.Factory<V> factory, int dim, Random r) { """ Produce a new vector based on random numbers in [0:1]. @param factory Vector factory @param dim desired dimensionality @param r Random generator @param <V> vector type @return new instance """...
java
public static <V extends NumberVector> V randomVector(NumberVector.Factory<V> factory, int dim, Random r) { double[] data = new double[dim]; for(int i = 0; i < dim; i++) { data[i] = r.nextDouble(); } return factory.newNumberVector(data); }
[ "public", "static", "<", "V", "extends", "NumberVector", ">", "V", "randomVector", "(", "NumberVector", ".", "Factory", "<", "V", ">", "factory", ",", "int", "dim", ",", "Random", "r", ")", "{", "double", "[", "]", "data", "=", "new", "double", "[", ...
Produce a new vector based on random numbers in [0:1]. @param factory Vector factory @param dim desired dimensionality @param r Random generator @param <V> vector type @return new instance
[ "Produce", "a", "new", "vector", "based", "on", "random", "numbers", "in", "[", "0", ":", "1", "]", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/data/VectorUtil.java#L66-L72
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDOAuth2UserDaoImpl.java
GeneratedDOAuth2UserDaoImpl.queryByUpdatedDate
public Iterable<DOAuth2User> queryByUpdatedDate(java.util.Date updatedDate) { """ query-by method for field updatedDate @param updatedDate the specified attribute @return an Iterable of DOAuth2Users for the specified updatedDate """ return queryByField(null, DOAuth2UserMapper.Field.UPDATEDDATE.getFieldNa...
java
public Iterable<DOAuth2User> queryByUpdatedDate(java.util.Date updatedDate) { return queryByField(null, DOAuth2UserMapper.Field.UPDATEDDATE.getFieldName(), updatedDate); }
[ "public", "Iterable", "<", "DOAuth2User", ">", "queryByUpdatedDate", "(", "java", ".", "util", ".", "Date", "updatedDate", ")", "{", "return", "queryByField", "(", "null", ",", "DOAuth2UserMapper", ".", "Field", ".", "UPDATEDDATE", ".", "getFieldName", "(", ")...
query-by method for field updatedDate @param updatedDate the specified attribute @return an Iterable of DOAuth2Users for the specified updatedDate
[ "query", "-", "by", "method", "for", "field", "updatedDate" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/oauth2/dao/GeneratedDOAuth2UserDaoImpl.java#L151-L153
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/dos/dos_stats.java
dos_stats.get
public static dos_stats get(nitro_service service, options option) throws Exception { """ Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler. """ dos_stats obj = new dos_stats(); dos_stats[] response = (dos_stats[])obj.stat_resources(service,option); return ...
java
public static dos_stats get(nitro_service service, options option) throws Exception{ dos_stats obj = new dos_stats(); dos_stats[] response = (dos_stats[])obj.stat_resources(service,option); return response[0]; }
[ "public", "static", "dos_stats", "get", "(", "nitro_service", "service", ",", "options", "option", ")", "throws", "Exception", "{", "dos_stats", "obj", "=", "new", "dos_stats", "(", ")", ";", "dos_stats", "[", "]", "response", "=", "(", "dos_stats", "[", "...
Use this API to fetch the statistics of all dos_stats resources that are configured on netscaler.
[ "Use", "this", "API", "to", "fetch", "the", "statistics", "of", "all", "dos_stats", "resources", "that", "are", "configured", "on", "netscaler", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/dos/dos_stats.java#L160-L164
Azure/azure-sdk-for-java
locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java
ManagementLocksInner.deleteAtResourceLevel
public void deleteAtResourceLevel(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String lockName) { """ Deletes the management lock of a resource or any level below the resource. To delete management locks, you must have access to M...
java
public void deleteAtResourceLevel(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String lockName) { deleteAtResourceLevelWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, reso...
[ "public", "void", "deleteAtResourceLevel", "(", "String", "resourceGroupName", ",", "String", "resourceProviderNamespace", ",", "String", "parentResourcePath", ",", "String", "resourceType", ",", "String", "resourceName", ",", "String", "lockName", ")", "{", "deleteAtRe...
Deletes the management lock of a resource or any level below the resource. To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. @param resourceGroupName The na...
[ "Deletes", "the", "management", "lock", "of", "a", "resource", "or", "any", "level", "below", "the", "resource", ".", "To", "delete", "management", "locks", "you", "must", "have", "access", "to", "Microsoft", ".", "Authorization", "/", "*", "or", "Microsoft"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java#L814-L816
modelmapper/modelmapper
core/src/main/java/org/modelmapper/internal/ImplicitMappingBuilder.java
ImplicitMappingBuilder.mergeMappings
private void mergeMappings(TypeMap<?, ?> destinationMap) { """ Merges mappings from an existing TypeMap into the type map under construction. """ for (Mapping mapping : destinationMap.getMappings()) { InternalMapping internalMapping = (InternalMapping) mapping; mergedMappings.add(internalMap...
java
private void mergeMappings(TypeMap<?, ?> destinationMap) { for (Mapping mapping : destinationMap.getMappings()) { InternalMapping internalMapping = (InternalMapping) mapping; mergedMappings.add(internalMapping.createMergedCopy( propertyNameInfo.getSourceProperties(), propertyNameInfo.getDe...
[ "private", "void", "mergeMappings", "(", "TypeMap", "<", "?", ",", "?", ">", "destinationMap", ")", "{", "for", "(", "Mapping", "mapping", ":", "destinationMap", ".", "getMappings", "(", ")", ")", "{", "InternalMapping", "internalMapping", "=", "(", "Interna...
Merges mappings from an existing TypeMap into the type map under construction.
[ "Merges", "mappings", "from", "an", "existing", "TypeMap", "into", "the", "type", "map", "under", "construction", "." ]
train
https://github.com/modelmapper/modelmapper/blob/491d165ded9dc9aba7ce8b56984249e1a1363204/core/src/main/java/org/modelmapper/internal/ImplicitMappingBuilder.java#L389-L395
maxirosson/jdroid-android
jdroid-android-core/src/main/java/com/jdroid/android/utils/SharedPreferencesHelper.java
SharedPreferencesHelper.loadPreferenceAsInteger
public Integer loadPreferenceAsInteger(String key, Integer defaultValue) { """ Retrieve an Integer value from the preferences. @param key The name of the preference to retrieve @param defaultValue Value to return if this preference does not exist @return the preference value if it exists, or defaultValue. ...
java
public Integer loadPreferenceAsInteger(String key, Integer defaultValue) { Integer value = defaultValue; if (hasPreference(key)) { value = getSharedPreferences().getInt(key, 0); } logLoad(key, value); return value; }
[ "public", "Integer", "loadPreferenceAsInteger", "(", "String", "key", ",", "Integer", "defaultValue", ")", "{", "Integer", "value", "=", "defaultValue", ";", "if", "(", "hasPreference", "(", "key", ")", ")", "{", "value", "=", "getSharedPreferences", "(", ")",...
Retrieve an Integer value from the preferences. @param key The name of the preference to retrieve @param defaultValue Value to return if this preference does not exist @return the preference value if it exists, or defaultValue.
[ "Retrieve", "an", "Integer", "value", "from", "the", "preferences", "." ]
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-core/src/main/java/com/jdroid/android/utils/SharedPreferencesHelper.java#L255-L262
GwtMaterialDesign/gwt-material-addins
src/main/java/gwt/material/design/addins/client/pathanimator/MaterialPathAnimator.java
MaterialPathAnimator.reverseAnimate
public static void reverseAnimate(Element sourceElement, Element targetElement, Functions.Func reverseCallback) { """ Helper method to reverse animate the source element to target element with reverse callback @param sourceElement Source element to apply the Path Animator @param targetElement Target elemen...
java
public static void reverseAnimate(Element sourceElement, Element targetElement, Functions.Func reverseCallback) { MaterialPathAnimator animator = new MaterialPathAnimator(); animator.setSourceElement(sourceElement); animator.setTargetElement(targetElement); animator.setReverseCallback(re...
[ "public", "static", "void", "reverseAnimate", "(", "Element", "sourceElement", ",", "Element", "targetElement", ",", "Functions", ".", "Func", "reverseCallback", ")", "{", "MaterialPathAnimator", "animator", "=", "new", "MaterialPathAnimator", "(", ")", ";", "animat...
Helper method to reverse animate the source element to target element with reverse callback @param sourceElement Source element to apply the Path Animator @param targetElement Target element to apply the Path Animator @param reverseCallback The reverse callback method to be called when the path animator is applied
[ "Helper", "method", "to", "reverse", "animate", "the", "source", "element", "to", "target", "element", "with", "reverse", "callback" ]
train
https://github.com/GwtMaterialDesign/gwt-material-addins/blob/11aec9d92918225f70f936285d0ae94f2178c36e/src/main/java/gwt/material/design/addins/client/pathanimator/MaterialPathAnimator.java#L245-L251
OpenLiberty/open-liberty
dev/com.ibm.ws.security.javaeesec/src/com/ibm/ws/security/javaeesec/identitystore/LdapIdentityStore.java
LdapIdentityStore.getFormattedFilter
private String getFormattedFilter(String searchFilter, String caller, String attribute) { """ Format the callerSearchFilter or groupSearchFilter. We need to check for String substitution. If a substitution is needed, use the result as is. Otherwise, construct the remainder of the filter using the name attribute ...
java
private String getFormattedFilter(String searchFilter, String caller, String attribute) { //Allow %v in addition to %s for string replacement String filter = searchFilter.replaceAll("%v", "%s"); if (!(filter.startsWith("(") && filter.endsWith(")")) && !filter.isEmpty()) { filter = "(...
[ "private", "String", "getFormattedFilter", "(", "String", "searchFilter", ",", "String", "caller", ",", "String", "attribute", ")", "{", "//Allow %v in addition to %s for string replacement", "String", "filter", "=", "searchFilter", ".", "replaceAll", "(", "\"%v\"", ","...
Format the callerSearchFilter or groupSearchFilter. We need to check for String substitution. If a substitution is needed, use the result as is. Otherwise, construct the remainder of the filter using the name attribute of the group or caller. @param searchFilter The filter set in LdapIdentityStore @param caller The na...
[ "Format", "the", "callerSearchFilter", "or", "groupSearchFilter", ".", "We", "need", "to", "check", "for", "String", "substitution", ".", "If", "a", "substitution", "is", "needed", "use", "the", "result", "as", "is", ".", "Otherwise", "construct", "the", "rema...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.javaeesec/src/com/ibm/ws/security/javaeesec/identitystore/LdapIdentityStore.java#L416-L428
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/factories/KeyPairFactory.java
KeyPairFactory.newKeyPairGenerator
public static KeyPairGenerator newKeyPairGenerator(final String algorithm, final int keySize) throws NoSuchAlgorithmException, NoSuchProviderException { """ Factory method for creating a new {@link KeyPairGenerator} from the given parameters. @param algorithm the algorithm @param keySize the key size @ret...
java
public static KeyPairGenerator newKeyPairGenerator(final String algorithm, final int keySize) throws NoSuchAlgorithmException, NoSuchProviderException { KeyPairGenerator generator; if ("EC".equals(algorithm)) { generator = KeyPairGenerator.getInstance(algorithm, "BC"); } else { generator = KeyPairG...
[ "public", "static", "KeyPairGenerator", "newKeyPairGenerator", "(", "final", "String", "algorithm", ",", "final", "int", "keySize", ")", "throws", "NoSuchAlgorithmException", ",", "NoSuchProviderException", "{", "KeyPairGenerator", "generator", ";", "if", "(", "\"EC\"",...
Factory method for creating a new {@link KeyPairGenerator} from the given parameters. @param algorithm the algorithm @param keySize the key size @return the new {@link KeyPairGenerator} from the given parameters @throws NoSuchAlgorithmException is thrown if no Provider supports a KeyPairGeneratorSpi implementation fo...
[ "Factory", "method", "for", "creating", "a", "new", "{", "@link", "KeyPairGenerator", "}", "from", "the", "given", "parameters", "." ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/factories/KeyPairFactory.java#L179-L193
overturetool/overture
core/typechecker/src/main/java/org/overture/typechecker/visitor/TypeCheckerDefinitionVisitor.java
TypeCheckerDefinitionVisitor.setMeasureExp
private void setMeasureExp(TypeCheckInfo question, SFunctionDefinitionBase node, Environment base, Environment local, NameScope scope) throws AnalysisException { """ Set measureDef to a newly created function, based on the measure expression. @throws AnalysisException """ PType actual = node.getMeasure().ap...
java
private void setMeasureExp(TypeCheckInfo question, SFunctionDefinitionBase node, Environment base, Environment local, NameScope scope) throws AnalysisException { PType actual = node.getMeasure().apply(THIS, question.newInfo(local)); node.setMeasureName(node.getName().getMeasureName(node.getName().getLocation())); ...
[ "private", "void", "setMeasureExp", "(", "TypeCheckInfo", "question", ",", "SFunctionDefinitionBase", "node", ",", "Environment", "base", ",", "Environment", "local", ",", "NameScope", "scope", ")", "throws", "AnalysisException", "{", "PType", "actual", "=", "node",...
Set measureDef to a newly created function, based on the measure expression. @throws AnalysisException
[ "Set", "measureDef", "to", "a", "newly", "created", "function", "based", "on", "the", "measure", "expression", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/typechecker/src/main/java/org/overture/typechecker/visitor/TypeCheckerDefinitionVisitor.java#L1697-L1751
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnSitesInner.java
VpnSitesInner.updateTags
public VpnSiteInner updateTags(String resourceGroupName, String vpnSiteName, Map<String, String> tags) { """ Updates VpnSite tags. @param resourceGroupName The resource group name of the VpnSite. @param vpnSiteName The name of the VpnSite being updated. @param tags Resource tags. @throws IllegalArgumentExcep...
java
public VpnSiteInner updateTags(String resourceGroupName, String vpnSiteName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, vpnSiteName, tags).toBlocking().last().body(); }
[ "public", "VpnSiteInner", "updateTags", "(", "String", "resourceGroupName", ",", "String", "vpnSiteName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "vpnSiteName", "...
Updates VpnSite tags. @param resourceGroupName The resource group name of the VpnSite. @param vpnSiteName The name of the VpnSite being updated. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorException thrown if the request is rejected by server @throw...
[ "Updates", "VpnSite", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnSitesInner.java#L448-L450
oehf/ipf-oht-atna
nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/handlers/TLSEnabledSocketHandler.java
TLSEnabledSocketHandler.getInputStream
public InputStream getInputStream(URI uri) throws Exception { """ /* Note that this method always uses the system environment (specifically https.protocols) in order to derive the HTTPS parameters. As such {@link SecurityDomain#SET_DOMAIN_ENVIRONMENT} must be set to true if these parameters are not configured v...
java
public InputStream getInputStream(URI uri) throws Exception { boolean tlsURI = uri.getScheme().equalsIgnoreCase("https"); SecurityDomain securityDomain = null; if (tlsURI) { final NodeAuthModuleContext context = NodeAuthModuleContext.getContext(); securityDomain = context...
[ "public", "InputStream", "getInputStream", "(", "URI", "uri", ")", "throws", "Exception", "{", "boolean", "tlsURI", "=", "uri", ".", "getScheme", "(", ")", ".", "equalsIgnoreCase", "(", "\"https\"", ")", ";", "SecurityDomain", "securityDomain", "=", "null", ";...
/* Note that this method always uses the system environment (specifically https.protocols) in order to derive the HTTPS parameters. As such {@link SecurityDomain#SET_DOMAIN_ENVIRONMENT} must be set to true if these parameters are not configured via system properties anyway. @see org.openhealthtools.ihe.atna.nodeauth.S...
[ "/", "*", "Note", "that", "this", "method", "always", "uses", "the", "system", "environment", "(", "specifically", "https", ".", "protocols", ")", "in", "order", "to", "derive", "the", "HTTPS", "parameters", ".", "As", "such", "{", "@link", "SecurityDomain#S...
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/nodeauth/src/main/java/org/openhealthtools/ihe/atna/nodeauth/handlers/TLSEnabledSocketHandler.java#L337-L345
maestrano/maestrano-java
src/main/java/com/maestrano/net/ConnecClient.java
ConnecClient.getCollectionEndpoint
public String getCollectionEndpoint(String entityName, String groupId) { """ Return the path to the entity collection endpoint @param entity name @param customer group id @return collection endpoint """ return connec.getBasePath() + "/" + groupId + "/" + entityName; }
java
public String getCollectionEndpoint(String entityName, String groupId) { return connec.getBasePath() + "/" + groupId + "/" + entityName; }
[ "public", "String", "getCollectionEndpoint", "(", "String", "entityName", ",", "String", "groupId", ")", "{", "return", "connec", ".", "getBasePath", "(", ")", "+", "\"/\"", "+", "groupId", "+", "\"/\"", "+", "entityName", ";", "}" ]
Return the path to the entity collection endpoint @param entity name @param customer group id @return collection endpoint
[ "Return", "the", "path", "to", "the", "entity", "collection", "endpoint" ]
train
https://github.com/maestrano/maestrano-java/blob/e71c6d3172d7645529d678d1cb3ea9e0a59de314/src/main/java/com/maestrano/net/ConnecClient.java#L65-L67
JodaOrg/joda-time
src/main/java/org/joda/time/Weeks.java
Weeks.weeksBetween
public static Weeks weeksBetween(ReadableInstant start, ReadableInstant end) { """ Creates a <code>Weeks</code> representing the number of whole weeks between the two specified datetimes. @param start the start instant, must not be null @param end the end instant, must not be null @return the period in wee...
java
public static Weeks weeksBetween(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.weeks()); return Weeks.weeks(amount); }
[ "public", "static", "Weeks", "weeksBetween", "(", "ReadableInstant", "start", ",", "ReadableInstant", "end", ")", "{", "int", "amount", "=", "BaseSingleFieldPeriod", ".", "between", "(", "start", ",", "end", ",", "DurationFieldType", ".", "weeks", "(", ")", ")...
Creates a <code>Weeks</code> representing the number of whole weeks between the two specified datetimes. @param start the start instant, must not be null @param end the end instant, must not be null @return the period in weeks @throws IllegalArgumentException if the instants are null or invalid
[ "Creates", "a", "<code", ">", "Weeks<", "/", "code", ">", "representing", "the", "number", "of", "whole", "weeks", "between", "the", "two", "specified", "datetimes", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Weeks.java#L100-L103
apache/groovy
subprojects/groovy-json/src/main/java/groovy/json/DefaultJsonGenerator.java
DefaultJsonGenerator.writeRaw
protected void writeRaw(CharSequence seq, CharBuf buffer) { """ Serializes any char sequence and writes it into specified buffer without performing any manipulation of the given text. """ if (seq != null) { buffer.add(seq.toString()); } }
java
protected void writeRaw(CharSequence seq, CharBuf buffer) { if (seq != null) { buffer.add(seq.toString()); } }
[ "protected", "void", "writeRaw", "(", "CharSequence", "seq", ",", "CharBuf", "buffer", ")", "{", "if", "(", "seq", "!=", "null", ")", "{", "buffer", ".", "add", "(", "seq", ".", "toString", "(", ")", ")", ";", "}", "}" ]
Serializes any char sequence and writes it into specified buffer without performing any manipulation of the given text.
[ "Serializes", "any", "char", "sequence", "and", "writes", "it", "into", "specified", "buffer", "without", "performing", "any", "manipulation", "of", "the", "given", "text", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-json/src/main/java/groovy/json/DefaultJsonGenerator.java#L264-L268
defei/codelogger-utils
src/main/java/org/codelogger/utils/HttpUtils.java
HttpUtils.doGet
public static String doGet(final String url, final int retryTimes) { """ access given url by get request, if get exception, will retry by given retryTimes. @param url url to access @param retryTimes retry times when get exception. @return response content of target url. """ try { return doGetB...
java
public static String doGet(final String url, final int retryTimes) { try { return doGetByLoop(url, retryTimes); } catch (HttpException e) { throw new HttpException(format("Failed to download content for url: '%s'. Tried '%s' times", url, Math.max(retryTimes + 1, 1))); } }
[ "public", "static", "String", "doGet", "(", "final", "String", "url", ",", "final", "int", "retryTimes", ")", "{", "try", "{", "return", "doGetByLoop", "(", "url", ",", "retryTimes", ")", ";", "}", "catch", "(", "HttpException", "e", ")", "{", "throw", ...
access given url by get request, if get exception, will retry by given retryTimes. @param url url to access @param retryTimes retry times when get exception. @return response content of target url.
[ "access", "given", "url", "by", "get", "request", "if", "get", "exception", "will", "retry", "by", "given", "retryTimes", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/HttpUtils.java#L66-L74
SeaCloudsEU/SeaCloudsPlatform
sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/AgreementRestEntity.java
AgreementRestEntity.createAgreement
@POST public Response createAgreement(@Context UriInfo uriInfo, AgreementParam agrementParam) throws NotFoundException, ConflictException, InternalException { """ Creates a new agreement <pre> POST /agreements Request: POST /agreements HTTP/1.1 Accept: application/xml Response: HTTP/1.1 201 Cre...
java
@POST public Response createAgreement(@Context UriInfo uriInfo, AgreementParam agrementParam) throws NotFoundException, ConflictException, InternalException{ logger.debug("StartOf createAgreement - Insert /agreements"); String id, location = null; try{ AgreementHelperE agreement...
[ "@", "POST", "public", "Response", "createAgreement", "(", "@", "Context", "UriInfo", "uriInfo", ",", "AgreementParam", "agrementParam", ")", "throws", "NotFoundException", ",", "ConflictException", ",", "InternalException", "{", "logger", ".", "debug", "(", "\"Star...
Creates a new agreement <pre> POST /agreements Request: POST /agreements HTTP/1.1 Accept: application/xml Response: HTTP/1.1 201 Created Content-type: application/xml Location: http://.../agreements/$uuid {@code <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <message code="201" message= "The agreement has...
[ "Creates", "a", "new", "agreement" ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/AgreementRestEntity.java#L311-L338
Stratio/stratio-cassandra
src/java/com/stratio/cassandra/contrib/NotifyingBlockingThreadPoolExecutor.java
NotifyingBlockingThreadPoolExecutor.afterExecute
@Override protected void afterExecute(Runnable r, Throwable t) { """ After calling super's implementation of this method, the amount of tasks which are currently in process is decremented. Finally, if the amount of tasks currently running is zero the synchronizer's signallAll() method is invoked, thus anyone...
java
@Override protected void afterExecute(Runnable r, Throwable t) { super.afterExecute(r, t); // synchronizing on the pool (and actually all its threads) // the synchronization is needed to avoid more than one signal if two or more // threads decrement almost together and come to the ...
[ "@", "Override", "protected", "void", "afterExecute", "(", "Runnable", "r", ",", "Throwable", "t", ")", "{", "super", ".", "afterExecute", "(", "r", ",", "t", ")", ";", "// synchronizing on the pool (and actually all its threads)", "// the synchronization is needed to a...
After calling super's implementation of this method, the amount of tasks which are currently in process is decremented. Finally, if the amount of tasks currently running is zero the synchronizer's signallAll() method is invoked, thus anyone awaiting on this instance of ThreadPoolExecutor is released. @see java.util.co...
[ "After", "calling", "super", "s", "implementation", "of", "this", "method", "the", "amount", "of", "tasks", "which", "are", "currently", "in", "process", "is", "decremented", ".", "Finally", "if", "the", "amount", "of", "tasks", "currently", "running", "is", ...
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/contrib/NotifyingBlockingThreadPoolExecutor.java#L145-L159
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.leftShift
public static JPopupMenu leftShift(JPopupMenu self, JMenuItem item) { """ Overloads the left shift operator to provide an easy way to add components to a popupMenu.<p> @param self a JPopupMenu @param item an item to be added to the popupMenu. @return same popupMenu, after the value was added to it. @since 1...
java
public static JPopupMenu leftShift(JPopupMenu self, JMenuItem item) { self.add(item); return self; }
[ "public", "static", "JPopupMenu", "leftShift", "(", "JPopupMenu", "self", ",", "JMenuItem", "item", ")", "{", "self", ".", "add", "(", "item", ")", ";", "return", "self", ";", "}" ]
Overloads the left shift operator to provide an easy way to add components to a popupMenu.<p> @param self a JPopupMenu @param item an item to be added to the popupMenu. @return same popupMenu, after the value was added to it. @since 1.6.4
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "add", "components", "to", "a", "popupMenu", ".", "<p", ">" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L924-L927
alkacon/opencms-core
src/org/opencms/staticexport/CmsDefaultLinkSubstitutionHandler.java
CmsDefaultLinkSubstitutionHandler.getLink
public String getLink(CmsObject cms, String link, String siteRoot, boolean forceSecure) { """ Returns the resource root path in the OpenCms VFS for the given link, or <code>null</code> in case the link points to an external site.<p> If the target URI contains no site information, but starts with the opencms co...
java
public String getLink(CmsObject cms, String link, String siteRoot, boolean forceSecure) { return getLink(cms, link, siteRoot, null, forceSecure); }
[ "public", "String", "getLink", "(", "CmsObject", "cms", ",", "String", "link", ",", "String", "siteRoot", ",", "boolean", "forceSecure", ")", "{", "return", "getLink", "(", "cms", ",", "link", ",", "siteRoot", ",", "null", ",", "forceSecure", ")", ";", "...
Returns the resource root path in the OpenCms VFS for the given link, or <code>null</code> in case the link points to an external site.<p> If the target URI contains no site information, but starts with the opencms context, the context is removed:<pre> /opencms/opencms/system/further_path -> /system/further_path</pre>...
[ "Returns", "the", "resource", "root", "path", "in", "the", "OpenCms", "VFS", "for", "the", "given", "link", "or", "<code", ">", "null<", "/", "code", ">", "in", "case", "the", "link", "points", "to", "an", "external", "site", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsDefaultLinkSubstitutionHandler.java#L114-L117
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/Segment3dfx.java
Segment3dfx.x1Property
@Pure public DoubleProperty x1Property() { """ Replies the property that is the x coordinate of the first segment point. @return the x1 property. """ if (this.p1.x == null) { this.p1.x = new SimpleDoubleProperty(this, MathFXAttributeNames.X1); } return this.p1.x; }
java
@Pure public DoubleProperty x1Property() { if (this.p1.x == null) { this.p1.x = new SimpleDoubleProperty(this, MathFXAttributeNames.X1); } return this.p1.x; }
[ "@", "Pure", "public", "DoubleProperty", "x1Property", "(", ")", "{", "if", "(", "this", ".", "p1", ".", "x", "==", "null", ")", "{", "this", ".", "p1", ".", "x", "=", "new", "SimpleDoubleProperty", "(", "this", ",", "MathFXAttributeNames", ".", "X1", ...
Replies the property that is the x coordinate of the first segment point. @return the x1 property.
[ "Replies", "the", "property", "that", "is", "the", "x", "coordinate", "of", "the", "first", "segment", "point", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/Segment3dfx.java#L205-L211
demidenko05/beigesoft-webstore
src/main/java/org/beigesoft/webstore/processor/PrcRefreshItemsInList.java
PrcRefreshItemsInList.retrieveStartData
public final void retrieveStartData(final Map<String, Object> pReqVars) throws Exception { """ <p>Retrieve start data.</p> @param pReqVars additional param @throws Exception - an exception """ try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase.setTransactionIsolation(ISrvDatabase...
java
public final void retrieveStartData(final Map<String, Object> pReqVars) throws Exception { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase.setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); GoodsInListLuv goodsInListLuv = ...
[ "public", "final", "void", "retrieveStartData", "(", "final", "Map", "<", "String", ",", "Object", ">", "pReqVars", ")", "throws", "Exception", "{", "try", "{", "this", ".", "srvDatabase", ".", "setIsAutocommit", "(", "false", ")", ";", "this", ".", "srvDa...
<p>Retrieve start data.</p> @param pReqVars additional param @throws Exception - an exception
[ "<p", ">", "Retrieve", "start", "data", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-webstore/blob/41ed2e2f1c640d37951d5fb235f26856008b87e1/src/main/java/org/beigesoft/webstore/processor/PrcRefreshItemsInList.java#L235-L258
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/LocationInventoryUrl.java
LocationInventoryUrl.getLocationInventoryUrl
public static MozuUrl getLocationInventoryUrl(String locationCode, String productCode, String responseFields) { """ Get Resource Url for GetLocationInventory @param locationCode The unique, user-defined code that identifies a location. @param productCode The unique, user-defined product code of a product, used t...
java
public static MozuUrl getLocationInventoryUrl(String locationCode, String productCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/locationinventory/{locationCode}/{productCode}?responseFields={responseFields}"); formatter.formatUrl("locationCode", locationCod...
[ "public", "static", "MozuUrl", "getLocationInventoryUrl", "(", "String", "locationCode", ",", "String", "productCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/locationinventory/{...
Get Resource Url for GetLocationInventory @param locationCode The unique, user-defined code that identifies a location. @param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product. @param responseFields Filtering syntax appended to an API call to incre...
[ "Get", "Resource", "Url", "for", "GetLocationInventory" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/LocationInventoryUrl.java#L23-L30
phax/ph-css
ph-css/src/main/java/com/helger/css/utils/CSSDataURL.java
CSSDataURL.getContentAsBase64EncodedString
@Nonnull public String getContentAsBase64EncodedString () { """ Get the content as a Base64 encoded {@link String} in the {@link Charset} specified by {@link #getCharset()}. The encoding is applied independent of the {@link #isBase64Encoded()} state. @return Never <code>null</code>. """ // Add Base6...
java
@Nonnull public String getContentAsBase64EncodedString () { // Add Base64 encoded String final byte [] aEncoded = Base64.encodeBytesToBytes (m_aContent); // Print the string in the specified charset return new String (aEncoded, m_aCharset); }
[ "@", "Nonnull", "public", "String", "getContentAsBase64EncodedString", "(", ")", "{", "// Add Base64 encoded String", "final", "byte", "[", "]", "aEncoded", "=", "Base64", ".", "encodeBytesToBytes", "(", "m_aContent", ")", ";", "// Print the string in the specified charse...
Get the content as a Base64 encoded {@link String} in the {@link Charset} specified by {@link #getCharset()}. The encoding is applied independent of the {@link #isBase64Encoded()} state. @return Never <code>null</code>.
[ "Get", "the", "content", "as", "a", "Base64", "encoded", "{", "@link", "String", "}", "in", "the", "{", "@link", "Charset", "}", "specified", "by", "{", "@link", "#getCharset", "()", "}", ".", "The", "encoding", "is", "applied", "independent", "of", "the...
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/utils/CSSDataURL.java#L286-L293
onepf/OpenIAB
library/src/main/java/org/onepf/oms/OpenIabHelper.java
OpenIabHelper.mapSku
public static void mapSku(String sku, String storeName, @NotNull String storeSku) { """ Maps the sku and the storeSku for a particular store. The best practice is to use SKU like <code>com.companyname.application.item</code>. Such SKU fits most of stores so it doesn't need to be mapped. If the recommended appro...
java
public static void mapSku(String sku, String storeName, @NotNull String storeSku) { SkuManager.getInstance().mapSku(sku, storeName, storeSku); }
[ "public", "static", "void", "mapSku", "(", "String", "sku", ",", "String", "storeName", ",", "@", "NotNull", "String", "storeSku", ")", "{", "SkuManager", ".", "getInstance", "(", ")", ".", "mapSku", "(", "sku", ",", "storeName", ",", "storeSku", ")", ";...
Maps the sku and the storeSku for a particular store. The best practice is to use SKU like <code>com.companyname.application.item</code>. Such SKU fits most of stores so it doesn't need to be mapped. If the recommended approach is not applicable, use application internal SKU in the code (usually it is a SKU for Google ...
[ "Maps", "the", "sku", "and", "the", "storeSku", "for", "a", "particular", "store", ".", "The", "best", "practice", "is", "to", "use", "SKU", "like", "<code", ">", "com", ".", "companyname", ".", "application", ".", "item<", "/", "code", ">", ".", "Such...
train
https://github.com/onepf/OpenIAB/blob/90552d53c5303b322940d96a0c4b7cb797d78760/library/src/main/java/org/onepf/oms/OpenIabHelper.java#L353-L355
HiddenStage/divide
Client/android-client/src/main/java/com/google/android/gcm/GCMRegistrar.java
GCMRegistrar.setRegistrationId
static String setRegistrationId(Context context, String regId) { """ Sets the registration id in the persistence store. @param context application's context. @param regId registration id """ final SharedPreferences prefs = getGCMPreferences(context); String oldRegistrationId = prefs.getStri...
java
static String setRegistrationId(Context context, String regId) { final SharedPreferences prefs = getGCMPreferences(context); String oldRegistrationId = prefs.getString(PROPERTY_REG_ID, ""); int appVersion = getAppVersion(context); Log.v(TAG, "Saving regId on app version " + appVersion); ...
[ "static", "String", "setRegistrationId", "(", "Context", "context", ",", "String", "regId", ")", "{", "final", "SharedPreferences", "prefs", "=", "getGCMPreferences", "(", "context", ")", ";", "String", "oldRegistrationId", "=", "prefs", ".", "getString", "(", "...
Sets the registration id in the persistence store. @param context application's context. @param regId registration id
[ "Sets", "the", "registration", "id", "in", "the", "persistence", "store", "." ]
train
https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Client/android-client/src/main/java/com/google/android/gcm/GCMRegistrar.java#L364-L374
ludovicianul/selenium-on-steroids
src/main/java/com/insidecoding/sos/io/FileUtils.java
FileUtils.getNumberOfRows
public int getNumberOfRows(final String fileName, final String sheetName) throws IOException { """ Gets the number of rows populated within the supplied file and sheet name. @param fileName the name of the file @param sheetName the sheet name @return the number of rows @throws IOException if something...
java
public int getNumberOfRows(final String fileName, final String sheetName) throws IOException { LOG.info("Getting the number of rows from:" + fileName + " sheet: " + sheetName); Workbook workbook = getWorkbook(fileName); Sheet sheets = workbook.getSheet(sheetName); return sheets.getPhysicalNumberOfRows();...
[ "public", "int", "getNumberOfRows", "(", "final", "String", "fileName", ",", "final", "String", "sheetName", ")", "throws", "IOException", "{", "LOG", ".", "info", "(", "\"Getting the number of rows from:\"", "+", "fileName", "+", "\" sheet: \"", "+", "sheetName", ...
Gets the number of rows populated within the supplied file and sheet name. @param fileName the name of the file @param sheetName the sheet name @return the number of rows @throws IOException if something goes wrong while reading the file
[ "Gets", "the", "number", "of", "rows", "populated", "within", "the", "supplied", "file", "and", "sheet", "name", "." ]
train
https://github.com/ludovicianul/selenium-on-steroids/blob/f89d91c59f686114f94624bfc55712f278005bfa/src/main/java/com/insidecoding/sos/io/FileUtils.java#L490-L497
javamonkey/beetl2.0
beetl-core/src/main/java/org/beetl/core/io/FloatingIOWriter.java
FDBigInt.multaddMe
public void multaddMe(int iv, int addend) { """ /* Multiply a FDBigInt by an int and add another int. Result is computed in place. Hope it fits! """ long v = iv; long p; // unroll 0th iteration, doing addition. p = v * ((long) data[0] & 0xffffffffL) + ((long) addend & 0xffffffffL); data[0] ...
java
public void multaddMe(int iv, int addend) { long v = iv; long p; // unroll 0th iteration, doing addition. p = v * ((long) data[0] & 0xffffffffL) + ((long) addend & 0xffffffffL); data[0] = (int) p; p >>>= 32; for (int i = 1; i < nWords; i++) { p += v * ((long) data[i] & 0xffffffffL); ...
[ "public", "void", "multaddMe", "(", "int", "iv", ",", "int", "addend", ")", "{", "long", "v", "=", "iv", ";", "long", "p", ";", "// unroll 0th iteration, doing addition.\r", "p", "=", "v", "*", "(", "(", "long", ")", "data", "[", "0", "]", "&", "0xff...
/* Multiply a FDBigInt by an int and add another int. Result is computed in place. Hope it fits!
[ "/", "*", "Multiply", "a", "FDBigInt", "by", "an", "int", "and", "add", "another", "int", ".", "Result", "is", "computed", "in", "place", ".", "Hope", "it", "fits!" ]
train
https://github.com/javamonkey/beetl2.0/blob/f32f729ad238079df5aca6e38a3c3ba0a55c78d6/beetl-core/src/main/java/org/beetl/core/io/FloatingIOWriter.java#L2021-L2041
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nspbr_stats.java
nspbr_stats.get
public static nspbr_stats get(nitro_service service, String name) throws Exception { """ Use this API to fetch statistics of nspbr_stats resource of given name . """ nspbr_stats obj = new nspbr_stats(); obj.set_name(name); nspbr_stats response = (nspbr_stats) obj.stat_resource(service); return response...
java
public static nspbr_stats get(nitro_service service, String name) throws Exception{ nspbr_stats obj = new nspbr_stats(); obj.set_name(name); nspbr_stats response = (nspbr_stats) obj.stat_resource(service); return response; }
[ "public", "static", "nspbr_stats", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "nspbr_stats", "obj", "=", "new", "nspbr_stats", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";", "nspbr_stats", ...
Use this API to fetch statistics of nspbr_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "nspbr_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/ns/nspbr_stats.java#L229-L234
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.putAt
public static void putAt(MutableTreeNode self, int index, MutableTreeNode node) { """ Allow MutableTreeNode to work with subscript operators.<p> <b>WARNING:</b> this operation does not replace the node at the specified index, rather it inserts the node at that index, thus increasing the size of the treeNode by ...
java
public static void putAt(MutableTreeNode self, int index, MutableTreeNode node) { self.insert(node, index); }
[ "public", "static", "void", "putAt", "(", "MutableTreeNode", "self", ",", "int", "index", ",", "MutableTreeNode", "node", ")", "{", "self", ".", "insert", "(", "node", ",", "index", ")", ";", "}" ]
Allow MutableTreeNode to work with subscript operators.<p> <b>WARNING:</b> this operation does not replace the node at the specified index, rather it inserts the node at that index, thus increasing the size of the treeNode by 1.<p> @param self a MutableTreeNode @param index an index @param node the node to insert at...
[ "Allow", "MutableTreeNode", "to", "work", "with", "subscript", "operators", ".", "<p", ">", "<b", ">", "WARNING", ":", "<", "/", "b", ">", "this", "operation", "does", "not", "replace", "the", "node", "at", "the", "specified", "index", "rather", "it", "i...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L706-L708
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.replaceAll
public StrBuilder replaceAll(final String searchStr, final String replaceStr) { """ Replaces the search string with the replace string throughout the builder. @param searchStr the search string, null causes no action to occur @param replaceStr the replace string, null is equivalent to an empty string @retur...
java
public StrBuilder replaceAll(final String searchStr, final String replaceStr) { final int searchLen = (searchStr == null ? 0 : searchStr.length()); if (searchLen > 0) { final int replaceLen = (replaceStr == null ? 0 : replaceStr.length()); int index = indexOf(searchStr, 0); ...
[ "public", "StrBuilder", "replaceAll", "(", "final", "String", "searchStr", ",", "final", "String", "replaceStr", ")", "{", "final", "int", "searchLen", "=", "(", "searchStr", "==", "null", "?", "0", ":", "searchStr", ".", "length", "(", ")", ")", ";", "i...
Replaces the search string with the replace string throughout the builder. @param searchStr the search string, null causes no action to occur @param replaceStr the replace string, null is equivalent to an empty string @return this, to enable chaining
[ "Replaces", "the", "search", "string", "with", "the", "replace", "string", "throughout", "the", "builder", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L2006-L2017
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitRelation.java
IntBitRelation.composeLeftLeftInv
public void composeLeftLeftInv(IntBitRelation left, IntBitRelation right) { """ If (x,a) is element of left and (x,b) is element of right, (b,a) is added to this relation. @param left left relation @param right right relation """ int i, a, b; IntBitSet li, ri; for (i = 0; i < line....
java
public void composeLeftLeftInv(IntBitRelation left, IntBitRelation right) { int i, a, b; IntBitSet li, ri; for (i = 0; i < line.length; i++) { li = left.line[i]; ri = right.line[i]; if (li != null && ri != null) { for (a = li.first(); a != -1;...
[ "public", "void", "composeLeftLeftInv", "(", "IntBitRelation", "left", ",", "IntBitRelation", "right", ")", "{", "int", "i", ",", "a", ",", "b", ";", "IntBitSet", "li", ",", "ri", ";", "for", "(", "i", "=", "0", ";", "i", "<", "line", ".", "length", ...
If (x,a) is element of left and (x,b) is element of right, (b,a) is added to this relation. @param left left relation @param right right relation
[ "If", "(", "x", "a", ")", "is", "element", "of", "left", "and", "(", "x", "b", ")", "is", "element", "of", "right", "(", "b", "a", ")", "is", "added", "to", "this", "relation", "." ]
train
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitRelation.java#L125-L140
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java
SQLiteDatabase.insertWithOnConflict
public long insertWithOnConflict(String table, String nullColumnHack, ContentValues initialValues, int conflictAlgorithm) { """ General method for inserting a row into the database. @param table the table to insert the row into @param nullColumnHack optional; may be <code>null</code>. SQL doesn't ...
java
public long insertWithOnConflict(String table, String nullColumnHack, ContentValues initialValues, int conflictAlgorithm) { acquireReference(); try { StringBuilder sql = new StringBuilder(); sql.append("INSERT"); sql.append(CONFLICT_VALUES[conflictAlgorith...
[ "public", "long", "insertWithOnConflict", "(", "String", "table", ",", "String", "nullColumnHack", ",", "ContentValues", "initialValues", ",", "int", "conflictAlgorithm", ")", "{", "acquireReference", "(", ")", ";", "try", "{", "StringBuilder", "sql", "=", "new", ...
General method for inserting a row into the database. @param table the table to insert the row into @param nullColumnHack optional; may be <code>null</code>. SQL doesn't allow inserting a completely empty row without naming at least one column name. If your provided <code>initialValues</code> is empty, no column name...
[ "General", "method", "for", "inserting", "a", "row", "into", "the", "database", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/sqlite/SQLiteDatabase.java#L1442-L1483
alkacon/opencms-core
src/org/opencms/xml/CmsXmlContentDefinition.java
CmsXmlContentDefinition.createDefaultXml
public Element createDefaultXml(CmsObject cms, I_CmsXmlDocument document, Element root, Locale locale) { """ Generates the default XML content for this content definition, and append it to the given root element.<p> Please note: The default values for the annotations are read from the content definition of the ...
java
public Element createDefaultXml(CmsObject cms, I_CmsXmlDocument document, Element root, Locale locale) { Iterator<I_CmsXmlSchemaType> i = m_typeSequence.iterator(); while (i.hasNext()) { I_CmsXmlSchemaType type = i.next(); for (int j = 0; j < type.getMinOccurs(); j++) { ...
[ "public", "Element", "createDefaultXml", "(", "CmsObject", "cms", ",", "I_CmsXmlDocument", "document", ",", "Element", "root", ",", "Locale", "locale", ")", "{", "Iterator", "<", "I_CmsXmlSchemaType", ">", "i", "=", "m_typeSequence", ".", "iterator", "(", ")", ...
Generates the default XML content for this content definition, and append it to the given root element.<p> Please note: The default values for the annotations are read from the content definition of the given document. For a nested content definitions, this means that all defaults are set in the annotations of the "ou...
[ "Generates", "the", "default", "XML", "content", "for", "this", "content", "definition", "and", "append", "it", "to", "the", "given", "root", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/CmsXmlContentDefinition.java#L1186-L1204
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java
ExtendedProperties.store
public void store(final OutputStream os, final String comments, final boolean sorted, final boolean process) throws IOException { """ Writes the properties to the specified stream using the default encoding, including defaults. @param os The output stream @param comments Header comment that is written to...
java
public void store(final OutputStream os, final String comments, final boolean sorted, final boolean process) throws IOException { store(new OutputStreamWriter(os), comments, sorted, process); }
[ "public", "void", "store", "(", "final", "OutputStream", "os", ",", "final", "String", "comments", ",", "final", "boolean", "sorted", ",", "final", "boolean", "process", ")", "throws", "IOException", "{", "store", "(", "new", "OutputStreamWriter", "(", "os", ...
Writes the properties to the specified stream using the default encoding, including defaults. @param os The output stream @param comments Header comment that is written to the stream @param sorted If {@code true}, the properties are written sorted by key @param process If {@code true}, place holders are resolved
[ "Writes", "the", "properties", "to", "the", "specified", "stream", "using", "the", "default", "encoding", "including", "defaults", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/util/ExtendedProperties.java#L606-L609
EdwardRaff/JSAT
JSAT/src/jsat/math/ExponentialMovingStatistics.java
ExponentialMovingStatistics.setSmoothing
public void setSmoothing(double smoothing) { """ Sets the smoothing parameter value to use. Must be in the range (0, 1]. Changing this value will impact how quickly the statistics adapt to changes, with larger values increasing rate of change and smaller values decreasing it. @param smoothing the smoothing v...
java
public void setSmoothing(double smoothing) { if (smoothing <= 0 || smoothing > 1 || Double.isNaN(smoothing)) throw new IllegalArgumentException("Smoothing must be in (0, 1], not " + smoothing); this.smoothing = smoothing; }
[ "public", "void", "setSmoothing", "(", "double", "smoothing", ")", "{", "if", "(", "smoothing", "<=", "0", "||", "smoothing", ">", "1", "||", "Double", ".", "isNaN", "(", "smoothing", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"Smoothing mu...
Sets the smoothing parameter value to use. Must be in the range (0, 1]. Changing this value will impact how quickly the statistics adapt to changes, with larger values increasing rate of change and smaller values decreasing it. @param smoothing the smoothing value to use
[ "Sets", "the", "smoothing", "parameter", "value", "to", "use", ".", "Must", "be", "in", "the", "range", "(", "0", "1", "]", ".", "Changing", "this", "value", "will", "impact", "how", "quickly", "the", "statistics", "adapt", "to", "changes", "with", "larg...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/math/ExponentialMovingStatistics.java#L86-L91
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListItemPersistenceImpl.java
CommerceWishListItemPersistenceImpl.findAll
@Override public List<CommerceWishListItem> findAll() { """ Returns all the commerce wish list items. @return the commerce wish list items """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceWishListItem> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceWishListItem", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce wish list items. @return the commerce wish list items
[ "Returns", "all", "the", "commerce", "wish", "list", "items", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListItemPersistenceImpl.java#L3834-L3837
apache/flink
flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple.java
Tuple.getTupleClass
@SuppressWarnings("unchecked") public static Class<? extends Tuple> getTupleClass(int arity) { """ Gets the class corresponding to the tuple of the given arity (dimensions). For example, {@code getTupleClass(3)} will return the {@code Tuple3.class}. @param arity The arity of the tuple class to get. @return T...
java
@SuppressWarnings("unchecked") public static Class<? extends Tuple> getTupleClass(int arity) { if (arity < 0 || arity > MAX_ARITY) { throw new IllegalArgumentException("The tuple arity must be in [0, " + MAX_ARITY + "]."); } return (Class<? extends Tuple>) CLASSES[arity]; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Class", "<", "?", "extends", "Tuple", ">", "getTupleClass", "(", "int", "arity", ")", "{", "if", "(", "arity", "<", "0", "||", "arity", ">", "MAX_ARITY", ")", "{", "throw", "new", ...
Gets the class corresponding to the tuple of the given arity (dimensions). For example, {@code getTupleClass(3)} will return the {@code Tuple3.class}. @param arity The arity of the tuple class to get. @return The tuple class with the given arity.
[ "Gets", "the", "class", "corresponding", "to", "the", "tuple", "of", "the", "given", "arity", "(", "dimensions", ")", ".", "For", "example", "{", "@code", "getTupleClass", "(", "3", ")", "}", "will", "return", "the", "{", "@code", "Tuple3", ".", "class",...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple.java#L102-L108
apereo/cas
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java
OAuth20Utils.checkCallbackValid
public static boolean checkCallbackValid(final @NonNull RegisteredService registeredService, final String redirectUri) { """ Check if the callback url is valid. @param registeredService the registered service @param redirectUri the callback url @return whether the callback url is valid """ v...
java
public static boolean checkCallbackValid(final @NonNull RegisteredService registeredService, final String redirectUri) { val registeredServiceId = registeredService.getServiceId(); LOGGER.debug("Found: [{}] vs redirectUri: [{}]", registeredService, redirectUri); if (!redirectUri.matches(register...
[ "public", "static", "boolean", "checkCallbackValid", "(", "final", "@", "NonNull", "RegisteredService", "registeredService", ",", "final", "String", "redirectUri", ")", "{", "val", "registeredServiceId", "=", "registeredService", ".", "getServiceId", "(", ")", ";", ...
Check if the callback url is valid. @param registeredService the registered service @param redirectUri the callback url @return whether the callback url is valid
[ "Check", "if", "the", "callback", "url", "is", "valid", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/util/OAuth20Utils.java#L366-L377
Netflix/astyanax
astyanax-recipes/src/main/java/com/netflix/astyanax/recipes/storage/ObjectWriter.java
ObjectWriter.readFully
private static int readFully(InputStream in, byte[] b, int off, int len) throws IOException { """ Should switch to IOUtils.read() when we update to the latest version of commons-io @param in @param b @param off @param len @return @throws IOException """ int total = 0; for (;;) { ...
java
private static int readFully(InputStream in, byte[] b, int off, int len) throws IOException { int total = 0; for (;;) { int got = in.read(b, off + total, len - total); if (got < 0) { return (total == 0) ? -1 : total; } else { ...
[ "private", "static", "int", "readFully", "(", "InputStream", "in", ",", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "int", "total", "=", "0", ";", "for", "(", ";", ";", ")", "{", "int", "got", "...
Should switch to IOUtils.read() when we update to the latest version of commons-io @param in @param b @param off @param len @return @throws IOException
[ "Should", "switch", "to", "IOUtils", ".", "read", "()", "when", "we", "update", "to", "the", "latest", "version", "of", "commons", "-", "io" ]
train
https://github.com/Netflix/astyanax/blob/bcc3fd26e2dda05a923751aa32b139f6209fecdf/astyanax-recipes/src/main/java/com/netflix/astyanax/recipes/storage/ObjectWriter.java#L212-L225
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpUtil.java
HttpUtil.createRequest
public static HttpRequest createRequest(Method method, String url) { """ 创建Http请求对象 @param method 方法枚举{@link Method} @param url 请求的URL,可以使HTTP或者HTTPS @return {@link HttpRequest} @since 3.0.9 """ return new HttpRequest(url).method(method); }
java
public static HttpRequest createRequest(Method method, String url) { return new HttpRequest(url).method(method); }
[ "public", "static", "HttpRequest", "createRequest", "(", "Method", "method", ",", "String", "url", ")", "{", "return", "new", "HttpRequest", "(", "url", ")", ".", "method", "(", "method", ")", ";", "}" ]
创建Http请求对象 @param method 方法枚举{@link Method} @param url 请求的URL,可以使HTTP或者HTTPS @return {@link HttpRequest} @since 3.0.9
[ "创建Http请求对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java#L63-L65
dbracewell/mango
src/main/java/com/davidbracewell/json/JsonWriter.java
JsonWriter.property
protected JsonWriter property(String key, Iterator<?> iterator) throws IOException { """ Writes an iterator with the given key name @param key the key name for the collection @param iterator the iterator to be written @return This structured writer @throws IOException Something went wrong writing ""...
java
protected JsonWriter property(String key, Iterator<?> iterator) throws IOException { return property(key, Collect.asIterable(iterator)); }
[ "protected", "JsonWriter", "property", "(", "String", "key", ",", "Iterator", "<", "?", ">", "iterator", ")", "throws", "IOException", "{", "return", "property", "(", "key", ",", "Collect", ".", "asIterable", "(", "iterator", ")", ")", ";", "}" ]
Writes an iterator with the given key name @param key the key name for the collection @param iterator the iterator to be written @return This structured writer @throws IOException Something went wrong writing
[ "Writes", "an", "iterator", "with", "the", "given", "key", "name" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/json/JsonWriter.java#L280-L282
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.generateLogForContentValues
public static void generateLogForContentValues(SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { """ <p> Generate log for content values </p> <h2>pre conditions</h2> <p> required variable are: </p> <ul> <li>contentValues</li> </ul> @param method the method @param methodBuilder the me...
java
public static void generateLogForContentValues(SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { methodBuilder.addCode("\n// log for content values -- BEGIN\n"); methodBuilder.addStatement("$T<String, Object, $T> _contentValue", Triple.class, KriptonContentValues.ParamType.class); methodBuilder.begin...
[ "public", "static", "void", "generateLogForContentValues", "(", "SQLiteModelMethod", "method", ",", "MethodSpec", ".", "Builder", "methodBuilder", ")", "{", "methodBuilder", ".", "addCode", "(", "\"\\n// log for content values -- BEGIN\\n\"", ")", ";", "methodBuilder", "....
<p> Generate log for content values </p> <h2>pre conditions</h2> <p> required variable are: </p> <ul> <li>contentValues</li> </ul> @param method the method @param methodBuilder the method builder
[ "<p", ">", "Generate", "log", "for", "content", "values", "<", "/", "p", ">" ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L231-L245
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionsInner.java
WorkflowRunActionsInner.listAsync
public Observable<Page<WorkflowRunActionInner>> listAsync(final String resourceGroupName, final String workflowName, final String runName, final Integer top, final String filter) { """ Gets a list of workflow run actions. @param resourceGroupName The resource group name. @param workflowName The workflow name. ...
java
public Observable<Page<WorkflowRunActionInner>> listAsync(final String resourceGroupName, final String workflowName, final String runName, final Integer top, final String filter) { return listWithServiceResponseAsync(resourceGroupName, workflowName, runName, top, filter) .map(new Func1<ServiceRespon...
[ "public", "Observable", "<", "Page", "<", "WorkflowRunActionInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "workflowName", ",", "final", "String", "runName", ",", "final", "Integer", "top", ",", "final", "Stri...
Gets a list of workflow run actions. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param runName The workflow run name. @param top The number of items to be included in the result. @param filter The filter to apply on the operation. Options for filters include: Status. @thro...
[ "Gets", "a", "list", "of", "workflow", "run", "actions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowRunActionsInner.java#L263-L271
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java
MapApi.getMap
public static <A, B> Optional<Map<A, B>> getMap(final Map map, final Object... path) { """ Get map value by path. @param <A> map key type @param <B> map value type @param map subject @param path nodes to walk in map @return value """ return get(map, Map.class, path).map(m -> (Map<A, B>) m); }
java
public static <A, B> Optional<Map<A, B>> getMap(final Map map, final Object... path) { return get(map, Map.class, path).map(m -> (Map<A, B>) m); }
[ "public", "static", "<", "A", ",", "B", ">", "Optional", "<", "Map", "<", "A", ",", "B", ">", ">", "getMap", "(", "final", "Map", "map", ",", "final", "Object", "...", "path", ")", "{", "return", "get", "(", "map", ",", "Map", ".", "class", ","...
Get map value by path. @param <A> map key type @param <B> map value type @param map subject @param path nodes to walk in map @return value
[ "Get", "map", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java#L199-L201
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.getPatternAnyEntityRoles
public List<EntityRole> getPatternAnyEntityRoles(UUID appId, String versionId, UUID entityId) { """ Get All Entity Roles for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity Id @throws IllegalArgumentException thrown if parameters fail the validation @...
java
public List<EntityRole> getPatternAnyEntityRoles(UUID appId, String versionId, UUID entityId) { return getPatternAnyEntityRolesWithServiceResponseAsync(appId, versionId, entityId).toBlocking().single().body(); }
[ "public", "List", "<", "EntityRole", ">", "getPatternAnyEntityRoles", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ")", "{", "return", "getPatternAnyEntityRolesWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "entityId", ...
Get All Entity Roles for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity Id @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws RuntimeException all other wr...
[ "Get", "All", "Entity", "Roles", "for", "a", "given", "entity", "." ]
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#L9059-L9061
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/LongExtensions.java
LongExtensions.operator_lessEqualsThan
@Pure @Inline(value="($1 <= $2)", constantExpression=true) public static boolean operator_lessEqualsThan(long a, double b) { """ The binary <code>lessEqualsThan</code> operator. This is the equivalent to the Java <code>&lt;=</code> operator. @param a a long. @param b a double. @return <code>a&lt;=b</cod...
java
@Pure @Inline(value="($1 <= $2)", constantExpression=true) public static boolean operator_lessEqualsThan(long a, double b) { return a <= b; }
[ "@", "Pure", "@", "Inline", "(", "value", "=", "\"($1 <= $2)\"", ",", "constantExpression", "=", "true", ")", "public", "static", "boolean", "operator_lessEqualsThan", "(", "long", "a", ",", "double", "b", ")", "{", "return", "a", "<=", "b", ";", "}" ]
The binary <code>lessEqualsThan</code> operator. This is the equivalent to the Java <code>&lt;=</code> operator. @param a a long. @param b a double. @return <code>a&lt;=b</code> @since 2.3
[ "The", "binary", "<code", ">", "lessEqualsThan<", "/", "code", ">", "operator", ".", "This", "is", "the", "equivalent", "to", "the", "Java", "<code", ">", "&lt", ";", "=", "<", "/", "code", ">", "operator", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/LongExtensions.java#L334-L338
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnServerConfigurationsInner.java
P2sVpnServerConfigurationsInner.listByVirtualWanAsync
public Observable<Page<P2SVpnServerConfigurationInner>> listByVirtualWanAsync(final String resourceGroupName, final String virtualWanName) { """ Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. @param resourceGroupName The resource group name of the VirtualWan. @param virtualWanName The na...
java
public Observable<Page<P2SVpnServerConfigurationInner>> listByVirtualWanAsync(final String resourceGroupName, final String virtualWanName) { return listByVirtualWanWithServiceResponseAsync(resourceGroupName, virtualWanName) .map(new Func1<ServiceResponse<Page<P2SVpnServerConfigurationInner>>, Page<P...
[ "public", "Observable", "<", "Page", "<", "P2SVpnServerConfigurationInner", ">", ">", "listByVirtualWanAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "virtualWanName", ")", "{", "return", "listByVirtualWanWithServiceResponseAsync", "(", "reso...
Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. @param resourceGroupName The resource group name of the VirtualWan. @param virtualWanName The name of the VirtualWan. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;P2SVpnServerCo...
[ "Retrieves", "all", "P2SVpnServerConfigurations", "for", "a", "particular", "VirtualWan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/P2sVpnServerConfigurationsInner.java#L581-L589
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneMaximizeButtonPainter.java
TitlePaneMaximizeButtonPainter.paintBackground
private void paintBackground(Graphics2D g, JComponent c, int width, int height, ButtonColors colors) { """ Paint the background of the button using the specified colors. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height th...
java
private void paintBackground(Graphics2D g, JComponent c, int width, int height, ButtonColors colors) { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); g.setColor(colors.top); g.drawLine(0, 0, width - 2, 0); g.setColor(colors.left); g.drawL...
[ "private", "void", "paintBackground", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "width", ",", "int", "height", ",", "ButtonColors", "colors", ")", "{", "g", ".", "setRenderingHint", "(", "RenderingHints", ".", "KEY_ANTIALIASING", ",", "Render...
Paint the background of the button using the specified colors. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height the height of the component. @param colors the color set to use to paint the button.
[ "Paint", "the", "background", "of", "the", "button", "using", "the", "specified", "colors", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneMaximizeButtonPainter.java#L246-L259
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_phonebook_bookKey_phonebookContact_id_PUT
public void billingAccount_phonebook_bookKey_phonebookContact_id_PUT(String billingAccount, String bookKey, Long id, OvhPhonebookContact body) throws IOException { """ Alter this object properties REST: PUT /telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id} @param body [required] New object ...
java
public void billingAccount_phonebook_bookKey_phonebookContact_id_PUT(String billingAccount, String bookKey, Long id, OvhPhonebookContact body) throws IOException { String qPath = "/telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id}"; StringBuilder sb = path(qPath, billingAccount, bookKey, id); e...
[ "public", "void", "billingAccount_phonebook_bookKey_phonebookContact_id_PUT", "(", "String", "billingAccount", ",", "String", "bookKey", ",", "Long", "id", ",", "OvhPhonebookContact", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billin...
Alter this object properties REST: PUT /telephony/{billingAccount}/phonebook/{bookKey}/phonebookContact/{id} @param body [required] New object properties @param billingAccount [required] The name of your billingAccount @param bookKey [required] Identifier of the phonebook @param id [required] Contact identifier
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L5482-L5486
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.makeAnd
protected PExp makeAnd(PExp root, PExp e) { """ Chain an AND expression onto a root, or just return the new expression if the root is null. Called in a loop, this left-associates an AND tree. """ if (root != null) { AAndBooleanBinaryExp a = new AAndBooleanBinaryExp(); a.setLeft(root.clone()); a.s...
java
protected PExp makeAnd(PExp root, PExp e) { if (root != null) { AAndBooleanBinaryExp a = new AAndBooleanBinaryExp(); a.setLeft(root.clone()); a.setOp(new LexKeywordToken(VDMToken.AND, null)); a.setType(new ABooleanBasicType()); a.setRight(e.clone()); return a; } else { return e; } }
[ "protected", "PExp", "makeAnd", "(", "PExp", "root", ",", "PExp", "e", ")", "{", "if", "(", "root", "!=", "null", ")", "{", "AAndBooleanBinaryExp", "a", "=", "new", "AAndBooleanBinaryExp", "(", ")", ";", "a", ".", "setLeft", "(", "root", ".", "clone", ...
Chain an AND expression onto a root, or just return the new expression if the root is null. Called in a loop, this left-associates an AND tree.
[ "Chain", "an", "AND", "expression", "onto", "a", "root", "or", "just", "return", "the", "new", "expression", "if", "the", "root", "is", "null", ".", "Called", "in", "a", "loop", "this", "left", "-", "associates", "an", "AND", "tree", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L430-L444
prestodb/presto
presto-main/src/main/java/com/facebook/presto/util/Reflection.java
Reflection.constructorMethodHandle
public static MethodHandle constructorMethodHandle(StandardErrorCode errorCode, Class<?> clazz, Class<?>... parameterTypes) { """ Returns a MethodHandle corresponding to the specified constructor. <p> Warning: The way Oracle JVM implements producing MethodHandle for a constructor involves creating JNI global we...
java
public static MethodHandle constructorMethodHandle(StandardErrorCode errorCode, Class<?> clazz, Class<?>... parameterTypes) { try { return MethodHandles.lookup().unreflectConstructor(clazz.getConstructor(parameterTypes)); } catch (IllegalAccessException | NoSuchMethodException e)...
[ "public", "static", "MethodHandle", "constructorMethodHandle", "(", "StandardErrorCode", "errorCode", ",", "Class", "<", "?", ">", "clazz", ",", "Class", "<", "?", ">", "...", "parameterTypes", ")", "{", "try", "{", "return", "MethodHandles", ".", "lookup", "(...
Returns a MethodHandle corresponding to the specified constructor. <p> Warning: The way Oracle JVM implements producing MethodHandle for a constructor involves creating JNI global weak references. G1 processes such references serially. As a result, calling this method in a tight loop can create significant GC pressure ...
[ "Returns", "a", "MethodHandle", "corresponding", "to", "the", "specified", "constructor", ".", "<p", ">", "Warning", ":", "The", "way", "Oracle", "JVM", "implements", "producing", "MethodHandle", "for", "a", "constructor", "involves", "creating", "JNI", "global", ...
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-main/src/main/java/com/facebook/presto/util/Reflection.java#L121-L129
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/config/HpelConfigurator.java
HpelConfigurator.updateLog
public static synchronized void updateLog(Map<String, Object> newConfig) { """ Update Log part of HPEL with new configuration values (based on injection via config admin). The parameter map should be modified to match actual values used (e.g. substitution in case of error). @param newConfig """ if...
java
public static synchronized void updateLog(Map<String, Object> newConfig) { if (newConfig == null) throw new NullPointerException("Updated config must not be null"); HpelTraceServiceConfig config = loggingConfig.get(); if (config != null) { config.updateLog(newConfig); ...
[ "public", "static", "synchronized", "void", "updateLog", "(", "Map", "<", "String", ",", "Object", ">", "newConfig", ")", "{", "if", "(", "newConfig", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"Updated config must not be null\"", ")", ";"...
Update Log part of HPEL with new configuration values (based on injection via config admin). The parameter map should be modified to match actual values used (e.g. substitution in case of error). @param newConfig
[ "Update", "Log", "part", "of", "HPEL", "with", "new", "configuration", "values", "(", "based", "on", "injection", "via", "config", "admin", ")", ".", "The", "parameter", "map", "should", "be", "modified", "to", "match", "actual", "values", "used", "(", "e"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/config/HpelConfigurator.java#L42-L51
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractView.java
AbstractView.addHandler
private void addHandler(final EventTarget target, final Annotation annotation) throws CoreException { """ Add an event handler on the given node according to annotation OnXxxxx. @param target the graphical node, must be not null (is a subtype of EventTarget) @param annotation the OnXxxx annotation @throws C...
java
private void addHandler(final EventTarget target, final Annotation annotation) throws CoreException { // Build the auto event handler for this annotation final AnnotationEventHandler<Event> aeh = new AnnotationEventHandler<>(this.callbackObject, annotation); for (final EnumEventType eet : (Enu...
[ "private", "void", "addHandler", "(", "final", "EventTarget", "target", ",", "final", "Annotation", "annotation", ")", "throws", "CoreException", "{", "// Build the auto event handler for this annotation", "final", "AnnotationEventHandler", "<", "Event", ">", "aeh", "=", ...
Add an event handler on the given node according to annotation OnXxxxx. @param target the graphical node, must be not null (is a subtype of EventTarget) @param annotation the OnXxxx annotation @throws CoreException if an error occurred while linking the event handler
[ "Add", "an", "event", "handler", "on", "the", "given", "node", "according", "to", "annotation", "OnXxxxx", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/ui/AbstractView.java#L322-L343
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/TreeHelpers.java
TreeHelpers.changeSelected
public static TreeElement changeSelected(TreeElement root, TreeElement selectedNode, String selectNode, ServletRequest request) { """ This is a helper method that will change the selected node. This is provided to make implementation of ITreeRootElement easier. This is called by the <code>changeSelected</code> ...
java
public static TreeElement changeSelected(TreeElement root, TreeElement selectedNode, String selectNode, ServletRequest request) { assert(root != null) : "parameter 'root' must not be null"; assert(selectNode != null) : "parameter 'selectNode' must not be null"; assert(request != null) : "par...
[ "public", "static", "TreeElement", "changeSelected", "(", "TreeElement", "root", ",", "TreeElement", "selectedNode", ",", "String", "selectNode", ",", "ServletRequest", "request", ")", "{", "assert", "(", "root", "!=", "null", ")", ":", "\"parameter 'root' must not ...
This is a helper method that will change the selected node. This is provided to make implementation of ITreeRootElement easier. This is called by the <code>changeSelected</code> method there to do the work of changing the selected node. @param root The root of the tree @param selectedNode The node that is cur...
[ "This", "is", "a", "helper", "method", "that", "will", "change", "the", "selected", "node", ".", "This", "is", "provided", "to", "make", "implementation", "of", "ITreeRootElement", "easier", ".", "This", "is", "called", "by", "the", "<code", ">", "changeSele...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/TreeHelpers.java#L160-L184
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/LoggingHelper.java
LoggingHelper.getLevel
public static Level getLevel(Class cls, Level defLevel) { """ Returns the log level for the specified class. E.g., for the class "hello.world.App" the environment variable "hello.world.App.LOGLEVEL" is inspected and "{OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST}" returned. Default is WARNING. @param cls...
java
public static Level getLevel(Class cls, Level defLevel) { Level result; String levelStr; result = defLevel; levelStr = System.getenv(cls.getName() + LOGLEVEL_SUFFIX); if (levelStr != null) { switch (levelStr) { case "ALL": return Level.ALL; case "OFF": return Level.OFF; case "INFO":...
[ "public", "static", "Level", "getLevel", "(", "Class", "cls", ",", "Level", "defLevel", ")", "{", "Level", "result", ";", "String", "levelStr", ";", "result", "=", "defLevel", ";", "levelStr", "=", "System", ".", "getenv", "(", "cls", ".", "getName", "("...
Returns the log level for the specified class. E.g., for the class "hello.world.App" the environment variable "hello.world.App.LOGLEVEL" is inspected and "{OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST}" returned. Default is WARNING. @param cls the class to return the debug level for @param defLevel the default le...
[ "Returns", "the", "log", "level", "for", "the", "specified", "class", ".", "E", ".", "g", ".", "for", "the", "class", "hello", ".", "world", ".", "App", "the", "environment", "variable", "hello", ".", "world", ".", "App", ".", "LOGLEVEL", "is", "inspec...
train
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/LoggingHelper.java#L58-L89
facebook/fresco
drawee/src/main/java/com/facebook/drawee/drawable/RoundedColorDrawable.java
RoundedColorDrawable.setBorder
@Override public void setBorder(int color, float width) { """ Sets the border @param color of the border @param width of the border """ if (mBorderColor != color) { mBorderColor = color; invalidateSelf(); } if (mBorderWidth != width) { mBorderWidth = width; updatePath()...
java
@Override public void setBorder(int color, float width) { if (mBorderColor != color) { mBorderColor = color; invalidateSelf(); } if (mBorderWidth != width) { mBorderWidth = width; updatePath(); invalidateSelf(); } }
[ "@", "Override", "public", "void", "setBorder", "(", "int", "color", ",", "float", "width", ")", "{", "if", "(", "mBorderColor", "!=", "color", ")", "{", "mBorderColor", "=", "color", ";", "invalidateSelf", "(", ")", ";", "}", "if", "(", "mBorderWidth", ...
Sets the border @param color of the border @param width of the border
[ "Sets", "the", "border" ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/drawable/RoundedColorDrawable.java#L184-L196
apache/incubator-heron
heron/uploaders/src/java/org/apache/heron/uploader/gcs/GcsUploader.java
GcsUploader.generateStorageObjectName
private static String generateStorageObjectName(String topologyName, String filename) { """ Generate the storage object name in gcs given the topologyName and filename. @param topologyName the name of the topology @param filename the name of the file to upload to gcs @return the name of the object. """ ...
java
private static String generateStorageObjectName(String topologyName, String filename) { return String.format("%s/%s", topologyName, filename); }
[ "private", "static", "String", "generateStorageObjectName", "(", "String", "topologyName", ",", "String", "filename", ")", "{", "return", "String", ".", "format", "(", "\"%s/%s\"", ",", "topologyName", ",", "filename", ")", ";", "}" ]
Generate the storage object name in gcs given the topologyName and filename. @param topologyName the name of the topology @param filename the name of the file to upload to gcs @return the name of the object.
[ "Generate", "the", "storage", "object", "name", "in", "gcs", "given", "the", "topologyName", "and", "filename", "." ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/uploaders/src/java/org/apache/heron/uploader/gcs/GcsUploader.java#L214-L216
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/component/SeaGlassIcon.java
SeaGlassIcon.paintIcon
@SuppressWarnings("unchecked") @Override public void paintIcon(Component c, Graphics g, int x, int y) { """ Implements the standard Icon interface's paintIcon method as the standard synth stub passes null for the context and this will cause us to not paint any thing, so we override here so that we can pa...
java
@SuppressWarnings("unchecked") @Override public void paintIcon(Component c, Graphics g, int x, int y) { SeaGlassPainter painter = (SeaGlassPainter) UIManager.get(prefix + "[Enabled]." + key); if (painter != null) { JComponent jc = (c instanceof JComponent) ? (JComponent) c : null; ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "public", "void", "paintIcon", "(", "Component", "c", ",", "Graphics", "g", ",", "int", "x", ",", "int", "y", ")", "{", "SeaGlassPainter", "painter", "=", "(", "SeaGlassPainter", ")", "UI...
Implements the standard Icon interface's paintIcon method as the standard synth stub passes null for the context and this will cause us to not paint any thing, so we override here so that we can paint the enabled state if no synth context is available @param c the component to paint. @param g the Graphics context to p...
[ "Implements", "the", "standard", "Icon", "interface", "s", "paintIcon", "method", "as", "the", "standard", "synth", "stub", "passes", "null", "for", "the", "context", "and", "this", "will", "cause", "us", "to", "not", "paint", "any", "thing", "so", "we", "...
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassIcon.java#L186-L199
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java
GetCommand.validateRange
private boolean validateRange(Range range, long contentLength) { """ Checks is the range is valid. @param range range @param contentLength coontent length @return true if the range is valid else false """ long start = range.getStart(); long end = range.getEnd(); // range set as byte...
java
private boolean validateRange(Range range, long contentLength) { long start = range.getStart(); long end = range.getEnd(); // range set as bytes:-100 // take 100 bytes from end if (start < 0 && end == -1) { if ((-1 * start) >= contentLength) { ...
[ "private", "boolean", "validateRange", "(", "Range", "range", ",", "long", "contentLength", ")", "{", "long", "start", "=", "range", ".", "getStart", "(", ")", ";", "long", "end", "=", "range", ".", "getEnd", "(", ")", ";", "// range set as bytes:-100\r", ...
Checks is the range is valid. @param range range @param contentLength coontent length @return true if the range is valid else false
[ "Checks", "is", "the", "range", "is", "valid", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/command/GetCommand.java#L287-L325
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/util/ScriptUtil.java
ScriptUtil.getScriptFromResource
public static ExecutableScript getScriptFromResource(String language, String resource, ScriptFactory scriptFactory) { """ Creates a new {@link ExecutableScript} from a static resource. @param language the language of the script @param resource the resource path of the script code @param scriptFactory the scri...
java
public static ExecutableScript getScriptFromResource(String language, String resource, ScriptFactory scriptFactory) { ensureNotEmpty(NotValidException.class, "Script language", language); ensureNotEmpty(NotValidException.class, "Script resource", resource); return scriptFactory.createScriptFromResource(lang...
[ "public", "static", "ExecutableScript", "getScriptFromResource", "(", "String", "language", ",", "String", "resource", ",", "ScriptFactory", "scriptFactory", ")", "{", "ensureNotEmpty", "(", "NotValidException", ".", "class", ",", "\"Script language\"", ",", "language",...
Creates a new {@link ExecutableScript} from a static resource. @param language the language of the script @param resource the resource path of the script code @param scriptFactory the script factory used to create the script @return the newly created script @throws NotValidException if language or resource are null or...
[ "Creates", "a", "new", "{", "@link", "ExecutableScript", "}", "from", "a", "static", "resource", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/util/ScriptUtil.java#L163-L167
infinispan/infinispan
lucene/directory-provider/src/main/java/org/infinispan/hibernate/search/util/configuration/impl/ConfigurationParseHelper.java
ConfigurationParseHelper.parseBoolean
public static final boolean parseBoolean(String value, String errorMsgOnParseFailure) { """ Parses a string to recognize exactly either "true" or "false". @param value the string to be parsed @param errorMsgOnParseFailure the message to be put in the exception if thrown @return true if value ...
java
public static final boolean parseBoolean(String value, String errorMsgOnParseFailure) { // avoiding Boolean.valueOf() to have more checks: makes it easy to spot wrong type in cfg. if (value == null) { throw new SearchException(errorMsgOnParseFailure); } else if ("false".equalsIgnoreCase(value...
[ "public", "static", "final", "boolean", "parseBoolean", "(", "String", "value", ",", "String", "errorMsgOnParseFailure", ")", "{", "// avoiding Boolean.valueOf() to have more checks: makes it easy to spot wrong type in cfg.", "if", "(", "value", "==", "null", ")", "{", "thr...
Parses a string to recognize exactly either "true" or "false". @param value the string to be parsed @param errorMsgOnParseFailure the message to be put in the exception if thrown @return true if value is "true", false if value is "false" @throws SearchException for invalid format or values.
[ "Parses", "a", "string", "to", "recognize", "exactly", "either", "true", "or", "false", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lucene/directory-provider/src/main/java/org/infinispan/hibernate/search/util/configuration/impl/ConfigurationParseHelper.java#L111-L122
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/html/TableForm.java
TableForm.addFileField
public Input addFileField(String tag, String label) { """ Add a File Entry Field. @param tag The form name of the element @param label The label for the element in the table. """ Input i = new Input(Input.File,tag); addField(label,i); return i; }
java
public Input addFileField(String tag, String label) { Input i = new Input(Input.File,tag); addField(label,i); return i; }
[ "public", "Input", "addFileField", "(", "String", "tag", ",", "String", "label", ")", "{", "Input", "i", "=", "new", "Input", "(", "Input", ".", "File", ",", "tag", ")", ";", "addField", "(", "label", ",", "i", ")", ";", "return", "i", ";", "}" ]
Add a File Entry Field. @param tag The form name of the element @param label The label for the element in the table.
[ "Add", "a", "File", "Entry", "Field", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L101-L107
hawkular/hawkular-agent
hawkular-javaagent/src/main/java/org/hawkular/agent/javaagent/config/StringPropertyReplacer.java
StringPropertyReplacer.resolveCompositeKey
private static String resolveCompositeKey(String key, Properties props) { """ Try to resolve a "key" from the provided properties by checking if it is actually a "key1,key2", in which case try first "key1", then "key2". If all fails, return null. It also accepts "key1," and ",key2". @param key the key to r...
java
private static String resolveCompositeKey(String key, Properties props) { String value = null; // Look for the comma int comma = key.indexOf(','); if (comma > -1) { // If we have a first part, try resolve it if (comma > 0) { // Check the first par...
[ "private", "static", "String", "resolveCompositeKey", "(", "String", "key", ",", "Properties", "props", ")", "{", "String", "value", "=", "null", ";", "// Look for the comma", "int", "comma", "=", "key", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", ...
Try to resolve a "key" from the provided properties by checking if it is actually a "key1,key2", in which case try first "key1", then "key2". If all fails, return null. It also accepts "key1," and ",key2". @param key the key to resolve @param props the properties to use @return the resolved key or null
[ "Try", "to", "resolve", "a", "key", "from", "the", "provided", "properties", "by", "checking", "if", "it", "is", "actually", "a", "key1", "key2", "in", "which", "case", "try", "first", "key1", "then", "key2", ".", "If", "all", "fails", "return", "null", ...
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-javaagent/src/main/java/org/hawkular/agent/javaagent/config/StringPropertyReplacer.java#L236-L256
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Logger.java
Logger.getLogger
@CallerSensitive public static Logger getLogger(String name, String resourceBundleName) { """ adding a new Logger object is handled by LogManager.addLogger(). """ // Android-changed: Use VMStack.getStackClass1. /* J2ObjC modified. Class<?> callerClass = VMStack.getStackClass1(); ...
java
@CallerSensitive public static Logger getLogger(String name, String resourceBundleName) { // Android-changed: Use VMStack.getStackClass1. /* J2ObjC modified. Class<?> callerClass = VMStack.getStackClass1(); */ Class<?> callerClass = null; Logger result = demandLogger(...
[ "@", "CallerSensitive", "public", "static", "Logger", "getLogger", "(", "String", "name", ",", "String", "resourceBundleName", ")", "{", "// Android-changed: Use VMStack.getStackClass1.", "/* J2ObjC modified.\n Class<?> callerClass = VMStack.getStackClass1();\n */", "Cl...
adding a new Logger object is handled by LogManager.addLogger().
[ "adding", "a", "new", "Logger", "object", "is", "handled", "by", "LogManager", ".", "addLogger", "()", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Logger.java#L456-L484
jenkinsci/jenkins
core/src/main/java/jenkins/model/Jenkins.java
Jenkins.getXForwardedHeader
private static String getXForwardedHeader(StaplerRequest req, String header, String defaultValue) { """ Gets the originating "X-Forwarded-..." header from the request. If there are multiple headers the originating header is the first header. If the originating header contains a comma separated list, the originati...
java
private static String getXForwardedHeader(StaplerRequest req, String header, String defaultValue) { String value = req.getHeader(header); if (value != null) { int index = value.indexOf(','); return index == -1 ? value.trim() : value.substring(0,index).trim(); } re...
[ "private", "static", "String", "getXForwardedHeader", "(", "StaplerRequest", "req", ",", "String", "header", ",", "String", "defaultValue", ")", "{", "String", "value", "=", "req", ".", "getHeader", "(", "header", ")", ";", "if", "(", "value", "!=", "null", ...
Gets the originating "X-Forwarded-..." header from the request. If there are multiple headers the originating header is the first header. If the originating header contains a comma separated list, the originating entry is the first one. @param req the request @param header the header name @param defaultValue the value ...
[ "Gets", "the", "originating", "X", "-", "Forwarded", "-", "...", "header", "from", "the", "request", ".", "If", "there", "are", "multiple", "headers", "the", "originating", "header", "is", "the", "first", "header", ".", "If", "the", "originating", "header", ...
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Jenkins.java#L2367-L2374
yestech/yesepisodic
src/main/java/org/yestech/episodic/DefaultEpisodicService.java
DefaultEpisodicService.generateSignature
protected String generateSignature(String secret, Map<String, String> map) { """ Generates a signature with the algorithm specified by episodic: <p/> API Signature Generation <ol> <li> All API requests must include a signature parameter. The signature is generated performing the following steps. <li> Concaten...
java
protected String generateSignature(String secret, Map<String, String> map) { return sha256Hex(buildSignatureString(secret, map)); }
[ "protected", "String", "generateSignature", "(", "String", "secret", ",", "Map", "<", "String", ",", "String", ">", "map", ")", "{", "return", "sha256Hex", "(", "buildSignatureString", "(", "secret", ",", "map", ")", ")", ";", "}" ]
Generates a signature with the algorithm specified by episodic: <p/> API Signature Generation <ol> <li> All API requests must include a signature parameter. The signature is generated performing the following steps. <li> Concatenate all query parameters except the API Key in the format "name=value" in alphabetical orde...
[ "Generates", "a", "signature", "with", "the", "algorithm", "specified", "by", "episodic", ":", "<p", "/", ">", "API", "Signature", "Generation", "<ol", ">", "<li", ">", "All", "API", "requests", "must", "include", "a", "signature", "parameter", ".", "The", ...
train
https://github.com/yestech/yesepisodic/blob/ed9699443871a44d51e149f32769b4d84cded63d/src/main/java/org/yestech/episodic/DefaultEpisodicService.java#L276-L278
jtrfp/jfdt
src/main/java/org/jtrfp/jfdt/Parser.java
Parser.readToExistingBean
public void readToExistingBean(EndianAwareDataInputStream is, ThirdPartyParseable target) throws IllegalAccessException, UnrecognizedFormatException { """ Read the specified EndianAwareDataInputStream, parsing it and writing the property values to the given instantiated bean.<br> When finished, the current po...
java
public void readToExistingBean(EndianAwareDataInputStream is, ThirdPartyParseable target) throws IllegalAccessException, UnrecognizedFormatException{ //target = (CLASS)Beans.instantiate(null, clazz.getName()); ensureContextInstantiatedForReading(is,target); target.describeFormat(this); popBean(); }
[ "public", "void", "readToExistingBean", "(", "EndianAwareDataInputStream", "is", ",", "ThirdPartyParseable", "target", ")", "throws", "IllegalAccessException", ",", "UnrecognizedFormatException", "{", "//target = (CLASS)Beans.instantiate(null, clazz.getName());", "ensureContextInstan...
Read the specified EndianAwareDataInputStream, parsing it and writing the property values to the given instantiated bean.<br> When finished, the current position of the stream will be immediately after the data extracted. @param is An endian-aware InputStream supplying the raw data to be parsed. @param target ...
[ "Read", "the", "specified", "EndianAwareDataInputStream", "parsing", "it", "and", "writing", "the", "property", "values", "to", "the", "given", "instantiated", "bean", ".", "<br", ">", "When", "finished", "the", "current", "position", "of", "the", "stream", "wil...
train
https://github.com/jtrfp/jfdt/blob/64e665669b5fcbfe96736346b4e7893e466dd8a0/src/main/java/org/jtrfp/jfdt/Parser.java#L99-L105
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.combineTrajectory
public static Trajectory combineTrajectory(Trajectory a, Trajectory b) { """ Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length. @param a The first trajectory @param b The second trajectory @return The combined trajectory """ if(a.getDimension()!...
java
public static Trajectory combineTrajectory(Trajectory a, Trajectory b){ if(a.getDimension()!=b.getDimension()){ throw new IllegalArgumentException("Combination not possible: The trajectorys does not have the same dimension"); } if(a.size()!=b.size()){ throw new IllegalArgumentException("Combination not poss...
[ "public", "static", "Trajectory", "combineTrajectory", "(", "Trajectory", "a", ",", "Trajectory", "b", ")", "{", "if", "(", "a", ".", "getDimension", "(", ")", "!=", "b", ".", "getDimension", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", ...
Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length. @param a The first trajectory @param b The second trajectory @return The combined trajectory
[ "Combines", "two", "trajectories", "by", "adding", "the", "corresponding", "positions", ".", "The", "trajectories", "have", "to", "have", "the", "same", "length", "." ]
train
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L45-L63
haraldk/TwelveMonkeys
common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java
ImageUtil.toBuffered
public static BufferedImage toBuffered(RenderedImage pOriginal, int pType) { """ Converts the {@code RenderedImage} to a {@code BufferedImage} of the given type. <p/> If the image is already a {@code BufferedImage} of the given type, it is simply returned and no conversion takes place. @param pOriginal the ...
java
public static BufferedImage toBuffered(RenderedImage pOriginal, int pType) { // Don't convert if it already is BufferedImage and correct type if ((pOriginal instanceof BufferedImage) && ((BufferedImage) pOriginal).getType() == pType) { return (BufferedImage) pOriginal; } ...
[ "public", "static", "BufferedImage", "toBuffered", "(", "RenderedImage", "pOriginal", ",", "int", "pType", ")", "{", "// Don't convert if it already is BufferedImage and correct type\r", "if", "(", "(", "pOriginal", "instanceof", "BufferedImage", ")", "&&", "(", "(", "B...
Converts the {@code RenderedImage} to a {@code BufferedImage} of the given type. <p/> If the image is already a {@code BufferedImage} of the given type, it is simply returned and no conversion takes place. @param pOriginal the image to convert. @param pType the type of buffered image @return a {@code BufferedImage} ...
[ "Converts", "the", "{", "@code", "RenderedImage", "}", "to", "a", "{", "@code", "BufferedImage", "}", "of", "the", "given", "type", ".", "<p", "/", ">", "If", "the", "image", "is", "already", "a", "{", "@code", "BufferedImage", "}", "of", "the", "given...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java#L279-L305
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/style/StyleHelper.java
StyleHelper.delayedStyle
public static void delayedStyle(Chunk c, String tag, Collection<? extends Advanced> stylers, EventHelper eventHelper) { """ Call {@link #delayedStyle(com.itextpdf.text.Chunk, java.lang.String, java.util.Collection, com.vectorprint.report.itext.EventHelper, com.itextpdf.text.Image) } with null for Image """ ...
java
public static void delayedStyle(Chunk c, String tag, Collection<? extends Advanced> stylers, EventHelper eventHelper) { delayedStyle(c, tag, stylers, eventHelper, null); }
[ "public", "static", "void", "delayedStyle", "(", "Chunk", "c", ",", "String", "tag", ",", "Collection", "<", "?", "extends", "Advanced", ">", "stylers", ",", "EventHelper", "eventHelper", ")", "{", "delayedStyle", "(", "c", ",", "tag", ",", "stylers", ",",...
Call {@link #delayedStyle(com.itextpdf.text.Chunk, java.lang.String, java.util.Collection, com.vectorprint.report.itext.EventHelper, com.itextpdf.text.Image) } with null for Image
[ "Call", "{" ]
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/StyleHelper.java#L214-L216