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
code4everything/util
src/main/java/com/zhazhapan/util/DateUtils.java
DateUtils.add
public static Date add(String date, int field, int amount) throws ParseException { """ 日期添加 @param date 日期 @param field 添加区域 {@link Calendar#DATE} {@link Calendar#MONTH} {@link Calendar#YEAR} @param amount 数量 @return 添加后的日期 @throws ParseException 异常 """ return add(Formatter.stringToDatetime(...
java
public static Date add(String date, int field, int amount) throws ParseException { return add(Formatter.stringToDatetime(date), field, amount); }
[ "public", "static", "Date", "add", "(", "String", "date", ",", "int", "field", ",", "int", "amount", ")", "throws", "ParseException", "{", "return", "add", "(", "Formatter", ".", "stringToDatetime", "(", "date", ")", ",", "field", ",", "amount", ")", ";"...
日期添加 @param date 日期 @param field 添加区域 {@link Calendar#DATE} {@link Calendar#MONTH} {@link Calendar#YEAR} @param amount 数量 @return 添加后的日期 @throws ParseException 异常
[ "日期添加" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/DateUtils.java#L512-L514
netty/netty
common/src/main/java/io/netty/util/Signal.java
Signal.valueOf
public static Signal valueOf(Class<?> firstNameComponent, String secondNameComponent) { """ Shortcut of {@link #valueOf(String) valueOf(firstNameComponent.getName() + "#" + secondNameComponent)}. """ return pool.valueOf(firstNameComponent, secondNameComponent); }
java
public static Signal valueOf(Class<?> firstNameComponent, String secondNameComponent) { return pool.valueOf(firstNameComponent, secondNameComponent); }
[ "public", "static", "Signal", "valueOf", "(", "Class", "<", "?", ">", "firstNameComponent", ",", "String", "secondNameComponent", ")", "{", "return", "pool", ".", "valueOf", "(", "firstNameComponent", ",", "secondNameComponent", ")", ";", "}" ]
Shortcut of {@link #valueOf(String) valueOf(firstNameComponent.getName() + "#" + secondNameComponent)}.
[ "Shortcut", "of", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/Signal.java#L44-L46
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationDataBuilder.java
CollationDataBuilder.copyFrom
void copyFrom(CollationDataBuilder src, CEModifier modifier) { """ Copies all mappings from the src builder, with modifications. This builder here must not be built yet, and should be empty. """ if(!isMutable()) { throw new IllegalStateException("attempt to copyFrom() after build()"); ...
java
void copyFrom(CollationDataBuilder src, CEModifier modifier) { if(!isMutable()) { throw new IllegalStateException("attempt to copyFrom() after build()"); } CopyHelper helper = new CopyHelper(src, this, modifier); Iterator<Trie2.Range> trieIterator = src.trie.iterator(); ...
[ "void", "copyFrom", "(", "CollationDataBuilder", "src", ",", "CEModifier", "modifier", ")", "{", "if", "(", "!", "isMutable", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"attempt to copyFrom() after build()\"", ")", ";", "}", "CopyHelper", ...
Copies all mappings from the src builder, with modifications. This builder here must not be built yet, and should be empty.
[ "Copies", "all", "mappings", "from", "the", "src", "builder", "with", "modifications", ".", "This", "builder", "here", "must", "not", "be", "built", "yet", "and", "should", "be", "empty", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationDataBuilder.java#L255-L269
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_databaseAvailableType_GET
public ArrayList<OvhDatabaseTypeEnum> serviceName_databaseAvailableType_GET(String serviceName) throws IOException { """ List available database type REST: GET /hosting/web/{serviceName}/databaseAvailableType @param serviceName [required] The internal name of your hosting """ String qPath = "/hosting/web...
java
public ArrayList<OvhDatabaseTypeEnum> serviceName_databaseAvailableType_GET(String serviceName) throws IOException { String qPath = "/hosting/web/{serviceName}/databaseAvailableType"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t9); ...
[ "public", "ArrayList", "<", "OvhDatabaseTypeEnum", ">", "serviceName_databaseAvailableType_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/hosting/web/{serviceName}/databaseAvailableType\"", ";", "StringBuilder", "sb", "=", ...
List available database type REST: GET /hosting/web/{serviceName}/databaseAvailableType @param serviceName [required] The internal name of your hosting
[ "List", "available", "database", "type" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1534-L1539
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtend2/lib/StringConcatenation.java
StringConcatenation.splitLinesAndNewLines
protected List<String> splitLinesAndNewLines(String text) { """ Return a list of segments where each segment is either the content of a line in the given text or a line-break according to the configured delimiter. Existing line-breaks in the text will be replaced by this's instances delimiter. @param text th...
java
protected List<String> splitLinesAndNewLines(String text) { if (text == null) return Collections.emptyList(); int idx = initialSegmentSize(text); if (idx == text.length()) { return Collections.singletonList(text); } return continueSplitting(text, idx); }
[ "protected", "List", "<", "String", ">", "splitLinesAndNewLines", "(", "String", "text", ")", "{", "if", "(", "text", "==", "null", ")", "return", "Collections", ".", "emptyList", "(", ")", ";", "int", "idx", "=", "initialSegmentSize", "(", "text", ")", ...
Return a list of segments where each segment is either the content of a line in the given text or a line-break according to the configured delimiter. Existing line-breaks in the text will be replaced by this's instances delimiter. @param text the to-be-splitted text. May be <code>null</code>. @return a list of segment...
[ "Return", "a", "list", "of", "segments", "where", "each", "segment", "is", "either", "the", "content", "of", "a", "line", "in", "the", "given", "text", "or", "a", "line", "-", "break", "according", "to", "the", "configured", "delimiter", ".", "Existing", ...
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtend2/lib/StringConcatenation.java#L582-L591
alkacon/opencms-core
src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java
CmsNewResourceTypeDialog.addResourceToModule
private void addResourceToModule(String resourcePath, CmsModule module) { """ Adds the given resource to the module if necessary.<p> @param resourcePath to be added @param module module """ List<String> currentRessources = Lists.newArrayList(module.getResources()); for (String resource : c...
java
private void addResourceToModule(String resourcePath, CmsModule module) { List<String> currentRessources = Lists.newArrayList(module.getResources()); for (String resource : currentRessources) { if (resourcePath.startsWith(resource)) { return; } } ...
[ "private", "void", "addResourceToModule", "(", "String", "resourcePath", ",", "CmsModule", "module", ")", "{", "List", "<", "String", ">", "currentRessources", "=", "Lists", ".", "newArrayList", "(", "module", ".", "getResources", "(", ")", ")", ";", "for", ...
Adds the given resource to the module if necessary.<p> @param resourcePath to be added @param module module
[ "Adds", "the", "given", "resource", "to", "the", "module", "if", "necessary", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java#L530-L540
tango-controls/JTango
server/src/main/java/org/tango/server/servant/DeviceImpl.java
DeviceImpl.set_attribute_config_4
@Override public void set_attribute_config_4(final AttributeConfig_3[] newConf, final ClntIdent clIdent) throws DevFailed { """ Set some attribute configs. IDL4 version @param newConf the new configurations @param clIdent client id @throws DevFailed """ MDC.setContextMap(contextMap); x...
java
@Override public void set_attribute_config_4(final AttributeConfig_3[] newConf, final ClntIdent clIdent) throws DevFailed { MDC.setContextMap(contextMap); xlogger.entry(); checkInitialization(); clientIdentity.set(clIdent); if (!name.equalsIgnoreCase(getAdminDeviceName())) { ...
[ "@", "Override", "public", "void", "set_attribute_config_4", "(", "final", "AttributeConfig_3", "[", "]", "newConf", ",", "final", "ClntIdent", "clIdent", ")", "throws", "DevFailed", "{", "MDC", ".", "setContextMap", "(", "contextMap", ")", ";", "xlogger", ".", ...
Set some attribute configs. IDL4 version @param newConf the new configurations @param clIdent client id @throws DevFailed
[ "Set", "some", "attribute", "configs", ".", "IDL4", "version" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/servant/DeviceImpl.java#L2036-L2049
spring-projects/spring-social
spring-social-web/src/main/java/org/springframework/social/connect/web/ConnectController.java
ConnectController.connectionStatus
@RequestMapping(method=RequestMethod.GET) public String connectionStatus(NativeWebRequest request, Model model) { """ Render the status of connections across all providers to the user as HTML in their web browser. @param request the request @param model the model @return the view name of the connection status ...
java
@RequestMapping(method=RequestMethod.GET) public String connectionStatus(NativeWebRequest request, Model model) { setNoCache(request); processFlash(request, model); Map<String, List<Connection<?>>> connections = connectionRepository.findAllConnections(); model.addAttribute("providerIds", connectionFactoryLocat...
[ "@", "RequestMapping", "(", "method", "=", "RequestMethod", ".", "GET", ")", "public", "String", "connectionStatus", "(", "NativeWebRequest", "request", ",", "Model", "model", ")", "{", "setNoCache", "(", "request", ")", ";", "processFlash", "(", "request", ",...
Render the status of connections across all providers to the user as HTML in their web browser. @param request the request @param model the model @return the view name of the connection status page for all providers
[ "Render", "the", "status", "of", "connections", "across", "all", "providers", "to", "the", "user", "as", "HTML", "in", "their", "web", "browser", "." ]
train
https://github.com/spring-projects/spring-social/blob/e41cfecb288022b83c79413b58f52511c3c9d4fc/spring-social-web/src/main/java/org/springframework/social/connect/web/ConnectController.java#L205-L213
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/SparseCpuLevel1.java
SparseCpuLevel1.idamin
@Override protected int idamin(long N, INDArray X, int incX) { """ Find the index of the element with minimum absolute value @param N The number of elements in vector X @param X a vector @param incX The increment of X @return the index of the element with minimum absolute value """ return (in...
java
@Override protected int idamin(long N, INDArray X, int incX) { return (int) cblas_idamin((int) N, (DoublePointer) X.data().addressPointer(), incX); }
[ "@", "Override", "protected", "int", "idamin", "(", "long", "N", ",", "INDArray", "X", ",", "int", "incX", ")", "{", "return", "(", "int", ")", "cblas_idamin", "(", "(", "int", ")", "N", ",", "(", "DoublePointer", ")", "X", ".", "data", "(", ")", ...
Find the index of the element with minimum absolute value @param N The number of elements in vector X @param X a vector @param incX The increment of X @return the index of the element with minimum absolute value
[ "Find", "the", "index", "of", "the", "element", "with", "minimum", "absolute", "value" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/SparseCpuLevel1.java#L176-L179
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java
GlobalConfiguration.getStringInternal
private String getStringInternal(final String key, final String defaultValue) { """ Returns the value associated with the given key as a string. @param key key the key pointing to the associated value @param defaultValue defaultValue the default value which is returned in case there is no value associated wi...
java
private String getStringInternal(final String key, final String defaultValue) { synchronized (this.confData) { if (!this.confData.containsKey(key)) { return defaultValue; } return this.confData.get(key); } }
[ "private", "String", "getStringInternal", "(", "final", "String", "key", ",", "final", "String", "defaultValue", ")", "{", "synchronized", "(", "this", ".", "confData", ")", "{", "if", "(", "!", "this", ".", "confData", ".", "containsKey", "(", "key", ")",...
Returns the value associated with the given key as a string. @param key key the key pointing to the associated value @param defaultValue defaultValue the default value which is returned in case there is no value associated with the given key @return the (default) value associated with the given key
[ "Returns", "the", "value", "associated", "with", "the", "given", "key", "as", "a", "string", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/configuration/GlobalConfiguration.java#L112-L122
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/http/HttpUtil.java
HttpUtil.getBytes
public static byte[] getBytes(InputStream in) { """ Converts an {@link InputStream} to a byte array @param in input stream to convert @return byte array """ ByteArrayOutputStream os = new ByteArrayOutputStream(); WritableByteChannel wbc = Channels.newChannel(os); ReadableByteChannel r...
java
public static byte[] getBytes(InputStream in) { ByteArrayOutputStream os = new ByteArrayOutputStream(); WritableByteChannel wbc = Channels.newChannel(os); ReadableByteChannel rbc = Channels.newChannel(in); ByteBuffer byteBuffer = ByteBuffer.allocate(1024); try { while...
[ "public", "static", "byte", "[", "]", "getBytes", "(", "InputStream", "in", ")", "{", "ByteArrayOutputStream", "os", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "WritableByteChannel", "wbc", "=", "Channels", ".", "newChannel", "(", "os", ")", ";", "R...
Converts an {@link InputStream} to a byte array @param in input stream to convert @return byte array
[ "Converts", "an", "{" ]
train
https://github.com/heroku/heroku.jar/blob/d9e52991293159498c10c498c6f91fcdd637378e/heroku-api/src/main/java/com/heroku/api/http/HttpUtil.java#L108-L125
alkacon/opencms-core
src-modules/org/opencms/workplace/explorer/CmsExplorer.java
CmsExplorer.resourceExists
private boolean resourceExists(CmsObject cms, String resource) { """ Checks if a resource with a given name exits in the VFS.<p> @param cms the current cms context @param resource the resource to check for @return true if the resource exists in the VFS """ try { cms.readResource(res...
java
private boolean resourceExists(CmsObject cms, String resource) { try { cms.readResource(resource, CmsResourceFilter.ALL); return true; } catch (CmsException e) { return false; } }
[ "private", "boolean", "resourceExists", "(", "CmsObject", "cms", ",", "String", "resource", ")", "{", "try", "{", "cms", ".", "readResource", "(", "resource", ",", "CmsResourceFilter", ".", "ALL", ")", ";", "return", "true", ";", "}", "catch", "(", "CmsExc...
Checks if a resource with a given name exits in the VFS.<p> @param cms the current cms context @param resource the resource to check for @return true if the resource exists in the VFS
[ "Checks", "if", "a", "resource", "with", "a", "given", "name", "exits", "in", "the", "VFS", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/explorer/CmsExplorer.java#L884-L892
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/graph/GraphGenerator.java
GraphGenerator.onPreChecks
private <E> Object onPreChecks(E entity, PersistenceDelegator delegator) { """ On pre checks before generating graph. performed checks: <li>Check if entity is valid.</li> <li>generated and set id in case {@link GeneratedValue} is present and not set.</li> <li>Check if primary key is not null.</li> @param e...
java
private <E> Object onPreChecks(E entity, PersistenceDelegator delegator) { // pre validation. // check if entity is Null or with Invalid meta data! Object id = null; EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(delegator.getKunderaMetadata(), ...
[ "private", "<", "E", ">", "Object", "onPreChecks", "(", "E", "entity", ",", "PersistenceDelegator", "delegator", ")", "{", "// pre validation.", "// check if entity is Null or with Invalid meta data!", "Object", "id", "=", "null", ";", "EntityMetadata", "entityMetadata", ...
On pre checks before generating graph. performed checks: <li>Check if entity is valid.</li> <li>generated and set id in case {@link GeneratedValue} is present and not set.</li> <li>Check if primary key is not null.</li> @param entity entity @param client client @return entity id
[ "On", "pre", "checks", "before", "generating", "graph", ".", "performed", "checks", ":", "<li", ">", "Check", "if", "entity", "is", "valid", ".", "<", "/", "li", ">", "<li", ">", "generated", "and", "set", "id", "in", "case", "{", "@link", "GeneratedVa...
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/graph/GraphGenerator.java#L215-L240
twitter/hraven
hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java
JobHistoryService.getFlowSeries
public List<Flow> getFlowSeries(String cluster, String user, String appId, int limit) throws IOException { """ Returns up to {@code limit} most recent flows by application ID. This version will only populate job-level details not task information. To include task details use {@link JobHistoryService#getFl...
java
public List<Flow> getFlowSeries(String cluster, String user, String appId, int limit) throws IOException { return getFlowSeries(cluster, user, appId, null, false, limit); }
[ "public", "List", "<", "Flow", ">", "getFlowSeries", "(", "String", "cluster", ",", "String", "user", ",", "String", "appId", ",", "int", "limit", ")", "throws", "IOException", "{", "return", "getFlowSeries", "(", "cluster", ",", "user", ",", "appId", ",",...
Returns up to {@code limit} most recent flows by application ID. This version will only populate job-level details not task information. To include task details use {@link JobHistoryService#getFlowSeries(String, String, String, String, boolean, int)} . @param cluster the cluster identifier @param user the user running...
[ "Returns", "up", "to", "{", "@code", "limit", "}", "most", "recent", "flows", "by", "application", "ID", ".", "This", "version", "will", "only", "populate", "job", "-", "level", "details", "not", "task", "information", ".", "To", "include", "task", "detail...
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java#L145-L148
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/MultiPointImpl.java
MultiPointImpl.add
public void add(MultiVertexGeometryImpl src, int beginIndex, int endIndex) { """ Appends points from another MultiVertexGeometryImpl at the end of this one. @param src The source MultiVertexGeometryImpl """ int endIndexC = endIndex < 0 ? src.getPointCount() : endIndex; if (beginIndex < 0 || beginIndex...
java
public void add(MultiVertexGeometryImpl src, int beginIndex, int endIndex) { int endIndexC = endIndex < 0 ? src.getPointCount() : endIndex; if (beginIndex < 0 || beginIndex > src.getPointCount() || endIndexC < beginIndex) throw new IllegalArgumentException(); if (beginIndex == endIndexC) return; mer...
[ "public", "void", "add", "(", "MultiVertexGeometryImpl", "src", ",", "int", "beginIndex", ",", "int", "endIndex", ")", "{", "int", "endIndexC", "=", "endIndex", "<", "0", "?", "src", ".", "getPointCount", "(", ")", ":", "endIndex", ";", "if", "(", "begin...
Appends points from another MultiVertexGeometryImpl at the end of this one. @param src The source MultiVertexGeometryImpl
[ "Appends", "points", "from", "another", "MultiVertexGeometryImpl", "at", "the", "end", "of", "this", "one", "." ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/MultiPointImpl.java#L90-L114
jnr/jnr-x86asm
src/main/java/jnr/x86asm/Asm.java
Asm.mmword_ptr
public static final Mem mmword_ptr(Register base, Register index, int shift, long disp) { """ Create mmword (8 Bytes) pointer operand). ! ! @note This constructor is provided only for convenience for mmx programming. """ return _ptr_build(base, index, shift, disp, SIZE_QWORD); }
java
public static final Mem mmword_ptr(Register base, Register index, int shift, long disp) { return _ptr_build(base, index, shift, disp, SIZE_QWORD); }
[ "public", "static", "final", "Mem", "mmword_ptr", "(", "Register", "base", ",", "Register", "index", ",", "int", "shift", ",", "long", "disp", ")", "{", "return", "_ptr_build", "(", "base", ",", "index", ",", "shift", ",", "disp", ",", "SIZE_QWORD", ")",...
Create mmword (8 Bytes) pointer operand). ! ! @note This constructor is provided only for convenience for mmx programming.
[ "Create", "mmword", "(", "8", "Bytes", ")", "pointer", "operand", ")", ".", "!", "!" ]
train
https://github.com/jnr/jnr-x86asm/blob/fdcf68fb3dae49e607a49e33399e3dad1ada5536/src/main/java/jnr/x86asm/Asm.java#L587-L589
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java
BogusExceptionDeclaration.isAnonymousInnerCtor
private static boolean isAnonymousInnerCtor(Method m, JavaClass cls) { """ checks to see if this method is a constructor of an instance based inner class, the handling of the Exception table for this method is odd, -- doesn't seem correct, in some cases. So just ignore these cases @param m the method to check...
java
private static boolean isAnonymousInnerCtor(Method m, JavaClass cls) { return Values.CONSTRUCTOR.equals(m.getName()) && (cls.getClassName().lastIndexOf(Values.INNER_CLASS_SEPARATOR) >= 0); }
[ "private", "static", "boolean", "isAnonymousInnerCtor", "(", "Method", "m", ",", "JavaClass", "cls", ")", "{", "return", "Values", ".", "CONSTRUCTOR", ".", "equals", "(", "m", ".", "getName", "(", ")", ")", "&&", "(", "cls", ".", "getClassName", "(", ")"...
checks to see if this method is a constructor of an instance based inner class, the handling of the Exception table for this method is odd, -- doesn't seem correct, in some cases. So just ignore these cases @param m the method to check @param cls the cls that owns the method @return whether this method is a ctor of an...
[ "checks", "to", "see", "if", "this", "method", "is", "a", "constructor", "of", "an", "instance", "based", "inner", "class", "the", "handling", "of", "the", "Exception", "table", "for", "this", "method", "is", "odd", "--", "doesn", "t", "seem", "correct", ...
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/BogusExceptionDeclaration.java#L197-L199
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java
ProxyDataSourceBuilder.logSlowQueryBySlf4j
public ProxyDataSourceBuilder logSlowQueryBySlf4j(long thresholdTime, TimeUnit timeUnit, String loggerName) { """ Register {@link SLF4JSlowQueryListener}. @param thresholdTime slow query threshold time @param timeUnit slow query threshold time unit @param loggerName slf4j logger name @return builder ...
java
public ProxyDataSourceBuilder logSlowQueryBySlf4j(long thresholdTime, TimeUnit timeUnit, String loggerName) { return logSlowQueryBySlf4j(thresholdTime, timeUnit, null, loggerName); }
[ "public", "ProxyDataSourceBuilder", "logSlowQueryBySlf4j", "(", "long", "thresholdTime", ",", "TimeUnit", "timeUnit", ",", "String", "loggerName", ")", "{", "return", "logSlowQueryBySlf4j", "(", "thresholdTime", ",", "timeUnit", ",", "null", ",", "loggerName", ")", ...
Register {@link SLF4JSlowQueryListener}. @param thresholdTime slow query threshold time @param timeUnit slow query threshold time unit @param loggerName slf4j logger name @return builder @since 1.4.1
[ "Register", "{", "@link", "SLF4JSlowQueryListener", "}", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L361-L363
JoeKerouac/utils
src/main/java/com/joe/utils/reflect/ReflectUtil.java
ReflectUtil.invoke
@SuppressWarnings("unchecked") public static <R> R invoke(Object obj, String methodName, Class<?>[] parameterTypes, Object... args) { """ 调用指定对象的指定方法 @param obj 指定对象,不能为空,如果要调用的方法为静态方法那么传入Class对象 @param methodName 要调用的方法名,不能为空 @param parameterTypes 方法参数类型,方法没有参数请传null @param...
java
@SuppressWarnings("unchecked") public static <R> R invoke(Object obj, String methodName, Class<?>[] parameterTypes, Object... args) { Assert.isFalse( CollectionUtil.safeIsEmpty(parameterTypes) ^ CollectionUtil.safeIsEmpty(args), "方法参数类型列表必须和方法参数列表一致"); ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "R", ">", "R", "invoke", "(", "Object", "obj", ",", "String", "methodName", ",", "Class", "<", "?", ">", "[", "]", "parameterTypes", ",", "Object", "...", "args", ")", "{", "A...
调用指定对象的指定方法 @param obj 指定对象,不能为空,如果要调用的方法为静态方法那么传入Class对象 @param methodName 要调用的方法名,不能为空 @param parameterTypes 方法参数类型,方法没有参数请传null @param args 参数 @param <R> 结果类型 @return 调用结果
[ "调用指定对象的指定方法" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/reflect/ReflectUtil.java#L107-L122
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/shared/filters/AbstractFilter.java
AbstractFilter.addDelayedLogMessage
protected final void addDelayedLogMessage(final String logLevel, final String message) { """ Adds a log message to be emitted when this AbstractFilter is initialized (and the Log is made available to it). @param logLevel The logLevel of the message to emit. @param message The message to emit. """ ...
java
protected final void addDelayedLogMessage(final String logLevel, final String message) { this.delayedLogMessages.add(new DelayedLogMessage(logLevel, message)); }
[ "protected", "final", "void", "addDelayedLogMessage", "(", "final", "String", "logLevel", ",", "final", "String", "message", ")", "{", "this", ".", "delayedLogMessages", ".", "add", "(", "new", "DelayedLogMessage", "(", "logLevel", ",", "message", ")", ")", ";...
Adds a log message to be emitted when this AbstractFilter is initialized (and the Log is made available to it). @param logLevel The logLevel of the message to emit. @param message The message to emit.
[ "Adds", "a", "log", "message", "to", "be", "emitted", "when", "this", "AbstractFilter", "is", "initialized", "(", "and", "the", "Log", "is", "made", "available", "to", "it", ")", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/main/java/org/codehaus/mojo/jaxb2/shared/filters/AbstractFilter.java#L86-L88
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommerceTierPriceEntryPersistenceImpl.java
CommerceTierPriceEntryPersistenceImpl.removeByC_LtM
@Override public void removeByC_LtM(long commercePriceEntryId, int minQuantity) { """ Removes all the commerce tier price entries where commercePriceEntryId = &#63; and minQuantity &le; &#63; from the database. @param commercePriceEntryId the commerce price entry ID @param minQuantity the min quantity """...
java
@Override public void removeByC_LtM(long commercePriceEntryId, int minQuantity) { for (CommerceTierPriceEntry commerceTierPriceEntry : findByC_LtM( commercePriceEntryId, minQuantity, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceTierPriceEntry); } }
[ "@", "Override", "public", "void", "removeByC_LtM", "(", "long", "commercePriceEntryId", ",", "int", "minQuantity", ")", "{", "for", "(", "CommerceTierPriceEntry", "commerceTierPriceEntry", ":", "findByC_LtM", "(", "commercePriceEntryId", ",", "minQuantity", ",", "Que...
Removes all the commerce tier price entries where commercePriceEntryId = &#63; and minQuantity &le; &#63; from the database. @param commercePriceEntryId the commerce price entry ID @param minQuantity the min quantity
[ "Removes", "all", "the", "commerce", "tier", "price", "entries", "where", "commercePriceEntryId", "=", "&#63", ";", "and", "minQuantity", "&le", ";", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommerceTierPriceEntryPersistenceImpl.java#L3744-L3751
opencb/java-common-libs
commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java
SolrManager.removeCollection
public void removeCollection(String collectionName) throws SolrException { """ Remove a collection. @param collectionName Collection name @throws SolrException SolrException """ try { CollectionAdminRequest request = CollectionAdminRequest.deleteCollection(collectionName); r...
java
public void removeCollection(String collectionName) throws SolrException { try { CollectionAdminRequest request = CollectionAdminRequest.deleteCollection(collectionName); request.process(solrClient); } catch (SolrServerException | IOException e) { throw new SolrExcept...
[ "public", "void", "removeCollection", "(", "String", "collectionName", ")", "throws", "SolrException", "{", "try", "{", "CollectionAdminRequest", "request", "=", "CollectionAdminRequest", ".", "deleteCollection", "(", "collectionName", ")", ";", "request", ".", "proce...
Remove a collection. @param collectionName Collection name @throws SolrException SolrException
[ "Remove", "a", "collection", "." ]
train
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java#L238-L245
google/truth
extensions/java8/src/main/java/com/google/common/truth/IntStreamSubject.java
IntStreamSubject.containsAnyOf
@SuppressWarnings("GoodTime") // false positive; b/122617528 public void containsAnyOf(int first, int second, int... rest) { """ Fails if the subject does not contain at least one of the given elements. """ check().that(actualList).containsAnyOf(first, second, box(rest)); }
java
@SuppressWarnings("GoodTime") // false positive; b/122617528 public void containsAnyOf(int first, int second, int... rest) { check().that(actualList).containsAnyOf(first, second, box(rest)); }
[ "@", "SuppressWarnings", "(", "\"GoodTime\"", ")", "// false positive; b/122617528", "public", "void", "containsAnyOf", "(", "int", "first", ",", "int", "second", ",", "int", "...", "rest", ")", "{", "check", "(", ")", ".", "that", "(", "actualList", ")", "....
Fails if the subject does not contain at least one of the given elements.
[ "Fails", "if", "the", "subject", "does", "not", "contain", "at", "least", "one", "of", "the", "given", "elements", "." ]
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/extensions/java8/src/main/java/com/google/common/truth/IntStreamSubject.java#L98-L101
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseBitwiseAndExpression
private Expr parseBitwiseAndExpression(EnclosingScope scope, boolean terminated) { """ Parse an bitwise "and" expression @param scope The enclosing scope for this statement, which determines the set of visible (i.e. declared) variables and also the current indentation level. @param terminated This indicate...
java
private Expr parseBitwiseAndExpression(EnclosingScope scope, boolean terminated) { int start = index; Expr lhs = parseConditionExpression(scope, terminated); if (tryAndMatch(terminated, Ampersand) != null) { Expr rhs = parseExpression(scope, terminated); return annotateSourceLocation(new Expr.BitwiseAnd(Ty...
[ "private", "Expr", "parseBitwiseAndExpression", "(", "EnclosingScope", "scope", ",", "boolean", "terminated", ")", "{", "int", "start", "=", "index", ";", "Expr", "lhs", "=", "parseConditionExpression", "(", "scope", ",", "terminated", ")", ";", "if", "(", "tr...
Parse an bitwise "and" expression @param scope The enclosing scope for this statement, which determines the set of visible (i.e. declared) variables and also the current indentation level. @param terminated This indicates that the expression is known to be terminated (or not). An expression that's known to be terminat...
[ "Parse", "an", "bitwise", "and", "expression" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L1823-L1833
apiman/apiman
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/ESRegistry.java
ESRegistry.validateContract
private void validateContract(final Contract contract) throws RegistrationException { """ Ensures that the api referenced by the Contract at the head of the iterator actually exists (is published). @param contract @param apiMap """ final String id = getApiId(contract); try { ...
java
private void validateContract(final Contract contract) throws RegistrationException { final String id = getApiId(contract); try { Get get = new Get.Builder(getIndexName(), id).type("api").build(); //$NON-NLS-1$ JestResult result = getClient().execute(get); ...
[ "private", "void", "validateContract", "(", "final", "Contract", "contract", ")", "throws", "RegistrationException", "{", "final", "String", "id", "=", "getApiId", "(", "contract", ")", ";", "try", "{", "Get", "get", "=", "new", "Get", ".", "Builder", "(", ...
Ensures that the api referenced by the Contract at the head of the iterator actually exists (is published). @param contract @param apiMap
[ "Ensures", "that", "the", "api", "referenced", "by", "the", "Contract", "at", "the", "head", "of", "the", "iterator", "actually", "exists", "(", "is", "published", ")", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/ESRegistry.java#L161-L176
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/alias/AliasFactory.java
AliasFactory.createAliasForExpr
@SuppressWarnings("unchecked") public <A> A createAliasForExpr(Class<A> cl, Expression<? extends A> expr) { """ Create an alias instance for the given class and Expression @param <A> @param cl type for alias @param expr underlying expression @return alias instance """ try { return...
java
@SuppressWarnings("unchecked") public <A> A createAliasForExpr(Class<A> cl, Expression<? extends A> expr) { try { return (A) proxyCache.get(Pair.<Class<?>, Expression<?>>of(cl, expr)); } catch (ExecutionException e) { throw new QueryException(e); } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "A", ">", "A", "createAliasForExpr", "(", "Class", "<", "A", ">", "cl", ",", "Expression", "<", "?", "extends", "A", ">", "expr", ")", "{", "try", "{", "return", "(", "A", ")", "proxy...
Create an alias instance for the given class and Expression @param <A> @param cl type for alias @param expr underlying expression @return alias instance
[ "Create", "an", "alias", "instance", "for", "the", "given", "class", "and", "Expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/alias/AliasFactory.java#L79-L86
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/service/BuildService.java
BuildService.buildImage
public void buildImage(ImageConfiguration imageConfig, ImagePullManager imagePullManager, BuildContext buildContext) throws DockerAccessException, MojoExecutionException { """ Pull the base image if needed and run the build. @param imageConfig the image configuration @param buildContext the build c...
java
public void buildImage(ImageConfiguration imageConfig, ImagePullManager imagePullManager, BuildContext buildContext) throws DockerAccessException, MojoExecutionException { if (imagePullManager != null) { autoPullBaseImage(imageConfig, imagePullManager, buildContext); } ...
[ "public", "void", "buildImage", "(", "ImageConfiguration", "imageConfig", ",", "ImagePullManager", "imagePullManager", ",", "BuildContext", "buildContext", ")", "throws", "DockerAccessException", ",", "MojoExecutionException", "{", "if", "(", "imagePullManager", "!=", "nu...
Pull the base image if needed and run the build. @param imageConfig the image configuration @param buildContext the build context @throws DockerAccessException @throws MojoExecutionException
[ "Pull", "the", "base", "image", "if", "needed", "and", "run", "the", "build", "." ]
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/service/BuildService.java#L63-L71
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_menu_menuId_PUT
public void billingAccount_ovhPabx_serviceName_menu_menuId_PUT(String billingAccount, String serviceName, Long menuId, OvhOvhPabxMenu body) throws IOException { """ Alter this object properties REST: PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId} @param body [required] New object propertie...
java
public void billingAccount_ovhPabx_serviceName_menu_menuId_PUT(String billingAccount, String serviceName, Long menuId, OvhOvhPabxMenu body) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId}"; StringBuilder sb = path(qPath, billingAccount, serviceName, menuId); ex...
[ "public", "void", "billingAccount_ovhPabx_serviceName_menu_menuId_PUT", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "menuId", ",", "OvhOvhPabxMenu", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAc...
Alter this object properties REST: PUT /telephony/{billingAccount}/ovhPabx/{serviceName}/menu/{menuId} @param body [required] New object properties @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param menuId [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7554-L7558
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.unsortedSegmentSum
public SDVariable unsortedSegmentSum(String name, @NonNull SDVariable data, @NonNull SDVariable segmentIds, int numSegments) { """ Unsorted segment sum operation. As per {@link #segmentSum(String, SDVariable, SDVariable)} but without the requirement for the indices to be sorted.<br> If data = [1, 3, 2, 6, 4,...
java
public SDVariable unsortedSegmentSum(String name, @NonNull SDVariable data, @NonNull SDVariable segmentIds, int numSegments) { validateNumerical("unsortedSegmentSum", "data", data); validateInteger("unsortedSegmentSum", "segmentIds", segmentIds); SDVariable ret = f().unsortedSegmentSum(data, seg...
[ "public", "SDVariable", "unsortedSegmentSum", "(", "String", "name", ",", "@", "NonNull", "SDVariable", "data", ",", "@", "NonNull", "SDVariable", "segmentIds", ",", "int", "numSegments", ")", "{", "validateNumerical", "(", "\"unsortedSegmentSum\"", ",", "\"data\"",...
Unsorted segment sum operation. As per {@link #segmentSum(String, SDVariable, SDVariable)} but without the requirement for the indices to be sorted.<br> If data = [1, 3, 2, 6, 4, 9, 8]<br> segmentIds = [1, 0, 2, 0, 1, 1, 2]<br> then output = [9, 14, 10] = [sum(3,6), sum(1,4,9), sum(2,8)]<br> @param name Na...
[ "Unsorted", "segment", "sum", "operation", ".", "As", "per", "{", "@link", "#segmentSum", "(", "String", "SDVariable", "SDVariable", ")", "}", "but", "without", "the", "requirement", "for", "the", "indices", "to", "be", "sorted", ".", "<br", ">", "If", "da...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L2986-L2991
aol/cyclops
cyclops/src/main/java/cyclops/companion/Streams.java
Streams.foldMap
public final static <T, R> R foldMap(final Stream<T> stream, final Function<? super T, ? extends R> mapper, final Monoid<R> reducer) { """ Attempt to transform this Stream to the same type as the supplied Monoid, using supplied function Then use Monoid to reduce values @param mapper Function to transform Monad...
java
public final static <T, R> R foldMap(final Stream<T> stream, final Function<? super T, ? extends R> mapper, final Monoid<R> reducer) { return reducer.foldLeft(stream.map(mapper)); }
[ "public", "final", "static", "<", "T", ",", "R", ">", "R", "foldMap", "(", "final", "Stream", "<", "T", ">", "stream", ",", "final", "Function", "<", "?", "super", "T", ",", "?", "extends", "R", ">", "mapper", ",", "final", "Monoid", "<", "R", ">...
Attempt to transform this Stream to the same type as the supplied Monoid, using supplied function Then use Monoid to reduce values @param mapper Function to transform Monad type @param reducer Monoid to reduce values @return Reduce result
[ "Attempt", "to", "transform", "this", "Stream", "to", "the", "same", "type", "as", "the", "supplied", "Monoid", "using", "supplied", "function", "Then", "use", "Monoid", "to", "reduce", "values" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Streams.java#L1952-L1954
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.listCertificatesWithServiceResponseAsync
public Observable<ServiceResponse<Page<AppServiceCertificateResourceInner>>> listCertificatesWithServiceResponseAsync(final String resourceGroupName, final String certificateOrderName) { """ List all certificates associated with a certificate order. List all certificates associated with a certificate order. @p...
java
public Observable<ServiceResponse<Page<AppServiceCertificateResourceInner>>> listCertificatesWithServiceResponseAsync(final String resourceGroupName, final String certificateOrderName) { return listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName) .concatMap(new Func1<ServiceRespo...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "AppServiceCertificateResourceInner", ">", ">", ">", "listCertificatesWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "certificateOrderName", ")", "{", "retur...
List all certificates associated with a certificate order. List all certificates associated with a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @throws IllegalArgumentException thrown if parameters fail ...
[ "List", "all", "certificates", "associated", "with", "a", "certificate", "order", ".", "List", "all", "certificates", "associated", "with", "a", "certificate", "order", "." ]
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/AppServiceCertificateOrdersInner.java#L1022-L1034
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardGenerator.java
StandardGenerator.embedText
public static IRenderingElement embedText(Font font, String text, Color color, double scale) { """ Make an embedded text label for display in a CDK renderer. If a piece of text contains newlines they are centred aligned below each other with a line height of 1.4. @param font the font to embedded @param text ...
java
public static IRenderingElement embedText(Font font, String text, Color color, double scale) { final String[] lines = text.split("\n"); ElementGroup group = new ElementGroup(); double yOffset = 0; double lineHeight = 1.4d; for (String line : lines) { TextOutline o...
[ "public", "static", "IRenderingElement", "embedText", "(", "Font", "font", ",", "String", "text", ",", "Color", "color", ",", "double", "scale", ")", "{", "final", "String", "[", "]", "lines", "=", "text", ".", "split", "(", "\"\\n\"", ")", ";", "Element...
Make an embedded text label for display in a CDK renderer. If a piece of text contains newlines they are centred aligned below each other with a line height of 1.4. @param font the font to embedded @param text the text label @param color the color @param scale the resize, should include the model scale @return pre-r...
[ "Make", "an", "embedded", "text", "label", "for", "display", "in", "a", "CDK", "renderer", ".", "If", "a", "piece", "of", "text", "contains", "newlines", "they", "are", "centred", "aligned", "below", "each", "other", "with", "a", "line", "height", "of", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardGenerator.java#L573-L596
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/preferences/ExtraLanguagePreferenceAccess.java
ExtraLanguagePreferenceAccess.ifSpecificConfiguration
public IProject ifSpecificConfiguration(String preferenceContainerID, IProject project) { """ Filter the project according to the specific configuration. <p>If the given project has a specific configuration, it is replied. Otherwise, {@code null} is replied. @param preferenceContainerID the identifier of th...
java
public IProject ifSpecificConfiguration(String preferenceContainerID, IProject project) { if (project != null && hasProjectSpecificOptions(preferenceContainerID, project)) { return project; } return null; }
[ "public", "IProject", "ifSpecificConfiguration", "(", "String", "preferenceContainerID", ",", "IProject", "project", ")", "{", "if", "(", "project", "!=", "null", "&&", "hasProjectSpecificOptions", "(", "preferenceContainerID", ",", "project", ")", ")", "{", "return...
Filter the project according to the specific configuration. <p>If the given project has a specific configuration, it is replied. Otherwise, {@code null} is replied. @param preferenceContainerID the identifier of the generator's preference container. @param project the context. If {@code null}, the global context is a...
[ "Filter", "the", "project", "according", "to", "the", "specific", "configuration", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/preferences/ExtraLanguagePreferenceAccess.java#L247-L252
line/armeria
core/src/main/java/com/linecorp/armeria/common/util/TextFormatter.java
TextFormatter.elapsedAndSize
public static StringBuilder elapsedAndSize(long startTimeNanos, long endTimeNanos, long size) { """ Similar to {@link #appendElapsedAndSize(StringBuilder, long, long, long)} except that this method creates a new {@link StringBuilder}. """ final StringBuilder buf = new StringBuilder(16); append...
java
public static StringBuilder elapsedAndSize(long startTimeNanos, long endTimeNanos, long size) { final StringBuilder buf = new StringBuilder(16); appendElapsedAndSize(buf, startTimeNanos, endTimeNanos, size); return buf; }
[ "public", "static", "StringBuilder", "elapsedAndSize", "(", "long", "startTimeNanos", ",", "long", "endTimeNanos", ",", "long", "size", ")", "{", "final", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", "16", ")", ";", "appendElapsedAndSize", "(", "buf...
Similar to {@link #appendElapsedAndSize(StringBuilder, long, long, long)} except that this method creates a new {@link StringBuilder}.
[ "Similar", "to", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/common/util/TextFormatter.java#L113-L117
tvesalainen/util
security/src/main/java/org/vesalainen/net/ssl/SSLServerSocketChannel.java
SSLServerSocketChannel.open
public static SSLServerSocketChannel open(SocketAddress address) throws IOException { """ Creates and binds SSLServerSocketChannel using default SSLContext. @param address @return @throws IOException """ try { return open(address, SSLContext.getDefault()); } ...
java
public static SSLServerSocketChannel open(SocketAddress address) throws IOException { try { return open(address, SSLContext.getDefault()); } catch (NoSuchAlgorithmException ex) { throw new IOException(ex); } }
[ "public", "static", "SSLServerSocketChannel", "open", "(", "SocketAddress", "address", ")", "throws", "IOException", "{", "try", "{", "return", "open", "(", "address", ",", "SSLContext", ".", "getDefault", "(", ")", ")", ";", "}", "catch", "(", "NoSuchAlgorith...
Creates and binds SSLServerSocketChannel using default SSLContext. @param address @return @throws IOException
[ "Creates", "and", "binds", "SSLServerSocketChannel", "using", "default", "SSLContext", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/security/src/main/java/org/vesalainen/net/ssl/SSLServerSocketChannel.java#L76-L86
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Img.java
Img.getRemoteBufferedImage
@Override public BufferedImage getRemoteBufferedImage() { """ Creates a BufferedImage that shares the data of this Img. Changes in this Img are reflected in the created BufferedImage and vice versa. The created BufferedImage uses an ARGB DirectColorModel with an underlying DataBufferInt (similar to {@link Buff...
java
@Override public BufferedImage getRemoteBufferedImage(){ DirectColorModel cm = new DirectColorModel(32, 0x00ff0000, // Red 0x0000ff00, // Green 0x000000ff, // Blue 0xff000000 // Alpha ); DataBufferInt buffer = new DataBuff...
[ "@", "Override", "public", "BufferedImage", "getRemoteBufferedImage", "(", ")", "{", "DirectColorModel", "cm", "=", "new", "DirectColorModel", "(", "32", ",", "0x00ff0000", ",", "// Red", "0x0000ff00", ",", "// Green", "0x000000ff", ",", "// Blue", "0xff000000", "...
Creates a BufferedImage that shares the data of this Img. Changes in this Img are reflected in the created BufferedImage and vice versa. The created BufferedImage uses an ARGB DirectColorModel with an underlying DataBufferInt (similar to {@link BufferedImage#TYPE_INT_ARGB}) @return BufferedImage sharing this Img's data...
[ "Creates", "a", "BufferedImage", "that", "shares", "the", "data", "of", "this", "Img", ".", "Changes", "in", "this", "Img", "are", "reflected", "in", "the", "created", "BufferedImage", "and", "vice", "versa", ".", "The", "created", "BufferedImage", "uses", "...
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Img.java#L513-L525
liyiorg/weixin-popular
src/main/java/weixin/popular/api/BizwifiAPI.java
BizwifiAPI.couponputSet
public static BaseResult couponputSet(String accessToken, CouponputSet couponputSet) { """ 卡券投放-设置门店卡券投放信息 调用设置门店卡劵投放信息接口后,用户可在连网流程中关注商家公众号之后,领取配置的卡券。需设置卡劵ID,投放的有效时间等。 @param accessToken accessToken @param couponputSet couponputSet @return BaseResult """ return couponputSet(accessToken, JsonUti...
java
public static BaseResult couponputSet(String accessToken, CouponputSet couponputSet) { return couponputSet(accessToken, JsonUtil.toJSONString(couponputSet)); }
[ "public", "static", "BaseResult", "couponputSet", "(", "String", "accessToken", ",", "CouponputSet", "couponputSet", ")", "{", "return", "couponputSet", "(", "accessToken", ",", "JsonUtil", ".", "toJSONString", "(", "couponputSet", ")", ")", ";", "}" ]
卡券投放-设置门店卡券投放信息 调用设置门店卡劵投放信息接口后,用户可在连网流程中关注商家公众号之后,领取配置的卡券。需设置卡劵ID,投放的有效时间等。 @param accessToken accessToken @param couponputSet couponputSet @return BaseResult
[ "卡券投放", "-", "设置门店卡券投放信息", "调用设置门店卡劵投放信息接口后,用户可在连网流程中关注商家公众号之后,领取配置的卡券。需设置卡劵ID,投放的有效时间等。" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/BizwifiAPI.java#L542-L544
apache/reef
lang/java/reef-bridge-proto-java/src/main/java/org/apache/reef/bridge/driver/client/JavaDriverClientLauncher.java
JavaDriverClientLauncher.getLauncher
private static JavaDriverClientLauncher getLauncher(final String clockConfigPath, final int driverServicePort) { """ Instantiate REEF DriverServiceLauncher. This method is called from REEFLauncher.main(). @param clockConfigPath Path to the local file that contains serialized configuration for the driver client. ...
java
private static JavaDriverClientLauncher getLauncher(final String clockConfigPath, final int driverServicePort) { try { final Configuration clockArgConfig = Configurations.merge( LAUNCHER_STATIC_CONFIG, DriverClientGrpcConfiguration.CONF .set(DriverClientGrpcConfiguration.DRIV...
[ "private", "static", "JavaDriverClientLauncher", "getLauncher", "(", "final", "String", "clockConfigPath", ",", "final", "int", "driverServicePort", ")", "{", "try", "{", "final", "Configuration", "clockArgConfig", "=", "Configurations", ".", "merge", "(", "LAUNCHER_S...
Instantiate REEF DriverServiceLauncher. This method is called from REEFLauncher.main(). @param clockConfigPath Path to the local file that contains serialized configuration for the driver client. @return An instance of the configured REEFLauncher object.
[ "Instantiate", "REEF", "DriverServiceLauncher", ".", "This", "method", "is", "called", "from", "REEFLauncher", ".", "main", "()", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-bridge-proto-java/src/main/java/org/apache/reef/bridge/driver/client/JavaDriverClientLauncher.java#L106-L121
wildfly/wildfly-core
jmx/src/main/java/org/jboss/as/jmx/model/ObjectNameAddressUtil.java
ObjectNameAddressUtil.resolvePathAddress
static PathAddress resolvePathAddress(final ObjectName domainRoot, final Resource rootResource, final ObjectName name) { """ Converts the ObjectName to a PathAddress. @param domainRoot the ObjectName used for mbean in the caller's JMX domain that represent the root management resource @param rootResource the r...
java
static PathAddress resolvePathAddress(final ObjectName domainRoot, final Resource rootResource, final ObjectName name) { String domain = domainRoot.getDomain(); if (!name.getDomain().equals(domain)) { return null; } if (name.equals(domainRoot)) { return PathAddres...
[ "static", "PathAddress", "resolvePathAddress", "(", "final", "ObjectName", "domainRoot", ",", "final", "Resource", "rootResource", ",", "final", "ObjectName", "name", ")", "{", "String", "domain", "=", "domainRoot", ".", "getDomain", "(", ")", ";", "if", "(", ...
Converts the ObjectName to a PathAddress. @param domainRoot the ObjectName used for mbean in the caller's JMX domain that represent the root management resource @param rootResource the root resource for the management model @param name the ObjectName to resolve @return the PathAddress if it exists in the model, {@cod...
[ "Converts", "the", "ObjectName", "to", "a", "PathAddress", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/jmx/src/main/java/org/jboss/as/jmx/model/ObjectNameAddressUtil.java#L193-L203
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/media/spi/MediaSource.java
MediaSource.resolveFirstMatchRenditions
private boolean resolveFirstMatchRenditions(Media media, Asset asset, MediaArgs mediaArgs) { """ Check if a matching rendition is found for any of the provided media formats and other media args. The first match is returned. @param media Media @param asset Asset @param mediaArgs Media args @return true if a r...
java
private boolean resolveFirstMatchRenditions(Media media, Asset asset, MediaArgs mediaArgs) { Rendition rendition = asset.getRendition(mediaArgs); if (rendition != null) { media.setRenditions(ImmutableList.of(rendition)); media.setUrl(rendition.getUrl()); return true; } return false; ...
[ "private", "boolean", "resolveFirstMatchRenditions", "(", "Media", "media", ",", "Asset", "asset", ",", "MediaArgs", "mediaArgs", ")", "{", "Rendition", "rendition", "=", "asset", ".", "getRendition", "(", "mediaArgs", ")", ";", "if", "(", "rendition", "!=", "...
Check if a matching rendition is found for any of the provided media formats and other media args. The first match is returned. @param media Media @param asset Asset @param mediaArgs Media args @return true if a rendition was found
[ "Check", "if", "a", "matching", "rendition", "is", "found", "for", "any", "of", "the", "provided", "media", "formats", "and", "other", "media", "args", ".", "The", "first", "match", "is", "returned", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/media/spi/MediaSource.java#L319-L327
ow2-chameleon/fuchsia
bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/KnIPDeviceMgmtAdapter.java
KnIPDeviceMgmtAdapter.setProperty
public void setProperty(int objIndex, int pid, int start, int elements, byte[] data) throws KNXTimeoutException, KNXRemoteException, KNXConnectionClosedException { """ /* (non-Javadoc) @see tuwien.auto.calimero.mgmt.PropertyAdapter#setProperty (int, int, int, int, byte[]) """ if (closed) throw new ...
java
public void setProperty(int objIndex, int pid, int start, int elements, byte[] data) throws KNXTimeoutException, KNXRemoteException, KNXConnectionClosedException { if (closed) throw new KNXIllegalStateException("adapter closed"); conn.send(new CEMIDevMgmt(CEMIDevMgmt.MC_PROPWRITE_REQ, getObjectType(objIn...
[ "public", "void", "setProperty", "(", "int", "objIndex", ",", "int", "pid", ",", "int", "start", ",", "int", "elements", ",", "byte", "[", "]", "data", ")", "throws", "KNXTimeoutException", ",", "KNXRemoteException", ",", "KNXConnectionClosedException", "{", "...
/* (non-Javadoc) @see tuwien.auto.calimero.mgmt.PropertyAdapter#setProperty (int, int, int, int, byte[])
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/KnIPDeviceMgmtAdapter.java#L195-L203
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetVMsInner.java
VirtualMachineScaleSetVMsInner.beginReimage
public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { """ Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scal...
java
public OperationStatusResponseInner beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { return beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().body(); }
[ "public", "OperationStatusResponseInner", "beginReimage", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "String", "instanceId", ")", "{", "return", "beginReimageWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ",", "ins...
Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceId The instance ID of the virtual machine. @throws IllegalArgumentException thrown if parameters fail the val...
[ "Reimages", "(", "upgrade", "the", "operating", "system", ")", "a", "specific", "virtual", "machine", "in", "a", "VM", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetVMsInner.java#L250-L252
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.setBigDecimal
public <T extends Model> T setBigDecimal(String attributeName, Object value) { """ Sets attribute value as <code>java.math.BigDecimal</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.math.BigDecimal</code>, given the value is an inst...
java
public <T extends Model> T setBigDecimal(String attributeName, Object value) { Converter<Object, BigDecimal> converter = modelRegistryLocal.converterForValue( attributeName, value, BigDecimal.class); return setRaw(attributeName, converter != null ? converter.convert(value) : Convert.toBi...
[ "public", "<", "T", "extends", "Model", ">", "T", "setBigDecimal", "(", "String", "attributeName", ",", "Object", "value", ")", "{", "Converter", "<", "Object", ",", "BigDecimal", ">", "converter", "=", "modelRegistryLocal", ".", "converterForValue", "(", "att...
Sets attribute value as <code>java.math.BigDecimal</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.math.BigDecimal</code>, given the value is an instance of <code>S</code>, then it will be used, otherwise performs a conversion using {@link...
[ "Sets", "attribute", "value", "as", "<code", ">", "java", ".", "math", ".", "BigDecimal<", "/", "code", ">", ".", "If", "there", "is", "a", "{", "@link", "Converter", "}", "registered", "for", "the", "attribute", "that", "converts", "from", "Class", "<co...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L1725-L1729
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsConfigurationReader.java
CmsConfigurationReader.parseFormatter
public CmsFormatterBean parseFormatter(String typeName, I_CmsXmlContentLocation node) { """ Parses a formatter bean.<p> @param typeName the type name for which the formatter is being parsed @param node the node from which to parse the formatter data @return the formatter bean from the XML """ S...
java
public CmsFormatterBean parseFormatter(String typeName, I_CmsXmlContentLocation node) { String type = getString(node.getSubValue(N_TYPE)); String minWidth = getString(node.getSubValue(N_MIN_WIDTH)); String maxWidth = getString(node.getSubValue(N_MAX_WIDTH)); boolean preview = false; ...
[ "public", "CmsFormatterBean", "parseFormatter", "(", "String", "typeName", ",", "I_CmsXmlContentLocation", "node", ")", "{", "String", "type", "=", "getString", "(", "node", ".", "getSubValue", "(", "N_TYPE", ")", ")", ";", "String", "minWidth", "=", "getString"...
Parses a formatter bean.<p> @param typeName the type name for which the formatter is being parsed @param node the node from which to parse the formatter data @return the formatter bean from the XML
[ "Parses", "a", "formatter", "bean", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsConfigurationReader.java#L535-L555
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java
JavacElements.matchAnnoToTree
private JCTree matchAnnoToTree(AnnotationMirror findme, Element e, JCTree tree) { """ Returns the tree for an annotation given the annotated element and the element's own tree. Returns null if the tree cannot be found. """ Symbol sym = cast(Symbol.class, e); ...
java
private JCTree matchAnnoToTree(AnnotationMirror findme, Element e, JCTree tree) { Symbol sym = cast(Symbol.class, e); class Vis extends JCTree.Visitor { List<JCAnnotation> result = null; public void visitPackageDef(JCPackageDecl tree) { ...
[ "private", "JCTree", "matchAnnoToTree", "(", "AnnotationMirror", "findme", ",", "Element", "e", ",", "JCTree", "tree", ")", "{", "Symbol", "sym", "=", "cast", "(", "Symbol", ".", "class", ",", "e", ")", ";", "class", "Vis", "extends", "JCTree", ".", "Vis...
Returns the tree for an annotation given the annotated element and the element's own tree. Returns null if the tree cannot be found.
[ "Returns", "the", "tree", "for", "an", "annotation", "given", "the", "annotated", "element", "and", "the", "element", "s", "own", "tree", ".", "Returns", "null", "if", "the", "tree", "cannot", "be", "found", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java#L257-L288
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java
ViewUtils.setText
public static void setText(Activity context, int field, String text) { """ Method used to set text for a TextView. @param context The current Context or Activity that this method is called from. @param field R.id.xxxx value for the text field. @param text Text to place in the text field. """ ...
java
public static void setText(Activity context, int field, String text) { View view = context.findViewById(field); if (view instanceof TextView) { ((TextView) view).setText(text); } else { Log.e("Caffeine", "ViewUtils.setText() given a field that is not a TextView"); ...
[ "public", "static", "void", "setText", "(", "Activity", "context", ",", "int", "field", ",", "String", "text", ")", "{", "View", "view", "=", "context", ".", "findViewById", "(", "field", ")", ";", "if", "(", "view", "instanceof", "TextView", ")", "{", ...
Method used to set text for a TextView. @param context The current Context or Activity that this method is called from. @param field R.id.xxxx value for the text field. @param text Text to place in the text field.
[ "Method", "used", "to", "set", "text", "for", "a", "TextView", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java#L201-L208
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/requests/restaction/pagination/PaginationAction.java
PaginationAction.takeAsync
public RequestFuture<List<T>> takeAsync(int amount) { """ Convenience method to retrieve an amount of entities from this pagination action. <br>This also includes already cached entities similar to {@link #forEachAsync(Procedure)}. @param amount The maximum amount to retrieve @return {@link net.dv8tion.jd...
java
public RequestFuture<List<T>> takeAsync(int amount) { return takeAsync0(amount, (task, list) -> forEachAsync(val -> { list.add(val); return list.size() < amount; }, task::completeExceptionally)); }
[ "public", "RequestFuture", "<", "List", "<", "T", ">", ">", "takeAsync", "(", "int", "amount", ")", "{", "return", "takeAsync0", "(", "amount", ",", "(", "task", ",", "list", ")", "->", "forEachAsync", "(", "val", "->", "{", "list", ".", "add", "(", ...
Convenience method to retrieve an amount of entities from this pagination action. <br>This also includes already cached entities similar to {@link #forEachAsync(Procedure)}. @param amount The maximum amount to retrieve @return {@link net.dv8tion.jda.core.requests.RequestFuture RequestFuture} - Type: {@link java.util...
[ "Convenience", "method", "to", "retrieve", "an", "amount", "of", "entities", "from", "this", "pagination", "action", ".", "<br", ">", "This", "also", "includes", "already", "cached", "entities", "similar", "to", "{", "@link", "#forEachAsync", "(", "Procedure", ...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/requests/restaction/pagination/PaginationAction.java#L329-L335
mapbox/mapbox-navigation-android
libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/route/FasterRouteDetector.java
FasterRouteDetector.validSecondStep
private boolean validSecondStep(LegStep secondStep, RouteProgress routeProgress) { """ The second step of the new route is valid if it equals the current route upcoming step. @param secondStep of the new route @param routeProgress current route progress @return true if valid, false if not """ return ...
java
private boolean validSecondStep(LegStep secondStep, RouteProgress routeProgress) { return routeProgress.currentLegProgress().upComingStep() != null && routeProgress.currentLegProgress().upComingStep().equals(secondStep); }
[ "private", "boolean", "validSecondStep", "(", "LegStep", "secondStep", ",", "RouteProgress", "routeProgress", ")", "{", "return", "routeProgress", ".", "currentLegProgress", "(", ")", ".", "upComingStep", "(", ")", "!=", "null", "&&", "routeProgress", ".", "curren...
The second step of the new route is valid if it equals the current route upcoming step. @param secondStep of the new route @param routeProgress current route progress @return true if valid, false if not
[ "The", "second", "step", "of", "the", "new", "route", "is", "valid", "if", "it", "equals", "the", "current", "route", "upcoming", "step", "." ]
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/route/FasterRouteDetector.java#L88-L91
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java
CommercePriceListPersistenceImpl.findByG_NotS
@Override public List<CommercePriceList> findByG_NotS(long groupId, int status, int start, int end) { """ Returns a range of all the commerce price lists where groupId = &#63; and status &ne; &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</cod...
java
@Override public List<CommercePriceList> findByG_NotS(long groupId, int status, int start, int end) { return findByG_NotS(groupId, status, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommercePriceList", ">", "findByG_NotS", "(", "long", "groupId", ",", "int", "status", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_NotS", "(", "groupId", ",", "status", ",", "start", ",", ...
Returns a range of all the commerce price lists where groupId = &#63; and status &ne; &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the ...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "price", "lists", "where", "groupId", "=", "&#63", ";", "and", "status", "&ne", ";", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java#L3848-L3852
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageMiscOps.java
ImageMiscOps.fillUniform
public static void fillUniform(GrayF64 img, Random rand , double min , double max) { """ Sets each value in the image to a value drawn from an uniform distribution that has a range of min &le; X &lt; max. @param img Image which is to be filled. Modified, @param rand Random number generator @param min Minimum...
java
public static void fillUniform(GrayF64 img, Random rand , double min , double max) { double range = max-min; double[] data = img.data; for (int y = 0; y < img.height; y++) { int index = img.getStartIndex() + y * img.getStride(); for (int x = 0; x < img.width; x++) { data[index++] = rand.nextDouble()*r...
[ "public", "static", "void", "fillUniform", "(", "GrayF64", "img", ",", "Random", "rand", ",", "double", "min", ",", "double", "max", ")", "{", "double", "range", "=", "max", "-", "min", ";", "double", "[", "]", "data", "=", "img", ".", "data", ";", ...
Sets each value in the image to a value drawn from an uniform distribution that has a range of min &le; X &lt; max. @param img Image which is to be filled. Modified, @param rand Random number generator @param min Minimum value of the distribution, inclusive @param max Maximum value of the distribution, inclusive
[ "Sets", "each", "value", "in", "the", "image", "to", "a", "value", "drawn", "from", "an", "uniform", "distribution", "that", "has", "a", "range", "of", "min", "&le", ";", "X", "&lt", ";", "max", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageMiscOps.java#L2992-L3003
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java
SourceTreeManager.parseToNode
public int parseToNode(Source source, SourceLocator locator, XPathContext xctxt) throws TransformerException { """ Try to create a DOM source tree from the input source. @param source The Source object that identifies the source node. @param locator The location of the caller, for diagnostic purposes...
java
public int parseToNode(Source source, SourceLocator locator, XPathContext xctxt) throws TransformerException { try { Object xowner = xctxt.getOwnerObject(); DTM dtm; if(null != xowner && xowner instanceof org.apache.xml.dtm.DTMWSFilter) { dtm = xctxt.getDTM(sou...
[ "public", "int", "parseToNode", "(", "Source", "source", ",", "SourceLocator", "locator", ",", "XPathContext", "xctxt", ")", "throws", "TransformerException", "{", "try", "{", "Object", "xowner", "=", "xctxt", ".", "getOwnerObject", "(", ")", ";", "DTM", "dtm"...
Try to create a DOM source tree from the input source. @param source The Source object that identifies the source node. @param locator The location of the caller, for diagnostic purposes. @return non-null reference to node identified by the source argument. @throws TransformerException if the source argument can not...
[ "Try", "to", "create", "a", "DOM", "source", "tree", "from", "the", "input", "source", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java#L300-L325
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/db/SQLUtils.java
SQLUtils.closeResultSetStatement
public static void closeResultSetStatement(ResultSet resultSet, String sql) { """ Close the ResultSet Statement from which it was created, which closes all ResultSets as well @param resultSet result set @param sql sql statement """ if (resultSet != null) { try { resultSet.getStatement().close()...
java
public static void closeResultSetStatement(ResultSet resultSet, String sql) { if (resultSet != null) { try { resultSet.getStatement().close(); } catch (SQLException e) { log.log(Level.WARNING, "Failed to close SQL ResultSet: " + sql, e); } } }
[ "public", "static", "void", "closeResultSetStatement", "(", "ResultSet", "resultSet", ",", "String", "sql", ")", "{", "if", "(", "resultSet", "!=", "null", ")", "{", "try", "{", "resultSet", ".", "getStatement", "(", ")", ".", "close", "(", ")", ";", "}"...
Close the ResultSet Statement from which it was created, which closes all ResultSets as well @param resultSet result set @param sql sql statement
[ "Close", "the", "ResultSet", "Statement", "from", "which", "it", "was", "created", "which", "closes", "all", "ResultSets", "as", "well" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/db/SQLUtils.java#L573-L582
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java
ProxyDataSourceBuilder.logSlowQueryBySlf4j
public ProxyDataSourceBuilder logSlowQueryBySlf4j(long thresholdTime, TimeUnit timeUnit, SLF4JLogLevel logLevel, String loggerName) { """ Register {@link SLF4JSlowQueryListener}. @param thresholdTime slow query threshold time @param timeUnit slow query threshold time unit @param logLevel log level f...
java
public ProxyDataSourceBuilder logSlowQueryBySlf4j(long thresholdTime, TimeUnit timeUnit, SLF4JLogLevel logLevel, String loggerName) { this.createSlf4jSlowQueryListener = true; this.slowQueryThreshold = thresholdTime; this.slowQueryTimeUnit = timeUnit; this.slf4jSlowQueryLogLevel = logLev...
[ "public", "ProxyDataSourceBuilder", "logSlowQueryBySlf4j", "(", "long", "thresholdTime", ",", "TimeUnit", "timeUnit", ",", "SLF4JLogLevel", "logLevel", ",", "String", "loggerName", ")", "{", "this", ".", "createSlf4jSlowQueryListener", "=", "true", ";", "this", ".", ...
Register {@link SLF4JSlowQueryListener}. @param thresholdTime slow query threshold time @param timeUnit slow query threshold time unit @param logLevel log level for slf4j @param loggerName slf4j logger name @return builder @since 1.4.1
[ "Register", "{", "@link", "SLF4JSlowQueryListener", "}", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/support/ProxyDataSourceBuilder.java#L375-L382
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/webhook/WebhookMessage.java
WebhookMessage.from
public static WebhookMessage from(Message message) { """ Creates a new WebhookMessage instance with the provided {@link net.dv8tion.jda.core.entities.Message Message} as layout for copying. <br><b>This does not copy the attachments of the provided message!</b> @param message The message to copy @throws j...
java
public static WebhookMessage from(Message message) { Checks.notNull(message, "Message"); final String content = message.getContentRaw(); final List<MessageEmbed> embeds = message.getEmbeds(); final boolean isTTS = message.isTTS(); return new WebhookMessage(null, null, content...
[ "public", "static", "WebhookMessage", "from", "(", "Message", "message", ")", "{", "Checks", ".", "notNull", "(", "message", ",", "\"Message\"", ")", ";", "final", "String", "content", "=", "message", ".", "getContentRaw", "(", ")", ";", "final", "List", "...
Creates a new WebhookMessage instance with the provided {@link net.dv8tion.jda.core.entities.Message Message} as layout for copying. <br><b>This does not copy the attachments of the provided message!</b> @param message The message to copy @throws java.lang.IllegalArgumentException If the provided message is {@code n...
[ "Creates", "a", "new", "WebhookMessage", "instance", "with", "the", "provided", "{", "@link", "net", ".", "dv8tion", ".", "jda", ".", "core", ".", "entities", ".", "Message", "Message", "}", "as", "layout", "for", "copying", ".", "<br", ">", "<b", ">", ...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/webhook/WebhookMessage.java#L220-L227
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java
Bytes.putShort
public static int putShort(byte[] bytes, int offset, short val) { """ Put a short value out to the specified byte array position. @param bytes the byte array @param offset position in the array @param val short to write out @return incremented offset @throws IllegalArgumentException if the byte array given do...
java
public static int putShort(byte[] bytes, int offset, short val) { if (bytes.length - offset < SIZEOF_SHORT) { throw new IllegalArgumentException("Not enough room to put a short at" + " offset " + offset + " in a " + bytes.length + " byte array"); } bytes[offset + 1] = (byte) val; val >>=...
[ "public", "static", "int", "putShort", "(", "byte", "[", "]", "bytes", ",", "int", "offset", ",", "short", "val", ")", "{", "if", "(", "bytes", ".", "length", "-", "offset", "<", "SIZEOF_SHORT", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
Put a short value out to the specified byte array position. @param bytes the byte array @param offset position in the array @param val short to write out @return incremented offset @throws IllegalArgumentException if the byte array given doesn't have enough room at the offset specified.
[ "Put", "a", "short", "value", "out", "to", "the", "specified", "byte", "array", "position", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java#L676-L685
unbescape/unbescape
src/main/java/org/unbescape/html/HtmlEscape.java
HtmlEscape.escapeHtml4
public static void escapeHtml4(final char[] text, final int offset, final int len, final Writer writer) throws IOException { """ <p> Perform an HTML 4 level 2 (result is ASCII) <strong>escape</strong> operation on a <tt>char[]</tt> input. </p> <p> <em>Level 2</em> means this ...
java
public static void escapeHtml4(final char[] text, final int offset, final int len, final Writer writer) throws IOException { escapeHtml(text, offset, len, writer, HtmlEscapeType.HTML4_NAMED_REFERENCES_DEFAULT_TO_DECIMAL, HtmlEscapeLevel.LEVEL_2_ALL_NON_ASCII_PL...
[ "public", "static", "void", "escapeHtml4", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeHtml", "(", "text", ",", "offset", "...
<p> Perform an HTML 4 level 2 (result is ASCII) <strong>escape</strong> operation on a <tt>char[]</tt> input. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The five markup-significant characters: <tt>&lt;</tt>, <tt>&gt;</tt>, <tt>&amp;</tt>, <tt>&quot;</tt> and <tt>&#39;</tt></li> <li>All non A...
[ "<p", ">", "Perform", "an", "HTML", "4", "level", "2", "(", "result", "is", "ASCII", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/html/HtmlEscape.java#L957-L961
ModeShape/modeshape
index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsClient.java
EsClient.storeDocument
public boolean storeDocument(String name, String type, String id, EsRequest doc) throws IOException { """ Indexes document. @param name the name of the index. @param type index type @param id document id @param doc document @return true if document was indexed. @throws IOException """ ...
java
public boolean storeDocument(String name, String type, String id, EsRequest doc) throws IOException { CloseableHttpClient client = HttpClients.createDefault(); HttpPost method = new HttpPost(String.format("http://%s:%d/%s/%s/%s", host, port, name, type, id)); try { String...
[ "public", "boolean", "storeDocument", "(", "String", "name", ",", "String", "type", ",", "String", "id", ",", "EsRequest", "doc", ")", "throws", "IOException", "{", "CloseableHttpClient", "client", "=", "HttpClients", ".", "createDefault", "(", ")", ";", "Http...
Indexes document. @param name the name of the index. @param type index type @param id document id @param doc document @return true if document was indexed. @throws IOException
[ "Indexes", "document", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/index-providers/modeshape-elasticsearch-index-provider/src/main/java/org/modeshape/jcr/index/elasticsearch/client/EsClient.java#L125-L138
spring-cloud/spring-cloud-config
spring-cloud-config-monitor/src/main/java/org/springframework/cloud/config/monitor/GiteaPropertyPathNotificationExtractor.java
GiteaPropertyPathNotificationExtractor.addPaths
@Override protected void addPaths(Set<String> paths, Collection<Map<String, Object>> commits) { """ gitea doesn't return which files have been added/modified/deleted yet. related issue: https://github.com/go-gitea/gitea/issues/4313 """ paths.add("application.yml"); }
java
@Override protected void addPaths(Set<String> paths, Collection<Map<String, Object>> commits) { paths.add("application.yml"); }
[ "@", "Override", "protected", "void", "addPaths", "(", "Set", "<", "String", ">", "paths", ",", "Collection", "<", "Map", "<", "String", ",", "Object", ">", ">", "commits", ")", "{", "paths", ".", "add", "(", "\"application.yml\"", ")", ";", "}" ]
gitea doesn't return which files have been added/modified/deleted yet. related issue: https://github.com/go-gitea/gitea/issues/4313
[ "gitea", "doesn", "t", "return", "which", "files", "have", "been", "added", "/", "modified", "/", "deleted", "yet", "." ]
train
https://github.com/spring-cloud/spring-cloud-config/blob/6b99631f78bac4e1b521d2cc126c8b2da45d1f1f/spring-cloud-config-monitor/src/main/java/org/springframework/cloud/config/monitor/GiteaPropertyPathNotificationExtractor.java#L44-L47
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobsInner.java
JobsInner.getAsync
public Observable<JobInner> getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName) { """ Gets a job. @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 server...
java
public Observable<JobInner> getAsync(String resourceGroupName, String serverName, String jobAgentName, String jobName) { return getWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName).map(new Func1<ServiceResponse<JobInner>, JobInner>() { @Override public JobInn...
[ "public", "Observable", "<", "JobInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "jobAgentName", ",", "String", "jobName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "ser...
Gets a job. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent. @param jobName The name of the job to get. @throws Illega...
[ "Gets", "a", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobsInner.java#L258-L265
lisicnu/droidUtil
src/main/java/com/github/lisicnu/libDroid/util/BitmapUtils.java
BitmapUtils.writeToFile
public static boolean writeToFile(Bitmap bmp, String fileName) { """ write bitmap to file. @param bmp @param fileName @return whether the file has been created success. """ if (bmp == null || StringUtils.isNullOrEmpty(fileName)) return false; FileOutputStream fos = null; ...
java
public static boolean writeToFile(Bitmap bmp, String fileName) { if (bmp == null || StringUtils.isNullOrEmpty(fileName)) return false; FileOutputStream fos = null; try { fos = new FileOutputStream(fileName); bmp.compress(CompressFormat.PNG, 100, fos); ...
[ "public", "static", "boolean", "writeToFile", "(", "Bitmap", "bmp", ",", "String", "fileName", ")", "{", "if", "(", "bmp", "==", "null", "||", "StringUtils", ".", "isNullOrEmpty", "(", "fileName", ")", ")", "return", "false", ";", "FileOutputStream", "fos", ...
write bitmap to file. @param bmp @param fileName @return whether the file has been created success.
[ "write", "bitmap", "to", "file", "." ]
train
https://github.com/lisicnu/droidUtil/blob/e4d6cf3e3f60e5efb5a75672607ded94d1725519/src/main/java/com/github/lisicnu/libDroid/util/BitmapUtils.java#L218-L240
BotMill/fb-botmill
src/main/java/co/aurasphere/botmill/fb/internal/util/json/FbBotMillJsonUtils.java
FbBotMillJsonUtils.fromJson
public static <T> T fromJson(String json, Class<T> T) { """ From json. @param <T> the generic type @param json the string from which the object is to be deserialized. @param T the type of the desired object. @return an object of type T from the string. Returns null if json is null. @see Gson#fromJson(St...
java
public static <T> T fromJson(String json, Class<T> T) { return getGson().fromJson(json, T); }
[ "public", "static", "<", "T", ">", "T", "fromJson", "(", "String", "json", ",", "Class", "<", "T", ">", "T", ")", "{", "return", "getGson", "(", ")", ".", "fromJson", "(", "json", ",", "T", ")", ";", "}" ]
From json. @param <T> the generic type @param json the string from which the object is to be deserialized. @param T the type of the desired object. @return an object of type T from the string. Returns null if json is null. @see Gson#fromJson(String, Class)
[ "From", "json", "." ]
train
https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/internal/util/json/FbBotMillJsonUtils.java#L109-L111
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsConfigurationReader.java
CmsConfigurationReader.parseSitemapConfiguration
public CmsADEConfigDataInternal parseSitemapConfiguration(String basePath, CmsResource configRes) throws CmsException { """ Parses the sitemap configuration given the configuration file and base path.<p> @param basePath the base path @param configRes the configuration file resource @return the parsed conf...
java
public CmsADEConfigDataInternal parseSitemapConfiguration(String basePath, CmsResource configRes) throws CmsException { LOG.info("Parsing configuration " + configRes.getRootPath()); CmsFile configFile = m_cms.readFile(configRes); CmsXmlContent content = CmsXmlContentFactory.unmarshal(m_cms,...
[ "public", "CmsADEConfigDataInternal", "parseSitemapConfiguration", "(", "String", "basePath", ",", "CmsResource", "configRes", ")", "throws", "CmsException", "{", "LOG", ".", "info", "(", "\"Parsing configuration \"", "+", "configRes", ".", "getRootPath", "(", ")", ")...
Parses the sitemap configuration given the configuration file and base path.<p> @param basePath the base path @param configRes the configuration file resource @return the parsed configuration data @throws CmsException if something goes wrong
[ "Parses", "the", "sitemap", "configuration", "given", "the", "configuration", "file", "and", "base", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsConfigurationReader.java#L736-L743
minio/minio-java
api/src/main/java/io/minio/MinioClient.java
MinioClient.setTimeout
public void setTimeout(long connectTimeout, long writeTimeout, long readTimeout) { """ Sets HTTP connect, write and read timeouts. A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds. </p><b>Example:</b><br> <pre>{@code minioClient.setTimeout...
java
public void setTimeout(long connectTimeout, long writeTimeout, long readTimeout) { this.httpClient = this.httpClient.newBuilder() .connectTimeout(connectTimeout, TimeUnit.MILLISECONDS) .writeTimeout(writeTimeout, TimeUnit.MILLISECONDS) .readTimeout(readTimeout, TimeUnit.MILLISECONDS) .build(...
[ "public", "void", "setTimeout", "(", "long", "connectTimeout", ",", "long", "writeTimeout", ",", "long", "readTimeout", ")", "{", "this", ".", "httpClient", "=", "this", ".", "httpClient", ".", "newBuilder", "(", ")", ".", "connectTimeout", "(", "connectTimeou...
Sets HTTP connect, write and read timeouts. A value of 0 means no timeout, otherwise values must be between 1 and Integer.MAX_VALUE when converted to milliseconds. </p><b>Example:</b><br> <pre>{@code minioClient.setTimeout(TimeUnit.SECONDS.toMillis(10), TimeUnit.SECONDS.toMillis(10), TimeUnit.SECONDS.toMillis(30)); }...
[ "Sets", "HTTP", "connect", "write", "and", "read", "timeouts", ".", "A", "value", "of", "0", "means", "no", "timeout", "otherwise", "values", "must", "be", "between", "1", "and", "Integer", ".", "MAX_VALUE", "when", "converted", "to", "milliseconds", "." ]
train
https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L796-L802
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/widget/editor/provider/AbstractDataProvider.java
AbstractDataProvider.getDetailObject
public final Object getDetailObject(Object selectedObject, boolean forceLoad) { """ A basic implementation that directs the necessary logic to {@link #isDetailObject(Object)} and {@link #loadDetailObject(Object)}. """ if (forceLoad || !isDetailObject(selectedObject)) return loadDetailObjec...
java
public final Object getDetailObject(Object selectedObject, boolean forceLoad) { if (forceLoad || !isDetailObject(selectedObject)) return loadDetailObject(selectedObject); return selectedObject; }
[ "public", "final", "Object", "getDetailObject", "(", "Object", "selectedObject", ",", "boolean", "forceLoad", ")", "{", "if", "(", "forceLoad", "||", "!", "isDetailObject", "(", "selectedObject", ")", ")", "return", "loadDetailObject", "(", "selectedObject", ")", ...
A basic implementation that directs the necessary logic to {@link #isDetailObject(Object)} and {@link #loadDetailObject(Object)}.
[ "A", "basic", "implementation", "that", "directs", "the", "necessary", "logic", "to", "{" ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/widget/editor/provider/AbstractDataProvider.java#L50-L55
airbnb/lottie-android
lottie/src/main/java/com/airbnb/lottie/TextDelegate.java
TextDelegate.setText
public void setText(String input, String output) { """ Update the text that will be rendered for the given input text. """ stringMap.put(input, output); invalidate(); }
java
public void setText(String input, String output) { stringMap.put(input, output); invalidate(); }
[ "public", "void", "setText", "(", "String", "input", ",", "String", "output", ")", "{", "stringMap", ".", "put", "(", "input", ",", "output", ")", ";", "invalidate", "(", ")", ";", "}" ]
Update the text that will be rendered for the given input text.
[ "Update", "the", "text", "that", "will", "be", "rendered", "for", "the", "given", "input", "text", "." ]
train
https://github.com/airbnb/lottie-android/blob/126dabdc9f586c87822f85fe1128cdad439d30fa/lottie/src/main/java/com/airbnb/lottie/TextDelegate.java#L54-L57
alkacon/opencms-core
src/org/opencms/ade/galleries/A_CmsTreeTabDataPreloader.java
A_CmsTreeTabDataPreloader.getCommonAncestorPath
private String getCommonAncestorPath(String rootPath1, String rootPath2) { """ Gets the common ancestor of two paths.<p> @param rootPath1 the first path @param rootPath2 the second path @return the common ancestor path """ if (rootPath1 == null) { return rootPath2; } ...
java
private String getCommonAncestorPath(String rootPath1, String rootPath2) { if (rootPath1 == null) { return rootPath2; } if (rootPath2 == null) { return rootPath1; } rootPath1 = CmsStringUtil.joinPaths("/", rootPath1, "/"); rootPath2 = Cms...
[ "private", "String", "getCommonAncestorPath", "(", "String", "rootPath1", ",", "String", "rootPath2", ")", "{", "if", "(", "rootPath1", "==", "null", ")", "{", "return", "rootPath2", ";", "}", "if", "(", "rootPath2", "==", "null", ")", "{", "return", "root...
Gets the common ancestor of two paths.<p> @param rootPath1 the first path @param rootPath2 the second path @return the common ancestor path
[ "Gets", "the", "common", "ancestor", "of", "two", "paths", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/galleries/A_CmsTreeTabDataPreloader.java#L270-L296
alkacon/opencms-core
src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java
CmsXmlContentPropertyHelper.getFileValueForIdOrUri
protected static CmsVfsFileValueBean getFileValueForIdOrUri(CmsObject cms, String idOrUri) throws CmsException { """ Given a string which might be a id or a (sitemap or VFS) URI, this method will return a bean containing the right (sitemap or vfs) root path and (sitemap entry or structure) id.<p> @param cms th...
java
protected static CmsVfsFileValueBean getFileValueForIdOrUri(CmsObject cms, String idOrUri) throws CmsException { CmsVfsFileValueBean result; if (CmsUUID.isValidUUID(idOrUri)) { CmsUUID id = new CmsUUID(idOrUri); String uri = getUriForId(cms, id); result = new CmsVfsF...
[ "protected", "static", "CmsVfsFileValueBean", "getFileValueForIdOrUri", "(", "CmsObject", "cms", ",", "String", "idOrUri", ")", "throws", "CmsException", "{", "CmsVfsFileValueBean", "result", ";", "if", "(", "CmsUUID", ".", "isValidUUID", "(", "idOrUri", ")", ")", ...
Given a string which might be a id or a (sitemap or VFS) URI, this method will return a bean containing the right (sitemap or vfs) root path and (sitemap entry or structure) id.<p> @param cms the current CMS context @param idOrUri a string containing an id or an URI @return a bean containing a root path and an id @t...
[ "Given", "a", "string", "which", "might", "be", "a", "id", "or", "a", "(", "sitemap", "or", "VFS", ")", "URI", "this", "method", "will", "return", "a", "bean", "containing", "the", "right", "(", "sitemap", "or", "vfs", ")", "root", "path", "and", "("...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/content/CmsXmlContentPropertyHelper.java#L913-L927
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java
ExtensionsInner.disableMonitoring
public void disableMonitoring(String resourceGroupName, String clusterName) { """ Disables the Operations Management Suite (OMS) on the HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown if parameters ...
java
public void disableMonitoring(String resourceGroupName, String clusterName) { disableMonitoringWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().last().body(); }
[ "public", "void", "disableMonitoring", "(", "String", "resourceGroupName", ",", "String", "clusterName", ")", "{", "disableMonitoringWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName", ")", ".", "toBlocking", "(", ")", ".", "last", "(", ")", "."...
Disables the Operations Management Suite (OMS) on the HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by ser...
[ "Disables", "the", "Operations", "Management", "Suite", "(", "OMS", ")", "on", "the", "HDInsight", "cluster", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java#L366-L368
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ParallelRunner.java
ParallelRunner.movePath
public void movePath(final Path src, final FileSystem dstFs, final Path dst, final Optional<String> group) { """ Move a {@link Path}. <p> This method submits a task to move a {@link Path} and returns immediately after the task is submitted. </p> @param src path to be moved @param dstFs the destination {@...
java
public void movePath(final Path src, final FileSystem dstFs, final Path dst, final Optional<String> group) { movePath(src, dstFs, dst, false, group); }
[ "public", "void", "movePath", "(", "final", "Path", "src", ",", "final", "FileSystem", "dstFs", ",", "final", "Path", "dst", ",", "final", "Optional", "<", "String", ">", "group", ")", "{", "movePath", "(", "src", ",", "dstFs", ",", "dst", ",", "false"...
Move a {@link Path}. <p> This method submits a task to move a {@link Path} and returns immediately after the task is submitted. </p> @param src path to be moved @param dstFs the destination {@link FileSystem} @param dst the destination path @param group an optional group name for the destination path
[ "Move", "a", "{", "@link", "Path", "}", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ParallelRunner.java#L296-L298
lucee/Lucee
core/src/main/java/lucee/runtime/ComponentScopeShadow.java
ComponentScopeShadow.setEL
@Override public Object setEL(PageContext pc, Collection.Key propertyName, Object value) { """ /* public Object setEL(PageContext pc, String propertyName, Object value) { return setEL(propertyName, value); } """ return setEL(propertyName, value); }
java
@Override public Object setEL(PageContext pc, Collection.Key propertyName, Object value) { return setEL(propertyName, value); }
[ "@", "Override", "public", "Object", "setEL", "(", "PageContext", "pc", ",", "Collection", ".", "Key", "propertyName", ",", "Object", "value", ")", "{", "return", "setEL", "(", "propertyName", ",", "value", ")", ";", "}" ]
/* public Object setEL(PageContext pc, String propertyName, Object value) { return setEL(propertyName, value); }
[ "/", "*", "public", "Object", "setEL", "(", "PageContext", "pc", "String", "propertyName", "Object", "value", ")", "{", "return", "setEL", "(", "propertyName", "value", ")", ";", "}" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/ComponentScopeShadow.java#L363-L366
openbaton/openbaton-client
sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceRecordAgent.java
NetworkServiceRecordAgent.getVNFDependency
@Help( help = "Get the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id" ) public VNFRecordDependency getVNFDependency(final String idNsr, final String idVnfrDep) throws SDKException { """ Returns a specific VNFRecordDependency from a particular NetworkServic...
java
@Help( help = "Get the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id" ) public VNFRecordDependency getVNFDependency(final String idNsr, final String idVnfrDep) throws SDKException { String url = idNsr + "/vnfdependencies" + "/" + idVnfrDep; return (VNFR...
[ "@", "Help", "(", "help", "=", "\"Get the VirtualNetworkFunctionRecord Dependency of a NetworkServiceRecord with specific id\"", ")", "public", "VNFRecordDependency", "getVNFDependency", "(", "final", "String", "idNsr", ",", "final", "String", "idVnfrDep", ")", "throws", "SDK...
Returns a specific VNFRecordDependency from a particular NetworkServiceRecord. @param idNsr the ID of the NetworkServiceRecord @param idVnfrDep the ID of the requested VNFRecordDependency @return the VNFRecordDependency @throws SDKException if the request fails
[ "Returns", "a", "specific", "VNFRecordDependency", "from", "a", "particular", "NetworkServiceRecord", "." ]
train
https://github.com/openbaton/openbaton-client/blob/6ca6dd6b62a23940d312213d6fa489d5b636061a/sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceRecordAgent.java#L432-L440
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/TreePath.java
TreePath.getPath
public static TreePath getPath(CompilationUnitTree unit, Tree target) { """ Returns a tree path for a tree node within a compilation unit, or {@code null} if the node is not found. @param unit the compilation unit to search @param target the node to locate @return the tree path """ return getPath(n...
java
public static TreePath getPath(CompilationUnitTree unit, Tree target) { return getPath(new TreePath(unit), target); }
[ "public", "static", "TreePath", "getPath", "(", "CompilationUnitTree", "unit", ",", "Tree", "target", ")", "{", "return", "getPath", "(", "new", "TreePath", "(", "unit", ")", ",", "target", ")", ";", "}" ]
Returns a tree path for a tree node within a compilation unit, or {@code null} if the node is not found. @param unit the compilation unit to search @param target the node to locate @return the tree path
[ "Returns", "a", "tree", "path", "for", "a", "tree", "node", "within", "a", "compilation", "unit", "or", "{" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/TreePath.java#L48-L50
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/ArtifactoryServer.java
ArtifactoryServer.createArtifactoryClient
public ArtifactoryBuildInfoClient createArtifactoryClient(String userName, String password, ProxyConfiguration proxyConfiguration) { """ This method might run on slaves, this is why we provide it with a proxy from the master config """ retur...
java
public ArtifactoryBuildInfoClient createArtifactoryClient(String userName, String password, ProxyConfiguration proxyConfiguration) { return createArtifactoryClient(userName, password, proxyConfiguration, new NullLog()); }
[ "public", "ArtifactoryBuildInfoClient", "createArtifactoryClient", "(", "String", "userName", ",", "String", "password", ",", "ProxyConfiguration", "proxyConfiguration", ")", "{", "return", "createArtifactoryClient", "(", "userName", ",", "password", ",", "proxyConfiguratio...
This method might run on slaves, this is why we provide it with a proxy from the master config
[ "This", "method", "might", "run", "on", "slaves", "this", "is", "why", "we", "provide", "it", "with", "a", "proxy", "from", "the", "master", "config" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/ArtifactoryServer.java#L281-L284
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/ProfileHandler.java
ProfileHandler.removeMultiValueForKey
@Deprecated public void removeMultiValueForKey(String key, String value) { """ Remove a unique value from a multi-value user profile property <p/> If the key currently contains a scalar value, prior to performing the remove operation the key will be promoted to a multi-value property with the current value ...
java
@Deprecated public void removeMultiValueForKey(String key, String value) { CleverTapAPI cleverTapAPI = weakReference.get(); if (cleverTapAPI == null) { Logger.d("CleverTap Instance is null."); } else { cleverTapAPI.removeMultiValueForKey(key, value); } }
[ "@", "Deprecated", "public", "void", "removeMultiValueForKey", "(", "String", "key", ",", "String", "value", ")", "{", "CleverTapAPI", "cleverTapAPI", "=", "weakReference", ".", "get", "(", ")", ";", "if", "(", "cleverTapAPI", "==", "null", ")", "{", "Logger...
Remove a unique value from a multi-value user profile property <p/> If the key currently contains a scalar value, prior to performing the remove operation the key will be promoted to a multi-value property with the current value cast to a string. If the multi-value property is empty after the remove operation, the key ...
[ "Remove", "a", "unique", "value", "from", "a", "multi", "-", "value", "user", "profile", "property", "<p", "/", ">", "If", "the", "key", "currently", "contains", "a", "scalar", "value", "prior", "to", "performing", "the", "remove", "operation", "the", "key...
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/ProfileHandler.java#L96-L104
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/HTTPFaxClientSpi.java
HTTPFaxClientSpi.submitHTTPRequest
protected HTTPResponse submitHTTPRequest(FaxJob faxJob,HTTPRequest httpRequest,FaxActionType faxActionType) { """ Submits the HTTP request and returns the HTTP response. @param faxJob The fax job object @param httpRequest The HTTP request to send @param faxActionType The fax action type @return The...
java
protected HTTPResponse submitHTTPRequest(FaxJob faxJob,HTTPRequest httpRequest,FaxActionType faxActionType) { HTTPResponse httpResponse=null; if(httpRequest==null) { this.throwUnsupportedException(); } else { //setup default header properties ...
[ "protected", "HTTPResponse", "submitHTTPRequest", "(", "FaxJob", "faxJob", ",", "HTTPRequest", "httpRequest", ",", "FaxActionType", "faxActionType", ")", "{", "HTTPResponse", "httpResponse", "=", "null", ";", "if", "(", "httpRequest", "==", "null", ")", "{", "this...
Submits the HTTP request and returns the HTTP response. @param faxJob The fax job object @param httpRequest The HTTP request to send @param faxActionType The fax action type @return The HTTP response
[ "Submits", "the", "HTTP", "request", "and", "returns", "the", "HTTP", "response", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/HTTPFaxClientSpi.java#L567-L615
codescape/bitvunit
bitvunit-core/src/main/java/de/codescape/bitvunit/util/html/HtmlPageUtil.java
HtmlPageUtil.toHtmlPage
public static HtmlPage toHtmlPage(InputStream inputStream) { """ Creates a {@link HtmlPage} from a given {@link InputStream} that reads the HTML code for that page. @param inputStream {@link InputStream} that reads the HTML code @return {@link HtmlPage} for this {@link InputStream} """ try { ...
java
public static HtmlPage toHtmlPage(InputStream inputStream) { try { return toHtmlPage(IOUtils.toString(inputStream)); } catch (IOException e) { throw new RuntimeException("Error creating HtmlPage from InputStream.", e); } }
[ "public", "static", "HtmlPage", "toHtmlPage", "(", "InputStream", "inputStream", ")", "{", "try", "{", "return", "toHtmlPage", "(", "IOUtils", ".", "toString", "(", "inputStream", ")", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "ne...
Creates a {@link HtmlPage} from a given {@link InputStream} that reads the HTML code for that page. @param inputStream {@link InputStream} that reads the HTML code @return {@link HtmlPage} for this {@link InputStream}
[ "Creates", "a", "{", "@link", "HtmlPage", "}", "from", "a", "given", "{", "@link", "InputStream", "}", "that", "reads", "the", "HTML", "code", "for", "that", "page", "." ]
train
https://github.com/codescape/bitvunit/blob/cef6d9af60d684e41294981c10b6d92c8f063a4e/bitvunit-core/src/main/java/de/codescape/bitvunit/util/html/HtmlPageUtil.java#L47-L53
SonarSource/sonarqube
server/sonar-server/src/main/java/org/sonar/server/plugins/ws/PluginWSCommons.java
PluginWSCommons.writeUpdateCenterProperties
public static void writeUpdateCenterProperties(JsonWriter json, Optional<UpdateCenter> updateCenter) { """ Write properties of the specified UpdateCenter to the specified JsonWriter. <pre> "updateCenterRefresh": "2015-04-24T16:08:36+0200" </pre> """ if (updateCenter.isPresent()) { json.propDateTim...
java
public static void writeUpdateCenterProperties(JsonWriter json, Optional<UpdateCenter> updateCenter) { if (updateCenter.isPresent()) { json.propDateTime(PROPERTY_UPDATE_CENTER_REFRESH, updateCenter.get().getDate()); } }
[ "public", "static", "void", "writeUpdateCenterProperties", "(", "JsonWriter", "json", ",", "Optional", "<", "UpdateCenter", ">", "updateCenter", ")", "{", "if", "(", "updateCenter", ".", "isPresent", "(", ")", ")", "{", "json", ".", "propDateTime", "(", "PROPE...
Write properties of the specified UpdateCenter to the specified JsonWriter. <pre> "updateCenterRefresh": "2015-04-24T16:08:36+0200" </pre>
[ "Write", "properties", "of", "the", "specified", "UpdateCenter", "to", "the", "specified", "JsonWriter", ".", "<pre", ">", "updateCenterRefresh", ":", "2015", "-", "04", "-", "24T16", ":", "08", ":", "36", "+", "0200", "<", "/", "pre", ">" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server/src/main/java/org/sonar/server/plugins/ws/PluginWSCommons.java#L232-L236
Azure/azure-sdk-for-java
common/azure-common-auth/src/main/java/com/azure/common/auth/credentials/DelegatedTokenCredentials.java
DelegatedTokenCredentials.acquireAccessTokenFromRefreshToken
private Mono<AuthenticationResult> acquireAccessTokenFromRefreshToken(String resource, String refreshToken, boolean isMultipleResourceRefreshToken) { """ Refresh tokens are currently not used since we don't know if the refresh token has expired """ String authorityUrl = this.environment().activeDirecto...
java
private Mono<AuthenticationResult> acquireAccessTokenFromRefreshToken(String resource, String refreshToken, boolean isMultipleResourceRefreshToken) { String authorityUrl = this.environment().activeDirectoryEndpoint() + this.domain(); ExecutorService executor = Executors.newSingleThreadExecutor(); ...
[ "private", "Mono", "<", "AuthenticationResult", ">", "acquireAccessTokenFromRefreshToken", "(", "String", "resource", ",", "String", "refreshToken", ",", "boolean", "isMultipleResourceRefreshToken", ")", "{", "String", "authorityUrl", "=", "this", ".", "environment", "(...
Refresh tokens are currently not used since we don't know if the refresh token has expired
[ "Refresh", "tokens", "are", "currently", "not", "used", "since", "we", "don", "t", "know", "if", "the", "refresh", "token", "has", "expired" ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/common/azure-common-auth/src/main/java/com/azure/common/auth/credentials/DelegatedTokenCredentials.java#L225-L245
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/AIStream.java
AIStream.updateToRejected
public void updateToRejected(long tick, SendDispatcher sendDispatcher) { """ Turn a tick to L/R. Used to: (1) Reject a Q/G that timed out (2) Implement AIH.reject invoked by the RCD (3) Implement AIH.rolledback invoked by a dirty accepted item """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEn...
java
public void updateToRejected(long tick, SendDispatcher sendDispatcher) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "updateToRejected", Long.valueOf(tick)); _targetStream.setCursor(tick); TickRange tr = _targetStream.getNext(); if (tr.type == TickRange.Requ...
[ "public", "void", "updateToRejected", "(", "long", "tick", ",", "SendDispatcher", "sendDispatcher", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc...
Turn a tick to L/R. Used to: (1) Reject a Q/G that timed out (2) Implement AIH.reject invoked by the RCD (3) Implement AIH.rolledback invoked by a dirty accepted item
[ "Turn", "a", "tick", "to", "L", "/", "R", ".", "Used", "to", ":", "(", "1", ")", "Reject", "a", "Q", "/", "G", "that", "timed", "out", "(", "2", ")", "Implement", "AIH", ".", "reject", "invoked", "by", "the", "RCD", "(", "3", ")", "Implement", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/AIStream.java#L897-L950
apache/incubator-atlas
typesystem/src/main/java/org/apache/atlas/typesystem/types/StructType.java
StructType.validateUpdate
@Override public void validateUpdate(IDataType newType) throws TypeUpdateException { """ Validate that current definition can be updated with the new definition @param newType @return true if the current definition can be updated with the new definition, else false """ super.validateUpdate(newTyp...
java
@Override public void validateUpdate(IDataType newType) throws TypeUpdateException { super.validateUpdate(newType); StructType newStructType = (StructType) newType; try { TypeUtils.validateUpdate(fieldMapping, newStructType.fieldMapping); } catch (TypeUpdateException e) ...
[ "@", "Override", "public", "void", "validateUpdate", "(", "IDataType", "newType", ")", "throws", "TypeUpdateException", "{", "super", ".", "validateUpdate", "(", "newType", ")", ";", "StructType", "newStructType", "=", "(", "StructType", ")", "newType", ";", "tr...
Validate that current definition can be updated with the new definition @param newType @return true if the current definition can be updated with the new definition, else false
[ "Validate", "that", "current", "definition", "can", "be", "updated", "with", "the", "new", "definition" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/typesystem/src/main/java/org/apache/atlas/typesystem/types/StructType.java#L82-L92
alibaba/otter
shared/common/src/main/java/com/alibaba/otter/shared/common/utils/sizeof/ObjectProfiler.java
ObjectProfiler.sizedelta
public static long sizedelta(final Object base, final Object obj) { """ Estimates the full size of the object graph rooted at 'obj' by pre-populating the "visited" set with the object graph rooted at 'base'. The net effect is to compute the size of 'obj' by summing over all instance data contained in 'obj' but n...
java
public static long sizedelta(final Object base, final Object obj) { if (null == obj || isSharedFlyweight(obj)) { return 0; } if (null == base) { throw new IllegalArgumentException("null input: base"); } final IdentityHashMap visited = new IdentityHashMap(...
[ "public", "static", "long", "sizedelta", "(", "final", "Object", "base", ",", "final", "Object", "obj", ")", "{", "if", "(", "null", "==", "obj", "||", "isSharedFlyweight", "(", "obj", ")", ")", "{", "return", "0", ";", "}", "if", "(", "null", "==", ...
Estimates the full size of the object graph rooted at 'obj' by pre-populating the "visited" set with the object graph rooted at 'base'. The net effect is to compute the size of 'obj' by summing over all instance data contained in 'obj' but not in 'base'. @param base graph boundary [may not be null] @param obj input ob...
[ "Estimates", "the", "full", "size", "of", "the", "object", "graph", "rooted", "at", "obj", "by", "pre", "-", "populating", "the", "visited", "set", "with", "the", "object", "graph", "rooted", "at", "base", ".", "The", "net", "effect", "is", "to", "comput...
train
https://github.com/alibaba/otter/blob/c7b5f94a0dd162e01ddffaf3a63cade7d23fca55/shared/common/src/main/java/com/alibaba/otter/shared/common/utils/sizeof/ObjectProfiler.java#L116-L140
molgenis/molgenis
molgenis-ontology-core/src/main/java/org/molgenis/ontology/core/importer/repository/OntologyRepositoryCollection.java
OntologyRepositoryCollection.constructNodePath
private String constructNodePath(String parentNodePath, int currentPosition) { """ Constructs the node path string for a child node @param parentNodePath node path string of the node's parent @param currentPosition position of the node in the parent's child list @return node path string """ StringBuil...
java
private String constructNodePath(String parentNodePath, int currentPosition) { StringBuilder nodePathStringBuilder = new StringBuilder(); if (!StringUtils.isEmpty(parentNodePath)) nodePathStringBuilder.append(parentNodePath).append('.'); nodePathStringBuilder .append(currentPosition) ....
[ "private", "String", "constructNodePath", "(", "String", "parentNodePath", ",", "int", "currentPosition", ")", "{", "StringBuilder", "nodePathStringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "parentNod...
Constructs the node path string for a child node @param parentNodePath node path string of the node's parent @param currentPosition position of the node in the parent's child list @return node path string
[ "Constructs", "the", "node", "path", "string", "for", "a", "child", "node" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-ontology-core/src/main/java/org/molgenis/ontology/core/importer/repository/OntologyRepositoryCollection.java#L294-L304
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java
DiscreteDistributions.poissonCdf
public static double poissonCdf(int k, double lamda) { """ Returns the cumulative probability of poisson @param k @param lamda @return """ if(k<0 || lamda<0) { throw new IllegalArgumentException("All the parameters must be positive."); } /* //Slow! ...
java
public static double poissonCdf(int k, double lamda) { if(k<0 || lamda<0) { throw new IllegalArgumentException("All the parameters must be positive."); } /* //Slow! $probabilitySum=0; for($i=0;$i<=$k;++$i) { $probabilitySum+=self::poisson(...
[ "public", "static", "double", "poissonCdf", "(", "int", "k", ",", "double", "lamda", ")", "{", "if", "(", "k", "<", "0", "||", "lamda", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"All the parameters must be positive.\"", ")", ";",...
Returns the cumulative probability of poisson @param k @param lamda @return
[ "Returns", "the", "cumulative", "probability", "of", "poisson" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java#L408-L425
ops4j/org.ops4j.pax.wicket
service/src/main/java/org/ops4j/pax/wicket/internal/extender/BundleDelegatingExtensionTracker.java
BundleDelegatingExtensionTracker.modifiedWebApplicationFactory
public void modifiedWebApplicationFactory(WebApplicationFactory<?> webApplicationFactory, Map<String, ?> properties) { """ <p>modifiedWebApplicationFactory.</p> @param webApplicationFactory a {@link org.ops4j.pax.wicket.api.WebApplicationFactory} object. @param properties a {@link java.util.Map} object...
java
public void modifiedWebApplicationFactory(WebApplicationFactory<?> webApplicationFactory, Map<String, ?> properties) { // TODO check if this is really needed or if we are fine with the normal remove/add provided by DS... synchronized (this) { removeServicesForServiceReference(webAppl...
[ "public", "void", "modifiedWebApplicationFactory", "(", "WebApplicationFactory", "<", "?", ">", "webApplicationFactory", ",", "Map", "<", "String", ",", "?", ">", "properties", ")", "{", "// TODO check if this is really needed or if we are fine with the normal remove/add provid...
<p>modifiedWebApplicationFactory.</p> @param webApplicationFactory a {@link org.ops4j.pax.wicket.api.WebApplicationFactory} object. @param properties a {@link java.util.Map} object. @since 3.0.5
[ "<p", ">", "modifiedWebApplicationFactory", ".", "<", "/", "p", ">" ]
train
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/internal/extender/BundleDelegatingExtensionTracker.java#L116-L124
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/cpc/CpcSketch.java
CpcSketch.heapify
public static CpcSketch heapify(final Memory mem, final long seed) { """ Return the given Memory as a CpcSketch on the Java heap. @param mem the given Memory @param seed the seed used to create the original sketch from which the Memory was derived. @return the given Memory as a CpcSketch on the Java heap. "...
java
public static CpcSketch heapify(final Memory mem, final long seed) { final CompressedState state = CompressedState.importFromMemory(mem); return uncompress(state, seed); }
[ "public", "static", "CpcSketch", "heapify", "(", "final", "Memory", "mem", ",", "final", "long", "seed", ")", "{", "final", "CompressedState", "state", "=", "CompressedState", ".", "importFromMemory", "(", "mem", ")", ";", "return", "uncompress", "(", "state",...
Return the given Memory as a CpcSketch on the Java heap. @param mem the given Memory @param seed the seed used to create the original sketch from which the Memory was derived. @return the given Memory as a CpcSketch on the Java heap.
[ "Return", "the", "given", "Memory", "as", "a", "CpcSketch", "on", "the", "Java", "heap", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/cpc/CpcSketch.java#L232-L235
dodie/scott
scott/src/main/java/hu/advancedweb/scott/instrumentation/transformation/ScottClassTransformer.java
ScottClassTransformer.calculateTransformationParameters
private InstrumentationActions calculateTransformationParameters(byte[] classfileBuffer, Configuration configuration) { """ Based on the structure of the class and the supplied configuration, determine the concrete instrumentation actions for the class. @param classfileBuffer class to be analyzed @param configu...
java
private InstrumentationActions calculateTransformationParameters(byte[] classfileBuffer, Configuration configuration) { DiscoveryClassVisitor discoveryClassVisitor = new DiscoveryClassVisitor(configuration); new ClassReader(classfileBuffer).accept(discoveryClassVisitor, 0); return discoveryClassVisitor.getTransfo...
[ "private", "InstrumentationActions", "calculateTransformationParameters", "(", "byte", "[", "]", "classfileBuffer", ",", "Configuration", "configuration", ")", "{", "DiscoveryClassVisitor", "discoveryClassVisitor", "=", "new", "DiscoveryClassVisitor", "(", "configuration", ")...
Based on the structure of the class and the supplied configuration, determine the concrete instrumentation actions for the class. @param classfileBuffer class to be analyzed @param configuration configuration settings @return instrumentation actions to be applied
[ "Based", "on", "the", "structure", "of", "the", "class", "and", "the", "supplied", "configuration", "determine", "the", "concrete", "instrumentation", "actions", "for", "the", "class", "." ]
train
https://github.com/dodie/scott/blob/fd6b492584d3ae7e072871ff2b094cce6041fc99/scott/src/main/java/hu/advancedweb/scott/instrumentation/transformation/ScottClassTransformer.java#L40-L44
awslabs/jsii
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java
JsiiObject.jsiiCall
@Nullable protected final <T> T jsiiCall(final String method, final Class<T> returnType, @Nullable final Object... args) { """ Calls a JavaScript method on the object. @param method The name of the method. @param returnType The return type. @param args Method arguments. @param <T> Java type for the return ...
java
@Nullable protected final <T> T jsiiCall(final String method, final Class<T> returnType, @Nullable final Object... args) { return JsiiObjectMapper.treeToValue(JsiiObject.engine.getClient() .callMethod(this.objRef, ...
[ "@", "Nullable", "protected", "final", "<", "T", ">", "T", "jsiiCall", "(", "final", "String", "method", ",", "final", "Class", "<", "T", ">", "returnType", ",", "@", "Nullable", "final", "Object", "...", "args", ")", "{", "return", "JsiiObjectMapper", "...
Calls a JavaScript method on the object. @param method The name of the method. @param returnType The return type. @param args Method arguments. @param <T> Java type for the return value. @return A return value.
[ "Calls", "a", "JavaScript", "method", "on", "the", "object", "." ]
train
https://github.com/awslabs/jsii/blob/6bbf743f5f65e98e5199ad31c93961533ffc40e5/packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java#L54-L61
tvesalainen/util
util/src/main/java/org/vesalainen/lang/Primitives.java
Primitives.writeShort
public static final void writeShort(short value, byte[] array, int offset) { """ Write value to byte array @param value @param array @param offset @see java.nio.ByteBuffer#putShort(short) """ if (array.length < offset + 2) { throw new IllegalArgumentException("no room in arra...
java
public static final void writeShort(short value, byte[] array, int offset) { if (array.length < offset + 2) { throw new IllegalArgumentException("no room in array"); } array[offset] = (byte) (value >> 8); array[offset + 1] = (byte) (value & 0xff); }
[ "public", "static", "final", "void", "writeShort", "(", "short", "value", ",", "byte", "[", "]", "array", ",", "int", "offset", ")", "{", "if", "(", "array", ".", "length", "<", "offset", "+", "2", ")", "{", "throw", "new", "IllegalArgumentException", ...
Write value to byte array @param value @param array @param offset @see java.nio.ByteBuffer#putShort(short)
[ "Write", "value", "to", "byte", "array" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L399-L407
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.collectAll
@Deprecated public static List collectAll(Collection self, Closure transform) { """ Deprecated alias for collectNested @deprecated Use collectNested instead @see #collectNested(Collection, Closure) """ return collectNested(self, transform); }
java
@Deprecated public static List collectAll(Collection self, Closure transform) { return collectNested(self, transform); }
[ "@", "Deprecated", "public", "static", "List", "collectAll", "(", "Collection", "self", ",", "Closure", "transform", ")", "{", "return", "collectNested", "(", "self", ",", "transform", ")", ";", "}" ]
Deprecated alias for collectNested @deprecated Use collectNested instead @see #collectNested(Collection, Closure)
[ "Deprecated", "alias", "for", "collectNested" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L3668-L3671
aws/aws-sdk-java
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/util/SignatureChecker.java
SignatureChecker.verifyMessageSignature
public boolean verifyMessageSignature(String message, PublicKey publicKey) { """ Validates the signature on a Simple Notification Service message. No Amazon-specific dependencies, just plain Java crypto and Jackson for parsing @param message A JSON-encoded Simple Notification Service message. Note: the JSON...
java
public boolean verifyMessageSignature(String message, PublicKey publicKey) { // extract the type and signature parameters Map<String, String> parsed = parseJSON(message); return verifySignature(parsed, publicKey); }
[ "public", "boolean", "verifyMessageSignature", "(", "String", "message", ",", "PublicKey", "publicKey", ")", "{", "// extract the type and signature parameters", "Map", "<", "String", ",", "String", ">", "parsed", "=", "parseJSON", "(", "message", ")", ";", "return"...
Validates the signature on a Simple Notification Service message. No Amazon-specific dependencies, just plain Java crypto and Jackson for parsing @param message A JSON-encoded Simple Notification Service message. Note: the JSON may be only one level deep. @param publicKey The Simple Notification Service public key, ex...
[ "Validates", "the", "signature", "on", "a", "Simple", "Notification", "Service", "message", ".", "No", "Amazon", "-", "specific", "dependencies", "just", "plain", "Java", "crypto", "and", "Jackson", "for", "parsing" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/util/SignatureChecker.java#L91-L97
UrielCh/ovh-java-sdk
ovh-java-sdk-caascontainers/src/main/java/net/minidev/ovh/api/ApiOvhCaascontainers.java
ApiOvhCaascontainers.serviceName_slaves_slaveId_GET
public OvhSlave serviceName_slaves_slaveId_GET(String serviceName, String slaveId) throws IOException { """ Inspect the argument user slave instance REST: GET /caas/containers/{serviceName}/slaves/{slaveId} @param slaveId [required] slave id @param serviceName [required] service name API beta """ Str...
java
public OvhSlave serviceName_slaves_slaveId_GET(String serviceName, String slaveId) throws IOException { String qPath = "/caas/containers/{serviceName}/slaves/{slaveId}"; StringBuilder sb = path(qPath, serviceName, slaveId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhSlave.c...
[ "public", "OvhSlave", "serviceName_slaves_slaveId_GET", "(", "String", "serviceName", ",", "String", "slaveId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/caas/containers/{serviceName}/slaves/{slaveId}\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Inspect the argument user slave instance REST: GET /caas/containers/{serviceName}/slaves/{slaveId} @param slaveId [required] slave id @param serviceName [required] service name API beta
[ "Inspect", "the", "argument", "user", "slave", "instance" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-caascontainers/src/main/java/net/minidev/ovh/api/ApiOvhCaascontainers.java#L247-L252
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java
BaseNDArrayFactory.randn
@Override public INDArray randn(long rows, long columns) { """ Random normal using the current time stamp as the seed @param rows the number of rows in the matrix @param columns the number of columns in the matrix @return """ return randn(new long[] {rows, columns}, System.currentTimeMilli...
java
@Override public INDArray randn(long rows, long columns) { return randn(new long[] {rows, columns}, System.currentTimeMillis()); }
[ "@", "Override", "public", "INDArray", "randn", "(", "long", "rows", ",", "long", "columns", ")", "{", "return", "randn", "(", "new", "long", "[", "]", "{", "rows", ",", "columns", "}", ",", "System", ".", "currentTimeMillis", "(", ")", ")", ";", "}"...
Random normal using the current time stamp as the seed @param rows the number of rows in the matrix @param columns the number of columns in the matrix @return
[ "Random", "normal", "using", "the", "current", "time", "stamp", "as", "the", "seed" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java#L511-L514
Alluxio/alluxio
logserver/src/main/java/alluxio/logserver/AlluxioLog4jSocketNode.java
AlluxioLog4jSocketNode.configureHierarchy
private LoggerRepository configureHierarchy(String processType) throws IOException { """ Configure a {@link Hierarchy} instance used to retrive logger by name and maintain the logger hierarchy. {@link AlluxioLog4jSocketNode} instance can retrieve the logger to log incoming {@link org.apache.log4j.spi.Loggi...
java
private LoggerRepository configureHierarchy(String processType) throws IOException { String inetAddressStr = mSocket.getInetAddress().getHostAddress(); Properties properties = new Properties(); File configFile; try { configFile = new File(new URI(System.getProperty("log4j.configuration"))); ...
[ "private", "LoggerRepository", "configureHierarchy", "(", "String", "processType", ")", "throws", "IOException", "{", "String", "inetAddressStr", "=", "mSocket", ".", "getInetAddress", "(", ")", ".", "getHostAddress", "(", ")", ";", "Properties", "properties", "=", ...
Configure a {@link Hierarchy} instance used to retrive logger by name and maintain the logger hierarchy. {@link AlluxioLog4jSocketNode} instance can retrieve the logger to log incoming {@link org.apache.log4j.spi.LoggingEvent}s. @param processType type of the process sending this {@link LoggingEvent} @return a {@link ...
[ "Configure", "a", "{", "@link", "Hierarchy", "}", "instance", "used", "to", "retrive", "logger", "by", "name", "and", "maintain", "the", "logger", "hierarchy", ".", "{", "@link", "AlluxioLog4jSocketNode", "}", "instance", "can", "retrieve", "the", "logger", "t...
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/logserver/src/main/java/alluxio/logserver/AlluxioLog4jSocketNode.java#L110-L148
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbOnePhaseXaResourceImpl.java
WSRdbOnePhaseXaResourceImpl.traceXAException
public static final XAException traceXAException(XAException xae, Class<?> callerClass) { """ Method to translate the XAResource stuff, including the error code. """ Tr.warning(tc, "THROW_XAEXCEPTION", new Object[] { AdapterUtil.getXAExceptionCodeString(xae.errorCode), xae.getMessage() }); ...
java
public static final XAException traceXAException(XAException xae, Class<?> callerClass) { Tr.warning(tc, "THROW_XAEXCEPTION", new Object[] { AdapterUtil.getXAExceptionCodeString(xae.errorCode), xae.getMessage() }); return xae; }
[ "public", "static", "final", "XAException", "traceXAException", "(", "XAException", "xae", ",", "Class", "<", "?", ">", "callerClass", ")", "{", "Tr", ".", "warning", "(", "tc", ",", "\"THROW_XAEXCEPTION\"", ",", "new", "Object", "[", "]", "{", "AdapterUtil"...
Method to translate the XAResource stuff, including the error code.
[ "Method", "to", "translate", "the", "XAResource", "stuff", "including", "the", "error", "code", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/WSRdbOnePhaseXaResourceImpl.java#L559-L564
google/closure-compiler
src/com/google/javascript/jscomp/Promises.java
Promises.createAsyncReturnableType
static final JSType createAsyncReturnableType(JSTypeRegistry registry, JSType maybeThenable) { """ Synthesizes a type representing the legal types of a return expression within async code (i.e.`Promise` callbacks, async functions) based on the expected return type of that code. <p>The return type will generall...
java
static final JSType createAsyncReturnableType(JSTypeRegistry registry, JSType maybeThenable) { JSType unknownType = registry.getNativeType(JSTypeNative.UNKNOWN_TYPE); ObjectType iThenableType = registry.getNativeObjectType(JSTypeNative.I_THENABLE_TYPE); JSType iThenableOfUnknownType = registry.createTempla...
[ "static", "final", "JSType", "createAsyncReturnableType", "(", "JSTypeRegistry", "registry", ",", "JSType", "maybeThenable", ")", "{", "JSType", "unknownType", "=", "registry", ".", "getNativeType", "(", "JSTypeNative", ".", "UNKNOWN_TYPE", ")", ";", "ObjectType", "...
Synthesizes a type representing the legal types of a return expression within async code (i.e.`Promise` callbacks, async functions) based on the expected return type of that code. <p>The return type will generally be a union but may not be in the case of top-like types. If the expected return type is a union, any sync...
[ "Synthesizes", "a", "type", "representing", "the", "legal", "types", "of", "a", "return", "expression", "within", "async", "code", "(", "i", ".", "e", ".", "Promise", "callbacks", "async", "functions", ")", "based", "on", "the", "expected", "return", "type",...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Promises.java#L144-L167
facebook/SoLoader
java/com/facebook/soloader/SysUtil.java
SysUtil.findAbiScore
public static int findAbiScore(String[] supportedAbis, String abi) { """ Determine how preferred a given ABI is on this system. @param supportedAbis ABIs on this system @param abi ABI of a shared library we might want to unpack @return -1 if not supported or an integer, smaller being more preferred """ ...
java
public static int findAbiScore(String[] supportedAbis, String abi) { for (int i = 0; i < supportedAbis.length; ++i) { if (supportedAbis[i] != null && abi.equals(supportedAbis[i])) { return i; } } return -1; }
[ "public", "static", "int", "findAbiScore", "(", "String", "[", "]", "supportedAbis", ",", "String", "abi", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "supportedAbis", ".", "length", ";", "++", "i", ")", "{", "if", "(", "supportedAbis"...
Determine how preferred a given ABI is on this system. @param supportedAbis ABIs on this system @param abi ABI of a shared library we might want to unpack @return -1 if not supported or an integer, smaller being more preferred
[ "Determine", "how", "preferred", "a", "given", "ABI", "is", "on", "this", "system", "." ]
train
https://github.com/facebook/SoLoader/blob/263af31d2960b2c0d0afe79d80197165a543be86/java/com/facebook/soloader/SysUtil.java#L45-L53
joelittlejohn/jsonschema2pojo
jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/AnnotatorFactory.java
AnnotatorFactory.getAnnotator
public Annotator getAnnotator(Class<? extends Annotator> clazz) { """ Create a new custom {@link Annotator} from the given class. @param clazz A class implementing {@link Annotator}. @return an instance of the given annotator type """ if (!Annotator.class.isAssignableFrom(clazz)) { th...
java
public Annotator getAnnotator(Class<? extends Annotator> clazz) { if (!Annotator.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException("The class name given as a custom annotator (" + clazz.getName() + ") does not refer to a class that implements " + Annotator.class.getName()); ...
[ "public", "Annotator", "getAnnotator", "(", "Class", "<", "?", "extends", "Annotator", ">", "clazz", ")", "{", "if", "(", "!", "Annotator", ".", "class", ".", "isAssignableFrom", "(", "clazz", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
Create a new custom {@link Annotator} from the given class. @param clazz A class implementing {@link Annotator}. @return an instance of the given annotator type
[ "Create", "a", "new", "custom", "{", "@link", "Annotator", "}", "from", "the", "given", "class", "." ]
train
https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/AnnotatorFactory.java#L70-L89
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/DataDecoder.java
DataDecoder.decodeFloatObj
public static Float decodeFloatObj(byte[] src, int srcOffset) throws CorruptEncodingException { """ Decodes a Float object from exactly 4 bytes. @param src source of encoded bytes @param srcOffset offset into source array @return Float object or null """ int bits = decodeFloatBits(src, s...
java
public static Float decodeFloatObj(byte[] src, int srcOffset) throws CorruptEncodingException { int bits = decodeFloatBits(src, srcOffset); bits ^= (bits < 0) ? 0x80000000 : 0xffffffff; return bits == 0x7fffffff ? null : Float.intBitsToFloat(bits); }
[ "public", "static", "Float", "decodeFloatObj", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ")", "throws", "CorruptEncodingException", "{", "int", "bits", "=", "decodeFloatBits", "(", "src", ",", "srcOffset", ")", ";", "bits", "^=", "(", "bits", ...
Decodes a Float object from exactly 4 bytes. @param src source of encoded bytes @param srcOffset offset into source array @return Float object or null
[ "Decodes", "a", "Float", "object", "from", "exactly", "4", "bytes", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/DataDecoder.java#L308-L314
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java
ArrayFunctions.arrayPut
public static Expression arrayPut(JsonArray array, Expression value) { """ Returned expression results in new array with value appended, if value is not already present, otherwise the unmodified input array. """ return arrayPut(x(array), value); }
java
public static Expression arrayPut(JsonArray array, Expression value) { return arrayPut(x(array), value); }
[ "public", "static", "Expression", "arrayPut", "(", "JsonArray", "array", ",", "Expression", "value", ")", "{", "return", "arrayPut", "(", "x", "(", "array", ")", ",", "value", ")", ";", "}" ]
Returned expression results in new array with value appended, if value is not already present, otherwise the unmodified input array.
[ "Returned", "expression", "results", "in", "new", "array", "with", "value", "appended", "if", "value", "is", "not", "already", "present", "otherwise", "the", "unmodified", "input", "array", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ArrayFunctions.java#L320-L322
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.leftShift
public static ZonedDateTime leftShift(final ZoneId self, LocalDateTime dateTime) { """ Returns a {@link java.time.ZonedDateTime} of this zone and the given {@link java.time.LocalDateTime}. @param self a ZoneId @return a ZonedDateTime @since 2.5.0 """ return ZonedDateTime.of(dateTime, self); }
java
public static ZonedDateTime leftShift(final ZoneId self, LocalDateTime dateTime) { return ZonedDateTime.of(dateTime, self); }
[ "public", "static", "ZonedDateTime", "leftShift", "(", "final", "ZoneId", "self", ",", "LocalDateTime", "dateTime", ")", "{", "return", "ZonedDateTime", ".", "of", "(", "dateTime", ",", "self", ")", ";", "}" ]
Returns a {@link java.time.ZonedDateTime} of this zone and the given {@link java.time.LocalDateTime}. @param self a ZoneId @return a ZonedDateTime @since 2.5.0
[ "Returns", "a", "{", "@link", "java", ".", "time", ".", "ZonedDateTime", "}", "of", "this", "zone", "and", "the", "given", "{", "@link", "java", ".", "time", ".", "LocalDateTime", "}", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L1856-L1858