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
OpenLiberty/open-liberty
dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAEMPool.java
JPAEMPool.createEntityManager
@Override public EntityManager createEntityManager() { """ Gets entity manager from pool and wraps it in an invocation type aware, enlistment capable em. """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "createEntityManager : " + this); EntityM...
java
@Override public EntityManager createEntityManager() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "createEntityManager : " + this); EntityManager em = getEntityManager(false, false); JPAPooledEntityManager pem = new JPAPooledEntityManager(t...
[ "@", "Override", "public", "EntityManager", "createEntityManager", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "Tr", ".", "debug", "(", "tc", ",", "\"createEntityManager : ...
Gets entity manager from pool and wraps it in an invocation type aware, enlistment capable em.
[ "Gets", "entity", "manager", "from", "pool", "and", "wraps", "it", "in", "an", "invocation", "type", "aware", "enlistment", "capable", "em", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jpa.container.core/src/com/ibm/ws/jpa/management/JPAEMPool.java#L262-L271
knowm/XChange
xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/service/CoinbaseBaseService.java
CoinbaseBaseService.createCoinbaseUser
public CoinbaseUser createCoinbaseUser(CoinbaseUser user, final String oAuthClientId) throws IOException { """ Unauthenticated resource that creates a user with an email and password. @param user New Coinbase User information. @param oAuthClientId Optional client id that corresponds to your OAuth2 applic...
java
public CoinbaseUser createCoinbaseUser(CoinbaseUser user, final String oAuthClientId) throws IOException { final CoinbaseUser createdUser = coinbase.createUser(user.withoAuthClientId(oAuthClientId)); return handleResponse(createdUser); }
[ "public", "CoinbaseUser", "createCoinbaseUser", "(", "CoinbaseUser", "user", ",", "final", "String", "oAuthClientId", ")", "throws", "IOException", "{", "final", "CoinbaseUser", "createdUser", "=", "coinbase", ".", "createUser", "(", "user", ".", "withoAuthClientId", ...
Unauthenticated resource that creates a user with an email and password. @param user New Coinbase User information. @param oAuthClientId Optional client id that corresponds to your OAuth2 application. @return Information for the newly created user, including information to perform future OAuth requests for the user. @...
[ "Unauthenticated", "resource", "that", "creates", "a", "user", "with", "an", "email", "and", "password", "." ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/service/CoinbaseBaseService.java#L82-L87
samskivert/samskivert
src/main/java/com/samskivert/swing/util/TaskMaster.java
TaskMaster.invokeMethodTask
public static void invokeMethodTask (String name, Object source, TaskObserver observer) { """ Invokes the method with the specified name on the supplied source object as if it were a task. The observer is notified when the method has completed and returned its result or if it fails. The named method must have a...
java
public static void invokeMethodTask (String name, Object source, TaskObserver observer) { // create a method task instance to invoke the named method and // then run that through the normal task invocation mechanism invokeTask(name, new MethodTask(name, source), observer); }
[ "public", "static", "void", "invokeMethodTask", "(", "String", "name", ",", "Object", "source", ",", "TaskObserver", "observer", ")", "{", "// create a method task instance to invoke the named method and", "// then run that through the normal task invocation mechanism", "invokeTask...
Invokes the method with the specified name on the supplied source object as if it were a task. The observer is notified when the method has completed and returned its result or if it fails. The named method must have a signature the same as the <code>invoke</code> method of the <code>Task</code> interface. Aborting tas...
[ "Invokes", "the", "method", "with", "the", "specified", "name", "on", "the", "supplied", "source", "object", "as", "if", "it", "were", "a", "task", ".", "The", "observer", "is", "notified", "when", "the", "method", "has", "completed", "and", "returned", "i...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/TaskMaster.java#L52-L57
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.updateSubListAsync
public Observable<OperationStatus> updateSubListAsync(UUID appId, String versionId, UUID clEntityId, int subListId, WordListBaseUpdateObject wordListBaseUpdateObject) { """ Updates one of the closed list's sublists. @param appId The application ID. @param versionId The version ID. @param clEntityId The closed...
java
public Observable<OperationStatus> updateSubListAsync(UUID appId, String versionId, UUID clEntityId, int subListId, WordListBaseUpdateObject wordListBaseUpdateObject) { return updateSubListWithServiceResponseAsync(appId, versionId, clEntityId, subListId, wordListBaseUpdateObject).map(new Func1<ServiceResponse<O...
[ "public", "Observable", "<", "OperationStatus", ">", "updateSubListAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "clEntityId", ",", "int", "subListId", ",", "WordListBaseUpdateObject", "wordListBaseUpdateObject", ")", "{", "return", "updateSub...
Updates one of the closed list's sublists. @param appId The application ID. @param versionId The version ID. @param clEntityId The closed list entity extractor ID. @param subListId The sublist ID. @param wordListBaseUpdateObject A sublist update object containing the new canonical form and the list of words. @throws I...
[ "Updates", "one", "of", "the", "closed", "list", "s", "sublists", "." ]
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#L4999-L5006
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/search/PathFinder.java
PathFinder.getRelativePathTo
public static File getRelativePathTo(final File parent, final String separator, final String folders, final String filename) { """ Gets the file or directory from the given parent File object and the relative path given over the list as String objects. @param parent The parent directory. @param separator ...
java
public static File getRelativePathTo(final File parent, final String separator, final String folders, final String filename) { final List<String> list = new ArrayList<>(Arrays.asList(folders.split(separator))); if (filename != null && !filename.isEmpty()) { list.add(filename); } return getRelati...
[ "public", "static", "File", "getRelativePathTo", "(", "final", "File", "parent", ",", "final", "String", "separator", ",", "final", "String", "folders", ",", "final", "String", "filename", ")", "{", "final", "List", "<", "String", ">", "list", "=", "new", ...
Gets the file or directory from the given parent File object and the relative path given over the list as String objects. @param parent The parent directory. @param separator The separator for separate the String folders. @param folders The relative path as a String object separated with the defined separator. @param ...
[ "Gets", "the", "file", "or", "directory", "from", "the", "given", "parent", "File", "object", "and", "the", "relative", "path", "given", "over", "the", "list", "as", "String", "objects", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/search/PathFinder.java#L162-L171
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java
ArrayUtil.sub
public static Object[] sub(Object array, int start, int end) { """ 获取子数组 @param array 数组 @param start 开始位置(包括) @param end 结束位置(不包括) @return 新的数组 @since 4.0.6 """ return sub(array, start, end, 1); }
java
public static Object[] sub(Object array, int start, int end) { return sub(array, start, end, 1); }
[ "public", "static", "Object", "[", "]", "sub", "(", "Object", "array", ",", "int", "start", ",", "int", "end", ")", "{", "return", "sub", "(", "array", ",", "start", ",", "end", ",", "1", ")", ";", "}" ]
获取子数组 @param array 数组 @param start 开始位置(包括) @param end 结束位置(不包括) @return 新的数组 @since 4.0.6
[ "获取子数组" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ArrayUtil.java#L2170-L2172
alkacon/opencms-core
src/org/opencms/ui/apps/sitemanager/CmsCreateSiteThread.java
CmsCreateSiteThread.createSitemapContentFolder
private void createSitemapContentFolder(CmsObject cms, CmsResource subSitemapFolder, String contentFolder) throws CmsException, CmsLoaderException { """ Helper method for creating the .content folder of a sub-sitemap.<p> @param cms the current CMS context @param subSitemapFolder the sub-sitemap folder in w...
java
private void createSitemapContentFolder(CmsObject cms, CmsResource subSitemapFolder, String contentFolder) throws CmsException, CmsLoaderException { CmsResource configFile = null; String sitePath = cms.getSitePath(subSitemapFolder); String folderName = CmsStringUtil.joinPaths(sitePath, CmsA...
[ "private", "void", "createSitemapContentFolder", "(", "CmsObject", "cms", ",", "CmsResource", "subSitemapFolder", ",", "String", "contentFolder", ")", "throws", "CmsException", ",", "CmsLoaderException", "{", "CmsResource", "configFile", "=", "null", ";", "String", "s...
Helper method for creating the .content folder of a sub-sitemap.<p> @param cms the current CMS context @param subSitemapFolder the sub-sitemap folder in which the .content folder should be created @param contentFolder the content folder path @throws CmsException if something goes wrong @throws CmsLoaderException if so...
[ "Helper", "method", "for", "creating", "the", ".", "content", "folder", "of", "a", "sub", "-", "sitemap", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sitemanager/CmsCreateSiteThread.java#L334-L392
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/xml/hints/HintRule.java
HintRule.addGivenVendor
public void addGivenVendor(String source, String name, String value, boolean regex, Confidence confidence) { """ Adds a given vendors to the list of evidence to matched. @param source the source of the evidence @param name the name of the evidence @param value the value of the evidence @param regex whether v...
java
public void addGivenVendor(String source, String name, String value, boolean regex, Confidence confidence) { givenVendor.add(new EvidenceMatcher(source, name, value, regex, confidence)); }
[ "public", "void", "addGivenVendor", "(", "String", "source", ",", "String", "name", ",", "String", "value", ",", "boolean", "regex", ",", "Confidence", "confidence", ")", "{", "givenVendor", ".", "add", "(", "new", "EvidenceMatcher", "(", "source", ",", "nam...
Adds a given vendors to the list of evidence to matched. @param source the source of the evidence @param name the name of the evidence @param value the value of the evidence @param regex whether value is a regex @param confidence the confidence of the evidence
[ "Adds", "a", "given", "vendors", "to", "the", "list", "of", "evidence", "to", "matched", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/xml/hints/HintRule.java#L128-L130
cdk/cdk
misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java
GridGenerator.setDimension
public void setDimension(double[] minMax, boolean cubicGridFlag) { """ Method sets the maximal 3d dimensions to given min and max values. """ if (cubicGridFlag) { double min = minMax[0]; double max = minMax[0]; for (int i = 0; i < minMax.length; i++) { ...
java
public void setDimension(double[] minMax, boolean cubicGridFlag) { if (cubicGridFlag) { double min = minMax[0]; double max = minMax[0]; for (int i = 0; i < minMax.length; i++) { if (minMax[i] < min) { min = minMax[i]; } else...
[ "public", "void", "setDimension", "(", "double", "[", "]", "minMax", ",", "boolean", "cubicGridFlag", ")", "{", "if", "(", "cubicGridFlag", ")", "{", "double", "min", "=", "minMax", "[", "0", "]", ";", "double", "max", "=", "minMax", "[", "0", "]", "...
Method sets the maximal 3d dimensions to given min and max values.
[ "Method", "sets", "the", "maximal", "3d", "dimensions", "to", "given", "min", "and", "max", "values", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/misc/extra/src/main/java/org/openscience/cdk/tools/GridGenerator.java#L86-L106
YahooArchive/samoa
samoa-api/src/main/java/com/yahoo/labs/samoa/topology/TopologyBuilder.java
TopologyBuilder.createPi
private ProcessingItem createPi(Processor processor, int parallelism) { """ Creates a processing item with a specific processor and paralellism level. @param processor @param parallelism @return ProcessingItem """ ProcessingItem pi = this.componentFactory.createPi(processor, parallelism); ...
java
private ProcessingItem createPi(Processor processor, int parallelism) { ProcessingItem pi = this.componentFactory.createPi(processor, parallelism); this.topology.addProcessingItem(pi, parallelism); return pi; }
[ "private", "ProcessingItem", "createPi", "(", "Processor", "processor", ",", "int", "parallelism", ")", "{", "ProcessingItem", "pi", "=", "this", ".", "componentFactory", ".", "createPi", "(", "processor", ",", "parallelism", ")", ";", "this", ".", "topology", ...
Creates a processing item with a specific processor and paralellism level. @param processor @param parallelism @return ProcessingItem
[ "Creates", "a", "processing", "item", "with", "a", "specific", "processor", "and", "paralellism", "level", "." ]
train
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-api/src/main/java/com/yahoo/labs/samoa/topology/TopologyBuilder.java#L190-L194
alexvasilkov/AndroidCommons
library/src/main/java/com/alexvasilkov/android/commons/prefs/PreferencesHelper.java
PreferencesHelper.getJson
@Nullable public static <T> T getJson(@NonNull SharedPreferences prefs, @NonNull String key, @NonNull Class<T> clazz) { """ Retrieves object stored as json encoded string. Gson library should be available in classpath. """ return getJson(prefs, key, (Type) clazz); }
java
@Nullable public static <T> T getJson(@NonNull SharedPreferences prefs, @NonNull String key, @NonNull Class<T> clazz) { return getJson(prefs, key, (Type) clazz); }
[ "@", "Nullable", "public", "static", "<", "T", ">", "T", "getJson", "(", "@", "NonNull", "SharedPreferences", "prefs", ",", "@", "NonNull", "String", "key", ",", "@", "NonNull", "Class", "<", "T", ">", "clazz", ")", "{", "return", "getJson", "(", "pref...
Retrieves object stored as json encoded string. Gson library should be available in classpath.
[ "Retrieves", "object", "stored", "as", "json", "encoded", "string", ".", "Gson", "library", "should", "be", "available", "in", "classpath", "." ]
train
https://github.com/alexvasilkov/AndroidCommons/blob/aca9f6d5acfc6bd3694984b7f89956e1a0146ddb/library/src/main/java/com/alexvasilkov/android/commons/prefs/PreferencesHelper.java#L140-L144
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/FinalParameters.java
FinalParameters.getRegisterName
private static String getRegisterName(final Code obj, final int reg) { """ returns the variable name of the specified register slot @param obj the currently parsed code object @param reg the variable register of interest @return the variable name of the specified register """ LocalVariableTabl...
java
private static String getRegisterName(final Code obj, final int reg) { LocalVariableTable lvt = obj.getLocalVariableTable(); if (lvt != null) { LocalVariable lv = lvt.getLocalVariable(reg, 0); if (lv != null) { return lv.getName(); } } ...
[ "private", "static", "String", "getRegisterName", "(", "final", "Code", "obj", ",", "final", "int", "reg", ")", "{", "LocalVariableTable", "lvt", "=", "obj", ".", "getLocalVariableTable", "(", ")", ";", "if", "(", "lvt", "!=", "null", ")", "{", "LocalVaria...
returns the variable name of the specified register slot @param obj the currently parsed code object @param reg the variable register of interest @return the variable name of the specified register
[ "returns", "the", "variable", "name", "of", "the", "specified", "register", "slot" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/FinalParameters.java#L238-L247
JodaOrg/joda-time
src/main/java/org/joda/time/DateTimeZone.java
DateTimeZone.adjustOffset
public long adjustOffset(long instant, boolean earlierOrLater) { """ Adjusts the offset to be the earlier or later one during an overlap. @param instant the instant to adjust @param earlierOrLater false for earlier, true for later @return the adjusted instant millis """ // a bit messy, but will ...
java
public long adjustOffset(long instant, boolean earlierOrLater) { // a bit messy, but will work in all non-pathological cases // evaluate 3 hours before and after to work out if anything is happening long instantBefore = instant - 3 * DateTimeConstants.MILLIS_PER_HOUR; long insta...
[ "public", "long", "adjustOffset", "(", "long", "instant", ",", "boolean", "earlierOrLater", ")", "{", "// a bit messy, but will work in all non-pathological cases", "// evaluate 3 hours before and after to work out if anything is happening", "long", "instantBefore", "=", "instant", ...
Adjusts the offset to be the earlier or later one during an overlap. @param instant the instant to adjust @param earlierOrLater false for earlier, true for later @return the adjusted instant millis
[ "Adjusts", "the", "offset", "to", "be", "the", "earlier", "or", "later", "one", "during", "an", "overlap", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/DateTimeZone.java#L1195-L1225
Erudika/para
para-core/src/main/java/com/erudika/para/Para.java
Para.getParaClassLoader
public static ClassLoader getParaClassLoader() { """ Returns the {@link URLClassLoader} classloader for Para. Used for loading JAR files from 'lib/*.jar'. @return a classloader """ if (paraClassLoader == null) { try { ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); ...
java
public static ClassLoader getParaClassLoader() { if (paraClassLoader == null) { try { ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); List<URL> jars = new ArrayList<>(); File lib = new File(Config.getConfigParam("plugin_folder", "lib/")); if (lib.exists() && lib.isD...
[ "public", "static", "ClassLoader", "getParaClassLoader", "(", ")", "{", "if", "(", "paraClassLoader", "==", "null", ")", "{", "try", "{", "ClassLoader", "currentClassLoader", "=", "Thread", ".", "currentThread", "(", ")", ".", "getContextClassLoader", "(", ")", ...
Returns the {@link URLClassLoader} classloader for Para. Used for loading JAR files from 'lib/*.jar'. @return a classloader
[ "Returns", "the", "{" ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/Para.java#L320-L338
lucee/Lucee
core/src/main/java/lucee/runtime/type/scope/session/SessionFile.java
SessionFile.getInstance
public static Session getInstance(String name, PageContext pc, Log log) { """ load new instance of the class @param name @param pc @param checkExpires @return """ Resource res = _loadResource(pc.getConfig(), SCOPE_SESSION, name, pc.getCFID()); Struct data = _loadData(pc, res, log); return new Session...
java
public static Session getInstance(String name, PageContext pc, Log log) { Resource res = _loadResource(pc.getConfig(), SCOPE_SESSION, name, pc.getCFID()); Struct data = _loadData(pc, res, log); return new SessionFile(pc, res, data); }
[ "public", "static", "Session", "getInstance", "(", "String", "name", ",", "PageContext", "pc", ",", "Log", "log", ")", "{", "Resource", "res", "=", "_loadResource", "(", "pc", ".", "getConfig", "(", ")", ",", "SCOPE_SESSION", ",", "name", ",", "pc", ".",...
load new instance of the class @param name @param pc @param checkExpires @return
[ "load", "new", "instance", "of", "the", "class" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/scope/session/SessionFile.java#L61-L66
sundrio/sundrio
codegen/src/main/java/io/sundr/codegen/utils/TypeUtils.java
TypeUtils.typeExtends
public static TypeDef typeExtends(TypeDef base, ClassRef superClass) { """ Sets one {@link io.sundr.codegen.model.TypeDef} as a super class of an other. @param base The base type. @param superClass The super type. @return The updated type definition. """ return new TypeDefBuilder(b...
java
public static TypeDef typeExtends(TypeDef base, ClassRef superClass) { return new TypeDefBuilder(base) .withExtendsList(superClass) .build(); }
[ "public", "static", "TypeDef", "typeExtends", "(", "TypeDef", "base", ",", "ClassRef", "superClass", ")", "{", "return", "new", "TypeDefBuilder", "(", "base", ")", ".", "withExtendsList", "(", "superClass", ")", ".", "build", "(", ")", ";", "}" ]
Sets one {@link io.sundr.codegen.model.TypeDef} as a super class of an other. @param base The base type. @param superClass The super type. @return The updated type definition.
[ "Sets", "one", "{", "@link", "io", ".", "sundr", ".", "codegen", ".", "model", ".", "TypeDef", "}", "as", "a", "super", "class", "of", "an", "other", "." ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/codegen/src/main/java/io/sundr/codegen/utils/TypeUtils.java#L160-L164
osglworks/java-tool
src/main/java/org/osgl/util/IO.java
IO.zipInto
public static void zipInto(File target, File... files) { """ Zip a list of files into specified target file. @param target the target file as the zip package @param files the files to be zipped. """ ZipOutputStream zos = null; try { zos = new ZipOutputStream(new BufferedOutput...
java
public static void zipInto(File target, File... files) { ZipOutputStream zos = null; try { zos = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(target))); byte[] buffer = new byte[128]; for (File f : files) { ZipEntry entry = new Zip...
[ "public", "static", "void", "zipInto", "(", "File", "target", ",", "File", "...", "files", ")", "{", "ZipOutputStream", "zos", "=", "null", ";", "try", "{", "zos", "=", "new", "ZipOutputStream", "(", "new", "BufferedOutputStream", "(", "new", "FileOutputStre...
Zip a list of files into specified target file. @param target the target file as the zip package @param files the files to be zipped.
[ "Zip", "a", "list", "of", "files", "into", "specified", "target", "file", "." ]
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/IO.java#L2131-L2152
aws/aws-sdk-java
aws-java-sdk-devicefarm/src/main/java/com/amazonaws/services/devicefarm/model/GetOfferingStatusResult.java
GetOfferingStatusResult.withNextPeriod
public GetOfferingStatusResult withNextPeriod(java.util.Map<String, OfferingStatus> nextPeriod) { """ <p> When specified, gets the offering status for the next period. </p> @param nextPeriod When specified, gets the offering status for the next period. @return Returns a reference to this object so that meth...
java
public GetOfferingStatusResult withNextPeriod(java.util.Map<String, OfferingStatus> nextPeriod) { setNextPeriod(nextPeriod); return this; }
[ "public", "GetOfferingStatusResult", "withNextPeriod", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "OfferingStatus", ">", "nextPeriod", ")", "{", "setNextPeriod", "(", "nextPeriod", ")", ";", "return", "this", ";", "}" ]
<p> When specified, gets the offering status for the next period. </p> @param nextPeriod When specified, gets the offering status for the next period. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "When", "specified", "gets", "the", "offering", "status", "for", "the", "next", "period", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-devicefarm/src/main/java/com/amazonaws/services/devicefarm/model/GetOfferingStatusResult.java#L145-L148
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/map/OpenIntDoubleHashMap.java
OpenIntDoubleHashMap.pairsMatching
public void pairsMatching(final IntDoubleProcedure condition, final IntArrayList keyList, final DoubleArrayList valueList) { """ Fills all pairs satisfying a given condition into the specified lists. Fills into the lists, starting at index 0. After this call returns the specified lists both have a new size, the ...
java
public void pairsMatching(final IntDoubleProcedure condition, final IntArrayList keyList, final DoubleArrayList valueList) { keyList.clear(); valueList.clear(); for (int i = table.length ; i-- > 0 ;) { if (state[i]==FULL && condition.apply(table[i],values[i])) { keyList.add(table[i]); valueList.add(values[...
[ "public", "void", "pairsMatching", "(", "final", "IntDoubleProcedure", "condition", ",", "final", "IntArrayList", "keyList", ",", "final", "DoubleArrayList", "valueList", ")", "{", "keyList", ".", "clear", "(", ")", ";", "valueList", ".", "clear", "(", ")", ";...
Fills all pairs satisfying a given condition into the specified lists. Fills into the lists, starting at index 0. After this call returns the specified lists both have a new size, the number of pairs satisfying the condition. Iteration order is guaranteed to be <i>identical</i> to the order used by method {@link #forEa...
[ "Fills", "all", "pairs", "satisfying", "a", "given", "condition", "into", "the", "specified", "lists", ".", "Fills", "into", "the", "lists", "starting", "at", "index", "0", ".", "After", "this", "call", "returns", "the", "specified", "lists", "both", "have",...
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/map/OpenIntDoubleHashMap.java#L370-L380
lievendoclo/Valkyrie-RCP
valkyrie-rcp-samples/valkyrie-rcp-vldocking-sample/src/main/java/org/valkyriercp/sample/vldocking/ui/InitialView.java
InitialView.createControl
protected JComponent createControl() { """ Create the actual UI control for this view. It will be placed into the window according to the layout of the page holding this view. """ // In this view, we're just going to use standard Swing to place a // few controls. // The location of the text to display ...
java
protected JComponent createControl() { // In this view, we're just going to use standard Swing to place a // few controls. // The location of the text to display has been set as a Resource in the // property descriptionTextPath. So, use that resource to obtain a URL // and set that as the page for the text p...
[ "protected", "JComponent", "createControl", "(", ")", "{", "// In this view, we're just going to use standard Swing to place a", "// few controls.", "// The location of the text to display has been set as a Resource in the", "// property descriptionTextPath. So, use that resource to obtain a URL",...
Create the actual UI control for this view. It will be placed into the window according to the layout of the page holding this view.
[ "Create", "the", "actual", "UI", "control", "for", "this", "view", ".", "It", "will", "be", "placed", "into", "the", "window", "according", "to", "the", "layout", "of", "the", "page", "holding", "this", "view", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-samples/valkyrie-rcp-vldocking-sample/src/main/java/org/valkyriercp/sample/vldocking/ui/InitialView.java#L104-L129
Domo42/saga-lib
saga-lib-guice/src/main/java/com/codebullets/sagalib/guice/SagaLibModule.java
SagaLibModule.bindIfNotNull
private <T> void bindIfNotNull(final Class<T> interfaceType, @Nullable final Class<? extends T> implementationType) { """ Perform binding to interface only if implementation type is not null. """ if (implementationType != null) { bind(interfaceType).to(implementationType); } }
java
private <T> void bindIfNotNull(final Class<T> interfaceType, @Nullable final Class<? extends T> implementationType) { if (implementationType != null) { bind(interfaceType).to(implementationType); } }
[ "private", "<", "T", ">", "void", "bindIfNotNull", "(", "final", "Class", "<", "T", ">", "interfaceType", ",", "@", "Nullable", "final", "Class", "<", "?", "extends", "T", ">", "implementationType", ")", "{", "if", "(", "implementationType", "!=", "null", ...
Perform binding to interface only if implementation type is not null.
[ "Perform", "binding", "to", "interface", "only", "if", "implementation", "type", "is", "not", "null", "." ]
train
https://github.com/Domo42/saga-lib/blob/c8f232e2a51fcb6a3fe0082cfbf105c1e6bf90ef/saga-lib-guice/src/main/java/com/codebullets/sagalib/guice/SagaLibModule.java#L155-L159
apache/incubator-druid
processing/src/main/java/org/apache/druid/collections/spatial/search/PolygonBound.java
PolygonBound.from
@JsonCreator public static PolygonBound from( @JsonProperty("abscissa") float[] abscissa, @JsonProperty("ordinate") float[] ordinate, @JsonProperty("limit") int limit ) { """ abscissa and ordinate contain the coordinates of polygon. abscissa[i] is the horizontal coordinate for the i'th corne...
java
@JsonCreator public static PolygonBound from( @JsonProperty("abscissa") float[] abscissa, @JsonProperty("ordinate") float[] ordinate, @JsonProperty("limit") int limit ) { Preconditions.checkArgument(abscissa.length == ordinate.length); //abscissa and ordinate should be the same length Pr...
[ "@", "JsonCreator", "public", "static", "PolygonBound", "from", "(", "@", "JsonProperty", "(", "\"abscissa\"", ")", "float", "[", "]", "abscissa", ",", "@", "JsonProperty", "(", "\"ordinate\"", ")", "float", "[", "]", "ordinate", ",", "@", "JsonProperty", "(...
abscissa and ordinate contain the coordinates of polygon. abscissa[i] is the horizontal coordinate for the i'th corner of the polygon, and ordinate[i] is the vertical coordinate for the i'th corner. The polygon must have more than 2 corners, so the length of abscissa or ordinate must be equal or greater than 3. if the...
[ "abscissa", "and", "ordinate", "contain", "the", "coordinates", "of", "polygon", ".", "abscissa", "[", "i", "]", "is", "the", "horizontal", "coordinate", "for", "the", "i", "th", "corner", "of", "the", "polygon", "and", "ordinate", "[", "i", "]", "is", "...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/processing/src/main/java/org/apache/druid/collections/spatial/search/PolygonBound.java#L89-L99
amaembo/streamex
src/main/java/one/util/streamex/EntryStream.java
EntryStream.toCustomMap
public <M extends Map<K, V>> M toCustomMap(BinaryOperator<V> mergeFunction, Supplier<M> mapSupplier) { """ Returns a {@link Map} containing the elements of this stream. The {@code Map} is created by a provided supplier function. <p> If the mapped keys contains duplicates (according to {@link Object#equals(Ob...
java
public <M extends Map<K, V>> M toCustomMap(BinaryOperator<V> mergeFunction, Supplier<M> mapSupplier) { Function<Entry<K, V>, K> keyMapper = Entry::getKey; Function<Entry<K, V>, V> valueMapper = Entry::getValue; return collect(Collectors.toMap(keyMapper, valueMapper, mergeFunction, mapSupplier...
[ "public", "<", "M", "extends", "Map", "<", "K", ",", "V", ">", ">", "M", "toCustomMap", "(", "BinaryOperator", "<", "V", ">", "mergeFunction", ",", "Supplier", "<", "M", ">", "mapSupplier", ")", "{", "Function", "<", "Entry", "<", "K", ",", "V", ">...
Returns a {@link Map} containing the elements of this stream. The {@code Map} is created by a provided supplier function. <p> If the mapped keys contains duplicates (according to {@link Object#equals(Object)}), the value mapping function is applied to each equal element, and the results are merged using the provided m...
[ "Returns", "a", "{", "@link", "Map", "}", "containing", "the", "elements", "of", "this", "stream", ".", "The", "{", "@code", "Map", "}", "is", "created", "by", "a", "provided", "supplier", "function", "." ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/EntryStream.java#L1270-L1274
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
StorageAccountsInner.regenerateKey
public StorageAccountListKeysResultInner regenerateKey(String resourceGroupName, String accountName, String keyName) { """ Regenerates one of the access keys for the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. ...
java
public StorageAccountListKeysResultInner regenerateKey(String resourceGroupName, String accountName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).toBlocking().single().body(); }
[ "public", "StorageAccountListKeysResultInner", "regenerateKey", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "keyName", ")", "{", "return", "regenerateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "keyNa...
Regenerates one of the access keys for the specified storage account. @param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and...
[ "Regenerates", "one", "of", "the", "access", "keys", "for", "the", "specified", "storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L920-L922
drinkjava2/jBeanBox
jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/CheckClassAdapter.java
CheckClassAdapter.checkTypeArguments
private static int checkTypeArguments(final String signature, int pos) { """ Checks the type arguments in a class type signature. @param signature a string containing the signature that must be checked. @param pos index of first character to be checked. @return the index of the first character after the che...
java
private static int checkTypeArguments(final String signature, int pos) { // TypeArguments: // < TypeArgument+ > pos = checkChar('<', signature, pos); pos = checkTypeArgument(signature, pos); while (getChar(signature, pos) != '>') { pos = checkTypeArgument(signature, ...
[ "private", "static", "int", "checkTypeArguments", "(", "final", "String", "signature", ",", "int", "pos", ")", "{", "// TypeArguments:", "// < TypeArgument+ >", "pos", "=", "checkChar", "(", "'", "'", ",", "signature", ",", "pos", ")", ";", "pos", "=", "chec...
Checks the type arguments in a class type signature. @param signature a string containing the signature that must be checked. @param pos index of first character to be checked. @return the index of the first character after the checked part.
[ "Checks", "the", "type", "arguments", "in", "a", "class", "type", "signature", "." ]
train
https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/CheckClassAdapter.java#L877-L887
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/user/UserClient.java
UserClient.setGroupShield
public ResponseWrapper setGroupShield(GroupShieldPayload payload, String username) throws APIConnectionException, APIRequestException { """ Set user's group message blocking @param payload GroupShieldPayload @param username Necessary @return No content @throws APIConnectionException connect exce...
java
public ResponseWrapper setGroupShield(GroupShieldPayload payload, String username) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(null != payload, "GroupShieldPayload should not be null"); StringUtils.checkUsername(username); return _httpClient.sendP...
[ "public", "ResponseWrapper", "setGroupShield", "(", "GroupShieldPayload", "payload", ",", "String", "username", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "Preconditions", ".", "checkArgument", "(", "null", "!=", "payload", ",", "\"GroupSh...
Set user's group message blocking @param payload GroupShieldPayload @param username Necessary @return No content @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Set", "user", "s", "group", "message", "blocking" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/user/UserClient.java#L360-L365
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/NewOnChangeHandler.java
NewOnChangeHandler.fieldChanged
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { """ The Field has Changed. Do an addNew() on the target record. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay). Field Changed,...
java
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { try { m_recTarget.addNew(); } catch (DBException e) { return e.getErrorCode(); } return DBConstants.NORMAL_RETURN; }
[ "public", "int", "fieldChanged", "(", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "try", "{", "m_recTarget", ".", "addNew", "(", ")", ";", "}", "catch", "(", "DBException", "e", ")", "{", "return", "e", ".", "getErrorCode", "(", ")", ...
The Field has Changed. Do an addNew() on the target record. @param bDisplayOption If true, display the change. @param iMoveMode The type of move being done (init/read/screen). @return The error code (or NORMAL_RETURN if okay). Field Changed, do an addNew on this record.
[ "The", "Field", "has", "Changed", ".", "Do", "an", "addNew", "()", "on", "the", "target", "record", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/NewOnChangeHandler.java#L75-L83
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java
PatchRESTService.getPatches
@GET public List<String> getPatches() throws GuacamoleException { """ Returns a list of all available HTML patches, in the order they should be applied. Each patch is raw HTML containing additional meta tags describing how and where the patch should be applied. @return A list of all HTML patches defined ...
java
@GET public List<String> getPatches() throws GuacamoleException { try { // Allocate a list of equal size to the total number of patches List<Resource> resources = patchResourceService.getPatchResources(); List<String> patches = new ArrayList<String>(resources.size()); ...
[ "@", "GET", "public", "List", "<", "String", ">", "getPatches", "(", ")", "throws", "GuacamoleException", "{", "try", "{", "// Allocate a list of equal size to the total number of patches", "List", "<", "Resource", ">", "resources", "=", "patchResourceService", ".", "...
Returns a list of all available HTML patches, in the order they should be applied. Each patch is raw HTML containing additional meta tags describing how and where the patch should be applied. @return A list of all HTML patches defined in the system, in the order they should be applied. @throws GuacamoleException If a...
[ "Returns", "a", "list", "of", "all", "available", "HTML", "patches", "in", "the", "order", "they", "should", "be", "applied", ".", "Each", "patch", "is", "raw", "HTML", "containing", "additional", "meta", "tags", "describing", "how", "and", "where", "the", ...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java#L102-L126
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesInner.java
GeoBackupPoliciesInner.getAsync
public Observable<GeoBackupPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { """ Gets a geo backup policy. @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. @pa...
java
public Observable<GeoBackupPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<GeoBackupPolicyInner>, GeoBackupPolicyInner>() { @Override pu...
[ "public", "Observable", "<", "GeoBackupPolicyInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "...
Gets a geo backup policy. @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 databaseName The name of the database. @throws IllegalArgumentException thrown if p...
[ "Gets", "a", "geo", "backup", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesInner.java#L214-L221
sgroschupf/zkclient
src/main/java/org/I0Itec/zkclient/serialize/TcclAwareObjectIputStream.java
TcclAwareObjectIputStream.resolveProxyClass
protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException { """ Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy cl...
java
protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException { ClassLoader cl = getClass().getClassLoader(); Class[] cinterfaces = new Class[interfaces.length]; for (int i = 0; i < interfaces.length; i++) { try { cinterfaces[i] = cl.loadClass(interfaces[i]); } catch...
[ "protected", "Class", "resolveProxyClass", "(", "String", "[", "]", "interfaces", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "ClassLoader", "cl", "=", "getClass", "(", ")", ".", "getClassLoader", "(", ")", ";", "Class", "[", "]", "cinter...
Returns a proxy class that implements the interfaces named in a proxy class descriptor; subclasses may implement this method to read custom data from the stream along with the descriptors for dynamic proxy classes, allowing them to use an alternate loading mechanism for the interfaces and the proxy class. For each int...
[ "Returns", "a", "proxy", "class", "that", "implements", "the", "interfaces", "named", "in", "a", "proxy", "class", "descriptor", ";", "subclasses", "may", "implement", "this", "method", "to", "read", "custom", "data", "from", "the", "stream", "along", "with", ...
train
https://github.com/sgroschupf/zkclient/blob/03ccf12c70aca2f771bfcd94d44dc7c4d4a1495e/src/main/java/org/I0Itec/zkclient/serialize/TcclAwareObjectIputStream.java#L60-L81
strator-dev/greenpepper
greenpepper-open/greenpepper-maven-runner/src/main/java/com/greenpepper/maven/runner/util/ReflectionUtils.java
ReflectionUtils.setSystemOutputs
public static void setSystemOutputs(ClassLoader classLoader, PrintStream out, PrintStream err) throws Exception { """ <p>setSystemOutputs.</p> @param classLoader a {@link java.lang.ClassLoader} object. @param out a {@link java.io.PrintStream} object. @param err a {@link java.io.PrintStream} object. @throw...
java
public static void setSystemOutputs(ClassLoader classLoader, PrintStream out, PrintStream err) throws Exception { Class<?> systemClass = classLoader.loadClass("java.lang.System"); Method setSystemOutMethod = systemClass.getMethod("setOut", PrintStream.class); setSystemOutMethod.invoke(null, out); Method set...
[ "public", "static", "void", "setSystemOutputs", "(", "ClassLoader", "classLoader", ",", "PrintStream", "out", ",", "PrintStream", "err", ")", "throws", "Exception", "{", "Class", "<", "?", ">", "systemClass", "=", "classLoader", ".", "loadClass", "(", "\"java.la...
<p>setSystemOutputs.</p> @param classLoader a {@link java.lang.ClassLoader} object. @param out a {@link java.io.PrintStream} object. @param err a {@link java.io.PrintStream} object. @throws java.lang.Exception if any.
[ "<p", ">", "setSystemOutputs", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper-open/greenpepper-maven-runner/src/main/java/com/greenpepper/maven/runner/util/ReflectionUtils.java#L89-L97
jdereg/java-util
src/main/java/com/cedarsoftware/util/DeepEquals.java
DeepEquals.compareArrays
private static boolean compareArrays(Object array1, Object array2, Deque stack, Set visited) { """ Deeply compare to Arrays []. Both arrays must be of the same type, same length, and all elements within the arrays must be deeply equal in order to return true. @param array1 [] type (Object[], String[], etc.) @pa...
java
private static boolean compareArrays(Object array1, Object array2, Deque stack, Set visited) { // Same instance check already performed... int len = Array.getLength(array1); if (len != Array.getLength(array2)) { return false; } for (int i = 0; i < len; i...
[ "private", "static", "boolean", "compareArrays", "(", "Object", "array1", ",", "Object", "array2", ",", "Deque", "stack", ",", "Set", "visited", ")", "{", "// Same instance check already performed...", "int", "len", "=", "Array", ".", "getLength", "(", "array1", ...
Deeply compare to Arrays []. Both arrays must be of the same type, same length, and all elements within the arrays must be deeply equal in order to return true. @param array1 [] type (Object[], String[], etc.) @param array2 [] type (Object[], String[], etc.) @param stack add items to compare to the Stack (Stack versus ...
[ "Deeply", "compare", "to", "Arrays", "[]", ".", "Both", "arrays", "must", "be", "of", "the", "same", "type", "same", "length", "and", "all", "elements", "within", "the", "arrays", "must", "be", "deeply", "equal", "in", "order", "to", "return", "true", "....
train
https://github.com/jdereg/java-util/blob/a2dce61aed16d6454ee575174dda1ba6bff0015c/src/main/java/com/cedarsoftware/util/DeepEquals.java#L381-L400
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/internal/ExtensionUtils.java
ExtensionUtils.importProperty
public static <T> T importProperty(MutableExtension extension, String propertySuffix) { """ Delete and return the value of the passed special property. @param <T> type of the property value @param extension the extension from which to extract custom property @param propertySuffix the property suffix @return ...
java
public static <T> T importProperty(MutableExtension extension, String propertySuffix) { return extension.removeProperty(Extension.IKEYPREFIX + propertySuffix); }
[ "public", "static", "<", "T", ">", "T", "importProperty", "(", "MutableExtension", "extension", ",", "String", "propertySuffix", ")", "{", "return", "extension", ".", "removeProperty", "(", "Extension", ".", "IKEYPREFIX", "+", "propertySuffix", ")", ";", "}" ]
Delete and return the value of the passed special property. @param <T> type of the property value @param extension the extension from which to extract custom property @param propertySuffix the property suffix @return the value @ @since 8.3M1
[ "Delete", "and", "return", "the", "value", "of", "the", "passed", "special", "property", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/internal/ExtensionUtils.java#L162-L165
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/UsersInner.java
UsersInner.beginCreateOrUpdateAsync
public Observable<UserInner> beginCreateOrUpdateAsync(String deviceName, String name, String resourceGroupName, UserInner user) { """ Creates a new user or updates an existing user's information on a data box edge/gateway device. @param deviceName The device name. @param name The user name. @param resourceGro...
java
public Observable<UserInner> beginCreateOrUpdateAsync(String deviceName, String name, String resourceGroupName, UserInner user) { return beginCreateOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, user).map(new Func1<ServiceResponse<UserInner>, UserInner>() { @Override ...
[ "public", "Observable", "<", "UserInner", ">", "beginCreateOrUpdateAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "UserInner", "user", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "deviceNa...
Creates a new user or updates an existing user's information on a data box edge/gateway device. @param deviceName The device name. @param name The user name. @param resourceGroupName The resource group name. @param user The user details. @throws IllegalArgumentException thrown if parameters fail the validation @return...
[ "Creates", "a", "new", "user", "or", "updates", "an", "existing", "user", "s", "information", "on", "a", "data", "box", "edge", "/", "gateway", "device", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/UsersInner.java#L435-L442
amaembo/streamex
src/main/java/one/util/streamex/AbstractStreamEx.java
AbstractStreamEx.foldLeft
public <U> U foldLeft(U seed, BiFunction<U, ? super T, U> accumulator) { """ Folds the elements of this stream using the provided seed object and accumulation function, going left to right. This is equivalent to: <pre> {@code U result = seed; for (T element : this stream) result = accumulator.apply(result,...
java
public <U> U foldLeft(U seed, BiFunction<U, ? super T, U> accumulator) { Box<U> result = new Box<>(seed); forEachOrdered(t -> result.a = accumulator.apply(result.a, t)); return result.a; }
[ "public", "<", "U", ">", "U", "foldLeft", "(", "U", "seed", ",", "BiFunction", "<", "U", ",", "?", "super", "T", ",", "U", ">", "accumulator", ")", "{", "Box", "<", "U", ">", "result", "=", "new", "Box", "<>", "(", "seed", ")", ";", "forEachOrd...
Folds the elements of this stream using the provided seed object and accumulation function, going left to right. This is equivalent to: <pre> {@code U result = seed; for (T element : this stream) result = accumulator.apply(result, element) return result; } </pre> <p> This is a terminal operation. <p> This method can...
[ "Folds", "the", "elements", "of", "this", "stream", "using", "the", "provided", "seed", "object", "and", "accumulation", "function", "going", "left", "to", "right", ".", "This", "is", "equivalent", "to", ":" ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/AbstractStreamEx.java#L1352-L1356
aws/aws-sdk-java
aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/UpdateIdentityPoolResult.java
UpdateIdentityPoolResult.withIdentityPoolTags
public UpdateIdentityPoolResult withIdentityPoolTags(java.util.Map<String, String> identityPoolTags) { """ <p> The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other c...
java
public UpdateIdentityPoolResult withIdentityPoolTags(java.util.Map<String, String> identityPoolTags) { setIdentityPoolTags(identityPoolTags); return this; }
[ "public", "UpdateIdentityPoolResult", "withIdentityPoolTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "identityPoolTags", ")", "{", "setIdentityPoolTags", "(", "identityPoolTags", ")", ";", "return", "this", ";", "}" ]
<p> The tags that are assigned to the identity pool. A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria. </p> @param identityPoolTags The tags that are assigned to the identity pool. A tag is a label that you ...
[ "<p", ">", "The", "tags", "that", "are", "assigned", "to", "the", "identity", "pool", ".", "A", "tag", "is", "a", "label", "that", "you", "can", "apply", "to", "identity", "pools", "to", "categorize", "and", "manage", "them", "in", "different", "ways", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cognitoidentity/src/main/java/com/amazonaws/services/cognitoidentity/model/UpdateIdentityPoolResult.java#L569-L572
revelc/formatter-maven-plugin
src/main/java/net/revelc/code/formatter/FormatterMojo.java
FormatterMojo.formatFile
private void formatFile(File file, ResultCollector rc, Properties hashCache, String basedirPath) throws MojoFailureException, MojoExecutionException { """ Format file. @param file the file @param rc the rc @param hashCache the hash cache @param basedirPath the basedir path """ try...
java
private void formatFile(File file, ResultCollector rc, Properties hashCache, String basedirPath) throws MojoFailureException, MojoExecutionException { try { doFormatFile(file, rc, hashCache, basedirPath, false); } catch (IOException | MalformedTreeException | BadLocationException...
[ "private", "void", "formatFile", "(", "File", "file", ",", "ResultCollector", "rc", ",", "Properties", "hashCache", ",", "String", "basedirPath", ")", "throws", "MojoFailureException", ",", "MojoExecutionException", "{", "try", "{", "doFormatFile", "(", "file", ",...
Format file. @param file the file @param rc the rc @param hashCache the hash cache @param basedirPath the basedir path
[ "Format", "file", "." ]
train
https://github.com/revelc/formatter-maven-plugin/blob/a237073ce6220e73ad6b1faef412fe0660485cf4/src/main/java/net/revelc/code/formatter/FormatterMojo.java#L461-L469
graknlabs/grakn
server/src/graql/reasoner/atom/binary/RelationAtom.java
RelationAtom.relationPattern
private Statement relationPattern(Variable varName, Collection<RelationProperty.RolePlayer> relationPlayers) { """ construct a $varName (rolemap) isa $typeVariable relation @param varName variable name @param relationPlayers collection of rolePlayer-roleType mappings @return corresponding {@link Stat...
java
private Statement relationPattern(Variable varName, Collection<RelationProperty.RolePlayer> relationPlayers) { Statement var = new Statement(varName); for (RelationProperty.RolePlayer rp : relationPlayers) { Statement rolePattern = rp.getRole().orElse(null); var = rolePattern != ...
[ "private", "Statement", "relationPattern", "(", "Variable", "varName", ",", "Collection", "<", "RelationProperty", ".", "RolePlayer", ">", "relationPlayers", ")", "{", "Statement", "var", "=", "new", "Statement", "(", "varName", ")", ";", "for", "(", "RelationPr...
construct a $varName (rolemap) isa $typeVariable relation @param varName variable name @param relationPlayers collection of rolePlayer-roleType mappings @return corresponding {@link Statement}
[ "construct", "a", "$varName", "(", "rolemap", ")", "isa", "$typeVariable", "relation" ]
train
https://github.com/graknlabs/grakn/blob/6aaee75ea846202474d591f8809d62028262fac5/server/src/graql/reasoner/atom/binary/RelationAtom.java#L276-L283
denisneuling/apitrary.jar
apitrary-api-client/src/main/java/com/apitrary/api/client/util/ClassUtil.java
ClassUtil.getValueOfField
public static Object getValueOfField(Field field, Object ref) { """ <p> getValueOfField. </p> @param field a {@link java.lang.reflect.Field} object. @param ref a {@link java.lang.Object} object. @return a {@link java.lang.Object} object. """ field.setAccessible(true); Object value = null; try { ...
java
public static Object getValueOfField(Field field, Object ref) { field.setAccessible(true); Object value = null; try { value = field.get(ref); } catch (IllegalArgumentException e) { log.warning(e.getClass().getSimpleName() + ": " + e.getMessage()); } catch (IllegalAccessException e) { log.warning(e.ge...
[ "public", "static", "Object", "getValueOfField", "(", "Field", "field", ",", "Object", "ref", ")", "{", "field", ".", "setAccessible", "(", "true", ")", ";", "Object", "value", "=", "null", ";", "try", "{", "value", "=", "field", ".", "get", "(", "ref"...
<p> getValueOfField. </p> @param field a {@link java.lang.reflect.Field} object. @param ref a {@link java.lang.Object} object. @return a {@link java.lang.Object} object.
[ "<p", ">", "getValueOfField", ".", "<", "/", "p", ">" ]
train
https://github.com/denisneuling/apitrary.jar/blob/b7f639a1e735c60ba2b1b62851926757f5de8628/apitrary-api-client/src/main/java/com/apitrary/api/client/util/ClassUtil.java#L240-L251
d-sauer/JCalcAPI
src/main/java/org/jdice/calc/internal/InfixParser.java
InfixParser.countOccurrences
private int countOccurrences(String haystack, char needle) { """ Count how many time needle appears in haystack @param haystack @param needle @return """ int count = 0; for (int i = 0; i < haystack.length(); i++) { if (haystack.charAt(i) == needle) count++; ...
java
private int countOccurrences(String haystack, char needle) { int count = 0; for (int i = 0; i < haystack.length(); i++) { if (haystack.charAt(i) == needle) count++; } return count; }
[ "private", "int", "countOccurrences", "(", "String", "haystack", ",", "char", "needle", ")", "{", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "haystack", ".", "length", "(", ")", ";", "i", "++", ")", "{", "if",...
Count how many time needle appears in haystack @param haystack @param needle @return
[ "Count", "how", "many", "time", "needle", "appears", "in", "haystack" ]
train
https://github.com/d-sauer/JCalcAPI/blob/36ae1f9adfe611a6f1bd8ef87cf1dc0ec88ac035/src/main/java/org/jdice/calc/internal/InfixParser.java#L461-L468
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java
PrepareRequestInterceptor.getUri
private <T extends IEntity> String getUri(Boolean platformService, String action, Context context, Map<String, String> requestParameters, Boolean entitlementService) throws FMSException { """ Method to construct the URI @param action the entity name @param context the context @param requestParameters th...
java
private <T extends IEntity> String getUri(Boolean platformService, String action, Context context, Map<String, String> requestParameters, Boolean entitlementService) throws FMSException { String uri = null; if (!platformService) { ServiceType serviceType = context.getIntuitServiceType(); if (entitlemen...
[ "private", "<", "T", "extends", "IEntity", ">", "String", "getUri", "(", "Boolean", "platformService", ",", "String", "action", ",", "Context", "context", ",", "Map", "<", "String", ",", "String", ">", "requestParameters", ",", "Boolean", "entitlementService", ...
Method to construct the URI @param action the entity name @param context the context @param requestParameters the request params @return returns URI
[ "Method", "to", "construct", "the", "URI" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/PrepareRequestInterceptor.java#L229-L250
google/closure-compiler
src/com/google/javascript/rhino/jstype/JSTypeRegistry.java
JSTypeRegistry.createFunctionType
public FunctionType createFunctionType( JSType returnType, JSType... parameterTypes) { """ Creates a function type. @param returnType the function's return type @param parameterTypes the parameters' types """ return createFunctionType(returnType, createParameters(parameterTypes)); }
java
public FunctionType createFunctionType( JSType returnType, JSType... parameterTypes) { return createFunctionType(returnType, createParameters(parameterTypes)); }
[ "public", "FunctionType", "createFunctionType", "(", "JSType", "returnType", ",", "JSType", "...", "parameterTypes", ")", "{", "return", "createFunctionType", "(", "returnType", ",", "createParameters", "(", "parameterTypes", ")", ")", ";", "}" ]
Creates a function type. @param returnType the function's return type @param parameterTypes the parameters' types
[ "Creates", "a", "function", "type", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/JSTypeRegistry.java#L1589-L1592
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.getFeatureShape
public FeatureShape getFeatureShape(String database, String table, long featureId) { """ Get the feature shape for the database, table, and feature id @param database GeoPackage database @param table table name @param featureId feature id @return feature shape @since 3.2.0 """ Map<Long, Fea...
java
public FeatureShape getFeatureShape(String database, String table, long featureId) { Map<Long, FeatureShape> featureIds = getFeatureIds(database, table); FeatureShape featureShape = getFeatureShape(featureIds, featureId); return featureShape; }
[ "public", "FeatureShape", "getFeatureShape", "(", "String", "database", ",", "String", "table", ",", "long", "featureId", ")", "{", "Map", "<", "Long", ",", "FeatureShape", ">", "featureIds", "=", "getFeatureIds", "(", "database", ",", "table", ")", ";", "Fe...
Get the feature shape for the database, table, and feature id @param database GeoPackage database @param table table name @param featureId feature id @return feature shape @since 3.2.0
[ "Get", "the", "feature", "shape", "for", "the", "database", "table", "and", "feature", "id" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L136-L140
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/StorageAccountCredentialsInner.java
StorageAccountCredentialsInner.getAsync
public Observable<StorageAccountCredentialInner> getAsync(String deviceName, String name, String resourceGroupName) { """ Gets the properties of the specified storage account credential. @param deviceName The device name. @param name The storage account credential name. @param resourceGroupName The resource g...
java
public Observable<StorageAccountCredentialInner> getAsync(String deviceName, String name, String resourceGroupName) { return getWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<StorageAccountCredentialInner>, StorageAccountCredentialInner>() { @Override ...
[ "public", "Observable", "<", "StorageAccountCredentialInner", ">", "getAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ")", "{", "return", "getWithServiceResponseAsync", "(", "deviceName", ",", "name", ",", "resourceGrou...
Gets the properties of the specified storage account credential. @param deviceName The device name. @param name The storage account credential name. @param resourceGroupName The resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the StorageAccountCr...
[ "Gets", "the", "properties", "of", "the", "specified", "storage", "account", "credential", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/StorageAccountCredentialsInner.java#L255-L262
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_features_backupCloud_POST
public OvhBackupCloud serviceName_features_backupCloud_POST(String serviceName, String cloudProjectId, String projectDescription) throws IOException { """ Create a new storage backup space associated to server REST: POST /dedicated/server/{serviceName}/features/backupCloud @param projectDescription [required] ...
java
public OvhBackupCloud serviceName_features_backupCloud_POST(String serviceName, String cloudProjectId, String projectDescription) throws IOException { String qPath = "/dedicated/server/{serviceName}/features/backupCloud"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, ...
[ "public", "OvhBackupCloud", "serviceName_features_backupCloud_POST", "(", "String", "serviceName", ",", "String", "cloudProjectId", ",", "String", "projectDescription", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/features/backup...
Create a new storage backup space associated to server REST: POST /dedicated/server/{serviceName}/features/backupCloud @param projectDescription [required] Project description of the project to be created (ignored when an existing project is already specified) @param cloudProjectId [required] cloud project id @param s...
[ "Create", "a", "new", "storage", "backup", "space", "associated", "to", "server" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L778-L786
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java
AbstractManagedType.onCheckCollectionAttribute
private <E> boolean onCheckCollectionAttribute(PluralAttribute<? super X, ?, ?> pluralAttribute, Class<E> paramClass) { """ On check collection attribute. @param <E> the element type @param pluralAttribute the plural attribute @param paramClass the param class @return true, if successful """ i...
java
private <E> boolean onCheckCollectionAttribute(PluralAttribute<? super X, ?, ?> pluralAttribute, Class<E> paramClass) { if (pluralAttribute != null) { if (isCollectionAttribute(pluralAttribute) && isBindable(pluralAttribute, paramClass)) { return true; ...
[ "private", "<", "E", ">", "boolean", "onCheckCollectionAttribute", "(", "PluralAttribute", "<", "?", "super", "X", ",", "?", ",", "?", ">", "pluralAttribute", ",", "Class", "<", "E", ">", "paramClass", ")", "{", "if", "(", "pluralAttribute", "!=", "null", ...
On check collection attribute. @param <E> the element type @param pluralAttribute the plural attribute @param paramClass the param class @return true, if successful
[ "On", "check", "collection", "attribute", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L931-L943
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/utils/JaxWsUtils.java
JaxWsUtils.getServiceQName
public static QName getServiceQName(ClassInfo classInfo, String seiClassName, String targetNamespace) { """ Get serviceName's QName of Web Service @param classInfo @return """ AnnotationInfo annotationInfo = getAnnotationInfoFromClass(classInfo, "Service QName"); if (annotationInfo == null)...
java
public static QName getServiceQName(ClassInfo classInfo, String seiClassName, String targetNamespace) { AnnotationInfo annotationInfo = getAnnotationInfoFromClass(classInfo, "Service QName"); if (annotationInfo == null) { return null; } //serviceName can only be defined in i...
[ "public", "static", "QName", "getServiceQName", "(", "ClassInfo", "classInfo", ",", "String", "seiClassName", ",", "String", "targetNamespace", ")", "{", "AnnotationInfo", "annotationInfo", "=", "getAnnotationInfoFromClass", "(", "classInfo", ",", "\"Service QName\"", "...
Get serviceName's QName of Web Service @param classInfo @return
[ "Get", "serviceName", "s", "QName", "of", "Web", "Service" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxws.clientcontainer/src/com/ibm/ws/jaxws/utils/JaxWsUtils.java#L92-L102
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java
HashSlotArrayBase.ensure0
protected final SlotAssignmentResult ensure0(long key1, long key2) { """ These protected final methods will be called from the subclasses """ assertValid(); final long size = size(); if (size == expansionThreshold()) { resizeTo(CapacityUtil.nextCapacity(capacity())); ...
java
protected final SlotAssignmentResult ensure0(long key1, long key2) { assertValid(); final long size = size(); if (size == expansionThreshold()) { resizeTo(CapacityUtil.nextCapacity(capacity())); } long slot = keyHash(key1, key2) & mask(); while (isSlotAssigned...
[ "protected", "final", "SlotAssignmentResult", "ensure0", "(", "long", "key1", ",", "long", "key2", ")", "{", "assertValid", "(", ")", ";", "final", "long", "size", "=", "size", "(", ")", ";", "if", "(", "size", "==", "expansionThreshold", "(", ")", ")", ...
These protected final methods will be called from the subclasses
[ "These", "protected", "final", "methods", "will", "be", "called", "from", "the", "subclasses" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java#L221-L241
googleads/googleads-java-lib
examples/adwords_axis/src/main/java/adwords/axis/v201809/shoppingcampaigns/GetProductCategoryTaxonomy.java
GetProductCategoryTaxonomy.displayCategories
private static void displayCategories(List<CategoryNode> categories, String prefix) { """ Recursively prints out each category node and its children. @param categories the categories to print. @param prefix the string to print at the beginning of each line of output. """ for (CategoryNode category : ca...
java
private static void displayCategories(List<CategoryNode> categories, String prefix) { for (CategoryNode category : categories) { System.out.printf("%s%s [%s]%n", prefix, category.name, category.id); displayCategories(category.children, String.format("%s%s > ", prefix, category.name)); } }
[ "private", "static", "void", "displayCategories", "(", "List", "<", "CategoryNode", ">", "categories", ",", "String", "prefix", ")", "{", "for", "(", "CategoryNode", "category", ":", "categories", ")", "{", "System", ".", "out", ".", "printf", "(", "\"%s%s [...
Recursively prints out each category node and its children. @param categories the categories to print. @param prefix the string to print at the beginning of each line of output.
[ "Recursively", "prints", "out", "each", "category", "node", "and", "its", "children", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/adwords_axis/src/main/java/adwords/axis/v201809/shoppingcampaigns/GetProductCategoryTaxonomy.java#L168-L173
netty/netty
common/src/main/java/io/netty/util/ReferenceCountUtil.java
ReferenceCountUtil.releaseLater
@Deprecated public static <T> T releaseLater(T msg, int decrement) { """ Schedules the specified object to be released when the caller thread terminates. Note that this operation is intended to simplify reference counting of ephemeral objects during unit tests. Do not use it beyond the intended use case. ...
java
@Deprecated public static <T> T releaseLater(T msg, int decrement) { if (msg instanceof ReferenceCounted) { ThreadDeathWatcher.watch(Thread.currentThread(), new ReleasingTask((ReferenceCounted) msg, decrement)); } return msg; }
[ "@", "Deprecated", "public", "static", "<", "T", ">", "T", "releaseLater", "(", "T", "msg", ",", "int", "decrement", ")", "{", "if", "(", "msg", "instanceof", "ReferenceCounted", ")", "{", "ThreadDeathWatcher", ".", "watch", "(", "Thread", ".", "currentThr...
Schedules the specified object to be released when the caller thread terminates. Note that this operation is intended to simplify reference counting of ephemeral objects during unit tests. Do not use it beyond the intended use case. @deprecated this may introduce a lot of memory usage so it is generally preferable to ...
[ "Schedules", "the", "specified", "object", "to", "be", "released", "when", "the", "caller", "thread", "terminates", ".", "Note", "that", "this", "operation", "is", "intended", "to", "simplify", "reference", "counting", "of", "ephemeral", "objects", "during", "un...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/ReferenceCountUtil.java#L155-L161
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/util/MessageDigestUtility.java
MessageDigestUtility.processMessageDigestForData
public static String processMessageDigestForData(MessageDigest messageDigest, byte[] data) { """ Calculate the digest specified by byte array of data @param messageDigest @param data @return digest in string with base64 encoding. """ String output = ""; //$NON-NLS-1$ if (messageDigest != null) ...
java
public static String processMessageDigestForData(MessageDigest messageDigest, byte[] data) { String output = ""; //$NON-NLS-1$ if (messageDigest != null) { // Get the digest for the given data messageDigest.update(data); byte[] digest = messageDigest.digest(); o...
[ "public", "static", "String", "processMessageDigestForData", "(", "MessageDigest", "messageDigest", ",", "byte", "[", "]", "data", ")", "{", "String", "output", "=", "\"\"", ";", "//$NON-NLS-1$", "if", "(", "messageDigest", "!=", "null", ")", "{", "// Get the di...
Calculate the digest specified by byte array of data @param messageDigest @param data @return digest in string with base64 encoding.
[ "Calculate", "the", "digest", "specified", "by", "byte", "array", "of", "data" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/util/MessageDigestUtility.java#L42-L51
Drivemode/TypefaceHelper
TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java
TypefaceHelper.setTypeface
public <V extends TextView> void setTypeface(V view, @StringRes int strResId) { """ Set the typeface to the target view. @param view to set typeface. @param strResId string resource containing typeface name. @param <V> text view parameter. """ setTypeface(view, mApplication.getString(strResId)); }
java
public <V extends TextView> void setTypeface(V view, @StringRes int strResId) { setTypeface(view, mApplication.getString(strResId)); }
[ "public", "<", "V", "extends", "TextView", ">", "void", "setTypeface", "(", "V", "view", ",", "@", "StringRes", "int", "strResId", ")", "{", "setTypeface", "(", "view", ",", "mApplication", ".", "getString", "(", "strResId", ")", ")", ";", "}" ]
Set the typeface to the target view. @param view to set typeface. @param strResId string resource containing typeface name. @param <V> text view parameter.
[ "Set", "the", "typeface", "to", "the", "target", "view", "." ]
train
https://github.com/Drivemode/TypefaceHelper/blob/86bef9ce16b9626b7076559e846db1b9f043c008/TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java#L95-L97
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java
VirtualNetworksInner.updateTagsAsync
public Observable<VirtualNetworkInner> updateTagsAsync(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { """ Updates a virtual network tags. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param tags Resource t...
java
public Observable<VirtualNetworkInner> updateTagsAsync(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1<ServiceResponse<VirtualNetworkInner>, VirtualNetworkInner>() { ...
[ "public", "Observable", "<", "VirtualNetworkInner", ">", "updateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "updateTagsWithServiceResponseAsync", "(", ...
Updates a virtual network tags. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Updates", "a", "virtual", "network", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java#L720-L727
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/event/ChangeFocusOnChangeHandler.java
ChangeFocusOnChangeHandler.init
public void init(BaseField field, ScreenComponent screenField, BaseField fldTarget) { """ Constructor. This listener only responds to screen moves by default. @param field The field to change the focus to on change to this field. @param screenField The screen field to change the focus to on change to this field...
java
public void init(BaseField field, ScreenComponent screenField, BaseField fldTarget) { super.init(field); m_screenField = screenField; m_fldTarget = fldTarget; m_bScreenMove = true; // Only respond to user change m_bInitMove = false; m_bReadMove = false; if ...
[ "public", "void", "init", "(", "BaseField", "field", ",", "ScreenComponent", "screenField", ",", "BaseField", "fldTarget", ")", "{", "super", ".", "init", "(", "field", ")", ";", "m_screenField", "=", "screenField", ";", "m_fldTarget", "=", "fldTarget", ";", ...
Constructor. This listener only responds to screen moves by default. @param field The field to change the focus to on change to this field. @param screenField The screen field to change the focus to on change to this field.
[ "Constructor", ".", "This", "listener", "only", "responds", "to", "screen", "moves", "by", "default", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/ChangeFocusOnChangeHandler.java#L68-L79
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/server/PmiRegistry.java
PmiRegistry.getStats
private static StatsImpl getStats(ModuleItem moduleItem, boolean recursive) { """ /* // Return a StatsImpl for server data // Take a boolean parameter for two modes: recursive and non-recursive private static StatsImpl getServer(boolean recursive) { // Note: there is no data under directly under server module...
java
private static StatsImpl getStats(ModuleItem moduleItem, boolean recursive) { // Note: cannot retrieve single data for JMX interface //int[] dataIds = msd.getDataIds(); if (moduleItem == null) { // not found return null; } return moduleItem.getStats(recursive); ...
[ "private", "static", "StatsImpl", "getStats", "(", "ModuleItem", "moduleItem", ",", "boolean", "recursive", ")", "{", "// Note: cannot retrieve single data for JMX interface", "//int[] dataIds = msd.getDataIds();", "if", "(", "moduleItem", "==", "null", ")", "{", "// not fo...
/* // Return a StatsImpl for server data // Take a boolean parameter for two modes: recursive and non-recursive private static StatsImpl getServer(boolean recursive) { // Note: there is no data under directly under server module tree root, // so return null if not recursive if(!recursive) return null; ModuleItem[] modI...
[ "/", "*", "//", "Return", "a", "StatsImpl", "for", "server", "data", "//", "Take", "a", "boolean", "parameter", "for", "two", "modes", ":", "recursive", "and", "non", "-", "recursive", "private", "static", "StatsImpl", "getServer", "(", "boolean", "recursive...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/server/PmiRegistry.java#L559-L578
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.isPropertyOfType
public static boolean isPropertyOfType(Class<?> clazz, String propertyName, Class<?> type) { """ Returns true if the specified property in the specified class is of the specified type @param clazz The class which contains the property @param propertyName The property name @param type The type to check @ret...
java
public static boolean isPropertyOfType(Class<?> clazz, String propertyName, Class<?> type) { try { Class<?> propType = getPropertyType(clazz, propertyName); return propType != null && propType.equals(type); } catch (Exception e) { return false; } }
[ "public", "static", "boolean", "isPropertyOfType", "(", "Class", "<", "?", ">", "clazz", ",", "String", "propertyName", ",", "Class", "<", "?", ">", "type", ")", "{", "try", "{", "Class", "<", "?", ">", "propType", "=", "getPropertyType", "(", "clazz", ...
Returns true if the specified property in the specified class is of the specified type @param clazz The class which contains the property @param propertyName The property name @param type The type to check @return A boolean value
[ "Returns", "true", "if", "the", "specified", "property", "in", "the", "specified", "class", "is", "of", "the", "specified", "type" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L201-L209
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/ImageHeaderReaderAbstract.java
ImageHeaderReaderAbstract.checkHeader
private static boolean checkHeader(InputStream input, int[] header) throws IOException { """ Check header data. @param input The input stream to check. @param header The expected header. @return <code>true</code> if right header, <code>false</code> else. @throws IOException If unable to read header. """ ...
java
private static boolean checkHeader(InputStream input, int[] header) throws IOException { for (final int b : header) { if (b != input.read()) { return false; } } return true; }
[ "private", "static", "boolean", "checkHeader", "(", "InputStream", "input", ",", "int", "[", "]", "header", ")", "throws", "IOException", "{", "for", "(", "final", "int", "b", ":", "header", ")", "{", "if", "(", "b", "!=", "input", ".", "read", "(", ...
Check header data. @param input The input stream to check. @param header The expected header. @return <code>true</code> if right header, <code>false</code> else. @throws IOException If unable to read header.
[ "Check", "header", "data", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/drawable/ImageHeaderReaderAbstract.java#L104-L114
javalite/activejdbc
javalite-common/src/main/java/org/javalite/common/Templator.java
Templator.mergeFromPath
public static String mergeFromPath(String templatePath, Map<String, ?> values) { """ This method is used in one-off operations, where it is OK to load a template every time. Example: <code> String result = Templator.mergeFromPath(readResource("/message_template.txt", valuesMap)); </code> @param templateP...
java
public static String mergeFromPath(String templatePath, Map<String, ?> values) { return mergeFromTemplate(readResource(templatePath), values); }
[ "public", "static", "String", "mergeFromPath", "(", "String", "templatePath", ",", "Map", "<", "String", ",", "?", ">", "values", ")", "{", "return", "mergeFromTemplate", "(", "readResource", "(", "templatePath", ")", ",", "values", ")", ";", "}" ]
This method is used in one-off operations, where it is OK to load a template every time. Example: <code> String result = Templator.mergeFromPath(readResource("/message_template.txt", valuesMap)); </code> @param templatePath template to merge @param values values to merge into a template @return result of merging
[ "This", "method", "is", "used", "in", "one", "-", "off", "operations", "where", "it", "is", "OK", "to", "load", "a", "template", "every", "time", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/javalite-common/src/main/java/org/javalite/common/Templator.java#L81-L83
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java
SparkUtils.writeObjectToFile
public static void writeObjectToFile(String path, Object toWrite, Configuration hadoopConfig) throws IOException { """ Write an object to HDFS (or local) using default Java object serialization @param path Path to write the object to @param toWrite Object to write @param hadoopConfig Hadoop configura...
java
public static void writeObjectToFile(String path, Object toWrite, Configuration hadoopConfig) throws IOException { FileSystem fileSystem = FileSystem.get(hadoopConfig); try (BufferedOutputStream bos = new BufferedOutputStream(fileSystem.create(new Path(path)))) { ObjectOutputStream oos = new...
[ "public", "static", "void", "writeObjectToFile", "(", "String", "path", ",", "Object", "toWrite", ",", "Configuration", "hadoopConfig", ")", "throws", "IOException", "{", "FileSystem", "fileSystem", "=", "FileSystem", ".", "get", "(", "hadoopConfig", ")", ";", "...
Write an object to HDFS (or local) using default Java object serialization @param path Path to write the object to @param toWrite Object to write @param hadoopConfig Hadoop configuration, for example from SparkContext.hadoopConfiguration()
[ "Write", "an", "object", "to", "HDFS", "(", "or", "local", ")", "using", "default", "Java", "object", "serialization" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java#L166-L172
craterdog/java-general-utilities
src/main/java/craterdog/utils/ByteUtils.java
ByteUtils.bytesToDouble
static public double bytesToDouble(byte[] buffer, int index) { """ This function converts the bytes in a byte array at the specified index to its corresponding double value. @param buffer The byte array containing the double. @param index The index for the first byte in the byte array. @return The correspond...
java
static public double bytesToDouble(byte[] buffer, int index) { double real; long bits = bytesToLong(buffer, index); real = Double.longBitsToDouble(bits); return real; }
[ "static", "public", "double", "bytesToDouble", "(", "byte", "[", "]", "buffer", ",", "int", "index", ")", "{", "double", "real", ";", "long", "bits", "=", "bytesToLong", "(", "buffer", ",", "index", ")", ";", "real", "=", "Double", ".", "longBitsToDouble...
This function converts the bytes in a byte array at the specified index to its corresponding double value. @param buffer The byte array containing the double. @param index The index for the first byte in the byte array. @return The corresponding double value.
[ "This", "function", "converts", "the", "bytes", "in", "a", "byte", "array", "at", "the", "specified", "index", "to", "its", "corresponding", "double", "value", "." ]
train
https://github.com/craterdog/java-general-utilities/blob/a3ff45eaa00c2b8ed5c53efe9fe5166065fc1f57/src/main/java/craterdog/utils/ByteUtils.java#L455-L460
ogaclejapan/SmartTabLayout
library/src/main/java/com/ogaclejapan/smarttablayout/SmartTabStrip.java
SmartTabStrip.setColorAlpha
private static int setColorAlpha(int color, byte alpha) { """ Set the alpha value of the {@code color} to be the given {@code alpha} value. """ return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); }
java
private static int setColorAlpha(int color, byte alpha) { return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); }
[ "private", "static", "int", "setColorAlpha", "(", "int", "color", ",", "byte", "alpha", ")", "{", "return", "Color", ".", "argb", "(", "alpha", ",", "Color", ".", "red", "(", "color", ")", ",", "Color", ".", "green", "(", "color", ")", ",", "Color", ...
Set the alpha value of the {@code color} to be the given {@code alpha} value.
[ "Set", "the", "alpha", "value", "of", "the", "{" ]
train
https://github.com/ogaclejapan/SmartTabLayout/blob/712e81a92f1e12a3c33dcbda03d813e0162e8589/library/src/main/java/com/ogaclejapan/smarttablayout/SmartTabStrip.java#L193-L195
pac4j/pac4j
pac4j-oauth/src/main/java/org/pac4j/oauth/config/OAuthConfiguration.java
OAuthConfiguration.buildService
public S buildService(final WebContext context, final IndirectClient client, final String state) { """ Build an OAuth service from the web context and with a state. @param context the web context @param client the client @param state a given state @return the OAuth service """ init(); fi...
java
public S buildService(final WebContext context, final IndirectClient client, final String state) { init(); final String finalCallbackUrl = client.computeFinalCallbackUrl(context); return getApi().createService(this.key, this.secret, finalCallbackUrl, this.scope, null, state, this.responseType,...
[ "public", "S", "buildService", "(", "final", "WebContext", "context", ",", "final", "IndirectClient", "client", ",", "final", "String", "state", ")", "{", "init", "(", ")", ";", "final", "String", "finalCallbackUrl", "=", "client", ".", "computeFinalCallbackUrl"...
Build an OAuth service from the web context and with a state. @param context the web context @param client the client @param state a given state @return the OAuth service
[ "Build", "an", "OAuth", "service", "from", "the", "web", "context", "and", "with", "a", "state", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-oauth/src/main/java/org/pac4j/oauth/config/OAuthConfiguration.java#L62-L69
drewnoakes/metadata-extractor
Source/com/drew/metadata/Age.java
Age.fromPanasonicString
@Nullable public static Age fromPanasonicString(@NotNull String s) { """ Parses an age object from the string format used by Panasonic cameras: <code>0031:07:15 00:00:00</code> @param s The String in format <code>0031:07:15 00:00:00</code>. @return The parsed Age object, or null if the value could not be ...
java
@Nullable public static Age fromPanasonicString(@NotNull String s) { if (s.length() != 19 || s.startsWith("9999:99:99")) return null; try { int years = Integer.parseInt(s.substring(0, 4)); int months = Integer.parseInt(s.substring(5, 7)); int days...
[ "@", "Nullable", "public", "static", "Age", "fromPanasonicString", "(", "@", "NotNull", "String", "s", ")", "{", "if", "(", "s", ".", "length", "(", ")", "!=", "19", "||", "s", ".", "startsWith", "(", "\"9999:99:99\"", ")", ")", "return", "null", ";", ...
Parses an age object from the string format used by Panasonic cameras: <code>0031:07:15 00:00:00</code> @param s The String in format <code>0031:07:15 00:00:00</code>. @return The parsed Age object, or null if the value could not be parsed
[ "Parses", "an", "age", "object", "from", "the", "string", "format", "used", "by", "Panasonic", "cameras", ":", "<code", ">", "0031", ":", "07", ":", "15", "00", ":", "00", ":", "00<", "/", "code", ">" ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/Age.java#L50-L70
Polidea/RxAndroidBle
rxandroidble/src/main/java/com/polidea/rxandroidble2/helpers/ValueInterpreter.java
ValueInterpreter.unsignedToSigned
private static int unsignedToSigned(int unsigned, int size) { """ Convert an unsigned integer value to a two's-complement encoded signed value. """ if ((unsigned & (1 << size - 1)) != 0) { unsigned = -1 * ((1 << size - 1) - (unsigned & ((1 << size - 1) - 1))); } return unsi...
java
private static int unsignedToSigned(int unsigned, int size) { if ((unsigned & (1 << size - 1)) != 0) { unsigned = -1 * ((1 << size - 1) - (unsigned & ((1 << size - 1) - 1))); } return unsigned; }
[ "private", "static", "int", "unsignedToSigned", "(", "int", "unsigned", ",", "int", "size", ")", "{", "if", "(", "(", "unsigned", "&", "(", "1", "<<", "size", "-", "1", ")", ")", "!=", "0", ")", "{", "unsigned", "=", "-", "1", "*", "(", "(", "1...
Convert an unsigned integer value to a two's-complement encoded signed value.
[ "Convert", "an", "unsigned", "integer", "value", "to", "a", "two", "s", "-", "complement", "encoded", "signed", "value", "." ]
train
https://github.com/Polidea/RxAndroidBle/blob/c6e4a9753c834d710e255306bb290e9244cdbc10/rxandroidble/src/main/java/com/polidea/rxandroidble2/helpers/ValueInterpreter.java#L228-L233
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/util/StringUtils.java
StringUtils.prependUri
public static String prependUri(String baseUri, String uri) { """ Prepends a partial uri and normalizes / characters. For example, if the base uri is "/foo/" and the uri is "/bar/", the output will be "/foo/bar/". Similarly if the base uri is "/foo" and the uri is "bar", the output will be "/foo/bar" @param...
java
public static String prependUri(String baseUri, String uri) { if (!uri.startsWith("/")) { uri = "/" + uri; } if (uri.length() == 1 && uri.charAt(0) == '/') { uri = ""; } uri = baseUri + uri; return uri.replaceAll("[\\/]{2,}", "/"); }
[ "public", "static", "String", "prependUri", "(", "String", "baseUri", ",", "String", "uri", ")", "{", "if", "(", "!", "uri", ".", "startsWith", "(", "\"/\"", ")", ")", "{", "uri", "=", "\"/\"", "+", "uri", ";", "}", "if", "(", "uri", ".", "length",...
Prepends a partial uri and normalizes / characters. For example, if the base uri is "/foo/" and the uri is "/bar/", the output will be "/foo/bar/". Similarly if the base uri is "/foo" and the uri is "bar", the output will be "/foo/bar" @param baseUri The uri to prepend. Eg. /foo @param uri The uri to combine with the ...
[ "Prepends", "a", "partial", "uri", "and", "normalizes", "/", "characters", ".", "For", "example", "if", "the", "base", "uri", "is", "/", "foo", "/", "and", "the", "uri", "is", "/", "bar", "/", "the", "output", "will", "be", "/", "foo", "/", "bar", ...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/util/StringUtils.java#L255-L264
aehrc/snorocket
snorocket-core/src/main/java/au/csiro/snorocket/core/axioms/GCI.java
GCI.rule6
boolean rule6(final IFactory factory, final Inclusion[] gcis) { """ B &#8849; &#8707;r.C' &rarr; {B &#8849; &#8707;r.A, A &#8849; C'} @param gcis @return """ boolean result = false; if (rhs instanceof Existential) { Existential existential = (Existential) rhs; ...
java
boolean rule6(final IFactory factory, final Inclusion[] gcis) { boolean result = false; if (rhs instanceof Existential) { Existential existential = (Existential) rhs; final AbstractConcept cHat = existential.getConcept(); if (!(cHat instanceof Concept)) { ...
[ "boolean", "rule6", "(", "final", "IFactory", "factory", ",", "final", "Inclusion", "[", "]", "gcis", ")", "{", "boolean", "result", "=", "false", ";", "if", "(", "rhs", "instanceof", "Existential", ")", "{", "Existential", "existential", "=", "(", "Existe...
B &#8849; &#8707;r.C' &rarr; {B &#8849; &#8707;r.A, A &#8849; C'} @param gcis @return
[ "B", "&#8849", ";", "&#8707", ";", "r", ".", "C", "&rarr", ";", "{", "B", "&#8849", ";", "&#8707", ";", "r", ".", "A", "A", "&#8849", ";", "C", "}" ]
train
https://github.com/aehrc/snorocket/blob/e33c1e216f8a66d6502e3a14e80876811feedd8b/snorocket-core/src/main/java/au/csiro/snorocket/core/axioms/GCI.java#L247-L263
baratine/baratine
core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java
InjectorImpl.addBinding
private <T> void addBinding(Class<T> type, BindingAmp<T> binding) { """ Adds a new injection producer to the discovered producer list. """ synchronized (_bindingSetMap) { BindingSet<T> set = (BindingSet) _bindingSetMap.get(type); if (set == null) { set = new BindingSet<>(type); ...
java
private <T> void addBinding(Class<T> type, BindingAmp<T> binding) { synchronized (_bindingSetMap) { BindingSet<T> set = (BindingSet) _bindingSetMap.get(type); if (set == null) { set = new BindingSet<>(type); _bindingSetMap.put(type, set); } set.addBinding(binding); } ...
[ "private", "<", "T", ">", "void", "addBinding", "(", "Class", "<", "T", ">", "type", ",", "BindingAmp", "<", "T", ">", "binding", ")", "{", "synchronized", "(", "_bindingSetMap", ")", "{", "BindingSet", "<", "T", ">", "set", "=", "(", "BindingSet", "...
Adds a new injection producer to the discovered producer list.
[ "Adds", "a", "new", "injection", "producer", "to", "the", "discovered", "producer", "list", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/inject/impl/InjectorImpl.java#L754-L766
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDateTime.java
LocalDateTime.ofEpochSecond
public static LocalDateTime ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset) { """ Obtains an instance of {@code LocalDateTime} using seconds from the epoch of 1970-01-01T00:00:00Z. <p> This allows the {@link ChronoField#INSTANT_SECONDS epoch-second} field to be converted to a local date-ti...
java
public static LocalDateTime ofEpochSecond(long epochSecond, int nanoOfSecond, ZoneOffset offset) { Objects.requireNonNull(offset, "offset"); NANO_OF_SECOND.checkValidValue(nanoOfSecond); long localSecond = epochSecond + offset.getTotalSeconds(); // overflow caught later long localEpochD...
[ "public", "static", "LocalDateTime", "ofEpochSecond", "(", "long", "epochSecond", ",", "int", "nanoOfSecond", ",", "ZoneOffset", "offset", ")", "{", "Objects", ".", "requireNonNull", "(", "offset", ",", "\"offset\"", ")", ";", "NANO_OF_SECOND", ".", "checkValidVal...
Obtains an instance of {@code LocalDateTime} using seconds from the epoch of 1970-01-01T00:00:00Z. <p> This allows the {@link ChronoField#INSTANT_SECONDS epoch-second} field to be converted to a local date-time. This is primarily intended for low-level conversions rather than general application usage. @param epochSec...
[ "Obtains", "an", "instance", "of", "{", "@code", "LocalDateTime", "}", "using", "seconds", "from", "the", "epoch", "of", "1970", "-", "01", "-", "01T00", ":", "00", ":", "00Z", ".", "<p", ">", "This", "allows", "the", "{", "@link", "ChronoField#INSTANT_S...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDateTime.java#L410-L419
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java
PAbstractObject.optFloat
@Override public final Float optFloat(final String key, final Float defaultValue) { """ Get a property as a float or Default value. @param key the property name @param defaultValue default value """ Float result = optFloat(key); return result == null ? defaultValue : result; }
java
@Override public final Float optFloat(final String key, final Float defaultValue) { Float result = optFloat(key); return result == null ? defaultValue : result; }
[ "@", "Override", "public", "final", "Float", "optFloat", "(", "final", "String", "key", ",", "final", "Float", "defaultValue", ")", "{", "Float", "result", "=", "optFloat", "(", "key", ")", ";", "return", "result", "==", "null", "?", "defaultValue", ":", ...
Get a property as a float or Default value. @param key the property name @param defaultValue default value
[ "Get", "a", "property", "as", "a", "float", "or", "Default", "value", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java#L143-L147
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java
EasterRule.computeInYear
private Date computeInYear(Date date, GregorianCalendar cal) { """ Compute the month and date on which this holiday falls in the year containing the date "date". First figure out which date Easter lands on in this year, and then add the offset for this holiday to get the right date. <p> The algorithm here is...
java
private Date computeInYear(Date date, GregorianCalendar cal) { if (cal == null) cal = calendar; synchronized(cal) { cal.setTime(date); int year = cal.get(Calendar.YEAR); int g = year % 19; // "Golden Number" of year - 1 int i = 0; // # of d...
[ "private", "Date", "computeInYear", "(", "Date", "date", ",", "GregorianCalendar", "cal", ")", "{", "if", "(", "cal", "==", "null", ")", "cal", "=", "calendar", ";", "synchronized", "(", "cal", ")", "{", "cal", ".", "setTime", "(", "date", ")", ";", ...
Compute the month and date on which this holiday falls in the year containing the date "date". First figure out which date Easter lands on in this year, and then add the offset for this holiday to get the right date. <p> The algorithm here is taken from the <a href="http://www.faqs.org/faqs/calendars/faq/">Calendar FA...
[ "Compute", "the", "month", "and", "date", "on", "which", "this", "holiday", "falls", "in", "the", "year", "containing", "the", "date", "date", ".", "First", "figure", "out", "which", "date", "Easter", "lands", "on", "in", "this", "year", "and", "then", "...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java#L235-L275
amplexus/java-flac-encoder
src/main/java/net/sourceforge/javaflacencoder/FLAC_ConsoleFileEncoder.java
FLAC_ConsoleFileEncoder.getInt
int getInt(String[] args, int index) { """ Utility function to parse a positive integer argument out of a String array at the given index. @param args String array containing element to find. @param index Index of array element to parse integer from. @return Integer parsed, or -1 if error. """ int resu...
java
int getInt(String[] args, int index) { int result = -1; if(index >= 0 && index < args.length) { try { result = Integer.parseInt(args[index]); }catch(NumberFormatException e) { result = -1; } } return result; }
[ "int", "getInt", "(", "String", "[", "]", "args", ",", "int", "index", ")", "{", "int", "result", "=", "-", "1", ";", "if", "(", "index", ">=", "0", "&&", "index", "<", "args", ".", "length", ")", "{", "try", "{", "result", "=", "Integer", ".",...
Utility function to parse a positive integer argument out of a String array at the given index. @param args String array containing element to find. @param index Index of array element to parse integer from. @return Integer parsed, or -1 if error.
[ "Utility", "function", "to", "parse", "a", "positive", "integer", "argument", "out", "of", "a", "String", "array", "at", "the", "given", "index", "." ]
train
https://github.com/amplexus/java-flac-encoder/blob/3d536b877dee2a3fd4ab2e0d9569e292cae93bc9/src/main/java/net/sourceforge/javaflacencoder/FLAC_ConsoleFileEncoder.java#L328-L338
tango-controls/JTango
dao/src/main/java/fr/esrf/TangoDs/Logging.java
Logging.init
public static Logging init(String ds_name, int trace_level, Database db) { """ Create and get the singleton object reference. <p> This method returns a reference to the object of the Logging class. If the class singleton object has not been created, it will be instanciated @param ds_name The device server e...
java
public static Logging init(String ds_name, int trace_level, Database db) { if (_instance == null) { _instance = new Logging(ds_name, trace_level, db); } return _instance; }
[ "public", "static", "Logging", "init", "(", "String", "ds_name", ",", "int", "trace_level", ",", "Database", "db", ")", "{", "if", "(", "_instance", "==", "null", ")", "{", "_instance", "=", "new", "Logging", "(", "ds_name", ",", "trace_level", ",", "db"...
Create and get the singleton object reference. <p> This method returns a reference to the object of the Logging class. If the class singleton object has not been created, it will be instanciated @param ds_name The device server executable name @param db The database object @return The Logging object reference
[ "Create", "and", "get", "the", "singleton", "object", "reference", ".", "<p", ">", "This", "method", "returns", "a", "reference", "to", "the", "object", "of", "the", "Logging", "class", ".", "If", "the", "class", "singleton", "object", "has", "not", "been"...
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/dao/src/main/java/fr/esrf/TangoDs/Logging.java#L236-L241
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java
MetadataFinder.getFullTrackList
List<Message> getFullTrackList(final CdjStatus.TrackSourceSlot slot, final Client client, final int sortOrder) throws IOException, InterruptedException, TimeoutException { """ Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already been set up. ...
java
List<Message> getFullTrackList(final CdjStatus.TrackSourceSlot slot, final Client client, final int sortOrder) throws IOException, InterruptedException, TimeoutException { // Send the metadata menu request if (client.tryLockingForMenuOperations(MENU_TIMEOUT, TimeUnit.SECONDS)) { ...
[ "List", "<", "Message", ">", "getFullTrackList", "(", "final", "CdjStatus", ".", "TrackSourceSlot", "slot", ",", "final", "Client", "client", ",", "final", "int", "sortOrder", ")", "throws", "IOException", ",", "InterruptedException", ",", "TimeoutException", "{",...
Request the list of all tracks in the specified slot, given a dbserver connection to a player that has already been set up. @param slot identifies the media slot we are querying @param client the dbserver client that is communicating with the appropriate player @return the retrieved track list entry items @throws IO...
[ "Request", "the", "list", "of", "all", "tracks", "in", "the", "specified", "slot", "given", "a", "dbserver", "connection", "to", "a", "player", "that", "has", "already", "been", "set", "up", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java#L212-L233
lookfirst/WePay-Java-SDK
src/main/java/com/lookfirst/wepay/WePayApi.java
WePayApi.execute
public <T> T execute(String token, WePayRequest<T> req) throws IOException, WePayException { """ Make API calls against authenticated user. Turn up logging to trace level to see the request / response. """ String uri = currentUrl + req.getEndpoint(); String postJson = MAPPER.writeValueAsString(req); ...
java
public <T> T execute(String token, WePayRequest<T> req) throws IOException, WePayException { String uri = currentUrl + req.getEndpoint(); String postJson = MAPPER.writeValueAsString(req); if (log.isTraceEnabled()) { log.trace("request to {}: {}", uri, postJson); } // Use the data provider to get an in...
[ "public", "<", "T", ">", "T", "execute", "(", "String", "token", ",", "WePayRequest", "<", "T", ">", "req", ")", "throws", "IOException", ",", "WePayException", "{", "String", "uri", "=", "currentUrl", "+", "req", ".", "getEndpoint", "(", ")", ";", "St...
Make API calls against authenticated user. Turn up logging to trace level to see the request / response.
[ "Make", "API", "calls", "against", "authenticated", "user", ".", "Turn", "up", "logging", "to", "trace", "level", "to", "see", "the", "request", "/", "response", "." ]
train
https://github.com/lookfirst/WePay-Java-SDK/blob/3c0a47d6fa051d531c8fdbbfd54a0ef2891aa8f0/src/main/java/com/lookfirst/wepay/WePayApi.java#L214-L247
Azure/azure-sdk-for-java
resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java
ResourcesInner.moveResources
public void moveResources(String sourceResourceGroupName, ResourcesMoveInfo parameters) { """ Moves resources from one resource group to another resource group. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, bot...
java
public void moveResources(String sourceResourceGroupName, ResourcesMoveInfo parameters) { moveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).toBlocking().last().body(); }
[ "public", "void", "moveResources", "(", "String", "sourceResourceGroupName", ",", "ResourcesMoveInfo", "parameters", ")", "{", "moveResourcesWithServiceResponseAsync", "(", "sourceResourceGroupName", ",", "parameters", ")", ".", "toBlocking", "(", ")", ".", "last", "(",...
Moves resources from one resource group to another resource group. The resources to move must be in the same source resource group. The target resource group may be in a different subscription. When moving resources, both the source group and the target group are locked for the duration of the operation. Write and dele...
[ "Moves", "resources", "from", "one", "resource", "group", "to", "another", "resource", "group", ".", "The", "resources", "to", "move", "must", "be", "in", "the", "same", "source", "resource", "group", ".", "The", "target", "resource", "group", "may", "be", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L418-L420
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/SourceStreamManager.java
SourceStreamManager.restoreMessage
public void restoreMessage(SIMPMessage msgItem, boolean commit) throws SIResourceException { """ Put a message back into the appropriate source stream. This will create a stream if one does not exist but will not change any fields in the message @param msgItem The message to be restored @param commit Boolean...
java
public void restoreMessage(SIMPMessage msgItem, boolean commit) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "restoreMessage", new Object[] { msgItem }); int priority = msgItem.getPriority(); Reliability reliability = msgItem.getR...
[ "public", "void", "restoreMessage", "(", "SIMPMessage", "msgItem", ",", "boolean", "commit", ")", "throws", "SIResourceException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ...
Put a message back into the appropriate source stream. This will create a stream if one does not exist but will not change any fields in the message @param msgItem The message to be restored @param commit Boolean indicating whether message to be restored is in commit state
[ "Put", "a", "message", "back", "into", "the", "appropriate", "source", "stream", ".", "This", "will", "create", "a", "stream", "if", "one", "does", "not", "exist", "but", "will", "not", "change", "any", "fields", "in", "the", "message" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/SourceStreamManager.java#L431-L467
eyp/serfj
src/main/java/net/sf/serfj/ServletHelper.java
ServletHelper.inheritedStrategy
private Object inheritedStrategy(UrlInfo urlInfo, ResponseHelper responseHelper) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { """ Invokes URL's action using INHERIT strategy. It means that controller inherits from {@link...
java
private Object inheritedStrategy(UrlInfo urlInfo, ResponseHelper responseHelper) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { Class<?> clazz = Class.forName(urlInfo.getController()); Method setResponseHelper = clazz.getMet...
[ "private", "Object", "inheritedStrategy", "(", "UrlInfo", "urlInfo", ",", "ResponseHelper", "responseHelper", ")", "throws", "ClassNotFoundException", ",", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", ",", "InstantiationException", ...
Invokes URL's action using INHERIT strategy. It means that controller inherits from {@link RestController}, so the framework will inject {@link ResponseHelper} to controller by RestAction.setResposeHelper method. Furthermore, controller's actions signatures don't have arguments. @param urlInfo Information of REST's U...
[ "Invokes", "URL", "s", "action", "using", "INHERIT", "strategy", ".", "It", "means", "that", "controller", "inherits", "from", "{", "@link", "RestController", "}", "so", "the", "framework", "will", "inject", "{", "@link", "ResponseHelper", "}", "to", "controll...
train
https://github.com/eyp/serfj/blob/e617592af6f24e59ea58443f2785c44aa2312189/src/main/java/net/sf/serfj/ServletHelper.java#L170-L182
undertow-io/undertow
core/src/main/java/io/undertow/server/handlers/proxy/ProxyHandler.java
ProxyHandler.addRequestHeader
@Deprecated public ProxyHandler addRequestHeader(final HttpString header, final String attribute, final ClassLoader classLoader) { """ Adds a request header to the outgoing request. If the header resolves to null or an empty string it will not be added, however any existing header with the same name will be r...
java
@Deprecated public ProxyHandler addRequestHeader(final HttpString header, final String attribute, final ClassLoader classLoader) { requestHeaders.put(header, ExchangeAttributes.parser(classLoader).parse(attribute)); return this; }
[ "@", "Deprecated", "public", "ProxyHandler", "addRequestHeader", "(", "final", "HttpString", "header", ",", "final", "String", "attribute", ",", "final", "ClassLoader", "classLoader", ")", "{", "requestHeaders", ".", "put", "(", "header", ",", "ExchangeAttributes", ...
Adds a request header to the outgoing request. If the header resolves to null or an empty string it will not be added, however any existing header with the same name will be removed. <p> The attribute value will be parsed, and the resulting exchange attribute will be used to create the actual header value. @param head...
[ "Adds", "a", "request", "header", "to", "the", "outgoing", "request", ".", "If", "the", "header", "resolves", "to", "null", "or", "an", "empty", "string", "it", "will", "not", "be", "added", "however", "any", "existing", "header", "with", "the", "same", ...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/server/handlers/proxy/ProxyHandler.java#L254-L258
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/model/spi/Association.java
Association.getOperations
public List<AssociationOperation> getOperations() { """ Return the list of actions on the tuple. Operations are inherently deduplicated, i.e. there will be at most one operation for a specific row key. <p> Note that the global CLEAR operation is put at the top of the list. @return the operations to execute o...
java
public List<AssociationOperation> getOperations() { List<AssociationOperation> result = new ArrayList<AssociationOperation>( currentState.size() + 1 ); if ( cleared ) { result.add( new AssociationOperation( null, null, AssociationOperationType.CLEAR ) ); } result.addAll( currentState.values() ); return res...
[ "public", "List", "<", "AssociationOperation", ">", "getOperations", "(", ")", "{", "List", "<", "AssociationOperation", ">", "result", "=", "new", "ArrayList", "<", "AssociationOperation", ">", "(", "currentState", ".", "size", "(", ")", "+", "1", ")", ";",...
Return the list of actions on the tuple. Operations are inherently deduplicated, i.e. there will be at most one operation for a specific row key. <p> Note that the global CLEAR operation is put at the top of the list. @return the operations to execute on the association, the global CLEAR operation is put at the top of...
[ "Return", "the", "list", "of", "actions", "on", "the", "tuple", ".", "Operations", "are", "inherently", "deduplicated", "i", ".", "e", ".", "there", "will", "be", "at", "most", "one", "operation", "for", "a", "specific", "row", "key", ".", "<p", ">", "...
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/model/spi/Association.java#L108-L115
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/SegmentResponse.java
SegmentResponse.withTags
public SegmentResponse withTags(java.util.Map<String, String> tags) { """ The Tags for the segment. @param tags The Tags for the segment. @return Returns a reference to this object so that method calls can be chained together. """ setTags(tags); return this; }
java
public SegmentResponse withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "SegmentResponse", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
The Tags for the segment. @param tags The Tags for the segment. @return Returns a reference to this object so that method calls can be chained together.
[ "The", "Tags", "for", "the", "segment", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/SegmentResponse.java#L507-L510
JodaOrg/joda-time
src/main/java/org/joda/time/convert/ReadableIntervalConverter.java
ReadableIntervalConverter.setInto
public void setInto(ReadWritablePeriod writablePeriod, Object object, Chronology chrono) { """ Sets the values of the mutable duration from the specified interval. @param writablePeriod the period to modify @param object the interval to set from @param chrono the chronology to use """ ReadableI...
java
public void setInto(ReadWritablePeriod writablePeriod, Object object, Chronology chrono) { ReadableInterval interval = (ReadableInterval) object; chrono = (chrono != null ? chrono : DateTimeUtils.getIntervalChronology(interval)); long start = interval.getStartMillis(); long end = interva...
[ "public", "void", "setInto", "(", "ReadWritablePeriod", "writablePeriod", ",", "Object", "object", ",", "Chronology", "chrono", ")", "{", "ReadableInterval", "interval", "=", "(", "ReadableInterval", ")", "object", ";", "chrono", "=", "(", "chrono", "!=", "null"...
Sets the values of the mutable duration from the specified interval. @param writablePeriod the period to modify @param object the interval to set from @param chrono the chronology to use
[ "Sets", "the", "values", "of", "the", "mutable", "duration", "from", "the", "specified", "interval", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/convert/ReadableIntervalConverter.java#L63-L72
phax/ph-css
ph-css/src/main/java/com/helger/css/decl/CascadingStyleSheet.java
CascadingStyleSheet.addImportRule
@Nonnull public CascadingStyleSheet addImportRule (@Nonnegative final int nIndex, @Nonnull final CSSImportRule aImportRule) { """ Add a new <code>@import</code> rule at a specified index of the <code>@import</code> rule list. @param nIndex The index where the rule should be added. Must be &ge; 0. @param aI...
java
@Nonnull public CascadingStyleSheet addImportRule (@Nonnegative final int nIndex, @Nonnull final CSSImportRule aImportRule) { ValueEnforcer.isGE0 (nIndex, "Index"); ValueEnforcer.notNull (aImportRule, "ImportRule"); if (nIndex >= getImportRuleCount ()) m_aImportRules.add (aImportRule); else ...
[ "@", "Nonnull", "public", "CascadingStyleSheet", "addImportRule", "(", "@", "Nonnegative", "final", "int", "nIndex", ",", "@", "Nonnull", "final", "CSSImportRule", "aImportRule", ")", "{", "ValueEnforcer", ".", "isGE0", "(", "nIndex", ",", "\"Index\"", ")", ";",...
Add a new <code>@import</code> rule at a specified index of the <code>@import</code> rule list. @param nIndex The index where the rule should be added. Must be &ge; 0. @param aImportRule The import rule to add. May not be <code>null</code>. @return this @throws ArrayIndexOutOfBoundsException if the index is invalid
[ "Add", "a", "new", "<code", ">", "@import<", "/", "code", ">", "rule", "at", "a", "specified", "index", "of", "the", "<code", ">", "@import<", "/", "code", ">", "rule", "list", "." ]
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/decl/CascadingStyleSheet.java#L114-L125
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/WebSiteManagementClientImpl.java
WebSiteManagementClientImpl.validateAsync
public Observable<ValidateResponseInner> validateAsync(String resourceGroupName, ValidateRequest validateRequest) { """ Validate if a resource can be created. Validate if a resource can be created. @param resourceGroupName Name of the resource group to which the resource belongs. @param validateRequest Reques...
java
public Observable<ValidateResponseInner> validateAsync(String resourceGroupName, ValidateRequest validateRequest) { return validateWithServiceResponseAsync(resourceGroupName, validateRequest).map(new Func1<ServiceResponse<ValidateResponseInner>, ValidateResponseInner>() { @Override publi...
[ "public", "Observable", "<", "ValidateResponseInner", ">", "validateAsync", "(", "String", "resourceGroupName", ",", "ValidateRequest", "validateRequest", ")", "{", "return", "validateWithServiceResponseAsync", "(", "resourceGroupName", ",", "validateRequest", ")", ".", "...
Validate if a resource can be created. Validate if a resource can be created. @param resourceGroupName Name of the resource group to which the resource belongs. @param validateRequest Request with the resources to validate. @throws IllegalArgumentException thrown if parameters fail the validation @return the observabl...
[ "Validate", "if", "a", "resource", "can", "be", "created", ".", "Validate", "if", "a", "resource", "can", "be", "created", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/WebSiteManagementClientImpl.java#L2267-L2274
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java
WebSocketClientHandshaker.close
public ChannelFuture close(Channel channel, CloseWebSocketFrame frame) { """ Performs the closing handshake @param channel Channel @param frame Closing Frame that was received """ if (channel == null) { throw new NullPointerException("channel"); } return close(channel,...
java
public ChannelFuture close(Channel channel, CloseWebSocketFrame frame) { if (channel == null) { throw new NullPointerException("channel"); } return close(channel, frame, channel.newPromise()); }
[ "public", "ChannelFuture", "close", "(", "Channel", "channel", ",", "CloseWebSocketFrame", "frame", ")", "{", "if", "(", "channel", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"channel\"", ")", ";", "}", "return", "close", "(", "ch...
Performs the closing handshake @param channel Channel @param frame Closing Frame that was received
[ "Performs", "the", "closing", "handshake" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java#L473-L478
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/core/DefaultQueryParser.java
DefaultQueryParser.doConstructSolrQuery
@Override public final SolrQuery doConstructSolrQuery(SolrDataQuery query, @Nullable Class<?> domainType) { """ Convert given Query into a SolrQuery executable via {@link org.apache.solr.client.solrj.SolrClient} @param query the source query to turn into a {@link SolrQuery}. @param domainType can be {@literal...
java
@Override public final SolrQuery doConstructSolrQuery(SolrDataQuery query, @Nullable Class<?> domainType) { Assert.notNull(query, "Cannot construct solrQuery from null value."); Assert.notNull(query.getCriteria(), "Query has to have a criteria."); SolrQuery solrQuery = new SolrQuery(); solrQuery.setParam(Com...
[ "@", "Override", "public", "final", "SolrQuery", "doConstructSolrQuery", "(", "SolrDataQuery", "query", ",", "@", "Nullable", "Class", "<", "?", ">", "domainType", ")", "{", "Assert", ".", "notNull", "(", "query", ",", "\"Cannot construct solrQuery from null value.\...
Convert given Query into a SolrQuery executable via {@link org.apache.solr.client.solrj.SolrClient} @param query the source query to turn into a {@link SolrQuery}. @param domainType can be {@literal null}. @return
[ "Convert", "given", "Query", "into", "a", "SolrQuery", "executable", "via", "{", "@link", "org", ".", "apache", ".", "solr", ".", "client", ".", "solrj", ".", "SolrClient", "}" ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/core/DefaultQueryParser.java#L89-L111
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-core/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/executor/CommandExecutorSelector.java
CommandExecutorSelector.getExecutor
public static ExecutorService getExecutor(final boolean isOccupyThreadForPerConnection, final TransactionType transactionType, final ChannelId channelId) { """ Get executor service. @param isOccupyThreadForPerConnection is occupy thread for per connection or not @param transactionType transaction type @param ...
java
public static ExecutorService getExecutor(final boolean isOccupyThreadForPerConnection, final TransactionType transactionType, final ChannelId channelId) { return (isOccupyThreadForPerConnection || TransactionType.XA == transactionType || TransactionType.BASE == transactionType) ? ChannelThreadExecu...
[ "public", "static", "ExecutorService", "getExecutor", "(", "final", "boolean", "isOccupyThreadForPerConnection", ",", "final", "TransactionType", "transactionType", ",", "final", "ChannelId", "channelId", ")", "{", "return", "(", "isOccupyThreadForPerConnection", "||", "T...
Get executor service. @param isOccupyThreadForPerConnection is occupy thread for per connection or not @param transactionType transaction type @param channelId channel ID @return executor service
[ "Get", "executor", "service", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-core/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/executor/CommandExecutorSelector.java#L43-L46
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildSerialUIDInfo
public void buildSerialUIDInfo(XMLNode node, Content classTree) { """ Build the serial UID information for the given class. @param node the XML element that specifies which components to document @param classTree content tree to which the serial UID information will be added """ Content serialUidTr...
java
public void buildSerialUIDInfo(XMLNode node, Content classTree) { Content serialUidTree = writer.getSerialUIDInfoHeader(); FieldDoc[] fields = currentClass.fields(false); for (int i = 0; i < fields.length; i++) { if (fields[i].name().equals("serialVersionUID") && fiel...
[ "public", "void", "buildSerialUIDInfo", "(", "XMLNode", "node", ",", "Content", "classTree", ")", "{", "Content", "serialUidTree", "=", "writer", ".", "getSerialUIDInfoHeader", "(", ")", ";", "FieldDoc", "[", "]", "fields", "=", "currentClass", ".", "fields", ...
Build the serial UID information for the given class. @param node the XML element that specifies which components to document @param classTree content tree to which the serial UID information will be added
[ "Build", "the", "serial", "UID", "information", "for", "the", "given", "class", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java#L240-L252
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/MonitoredObject.java
MonitoredObject.addObj
@javax.annotation.Nonnull public com.simiacryptus.util.MonitoredObject addObj(final String key, final MonitoredItem item) { """ Add obj monitored object. @param key the key @param item the item @return the monitored object """ items.put(key, item); return this; }
java
@javax.annotation.Nonnull public com.simiacryptus.util.MonitoredObject addObj(final String key, final MonitoredItem item) { items.put(key, item); return this; }
[ "@", "javax", ".", "annotation", ".", "Nonnull", "public", "com", ".", "simiacryptus", ".", "util", ".", "MonitoredObject", "addObj", "(", "final", "String", "key", ",", "final", "MonitoredItem", "item", ")", "{", "items", ".", "put", "(", "key", ",", "i...
Add obj monitored object. @param key the key @param item the item @return the monitored object
[ "Add", "obj", "monitored", "object", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/MonitoredObject.java#L67-L71
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableController.java
AbstractConfigurableController.applyConfigUpdate
@Override public CONFIG applyConfigUpdate(final CONFIG config) throws CouldNotPerformException, InterruptedException { """ Apply an update to the configuration of this controller. @param config the updated configuration @return the updated configuration @throws CouldNotPerformException if the update c...
java
@Override public CONFIG applyConfigUpdate(final CONFIG config) throws CouldNotPerformException, InterruptedException { try { boolean scopeChanged; try(final CloseableWriteLockWrapper ignored = getManageWriteLock(this)) { this.config = config; if (supp...
[ "@", "Override", "public", "CONFIG", "applyConfigUpdate", "(", "final", "CONFIG", "config", ")", "throws", "CouldNotPerformException", ",", "InterruptedException", "{", "try", "{", "boolean", "scopeChanged", ";", "try", "(", "final", "CloseableWriteLockWrapper", "igno...
Apply an update to the configuration of this controller. @param config the updated configuration @return the updated configuration @throws CouldNotPerformException if the update could not be performed @throws InterruptedException if the update has been interrupted
[ "Apply", "an", "update", "to", "the", "configuration", "of", "this", "controller", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractConfigurableController.java#L92-L125
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbAccount.java
TmdbAccount.getGuestRatedMovies
public ResultList<MovieBasic> getGuestRatedMovies(String guestSessionId, String language, Integer page, SortBy sortBy) throws MovieDbException { """ Get a list of rated movies for a specific guest session id. @param guestSessionId @param language @param page @param sortBy only CREATED_AT_ASC or CREATED_AT_DE...
java
public ResultList<MovieBasic> getGuestRatedMovies(String guestSessionId, String language, Integer page, SortBy sortBy) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, guestSessionId); parameters.add(Param.LANGUAGE, language); parameter...
[ "public", "ResultList", "<", "MovieBasic", ">", "getGuestRatedMovies", "(", "String", "guestSessionId", ",", "String", "language", ",", "Integer", "page", ",", "SortBy", "sortBy", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", ...
Get a list of rated movies for a specific guest session id. @param guestSessionId @param language @param page @param sortBy only CREATED_AT_ASC or CREATED_AT_DESC is supported @return @throws MovieDbException
[ "Get", "a", "list", "of", "rated", "movies", "for", "a", "specific", "guest", "session", "id", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbAccount.java#L306-L325
highsource/jaxb2-basics
tools/src/main/java/org/jvnet/jaxb2_commons/plugin/AbstractParameterizablePlugin.java
AbstractParameterizablePlugin.parseArgument
public int parseArgument(Options opt, String[] args, int start) throws BadCommandLineException, IOException { """ Parses the arguments and injects values into the beans via properties. """ int consumed = 0; final String optionPrefix = "-" + getOptionName() + "-"; final int optionPrefixLength = option...
java
public int parseArgument(Options opt, String[] args, int start) throws BadCommandLineException, IOException { int consumed = 0; final String optionPrefix = "-" + getOptionName() + "-"; final int optionPrefixLength = optionPrefix.length(); final String arg = args[start]; final int equalsPosition = arg.ind...
[ "public", "int", "parseArgument", "(", "Options", "opt", ",", "String", "[", "]", "args", ",", "int", "start", ")", "throws", "BadCommandLineException", ",", "IOException", "{", "int", "consumed", "=", "0", ";", "final", "String", "optionPrefix", "=", "\"-\"...
Parses the arguments and injects values into the beans via properties.
[ "Parses", "the", "arguments", "and", "injects", "values", "into", "the", "beans", "via", "properties", "." ]
train
https://github.com/highsource/jaxb2-basics/blob/571cca0ce58a75d984324d33d8af453bf5862e75/tools/src/main/java/org/jvnet/jaxb2_commons/plugin/AbstractParameterizablePlugin.java#L29-L54
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java
ULocale.getDisplayNameWithDialect
public static String getDisplayNameWithDialect(String localeID, String displayLocaleID) { """ <strong>[icu]</strong> Returns the locale ID localized for display in the provided locale. If a dialect name is present in the locale data, then it is returned. This is a cover for the ICU4C API. @param localeID the lo...
java
public static String getDisplayNameWithDialect(String localeID, String displayLocaleID) { return getDisplayNameWithDialectInternal(new ULocale(localeID), new ULocale(displayLocaleID)); }
[ "public", "static", "String", "getDisplayNameWithDialect", "(", "String", "localeID", ",", "String", "displayLocaleID", ")", "{", "return", "getDisplayNameWithDialectInternal", "(", "new", "ULocale", "(", "localeID", ")", ",", "new", "ULocale", "(", "displayLocaleID",...
<strong>[icu]</strong> Returns the locale ID localized for display in the provided locale. If a dialect name is present in the locale data, then it is returned. This is a cover for the ICU4C API. @param localeID the locale whose name is to be displayed. @param displayLocaleID the id of the locale in which to display th...
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Returns", "the", "locale", "ID", "localized", "for", "display", "in", "the", "provided", "locale", ".", "If", "a", "dialect", "name", "is", "present", "in", "the", "locale", "data", "then", "it...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L1825-L1828
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.getDateLastVisitedBy
public long getDateLastVisitedBy(CmsRequestContext context, String poolName, CmsUser user, CmsResource resource) throws CmsException { """ Returns the date when the resource was last visited by the user.<p> @param context the request context @param poolName the name of the database pool to use @param user...
java
public long getDateLastVisitedBy(CmsRequestContext context, String poolName, CmsUser user, CmsResource resource) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); long result = 0; try { result = m_driverManager.getDateLastVisitedBy(dbc, poolName,...
[ "public", "long", "getDateLastVisitedBy", "(", "CmsRequestContext", "context", ",", "String", "poolName", ",", "CmsUser", "user", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext",...
Returns the date when the resource was last visited by the user.<p> @param context the request context @param poolName the name of the database pool to use @param user the user to check the date @param resource the resource to check the date @return the date when the resource was last visited by the user @throws Cms...
[ "Returns", "the", "date", "when", "the", "resource", "was", "last", "visited", "by", "the", "user", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L2136-L2155
mozilla/rhino
src/org/mozilla/javascript/NativeArray.java
NativeArray.getRawElem
private static Object getRawElem(Scriptable target, long index) { """ same as getElem, but without converting NOT_FOUND to undefined """ if (index > Integer.MAX_VALUE) { return ScriptableObject.getProperty(target, Long.toString(index)); } return ScriptableObject.getProperty(...
java
private static Object getRawElem(Scriptable target, long index) { if (index > Integer.MAX_VALUE) { return ScriptableObject.getProperty(target, Long.toString(index)); } return ScriptableObject.getProperty(target, (int)index); }
[ "private", "static", "Object", "getRawElem", "(", "Scriptable", "target", ",", "long", "index", ")", "{", "if", "(", "index", ">", "Integer", ".", "MAX_VALUE", ")", "{", "return", "ScriptableObject", ".", "getProperty", "(", "target", ",", "Long", ".", "to...
same as getElem, but without converting NOT_FOUND to undefined
[ "same", "as", "getElem", "but", "without", "converting", "NOT_FOUND", "to", "undefined" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/NativeArray.java#L793-L798
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ReceiveMessageBuilder.java
ReceiveMessageBuilder.extractFromHeader
public T extractFromHeader(String headerName, String variable) { """ Extract message header entry as variable. @param headerName @param variable @return """ if (headerExtractor == null) { headerExtractor = new MessageHeaderVariableExtractor(); getAction().getVariableExtracto...
java
public T extractFromHeader(String headerName, String variable) { if (headerExtractor == null) { headerExtractor = new MessageHeaderVariableExtractor(); getAction().getVariableExtractors().add(headerExtractor); } headerExtractor.getHeaderMappings().put(headerName...
[ "public", "T", "extractFromHeader", "(", "String", "headerName", ",", "String", "variable", ")", "{", "if", "(", "headerExtractor", "==", "null", ")", "{", "headerExtractor", "=", "new", "MessageHeaderVariableExtractor", "(", ")", ";", "getAction", "(", ")", "...
Extract message header entry as variable. @param headerName @param variable @return
[ "Extract", "message", "header", "entry", "as", "variable", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ReceiveMessageBuilder.java#L778-L787
cdk/cdk
legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java
GeometryTools.getBestAlignmentForLabel
public static int getBestAlignmentForLabel(IAtomContainer container, IAtom atom) { """ Determines the best alignment for the label of an atom in 2D space. It returns 1 if left aligned, and -1 if right aligned. See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for det...
java
public static int getBestAlignmentForLabel(IAtomContainer container, IAtom atom) { double overallDiffX = 0; for (IAtom connectedAtom : container.getConnectedAtomsList(atom)) { overallDiffX += connectedAtom.getPoint2d().x - atom.getPoint2d().x; } if (overallDiffX <= 0) { ...
[ "public", "static", "int", "getBestAlignmentForLabel", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ")", "{", "double", "overallDiffX", "=", "0", ";", "for", "(", "IAtom", "connectedAtom", ":", "container", ".", "getConnectedAtomsList", "(", "atom", ...
Determines the best alignment for the label of an atom in 2D space. It returns 1 if left aligned, and -1 if right aligned. See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets @param container Description of the Parameter @param atom De...
[ "Determines", "the", "best", "alignment", "for", "the", "label", "of", "an", "atom", "in", "2D", "space", ".", "It", "returns", "1", "if", "left", "aligned", "and", "-", "1", "if", "right", "aligned", ".", "See", "comment", "for", "center", "(", "IAtom...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java#L1196-L1206
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java
WorkflowsInner.listAsync
public Observable<Page<WorkflowInner>> listAsync(final Integer top, final String filter) { """ Gets a list of workflows by subscription. @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: State, Trigger, and ReferencedRe...
java
public Observable<Page<WorkflowInner>> listAsync(final Integer top, final String filter) { return listWithServiceResponseAsync(top, filter) .map(new Func1<ServiceResponse<Page<WorkflowInner>>, Page<WorkflowInner>>() { @Override public Page<WorkflowInner> call(ServiceR...
[ "public", "Observable", "<", "Page", "<", "WorkflowInner", ">", ">", "listAsync", "(", "final", "Integer", "top", ",", "final", "String", "filter", ")", "{", "return", "listWithServiceResponseAsync", "(", "top", ",", "filter", ")", ".", "map", "(", "new", ...
Gets a list of workflows by subscription. @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: State, Trigger, and ReferencedResourceId. @throws IllegalArgumentException thrown if parameters fail the validation @return the observa...
[ "Gets", "a", "list", "of", "workflows", "by", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java#L294-L302
strator-dev/greenpepper
greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/runner/XmlRpcRemoteRunner.java
XmlRpcRemoteRunner.runReference
public Reference runReference(String projectName, String sutName, String requirementRepositoryId, String requirementName, String repositoryId, String specificationName, String locale) throws GreenPepperServerException { """ <p>runReference.</p> @param projectName a {@link java.lang.String} object. ...
java
public Reference runReference(String projectName, String sutName, String requirementRepositoryId, String requirementName, String repositoryId, String specificationName, String locale) throws GreenPepperServerException { SystemUnderTest sut = SystemUnderTest.newInstance(sutName); sut.setProject(Project...
[ "public", "Reference", "runReference", "(", "String", "projectName", ",", "String", "sutName", ",", "String", "requirementRepositoryId", ",", "String", "requirementName", ",", "String", "repositoryId", ",", "String", "specificationName", ",", "String", "locale", ")", ...
<p>runReference.</p> @param projectName a {@link java.lang.String} object. @param sutName a {@link java.lang.String} object. @param requirementRepositoryId a {@link java.lang.String} object. @param requirementName a {@link java.lang.String} object. @param repositoryId a {@link java.lang.String} object. @param specific...
[ "<p", ">", "runReference", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/rpc/runner/XmlRpcRemoteRunner.java#L170-L186
oboehm/jfachwert
src/main/java/de/jfachwert/bank/Geldbetrag.java
Geldbetrag.valueOf
public static Geldbetrag valueOf(Number value, Currency currency) { """ Wandelt den angegebenen MonetaryAmount in einen Geldbetrag um. Um die Anzahl von Objekten gering zu halten, wird nur dann tatsaechlich eine neues Objekt erzeugt, wenn es sich nicht vermeiden laesst. <p> In Anlehnung an {@link BigDecimal} h...
java
public static Geldbetrag valueOf(Number value, Currency currency) { return valueOf(new Geldbetrag(value, currency)); }
[ "public", "static", "Geldbetrag", "valueOf", "(", "Number", "value", ",", "Currency", "currency", ")", "{", "return", "valueOf", "(", "new", "Geldbetrag", "(", "value", ",", "currency", ")", ")", ";", "}" ]
Wandelt den angegebenen MonetaryAmount in einen Geldbetrag um. Um die Anzahl von Objekten gering zu halten, wird nur dann tatsaechlich eine neues Objekt erzeugt, wenn es sich nicht vermeiden laesst. <p> In Anlehnung an {@link BigDecimal} heisst die Methode "valueOf". </p> @param value Wert des andere Geldbetrags @para...
[ "Wandelt", "den", "angegebenen", "MonetaryAmount", "in", "einen", "Geldbetrag", "um", ".", "Um", "die", "Anzahl", "von", "Objekten", "gering", "zu", "halten", "wird", "nur", "dann", "tatsaechlich", "eine", "neues", "Objekt", "erzeugt", "wenn", "es", "sich", "n...
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/bank/Geldbetrag.java#L366-L368
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.perspectiveRect
public Matrix4f perspectiveRect(float width, float height, float zNear, float zFar, Matrix4f dest) { """ Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>...
java
public Matrix4f perspectiveRect(float width, float height, float zNear, float zFar, Matrix4f dest) { return perspectiveRect(width, height, zNear, zFar, false, dest); }
[ "public", "Matrix4f", "perspectiveRect", "(", "float", "width", ",", "float", "height", ",", "float", "zNear", ",", "float", "zFar", ",", "Matrix4f", "dest", ")", "{", "return", "perspectiveRect", "(", "width", ",", "height", ",", "zNear", ",", "zFar", ","...
Apply a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>P</code> the perspective projection matrix, then ...
[ "Apply", "a", "symmetric", "perspective", "projection", "frustum", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", "1", "]", "<", "/"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L9502-L9504