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
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java
DirectoryConnection.submitAsyncRequest
public ServiceDirectoryFuture submitAsyncRequest(ProtocolHeader h, Protocol request, WatcherRegistration wr) { """ Submit a Request in asynchronizing, it return a Future for the Request Response. @param h the ProtocolHeader. @param request the Protocol. @param wr the WatcherRegistration of the Service. @...
java
public ServiceDirectoryFuture submitAsyncRequest(ProtocolHeader h, Protocol request, WatcherRegistration wr){ ServiceDirectoryFuture future = new ServiceDirectoryFuture(); queuePacket(h, request, null, null, future, wr); return future; }
[ "public", "ServiceDirectoryFuture", "submitAsyncRequest", "(", "ProtocolHeader", "h", ",", "Protocol", "request", ",", "WatcherRegistration", "wr", ")", "{", "ServiceDirectoryFuture", "future", "=", "new", "ServiceDirectoryFuture", "(", ")", ";", "queuePacket", "(", "...
Submit a Request in asynchronizing, it return a Future for the Request Response. @param h the ProtocolHeader. @param request the Protocol. @param wr the WatcherRegistration of the Service. @return the Future.
[ "Submit", "a", "Request", "in", "asynchronizing", "it", "return", "a", "Future", "for", "the", "Request", "Response", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/connect/DirectoryConnection.java#L401-L405
VoltDB/voltdb
src/frontend/org/voltdb/expressions/ExpressionUtil.java
ExpressionUtil.collectTerminals
private static void collectTerminals(AbstractExpression expr, Set<AbstractExpression> accum) { """ A terminal node of an expression is the one that does not have left/right child, nor any parameters; """ if (expr != null) { collectTerminals(expr.getLeft(), accum); collectTermina...
java
private static void collectTerminals(AbstractExpression expr, Set<AbstractExpression> accum) { if (expr != null) { collectTerminals(expr.getLeft(), accum); collectTerminals(expr.getRight(), accum); if (expr.getArgs() != null) { expr.getArgs().forEach(e -> coll...
[ "private", "static", "void", "collectTerminals", "(", "AbstractExpression", "expr", ",", "Set", "<", "AbstractExpression", ">", "accum", ")", "{", "if", "(", "expr", "!=", "null", ")", "{", "collectTerminals", "(", "expr", ".", "getLeft", "(", ")", ",", "a...
A terminal node of an expression is the one that does not have left/right child, nor any parameters;
[ "A", "terminal", "node", "of", "an", "expression", "is", "the", "one", "that", "does", "not", "have", "left", "/", "right", "child", "nor", "any", "parameters", ";" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/ExpressionUtil.java#L281-L291
MenoData/Time4J
base/src/main/java/net/time4j/calendar/astro/JulianDay.java
JulianDay.ofMeanSolarTime
public static JulianDay ofMeanSolarTime(Moment moment) { """ /*[deutsch] <p>Erzeugt einen julianischen Tag auf der Zeitskala {@link TimeScale#UT}, also bezogen auf die mittlere Sonnenzeit. </p> <p>Die Umrechnung in die <em>ephemeris time</em> erfordert eine delta-T-Korrektur. </p> @param moment corr...
java
public static JulianDay ofMeanSolarTime(Moment moment) { return new JulianDay(getValue(moment, TimeScale.UT), TimeScale.UT); }
[ "public", "static", "JulianDay", "ofMeanSolarTime", "(", "Moment", "moment", ")", "{", "return", "new", "JulianDay", "(", "getValue", "(", "moment", ",", "TimeScale", ".", "UT", ")", ",", "TimeScale", ".", "UT", ")", ";", "}" ]
/*[deutsch] <p>Erzeugt einen julianischen Tag auf der Zeitskala {@link TimeScale#UT}, also bezogen auf die mittlere Sonnenzeit. </p> <p>Die Umrechnung in die <em>ephemeris time</em> erfordert eine delta-T-Korrektur. </p> @param moment corresponding moment @return JulianDay @throws IllegalArgumentException if...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erzeugt", "einen", "julianischen", "Tag", "auf", "der", "Zeitskala", "{", "@link", "TimeScale#UT", "}", "also", "bezogen", "auf", "die", "mittlere", "Sonnenzeit", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/calendar/astro/JulianDay.java#L278-L282
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/MetatypeUtils.java
MetatypeUtils.parseDuration
public static long parseDuration(Object configAlias, String propertyKey, Object obj, long defaultValue) { """ Parse a duration from the provided config value: checks for whether or not the object read from the Service/Component configuration is a String or a Metatype converted long duration value <p> If an exc...
java
public static long parseDuration(Object configAlias, String propertyKey, Object obj, long defaultValue) { return parseDuration(configAlias, propertyKey, obj, defaultValue, TimeUnit.MILLISECONDS); }
[ "public", "static", "long", "parseDuration", "(", "Object", "configAlias", ",", "String", "propertyKey", ",", "Object", "obj", ",", "long", "defaultValue", ")", "{", "return", "parseDuration", "(", "configAlias", ",", "propertyKey", ",", "obj", ",", "defaultValu...
Parse a duration from the provided config value: checks for whether or not the object read from the Service/Component configuration is a String or a Metatype converted long duration value <p> If an exception occurs converting the object parameter: A translated warning message will be issued using the provided propertyK...
[ "Parse", "a", "duration", "from", "the", "provided", "config", "value", ":", "checks", "for", "whether", "or", "not", "the", "object", "read", "from", "the", "Service", "/", "Component", "configuration", "is", "a", "String", "or", "a", "Metatype", "converted...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/MetatypeUtils.java#L433-L435
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/cloud/PointCloudUtils.java
PointCloudUtils.autoScale
public static double autoScale( List<Point3D_F64> cloud , double target ) { """ Automatically rescales the point cloud based so that it has a standard deviation of 'target' @param cloud The point cloud @param target The desired standard deviation of the cloud. Try 100 @return The selected scale factor """ ...
java
public static double autoScale( List<Point3D_F64> cloud , double target ) { Point3D_F64 mean = new Point3D_F64(); Point3D_F64 stdev = new Point3D_F64(); statistics(cloud, mean, stdev); double scale = target/(Math.max(Math.max(stdev.x,stdev.y),stdev.z)); int N = cloud.size(); for (int i = 0; i < N ; i++...
[ "public", "static", "double", "autoScale", "(", "List", "<", "Point3D_F64", ">", "cloud", ",", "double", "target", ")", "{", "Point3D_F64", "mean", "=", "new", "Point3D_F64", "(", ")", ";", "Point3D_F64", "stdev", "=", "new", "Point3D_F64", "(", ")", ";", ...
Automatically rescales the point cloud based so that it has a standard deviation of 'target' @param cloud The point cloud @param target The desired standard deviation of the cloud. Try 100 @return The selected scale factor
[ "Automatically", "rescales", "the", "point", "cloud", "based", "so", "that", "it", "has", "a", "standard", "deviation", "of", "target" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/cloud/PointCloudUtils.java#L42-L57
ibm-bluemix-mobile-services/bms-clientsdk-android-core
lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationProcessManager.java
AuthorizationProcessManager.saveCertificateFromResponse
private void saveCertificateFromResponse(Response response) { """ Extract the certificate data from response and save it on local storage @param response contains the certificate data """ try { String responseBody = response.getResponseText(); JSONObject jsonResponse = new JSON...
java
private void saveCertificateFromResponse(Response response) { try { String responseBody = response.getResponseText(); JSONObject jsonResponse = new JSONObject(responseBody); //handle certificate String certificateString = jsonResponse.getString("certificate"); ...
[ "private", "void", "saveCertificateFromResponse", "(", "Response", "response", ")", "{", "try", "{", "String", "responseBody", "=", "response", ".", "getResponseText", "(", ")", ";", "JSONObject", "jsonResponse", "=", "new", "JSONObject", "(", "responseBody", ")",...
Extract the certificate data from response and save it on local storage @param response contains the certificate data
[ "Extract", "the", "certificate", "data", "from", "response", "and", "save", "it", "on", "local", "storage" ]
train
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationProcessManager.java#L223-L244
apache/incubator-atlas
notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
AtlasHook.notifyEntities
public static void notifyEntities(List<HookNotification.HookNotificationMessage> messages, int maxRetries) { """ Notify atlas of the entity through message. The entity can be a complex entity with reference to other entities. De-duping of entities is done on server side depending on the unique attribute on the ...
java
public static void notifyEntities(List<HookNotification.HookNotificationMessage> messages, int maxRetries) { notifyEntitiesInternal(messages, maxRetries, notificationInterface, logFailedMessages, failedMessagesLogger); }
[ "public", "static", "void", "notifyEntities", "(", "List", "<", "HookNotification", ".", "HookNotificationMessage", ">", "messages", ",", "int", "maxRetries", ")", "{", "notifyEntitiesInternal", "(", "messages", ",", "maxRetries", ",", "notificationInterface", ",", ...
Notify atlas of the entity through message. The entity can be a complex entity with reference to other entities. De-duping of entities is done on server side depending on the unique attribute on the entities. @param messages hook notification messages @param maxRetries maximum number of retries while sending message...
[ "Notify", "atlas", "of", "the", "entity", "through", "message", ".", "The", "entity", "can", "be", "a", "complex", "entity", "with", "reference", "to", "other", "entities", ".", "De", "-", "duping", "of", "entities", "is", "done", "on", "server", "side", ...
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java#L117-L119
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java
ASMUtil.getAttributeString
public static String getAttributeString(Tag tag, String attrName) throws EvaluatorException { """ extract the content of a attribut @param cfxdTag @param attrName @return attribute value @throws EvaluatorException """ return getAttributeLiteral(tag, attrName).getString(); }
java
public static String getAttributeString(Tag tag, String attrName) throws EvaluatorException { return getAttributeLiteral(tag, attrName).getString(); }
[ "public", "static", "String", "getAttributeString", "(", "Tag", "tag", ",", "String", "attrName", ")", "throws", "EvaluatorException", "{", "return", "getAttributeLiteral", "(", "tag", ",", "attrName", ")", ".", "getString", "(", ")", ";", "}" ]
extract the content of a attribut @param cfxdTag @param attrName @return attribute value @throws EvaluatorException
[ "extract", "the", "content", "of", "a", "attribut" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java#L345-L347
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.refund_refundId_GET
public OvhRefund refund_refundId_GET(String refundId) throws IOException { """ Get this object properties REST: GET /me/refund/{refundId} @param refundId [required] """ String qPath = "/me/refund/{refundId}"; StringBuilder sb = path(qPath, refundId); String resp = exec(qPath, "GET", sb.toString(), nu...
java
public OvhRefund refund_refundId_GET(String refundId) throws IOException { String qPath = "/me/refund/{refundId}"; StringBuilder sb = path(qPath, refundId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhRefund.class); }
[ "public", "OvhRefund", "refund_refundId_GET", "(", "String", "refundId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/refund/{refundId}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "refundId", ")", ";", "String", "resp", "...
Get this object properties REST: GET /me/refund/{refundId} @param refundId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1423-L1428
devnied/Bit-lib4j
src/main/java/fr/devnied/bitlib/BitUtils.java
BitUtils.getMask
public byte getMask(final int pIndex, final int pLength) { """ This method is used to get a mask dynamically @param pIndex start index of the mask @param pLength size of mask @return the mask in byte """ byte ret = (byte) DEFAULT_VALUE; // Add X 0 to the left ret = (byte) (ret << pIndex); re...
java
public byte getMask(final int pIndex, final int pLength) { byte ret = (byte) DEFAULT_VALUE; // Add X 0 to the left ret = (byte) (ret << pIndex); ret = (byte) ((ret & DEFAULT_VALUE) >> pIndex); // Add X 0 to the right int dec = BYTE_SIZE - (pLength + pIndex); if (dec > 0) { ret = (byte) (ret >> ...
[ "public", "byte", "getMask", "(", "final", "int", "pIndex", ",", "final", "int", "pLength", ")", "{", "byte", "ret", "=", "(", "byte", ")", "DEFAULT_VALUE", ";", "// Add X 0 to the left\r", "ret", "=", "(", "byte", ")", "(", "ret", "<<", "pIndex", ")", ...
This method is used to get a mask dynamically @param pIndex start index of the mask @param pLength size of mask @return the mask in byte
[ "This", "method", "is", "used", "to", "get", "a", "mask", "dynamically" ]
train
https://github.com/devnied/Bit-lib4j/blob/bdfa79fd12e7e3d5cf1196291825ef1bb12a1ee0/src/main/java/fr/devnied/bitlib/BitUtils.java#L126-L138
VoltDB/voltdb
src/frontend/org/voltdb/parser/JDBCParser.java
JDBCParser.parseJDBCCall
public static ParsedCall parseJDBCCall(String jdbcCall) throws SQLParser.Exception { """ Parse call statements for JDBC. @param jdbcCall statement to parse @return object with parsed data or null if it didn't parse @throws SQLParser.Exception """ Matcher m = PAT_CALL_WITH_PARAMETERS.matche...
java
public static ParsedCall parseJDBCCall(String jdbcCall) throws SQLParser.Exception { Matcher m = PAT_CALL_WITH_PARAMETERS.matcher(jdbcCall); if (m.matches()) { String sql = m.group(1); int parameterCount = PAT_CLEAN_CALL_PARAMETERS.matcher(m.group(2)).replaceAll("").length();...
[ "public", "static", "ParsedCall", "parseJDBCCall", "(", "String", "jdbcCall", ")", "throws", "SQLParser", ".", "Exception", "{", "Matcher", "m", "=", "PAT_CALL_WITH_PARAMETERS", ".", "matcher", "(", "jdbcCall", ")", ";", "if", "(", "m", ".", "matches", "(", ...
Parse call statements for JDBC. @param jdbcCall statement to parse @return object with parsed data or null if it didn't parse @throws SQLParser.Exception
[ "Parse", "call", "statements", "for", "JDBC", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/JDBCParser.java#L67-L80
OpenTSDB/opentsdb
src/utils/JSON.java
JSON.serializeToJSONPBytes
public static final byte[] serializeToJSONPBytes(final String callback, final Object object) { """ Serializes the given object and wraps it in a callback function i.e. &lt;callback&gt;(&lt;json&gt;) Note: This will not append a trailing semicolon @param callback The name of the Javascript callback to prep...
java
public static final byte[] serializeToJSONPBytes(final String callback, final Object object) { if (callback == null || callback.isEmpty()) throw new IllegalArgumentException("Missing callback name"); if (object == null) throw new IllegalArgumentException("Object was null"); try { ret...
[ "public", "static", "final", "byte", "[", "]", "serializeToJSONPBytes", "(", "final", "String", "callback", ",", "final", "Object", "object", ")", "{", "if", "(", "callback", "==", "null", "||", "callback", ".", "isEmpty", "(", ")", ")", "throw", "new", ...
Serializes the given object and wraps it in a callback function i.e. &lt;callback&gt;(&lt;json&gt;) Note: This will not append a trailing semicolon @param callback The name of the Javascript callback to prepend @param object The object to serialize @return A JSONP formatted byte array @throws IllegalArgumentException i...
[ "Serializes", "the", "given", "object", "and", "wraps", "it", "in", "a", "callback", "function", "i", ".", "e", ".", "&lt", ";", "callback&gt", ";", "(", "&lt", ";", "json&gt", ";", ")", "Note", ":", "This", "will", "not", "append", "a", "trailing", ...
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/utils/JSON.java#L335-L346
hawkular/hawkular-agent
hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/SocketBindingJBossASClient.java
SocketBindingJBossASClient.setStandardSocketBindingInterface
public void setStandardSocketBindingInterface(String socketBindingName, String interfaceName) throws Exception { """ Sets the interface name for the named standard socket binding. @param socketBindingName the name of the standard socket binding whose interface is to be set @param interfaceName the new interfac...
java
public void setStandardSocketBindingInterface(String socketBindingName, String interfaceName) throws Exception { setStandardSocketBindingInterfaceExpression(socketBindingName, null, interfaceName); }
[ "public", "void", "setStandardSocketBindingInterface", "(", "String", "socketBindingName", ",", "String", "interfaceName", ")", "throws", "Exception", "{", "setStandardSocketBindingInterfaceExpression", "(", "socketBindingName", ",", "null", ",", "interfaceName", ")", ";", ...
Sets the interface name for the named standard socket binding. @param socketBindingName the name of the standard socket binding whose interface is to be set @param interfaceName the new interface name @throws Exception any error
[ "Sets", "the", "interface", "name", "for", "the", "named", "standard", "socket", "binding", "." ]
train
https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/SocketBindingJBossASClient.java#L279-L281
phax/ph-schedule
ph-schedule/src/main/java/com/helger/schedule/quartz/QuartzSchedulerHelper.java
QuartzSchedulerHelper.getSchedulerMetaData
@Nonnull public static SchedulerMetaData getSchedulerMetaData () { """ Get the metadata of the scheduler. The state of the scheduler is not changed within this method. @return The metadata of the underlying scheduler. """ try { // Get the scheduler without starting it return s_aSchedu...
java
@Nonnull public static SchedulerMetaData getSchedulerMetaData () { try { // Get the scheduler without starting it return s_aSchedulerFactory.getScheduler ().getMetaData (); } catch (final SchedulerException ex) { throw new IllegalStateException ("Failed to get scheduler metadat...
[ "@", "Nonnull", "public", "static", "SchedulerMetaData", "getSchedulerMetaData", "(", ")", "{", "try", "{", "// Get the scheduler without starting it", "return", "s_aSchedulerFactory", ".", "getScheduler", "(", ")", ".", "getMetaData", "(", ")", ";", "}", "catch", "...
Get the metadata of the scheduler. The state of the scheduler is not changed within this method. @return The metadata of the underlying scheduler.
[ "Get", "the", "metadata", "of", "the", "scheduler", ".", "The", "state", "of", "the", "scheduler", "is", "not", "changed", "within", "this", "method", "." ]
train
https://github.com/phax/ph-schedule/blob/b000790b46a9f8d23ad44cc20591f753d07c0229/ph-schedule/src/main/java/com/helger/schedule/quartz/QuartzSchedulerHelper.java#L97-L109
gaixie/jibu-core
src/main/java/org/gaixie/jibu/utils/SQLBuilder.java
SQLBuilder.beanToSQLClause
public static String beanToSQLClause(Object bean, String split) throws JibuException { """ 通过 Bean 实例转化为 SQL 语句段,只转化非空属性。 <p> 支持的属性类型有 int, Integer, float, Float, boolean, Boolean ,Date</p> @param bean Bean 实例 @param split sql 语句的分隔符,如 " AND " 或 " , " @return SQl 语句段,如果所有属性值都为空,返回 ""。 @exception ...
java
public static String beanToSQLClause(Object bean, String split) throws JibuException { StringBuilder sb = new StringBuilder(); try{ if(null != bean ) { BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass()); PropertyDescriptor[] pds = beanInfo.g...
[ "public", "static", "String", "beanToSQLClause", "(", "Object", "bean", ",", "String", "split", ")", "throws", "JibuException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "try", "{", "if", "(", "null", "!=", "bean", ")", "{", ...
通过 Bean 实例转化为 SQL 语句段,只转化非空属性。 <p> 支持的属性类型有 int, Integer, float, Float, boolean, Boolean ,Date</p> @param bean Bean 实例 @param split sql 语句的分隔符,如 " AND " 或 " , " @return SQl 语句段,如果所有属性值都为空,返回 ""。 @exception JibuException 转化失败时抛出
[ "通过", "Bean", "实例转化为", "SQL", "语句段,只转化非空属性。", "<p", ">", "支持的属性类型有", "int", "Integer", "float", "Float", "boolean", "Boolean", "Date<", "/", "p", ">" ]
train
https://github.com/gaixie/jibu-core/blob/d5462f2883321c82d898c8752b7e5eba4b7dc184/src/main/java/org/gaixie/jibu/utils/SQLBuilder.java#L49-L71
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ZipUtil.java
ZipUtil.extractZipFile
public static void extractZipFile(final String path, final File dest, final String fileName) throws IOException { """ Extracts a single entry from the zip @param path zip file path @param dest destination directory @param fileName specific filepath to extract @throws IOException on io error """ ...
java
public static void extractZipFile(final String path, final File dest, final String fileName) throws IOException { FilenameFilter filter = null; if (null != fileName) { filter = new FilenameFilter() { public boolean accept(final File file, final String name) { ...
[ "public", "static", "void", "extractZipFile", "(", "final", "String", "path", ",", "final", "File", "dest", ",", "final", "String", "fileName", ")", "throws", "IOException", "{", "FilenameFilter", "filter", "=", "null", ";", "if", "(", "null", "!=", "fileNam...
Extracts a single entry from the zip @param path zip file path @param dest destination directory @param fileName specific filepath to extract @throws IOException on io error
[ "Extracts", "a", "single", "entry", "from", "the", "zip" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ZipUtil.java#L70-L80
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/UtilFile.java
UtilFile.getFilesByExtensionRecursive
private static void getFilesByExtensionRecursive(Collection<File> filesList, File path, String extension) { """ Get all files existing in the path considering the extension. @param filesList The files list. @param path The path to check. @param extension The extension (without dot; eg: png). """ O...
java
private static void getFilesByExtensionRecursive(Collection<File> filesList, File path, String extension) { Optional.ofNullable(path.listFiles()).ifPresent(files -> Arrays.asList(files).forEach(content -> { if (content.isDirectory()) { getFilesByExtensionRecur...
[ "private", "static", "void", "getFilesByExtensionRecursive", "(", "Collection", "<", "File", ">", "filesList", ",", "File", "path", ",", "String", "extension", ")", "{", "Optional", ".", "ofNullable", "(", "path", ".", "listFiles", "(", ")", ")", ".", "ifPre...
Get all files existing in the path considering the extension. @param filesList The files list. @param path The path to check. @param extension The extension (without dot; eg: png).
[ "Get", "all", "files", "existing", "in", "the", "path", "considering", "the", "extension", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/UtilFile.java#L252-L265
ppiastucki/recast4j
detourcrowd/src/main/java/org/recast4j/detour/crowd/PathCorridor.java
PathCorridor.setCorridor
public void setCorridor(float[] target, List<Long> path) { """ Loads a new path and target into the corridor. The current corridor position is expected to be within the first polygon in the path. The target is expected to be in the last polygon. @warning The size of the path must not exceed the size of corrido...
java
public void setCorridor(float[] target, List<Long> path) { vCopy(m_target, target); m_path = new ArrayList<>(path); }
[ "public", "void", "setCorridor", "(", "float", "[", "]", "target", ",", "List", "<", "Long", ">", "path", ")", "{", "vCopy", "(", "m_target", ",", "target", ")", ";", "m_path", "=", "new", "ArrayList", "<>", "(", "path", ")", ";", "}" ]
Loads a new path and target into the corridor. The current corridor position is expected to be within the first polygon in the path. The target is expected to be in the last polygon. @warning The size of the path must not exceed the size of corridor's path buffer set during #init(). @param target The target location w...
[ "Loads", "a", "new", "path", "and", "target", "into", "the", "corridor", ".", "The", "current", "corridor", "position", "is", "expected", "to", "be", "within", "the", "first", "polygon", "in", "the", "path", ".", "The", "target", "is", "expected", "to", ...
train
https://github.com/ppiastucki/recast4j/blob/a414dc34f16b87c95fb4e0f46c28a7830d421788/detourcrowd/src/main/java/org/recast4j/detour/crowd/PathCorridor.java#L446-L449
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java
StylesheetRoot.addImports
protected void addImports(Stylesheet stylesheet, boolean addToList, Vector importList) { """ Add the imports in the given sheet to the working importList vector. The will be added from highest import precedence to least import precedence. This is a post-order traversal of the import tree as described in <a hre...
java
protected void addImports(Stylesheet stylesheet, boolean addToList, Vector importList) { // Get the direct imports of this sheet. int n = stylesheet.getImportCount(); if (n > 0) { for (int i = 0; i < n; i++) { Stylesheet imported = stylesheet.getImport(i); addImports(im...
[ "protected", "void", "addImports", "(", "Stylesheet", "stylesheet", ",", "boolean", "addToList", ",", "Vector", "importList", ")", "{", "// Get the direct imports of this sheet.", "int", "n", "=", "stylesheet", ".", "getImportCount", "(", ")", ";", "if", "(", "n",...
Add the imports in the given sheet to the working importList vector. The will be added from highest import precedence to least import precedence. This is a post-order traversal of the import tree as described in <a href="http://www.w3.org/TR/xslt.html#import">the XSLT Recommendation</a>. <p>For example, suppose</p> <p...
[ "Add", "the", "imports", "in", "the", "given", "sheet", "to", "the", "working", "importList", "vector", ".", "The", "will", "be", "added", "from", "highest", "import", "precedence", "to", "least", "import", "precedence", ".", "This", "is", "a", "post", "-"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java#L399-L431
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java
TableBuilder.nextRow
public TableRow nextRow(final Table table, final TableAppender appender) throws IOException { """ Get the next row @param table the table @param appender the appender @return the row @throws IOException if an I/O error occurs """ return this.getRowSecure(table, appender, this.curRowIndex + 1,...
java
public TableRow nextRow(final Table table, final TableAppender appender) throws IOException { return this.getRowSecure(table, appender, this.curRowIndex + 1, true); }
[ "public", "TableRow", "nextRow", "(", "final", "Table", "table", ",", "final", "TableAppender", "appender", ")", "throws", "IOException", "{", "return", "this", ".", "getRowSecure", "(", "table", ",", "appender", ",", "this", ".", "curRowIndex", "+", "1", ",...
Get the next row @param table the table @param appender the appender @return the row @throws IOException if an I/O error occurs
[ "Get", "the", "next", "row" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/TableBuilder.java#L309-L311
bazaarvoice/emodb
table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/RowKeyUtils.java
RowKeyUtils.getRowKeyRaw
static ByteBuffer getRowKeyRaw(int shardId, long tableUuid, byte[] contentKeyBytes) { """ Constructs a row key when the row's shard ID is already known, which is rare. Generally this is used for range queries to construct the lower or upper bound for a query, so it doesn't necessarily need to produce a valid ro...
java
static ByteBuffer getRowKeyRaw(int shardId, long tableUuid, byte[] contentKeyBytes) { checkArgument(shardId >= 0 && shardId < 256); // Assemble a single array which is "1 byte shard id + 8 byte table uuid + n-byte content key". ByteBuffer rowKey = ByteBuffer.allocate(9 + contentKeyBytes.length)...
[ "static", "ByteBuffer", "getRowKeyRaw", "(", "int", "shardId", ",", "long", "tableUuid", ",", "byte", "[", "]", "contentKeyBytes", ")", "{", "checkArgument", "(", "shardId", ">=", "0", "&&", "shardId", "<", "256", ")", ";", "// Assemble a single array which is \...
Constructs a row key when the row's shard ID is already known, which is rare. Generally this is used for range queries to construct the lower or upper bound for a query, so it doesn't necessarily need to produce a valid row key.
[ "Constructs", "a", "row", "key", "when", "the", "row", "s", "shard", "ID", "is", "already", "known", "which", "is", "rare", ".", "Generally", "this", "is", "used", "for", "range", "queries", "to", "construct", "the", "lower", "or", "upper", "bound", "for...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/RowKeyUtils.java#L82-L93
tvesalainen/util
util/src/main/java/d3/env/TSAGeoMag.java
TSAGeoMag.getVerticalIntensity
public double getVerticalIntensity( double dlat, double dlong, double year, double altitude ) { """ Returns the vertical magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @...
java
public double getVerticalIntensity( double dlat, double dlong, double year, double altitude ) { calcGeoMag( dlat, dlong, year, altitude ); return bz; }
[ "public", "double", "getVerticalIntensity", "(", "double", "dlat", ",", "double", "dlong", ",", "double", "year", ",", "double", "altitude", ")", "{", "calcGeoMag", "(", "dlat", ",", "dlong", ",", "year", ",", "altitude", ")", ";", "return", "bz", ";", "...
Returns the vertical magnetic field intensity from the Department of Defense geomagnetic model and data in nano Tesla. @param dlat Latitude in decimal degrees. @param dlong Longitude in decimal degrees. @param year Date of the calculation in decimal years. @param altitude Altitude of the calculation in kilometers...
[ "Returns", "the", "vertical", "magnetic", "field", "intensity", "from", "the", "Department", "of", "Defense", "geomagnetic", "model", "and", "data", "in", "nano", "Tesla", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/d3/env/TSAGeoMag.java#L1038-L1042
centic9/commons-dost
src/main/java/org/dstadler/commons/net/UrlUtils.java
UrlUtils.retrieveDataPost
public static String retrieveDataPost(String sUrl, String encoding, String postRequestBody, String contentType, int timeout, SSLSocketFactory sslFactory) throws IOException { """ Download data from an URL with a POST request, if necessary converting from a character encoding. @param sUrl The full URL used to do...
java
public static String retrieveDataPost(String sUrl, String encoding, String postRequestBody, String contentType, int timeout, SSLSocketFactory sslFactory) throws IOException { return retrieveStringInternalPost(sUrl, encoding, postRequestBody, contentType, timeout, sslFactory); }
[ "public", "static", "String", "retrieveDataPost", "(", "String", "sUrl", ",", "String", "encoding", ",", "String", "postRequestBody", ",", "String", "contentType", ",", "int", "timeout", ",", "SSLSocketFactory", "sslFactory", ")", "throws", "IOException", "{", "re...
Download data from an URL with a POST request, if necessary converting from a character encoding. @param sUrl The full URL used to download the content. @param encoding An encoding, e.g. UTF-8, ISO-8859-15. Can be null. @param postRequestBody the body of the POST request, e.g. request parameters; must not be null @par...
[ "Download", "data", "from", "an", "URL", "with", "a", "POST", "request", "if", "necessary", "converting", "from", "a", "character", "encoding", "." ]
train
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/UrlUtils.java#L204-L206
stapler/stapler
groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/StaplerClosureScript.java
StaplerClosureScript._
public String _(String key, Object... args) { """ Looks up the resource bundle with the given key, formats with arguments, then return that formatted string. """ // JellyBuilder b = (JellyBuilder)getDelegate(); ResourceBundle resourceBundle = getResourceBundle(); // notify the listene...
java
public String _(String key, Object... args) { // JellyBuilder b = (JellyBuilder)getDelegate(); ResourceBundle resourceBundle = getResourceBundle(); // notify the listener if set // InternationalizedStringExpressionListener listener = (InternationalizedStringExpressionListener) Stapler.ge...
[ "public", "String", "_", "(", "String", "key", ",", "Object", "...", "args", ")", "{", "// JellyBuilder b = (JellyBuilder)getDelegate();", "ResourceBundle", "resourceBundle", "=", "getResourceBundle", "(", ")", ";", "// notify the listener if set", "// Interna...
Looks up the resource bundle with the given key, formats with arguments, then return that formatted string.
[ "Looks", "up", "the", "resource", "bundle", "with", "the", "given", "key", "formats", "with", "arguments", "then", "return", "that", "formatted", "string", "." ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/StaplerClosureScript.java#L36-L49
statefulj/statefulj
statefulj-common/src/main/java/org/statefulj/common/utils/ReflectionUtils.java
ReflectionUtils.getField
public static Field getField(final Class<?> clazz, final String fieldName) { """ Climb the class hierarchy starting with the clazz provided, looking for the field with fieldName @param clazz starting class to search at @param fieldName name of the field we are looking for @return Field which was found, or nul...
java
public static Field getField(final Class<?> clazz, final String fieldName) { //Define return type // Field field = null; //For each class in the hierarchy starting with the current class, try to find the declared field // for (Class<?> current = clazz; curren...
[ "public", "static", "Field", "getField", "(", "final", "Class", "<", "?", ">", "clazz", ",", "final", "String", "fieldName", ")", "{", "//Define return type", "//", "Field", "field", "=", "null", ";", "//For each class in the hierarchy starting with the current class,...
Climb the class hierarchy starting with the clazz provided, looking for the field with fieldName @param clazz starting class to search at @param fieldName name of the field we are looking for @return Field which was found, or null if nothing was found
[ "Climb", "the", "class", "hierarchy", "starting", "with", "the", "clazz", "provided", "looking", "for", "the", "field", "with", "fieldName" ]
train
https://github.com/statefulj/statefulj/blob/d3459b3cb12bd508643027743401484a231e5fa1/statefulj-common/src/main/java/org/statefulj/common/utils/ReflectionUtils.java#L187-L215
apereo/cas
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/AbstractSamlProfileHandlerController.java
AbstractSamlProfileHandlerController.buildCasAssertion
protected Assertion buildCasAssertion(final String principal, final RegisteredService registeredService, final Map<String, Object> attributes) { """ Build cas assertion. @param principal the principal @param registeredS...
java
protected Assertion buildCasAssertion(final String principal, final RegisteredService registeredService, final Map<String, Object> attributes) { val p = new AttributePrincipalImpl(principal, attributes); return new Asser...
[ "protected", "Assertion", "buildCasAssertion", "(", "final", "String", "principal", ",", "final", "RegisteredService", "registeredService", ",", "final", "Map", "<", "String", ",", "Object", ">", "attributes", ")", "{", "val", "p", "=", "new", "AttributePrincipalI...
Build cas assertion. @param principal the principal @param registeredService the registered service @param attributes the attributes @return the assertion
[ "Build", "cas", "assertion", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/AbstractSamlProfileHandlerController.java#L181-L187
j-a-w-r/jawr
jawr-core/src/main/java/net/jawr/web/util/ReflectionUtils.java
ReflectionUtils.methodEquals
public static boolean methodEquals( Method method, Method other) { """ Checks if the 2 methods are equals. @param method the first method @param other the second method @return true if the 2 methods are equals """ if ((method.getDeclaringClass().equals( other.getDeclaringClass())) && (method....
java
public static boolean methodEquals( Method method, Method other){ if ((method.getDeclaringClass().equals( other.getDeclaringClass())) && (method.getName().equals( other.getName()))) { if (!method.getReturnType().equals(other.getReturnType())) return false; Class<?>[...
[ "public", "static", "boolean", "methodEquals", "(", "Method", "method", ",", "Method", "other", ")", "{", "if", "(", "(", "method", ".", "getDeclaringClass", "(", ")", ".", "equals", "(", "other", ".", "getDeclaringClass", "(", ")", ")", ")", "&&", "(", ...
Checks if the 2 methods are equals. @param method the first method @param other the second method @return true if the 2 methods are equals
[ "Checks", "if", "the", "2", "methods", "are", "equals", "." ]
train
https://github.com/j-a-w-r/jawr/blob/1fa7cd46ebcd36908bd90b298ca316fa5b0c1b0d/jawr-core/src/main/java/net/jawr/web/util/ReflectionUtils.java#L50-L68
thrau/jarchivelib
src/main/java/org/rauschig/jarchivelib/CommonsStreamFactory.java
CommonsStreamFactory.createArchiveOutputStream
static ArchiveOutputStream createArchiveOutputStream(CommonsArchiver archiver, File archive) throws IOException, ArchiveException { """ Uses the {@link ArchiveStreamFactory} and the name of the given archiver to create a new {@link ArchiveOutputStream} for the given archive {@link File}. @param archive...
java
static ArchiveOutputStream createArchiveOutputStream(CommonsArchiver archiver, File archive) throws IOException, ArchiveException { return createArchiveOutputStream(archiver.getArchiveFormat(), archive); }
[ "static", "ArchiveOutputStream", "createArchiveOutputStream", "(", "CommonsArchiver", "archiver", ",", "File", "archive", ")", "throws", "IOException", ",", "ArchiveException", "{", "return", "createArchiveOutputStream", "(", "archiver", ".", "getArchiveFormat", "(", ")",...
Uses the {@link ArchiveStreamFactory} and the name of the given archiver to create a new {@link ArchiveOutputStream} for the given archive {@link File}. @param archiver the invoking archiver @param archive the archive file to create the {@link ArchiveOutputStream} for @return a new {@link ArchiveOutputStream} @throws ...
[ "Uses", "the", "{", "@link", "ArchiveStreamFactory", "}", "and", "the", "name", "of", "the", "given", "archiver", "to", "create", "a", "new", "{", "@link", "ArchiveOutputStream", "}", "for", "the", "given", "archive", "{", "@link", "File", "}", "." ]
train
https://github.com/thrau/jarchivelib/blob/8afee5124c588f589306796985b722d63572bbfa/src/main/java/org/rauschig/jarchivelib/CommonsStreamFactory.java#L118-L121
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.srem
@Override public Long srem(final byte[] key, final byte[]... member) { """ Remove the specified member from the set value stored at key. If member was not a member of the set no operation is performed. If key does not hold a set value an error is returned. <p> Time complexity O(1) @param key the key of the s...
java
@Override public Long srem(final byte[] key, final byte[]... member) { checkIsInMultiOrPipeline(); client.srem(key, member); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "srem", "(", "final", "byte", "[", "]", "key", ",", "final", "byte", "[", "]", "...", "member", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "srem", "(", "key", ",", "member", ")", ";", "retur...
Remove the specified member from the set value stored at key. If member was not a member of the set no operation is performed. If key does not hold a set value an error is returned. <p> Time complexity O(1) @param key the key of the set @param member the set member to remove @return Integer reply, specifically: 1 if th...
[ "Remove", "the", "specified", "member", "from", "the", "set", "value", "stored", "at", "key", ".", "If", "member", "was", "not", "a", "member", "of", "the", "set", "no", "operation", "is", "performed", ".", "If", "key", "does", "not", "hold", "a", "set...
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L1415-L1420
alkacon/opencms-core
src/org/opencms/jlan/CmsJlanDiskInterface.java
CmsJlanDiskInterface.getFileForPath
protected CmsJlanNetworkFile getFileForPath(SrvSession session, TreeConnection connection, String path) throws CmsException { """ Helper method to get a network file object given a path.<p> @param session the current session @param connection the current connection @param path the file path @return th...
java
protected CmsJlanNetworkFile getFileForPath(SrvSession session, TreeConnection connection, String path) throws CmsException { CmsObjectWrapper cms = getCms(session, connection); return getFileForPath(cms, session, connection, path); }
[ "protected", "CmsJlanNetworkFile", "getFileForPath", "(", "SrvSession", "session", ",", "TreeConnection", "connection", ",", "String", "path", ")", "throws", "CmsException", "{", "CmsObjectWrapper", "cms", "=", "getCms", "(", "session", ",", "connection", ")", ";", ...
Helper method to get a network file object given a path.<p> @param session the current session @param connection the current connection @param path the file path @return the network file object for the given path @throws CmsException if something goes wrong
[ "Helper", "method", "to", "get", "a", "network", "file", "object", "given", "a", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jlan/CmsJlanDiskInterface.java#L474-L479
google/closure-compiler
src/com/google/javascript/jscomp/CheckJSDoc.java
CheckJSDoc.isJSDocOnFunctionNode
private boolean isJSDocOnFunctionNode(Node n, JSDocInfo info) { """ Whether this node's JSDoc may apply to a function <p>This has some false positive cases, to allow for patterns like goog.abstractMethod. """ switch (n.getToken()) { case FUNCTION: case GETTER_DEF: case SETTER_DEF: ...
java
private boolean isJSDocOnFunctionNode(Node n, JSDocInfo info) { switch (n.getToken()) { case FUNCTION: case GETTER_DEF: case SETTER_DEF: case MEMBER_FUNCTION_DEF: case STRING_KEY: case COMPUTED_PROP: case EXPORT: return true; case GETELEM: case GETPROP: ...
[ "private", "boolean", "isJSDocOnFunctionNode", "(", "Node", "n", ",", "JSDocInfo", "info", ")", "{", "switch", "(", "n", ".", "getToken", "(", ")", ")", "{", "case", "FUNCTION", ":", "case", "GETTER_DEF", ":", "case", "SETTER_DEF", ":", "case", "MEMBER_FUN...
Whether this node's JSDoc may apply to a function <p>This has some false positive cases, to allow for patterns like goog.abstractMethod.
[ "Whether", "this", "node", "s", "JSDoc", "may", "apply", "to", "a", "function" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckJSDoc.java#L440-L476
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitRelation.java
IntBitRelation.contains
public boolean contains(int left, int right) { """ Element test. @param left left value of the pair to test. @param right right value of the pair to test. @return true, if (left, right) is element of the relation. """ if (line[left] == null) { return false; } return l...
java
public boolean contains(int left, int right) { if (line[left] == null) { return false; } return line[left].contains(right); }
[ "public", "boolean", "contains", "(", "int", "left", ",", "int", "right", ")", "{", "if", "(", "line", "[", "left", "]", "==", "null", ")", "{", "return", "false", ";", "}", "return", "line", "[", "left", "]", ".", "contains", "(", "right", ")", ...
Element test. @param left left value of the pair to test. @param right right value of the pair to test. @return true, if (left, right) is element of the relation.
[ "Element", "test", "." ]
train
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitRelation.java#L99-L104
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/Transformation2D.java
Transformation2D.initializeFromRectIsotropic
void initializeFromRectIsotropic(Envelope2D src, Envelope2D dest) { """ Initializes an orhtonormal transformation from the Src and Dest rectangles. The result transformation proportionally fits the Src into the Dest. The center of the Src will be in the center of the Dest. """ if (src.isEmpty() || dest...
java
void initializeFromRectIsotropic(Envelope2D src, Envelope2D dest) { if (src.isEmpty() || dest.isEmpty() || 0 == src.getWidth() || 0 == src.getHeight()) setZero(); else { yx = 0; xy = 0; xx = dest.getWidth() / src.getWidth(); yy = dest.getHeight() / src.getHeight(); if (xx > yy) xx = yy; ...
[ "void", "initializeFromRectIsotropic", "(", "Envelope2D", "src", ",", "Envelope2D", "dest", ")", "{", "if", "(", "src", ".", "isEmpty", "(", ")", "||", "dest", ".", "isEmpty", "(", ")", "||", "0", "==", "src", ".", "getWidth", "(", ")", "||", "0", "=...
Initializes an orhtonormal transformation from the Src and Dest rectangles. The result transformation proportionally fits the Src into the Dest. The center of the Src will be in the center of the Dest.
[ "Initializes", "an", "orhtonormal", "transformation", "from", "the", "Src", "and", "Dest", "rectangles", "." ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/Transformation2D.java#L341-L361
grails/grails-core
grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java
GroovyPagesUriSupport.getAbsoluteTemplateURI
public String getAbsoluteTemplateURI(String templateName, boolean includeExtension) { """ Used to resolve template names that are not relative to a controller. @param templateName The template name normally beginning with / @param includeExtension The flag to include the template extension @return The templat...
java
public String getAbsoluteTemplateURI(String templateName, boolean includeExtension) { FastStringWriter buf = new FastStringWriter(); String tmp = templateName.substring(1,templateName.length()); if (tmp.indexOf(SLASH) > -1) { buf.append(SLASH); int i = tmp.lastIndexOf(SLA...
[ "public", "String", "getAbsoluteTemplateURI", "(", "String", "templateName", ",", "boolean", "includeExtension", ")", "{", "FastStringWriter", "buf", "=", "new", "FastStringWriter", "(", ")", ";", "String", "tmp", "=", "templateName", ".", "substring", "(", "1", ...
Used to resolve template names that are not relative to a controller. @param templateName The template name normally beginning with / @param includeExtension The flag to include the template extension @return The template URI
[ "Used", "to", "resolve", "template", "names", "that", "are", "not", "relative", "to", "a", "controller", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java#L157-L177
apache/reef
lang/java/reef-common/src/main/java/org/apache/reef/util/logging/LoggingScopeFactory.java
LoggingScopeFactory.getNewLoggingScope
public LoggingScope getNewLoggingScope(final String msg, final Object[] params) { """ Get a new instance of LoggingScope with msg and params through new. @param msg @param params @return """ return new LoggingScopeImpl(LOG, logLevel, msg, params); }
java
public LoggingScope getNewLoggingScope(final String msg, final Object[] params) { return new LoggingScopeImpl(LOG, logLevel, msg, params); }
[ "public", "LoggingScope", "getNewLoggingScope", "(", "final", "String", "msg", ",", "final", "Object", "[", "]", "params", ")", "{", "return", "new", "LoggingScopeImpl", "(", "LOG", ",", "logLevel", ",", "msg", ",", "params", ")", ";", "}" ]
Get a new instance of LoggingScope with msg and params through new. @param msg @param params @return
[ "Get", "a", "new", "instance", "of", "LoggingScope", "with", "msg", "and", "params", "through", "new", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-common/src/main/java/org/apache/reef/util/logging/LoggingScopeFactory.java#L101-L103
oboehm/jfachwert
src/main/java/de/jfachwert/net/Telefonnummer.java
Telefonnummer.getRufnummer
public Telefonnummer getRufnummer() { """ Liefert die Nummer der Ortsvermittlungsstelle, d.h. die Telefonnummer ohne Vorwahl und Laenderkennzahl. @return z.B. "32168" """ String inlandsnummer = RegExUtils.replaceAll(this.getInlandsnummer().toString(), "[ /]+", " "); return new Telefonnummer...
java
public Telefonnummer getRufnummer() { String inlandsnummer = RegExUtils.replaceAll(this.getInlandsnummer().toString(), "[ /]+", " "); return new Telefonnummer(StringUtils.substringAfter(inlandsnummer, " ").replaceAll(" ", "")); }
[ "public", "Telefonnummer", "getRufnummer", "(", ")", "{", "String", "inlandsnummer", "=", "RegExUtils", ".", "replaceAll", "(", "this", ".", "getInlandsnummer", "(", ")", ".", "toString", "(", ")", ",", "\"[ /]+\"", ",", "\" \"", ")", ";", "return", "new", ...
Liefert die Nummer der Ortsvermittlungsstelle, d.h. die Telefonnummer ohne Vorwahl und Laenderkennzahl. @return z.B. "32168"
[ "Liefert", "die", "Nummer", "der", "Ortsvermittlungsstelle", "d", ".", "h", ".", "die", "Telefonnummer", "ohne", "Vorwahl", "und", "Laenderkennzahl", "." ]
train
https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/net/Telefonnummer.java#L172-L175
wigforss/Ka-Commons-Reflection
src/main/java/org/kasource/commons/reflection/util/MethodUtils.java
MethodUtils.getMethod
public static Method getMethod(Class<?> target, MethodFilter methodFilter) { """ Returns the method declared by the target class and any of its super classes, which matches the supplied methodFilter, if method is found null is returned. If more than one method is found the first in the resulting set iterator is ...
java
public static Method getMethod(Class<?> target, MethodFilter methodFilter) { Set<Method> methods = getMethods(target, methodFilter); if (!methods.isEmpty()) { return methods.iterator().next(); } return null; }
[ "public", "static", "Method", "getMethod", "(", "Class", "<", "?", ">", "target", ",", "MethodFilter", "methodFilter", ")", "{", "Set", "<", "Method", ">", "methods", "=", "getMethods", "(", "target", ",", "methodFilter", ")", ";", "if", "(", "!", "metho...
Returns the method declared by the target class and any of its super classes, which matches the supplied methodFilter, if method is found null is returned. If more than one method is found the first in the resulting set iterator is returned. @param methodFilter The method filter to apply. @return method that match th...
[ "Returns", "the", "method", "declared", "by", "the", "target", "class", "and", "any", "of", "its", "super", "classes", "which", "matches", "the", "supplied", "methodFilter", "if", "method", "is", "found", "null", "is", "returned", ".", "If", "more", "than", ...
train
https://github.com/wigforss/Ka-Commons-Reflection/blob/a80f7a164cd800089e4f4dd948ca6f0e7badcf33/src/main/java/org/kasource/commons/reflection/util/MethodUtils.java#L130-L136
gosu-lang/gosu-lang
gosu-core/src/main/java/gw/internal/gosu/ir/transform/StatementTransformer.java
StatementTransformer.compileInitializerAssignment
public static IRStatement compileInitializerAssignment( TopLevelTransformationContext context, InitializerAssignment stmt, IRExpression root ) { """ This is in its own method because it requires additional context """ return InitializerAssignmentTransformer.compile( context, stmt, root ); }
java
public static IRStatement compileInitializerAssignment( TopLevelTransformationContext context, InitializerAssignment stmt, IRExpression root ) { return InitializerAssignmentTransformer.compile( context, stmt, root ); }
[ "public", "static", "IRStatement", "compileInitializerAssignment", "(", "TopLevelTransformationContext", "context", ",", "InitializerAssignment", "stmt", ",", "IRExpression", "root", ")", "{", "return", "InitializerAssignmentTransformer", ".", "compile", "(", "context", ","...
This is in its own method because it requires additional context
[ "This", "is", "in", "its", "own", "method", "because", "it", "requires", "additional", "context" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core/src/main/java/gw/internal/gosu/ir/transform/StatementTransformer.java#L154-L157
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.distinctBy
public static <T, E extends Exception> List<T> distinctBy(final Collection<? extends T> c, final Try.Function<? super T, ?, E> keyMapper) throws E { """ Distinct by the value mapped from <code>keyMapper</code>. Mostly it's designed for one-step operation to complete the operation in one step. <code>java.util.s...
java
public static <T, E extends Exception> List<T> distinctBy(final Collection<? extends T> c, final Try.Function<? super T, ?, E> keyMapper) throws E { if (N.isNullOrEmpty(c)) { return new ArrayList<>(); } return distinctBy(c, 0, c.size(), keyMapper); }
[ "public", "static", "<", "T", ",", "E", "extends", "Exception", ">", "List", "<", "T", ">", "distinctBy", "(", "final", "Collection", "<", "?", "extends", "T", ">", "c", ",", "final", "Try", ".", "Function", "<", "?", "super", "T", ",", "?", ",", ...
Distinct by the value mapped from <code>keyMapper</code>. Mostly it's designed for one-step operation to complete the operation in one step. <code>java.util.stream.Stream</code> is preferred for multiple phases operation. @param c @param keyMapper don't change value of the input parameter. @return
[ "Distinct", "by", "the", "value", "mapped", "from", "<code", ">", "keyMapper<", "/", "code", ">", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L18070-L18076
vkostyukov/la4j
src/main/java/org/la4j/Matrix.java
Matrix.eachInRow
public void eachInRow(int i, VectorProcedure procedure) { """ Applies given {@code procedure} to each element of specified row of this matrix. @param i the row index @param procedure the vector procedure """ VectorIterator it = iteratorOfRow(i); while (it.hasNext()) { double x ...
java
public void eachInRow(int i, VectorProcedure procedure) { VectorIterator it = iteratorOfRow(i); while (it.hasNext()) { double x = it.next(); int j = it.index(); procedure.apply(j, x); } }
[ "public", "void", "eachInRow", "(", "int", "i", ",", "VectorProcedure", "procedure", ")", "{", "VectorIterator", "it", "=", "iteratorOfRow", "(", "i", ")", ";", "while", "(", "it", ".", "hasNext", "(", ")", ")", "{", "double", "x", "=", "it", ".", "n...
Applies given {@code procedure} to each element of specified row of this matrix. @param i the row index @param procedure the vector procedure
[ "Applies", "given", "{", "@code", "procedure", "}", "to", "each", "element", "of", "specified", "row", "of", "this", "matrix", "." ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/Matrix.java#L1384-L1392
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java
ChannelFrameworkImpl.getRunningChannel
public synchronized Channel getRunningChannel(String inputChannelName, Chain chain) { """ Fetch the input channel from the runtime. @param inputChannelName of the (parent) channel requested. @param chain in which channel is running. @return Channel requested, or null if not found. """ if (inputC...
java
public synchronized Channel getRunningChannel(String inputChannelName, Chain chain) { if (inputChannelName == null || chain == null) { return null; } Channel channel = null; // Ensure the chain is running. if (null != this.chainRunningMap.get(chain.getName())) { ...
[ "public", "synchronized", "Channel", "getRunningChannel", "(", "String", "inputChannelName", ",", "Chain", "chain", ")", "{", "if", "(", "inputChannelName", "==", "null", "||", "chain", "==", "null", ")", "{", "return", "null", ";", "}", "Channel", "channel", ...
Fetch the input channel from the runtime. @param inputChannelName of the (parent) channel requested. @param chain in which channel is running. @return Channel requested, or null if not found.
[ "Fetch", "the", "input", "channel", "from", "the", "runtime", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/ChannelFrameworkImpl.java#L4048-L4065
GeoLatte/geolatte-common
src/main/java/org/geolatte/common/dataformats/json/jackson/GeometryDeserializer.java
GeometryDeserializer.setCrsIds
private String setCrsIds(String json, CrsId crsId) throws IOException, JsonException { """ Adds the given crs to all json objects. Used in {@link #asGeomCollection(org.geolatte.geom.crs.CrsId)}. @param json the json string representing an array of geometry objects without crs property. @param crsId the crsId ...
java
private String setCrsIds(String json, CrsId crsId) throws IOException, JsonException { /* Prepare a geojson crs structure "crs": { "type": "name", "properties": { "name": "EPSG:xxxx" } } */ HashMap<String, Object> prope...
[ "private", "String", "setCrsIds", "(", "String", "json", ",", "CrsId", "crsId", ")", "throws", "IOException", ",", "JsonException", "{", "/* Prepare a geojson crs structure\n \"crs\": {\n \"type\": \"name\",\n \"properties\": {\n \"na...
Adds the given crs to all json objects. Used in {@link #asGeomCollection(org.geolatte.geom.crs.CrsId)}. @param json the json string representing an array of geometry objects without crs property. @param crsId the crsId @return the same json string with the crs property filled in for each of the geometries.
[ "Adds", "the", "given", "crs", "to", "all", "json", "objects", ".", "Used", "in", "{", "@link", "#asGeomCollection", "(", "org", ".", "geolatte", ".", "geom", ".", "crs", ".", "CrsId", ")", "}", "." ]
train
https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/jackson/GeometryDeserializer.java#L181-L204
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.serviceName_phonebooks_bookKey_phonebookContact_POST
public Long serviceName_phonebooks_bookKey_phonebookContact_POST(String serviceName, String bookKey, String group, String homeMobile, String homePhone, String name, String surname, String workMobile, String workPhone) throws IOException { """ Create a phonebook contact. Return identifier of the phonebook contact. ...
java
public Long serviceName_phonebooks_bookKey_phonebookContact_POST(String serviceName, String bookKey, String group, String homeMobile, String homePhone, String name, String surname, String workMobile, String workPhone) throws IOException { String qPath = "/sms/{serviceName}/phonebooks/{bookKey}/phonebookContact"; St...
[ "public", "Long", "serviceName_phonebooks_bookKey_phonebookContact_POST", "(", "String", "serviceName", ",", "String", "bookKey", ",", "String", "group", ",", "String", "homeMobile", ",", "String", "homePhone", ",", "String", "name", ",", "String", "surname", ",", "...
Create a phonebook contact. Return identifier of the phonebook contact. REST: POST /sms/{serviceName}/phonebooks/{bookKey}/phonebookContact @param homeMobile [required] Home mobile phone number of the contact @param surname [required] Contact surname @param homePhone [required] Home landline phone number of the contac...
[ "Create", "a", "phonebook", "contact", ".", "Return", "identifier", "of", "the", "phonebook", "contact", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L1192-L1205
JOML-CI/JOML
src/org/joml/Matrix3x2d.java
Matrix3x2d.scale
public Matrix3x2d scale(Vector2dc xy, Matrix3x2d dest) { """ Apply scaling to this matrix by scaling the base axes by the given <code>xy</code> factors and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be...
java
public Matrix3x2d scale(Vector2dc xy, Matrix3x2d dest) { return scale(xy.x(), xy.y(), dest); }
[ "public", "Matrix3x2d", "scale", "(", "Vector2dc", "xy", ",", "Matrix3x2d", "dest", ")", "{", "return", "scale", "(", "xy", ".", "x", "(", ")", ",", "xy", ".", "y", "(", ")", ",", "dest", ")", ";", "}" ]
Apply scaling to this matrix by scaling the base axes by the given <code>xy</code> factors and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>S</code> the scaling matrix, then the new matrix will be <code>M * S</code>. So when transforming a vector <code>v</code> with...
[ "Apply", "scaling", "to", "this", "matrix", "by", "scaling", "the", "base", "axes", "by", "the", "given", "<code", ">", "xy<", "/", "code", ">", "factors", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", "code", ">", ".", "<p", ">"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2d.java#L1280-L1282
micrometer-metrics/micrometer
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/db/DatabaseTableMetrics.java
DatabaseTableMetrics.monitor
public static void monitor(MeterRegistry registry, DataSource dataSource, String dataSourceName, String tableName, Iterable<Tag> tags) { """ Record the row count for an individual database table. @param registry The registry to bind metrics to. @param dataSource The data source to use to run the row ...
java
public static void monitor(MeterRegistry registry, DataSource dataSource, String dataSourceName, String tableName, Iterable<Tag> tags) { new DatabaseTableMetrics(dataSource, dataSourceName, tableName, tags).bindTo(registry); }
[ "public", "static", "void", "monitor", "(", "MeterRegistry", "registry", ",", "DataSource", "dataSource", ",", "String", "dataSourceName", ",", "String", "tableName", ",", "Iterable", "<", "Tag", ">", "tags", ")", "{", "new", "DatabaseTableMetrics", "(", "dataSo...
Record the row count for an individual database table. @param registry The registry to bind metrics to. @param dataSource The data source to use to run the row count query. @param dataSourceName The name prefix of the metrics. @param tableName The name of the table to report table size for. @param tags ...
[ "Record", "the", "row", "count", "for", "an", "individual", "database", "table", "." ]
train
https://github.com/micrometer-metrics/micrometer/blob/127fa3265325cc894f368312ed8890b76a055d88/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/db/DatabaseTableMetrics.java#L97-L99
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ExtUtils.java
ExtUtils.findAmendAnnotations
public static List<Annotation> findAmendAnnotations( final Method method, final Class<?> root, final Class<? extends RepositoryMethodDescriptor> descriptorType) { """ Searches for amend annotations (annotations annotated with {@link ru.vyarus.guice.persist.orient.repository.core.spi.amend....
java
public static List<Annotation> findAmendAnnotations( final Method method, final Class<?> root, final Class<? extends RepositoryMethodDescriptor> descriptorType) { final List<Annotation> res = filterAnnotations(AmendMethod.class, method.getAnnotations()); // strict check: if bad a...
[ "public", "static", "List", "<", "Annotation", ">", "findAmendAnnotations", "(", "final", "Method", "method", ",", "final", "Class", "<", "?", ">", "root", ",", "final", "Class", "<", "?", "extends", "RepositoryMethodDescriptor", ">", "descriptorType", ")", "{...
Searches for amend annotations (annotations annotated with {@link ru.vyarus.guice.persist.orient.repository.core.spi.amend.AmendMethod}). <p> Amend annotation may be defined on method, type and probably globally on root repository type. If annotation is defined in two places then only more prioritized will be used. Pri...
[ "Searches", "for", "amend", "annotations", "(", "annotations", "annotated", "with", "{", "@link", "ru", ".", "vyarus", ".", "guice", ".", "persist", ".", "orient", ".", "repository", ".", "core", ".", "spi", ".", "amend", ".", "AmendMethod", "}", ")", "....
train
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/util/ExtUtils.java#L99-L112
gpein/jcache-jee7
src/main/java/io/github/gpein/jcache/configuration/CacheConfiguration.java
CacheConfiguration.newMutable
public static <K, V> Configuration newMutable(TimeUnit expiryTimeUnit, long expiryDurationAmount) { """ Build a new mutable javax.cache.configuration.Configuration with an expiry policy @param expiryTimeUnit time unit @param expiryDurationAmount amount of time to wait before global cache expiration @param <K> K...
java
public static <K, V> Configuration newMutable(TimeUnit expiryTimeUnit, long expiryDurationAmount) { return new MutableConfiguration<K, V>().setExpiryPolicyFactory(factoryOf(new Duration(expiryTimeUnit, expiryDurationAmount))); }
[ "public", "static", "<", "K", ",", "V", ">", "Configuration", "newMutable", "(", "TimeUnit", "expiryTimeUnit", ",", "long", "expiryDurationAmount", ")", "{", "return", "new", "MutableConfiguration", "<", "K", ",", "V", ">", "(", ")", ".", "setExpiryPolicyFacto...
Build a new mutable javax.cache.configuration.Configuration with an expiry policy @param expiryTimeUnit time unit @param expiryDurationAmount amount of time to wait before global cache expiration @param <K> Key type @param <V> Value type @return a new cache configuration instance
[ "Build", "a", "new", "mutable", "javax", ".", "cache", ".", "configuration", ".", "Configuration", "with", "an", "expiry", "policy" ]
train
https://github.com/gpein/jcache-jee7/blob/492dd3bb6423cdfb064e7005952a7b79fe4cd7aa/src/main/java/io/github/gpein/jcache/configuration/CacheConfiguration.java#L38-L40
aws/aws-sdk-java
aws-java-sdk-fms/src/main/java/com/amazonaws/services/fms/model/Policy.java
Policy.setExcludeMap
public void setExcludeMap(java.util.Map<String, java.util.List<String>> excludeMap) { """ <p> Specifies the AWS account IDs to exclude from the policy. The <code>IncludeMap</code> values are evaluated first, with all the appropriate account IDs added to the policy. Then the accounts listed in <code>ExcludeMap</c...
java
public void setExcludeMap(java.util.Map<String, java.util.List<String>> excludeMap) { this.excludeMap = excludeMap; }
[ "public", "void", "setExcludeMap", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "java", ".", "util", ".", "List", "<", "String", ">", ">", "excludeMap", ")", "{", "this", ".", "excludeMap", "=", "excludeMap", ";", "}" ]
<p> Specifies the AWS account IDs to exclude from the policy. The <code>IncludeMap</code> values are evaluated first, with all the appropriate account IDs added to the policy. Then the accounts listed in <code>ExcludeMap</code> are removed, resulting in the final list of accounts to add to the policy. </p> <p> The key ...
[ "<p", ">", "Specifies", "the", "AWS", "account", "IDs", "to", "exclude", "from", "the", "policy", ".", "The", "<code", ">", "IncludeMap<", "/", "code", ">", "values", "are", "evaluated", "first", "with", "all", "the", "appropriate", "account", "IDs", "adde...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-fms/src/main/java/com/amazonaws/services/fms/model/Policy.java#L750-L752
awslabs/jsii
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java
JsiiObject.jsiiStaticGet
@Nullable protected static <T> T jsiiStaticGet(final Class<?> nativeClass, final String property, final Class<T> type) { """ Returns the value of a static property. @param nativeClass The java class. @param property The name of the property. @param type The expected java return type. @param <T> Return type...
java
@Nullable protected static <T> T jsiiStaticGet(final Class<?> nativeClass, final String property, final Class<T> type) { String fqn = engine.loadModuleForClass(nativeClass); return JsiiObjectMapper.treeToValue(engine.getClient().getStaticPropertyValue(fqn, property), type); }
[ "@", "Nullable", "protected", "static", "<", "T", ">", "T", "jsiiStaticGet", "(", "final", "Class", "<", "?", ">", "nativeClass", ",", "final", "String", "property", ",", "final", "Class", "<", "T", ">", "type", ")", "{", "String", "fqn", "=", "engine"...
Returns the value of a static property. @param nativeClass The java class. @param property The name of the property. @param type The expected java return type. @param <T> Return type @return Return value
[ "Returns", "the", "value", "of", "a", "static", "property", "." ]
train
https://github.com/awslabs/jsii/blob/6bbf743f5f65e98e5199ad31c93961533ffc40e5/packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiObject.java#L118-L122
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/query/PagingPredicate.java
PagingPredicate.setInnerPredicate
private void setInnerPredicate(Predicate<K, V> predicate) { """ Sets an inner predicate. throws {@link IllegalArgumentException} if inner predicate is also {@link PagingPredicate} @param predicate the inner predicate through which results will be filtered """ if (predicate instanceof PagingPredicat...
java
private void setInnerPredicate(Predicate<K, V> predicate) { if (predicate instanceof PagingPredicate) { throw new IllegalArgumentException("Nested PagingPredicate is not supported!"); } this.predicate = predicate; }
[ "private", "void", "setInnerPredicate", "(", "Predicate", "<", "K", ",", "V", ">", "predicate", ")", "{", "if", "(", "predicate", "instanceof", "PagingPredicate", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Nested PagingPredicate is not supported!\""...
Sets an inner predicate. throws {@link IllegalArgumentException} if inner predicate is also {@link PagingPredicate} @param predicate the inner predicate through which results will be filtered
[ "Sets", "an", "inner", "predicate", ".", "throws", "{", "@link", "IllegalArgumentException", "}", "if", "inner", "predicate", "is", "also", "{", "@link", "PagingPredicate", "}" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/PagingPredicate.java#L164-L169
ThreeTen/threetenbp
src/main/java/org/threeten/bp/chrono/Chronology.java
Chronology.zonedDateTime
@SuppressWarnings( { """ Obtains a zoned date-time in this chronology from another temporal object. <p> This creates a date-time in this chronology based on the specified {@code TemporalAccessor}. <p> This should obtain a {@code ZoneId} using {@link ZoneId#from(TemporalAccessor)}. The date-time should be obta...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) public ChronoZonedDateTime<?> zonedDateTime(TemporalAccessor temporal) { try { ZoneId zone = ZoneId.from(temporal); try { Instant instant = Instant.from(temporal); return zonedDateTime(instant, zone); ...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "ChronoZonedDateTime", "<", "?", ">", "zonedDateTime", "(", "TemporalAccessor", "temporal", ")", "{", "try", "{", "ZoneId", "zone", "=", "ZoneId", ".", "from", "(", ...
Obtains a zoned date-time in this chronology from another temporal object. <p> This creates a date-time in this chronology based on the specified {@code TemporalAccessor}. <p> This should obtain a {@code ZoneId} using {@link ZoneId#from(TemporalAccessor)}. The date-time should be obtained by obtaining an {@code Instant...
[ "Obtains", "a", "zoned", "date", "-", "time", "in", "this", "chronology", "from", "another", "temporal", "object", ".", "<p", ">", "This", "creates", "a", "date", "-", "time", "in", "this", "chronology", "based", "on", "the", "specified", "{", "@code", "...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/chrono/Chronology.java#L598-L614
fcrepo4/fcrepo4
fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraBaseResource.java
FedoraBaseResource.setUpJMSInfo
protected void setUpJMSInfo(final UriInfo uriInfo, final HttpHeaders headers) { """ Set the baseURL for JMS events. @param uriInfo the uri info @param headers HTTP headers """ try { String baseURL = getBaseUrlProperty(uriInfo); if (baseURL.length() == 0) { base...
java
protected void setUpJMSInfo(final UriInfo uriInfo, final HttpHeaders headers) { try { String baseURL = getBaseUrlProperty(uriInfo); if (baseURL.length() == 0) { baseURL = uriInfo.getBaseUri().toString(); } LOGGER.debug("setting baseURL = " + baseUR...
[ "protected", "void", "setUpJMSInfo", "(", "final", "UriInfo", "uriInfo", ",", "final", "HttpHeaders", "headers", ")", "{", "try", "{", "String", "baseURL", "=", "getBaseUrlProperty", "(", "uriInfo", ")", ";", "if", "(", "baseURL", ".", "length", "(", ")", ...
Set the baseURL for JMS events. @param uriInfo the uri info @param headers HTTP headers
[ "Set", "the", "baseURL", "for", "JMS", "events", "." ]
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraBaseResource.java#L109-L123
pac4j/pac4j
pac4j-oauth/src/main/java/org/pac4j/oauth/profile/definition/OAuthProfileDefinition.java
OAuthProfileDefinition.raiseProfileExtractionJsonError
protected void raiseProfileExtractionJsonError(String body, String missingNode) { """ Throws a {@link TechnicalException} to indicate that user profile extraction has failed. @param body the request body that the user profile should be have been extracted from @param missingNode the name of a JSON node that wa...
java
protected void raiseProfileExtractionJsonError(String body, String missingNode) { logger.error("Unable to extract user profile as no JSON node '{}' was found in body: {}", missingNode, body); throw new TechnicalException("No JSON node '" + missingNode + "' to extract user profile from"); }
[ "protected", "void", "raiseProfileExtractionJsonError", "(", "String", "body", ",", "String", "missingNode", ")", "{", "logger", ".", "error", "(", "\"Unable to extract user profile as no JSON node '{}' was found in body: {}\"", ",", "missingNode", ",", "body", ")", ";", ...
Throws a {@link TechnicalException} to indicate that user profile extraction has failed. @param body the request body that the user profile should be have been extracted from @param missingNode the name of a JSON node that was found missing. may be omitted
[ "Throws", "a", "{", "@link", "TechnicalException", "}", "to", "indicate", "that", "user", "profile", "extraction", "has", "failed", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-oauth/src/main/java/org/pac4j/oauth/profile/definition/OAuthProfileDefinition.java#L61-L64
ReactiveX/RxNetty
rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/sse/ServerSentEvent.java
ServerSentEvent.withEventId
public static ServerSentEvent withEventId(ByteBuf eventId, ByteBuf data) { """ Creates a {@link ServerSentEvent} instance with an event id. @param eventId Id for the event. @param data Data for the event. @return The {@link ServerSentEvent} instance. """ return new ServerSentEvent(eventId, null,...
java
public static ServerSentEvent withEventId(ByteBuf eventId, ByteBuf data) { return new ServerSentEvent(eventId, null, data); }
[ "public", "static", "ServerSentEvent", "withEventId", "(", "ByteBuf", "eventId", ",", "ByteBuf", "data", ")", "{", "return", "new", "ServerSentEvent", "(", "eventId", ",", "null", ",", "data", ")", ";", "}" ]
Creates a {@link ServerSentEvent} instance with an event id. @param eventId Id for the event. @param data Data for the event. @return The {@link ServerSentEvent} instance.
[ "Creates", "a", "{", "@link", "ServerSentEvent", "}", "instance", "with", "an", "event", "id", "." ]
train
https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/sse/ServerSentEvent.java#L252-L254
roboconf/roboconf-platform
miscellaneous/roboconf-doc-generator/src/main/java/net/roboconf/doc/generator/RenderingManager.java
RenderingManager.buildRenderer
private IRenderer buildRenderer( File outputDirectory, ApplicationTemplate applicationTemplate, File applicationDirectory, Renderer renderer, Map<String,String> typeAnnotations ) { """ Builds the right renderer. @param outputDirectory @param applicationTemplate @param applicationDirectory @param...
java
private IRenderer buildRenderer( File outputDirectory, ApplicationTemplate applicationTemplate, File applicationDirectory, Renderer renderer, Map<String,String> typeAnnotations ) { IRenderer result = null; switch( renderer ) { case HTML: result = new HtmlRenderer( outputDirectory, applicationTe...
[ "private", "IRenderer", "buildRenderer", "(", "File", "outputDirectory", ",", "ApplicationTemplate", "applicationTemplate", ",", "File", "applicationDirectory", ",", "Renderer", "renderer", ",", "Map", "<", "String", ",", "String", ">", "typeAnnotations", ")", "{", ...
Builds the right renderer. @param outputDirectory @param applicationTemplate @param applicationDirectory @param renderer @param typeAnnotations @return a renderer
[ "Builds", "the", "right", "renderer", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-doc-generator/src/main/java/net/roboconf/doc/generator/RenderingManager.java#L178-L208
google/closure-compiler
src/com/google/javascript/jscomp/TypeValidator.java
TypeValidator.expectCanAssignToPrototype
void expectCanAssignToPrototype(JSType ownerType, Node node, JSType rightType) { """ Expect that it's valid to assign something to a given type's prototype. <p>Most of these checks occur during TypedScopeCreator, so we just handle very basic cases here <p>For example, assuming `Foo` is a constructor, `Foo.pr...
java
void expectCanAssignToPrototype(JSType ownerType, Node node, JSType rightType) { if (ownerType.isFunctionType()) { FunctionType functionType = ownerType.toMaybeFunctionType(); if (functionType.isConstructor()) { expectObject(node, rightType, "cannot override prototype with non-object"); } ...
[ "void", "expectCanAssignToPrototype", "(", "JSType", "ownerType", ",", "Node", "node", ",", "JSType", "rightType", ")", "{", "if", "(", "ownerType", ".", "isFunctionType", "(", ")", ")", "{", "FunctionType", "functionType", "=", "ownerType", ".", "toMaybeFunctio...
Expect that it's valid to assign something to a given type's prototype. <p>Most of these checks occur during TypedScopeCreator, so we just handle very basic cases here <p>For example, assuming `Foo` is a constructor, `Foo.prototype = 3;` will warn because `3` is not an object. @param ownerType The type of the object...
[ "Expect", "that", "it", "s", "valid", "to", "assign", "something", "to", "a", "given", "type", "s", "prototype", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L760-L767
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_configureVpn_POST
public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_configureVpn_POST(String serviceName, Long datacenterId, String preSharedKey, String remoteEndpointInternalIp, String remoteEndpointPublicIp, String remoteVraNetwork, String remoteZvmInternalIp) throws IOException { """ Configure vpn b...
java
public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_configureVpn_POST(String serviceName, Long datacenterId, String preSharedKey, String remoteEndpointInternalIp, String remoteEndpointPublicIp, String remoteVraNetwork, String remoteZvmInternalIp) throws IOException { String qPath = "/dedic...
[ "public", "OvhTask", "serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_configureVpn_POST", "(", "String", "serviceName", ",", "Long", "datacenterId", ",", "String", "preSharedKey", ",", "String", "remoteEndpointInternalIp", ",", "String", "remoteEndpointPublicIp", ...
Configure vpn between your OVH Private Cloud and your onsite infrastructure REST: POST /dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zertoSingle/configureVpn @param remoteEndpointPublicIp [required] Your onsite endpoint public IP for the secured replication data tunnel @param remoteVraNetwor...
[ "Configure", "vpn", "between", "your", "OVH", "Private", "Cloud", "and", "your", "onsite", "infrastructure" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1856-L1867
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.getMultiRolePoolAsync
public Observable<WorkerPoolResourceInner> getMultiRolePoolAsync(String resourceGroupName, String name) { """ Get properties of a multi-role pool. Get properties of a multi-role pool. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environ...
java
public Observable<WorkerPoolResourceInner> getMultiRolePoolAsync(String resourceGroupName, String name) { return getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<WorkerPoolResourceInner>, WorkerPoolResourceInner>() { @Override public WorkerP...
[ "public", "Observable", "<", "WorkerPoolResourceInner", ">", "getMultiRolePoolAsync", "(", "String", "resourceGroupName", ",", "String", "name", ")", "{", "return", "getMultiRolePoolWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ")", ".", "map", "(", ...
Get properties of a multi-role pool. Get properties of a multi-role pool. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the WorkerPoo...
[ "Get", "properties", "of", "a", "multi", "-", "role", "pool", ".", "Get", "properties", "of", "a", "multi", "-", "role", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L2209-L2216
apache/flink
flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java
PythonDataStream.write_to_socket
@PublicEvolving public void write_to_socket(String host, Integer port, SerializationSchema<PyObject> schema) throws IOException { """ A thin wrapper layer over {@link DataStream#writeToSocket(String, int, org.apache.flink.api.common.serialization.SerializationSchema)}. @param host host of the socket @param po...
java
@PublicEvolving public void write_to_socket(String host, Integer port, SerializationSchema<PyObject> schema) throws IOException { stream.writeToSocket(host, port, new PythonSerializationSchema(schema)); }
[ "@", "PublicEvolving", "public", "void", "write_to_socket", "(", "String", "host", ",", "Integer", "port", ",", "SerializationSchema", "<", "PyObject", ">", "schema", ")", "throws", "IOException", "{", "stream", ".", "writeToSocket", "(", "host", ",", "port", ...
A thin wrapper layer over {@link DataStream#writeToSocket(String, int, org.apache.flink.api.common.serialization.SerializationSchema)}. @param host host of the socket @param port port of the socket @param schema schema for serialization
[ "A", "thin", "wrapper", "layer", "over", "{", "@link", "DataStream#writeToSocket", "(", "String", "int", "org", ".", "apache", ".", "flink", ".", "api", ".", "common", ".", "serialization", ".", "SerializationSchema", ")", "}", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/api/datastream/PythonDataStream.java#L176-L179
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java
SARLEclipsePlugin.logErrorMessage
public void logErrorMessage(String message) { """ Logs an internal error with the specified message. @param message the error message to log """ getILog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, null)); }
java
public void logErrorMessage(String message) { getILog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, null)); }
[ "public", "void", "logErrorMessage", "(", "String", "message", ")", "{", "getILog", "(", ")", ".", "log", "(", "new", "Status", "(", "IStatus", ".", "ERROR", ",", "PLUGIN_ID", ",", "message", ",", "null", ")", ")", ";", "}" ]
Logs an internal error with the specified message. @param message the error message to log
[ "Logs", "an", "internal", "error", "with", "the", "specified", "message", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/SARLEclipsePlugin.java#L286-L288
eserating/siren4j
src/main/java/com/google/code/siren4j/converter/ReflectingConverter.java
ReflectingConverter.handleSubEntity
private void handleSubEntity(EntityBuilder builder, Object obj, Field currentField, List<ReflectedInfo> fieldInfo) throws Siren4JException { """ Handles sub entities. @param builder assumed not <code>null</code>. @param obj assumed not <code>null</code>. @param currentField assumed not <code>null...
java
private void handleSubEntity(EntityBuilder builder, Object obj, Field currentField, List<ReflectedInfo> fieldInfo) throws Siren4JException { Siren4JSubEntity subAnno = getSubEntityAnnotation(currentField, fieldInfo); if (subAnno != null) { if (isCollection(obj, currentField...
[ "private", "void", "handleSubEntity", "(", "EntityBuilder", "builder", ",", "Object", "obj", ",", "Field", "currentField", ",", "List", "<", "ReflectedInfo", ">", "fieldInfo", ")", "throws", "Siren4JException", "{", "Siren4JSubEntity", "subAnno", "=", "getSubEntityA...
Handles sub entities. @param builder assumed not <code>null</code>. @param obj assumed not <code>null</code>. @param currentField assumed not <code>null</code>. @throws Siren4JException
[ "Handles", "sub", "entities", "." ]
train
https://github.com/eserating/siren4j/blob/f12e3185076ad920352ec4f6eb2a071a3683505f/src/main/java/com/google/code/siren4j/converter/ReflectingConverter.java#L474-L494
Talend/tesb-rt-se
locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java
CXFEndpointProvider.addProperties
private static void addProperties(EndpointReferenceType epr, SLProperties props) { """ Adds service locator properties to an endpoint reference. @param epr @param props """ MetadataType metadata = WSAEndpointReferenceUtils.getSetMetadata(epr); ServiceLocatorPropertiesType jaxbProps = SLProper...
java
private static void addProperties(EndpointReferenceType epr, SLProperties props) { MetadataType metadata = WSAEndpointReferenceUtils.getSetMetadata(epr); ServiceLocatorPropertiesType jaxbProps = SLPropertiesConverter.toServiceLocatorPropertiesType(props); JAXBElement<ServiceLocatorPropertiesTyp...
[ "private", "static", "void", "addProperties", "(", "EndpointReferenceType", "epr", ",", "SLProperties", "props", ")", "{", "MetadataType", "metadata", "=", "WSAEndpointReferenceUtils", ".", "getSetMetadata", "(", "epr", ")", ";", "ServiceLocatorPropertiesType", "jaxbPro...
Adds service locator properties to an endpoint reference. @param epr @param props
[ "Adds", "service", "locator", "properties", "to", "an", "endpoint", "reference", "." ]
train
https://github.com/Talend/tesb-rt-se/blob/0a151a6d91ffff65ac4b5ee0c5b2c882ac28d886/locator/src/main/java/org/talend/esb/servicelocator/cxf/internal/CXFEndpointProvider.java#L310-L317
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java
ViewUtils.hideView
public static void hideView(View parentView, int id) { """ Sets visibility of the given view to <code>View.GONE</code>. @param parentView The View used to call findViewId() on. @param id R.id.xxxx value for the view to hide "expected textView to throw a ClassCastException" + textView. """ i...
java
public static void hideView(View parentView, int id) { if (parentView != null) { View view = parentView.findViewById(id); if (view != null) { view.setVisibility(View.GONE); } else { Log.e("Caffeine", "View does not exist. Could not hide it."); ...
[ "public", "static", "void", "hideView", "(", "View", "parentView", ",", "int", "id", ")", "{", "if", "(", "parentView", "!=", "null", ")", "{", "View", "view", "=", "parentView", ".", "findViewById", "(", "id", ")", ";", "if", "(", "view", "!=", "nul...
Sets visibility of the given view to <code>View.GONE</code>. @param parentView The View used to call findViewId() on. @param id R.id.xxxx value for the view to hide "expected textView to throw a ClassCastException" + textView.
[ "Sets", "visibility", "of", "the", "given", "view", "to", "<code", ">", "View", ".", "GONE<", "/", "code", ">", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java#L249-L258
google/closure-compiler
src/com/google/javascript/jscomp/CollapseProperties.java
CollapseProperties.updateTwinnedDeclaration
private void updateTwinnedDeclaration(String alias, Name refName, Ref ref) { """ Updates the initial assignment to a collapsible property at global scope by adding a VAR stub and collapsing the property. e.g. c = a.b = 1; => var a$b; c = a$b = 1; This specifically handles "twinned" assignments, which are those w...
java
private void updateTwinnedDeclaration(String alias, Name refName, Ref ref) { checkNotNull(ref.getTwin()); // Don't handle declarations of an already flat name, just qualified names. if (!ref.getNode().isGetProp()) { return; } Node rvalue = ref.getNode().getNext(); Node parent = ref.getNode...
[ "private", "void", "updateTwinnedDeclaration", "(", "String", "alias", ",", "Name", "refName", ",", "Ref", "ref", ")", "{", "checkNotNull", "(", "ref", ".", "getTwin", "(", ")", ")", ";", "// Don't handle declarations of an already flat name, just qualified names.", "...
Updates the initial assignment to a collapsible property at global scope by adding a VAR stub and collapsing the property. e.g. c = a.b = 1; => var a$b; c = a$b = 1; This specifically handles "twinned" assignments, which are those where the assignment is also used as a reference and which need special handling. @param...
[ "Updates", "the", "initial", "assignment", "to", "a", "collapsible", "property", "at", "global", "scope", "by", "adding", "a", "VAR", "stub", "and", "collapsing", "the", "property", ".", "e", ".", "g", ".", "c", "=", "a", ".", "b", "=", "1", ";", "="...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CollapseProperties.java#L464-L503
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jPropertyHelper.java
Neo4jPropertyHelper.isIdProperty
public boolean isIdProperty(OgmEntityPersister persister, List<String> namesWithoutAlias) { """ Check if the property is part of the identifier of the entity. @param persister the {@link OgmEntityPersister} of the entity with the property @param namesWithoutAlias the path to the property with all the aliases r...
java
public boolean isIdProperty(OgmEntityPersister persister, List<String> namesWithoutAlias) { String join = StringHelper.join( namesWithoutAlias, "." ); Type propertyType = persister.getPropertyType( namesWithoutAlias.get( 0 ) ); String[] identifierColumnNames = persister.getIdentifierColumnNames(); if ( property...
[ "public", "boolean", "isIdProperty", "(", "OgmEntityPersister", "persister", ",", "List", "<", "String", ">", "namesWithoutAlias", ")", "{", "String", "join", "=", "StringHelper", ".", "join", "(", "namesWithoutAlias", ",", "\".\"", ")", ";", "Type", "propertyTy...
Check if the property is part of the identifier of the entity. @param persister the {@link OgmEntityPersister} of the entity with the property @param namesWithoutAlias the path to the property with all the aliases resolved @return {@code true} if the property is part of the id, {@code false} otherwise.
[ "Check", "if", "the", "property", "is", "part", "of", "the", "identifier", "of", "the", "entity", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/query/parsing/impl/Neo4jPropertyHelper.java#L164-L178
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/extensions/pack/KnapsackDecorator.java
KnapsackDecorator.postRemoveItem
@SuppressWarnings("squid:S3346") public void postRemoveItem(int item, int bin) { """ update the candidate list of a bin when an item is removed @param item the removed item @param bin the bin """ assert candidate.get(bin).get(item); candidate.get(bin).clear(item); }
java
@SuppressWarnings("squid:S3346") public void postRemoveItem(int item, int bin) { assert candidate.get(bin).get(item); candidate.get(bin).clear(item); }
[ "@", "SuppressWarnings", "(", "\"squid:S3346\"", ")", "public", "void", "postRemoveItem", "(", "int", "item", ",", "int", "bin", ")", "{", "assert", "candidate", ".", "get", "(", "bin", ")", ".", "get", "(", "item", ")", ";", "candidate", ".", "get", "...
update the candidate list of a bin when an item is removed @param item the removed item @param bin the bin
[ "update", "the", "candidate", "list", "of", "a", "bin", "when", "an", "item", "is", "removed" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/extensions/pack/KnapsackDecorator.java#L148-L152
acromusashi/acromusashi-stream-ml
src/main/java/acromusashi/stream/ml/anomaly/lof/LofCalculator.java
LofCalculator.calculateLof
protected static double calculateLof(LofPoint basePoint, LofDataSet dataSet) { """ basePointの局所外れ係数(Local outlier factor)を算出する。 @param basePoint 算出元対象点 @param dataSet 全体データ @return 局所外れ係数 """ int countedData = 0; double totalAmount = 0.0d; for (String targetDataId : basePoint.getkD...
java
protected static double calculateLof(LofPoint basePoint, LofDataSet dataSet) { int countedData = 0; double totalAmount = 0.0d; for (String targetDataId : basePoint.getkDistanceNeighbor()) { LofPoint targetPoint = dataSet.getDataMap().get(targetDataId); totalA...
[ "protected", "static", "double", "calculateLof", "(", "LofPoint", "basePoint", ",", "LofDataSet", "dataSet", ")", "{", "int", "countedData", "=", "0", ";", "double", "totalAmount", "=", "0.0d", ";", "for", "(", "String", "targetDataId", ":", "basePoint", ".", ...
basePointの局所外れ係数(Local outlier factor)を算出する。 @param basePoint 算出元対象点 @param dataSet 全体データ @return 局所外れ係数
[ "basePointの局所外れ係数", "(", "Local", "outlier", "factor", ")", "を算出する。" ]
train
https://github.com/acromusashi/acromusashi-stream-ml/blob/26d6799a917cacda68e21d506c75cfeb17d832a6/src/main/java/acromusashi/stream/ml/anomaly/lof/LofCalculator.java#L415-L433
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/AvroUtils.java
AvroUtils.checkReaderWriterCompatibility
public static boolean checkReaderWriterCompatibility(Schema readerSchema, Schema writerSchema, boolean ignoreNamespace) { """ Validates that the provided reader schema can be used to decode avro data written with the provided writer schema. @param readerSchema schema to check. @param writerSchema schema to chec...
java
public static boolean checkReaderWriterCompatibility(Schema readerSchema, Schema writerSchema, boolean ignoreNamespace) { if (ignoreNamespace) { List<Schema.Field> fields = deepCopySchemaFields(readerSchema); readerSchema = Schema.createRecord(writerSchema.getName(), writerSchema.getDoc(), writerSchema....
[ "public", "static", "boolean", "checkReaderWriterCompatibility", "(", "Schema", "readerSchema", ",", "Schema", "writerSchema", ",", "boolean", "ignoreNamespace", ")", "{", "if", "(", "ignoreNamespace", ")", "{", "List", "<", "Schema", ".", "Field", ">", "fields", ...
Validates that the provided reader schema can be used to decode avro data written with the provided writer schema. @param readerSchema schema to check. @param writerSchema schema to check. @param ignoreNamespace whether name and namespace should be ignored in validation @return true if validation passes
[ "Validates", "that", "the", "provided", "reader", "schema", "can", "be", "used", "to", "decode", "avro", "data", "written", "with", "the", "provided", "writer", "schema", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/AvroUtils.java#L101-L110
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CalendarAstronomer.java
CalendarAstronomer.eclipticToEquatorial
public final Equatorial eclipticToEquatorial(double eclipLong, double eclipLat) { """ Convert from ecliptic to equatorial coordinates. @param eclipLong The ecliptic longitude @param eclipLat The ecliptic latitude @return The corresponding point in equatorial coordinates. @hide draft /...
java
public final Equatorial eclipticToEquatorial(double eclipLong, double eclipLat) { // See page 42 of "Practial Astronomy with your Calculator", // by Peter Duffet-Smith, for details on the algorithm. double obliq = eclipticObliquity(); double sinE = Math.sin(obliq); double co...
[ "public", "final", "Equatorial", "eclipticToEquatorial", "(", "double", "eclipLong", ",", "double", "eclipLat", ")", "{", "// See page 42 of \"Practial Astronomy with your Calculator\",", "// by Peter Duffet-Smith, for details on the algorithm.", "double", "obliq", "=", "eclipticOb...
Convert from ecliptic to equatorial coordinates. @param eclipLong The ecliptic longitude @param eclipLat The ecliptic latitude @return The corresponding point in equatorial coordinates. @hide draft / provisional / internal are hidden on Android
[ "Convert", "from", "ecliptic", "to", "equatorial", "coordinates", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CalendarAstronomer.java#L442-L460
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/HopkinsStatisticClusteringTendency.java
HopkinsStatisticClusteringTendency.computeNNForRealData
protected double computeNNForRealData(final KNNQuery<NumberVector> knnQuery, Relation<NumberVector> relation, final int dim) { """ Search nearest neighbors for <em>real</em> data members. @param knnQuery KNN query @param relation Data relation @return Aggregated 1NN distances """ double w = 0.; Mo...
java
protected double computeNNForRealData(final KNNQuery<NumberVector> knnQuery, Relation<NumberVector> relation, final int dim) { double w = 0.; ModifiableDBIDs dataSampleIds = DBIDUtil.randomSample(relation.getDBIDs(), sampleSize, random); for(DBIDIter iter = dataSampleIds.iter(); iter.valid(); iter.advance()...
[ "protected", "double", "computeNNForRealData", "(", "final", "KNNQuery", "<", "NumberVector", ">", "knnQuery", ",", "Relation", "<", "NumberVector", ">", "relation", ",", "final", "int", "dim", ")", "{", "double", "w", "=", "0.", ";", "ModifiableDBIDs", "dataS...
Search nearest neighbors for <em>real</em> data members. @param knnQuery KNN query @param relation Data relation @return Aggregated 1NN distances
[ "Search", "nearest", "neighbors", "for", "<em", ">", "real<", "/", "em", ">", "data", "members", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/HopkinsStatisticClusteringTendency.java#L204-L212
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/MLLibUtil.java
MLLibUtil.fromLabeledPoint
public static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels, boolean preCache) { """ Converts JavaRDD labeled points to JavaRDD DataSets. @param data JavaRDD LabeledPoints @param numPossibleLabels number of possible labels @param preCache boolean ...
java
public static JavaRDD<DataSet> fromLabeledPoint(JavaRDD<LabeledPoint> data, final long numPossibleLabels, boolean preCache) { if (preCache && !data.getStorageLevel().useMemory()) { data.cache(); } return data.map(new Function<LabeledPoint, DataSet>() { ...
[ "public", "static", "JavaRDD", "<", "DataSet", ">", "fromLabeledPoint", "(", "JavaRDD", "<", "LabeledPoint", ">", "data", ",", "final", "long", "numPossibleLabels", ",", "boolean", "preCache", ")", "{", "if", "(", "preCache", "&&", "!", "data", ".", "getStor...
Converts JavaRDD labeled points to JavaRDD DataSets. @param data JavaRDD LabeledPoints @param numPossibleLabels number of possible labels @param preCache boolean pre-cache rdd before operation @return
[ "Converts", "JavaRDD", "labeled", "points", "to", "JavaRDD", "DataSets", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/MLLibUtil.java#L358-L369
contentful/contentful.java
src/main/java/com/contentful/java/cda/image/ImageOption.java
ImageOption.jpegQualityOf
public static ImageOption jpegQualityOf(int quality) { """ Define the quality of the jpg image to be returned. @param quality an positive integer between 1 and 100. @return an image option for updating the url. @throws IllegalArgumentException if quality is not between 1 and 100. """ if (quality < 1 |...
java
public static ImageOption jpegQualityOf(int quality) { if (quality < 1 || quality > 100) { throw new IllegalArgumentException("Quality has to be in the range from 1 to 100."); } return new ImageOption("q", Integer.toString(quality)); }
[ "public", "static", "ImageOption", "jpegQualityOf", "(", "int", "quality", ")", "{", "if", "(", "quality", "<", "1", "||", "quality", ">", "100", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Quality has to be in the range from 1 to 100.\"", ")", "...
Define the quality of the jpg image to be returned. @param quality an positive integer between 1 and 100. @return an image option for updating the url. @throws IllegalArgumentException if quality is not between 1 and 100.
[ "Define", "the", "quality", "of", "the", "jpg", "image", "to", "be", "returned", "." ]
train
https://github.com/contentful/contentful.java/blob/6ecc2ace454c674b218b99489dc50697b1dbffcb/src/main/java/com/contentful/java/cda/image/ImageOption.java#L161-L167
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/crs/ST_SetSRID.java
ST_SetSRID.setSRID
public static Geometry setSRID(Geometry geometry, Integer srid) throws IllegalArgumentException { """ Set a new SRID to the geometry @param geometry @param srid @return @throws IllegalArgumentException """ if (geometry == null) { return null; } if (srid == null) { ...
java
public static Geometry setSRID(Geometry geometry, Integer srid) throws IllegalArgumentException { if (geometry == null) { return null; } if (srid == null) { throw new IllegalArgumentException("The SRID code cannot be null."); } Geometry geom = geometry.cop...
[ "public", "static", "Geometry", "setSRID", "(", "Geometry", "geometry", ",", "Integer", "srid", ")", "throws", "IllegalArgumentException", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "srid", "==", "null", ")",...
Set a new SRID to the geometry @param geometry @param srid @return @throws IllegalArgumentException
[ "Set", "a", "new", "SRID", "to", "the", "geometry" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/crs/ST_SetSRID.java#L51-L61
b3log/latke
latke-core/src/main/java/org/json/JSONObject.java
JSONObject.optBigDecimal
public BigDecimal optBigDecimal(String key, BigDecimal defaultValue) { """ Get an optional BigDecimal associated with a key, or the defaultValue if there is no such key or if its value is not a number. If the value is a string, an attempt will be made to evaluate it as a number. If the value is float or double,...
java
public BigDecimal optBigDecimal(String key, BigDecimal defaultValue) { Object val = this.opt(key); return objectToBigDecimal(val, defaultValue); }
[ "public", "BigDecimal", "optBigDecimal", "(", "String", "key", ",", "BigDecimal", "defaultValue", ")", "{", "Object", "val", "=", "this", ".", "opt", "(", "key", ")", ";", "return", "objectToBigDecimal", "(", "val", ",", "defaultValue", ")", ";", "}" ]
Get an optional BigDecimal associated with a key, or the defaultValue if there is no such key or if its value is not a number. If the value is a string, an attempt will be made to evaluate it as a number. If the value is float or double, then the {@link BigDecimal#BigDecimal(double)} constructor will be used. See notes...
[ "Get", "an", "optional", "BigDecimal", "associated", "with", "a", "key", "or", "the", "defaultValue", "if", "there", "is", "no", "such", "key", "or", "if", "its", "value", "is", "not", "a", "number", ".", "If", "the", "value", "is", "a", "string", "an"...
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/JSONObject.java#L1109-L1112
santhosh-tekuri/jlibs
xml/src/main/java/jlibs/xml/xsl/TransformerUtil.java
TransformerUtil.setOutputProperties
public static Transformer setOutputProperties(Transformer transformer, boolean omitXMLDeclaration, int indentAmount, String encoding) { """ to set various output properties on given transformer. @param transformer transformer on which properties are set @param omitXMLDeclaration omit xml declarati...
java
public static Transformer setOutputProperties(Transformer transformer, boolean omitXMLDeclaration, int indentAmount, String encoding){ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, omitXMLDeclaration ? "yes" : "no"); // indentation if(indentAmount>0){ transformer.se...
[ "public", "static", "Transformer", "setOutputProperties", "(", "Transformer", "transformer", ",", "boolean", "omitXMLDeclaration", ",", "int", "indentAmount", ",", "String", "encoding", ")", "{", "transformer", ".", "setOutputProperty", "(", "OutputKeys", ".", "OMIT_X...
to set various output properties on given transformer. @param transformer transformer on which properties are set @param omitXMLDeclaration omit xml declaration or not @param indentAmount the number fo spaces used for indentation. use <=0, in case you dont want indentation @param encoding ...
[ "to", "set", "various", "output", "properties", "on", "given", "transformer", "." ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/xml/src/main/java/jlibs/xml/xsl/TransformerUtil.java#L44-L57
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java
MarshallUtil.marshallArray
public static <E> void marshallArray(E[] array, ObjectOutput out) throws IOException { """ Marshall arrays. <p> This method supports {@code null} {@code array}. @param array Array to marshall. @param out {@link ObjectOutput} to write. @param <E> Array type. @throws IOException If any of the usual Input...
java
public static <E> void marshallArray(E[] array, ObjectOutput out) throws IOException { final int size = array == null ? NULL_VALUE : array.length; marshallSize(out, size); if (size <= 0) { return; } for (int i = 0; i < size; ++i) { out.writeObject(array[i]); } }
[ "public", "static", "<", "E", ">", "void", "marshallArray", "(", "E", "[", "]", "array", ",", "ObjectOutput", "out", ")", "throws", "IOException", "{", "final", "int", "size", "=", "array", "==", "null", "?", "NULL_VALUE", ":", "array", ".", "length", ...
Marshall arrays. <p> This method supports {@code null} {@code array}. @param array Array to marshall. @param out {@link ObjectOutput} to write. @param <E> Array type. @throws IOException If any of the usual Input/Output related exceptions occur.
[ "Marshall", "arrays", ".", "<p", ">", "This", "method", "supports", "{", "@code", "null", "}", "{", "@code", "array", "}", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L184-L193
twitter/cloudhopper-commons
ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/DataCoding.java
DataCoding.createCharacterEncodingGroup
static public DataCoding createCharacterEncodingGroup(byte characterEncoding) throws IllegalArgumentException { """ Creates a "Character Encoding" group data coding scheme where 16 different languages are supported. This method validates the range and sets the message class to 0 and compression flags to false. ...
java
static public DataCoding createCharacterEncodingGroup(byte characterEncoding) throws IllegalArgumentException { // bits 3 thru 0 of the encoding represent 16 languages // make sure the top bits 7 thru 4 are not set if ((characterEncoding & 0xF0) != 0) { throw new IllegalArgumentExcep...
[ "static", "public", "DataCoding", "createCharacterEncodingGroup", "(", "byte", "characterEncoding", ")", "throws", "IllegalArgumentException", "{", "// bits 3 thru 0 of the encoding represent 16 languages", "// make sure the top bits 7 thru 4 are not set", "if", "(", "(", "characterE...
Creates a "Character Encoding" group data coding scheme where 16 different languages are supported. This method validates the range and sets the message class to 0 and compression flags to false. @param characterEncoding The different possible character encodings @return A new immutable DataCoding instance representin...
[ "Creates", "a", "Character", "Encoding", "group", "data", "coding", "scheme", "where", "16", "different", "languages", "are", "supported", ".", "This", "method", "validates", "the", "range", "and", "sets", "the", "message", "class", "to", "0", "and", "compress...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-gsm/src/main/java/com/cloudhopper/commons/gsm/DataCoding.java#L202-L209
cdapio/tigon
tigon-flow/src/main/java/co/cask/tigon/internal/app/runtime/distributed/AbstractDistributedProgramRunner.java
AbstractDistributedProgramRunner.copyProgramJar
private Program copyProgramJar(final Program program, File programDir) throws IOException { """ Copies the program jar to a local temp file and return a {@link Program} instance with {@link Program#getJarLocation()} points to the local temp file. """ File tempJar = File.createTempFile(program.getName(), "...
java
private Program copyProgramJar(final Program program, File programDir) throws IOException { File tempJar = File.createTempFile(program.getName(), ".jar"); Files.copy(new InputSupplier<InputStream>() { @Override public InputStream getInput() throws IOException { return program.getJarLocation(...
[ "private", "Program", "copyProgramJar", "(", "final", "Program", "program", ",", "File", "programDir", ")", "throws", "IOException", "{", "File", "tempJar", "=", "File", ".", "createTempFile", "(", "program", ".", "getName", "(", ")", ",", "\".jar\"", ")", "...
Copies the program jar to a local temp file and return a {@link Program} instance with {@link Program#getJarLocation()} points to the local temp file.
[ "Copies", "the", "program", "jar", "to", "a", "local", "temp", "file", "and", "return", "a", "{" ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-flow/src/main/java/co/cask/tigon/internal/app/runtime/distributed/AbstractDistributedProgramRunner.java#L164-L175
rey5137/material
material/src/main/java/com/rey/material/widget/Slider.java
Slider.setValueRange
public void setValueRange(int min, int max, boolean animation) { """ Set the randge of selectable value. @param min The minimum selectable value. @param max The maximum selectable value. @param animation Indicate that should show animation when thumb's current position changed. """ if(max < min || (...
java
public void setValueRange(int min, int max, boolean animation){ if(max < min || (min == mMinValue && max == mMaxValue)) return; float oldValue = getExactValue(); float oldPosition = getPosition(); mMinValue = min; mMaxValue = max; setValue(oldValue, animatio...
[ "public", "void", "setValueRange", "(", "int", "min", ",", "int", "max", ",", "boolean", "animation", ")", "{", "if", "(", "max", "<", "min", "||", "(", "min", "==", "mMinValue", "&&", "max", "==", "mMaxValue", ")", ")", "return", ";", "float", "oldV...
Set the randge of selectable value. @param min The minimum selectable value. @param max The maximum selectable value. @param animation Indicate that should show animation when thumb's current position changed.
[ "Set", "the", "randge", "of", "selectable", "value", "." ]
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/Slider.java#L374-L386
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/windowing/WatermarkTimeTriggerPolicy.java
WatermarkTimeTriggerPolicy.getNextAlignedWindowTs
private long getNextAlignedWindowTs(long startTs, long endTs) { """ Computes the next window by scanning the events in the window and finds the next aligned window between the startTs and endTs. Return the end ts of the next aligned window, i.e. the ts when the window should fire. @param startTs the start tim...
java
private long getNextAlignedWindowTs(long startTs, long endTs) { long nextTs = windowManager.getEarliestEventTs(startTs, endTs); if (nextTs == Long.MAX_VALUE || (nextTs % slidingIntervalMs == 0)) { return nextTs; } return nextTs + (slidingIntervalMs - (nextTs % slidingInterval...
[ "private", "long", "getNextAlignedWindowTs", "(", "long", "startTs", ",", "long", "endTs", ")", "{", "long", "nextTs", "=", "windowManager", ".", "getEarliestEventTs", "(", "startTs", ",", "endTs", ")", ";", "if", "(", "nextTs", "==", "Long", ".", "MAX_VALUE...
Computes the next window by scanning the events in the window and finds the next aligned window between the startTs and endTs. Return the end ts of the next aligned window, i.e. the ts when the window should fire. @param startTs the start timestamp (excluding) @param endTs the end timestamp (including) @return the ali...
[ "Computes", "the", "next", "window", "by", "scanning", "the", "events", "in", "the", "window", "and", "finds", "the", "next", "aligned", "window", "between", "the", "startTs", "and", "endTs", ".", "Return", "the", "end", "ts", "of", "the", "next", "aligned...
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/windowing/WatermarkTimeTriggerPolicy.java#L109-L115
VoltDB/voltdb
src/frontend/org/voltcore/utils/ssl/SSLConfiguration.java
SSLConfiguration.createTrustManagers
private static TrustManagerFactory createTrustManagers(String filepath, String keystorePassword) throws KeyStoreException, FileNotFoundException, IOException, NoSuchAlgorithmException, CertificateException { """ Creates the trust managers required to initiate the {@link SSLContext}, using a...
java
private static TrustManagerFactory createTrustManagers(String filepath, String keystorePassword) throws KeyStoreException, FileNotFoundException, IOException, NoSuchAlgorithmException, CertificateException { KeyStore trustStore = KeyStore.getInstance("JKS"); try (InputStream trus...
[ "private", "static", "TrustManagerFactory", "createTrustManagers", "(", "String", "filepath", ",", "String", "keystorePassword", ")", "throws", "KeyStoreException", ",", "FileNotFoundException", ",", "IOException", ",", "NoSuchAlgorithmException", ",", "CertificateException",...
Creates the trust managers required to initiate the {@link SSLContext}, using a JKS keystore as an input. @param filepath - the path to the JKS keystore. @param keystorePassword - the keystore's password. @return {@link TrustManager} array, that will be used to initiate the {@link SSLContext}. @throws Exception
[ "Creates", "the", "trust", "managers", "required", "to", "initiate", "the", "{", "@link", "SSLContext", "}", "using", "a", "JKS", "keystore", "as", "an", "input", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/ssl/SSLConfiguration.java#L151-L161
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/api/OauthAPI.java
OauthAPI.getOauthPageUrl
public String getOauthPageUrl(String redirectUrl, OauthScope scope, String state) { """ 生成回调url,这个结果要求用户在微信中打开,即可获得token,并指向redirectUrl @param redirectUrl 用户自己设置的回调地址 @param scope 授权作用域 @param state 用户自带参数 @return 回调url,用户在微信中打开即可开始授权 """ BeanUtil.requireNonNull(redirectUrl, "redirect...
java
public String getOauthPageUrl(String redirectUrl, OauthScope scope, String state) { BeanUtil.requireNonNull(redirectUrl, "redirectUrl is null"); BeanUtil.requireNonNull(scope, "scope is null"); String userState = StrUtil.isBlank(state) ? "STATE" : state; String url = null; try { ...
[ "public", "String", "getOauthPageUrl", "(", "String", "redirectUrl", ",", "OauthScope", "scope", ",", "String", "state", ")", "{", "BeanUtil", ".", "requireNonNull", "(", "redirectUrl", ",", "\"redirectUrl is null\"", ")", ";", "BeanUtil", ".", "requireNonNull", "...
生成回调url,这个结果要求用户在微信中打开,即可获得token,并指向redirectUrl @param redirectUrl 用户自己设置的回调地址 @param scope 授权作用域 @param state 用户自带参数 @return 回调url,用户在微信中打开即可开始授权
[ "生成回调url,这个结果要求用户在微信中打开,即可获得token,并指向redirectUrl" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/api/OauthAPI.java#L38-L56
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java
AnchorCell.renderDataCellContents
protected void renderDataCellContents(AbstractRenderAppender appender, String jspFragmentOutput) { """ Render the contents of the HTML anchor. This method calls to an {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.CellDecorator} associated with this tag. The result of renderingi is appended ...
java
protected void renderDataCellContents(AbstractRenderAppender appender, String jspFragmentOutput) { /* render any JavaScript needed to support framework features */ if (_anchorState.id != null) { HttpServletRequest request = JspUtil.getRequest(getJspContext()); String script = re...
[ "protected", "void", "renderDataCellContents", "(", "AbstractRenderAppender", "appender", ",", "String", "jspFragmentOutput", ")", "{", "/* render any JavaScript needed to support framework features */", "if", "(", "_anchorState", ".", "id", "!=", "null", ")", "{", "HttpSer...
Render the contents of the HTML anchor. This method calls to an {@link org.apache.beehive.netui.databinding.datagrid.api.rendering.CellDecorator} associated with this tag. The result of renderingi is appended to the <code>appender</code> @param appender the {@link AbstractRenderAppender} to which output should be rend...
[ "Render", "the", "contents", "of", "the", "HTML", "anchor", ".", "This", "method", "calls", "to", "an", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java#L612-L622
unbescape/unbescape
src/main/java/org/unbescape/html/HtmlEscape.java
HtmlEscape.unescapeHtml
public static void unescapeHtml(final char[] text, final int offset, final int len, final Writer writer) throws IOException { """ <p> Perform an HTML <strong>unescape</strong> operation on a <tt>char[]</tt> input. </p> <p> No additional configuration arguments are required. ...
java
public static void unescapeHtml(final char[] text, final int offset, final int len, final Writer writer) throws IOException{ if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } final int textLen = (text...
[ "public", "static", "void", "unescapeHtml", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "if", "(", "writer", "==", "null", ")", ...
<p> Perform an HTML <strong>unescape</strong> operation on a <tt>char[]</tt> input. </p> <p> No additional configuration arguments are required. Unescape operations will always perform <em>complete</em> unescape of NCRs (whole HTML5 set supported), decimal and hexadecimal references. </p> <p> This method is <strong>thr...
[ "<p", ">", "Perform", "an", "HTML", "<strong", ">", "unescape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", ".", "<", "/", "p", ">", "<p", ">", "No", "additional", "configuration", "arguments",...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/html/HtmlEscape.java#L1198-L1219
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/inject/writer/AbstractClassFileWriter.java
AbstractClassFileWriter.writeClassToDisk
protected void writeClassToDisk(File targetDir, ClassWriter classWriter, String className) throws IOException { """ Writes the class file to disk in the given directory. @param targetDir The target directory @param classWriter The current class writer @param className The class name @throws IOException i...
java
protected void writeClassToDisk(File targetDir, ClassWriter classWriter, String className) throws IOException { if (targetDir != null) { String fileName = className.replace('.', '/') + ".class"; File targetFile = new File(targetDir, fileName); targetFile.getParentFile().mkdi...
[ "protected", "void", "writeClassToDisk", "(", "File", "targetDir", ",", "ClassWriter", "classWriter", ",", "String", "className", ")", "throws", "IOException", "{", "if", "(", "targetDir", "!=", "null", ")", "{", "String", "fileName", "=", "className", ".", "r...
Writes the class file to disk in the given directory. @param targetDir The target directory @param classWriter The current class writer @param className The class name @throws IOException if there is a problem writing the class to disk
[ "Writes", "the", "class", "file", "to", "disk", "in", "the", "given", "directory", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/writer/AbstractClassFileWriter.java#L834-L845
litsec/eidas-opensaml
opensaml3/src/main/java/se/litsec/eidas/opensaml/ext/RequestedAttributeTemplates.java
RequestedAttributeTemplates.CURRENT_GIVEN_NAME
public static RequestedAttribute CURRENT_GIVEN_NAME(Boolean isRequired, boolean includeFriendlyName) { """ Creates a {@code RequestedAttribute} object for the CurrentGivenName attribute. @param isRequired flag to tell whether the attribute is required @param includeFriendlyName flag that tells whether the fr...
java
public static RequestedAttribute CURRENT_GIVEN_NAME(Boolean isRequired, boolean includeFriendlyName) { return create(AttributeConstants.EIDAS_CURRENT_GIVEN_NAME_ATTRIBUTE_NAME, includeFriendlyName ? AttributeConstants.EIDAS_CURRENT_GIVEN_NAME_ATTRIBUTE_FRIENDLY_NAME : null, Attribute.URI_REFERENCE, isRe...
[ "public", "static", "RequestedAttribute", "CURRENT_GIVEN_NAME", "(", "Boolean", "isRequired", ",", "boolean", "includeFriendlyName", ")", "{", "return", "create", "(", "AttributeConstants", ".", "EIDAS_CURRENT_GIVEN_NAME_ATTRIBUTE_NAME", ",", "includeFriendlyName", "?", "At...
Creates a {@code RequestedAttribute} object for the CurrentGivenName attribute. @param isRequired flag to tell whether the attribute is required @param includeFriendlyName flag that tells whether the friendly name should be included @return a {@code RequestedAttribute} object representing the CurrentGivenName attribut...
[ "Creates", "a", "{", "@code", "RequestedAttribute", "}", "object", "for", "the", "CurrentGivenName", "attribute", "." ]
train
https://github.com/litsec/eidas-opensaml/blob/522ba6dba433a9524cb8a02464cc3b087b47a2b7/opensaml3/src/main/java/se/litsec/eidas/opensaml/ext/RequestedAttributeTemplates.java#L71-L75
crowmagnumb/s6-util
src/main/java/net/crowmagnumb/util/net/AbstractMultipartUtility.java
AbstractMultipartUtility.addFilePart
public void addFilePart(final String fieldName, final URL urlToUploadFile) throws IOException { """ Adds a upload file section to the request by url stream @param fieldName name attribute in &lt;input type="file" name="..." /&gt; @param urlToUploadFile url to add as a stream @throws IOException if probl...
java
public void addFilePart(final String fieldName, final URL urlToUploadFile) throws IOException { // // Maybe try and extract a filename from the last part of the url? // Or have the user pass it in? // Or just leave it blank as I have already done? // addFilePa...
[ "public", "void", "addFilePart", "(", "final", "String", "fieldName", ",", "final", "URL", "urlToUploadFile", ")", "throws", "IOException", "{", "//", "// Maybe try and extract a filename from the last part of the url?", "// Or have the user pass it in?", "// Or just leave it bla...
Adds a upload file section to the request by url stream @param fieldName name attribute in &lt;input type="file" name="..." /&gt; @param urlToUploadFile url to add as a stream @throws IOException if problems
[ "Adds", "a", "upload", "file", "section", "to", "the", "request", "by", "url", "stream" ]
train
https://github.com/crowmagnumb/s6-util/blob/0f9969bc0809e8a617501fa57c135e9b3984fae0/src/main/java/net/crowmagnumb/util/net/AbstractMultipartUtility.java#L83-L95
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/CipherSpi.java
CipherSpi.engineUpdate
protected int engineUpdate(ByteBuffer input, ByteBuffer output) throws ShortBufferException { """ Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part. <p>All <code>input.remaining()</code> bytes starting at <cod...
java
protected int engineUpdate(ByteBuffer input, ByteBuffer output) throws ShortBufferException { try { return bufferCrypt(input, output, true); } catch (IllegalBlockSizeException e) { // never thrown for engineUpdate() throw new ProviderException("Internal er...
[ "protected", "int", "engineUpdate", "(", "ByteBuffer", "input", ",", "ByteBuffer", "output", ")", "throws", "ShortBufferException", "{", "try", "{", "return", "bufferCrypt", "(", "input", ",", "output", ",", "true", ")", ";", "}", "catch", "(", "IllegalBlockSi...
Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part. <p>All <code>input.remaining()</code> bytes starting at <code>input.position()</code> are processed. The result is stored in the output buffer. Upon return, the input buffer's posi...
[ "Continues", "a", "multiple", "-", "part", "encryption", "or", "decryption", "operation", "(", "depending", "on", "how", "this", "cipher", "was", "initialized", ")", "processing", "another", "data", "part", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/CipherSpi.java#L552-L563
googleapis/google-cloud-java
google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Value.java
Value.stringArray
public static Value stringArray(@Nullable Iterable<String> v) { """ Returns an {@code ARRAY<STRING>} value. @param v the source of element values. This may be {@code null} to produce a value for which {@code isNull()} is {@code true}. Individual elements may also be {@code null}. """ return new StringA...
java
public static Value stringArray(@Nullable Iterable<String> v) { return new StringArrayImpl(v == null, v == null ? null : immutableCopyOf(v)); }
[ "public", "static", "Value", "stringArray", "(", "@", "Nullable", "Iterable", "<", "String", ">", "v", ")", "{", "return", "new", "StringArrayImpl", "(", "v", "==", "null", ",", "v", "==", "null", "?", "null", ":", "immutableCopyOf", "(", "v", ")", ")"...
Returns an {@code ARRAY<STRING>} value. @param v the source of element values. This may be {@code null} to produce a value for which {@code isNull()} is {@code true}. Individual elements may also be {@code null}.
[ "Returns", "an", "{", "@code", "ARRAY<STRING", ">", "}", "value", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/Value.java#L292-L294
VoltDB/voltdb
src/frontend/org/voltdb/compiler/VoltCompilerUtils.java
VoltCompilerUtils.readFileFromJarfile
static String readFileFromJarfile(String fulljarpath) throws IOException { """ Read a file from a jar in the form path/to/jar.jar!/path/to/file.ext """ assert (fulljarpath.contains(".jar!")); String[] paths = fulljarpath.split("!"); if (paths[0].startsWith("file:")) paths[0...
java
static String readFileFromJarfile(String fulljarpath) throws IOException { assert (fulljarpath.contains(".jar!")); String[] paths = fulljarpath.split("!"); if (paths[0].startsWith("file:")) paths[0] = paths[0].substring("file:".length()); paths[1] = paths[1].substring(1); ...
[ "static", "String", "readFileFromJarfile", "(", "String", "fulljarpath", ")", "throws", "IOException", "{", "assert", "(", "fulljarpath", ".", "contains", "(", "\".jar!\"", ")", ")", ";", "String", "[", "]", "paths", "=", "fulljarpath", ".", "split", "(", "\...
Read a file from a jar in the form path/to/jar.jar!/path/to/file.ext
[ "Read", "a", "file", "from", "a", "jar", "in", "the", "form", "path", "/", "to", "/", "jar", ".", "jar!", "/", "path", "/", "to", "/", "file", ".", "ext" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/compiler/VoltCompilerUtils.java#L38-L47
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.summarizeForResourceGroupAsync
public Observable<SummarizeResultsInner> summarizeForResourceGroupAsync(String subscriptionId, String resourceGroupName) { """ Summarizes policy states for the resources under the resource group. @param subscriptionId Microsoft Azure subscription ID. @param resourceGroupName Resource group name. @throws Illeg...
java
public Observable<SummarizeResultsInner> summarizeForResourceGroupAsync(String subscriptionId, String resourceGroupName) { return summarizeForResourceGroupWithServiceResponseAsync(subscriptionId, resourceGroupName).map(new Func1<ServiceResponse<SummarizeResultsInner>, SummarizeResultsInner>() { @Ove...
[ "public", "Observable", "<", "SummarizeResultsInner", ">", "summarizeForResourceGroupAsync", "(", "String", "subscriptionId", ",", "String", "resourceGroupName", ")", "{", "return", "summarizeForResourceGroupWithServiceResponseAsync", "(", "subscriptionId", ",", "resourceGroupN...
Summarizes policy states for the resources under the resource group. @param subscriptionId Microsoft Azure subscription ID. @param resourceGroupName Resource group name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the SummarizeResultsInner object
[ "Summarizes", "policy", "states", "for", "the", "resources", "under", "the", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L1128-L1135
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/arrays/DoubleIntegerArrayQuickSort.java
DoubleIntegerArrayQuickSort.insertionSortReverse
private static void insertionSortReverse(double[] keys, int[] vals, final int start, final int end) { """ Sort via insertion sort. @param keys Keys @param vals Values @param start Interval start @param end Interval end """ // Classic insertion sort. for(int i = start + 1; i < end; i++) { fo...
java
private static void insertionSortReverse(double[] keys, int[] vals, final int start, final int end) { // Classic insertion sort. for(int i = start + 1; i < end; i++) { for(int j = i; j > start; j--) { if(keys[j] <= keys[j - 1]) { break; } swap(keys, vals, j, j - 1); ...
[ "private", "static", "void", "insertionSortReverse", "(", "double", "[", "]", "keys", ",", "int", "[", "]", "vals", ",", "final", "int", "start", ",", "final", "int", "end", ")", "{", "// Classic insertion sort.", "for", "(", "int", "i", "=", "start", "+...
Sort via insertion sort. @param keys Keys @param vals Values @param start Interval start @param end Interval end
[ "Sort", "via", "insertion", "sort", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/arrays/DoubleIntegerArrayQuickSort.java#L359-L369
alkacon/opencms-core
src/org/opencms/search/documents/CmsDocumentPdf.java
CmsDocumentPdf.extractContent
public I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, I_CmsSearchIndex index) throws CmsIndexException, CmsException { """ Returns the raw text content of a given vfs resource containing Adobe PDF data.<p> @see org.opencms.search.documents.I_CmsSearchExtractor#extractContent(CmsOb...
java
public I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, I_CmsSearchIndex index) throws CmsIndexException, CmsException { logContentExtraction(resource, index); CmsFile file = readFile(cms, resource); try { return CmsExtractorPdf.getExtractor().extractTex...
[ "public", "I_CmsExtractionResult", "extractContent", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "I_CmsSearchIndex", "index", ")", "throws", "CmsIndexException", ",", "CmsException", "{", "logContentExtraction", "(", "resource", ",", "index", ")", ";...
Returns the raw text content of a given vfs resource containing Adobe PDF data.<p> @see org.opencms.search.documents.I_CmsSearchExtractor#extractContent(CmsObject, CmsResource, I_CmsSearchIndex)
[ "Returns", "the", "raw", "text", "content", "of", "a", "given", "vfs", "resource", "containing", "Adobe", "PDF", "data", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/documents/CmsDocumentPdf.java#L64-L87
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/contextspace/SpaceRepository.java
SpaceRepository.removeLocalSpaceDefinition
protected void removeLocalSpaceDefinition(SpaceID id, boolean isLocalDestruction) { """ Remove a remote space. @param id identifier of the space @param isLocalDestruction indicates if the destruction is initiated by the local kernel. """ final Space space; synchronized (getSpaceRepositoryMutex()) { ...
java
protected void removeLocalSpaceDefinition(SpaceID id, boolean isLocalDestruction) { final Space space; synchronized (getSpaceRepositoryMutex()) { space = this.spaces.remove(id); if (space != null) { this.spacesBySpec.remove(id.getSpaceSpecification(), id); } } if (space != null) { fireSpaceRemov...
[ "protected", "void", "removeLocalSpaceDefinition", "(", "SpaceID", "id", ",", "boolean", "isLocalDestruction", ")", "{", "final", "Space", "space", ";", "synchronized", "(", "getSpaceRepositoryMutex", "(", ")", ")", "{", "space", "=", "this", ".", "spaces", ".",...
Remove a remote space. @param id identifier of the space @param isLocalDestruction indicates if the destruction is initiated by the local kernel.
[ "Remove", "a", "remote", "space", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/contextspace/SpaceRepository.java#L224-L235
massfords/jaxb-visitor
src/main/java/com/massfords/jaxb/CreateTraversingVisitorClass.java
CreateTraversingVisitorClass.addGetterAndSetter
private void addGetterAndSetter(JDefinedClass traversingVisitor, JFieldVar field) { """ Convenience method to add a getter and setter method for the given field. @param traversingVisitor @param field """ String propName = Character.toUpperCase(field.name().charAt(0)) + field.name().substring(1); ...
java
private void addGetterAndSetter(JDefinedClass traversingVisitor, JFieldVar field) { String propName = Character.toUpperCase(field.name().charAt(0)) + field.name().substring(1); traversingVisitor.method(JMod.PUBLIC, field.type(), "get" + propName).body()._return(field); JMethod setVisitor = trave...
[ "private", "void", "addGetterAndSetter", "(", "JDefinedClass", "traversingVisitor", ",", "JFieldVar", "field", ")", "{", "String", "propName", "=", "Character", ".", "toUpperCase", "(", "field", ".", "name", "(", ")", ".", "charAt", "(", "0", ")", ")", "+", ...
Convenience method to add a getter and setter method for the given field. @param traversingVisitor @param field
[ "Convenience", "method", "to", "add", "a", "getter", "and", "setter", "method", "for", "the", "given", "field", "." ]
train
https://github.com/massfords/jaxb-visitor/blob/0d66cd4d8b6700b5eb67c028a87b53792be895b8/src/main/java/com/massfords/jaxb/CreateTraversingVisitorClass.java#L151-L157
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_easyPabx_serviceName_hunting_agent_agentNumber_DELETE
public void billingAccount_easyPabx_serviceName_hunting_agent_agentNumber_DELETE(String billingAccount, String serviceName, String agentNumber) throws IOException { """ Delete the agent REST: DELETE /telephony/{billingAccount}/easyPabx/{serviceName}/hunting/agent/{agentNumber} @param billingAccount [required] ...
java
public void billingAccount_easyPabx_serviceName_hunting_agent_agentNumber_DELETE(String billingAccount, String serviceName, String agentNumber) throws IOException { String qPath = "/telephony/{billingAccount}/easyPabx/{serviceName}/hunting/agent/{agentNumber}"; StringBuilder sb = path(qPath, billingAccount, service...
[ "public", "void", "billingAccount_easyPabx_serviceName_hunting_agent_agentNumber_DELETE", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "String", "agentNumber", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/easyP...
Delete the agent REST: DELETE /telephony/{billingAccount}/easyPabx/{serviceName}/hunting/agent/{agentNumber} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param agentNumber [required] The phone number of the agent
[ "Delete", "the", "agent" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L3572-L3576
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/AbstractKMeansQualityMeasure.java
AbstractKMeansQualityMeasure.numberOfFreeParameters
public static int numberOfFreeParameters(Relation<? extends NumberVector> relation, Clustering<? extends MeanModel> clustering) { """ Compute the number of free parameters. @param relation Data relation (for dimensionality) @param clustering Set of clusters @return Number of free parameters """ // num...
java
public static int numberOfFreeParameters(Relation<? extends NumberVector> relation, Clustering<? extends MeanModel> clustering) { // number of clusters int m = clustering.getAllClusters().size(); // num_ctrs // dimensionality of data points int dim = RelationUtil.dimensionality(relation); // num_dims ...
[ "public", "static", "int", "numberOfFreeParameters", "(", "Relation", "<", "?", "extends", "NumberVector", ">", "relation", ",", "Clustering", "<", "?", "extends", "MeanModel", ">", "clustering", ")", "{", "// number of clusters", "int", "m", "=", "clustering", ...
Compute the number of free parameters. @param relation Data relation (for dimensionality) @param clustering Set of clusters @return Number of free parameters
[ "Compute", "the", "number", "of", "free", "parameters", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/AbstractKMeansQualityMeasure.java#L181-L190
hexagonframework/spring-data-ebean
src/main/java/org/springframework/data/ebean/util/ExampleExpressionBuilder.java
ExampleExpressionBuilder.exampleExpression
public static <T> ExampleExpression exampleExpression(EbeanServer ebeanServer, Example<T> example) { """ Return a ExampleExpression from Spring data Example @param ebeanServer @param example @param <T> @return """ LikeType likeType; switch (example.getMatcher().getDefaultStringMatcher()...
java
public static <T> ExampleExpression exampleExpression(EbeanServer ebeanServer, Example<T> example) { LikeType likeType; switch (example.getMatcher().getDefaultStringMatcher()) { case EXACT: likeType = LikeType.EQUAL_TO; break; case CONTAINING...
[ "public", "static", "<", "T", ">", "ExampleExpression", "exampleExpression", "(", "EbeanServer", "ebeanServer", ",", "Example", "<", "T", ">", "example", ")", "{", "LikeType", "likeType", ";", "switch", "(", "example", ".", "getMatcher", "(", ")", ".", "getD...
Return a ExampleExpression from Spring data Example @param ebeanServer @param example @param <T> @return
[ "Return", "a", "ExampleExpression", "from", "Spring", "data", "Example" ]
train
https://github.com/hexagonframework/spring-data-ebean/blob/dd11b97654982403b50dd1d5369cadad71fce410/src/main/java/org/springframework/data/ebean/util/ExampleExpressionBuilder.java#L39-L61
paypal/SeLion
server/src/main/java/com/paypal/selion/grid/servlets/transfer/DownloadResponder.java
DownloadResponder.respond
public void respond() { """ Sends a response over the HTTP servlet for the current {@link TransferContext}. """ LOGGER.entering(); managedArtifact = downloadRequestProcessor.getArtifact(this.pathInfo); contents = managedArtifact.getArtifactContents(); setResponseMetadata(); ...
java
public void respond() { LOGGER.entering(); managedArtifact = downloadRequestProcessor.getArtifact(this.pathInfo); contents = managedArtifact.getArtifactContents(); setResponseMetadata(); try { IOUtils.copy(new ByteArrayInputStream(contents), httpServletResponse.getOut...
[ "public", "void", "respond", "(", ")", "{", "LOGGER", ".", "entering", "(", ")", ";", "managedArtifact", "=", "downloadRequestProcessor", ".", "getArtifact", "(", "this", ".", "pathInfo", ")", ";", "contents", "=", "managedArtifact", ".", "getArtifactContents", ...
Sends a response over the HTTP servlet for the current {@link TransferContext}.
[ "Sends", "a", "response", "over", "the", "HTTP", "servlet", "for", "the", "current", "{" ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/servlets/transfer/DownloadResponder.java#L64-L75
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
InternalUtils.lookupMethod
public static Method lookupMethod( Class parentClass, String methodName, Class[] signature ) { """ Get a Method in a Class. @param parentClass the Class in which to find the Method. @param methodName the name of the Method. @param signature the argument types for the Method. @return the Method with the given...
java
public static Method lookupMethod( Class parentClass, String methodName, Class[] signature ) { try { return parentClass.getDeclaredMethod( methodName, signature ); } catch ( NoSuchMethodException e ) { Class superClass = parentClass.getSuperclass(); ...
[ "public", "static", "Method", "lookupMethod", "(", "Class", "parentClass", ",", "String", "methodName", ",", "Class", "[", "]", "signature", ")", "{", "try", "{", "return", "parentClass", ".", "getDeclaredMethod", "(", "methodName", ",", "signature", ")", ";",...
Get a Method in a Class. @param parentClass the Class in which to find the Method. @param methodName the name of the Method. @param signature the argument types for the Method. @return the Method with the given name and signature, or <code>null</code> if the method does not exist.
[ "Get", "a", "Method", "in", "a", "Class", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java#L265-L276