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
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java
EnumHelper.getFromNameOrDefault
@Nullable public static <ENUMTYPE extends Enum <ENUMTYPE> & IHasName> ENUMTYPE getFromNameOrDefault (@Nonnull final Class <ENUMTYPE> aClass, @Nullable final String sName, ...
java
@Nullable public static <ENUMTYPE extends Enum <ENUMTYPE> & IHasName> ENUMTYPE getFromNameOrDefault (@Nonnull final Class <ENUMTYPE> aClass, @Nullable final String sName, ...
[ "@", "Nullable", "public", "static", "<", "ENUMTYPE", "extends", "Enum", "<", "ENUMTYPE", ">", "&", "IHasName", ">", "ENUMTYPE", "getFromNameOrDefault", "(", "@", "Nonnull", "final", "Class", "<", "ENUMTYPE", ">", "aClass", ",", "@", "Nullable", "final", "St...
Get the enum value with the passed name @param <ENUMTYPE> The enum type @param aClass The enum class @param sName The name to search @param eDefault The default value to be returned, if the name was not found. @return The default parameter if no enum item with the given name is present.
[ "Get", "the", "enum", "value", "with", "the", "passed", "name" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/lang/EnumHelper.java#L371-L381
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemWithParam.java
ElemWithParam.callChildVisitors
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs) { """ Call the children visitors. @param visitor The visitor whose appropriate method will be called. """ if(callAttrs && (null != m_selectPattern)) m_selectPattern.getExpression().callVisitors(m_selectPattern, visitor); super...
java
protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs) { if(callAttrs && (null != m_selectPattern)) m_selectPattern.getExpression().callVisitors(m_selectPattern, visitor); super.callChildVisitors(visitor, callAttrs); }
[ "protected", "void", "callChildVisitors", "(", "XSLTVisitor", "visitor", ",", "boolean", "callAttrs", ")", "{", "if", "(", "callAttrs", "&&", "(", "null", "!=", "m_selectPattern", ")", ")", "m_selectPattern", ".", "getExpression", "(", ")", ".", "callVisitors", ...
Call the children visitors. @param visitor The visitor whose appropriate method will be called.
[ "Call", "the", "children", "visitors", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemWithParam.java#L232-L237
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.addWeeks
public static <T extends java.util.Date> T addWeeks(final T date, final int amount) { """ Adds a number of weeks to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to add, may be negative @return the new {@code Date} with the am...
java
public static <T extends java.util.Date> T addWeeks(final T date, final int amount) { return roll(date, amount, CalendarUnit.WEEK); }
[ "public", "static", "<", "T", "extends", "java", ".", "util", ".", "Date", ">", "T", "addWeeks", "(", "final", "T", "date", ",", "final", "int", "amount", ")", "{", "return", "roll", "(", "date", ",", "amount", ",", "CalendarUnit", ".", "WEEK", ")", ...
Adds a number of weeks to a date returning a new object. The original {@code Date} is unchanged. @param date the date, not null @param amount the amount to add, may be negative @return the new {@code Date} with the amount added @throws IllegalArgumentException if the date is null
[ "Adds", "a", "number", "of", "weeks", "to", "a", "date", "returning", "a", "new", "object", ".", "The", "original", "{", "@code", "Date", "}", "is", "unchanged", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L979-L981
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/toolbar/CmsToolbarNewButton.java
CmsToolbarNewButton.makeRedirectItem
private CmsCreatableListItem makeRedirectItem() { """ Creates a list item representing a redirect.<p> @return the new list item """ CmsNewResourceInfo typeInfo = getController().getData().getNewRedirectElementInfo(); CmsListInfoBean info = new CmsListInfoBean(); info.setTitle(typeIn...
java
private CmsCreatableListItem makeRedirectItem() { CmsNewResourceInfo typeInfo = getController().getData().getNewRedirectElementInfo(); CmsListInfoBean info = new CmsListInfoBean(); info.setTitle(typeInfo.getTitle()); info.setSubTitle(Messages.get().key(Messages.GUI_REDIRECT_SUBTITLE_0))...
[ "private", "CmsCreatableListItem", "makeRedirectItem", "(", ")", "{", "CmsNewResourceInfo", "typeInfo", "=", "getController", "(", ")", ".", "getData", "(", ")", ".", "getNewRedirectElementInfo", "(", ")", ";", "CmsListInfoBean", "info", "=", "new", "CmsListInfoBean...
Creates a list item representing a redirect.<p> @return the new list item
[ "Creates", "a", "list", "item", "representing", "a", "redirect", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/toolbar/CmsToolbarNewButton.java#L223-L234
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/path/astar/RoadAStar.java
RoadAStar.solve
public RoadPath solve(Point2D<?, ?> startPoint, RoadConnection endPoint, RoadNetwork network) { """ Run the A* algorithm from the nearest segment to <var>startPoint</var> to the nearest segment to <var>endPoint</var>. @param startPoint is the starting point. @param endPoint is the point to reach. @param net...
java
public RoadPath solve(Point2D<?, ?> startPoint, RoadConnection endPoint, RoadNetwork network) { assert network != null && startPoint != null && endPoint != null; final RoadSegment startSegment = network.getNearestSegment(startPoint); if (startSegment != null) { final VirtualPoint start = new VirtualPoint(start...
[ "public", "RoadPath", "solve", "(", "Point2D", "<", "?", ",", "?", ">", "startPoint", ",", "RoadConnection", "endPoint", ",", "RoadNetwork", "network", ")", "{", "assert", "network", "!=", "null", "&&", "startPoint", "!=", "null", "&&", "endPoint", "!=", "...
Run the A* algorithm from the nearest segment to <var>startPoint</var> to the nearest segment to <var>endPoint</var>. @param startPoint is the starting point. @param endPoint is the point to reach. @param network is the road network to explore. @return the found path, or <code>null</code> if none found.
[ "Run", "the", "A", "*", "algorithm", "from", "the", "nearest", "segment", "to", "<var", ">", "startPoint<", "/", "var", ">", "to", "the", "nearest", "segment", "to", "<var", ">", "endPoint<", "/", "var", ">", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/path/astar/RoadAStar.java#L202-L210
Alluxio/alluxio
underfs/kodo/src/main/java/alluxio/underfs/kodo/KodoClient.java
KodoClient.listFiles
public FileListing listFiles(String prefix, String marker, int limit, String delimiter) throws QiniuException { """ Lists object for Qiniu kodo. @param prefix prefix for bucket @param marker Marker returned the last time a file list was obtained @param limit Length limit for each iteration, Max. 1000 @pa...
java
public FileListing listFiles(String prefix, String marker, int limit, String delimiter) throws QiniuException { return mBucketManager.listFiles(mBucketName, prefix, marker, limit, delimiter); }
[ "public", "FileListing", "listFiles", "(", "String", "prefix", ",", "String", "marker", ",", "int", "limit", ",", "String", "delimiter", ")", "throws", "QiniuException", "{", "return", "mBucketManager", ".", "listFiles", "(", "mBucketName", ",", "prefix", ",", ...
Lists object for Qiniu kodo. @param prefix prefix for bucket @param marker Marker returned the last time a file list was obtained @param limit Length limit for each iteration, Max. 1000 @param delimiter Specifies a directory separator that lists all common prefixes (simulated listing directory effects). The default is ...
[ "Lists", "object", "for", "Qiniu", "kodo", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/underfs/kodo/src/main/java/alluxio/underfs/kodo/KodoClient.java#L172-L175
jenkinsci/jenkins
cli/src/main/java/hudson/cli/FullDuplexHttpStream.java
FullDuplexHttpStream.tryToResolveRedirects
private URL tryToResolveRedirects(URL base, String authorization) { """ As this transport mode is using POST, it is necessary to resolve possible redirections using GET first. """ try { HttpURLConnection con = (HttpURLConnection) base.openConnection(); if (authorization != null)...
java
private URL tryToResolveRedirects(URL base, String authorization) { try { HttpURLConnection con = (HttpURLConnection) base.openConnection(); if (authorization != null) { con.addRequestProperty("Authorization", authorization); } con.getInputStream()...
[ "private", "URL", "tryToResolveRedirects", "(", "URL", "base", ",", "String", "authorization", ")", "{", "try", "{", "HttpURLConnection", "con", "=", "(", "HttpURLConnection", ")", "base", ".", "openConnection", "(", ")", ";", "if", "(", "authorization", "!=",...
As this transport mode is using POST, it is necessary to resolve possible redirections using GET first.
[ "As", "this", "transport", "mode", "is", "using", "POST", "it", "is", "necessary", "to", "resolve", "possible", "redirections", "using", "GET", "first", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/cli/src/main/java/hudson/cli/FullDuplexHttpStream.java#L96-L111
zaproxy/zaproxy
src/org/zaproxy/zap/utils/FontUtils.java
FontUtils.getFont
public static Font getFont (String name, int style) { """ Gets the named font with the specified style, correctly scaled @param name @param style @return the named font with the specified style, correctly scaled """ return new Font(name, style, getDefaultFont().getSize()); }
java
public static Font getFont (String name, int style) { return new Font(name, style, getDefaultFont().getSize()); }
[ "public", "static", "Font", "getFont", "(", "String", "name", ",", "int", "style", ")", "{", "return", "new", "Font", "(", "name", ",", "style", ",", "getDefaultFont", "(", ")", ".", "getSize", "(", ")", ")", ";", "}" ]
Gets the named font with the specified style, correctly scaled @param name @param style @return the named font with the specified style, correctly scaled
[ "Gets", "the", "named", "font", "with", "the", "specified", "style", "correctly", "scaled" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/utils/FontUtils.java#L169-L171
code4everything/util
src/main/java/com/zhazhapan/util/FileExecutor.java
FileExecutor.splitFile
public static void splitFile(String filePath, long[] splitPoints, String storageFolder) throws IOException { """ 拆分文件 @param filePath 文件路径 @param splitPoints 拆分点数组(函数将根据拆分点来分割文件) @param storageFolder 保存路径 @throws IOException 异常 """ splitFile(new File(filePath), splitPoints, storageFolder); ...
java
public static void splitFile(String filePath, long[] splitPoints, String storageFolder) throws IOException { splitFile(new File(filePath), splitPoints, storageFolder); }
[ "public", "static", "void", "splitFile", "(", "String", "filePath", ",", "long", "[", "]", "splitPoints", ",", "String", "storageFolder", ")", "throws", "IOException", "{", "splitFile", "(", "new", "File", "(", "filePath", ")", ",", "splitPoints", ",", "stor...
拆分文件 @param filePath 文件路径 @param splitPoints 拆分点数组(函数将根据拆分点来分割文件) @param storageFolder 保存路径 @throws IOException 异常
[ "拆分文件" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/FileExecutor.java#L553-L555
Cleveroad/AdaptiveTableLayout
library/src/main/java/com/cleveroad/adaptivetablelayout/AdaptiveTableManager.java
AdaptiveTableManager.switchTwoColumns
void switchTwoColumns(int columnIndex, int columnToIndex) { """ Switch 2 items in array with columns data @param columnIndex from column index @param columnToIndex to column index """ checkForInit(); int cellData = mColumnWidths[columnToIndex]; mColumnWidths[columnToIndex] = mColu...
java
void switchTwoColumns(int columnIndex, int columnToIndex) { checkForInit(); int cellData = mColumnWidths[columnToIndex]; mColumnWidths[columnToIndex] = mColumnWidths[columnIndex]; mColumnWidths[columnIndex] = cellData; }
[ "void", "switchTwoColumns", "(", "int", "columnIndex", ",", "int", "columnToIndex", ")", "{", "checkForInit", "(", ")", ";", "int", "cellData", "=", "mColumnWidths", "[", "columnToIndex", "]", ";", "mColumnWidths", "[", "columnToIndex", "]", "=", "mColumnWidths"...
Switch 2 items in array with columns data @param columnIndex from column index @param columnToIndex to column index
[ "Switch", "2", "items", "in", "array", "with", "columns", "data" ]
train
https://github.com/Cleveroad/AdaptiveTableLayout/blob/188213b35e05e635497b03fe741799782dde7208/library/src/main/java/com/cleveroad/adaptivetablelayout/AdaptiveTableManager.java#L341-L346
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/JcrSession.java
JcrSession.nodeIdentifier
public static String nodeIdentifier( NodeKey key, NodeKey rootKey ) { """ Returns a string representing a node's identifier, based on whether the node is foreign or not. @param key the node key; may be null @param rootKey the key of the root node in the workspace; may n...
java
public static String nodeIdentifier( NodeKey key, NodeKey rootKey ) { return isForeignKey(key, rootKey) ? key.toString() : key.getIdentifier(); }
[ "public", "static", "String", "nodeIdentifier", "(", "NodeKey", "key", ",", "NodeKey", "rootKey", ")", "{", "return", "isForeignKey", "(", "key", ",", "rootKey", ")", "?", "key", ".", "toString", "(", ")", ":", "key", ".", "getIdentifier", "(", ")", ";",...
Returns a string representing a node's identifier, based on whether the node is foreign or not. @param key the node key; may be null @param rootKey the key of the root node in the workspace; may not be null @return the identifier for the node; never null @see javax.jcr.Node#getIdentifier()
[ "Returns", "a", "string", "representing", "a", "node", "s", "identifier", "based", "on", "whether", "the", "node", "is", "foreign", "or", "not", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrSession.java#L2002-L2005
bjuvensjo/rsimulator
rsimulator-aop/src/main/java/com/github/bjuvensjo/rsimulator/aop/SimulatorAdapter.java
SimulatorAdapter.service
public Object service(String declaringClassCanonicalName, String methodName, Object[] arguments, String rootPath, boolean useRootRelativePath) throws Exception { """ Returns some simulation response if found. @param declaringClassCanonicalName the class that declares the intercepted method @param m...
java
public Object service(String declaringClassCanonicalName, String methodName, Object[] arguments, String rootPath, boolean useRootRelativePath) throws Exception { log.debug("declaringClassCanonicalName: {}, methodName: {}, arguments: {}, rootPath: {}, useRootRelativePath: {}", new Obj...
[ "public", "Object", "service", "(", "String", "declaringClassCanonicalName", ",", "String", "methodName", ",", "Object", "[", "]", "arguments", ",", "String", "rootPath", ",", "boolean", "useRootRelativePath", ")", "throws", "Exception", "{", "log", ".", "debug", ...
Returns some simulation response if found. @param declaringClassCanonicalName the class that declares the intercepted method @param methodName the name of the intercepted method @param arguments the arguments to the intercepted method @param rootPath the root path ...
[ "Returns", "some", "simulation", "response", "if", "found", "." ]
train
https://github.com/bjuvensjo/rsimulator/blob/fa98dea3e6cf8ef9d27516a1c5f95482412174a1/rsimulator-aop/src/main/java/com/github/bjuvensjo/rsimulator/aop/SimulatorAdapter.java#L42-L58
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.beginGetVpnProfilePackageUrl
public String beginGetVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { """ Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. @param resourceGroupName Th...
java
public String beginGetVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); }
[ "public", "String", "beginGetVpnProfilePackageUrl", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ")", "{", "return", "beginGetVpnProfilePackageUrlWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkGatewayName", ")", ".", ...
Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws Ille...
[ "Gets", "pre", "-", "generated", "VPN", "profile", "for", "P2S", "client", "of", "the", "virtual", "network", "gateway", "in", "the", "specified", "resource", "group", ".", "The", "profile", "needs", "to", "be", "generated", "first", "using", "generateVpnProfi...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L1866-L1868
alipay/sofa-rpc
extension-impl/codec-protobuf/src/main/java/com/alipay/sofa/rpc/codec/protobuf/ProtobufHelper.java
ProtobufHelper.getReqClass
public Class getReqClass(String service, String methodName) { """ 从缓存中获取请求值类 @param service 接口名 @param methodName 方法名 @return 请求参数类 """ String key = buildMethodKey(service, methodName); Class reqClass = requestClassCache.get(key); if (reqClass == null) { // 读取接口里的方法...
java
public Class getReqClass(String service, String methodName) { String key = buildMethodKey(service, methodName); Class reqClass = requestClassCache.get(key); if (reqClass == null) { // 读取接口里的方法参数和返回值 String interfaceClass = ConfigUniqueNameGenerator.getInterfaceName(servi...
[ "public", "Class", "getReqClass", "(", "String", "service", ",", "String", "methodName", ")", "{", "String", "key", "=", "buildMethodKey", "(", "service", ",", "methodName", ")", ";", "Class", "reqClass", "=", "requestClassCache", ".", "get", "(", "key", ")"...
从缓存中获取请求值类 @param service 接口名 @param methodName 方法名 @return 请求参数类
[ "从缓存中获取请求值类" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/codec-protobuf/src/main/java/com/alipay/sofa/rpc/codec/protobuf/ProtobufHelper.java#L68-L79
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchBulk.java
JMElasticsearchBulk.deleteBulkDocsAsync
public void deleteBulkDocsAsync(String index, String type) { """ Delete bulk docs async. @param index the index @param type the type """ executeBulkRequestAsync(buildDeleteBulkRequestBuilder( buildAllDeleteRequestBuilderList(index, type))); }
java
public void deleteBulkDocsAsync(String index, String type) { executeBulkRequestAsync(buildDeleteBulkRequestBuilder( buildAllDeleteRequestBuilderList(index, type))); }
[ "public", "void", "deleteBulkDocsAsync", "(", "String", "index", ",", "String", "type", ")", "{", "executeBulkRequestAsync", "(", "buildDeleteBulkRequestBuilder", "(", "buildAllDeleteRequestBuilderList", "(", "index", ",", "type", ")", ")", ")", ";", "}" ]
Delete bulk docs async. @param index the index @param type the type
[ "Delete", "bulk", "docs", "async", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchBulk.java#L500-L503
JodaOrg/joda-beans
src/main/java/org/joda/beans/ser/JodaBeanSer.java
JodaBeanSer.withDeserializers
public JodaBeanSer withDeserializers(SerDeserializers deserializers) { """ Returns a copy of this serializer with the specified deserializers. <p> The default deserializers can be modified. <p> This can be used to select a more lenient mode of parsing, see {@link SerDeserializers#LENIENT}. @param deserializ...
java
public JodaBeanSer withDeserializers(SerDeserializers deserializers) { JodaBeanUtils.notNull(deserializers, "deserializers"); return new JodaBeanSer(indent, newLine, converter, iteratorFactory, shortTypes, deserializers, includeDerived); }
[ "public", "JodaBeanSer", "withDeserializers", "(", "SerDeserializers", "deserializers", ")", "{", "JodaBeanUtils", ".", "notNull", "(", "deserializers", ",", "\"deserializers\"", ")", ";", "return", "new", "JodaBeanSer", "(", "indent", ",", "newLine", ",", "converte...
Returns a copy of this serializer with the specified deserializers. <p> The default deserializers can be modified. <p> This can be used to select a more lenient mode of parsing, see {@link SerDeserializers#LENIENT}. @param deserializers the deserializers, not null @return a copy of this object with the converter chan...
[ "Returns", "a", "copy", "of", "this", "serializer", "with", "the", "specified", "deserializers", ".", "<p", ">", "The", "default", "deserializers", "can", "be", "modified", ".", "<p", ">", "This", "can", "be", "used", "to", "select", "a", "more", "lenient"...
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/ser/JodaBeanSer.java#L226-L229
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiEvent.java
BoxApiEvent.getLongPollServerConnection
public RealTimeServerConnection getLongPollServerConnection(RealTimeServerConnection.OnChangeListener changeListener) { """ Gets a request that retrieves a RealTimeServerConnection, which is used to create a long poll to check for some generic change to the user's account. This can be combined with syncing logic ...
java
public RealTimeServerConnection getLongPollServerConnection(RealTimeServerConnection.OnChangeListener changeListener) { BoxRequestsEvent.EventRealTimeServerRequest request = new BoxRequestsEvent.EventRealTimeServerRequest(getEventsUrl(), mSession); return new RealTimeServerConnection(request,changeListe...
[ "public", "RealTimeServerConnection", "getLongPollServerConnection", "(", "RealTimeServerConnection", ".", "OnChangeListener", "changeListener", ")", "{", "BoxRequestsEvent", ".", "EventRealTimeServerRequest", "request", "=", "new", "BoxRequestsEvent", ".", "EventRealTimeServerRe...
Gets a request that retrieves a RealTimeServerConnection, which is used to create a long poll to check for some generic change to the user's account. This can be combined with syncing logic using getUserEventsRequest or getEnterpriseEventsRequest to discover what has changed. @param changeListener A listener that will...
[ "Gets", "a", "request", "that", "retrieves", "a", "RealTimeServerConnection", "which", "is", "used", "to", "create", "a", "long", "poll", "to", "check", "for", "some", "generic", "change", "to", "the", "user", "s", "account", ".", "This", "can", "be", "com...
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/BoxApiEvent.java#L54-L57
GoogleCloudPlatform/appengine-mapreduce
java/src/main/java/com/google/appengine/tools/mapreduce/outputs/GoogleCloudStorageFileOutput.java
GoogleCloudStorageFileOutput.finish
@Override public GoogleCloudStorageFileSet finish(Collection<? extends OutputWriter<ByteBuffer>> writers) { """ Returns a list of GcsFilename that has one element for each reduce shard. """ List<String> out = Lists.newArrayList(); for (OutputWriter<ByteBuffer> w : writers) { GoogleCloudStorageF...
java
@Override public GoogleCloudStorageFileSet finish(Collection<? extends OutputWriter<ByteBuffer>> writers) { List<String> out = Lists.newArrayList(); for (OutputWriter<ByteBuffer> w : writers) { GoogleCloudStorageFileOutputWriter writer = (GoogleCloudStorageFileOutputWriter) w; out.add(writer.getFi...
[ "@", "Override", "public", "GoogleCloudStorageFileSet", "finish", "(", "Collection", "<", "?", "extends", "OutputWriter", "<", "ByteBuffer", ">", ">", "writers", ")", "{", "List", "<", "String", ">", "out", "=", "Lists", ".", "newArrayList", "(", ")", ";", ...
Returns a list of GcsFilename that has one element for each reduce shard.
[ "Returns", "a", "list", "of", "GcsFilename", "that", "has", "one", "element", "for", "each", "reduce", "shard", "." ]
train
https://github.com/GoogleCloudPlatform/appengine-mapreduce/blob/2045eb3605b6ecb40c83d11dd5442a89fe5c5dd6/java/src/main/java/com/google/appengine/tools/mapreduce/outputs/GoogleCloudStorageFileOutput.java#L74-L82
maxirosson/jdroid-android
jdroid-android-sqlite/src/main/java/com/jdroid/android/sqlite/repository/SQLiteRepository.java
SQLiteRepository.replaceChildren
public void replaceChildren(List<T> list, String parentId) { """ This method allows to replace all entity children of a given parent, it will remove any children which are not in the list, add the new ones and update which are in the list.. @param list of children to replace. @param parentId id of parent enti...
java
public void replaceChildren(List<T> list, String parentId) { for (T item : list) { item.setParentId(parentId); } @SuppressWarnings("resource") SQLiteDatabase db = dbHelper.getWritableDatabase(); boolean endTransaction = beginTransaction(db); try { db.delete(getTableName(), getParentIdColumnName() + "=...
[ "public", "void", "replaceChildren", "(", "List", "<", "T", ">", "list", ",", "String", "parentId", ")", "{", "for", "(", "T", "item", ":", "list", ")", "{", "item", ".", "setParentId", "(", "parentId", ")", ";", "}", "@", "SuppressWarnings", "(", "\...
This method allows to replace all entity children of a given parent, it will remove any children which are not in the list, add the new ones and update which are in the list.. @param list of children to replace. @param parentId id of parent entity.
[ "This", "method", "allows", "to", "replace", "all", "entity", "children", "of", "a", "given", "parent", "it", "will", "remove", "any", "children", "which", "are", "not", "in", "the", "list", "add", "the", "new", "ones", "and", "update", "which", "are", "...
train
https://github.com/maxirosson/jdroid-android/blob/1ba9cae56a16fa36bdb2c9c04379853f0300707f/jdroid-android-sqlite/src/main/java/com/jdroid/android/sqlite/repository/SQLiteRepository.java#L418-L433
couchbase/couchbase-lite-java-core
vendor/sqlite/src/java/com/couchbase/lite/internal/database/ContentValues.java
ContentValues.getAsByteArray
public byte[] getAsByteArray(String key) { """ Gets a value that is a byte array. Note that this method will not convert any other types to byte arrays. @param key the value to get @return the byte[] value, or null is the value is missing or not a byte[] """ Object value = mValues.get(key); ...
java
public byte[] getAsByteArray(String key) { Object value = mValues.get(key); if (value instanceof byte[]) { return (byte[]) value; } else { return null; } } /** * Returns a set of all of the keys and values * * @return a set of all of the ke...
[ "public", "byte", "[", "]", "getAsByteArray", "(", "String", "key", ")", "{", "Object", "value", "=", "mValues", ".", "get", "(", "key", ")", ";", "if", "(", "value", "instanceof", "byte", "[", "]", ")", "{", "return", "(", "byte", "[", "]", ")", ...
Gets a value that is a byte array. Note that this method will not convert any other types to byte arrays. @param key the value to get @return the byte[] value, or null is the value is missing or not a byte[]
[ "Gets", "a", "value", "that", "is", "a", "byte", "array", ".", "Note", "that", "this", "method", "will", "not", "convert", "any", "other", "types", "to", "byte", "arrays", "." ]
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/vendor/sqlite/src/java/com/couchbase/lite/internal/database/ContentValues.java#L437-L496
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
FSNamesystem.blockReceived
private boolean blockReceived(Block block, String delHint, DatanodeDescriptor node) throws IOException { """ The given node is reporting that it received a certain block. """ assert (hasWriteLock()); // decrement number of blocks scheduled to thi...
java
private boolean blockReceived(Block block, String delHint, DatanodeDescriptor node) throws IOException { assert (hasWriteLock()); // decrement number of blocks scheduled to this datanode. node.decBlocksScheduled(); // get the deletion hint node ...
[ "private", "boolean", "blockReceived", "(", "Block", "block", ",", "String", "delHint", ",", "DatanodeDescriptor", "node", ")", "throws", "IOException", "{", "assert", "(", "hasWriteLock", "(", ")", ")", ";", "// decrement number of blocks scheduled to this datanode.", ...
The given node is reporting that it received a certain block.
[ "The", "given", "node", "is", "reporting", "that", "it", "received", "a", "certain", "block", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L7605-L7629
biojava/biojava
biojava-core/src/main/java/org/biojava/nbio/core/util/FileDownloadUtils.java
FileDownloadUtils.downloadFile
public static void downloadFile(URL url, File destination) throws IOException { """ Download the content provided at URL url and store the result to a local file, using a temp file to cache the content in case something goes wrong in download @param url @param destination @throws IOException """ int c...
java
public static void downloadFile(URL url, File destination) throws IOException { int count = 0; int maxTries = 10; int timeout = 60000; //60 sec File tempFile = File.createTempFile(getFilePrefix(destination), "." + getFileExtension(destination)); // Took following recipe from stackoverflow: // http://stack...
[ "public", "static", "void", "downloadFile", "(", "URL", "url", ",", "File", "destination", ")", "throws", "IOException", "{", "int", "count", "=", "0", ";", "int", "maxTries", "=", "10", ";", "int", "timeout", "=", "60000", ";", "//60 sec", "File", "temp...
Download the content provided at URL url and store the result to a local file, using a temp file to cache the content in case something goes wrong in download @param url @param destination @throws IOException
[ "Download", "the", "content", "provided", "at", "URL", "url", "and", "store", "the", "result", "to", "a", "local", "file", "using", "a", "temp", "file", "to", "cache", "the", "content", "in", "case", "something", "goes", "wrong", "in", "download" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-core/src/main/java/org/biojava/nbio/core/util/FileDownloadUtils.java#L110-L151
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/UTF8.java
UTF8.getBytes
public static byte[] getBytes(String string) { """ Convert a string to a UTF-8 encoded byte array. @see String#getBytes(String) """ byte[] result = new byte[utf8Length(string)]; try { // avoid sync'd allocations writeChars(result, string, 0, string.length(...
java
public static byte[] getBytes(String string) { byte[] result = new byte[utf8Length(string)]; try { // avoid sync'd allocations writeChars(result, string, 0, string.length()); } catch (IOException e) { throw new RuntimeException(e); } return result;...
[ "public", "static", "byte", "[", "]", "getBytes", "(", "String", "string", ")", "{", "byte", "[", "]", "result", "=", "new", "byte", "[", "utf8Length", "(", "string", ")", "]", ";", "try", "{", "// avoid sync'd allocations", "writeChars", "(", "result", ...
Convert a string to a UTF-8 encoded byte array. @see String#getBytes(String)
[ "Convert", "a", "string", "to", "a", "UTF", "-", "8", "encoded", "byte", "array", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/UTF8.java#L259-L267
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/cpc/CpcSketch.java
CpcSketch.heapify
public static CpcSketch heapify(final byte[] byteArray, final long seed) { """ Return the given byte array as a CpcSketch on the Java heap. @param byteArray the given byte array @param seed the seed used to create the original sketch from which the byte array was derived. @return the given byte array as a CpcSk...
java
public static CpcSketch heapify(final byte[] byteArray, final long seed) { final Memory mem = Memory.wrap(byteArray); return heapify(mem, seed); }
[ "public", "static", "CpcSketch", "heapify", "(", "final", "byte", "[", "]", "byteArray", ",", "final", "long", "seed", ")", "{", "final", "Memory", "mem", "=", "Memory", ".", "wrap", "(", "byteArray", ")", ";", "return", "heapify", "(", "mem", ",", "se...
Return the given byte array as a CpcSketch on the Java heap. @param byteArray the given byte array @param seed the seed used to create the original sketch from which the byte array was derived. @return the given byte array as a CpcSketch on the Java heap.
[ "Return", "the", "given", "byte", "array", "as", "a", "CpcSketch", "on", "the", "Java", "heap", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/cpc/CpcSketch.java#L243-L246
moparisthebest/beehive
beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/JdbcControlImpl.java
JdbcControlImpl.getConnectionFromDataSource
private Connection getConnectionFromDataSource(String jndiName, Class<? extends JdbcControl.JndiContextFactory> jndiFactory) throws SQLException { """ Get a connection from a DataSource. @param jndiName Specifed in the subclasse's ConnectionDataS...
java
private Connection getConnectionFromDataSource(String jndiName, Class<? extends JdbcControl.JndiContextFactory> jndiFactory) throws SQLException { Connection con = null; try { JndiContextFactory jf = (JndiContextFactory) jnd...
[ "private", "Connection", "getConnectionFromDataSource", "(", "String", "jndiName", ",", "Class", "<", "?", "extends", "JdbcControl", ".", "JndiContextFactory", ">", "jndiFactory", ")", "throws", "SQLException", "{", "Connection", "con", "=", "null", ";", "try", "{...
Get a connection from a DataSource. @param jndiName Specifed in the subclasse's ConnectionDataSource annotation @param jndiFactory Specified in the subclasse's ConnectionDataSource Annotation. @return null if a connection cannot be established @throws SQLException
[ "Get", "a", "connection", "from", "a", "DataSource", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/JdbcControlImpl.java#L402-L421
apache/incubator-gobblin
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/SafeDatasetCommit.java
SafeDatasetCommit.safeCommitDataset
private void safeCommitDataset(Collection<TaskState> taskStates, DataPublisher publisher) { """ Synchronized version of {@link #commitDataset(Collection, DataPublisher)} used when publisher is not thread safe. """ synchronized (GLOBAL_LOCK) { commitDataset(taskStates, publisher); } }
java
private void safeCommitDataset(Collection<TaskState> taskStates, DataPublisher publisher) { synchronized (GLOBAL_LOCK) { commitDataset(taskStates, publisher); } }
[ "private", "void", "safeCommitDataset", "(", "Collection", "<", "TaskState", ">", "taskStates", ",", "DataPublisher", "publisher", ")", "{", "synchronized", "(", "GLOBAL_LOCK", ")", "{", "commitDataset", "(", "taskStates", ",", "publisher", ")", ";", "}", "}" ]
Synchronized version of {@link #commitDataset(Collection, DataPublisher)} used when publisher is not thread safe.
[ "Synchronized", "version", "of", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-runtime/src/main/java/org/apache/gobblin/runtime/SafeDatasetCommit.java#L255-L259
casmi/casmi
src/main/java/casmi/graphics/element/Polygon.java
Polygon.vertex
public void vertex(double x, double y) { """ Adds the corner of Polygon. @param x The x-coordinate of a new added corner. @param y The y-coordinate of a new added corner. """ MODE = LINES; this.cornerX.add(x); this.cornerY.add(y); this.cornerZ.add(0d); setNumberOfCor...
java
public void vertex(double x, double y) { MODE = LINES; this.cornerX.add(x); this.cornerY.add(y); this.cornerZ.add(0d); setNumberOfCorner(this.cornerX.size()); calcG(); }
[ "public", "void", "vertex", "(", "double", "x", ",", "double", "y", ")", "{", "MODE", "=", "LINES", ";", "this", ".", "cornerX", ".", "add", "(", "x", ")", ";", "this", ".", "cornerY", ".", "add", "(", "y", ")", ";", "this", ".", "cornerZ", "."...
Adds the corner of Polygon. @param x The x-coordinate of a new added corner. @param y The y-coordinate of a new added corner.
[ "Adds", "the", "corner", "of", "Polygon", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Polygon.java#L71-L78
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/service/strategies/PartitionSelectionStrategy.java
PartitionSelectionStrategy.selectByPartition
private static Endpoint selectByPartition(final List<Endpoint> endpoints, final short partition) { """ Helper method to select the proper target endpoint by partition. @param endpoints the list of currently available endpoints. @param partition the partition of the incoming request. @return the selected endpo...
java
private static Endpoint selectByPartition(final List<Endpoint> endpoints, final short partition) { if (partition >= 0) { int numEndpoints = endpoints.size(); Endpoint endpoint = numEndpoints == 1 ? endpoints.get(0) : endpoints.get(partition % numEndpoints); if (endpoint != nu...
[ "private", "static", "Endpoint", "selectByPartition", "(", "final", "List", "<", "Endpoint", ">", "endpoints", ",", "final", "short", "partition", ")", "{", "if", "(", "partition", ">=", "0", ")", "{", "int", "numEndpoints", "=", "endpoints", ".", "size", ...
Helper method to select the proper target endpoint by partition. @param endpoints the list of currently available endpoints. @param partition the partition of the incoming request. @return the selected endpoint, or null if no acceptable one found.
[ "Helper", "method", "to", "select", "the", "proper", "target", "endpoint", "by", "partition", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/service/strategies/PartitionSelectionStrategy.java#L68-L79
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/components/DatePickerSettings.java
DatePickerSettings.zApplyGapBeforeButtonPixels
void zApplyGapBeforeButtonPixels() { """ zApplyGapBeforeButtonPixels, This applies the named setting to the parent component. """ int gapPixels = (gapBeforeButtonPixels == null) ? 3 : gapBeforeButtonPixels; ConstantSize gapSizeObject = new ConstantSize(gapPixels, ConstantSize.PIXEL); Co...
java
void zApplyGapBeforeButtonPixels() { int gapPixels = (gapBeforeButtonPixels == null) ? 3 : gapBeforeButtonPixels; ConstantSize gapSizeObject = new ConstantSize(gapPixels, ConstantSize.PIXEL); ColumnSpec columnSpec = ColumnSpec.createGap(gapSizeObject); FormLayout layout = ((FormLayout) p...
[ "void", "zApplyGapBeforeButtonPixels", "(", ")", "{", "int", "gapPixels", "=", "(", "gapBeforeButtonPixels", "==", "null", ")", "?", "3", ":", "gapBeforeButtonPixels", ";", "ConstantSize", "gapSizeObject", "=", "new", "ConstantSize", "(", "gapPixels", ",", "Consta...
zApplyGapBeforeButtonPixels, This applies the named setting to the parent component.
[ "zApplyGapBeforeButtonPixels", "This", "applies", "the", "named", "setting", "to", "the", "parent", "component", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/components/DatePickerSettings.java#L2222-L2228
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_rsva_serviceName_scheduleRateCode_POST
public OvhDetailedRateCodeInformation billingAccount_rsva_serviceName_scheduleRateCode_POST(String billingAccount, String serviceName, String rateCode) throws IOException { """ Schedule a new rate code for this sva REST: POST /telephony/{billingAccount}/rsva/{serviceName}/scheduleRateCode @param rateCode [requ...
java
public OvhDetailedRateCodeInformation billingAccount_rsva_serviceName_scheduleRateCode_POST(String billingAccount, String serviceName, String rateCode) throws IOException { String qPath = "/telephony/{billingAccount}/rsva/{serviceName}/scheduleRateCode"; StringBuilder sb = path(qPath, billingAccount, serviceName); ...
[ "public", "OvhDetailedRateCodeInformation", "billingAccount_rsva_serviceName_scheduleRateCode_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "String", "rateCode", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccoun...
Schedule a new rate code for this sva REST: POST /telephony/{billingAccount}/rsva/{serviceName}/scheduleRateCode @param rateCode [required] The specified rate code @param billingAccount [required] The name of your billingAccount @param serviceName [required]
[ "Schedule", "a", "new", "rate", "code", "for", "this", "sva" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L5951-L5958
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/utils/ReportRequestFactoryHelper.java
ReportRequestFactoryHelper.getHttpRequestFactory
@VisibleForTesting HttpRequestFactory getHttpRequestFactory(final String reportUrl, String version) throws AuthenticationException { """ Gets the report HTTP URL connection given report URL and proper information needed to authenticate the request. @param reportUrl the URL of the report response or dow...
java
@VisibleForTesting HttpRequestFactory getHttpRequestFactory(final String reportUrl, String version) throws AuthenticationException { final HttpHeaders httpHeaders = createHeaders(reportUrl, version); return httpTransport.createRequestFactory( request -> { request.setHeaders(httpHeaders...
[ "@", "VisibleForTesting", "HttpRequestFactory", "getHttpRequestFactory", "(", "final", "String", "reportUrl", ",", "String", "version", ")", "throws", "AuthenticationException", "{", "final", "HttpHeaders", "httpHeaders", "=", "createHeaders", "(", "reportUrl", ",", "ve...
Gets the report HTTP URL connection given report URL and proper information needed to authenticate the request. @param reportUrl the URL of the report response or download @return the report HTTP URL connection @throws AuthenticationException If OAuth authorization fails.
[ "Gets", "the", "report", "HTTP", "URL", "connection", "given", "report", "URL", "and", "proper", "information", "needed", "to", "authenticate", "the", "request", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/utils/ReportRequestFactoryHelper.java#L77-L90
Waikato/moa
moa/src/main/java/moa/options/AbstractClassOption.java
AbstractClassOption.classToCLIString
public static String classToCLIString(Class<?> aClass, Class<?> requiredType) { """ Gets the command line interface text of the class. @param aClass the class @param requiredType the class type @return the command line interface text of the class """ String className = aClass.getName(); St...
java
public static String classToCLIString(Class<?> aClass, Class<?> requiredType) { String className = aClass.getName(); String packageName = requiredType.getPackage().getName(); if (className.startsWith(packageName)) { // cut off package name className = className.substring(...
[ "public", "static", "String", "classToCLIString", "(", "Class", "<", "?", ">", "aClass", ",", "Class", "<", "?", ">", "requiredType", ")", "{", "String", "className", "=", "aClass", ".", "getName", "(", ")", ";", "String", "packageName", "=", "requiredType...
Gets the command line interface text of the class. @param aClass the class @param requiredType the class type @return the command line interface text of the class
[ "Gets", "the", "command", "line", "interface", "text", "of", "the", "class", "." ]
train
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/moa/options/AbstractClassOption.java#L196-L211
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyEncoder.java
KeyEncoder.encodeDesc
public static int encodeDesc(Integer value, byte[] dst, int dstOffset) { """ Encodes the given signed Integer object into exactly 1 or 5 bytes for descending order. If the Integer object is never expected to be null, consider encoding as an int primitive. @param value optional signed Integer value to encode ...
java
public static int encodeDesc(Integer value, byte[] dst, int dstOffset) { if (value == null) { dst[dstOffset] = NULL_BYTE_LOW; return 1; } else { dst[dstOffset] = NOT_NULL_BYTE_LOW; DataEncoder.encode(~value.intValue(), dst, dstOffset + 1); ...
[ "public", "static", "int", "encodeDesc", "(", "Integer", "value", ",", "byte", "[", "]", "dst", ",", "int", "dstOffset", ")", "{", "if", "(", "value", "==", "null", ")", "{", "dst", "[", "dstOffset", "]", "=", "NULL_BYTE_LOW", ";", "return", "1", ";"...
Encodes the given signed Integer object into exactly 1 or 5 bytes for descending order. If the Integer object is never expected to be null, consider encoding as an int primitive. @param value optional signed Integer value to encode @param dst destination for encoded bytes @param dstOffset offset into destination array...
[ "Encodes", "the", "given", "signed", "Integer", "object", "into", "exactly", "1", "or", "5", "bytes", "for", "descending", "order", ".", "If", "the", "Integer", "object", "is", "never", "expected", "to", "be", "null", "consider", "encoding", "as", "an", "i...
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyEncoder.java#L62-L71
derari/cthul
objects/src/main/java/org/cthul/objects/reflection/Signatures.java
Signatures.bestConstructor
public static <T> Constructor<T> bestConstructor(Constructor<T>[] constructors, Class<?>[] argTypes) throws AmbiguousConstructorMatchException { """ Selects the best constructor for the given argument types. @param <T> @param constructors @param argTypes @return constructor, or {@code null} @throws AmbiguousS...
java
public static <T> Constructor<T> bestConstructor(Constructor<T>[] constructors, Class<?>[] argTypes) throws AmbiguousConstructorMatchException { try { return best(constructors, collectSignatures(constructors), collectVarArgs(constructors), argTypes); } catch (AmbiguousSignatureMatchExcept...
[ "public", "static", "<", "T", ">", "Constructor", "<", "T", ">", "bestConstructor", "(", "Constructor", "<", "T", ">", "[", "]", "constructors", ",", "Class", "<", "?", ">", "[", "]", "argTypes", ")", "throws", "AmbiguousConstructorMatchException", "{", "t...
Selects the best constructor for the given argument types. @param <T> @param constructors @param argTypes @return constructor, or {@code null} @throws AmbiguousSignatureMatchException if multiple constructors match equally
[ "Selects", "the", "best", "constructor", "for", "the", "given", "argument", "types", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/objects/src/main/java/org/cthul/objects/reflection/Signatures.java#L67-L73
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java
SARLQuickfixProvider.fixVariableNameShadowing
@Fix(org.eclipse.xtext.xbase.validation.IssueCodes.VARIABLE_NAME_SHADOWING) public void fixVariableNameShadowing(final Issue issue, IssueResolutionAcceptor acceptor) { """ Quick fix for "Variable name shadowing". @param issue the issue. @param acceptor the quick fix acceptor. """ MemberRemoveModificatio...
java
@Fix(org.eclipse.xtext.xbase.validation.IssueCodes.VARIABLE_NAME_SHADOWING) public void fixVariableNameShadowing(final Issue issue, IssueResolutionAcceptor acceptor) { MemberRemoveModification.accept(this, issue, acceptor); MemberRenameModification.accept(this, issue, acceptor); }
[ "@", "Fix", "(", "org", ".", "eclipse", ".", "xtext", ".", "xbase", ".", "validation", ".", "IssueCodes", ".", "VARIABLE_NAME_SHADOWING", ")", "public", "void", "fixVariableNameShadowing", "(", "final", "Issue", "issue", ",", "IssueResolutionAcceptor", "acceptor",...
Quick fix for "Variable name shadowing". @param issue the issue. @param acceptor the quick fix acceptor.
[ "Quick", "fix", "for", "Variable", "name", "shadowing", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/quickfix/SARLQuickfixProvider.java#L739-L743
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.deleteCertificate
public DeletedCertificateBundle deleteCertificate(String vaultBaseUrl, String certificateName) { """ Deletes a certificate from a specified key vault. Deletes all versions of a certificate object along with its associated policy. Delete certificate cannot be used to remove individual versions of a certificate obj...
java
public DeletedCertificateBundle deleteCertificate(String vaultBaseUrl, String certificateName) { return deleteCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName).toBlocking().single().body(); }
[ "public", "DeletedCertificateBundle", "deleteCertificate", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ")", "{", "return", "deleteCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "certificateName", ")", ".", "toBlocking", "(", ")", ".",...
Deletes a certificate from a specified key vault. Deletes all versions of a certificate object along with its associated policy. Delete certificate cannot be used to remove individual versions of a certificate object. This operation requires the certificates/delete permission. @param vaultBaseUrl The vault name, for e...
[ "Deletes", "a", "certificate", "from", "a", "specified", "key", "vault", ".", "Deletes", "all", "versions", "of", "a", "certificate", "object", "along", "with", "its", "associated", "policy", ".", "Delete", "certificate", "cannot", "be", "used", "to", "remove"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L5325-L5327
mockito/mockito
src/main/java/org/mockito/ArgumentMatchers.java
ArgumentMatchers.anyMap
public static <K, V> Map<K, V> anyMap() { """ Any <strong>non-null</strong> <code>Map</code>. <p> Since Mockito 2.1.0, only allow non-null <code>Map</code>. As this is a nullable reference, the suggested API to <strong>match</strong> <code>null</code> wrapper would be {@link #isNull()}. We felt this change w...
java
public static <K, V> Map<K, V> anyMap() { reportMatcher(new InstanceOf(Map.class, "<any map>")); return new HashMap<K, V>(0); }
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "anyMap", "(", ")", "{", "reportMatcher", "(", "new", "InstanceOf", "(", "Map", ".", "class", ",", "\"<any map>\"", ")", ")", ";", "return", "new", "HashMap", "<", "K", ...
Any <strong>non-null</strong> <code>Map</code>. <p> Since Mockito 2.1.0, only allow non-null <code>Map</code>. As this is a nullable reference, the suggested API to <strong>match</strong> <code>null</code> wrapper would be {@link #isNull()}. We felt this change would make tests harness much safer that it was with Mock...
[ "Any", "<strong", ">", "non", "-", "null<", "/", "strong", ">", "<code", ">", "Map<", "/", "code", ">", "." ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/ArgumentMatchers.java#L609-L612
apache/flink
flink-mesos/src/main/java/org/apache/flink/mesos/util/MesosArtifactServer.java
MesosArtifactServer.addPath
public synchronized URL addPath(Path path, Path remoteFile) throws IOException, MalformedURLException { """ Adds a path to the artifact server. @param path the qualified FS path to serve (local, hdfs, etc). @param remoteFile the remote path with which to locate the file. @return the fully-qualified remote path ...
java
public synchronized URL addPath(Path path, Path remoteFile) throws IOException, MalformedURLException { if (paths.containsKey(remoteFile)) { throw new IllegalArgumentException("duplicate path registered"); } if (remoteFile.isAbsolute()) { throw new IllegalArgumentException("not expecting an absolute path");...
[ "public", "synchronized", "URL", "addPath", "(", "Path", "path", ",", "Path", "remoteFile", ")", "throws", "IOException", ",", "MalformedURLException", "{", "if", "(", "paths", ".", "containsKey", "(", "remoteFile", ")", ")", "{", "throw", "new", "IllegalArgum...
Adds a path to the artifact server. @param path the qualified FS path to serve (local, hdfs, etc). @param remoteFile the remote path with which to locate the file. @return the fully-qualified remote path to the file. @throws MalformedURLException if the remote path is invalid.
[ "Adds", "a", "path", "to", "the", "artifact", "server", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-mesos/src/main/java/org/apache/flink/mesos/util/MesosArtifactServer.java#L209-L222
toddfast/typeconverter
src/main/java/com/toddfast/util/convert/TypeConverter.java
TypeConverter.asShort
public static short asShort(Object value, short nullValue) { """ Return the value converted to a short or the specified alternate value if the original value is null. Note, this method still throws {@link IllegalArgumentException} if the value is not null and could not be converted. @param value The value t...
java
public static short asShort(Object value, short nullValue) { value=convert(Short.class,value); if (value!=null) { return ((Short)value).shortValue(); } else { return nullValue; } }
[ "public", "static", "short", "asShort", "(", "Object", "value", ",", "short", "nullValue", ")", "{", "value", "=", "convert", "(", "Short", ".", "class", ",", "value", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "return", "(", "(", "Short",...
Return the value converted to a short or the specified alternate value if the original value is null. Note, this method still throws {@link IllegalArgumentException} if the value is not null and could not be converted. @param value The value to be converted @param nullValue The value to be returned if {@link value} is...
[ "Return", "the", "value", "converted", "to", "a", "short", "or", "the", "specified", "alternate", "value", "if", "the", "original", "value", "is", "null", ".", "Note", "this", "method", "still", "throws", "{", "@link", "IllegalArgumentException", "}", "if", ...
train
https://github.com/toddfast/typeconverter/blob/44efa352254faa49edaba5c5935389705aa12b90/src/main/java/com/toddfast/util/convert/TypeConverter.java#L489-L497
larsga/Duke
duke-server/src/main/java/no/priv/garshol/duke/server/CommonJTimer.java
CommonJTimer.spawnThread
public void spawnThread(DukeController controller, int check_interval) { """ Starts a background thread which calls the controller every check_interval milliseconds. Returns immediately, leaving the background thread running. """ this.controller = controller; timer = mgr.schedule(this, 0, check_inter...
java
public void spawnThread(DukeController controller, int check_interval) { this.controller = controller; timer = mgr.schedule(this, 0, check_interval * 1000); // convert to ms }
[ "public", "void", "spawnThread", "(", "DukeController", "controller", ",", "int", "check_interval", ")", "{", "this", ".", "controller", "=", "controller", ";", "timer", "=", "mgr", ".", "schedule", "(", "this", ",", "0", ",", "check_interval", "*", "1000", ...
Starts a background thread which calls the controller every check_interval milliseconds. Returns immediately, leaving the background thread running.
[ "Starts", "a", "background", "thread", "which", "calls", "the", "controller", "every", "check_interval", "milliseconds", ".", "Returns", "immediately", "leaving", "the", "background", "thread", "running", "." ]
train
https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-server/src/main/java/no/priv/garshol/duke/server/CommonJTimer.java#L45-L48
rhuss/jolokia
agent/core/src/main/java/org/jolokia/handler/list/MBeanInfoData.java
MBeanInfoData.handleException
public void handleException(ObjectName pName, IOException pExp) throws IOException { """ Add an exception which occurred during extraction of an {@link MBeanInfo} for a certain {@link ObjectName} to this map. @param pName MBean name for which the error occurred @param pExp exception occurred @throws IOExcept...
java
public void handleException(ObjectName pName, IOException pExp) throws IOException { // In case of a remote call, IOException can occur e.g. for // NonSerializableExceptions if (pathStack.size() == 0) { addException(pName, pExp); } else { // Happens for a deeper r...
[ "public", "void", "handleException", "(", "ObjectName", "pName", ",", "IOException", "pExp", ")", "throws", "IOException", "{", "// In case of a remote call, IOException can occur e.g. for", "// NonSerializableExceptions", "if", "(", "pathStack", ".", "size", "(", ")", "=...
Add an exception which occurred during extraction of an {@link MBeanInfo} for a certain {@link ObjectName} to this map. @param pName MBean name for which the error occurred @param pExp exception occurred @throws IOException if this method decides to rethrow the execption
[ "Add", "an", "exception", "which", "occurred", "during", "extraction", "of", "an", "{", "@link", "MBeanInfo", "}", "for", "a", "certain", "{", "@link", "ObjectName", "}", "to", "this", "map", "." ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/list/MBeanInfoData.java#L200-L211
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/validation/text/PlainTextMessageValidator.java
PlainTextMessageValidator.validateText
private void validateText(String receivedMessagePayload, String controlMessagePayload) { """ Compares two string with each other in order to validate plain text. @param receivedMessagePayload @param controlMessagePayload """ if (!StringUtils.hasText(controlMessagePayload)) { log.debug("...
java
private void validateText(String receivedMessagePayload, String controlMessagePayload) { if (!StringUtils.hasText(controlMessagePayload)) { log.debug("Skip message payload validation as no control message was defined"); return; } else { Assert.isTrue(StringUtils.hasTe...
[ "private", "void", "validateText", "(", "String", "receivedMessagePayload", ",", "String", "controlMessagePayload", ")", "{", "if", "(", "!", "StringUtils", ".", "hasText", "(", "controlMessagePayload", ")", ")", "{", "log", ".", "debug", "(", "\"Skip message payl...
Compares two string with each other in order to validate plain text. @param receivedMessagePayload @param controlMessagePayload
[ "Compares", "two", "string", "with", "each", "other", "in", "order", "to", "validate", "plain", "text", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/text/PlainTextMessageValidator.java#L168-L186
paylogic/java-fogbugz
src/main/java/org/paylogic/fogbugz/FogbugzManager.java
FogbugzManager.createMilestone
public boolean createMilestone(FogbugzMilestone milestone) { """ Creates new Milestone in Fogbugz. Please leave id of milestone object empty. Only creates global milestones. @param milestone to edit/create """ try { HashMap<String, String> params = new HashMap<String, String>(); ...
java
public boolean createMilestone(FogbugzMilestone milestone) { try { HashMap<String, String> params = new HashMap<String, String>(); // If id = 0, create new case. if (milestone.getId() != 0) { throw new Exception("Editing existing milestones is not supported, p...
[ "public", "boolean", "createMilestone", "(", "FogbugzMilestone", "milestone", ")", "{", "try", "{", "HashMap", "<", "String", ",", "String", ">", "params", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "// If id = 0, create new case....
Creates new Milestone in Fogbugz. Please leave id of milestone object empty. Only creates global milestones. @param milestone to edit/create
[ "Creates", "new", "Milestone", "in", "Fogbugz", ".", "Please", "leave", "id", "of", "milestone", "object", "empty", ".", "Only", "creates", "global", "milestones", "." ]
train
https://github.com/paylogic/java-fogbugz/blob/75651d82b2476e9ba2a0805311e18ee36882c2df/src/main/java/org/paylogic/fogbugz/FogbugzManager.java#L456-L480
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.getAt
public static <T> T getAt(Iterable<T> self, int idx) { """ Support the subscript operator for an Iterable. Typical usage: <pre class="groovyTestCase"> // custom Iterable example: class MyIterable implements Iterable { Iterator iterator() { [1, 2, 3].iterator() } } def myIterable = new MyIterable() assert my...
java
public static <T> T getAt(Iterable<T> self, int idx) { return getAt(self.iterator(), idx); }
[ "public", "static", "<", "T", ">", "T", "getAt", "(", "Iterable", "<", "T", ">", "self", ",", "int", "idx", ")", "{", "return", "getAt", "(", "self", ".", "iterator", "(", ")", ",", "idx", ")", ";", "}" ]
Support the subscript operator for an Iterable. Typical usage: <pre class="groovyTestCase"> // custom Iterable example: class MyIterable implements Iterable { Iterator iterator() { [1, 2, 3].iterator() } } def myIterable = new MyIterable() assert myIterable[1] == 2 // Set example: def set = [1,2,3] as LinkedHashSet as...
[ "Support", "the", "subscript", "operator", "for", "an", "Iterable", ".", "Typical", "usage", ":", "<pre", "class", "=", "groovyTestCase", ">", "//", "custom", "Iterable", "example", ":", "class", "MyIterable", "implements", "Iterable", "{", "Iterator", "iterator...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L7937-L7939
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java
ElementPlugin.executeAction
private void executeAction(PluginAction action, boolean async, Object data) { """ Notify all plugin callbacks of the specified action. @param action Action to perform. @param data Event-dependent data (may be null). @param async If true, callbacks are done asynchronously. """ if (hasListeners() ||...
java
private void executeAction(PluginAction action, boolean async, Object data) { if (hasListeners() || action == PluginAction.LOAD) { PluginEvent event = new PluginEvent(this, action, data); if (async) { EventUtil.post(event); } else { onAction(e...
[ "private", "void", "executeAction", "(", "PluginAction", "action", ",", "boolean", "async", ",", "Object", "data", ")", "{", "if", "(", "hasListeners", "(", ")", "||", "action", "==", "PluginAction", ".", "LOAD", ")", "{", "PluginEvent", "event", "=", "new...
Notify all plugin callbacks of the specified action. @param action Action to perform. @param data Event-dependent data (may be null). @param async If true, callbacks are done asynchronously.
[ "Notify", "all", "plugin", "callbacks", "of", "the", "specified", "action", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementPlugin.java#L430-L440
jfaster/mango
src/main/java/org/jfaster/mango/util/PatternMatchUtils.java
PatternMatchUtils.simpleMatch
public static boolean simpleMatch(String[] patterns, String str) { """ Match a String against the given patterns, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality. @param patterns the patterns ...
java
public static boolean simpleMatch(String[] patterns, String str) { if (patterns != null) { for (int i = 0; i < patterns.length; i++) { if (simpleMatch(patterns[i], str)) { return true; } } } return false; }
[ "public", "static", "boolean", "simpleMatch", "(", "String", "[", "]", "patterns", ",", "String", "str", ")", "{", "if", "(", "patterns", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "patterns", ".", "length", ";", "i", ...
Match a String against the given patterns, supporting the following simple pattern styles: "xxx*", "*xxx", "*xxx*" and "xxx*yyy" matches (with an arbitrary number of pattern parts), as well as direct equality. @param patterns the patterns to match against @param str the String to match @return whether the String ...
[ "Match", "a", "String", "against", "the", "given", "patterns", "supporting", "the", "following", "simple", "pattern", "styles", ":", "xxx", "*", "*", "xxx", "*", "xxx", "*", "and", "xxx", "*", "yyy", "matches", "(", "with", "an", "arbitrary", "number", "...
train
https://github.com/jfaster/mango/blob/4f078846f1daa2cb92424edcde5964267e390e8f/src/main/java/org/jfaster/mango/util/PatternMatchUtils.java#L57-L66
classgraph/classgraph
src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java
ZipFileSliceReader.getString
static String getString(final byte[] arr, final long off, final int lenBytes) throws IOException { """ Get a string from a byte array. @param arr the byte array @param off the offset to start reading from @param lenBytes the length of the string in bytes @return the string @throws IOException if an I/O ...
java
static String getString(final byte[] arr, final long off, final int lenBytes) throws IOException { final int ioff = (int) off; if (ioff < 0 || ioff > arr.length - lenBytes) { throw new IndexOutOfBoundsException(); } return new String(arr, ioff, lenBytes, StandardCharsets.UTF_...
[ "static", "String", "getString", "(", "final", "byte", "[", "]", "arr", ",", "final", "long", "off", ",", "final", "int", "lenBytes", ")", "throws", "IOException", "{", "final", "int", "ioff", "=", "(", "int", ")", "off", ";", "if", "(", "ioff", "<",...
Get a string from a byte array. @param arr the byte array @param off the offset to start reading from @param lenBytes the length of the string in bytes @return the string @throws IOException if an I/O exception occurs.
[ "Get", "a", "string", "from", "a", "byte", "array", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L296-L302
OpenLiberty/open-liberty
dev/wlp.lib.extract/src/wlp/lib/extract/ChangeHistory.java
ChangeHistory.changedProps
public void changedProps(final String filePath, final Map props) { """ map: key is property name, value [] is of {old value, new value} """ history.push(new Action() { public ReturnCode execute() { final File file = new File(filePath); final Properties propsO...
java
public void changedProps(final String filePath, final Map props) { history.push(new Action() { public ReturnCode execute() { final File file = new File(filePath); final Properties propsObj = new Properties(); InputStream is = null; Outp...
[ "public", "void", "changedProps", "(", "final", "String", "filePath", ",", "final", "Map", "props", ")", "{", "history", ".", "push", "(", "new", "Action", "(", ")", "{", "public", "ReturnCode", "execute", "(", ")", "{", "final", "File", "file", "=", "...
map: key is property name, value [] is of {old value, new value}
[ "map", ":", "key", "is", "property", "name", "value", "[]", "is", "of", "{", "old", "value", "new", "value", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp.lib.extract/src/wlp/lib/extract/ChangeHistory.java#L68-L99
voldemort/voldemort
src/java/voldemort/utils/ReflectUtils.java
ReflectUtils.callConstructor
public static <T> T callConstructor(Class<T> c, Class<?>[] argTypes, Object[] args) { """ Call the class constructor with the given arguments @param c The class @param args The arguments @return The constructed object """ try { Constructor<T> cons = c.getConstructor(argTypes); ...
java
public static <T> T callConstructor(Class<T> c, Class<?>[] argTypes, Object[] args) { try { Constructor<T> cons = c.getConstructor(argTypes); return cons.newInstance(args); } catch(InvocationTargetException e) { throw getCause(e); } catch(IllegalAccessExceptio...
[ "public", "static", "<", "T", ">", "T", "callConstructor", "(", "Class", "<", "T", ">", "c", ",", "Class", "<", "?", ">", "[", "]", "argTypes", ",", "Object", "[", "]", "args", ")", "{", "try", "{", "Constructor", "<", "T", ">", "cons", "=", "c...
Call the class constructor with the given arguments @param c The class @param args The arguments @return The constructed object
[ "Call", "the", "class", "constructor", "with", "the", "given", "arguments" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/ReflectUtils.java#L113-L126
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java
SyncGroupsInner.triggerSync
public void triggerSync(String resourceGroupName, String serverName, String databaseName, String syncGroupName) { """ Triggers a sync group synchronization. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the po...
java
public void triggerSync(String resourceGroupName, String serverName, String databaseName, String syncGroupName) { triggerSyncWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName).toBlocking().single().body(); }
[ "public", "void", "triggerSync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "syncGroupName", ")", "{", "triggerSyncWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "databaseN...
Triggers a sync group synchronization. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database on which the sync group is hoste...
[ "Triggers", "a", "sync", "group", "synchronization", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncGroupsInner.java#L1015-L1017
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.elementPower
public static void elementPower(DMatrixD1 A , DMatrixD1 B , DMatrixD1 C ) { """ <p> Element-wise power operation <br> c<sub>ij</sub> = a<sub>ij</sub> ^ b<sub>ij</sub> <p> @param A left side @param B right side @param C output (modified) """ if( A.numRows != B.numRows || A.numRows != C.numRows...
java
public static void elementPower(DMatrixD1 A , DMatrixD1 B , DMatrixD1 C ) { if( A.numRows != B.numRows || A.numRows != C.numRows || A.numCols != B.numCols || A.numCols != C.numCols ) { throw new MatrixDimensionException("All matrices must be the same shape"); } int ...
[ "public", "static", "void", "elementPower", "(", "DMatrixD1", "A", ",", "DMatrixD1", "B", ",", "DMatrixD1", "C", ")", "{", "if", "(", "A", ".", "numRows", "!=", "B", ".", "numRows", "||", "A", ".", "numRows", "!=", "C", ".", "numRows", "||", "A", "...
<p> Element-wise power operation <br> c<sub>ij</sub> = a<sub>ij</sub> ^ b<sub>ij</sub> <p> @param A left side @param B right side @param C output (modified)
[ "<p", ">", "Element", "-", "wise", "power", "operation", "<br", ">", "c<sub", ">", "ij<", "/", "sub", ">", "=", "a<sub", ">", "ij<", "/", "sub", ">", "^", "b<sub", ">", "ij<", "/", "sub", ">", "<p", ">" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L1641-L1652
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.mapToChar
public static <T, E extends Exception> CharList mapToChar(final T[] a, final int fromIndex, final int toIndex, final Try.ToCharFunction<? super T, E> func) throws E { """ Mostly it's designed for one-step operation to complete the operation in one step. <code>java.util.stream.Stream</code> is preferr...
java
public static <T, E extends Exception> CharList mapToChar(final T[] a, final int fromIndex, final int toIndex, final Try.ToCharFunction<? super T, E> func) throws E { checkFromToIndex(fromIndex, toIndex, len(a)); N.checkArgNotNull(func); if (N.isNullOrEmpty(a)) { r...
[ "public", "static", "<", "T", ",", "E", "extends", "Exception", ">", "CharList", "mapToChar", "(", "final", "T", "[", "]", "a", ",", "final", "int", "fromIndex", ",", "final", "int", "toIndex", ",", "final", "Try", ".", "ToCharFunction", "<", "?", "sup...
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 a @param fromIndex @param toIndex @param func @return
[ "Mostly", "it", "s", "designed", "for", "one", "-", "step", "operation", "to", "complete", "the", "operation", "in", "one", "step", ".", "<code", ">", "java", ".", "util", ".", "stream", ".", "Stream<", "/", "code", ">", "is", "preferred", "for", "mult...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L14601-L14617
loldevs/riotapi
rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/SummonerTeamService.java
SummonerTeamService.createTeam
public Team createTeam(String name, String tag) { """ Create a new ranked team with the specified name and tag @param name The name @param tag The tag @return The created team """ return client.sendRpcAndWait(SERVICE, "createTeam", name, tag); }
java
public Team createTeam(String name, String tag) { return client.sendRpcAndWait(SERVICE, "createTeam", name, tag); }
[ "public", "Team", "createTeam", "(", "String", "name", ",", "String", "tag", ")", "{", "return", "client", ".", "sendRpcAndWait", "(", "SERVICE", ",", "\"createTeam\"", ",", "name", ",", "tag", ")", ";", "}" ]
Create a new ranked team with the specified name and tag @param name The name @param tag The tag @return The created team
[ "Create", "a", "new", "ranked", "team", "with", "the", "specified", "name", "and", "tag" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rtmp/src/main/java/net/boreeas/riotapi/rtmp/services/SummonerTeamService.java#L95-L97
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java
MemberSummaryBuilder.buildAnnotationTypeOptionalMemberSummary
public void buildAnnotationTypeOptionalMemberSummary(XMLNode node, Content memberSummaryTree) { """ Build the summary for the optional members. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added """ ...
java
public void buildAnnotationTypeOptionalMemberSummary(XMLNode node, Content memberSummaryTree) { MemberSummaryWriter writer = memberSummaryWriters.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_OPTIONAL); VisibleMemberMap visibleMemberMap = getVisibleMemberMap(VisibleMem...
[ "public", "void", "buildAnnotationTypeOptionalMemberSummary", "(", "XMLNode", "node", ",", "Content", "memberSummaryTree", ")", "{", "MemberSummaryWriter", "writer", "=", "memberSummaryWriters", ".", "get", "(", "VisibleMemberMap", ".", "Kind", ".", "ANNOTATION_TYPE_MEMBE...
Build the summary for the optional members. @param node the XML element that specifies which components to document @param memberSummaryTree the content tree to which the documentation will be added
[ "Build", "the", "summary", "for", "the", "optional", "members", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java#L237-L243
mozilla/rhino
src/org/mozilla/javascript/NativeString.java
NativeString.get
@Override public Object get(int index, Scriptable start) { """ /* Make array-style property lookup work for strings. XXX is this ECMA? A version check is probably needed. In js too. """ if (0 <= index && index < string.length()) { return String.valueOf(string.charAt(index)); }...
java
@Override public Object get(int index, Scriptable start) { if (0 <= index && index < string.length()) { return String.valueOf(string.charAt(index)); } return super.get(index, start); }
[ "@", "Override", "public", "Object", "get", "(", "int", "index", ",", "Scriptable", "start", ")", "{", "if", "(", "0", "<=", "index", "&&", "index", "<", "string", ".", "length", "(", ")", ")", "{", "return", "String", ".", "valueOf", "(", "string", ...
/* Make array-style property lookup work for strings. XXX is this ECMA? A version check is probably needed. In js too.
[ "/", "*", "Make", "array", "-", "style", "property", "lookup", "work", "for", "strings", ".", "XXX", "is", "this", "ECMA?", "A", "version", "check", "is", "probably", "needed", ".", "In", "js", "too", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/NativeString.java#L553-L559
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/cache/RepositoryCache.java
RepositoryCache.destroyWorkspace
public boolean destroyWorkspace( final String name, final WritableSessionCache removeSession ) { """ Permanently destroys the workspace with the supplied name, if the repository is appropriately configured, also unlinking the jcr:system node from the root node . If no such wor...
java
public boolean destroyWorkspace( final String name, final WritableSessionCache removeSession ) { if (workspaceNames.contains(name)) { if (configuration.getPredefinedWorkspaceNames().contains(name)) { throw new UnsupportedOperationException(JcrI18n...
[ "public", "boolean", "destroyWorkspace", "(", "final", "String", "name", ",", "final", "WritableSessionCache", "removeSession", ")", "{", "if", "(", "workspaceNames", ".", "contains", "(", "name", ")", ")", "{", "if", "(", "configuration", ".", "getPredefinedWor...
Permanently destroys the workspace with the supplied name, if the repository is appropriately configured, also unlinking the jcr:system node from the root node . If no such workspace exists in this repository, this method simply returns. Otherwise, this method attempts to destroy the named workspace. @param name the w...
[ "Permanently", "destroys", "the", "workspace", "with", "the", "supplied", "name", "if", "the", "repository", "is", "appropriately", "configured", "also", "unlinking", "the", "jcr", ":", "system", "node", "from", "the", "root", "node", ".", "If", "no", "such", ...
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/cache/RepositoryCache.java#L822-L863
bazaarvoice/emodb
table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/AstyanaxTableDAO.java
AstyanaxTableDAO.writEventToSystemTable
private void writEventToSystemTable(String key, Delta delta, Audit audit) { """ /* Write the delta to the unpublished databus events system table which stores all the drop, purge, attribute changes, placement moves etc information of the tables. """ _backingStore.update(_systemTableUnPublishedDatabusEv...
java
private void writEventToSystemTable(String key, Delta delta, Audit audit) { _backingStore.update(_systemTableUnPublishedDatabusEvents, key, TimeUUIDs.newUUID(), delta, audit, WriteConsistency.GLOBAL); }
[ "private", "void", "writEventToSystemTable", "(", "String", "key", ",", "Delta", "delta", ",", "Audit", "audit", ")", "{", "_backingStore", ".", "update", "(", "_systemTableUnPublishedDatabusEvents", ",", "key", ",", "TimeUUIDs", ".", "newUUID", "(", ")", ",", ...
/* Write the delta to the unpublished databus events system table which stores all the drop, purge, attribute changes, placement moves etc information of the tables.
[ "/", "*", "Write", "the", "delta", "to", "the", "unpublished", "databus", "events", "system", "table", "which", "stores", "all", "the", "drop", "purge", "attribute", "changes", "placement", "moves", "etc", "information", "of", "the", "tables", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/table/src/main/java/com/bazaarvoice/emodb/table/db/astyanax/AstyanaxTableDAO.java#L557-L559
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.readXMLFragment
public static DocumentFragment readXMLFragment(Reader reader) throws IOException, SAXException, ParserConfigurationException { """ Read an XML fragment from an XML file. The XML file is well-formed. It means that the fragment will contains a single element: the root element within the input stream. @param ...
java
public static DocumentFragment readXMLFragment(Reader reader) throws IOException, SAXException, ParserConfigurationException { return readXMLFragment(reader, false); }
[ "public", "static", "DocumentFragment", "readXMLFragment", "(", "Reader", "reader", ")", "throws", "IOException", ",", "SAXException", ",", "ParserConfigurationException", "{", "return", "readXMLFragment", "(", "reader", ",", "false", ")", ";", "}" ]
Read an XML fragment from an XML file. The XML file is well-formed. It means that the fragment will contains a single element: the root element within the input stream. @param reader is the stream to read @return the fragment from the {@code reader}. @throws IOException if the stream cannot be read. @throws SAXExcepti...
[ "Read", "an", "XML", "fragment", "from", "an", "XML", "file", ".", "The", "XML", "file", "is", "well", "-", "formed", ".", "It", "means", "that", "the", "fragment", "will", "contains", "a", "single", "element", ":", "the", "root", "element", "within", ...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L2041-L2044
Azure/azure-sdk-for-java
cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java
AccountsInner.listKeysAsync
public Observable<CognitiveServicesAccountKeysInner> listKeysAsync(String resourceGroupName, String accountName) { """ Lists the account keys for the specified Cognitive Services account. @param resourceGroupName The name of the resource group within the user's subscription. @param accountName The name of Cogn...
java
public Observable<CognitiveServicesAccountKeysInner> listKeysAsync(String resourceGroupName, String accountName) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<CognitiveServicesAccountKeysInner>, CognitiveServicesAccountKeysInner>() { @Overrid...
[ "public", "Observable", "<", "CognitiveServicesAccountKeysInner", ">", "listKeysAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ")", "{", "return", "listKeysWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ")", ".", "map",...
Lists the account keys for the specified Cognitive Services account. @param resourceGroupName The name of the resource group within the user's subscription. @param accountName The name of Cognitive Services account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the...
[ "Lists", "the", "account", "keys", "for", "the", "specified", "Cognitive", "Services", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java#L832-L839
voldemort/voldemort
src/java/voldemort/utils/StoreDefinitionUtils.java
StoreDefinitionUtils.validateNewStoreDefsAreNonBreaking
public static void validateNewStoreDefsAreNonBreaking(List<StoreDefinition> oldStoreDefs, List<StoreDefinition> newStoreDefs) { """ Ensure that new store definitions that are specified for an update do not include breaking changes to the store. @param oldStoreDefs @param newStoreDefs """ Map<String, ...
java
public static void validateNewStoreDefsAreNonBreaking(List<StoreDefinition> oldStoreDefs, List<StoreDefinition> newStoreDefs){ Map<String, StoreDefinition> oldStoreMap = new HashMap<String, StoreDefinition>(); Map<String, StoreDefinition> newStoreMap = new HashMap<String, StoreDefinition>(); for...
[ "public", "static", "void", "validateNewStoreDefsAreNonBreaking", "(", "List", "<", "StoreDefinition", ">", "oldStoreDefs", ",", "List", "<", "StoreDefinition", ">", "newStoreDefs", ")", "{", "Map", "<", "String", ",", "StoreDefinition", ">", "oldStoreMap", "=", "...
Ensure that new store definitions that are specified for an update do not include breaking changes to the store. @param oldStoreDefs @param newStoreDefs
[ "Ensure", "that", "new", "store", "definitions", "that", "are", "specified", "for", "an", "update", "do", "not", "include", "breaking", "changes", "to", "the", "store", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/StoreDefinitionUtils.java#L263-L277
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java
XsdAsmInterfaces.getElementInterfaces
private String[] getElementInterfaces(XsdElement element, String apiName) { """ This method obtains the element interfaces which his class will be implementing. The interfaces are represented in {@link XsdAbstractElement} objects as {@link XsdGroup}, {@link XsdAll}, {@link XsdSequence} and {@link XsdChoice}. The...
java
private String[] getElementInterfaces(XsdElement element, String apiName){ XsdAbstractElement child = getElementInterfacesElement(element); List<String> interfaceNames = null; if (child != null){ List<InterfaceInfo> interfaceInfo = iterativeCreation(child, getCleanName(element), 0, ...
[ "private", "String", "[", "]", "getElementInterfaces", "(", "XsdElement", "element", ",", "String", "apiName", ")", "{", "XsdAbstractElement", "child", "=", "getElementInterfacesElement", "(", "element", ")", ";", "List", "<", "String", ">", "interfaceNames", "=",...
This method obtains the element interfaces which his class will be implementing. The interfaces are represented in {@link XsdAbstractElement} objects as {@link XsdGroup}, {@link XsdAll}, {@link XsdSequence} and {@link XsdChoice}. The respective methods of the interfaces will be the elements from the types enumerated pr...
[ "This", "method", "obtains", "the", "element", "interfaces", "which", "his", "class", "will", "be", "implementing", ".", "The", "interfaces", "are", "represented", "in", "{" ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L129-L139
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java
SparkUtils.readObjectFromFile
public static <T> T readObjectFromFile(String path, Class<T> type, JavaSparkContext sc) throws IOException { """ Read an object from HDFS (or local) using default Java object serialization @param path File to read @param type Class of the object to read @param sc Spark context @param <T> Type ...
java
public static <T> T readObjectFromFile(String path, Class<T> type, JavaSparkContext sc) throws IOException { return readObjectFromFile(path, type, sc.sc()); }
[ "public", "static", "<", "T", ">", "T", "readObjectFromFile", "(", "String", "path", ",", "Class", "<", "T", ">", "type", ",", "JavaSparkContext", "sc", ")", "throws", "IOException", "{", "return", "readObjectFromFile", "(", "path", ",", "type", ",", "sc",...
Read an object from HDFS (or local) using default Java object serialization @param path File to read @param type Class of the object to read @param sc Spark context @param <T> Type of the object to read
[ "Read", "an", "object", "from", "HDFS", "(", "or", "local", ")", "using", "default", "Java", "object", "serialization" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/utils/SparkUtils.java#L182-L184
b3log/latke
latke-core/src/main/java/org/b3log/latke/util/Locales.java
Locales.getLocale
public static Locale getLocale(final HttpServletRequest request) { """ Gets locale with the specified request. <p> By the following steps: <ol> <li>Gets from session of the specified request</li> <li>Gets from the specified request header</li> <li>Using {@link Latkes#getLocale() server configuration}</li> <...
java
public static Locale getLocale(final HttpServletRequest request) { Locale locale = null; // Gets from session final HttpSession session = request.getSession(false); if (session != null) { locale = (Locale) session.getAttribute(Keys.LOCALE); } if (null == lo...
[ "public", "static", "Locale", "getLocale", "(", "final", "HttpServletRequest", "request", ")", "{", "Locale", "locale", "=", "null", ";", "// Gets from session", "final", "HttpSession", "session", "=", "request", ".", "getSession", "(", "false", ")", ";", "if", ...
Gets locale with the specified request. <p> By the following steps: <ol> <li>Gets from session of the specified request</li> <li>Gets from the specified request header</li> <li>Using {@link Latkes#getLocale() server configuration}</li> </ol> @param request the specified request @return locale
[ "Gets", "locale", "with", "the", "specified", "request", ".", "<p", ">", "By", "the", "following", "steps", ":", "<ol", ">", "<li", ">", "Gets", "from", "session", "of", "the", "specified", "request<", "/", "li", ">", "<li", ">", "Gets", "from", "the",...
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/util/Locales.java#L87-L125
before/uadetector
modules/uadetector-core/src/main/java/net/sf/uadetector/parser/AbstractUserAgentStringParser.java
AbstractUserAgentStringParser.examineAsRobot
private static boolean examineAsRobot(final UserAgent.Builder builder, final Data data) { """ Examines the user agent string whether it is a robot. @param userAgent String of an user agent @param builder Builder for an user agent information @return {@code true} if it is a robot, otherwise {@code false} ...
java
private static boolean examineAsRobot(final UserAgent.Builder builder, final Data data) { boolean isRobot = false; VersionNumber version; for (final Robot robot : data.getRobots()) { if (robot.getUserAgentString().equals(builder.getUserAgentString())) { isRobot = true; robot.copyTo(builder); // tr...
[ "private", "static", "boolean", "examineAsRobot", "(", "final", "UserAgent", ".", "Builder", "builder", ",", "final", "Data", "data", ")", "{", "boolean", "isRobot", "=", "false", ";", "VersionNumber", "version", ";", "for", "(", "final", "Robot", "robot", "...
Examines the user agent string whether it is a robot. @param userAgent String of an user agent @param builder Builder for an user agent information @return {@code true} if it is a robot, otherwise {@code false}
[ "Examines", "the", "user", "agent", "string", "whether", "it", "is", "a", "robot", "." ]
train
https://github.com/before/uadetector/blob/215fb652723c52866572cff885f52a3fe67b9db5/modules/uadetector-core/src/main/java/net/sf/uadetector/parser/AbstractUserAgentStringParser.java#L83-L99
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java
CacheProviderWrapper.addAlias
@Override public void addAlias(Object key, Object[] aliasArray, boolean askPermission, boolean coordinate) { """ Adds an alias for the given key in the cache's mapping table. If the alias is already associated with another key, it will be changed to associate with the new key. @param key the key assoicated...
java
@Override public void addAlias(Object key, Object[] aliasArray, boolean askPermission, boolean coordinate) { final String methodName = "addAlias()"; if (this.featureSupport.isAliasSupported()) { if (tc.isDebugEnabled()) { Tr.debug(tc, methodName + " cacheName=" + cacheNam...
[ "@", "Override", "public", "void", "addAlias", "(", "Object", "key", ",", "Object", "[", "]", "aliasArray", ",", "boolean", "askPermission", ",", "boolean", "coordinate", ")", "{", "final", "String", "methodName", "=", "\"addAlias()\"", ";", "if", "(", "this...
Adds an alias for the given key in the cache's mapping table. If the alias is already associated with another key, it will be changed to associate with the new key. @param key the key assoicated with alias @param aliasArray the alias to use for lookups @param askPermission True implies that execution must ask the coor...
[ "Adds", "an", "alias", "for", "the", "given", "key", "in", "the", "cache", "s", "mapping", "table", ".", "If", "the", "alias", "is", "already", "associated", "with", "another", "key", "it", "will", "be", "changed", "to", "associate", "with", "the", "new"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/CacheProviderWrapper.java#L695-L706
hibernate/hibernate-ogm
neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java
EmbeddedNeo4jEntityQueries.findEntity
public Node findEntity(GraphDatabaseService executionEngine, Object[] columnValues) { """ Find the node corresponding to an entity. @param executionEngine the {@link GraphDatabaseService} used to run the query @param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()}...
java
public Node findEntity(GraphDatabaseService executionEngine, Object[] columnValues) { Map<String, Object> params = params( columnValues ); Result result = executionEngine.execute( getFindEntityQuery(), params ); return singleResult( result ); }
[ "public", "Node", "findEntity", "(", "GraphDatabaseService", "executionEngine", ",", "Object", "[", "]", "columnValues", ")", "{", "Map", "<", "String", ",", "Object", ">", "params", "=", "params", "(", "columnValues", ")", ";", "Result", "result", "=", "exe...
Find the node corresponding to an entity. @param executionEngine the {@link GraphDatabaseService} used to run the query @param columnValues the values in {@link org.hibernate.ogm.model.key.spi.EntityKey#getColumnValues()} @return the corresponding node
[ "Find", "the", "node", "corresponding", "to", "an", "entity", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/neo4j/src/main/java/org/hibernate/ogm/datastore/neo4j/embedded/dialect/impl/EmbeddedNeo4jEntityQueries.java#L79-L83
structurizr/java
structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java
DocumentationTemplate.addSection
public Section addSection(Container container, String title, File... files) throws IOException { """ Adds a section relating to a {@link Container} from one or more files. @param container the {@link Container} the documentation content relates to @param title the section title @param files ...
java
public Section addSection(Container container, String title, File... files) throws IOException { return add(container, title, files); }
[ "public", "Section", "addSection", "(", "Container", "container", ",", "String", "title", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "add", "(", "container", ",", "title", ",", "files", ")", ";", "}" ]
Adds a section relating to a {@link Container} from one or more files. @param container the {@link Container} the documentation content relates to @param title the section title @param files one or more File objects that point to the documentation content @return a documentation {@...
[ "Adds", "a", "section", "relating", "to", "a", "{", "@link", "Container", "}", "from", "one", "or", "more", "files", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/DocumentationTemplate.java#L100-L102
callstats-io/callstats.java
callstats-java-sdk/src/main/java/io/callstats/sdk/CallStats.java
CallStats.sendCallStatsBridgeStatusUpdate
public void sendCallStatsBridgeStatusUpdate(BridgeStatusInfo bridgeStatusInfo) { """ Send call stats bridge status update. @param bridgeStatusInfo the bridge status info """ if (!isInitialized()) { bridgeStatusInfoQueue.push(bridgeStatusInfo); return; } long epoch = System.currentTi...
java
public void sendCallStatsBridgeStatusUpdate(BridgeStatusInfo bridgeStatusInfo) { if (!isInitialized()) { bridgeStatusInfoQueue.push(bridgeStatusInfo); return; } long epoch = System.currentTimeMillis(); String token = getToken(); BridgeStatusUpdateMessage eventMessage = new Bridg...
[ "public", "void", "sendCallStatsBridgeStatusUpdate", "(", "BridgeStatusInfo", "bridgeStatusInfo", ")", "{", "if", "(", "!", "isInitialized", "(", ")", ")", "{", "bridgeStatusInfoQueue", ".", "push", "(", "bridgeStatusInfo", ")", ";", "return", ";", "}", "long", ...
Send call stats bridge status update. @param bridgeStatusInfo the bridge status info
[ "Send", "call", "stats", "bridge", "status", "update", "." ]
train
https://github.com/callstats-io/callstats.java/blob/04ec34f1490b75952ed90da706d59e311e2b44f1/callstats-java-sdk/src/main/java/io/callstats/sdk/CallStats.java#L194-L242
mlhartme/mork
src/main/java/net/oneandone/mork/classfile/InstructionEncoding.java
InstructionEncoding.read
public Instruction read(int opcode, Input src, int ofs) throws IOException { """ all opcodes except for tableswitch, lookupswitch and wide are considered "normal" """ switch (opcode) { case WIDE: return readWide(src, ofs); case TABLESWITCH: return readTableSwitch...
java
public Instruction read(int opcode, Input src, int ofs) throws IOException { switch (opcode) { case WIDE: return readWide(src, ofs); case TABLESWITCH: return readTableSwitch(src, ofs); case LOOKUPSWITCH: return readLookupSwitch(src, ofs); defau...
[ "public", "Instruction", "read", "(", "int", "opcode", ",", "Input", "src", ",", "int", "ofs", ")", "throws", "IOException", "{", "switch", "(", "opcode", ")", "{", "case", "WIDE", ":", "return", "readWide", "(", "src", ",", "ofs", ")", ";", "case", ...
all opcodes except for tableswitch, lookupswitch and wide are considered "normal"
[ "all", "opcodes", "except", "for", "tableswitch", "lookupswitch", "and", "wide", "are", "considered", "normal" ]
train
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/classfile/InstructionEncoding.java#L43-L54
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java
Feature.setManyToOneAttribute
public void setManyToOneAttribute(String name, AssociationValue value) { """ Set attribute value of given type. @param name attribute name @param value attribute value """ Attribute attribute = getAttributes().get(name); if (!(attribute instanceof ManyToOneAttribute)) { throw new IllegalStateExcepti...
java
public void setManyToOneAttribute(String name, AssociationValue value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof ManyToOneAttribute)) { throw new IllegalStateException("Cannot set manyToOne value on attribute with different type, " + attribute.getClass().getName() + " set...
[ "public", "void", "setManyToOneAttribute", "(", "String", "name", ",", "AssociationValue", "value", ")", "{", "Attribute", "attribute", "=", "getAttributes", "(", ")", ".", "get", "(", "name", ")", ";", "if", "(", "!", "(", "attribute", "instanceof", "ManyTo...
Set attribute value of given type. @param name attribute name @param value attribute value
[ "Set", "attribute", "value", "of", "given", "type", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java#L380-L387
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.verifyFactor
public Boolean verifyFactor(long userId, long deviceId, String otpToken) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Authenticates a one-time password (OTP) code provided by a multifactor authentication (MFA) device. @param userId The id of the user. @param deviceId The id of...
java
public Boolean verifyFactor(long userId, long deviceId, String otpToken) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return verifyFactor(userId, deviceId, otpToken, null); }
[ "public", "Boolean", "verifyFactor", "(", "long", "userId", ",", "long", "deviceId", ",", "String", "otpToken", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "return", "verifyFactor", "(", "userId", ",", "device...
Authenticates a one-time password (OTP) code provided by a multifactor authentication (MFA) device. @param userId The id of the user. @param deviceId The id of the MFA device. @param otpToken OTP code provided by the device or SMS message sent to user. When a device like OneLogin Protect that supports Push has been us...
[ "Authenticates", "a", "one", "-", "time", "password", "(", "OTP", ")", "code", "provided", "by", "a", "multifactor", "authentication", "(", "MFA", ")", "device", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2897-L2900
fengwenyi/JavaLib
src/main/java/com/fengwenyi/javalib/util/RSAUtil.java
RSAUtil.verify
public static boolean verify(String content, String signature, String algorithm, String publicKey, String charset) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, SignatureException, UnsupportedEncodingException { """ 验证签名 @param content 签名的内容 @param signatu...
java
public static boolean verify(String content, String signature, String algorithm, String publicKey, String charset) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, SignatureException, UnsupportedEncodingException { Signature signTool = Signature.getInstance(...
[ "public", "static", "boolean", "verify", "(", "String", "content", ",", "String", "signature", ",", "String", "algorithm", ",", "String", "publicKey", ",", "String", "charset", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "InvalidK...
验证签名 @param content 签名的内容 @param signature 签名 @param algorithm 签名算法 @param publicKey 公钥 @param charset 当签名内容为中文时,你可能需要指定编码 @return 该签名是否和内容匹配 @throws NoSuchAlgorithmException 签名算法异常 @throws InvalidKeySpecException 密钥格式不正确 @throws InvalidKeyException 密钥异常 @throws SignatureException 签名异常 @throws UnsupportedEncodingExcept...
[ "验证签名" ]
train
https://github.com/fengwenyi/JavaLib/blob/14838b13fb11c024e41be766aa3e13ead4be1703/src/main/java/com/fengwenyi/javalib/util/RSAUtil.java#L233-L245
Stratio/stratio-cassandra
src/java/org/apache/cassandra/hadoop/ConfigHelper.java
ConfigHelper.setInputRange
public static void setInputRange(Configuration conf, String startToken, String endToken) { """ Set the KeyRange to limit the rows. @param conf Job configuration you are about to run """ KeyRange range = new KeyRange().setStart_token(startToken).setEnd_token(endToken); conf.set(INPUT_KEYRANGE_C...
java
public static void setInputRange(Configuration conf, String startToken, String endToken) { KeyRange range = new KeyRange().setStart_token(startToken).setEnd_token(endToken); conf.set(INPUT_KEYRANGE_CONFIG, thriftToString(range)); }
[ "public", "static", "void", "setInputRange", "(", "Configuration", "conf", ",", "String", "startToken", ",", "String", "endToken", ")", "{", "KeyRange", "range", "=", "new", "KeyRange", "(", ")", ".", "setStart_token", "(", "startToken", ")", ".", "setEnd_toke...
Set the KeyRange to limit the rows. @param conf Job configuration you are about to run
[ "Set", "the", "KeyRange", "to", "limit", "the", "rows", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/hadoop/ConfigHelper.java#L244-L248
deeplearning4j/deeplearning4j
nd4j/nd4j-parameter-server-parent/nd4j-parameter-server-node/src/main/java/org/nd4j/parameterserver/distributed/VoidParameterServer.java
VoidParameterServer.getVector
public INDArray getVector(@NonNull Integer key, int rowIdx) { """ This method returns INDArray matching requested storageId value PLEASE NOTE: This method IS blocking @param rowIdx @return """ /** * we create VoidMessage, send it, and block until it gets responded */ V...
java
public INDArray getVector(@NonNull Integer key, int rowIdx) { /** * we create VoidMessage, send it, and block until it gets responded */ VectorRequestMessage message = new VectorRequestMessage(key, rowIdx); MeaningfulMessage response = transport.sendMessageAndGetResponse(mess...
[ "public", "INDArray", "getVector", "(", "@", "NonNull", "Integer", "key", ",", "int", "rowIdx", ")", "{", "/**\n * we create VoidMessage, send it, and block until it gets responded\n */", "VectorRequestMessage", "message", "=", "new", "VectorRequestMessage", "("...
This method returns INDArray matching requested storageId value PLEASE NOTE: This method IS blocking @param rowIdx @return
[ "This", "method", "returns", "INDArray", "matching", "requested", "storageId", "value" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-parameter-server-parent/nd4j-parameter-server-node/src/main/java/org/nd4j/parameterserver/distributed/VoidParameterServer.java#L516-L526
hawkular/hawkular-inventory
hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/filters/Related.java
Related.asTargetBy
public static Related asTargetBy(Relationships.WellKnown relationship) { """ Overloaded version of {@link #asTargetBy(String)} that uses the {@link org.hawkular.inventory.api.Relationships.WellKnown} as the name of the relationship. @param relationship the type of the relationship @return a new "related" filt...
java
public static Related asTargetBy(Relationships.WellKnown relationship) { return new Related(null, relationship.name(), EntityRole.TARGET); }
[ "public", "static", "Related", "asTargetBy", "(", "Relationships", ".", "WellKnown", "relationship", ")", "{", "return", "new", "Related", "(", "null", ",", "relationship", ".", "name", "(", ")", ",", "EntityRole", ".", "TARGET", ")", ";", "}" ]
Overloaded version of {@link #asTargetBy(String)} that uses the {@link org.hawkular.inventory.api.Relationships.WellKnown} as the name of the relationship. @param relationship the type of the relationship @return a new "related" filter instance
[ "Overloaded", "version", "of", "{", "@link", "#asTargetBy", "(", "String", ")", "}", "that", "uses", "the", "{", "@link", "org", ".", "hawkular", ".", "inventory", ".", "api", ".", "Relationships", ".", "WellKnown", "}", "as", "the", "name", "of", "the",...
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/filters/Related.java#L134-L136
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.identity
public static <T> T identity(Object self, Closure<T> closure) { """ Allows the closure to be called for the object reference self. Synonym for 'with()'. @param self the object to have a closure act upon @param closure the closure to call on the object @return result of calling the closure @since 1.0 ...
java
public static <T> T identity(Object self, Closure<T> closure) { return DefaultGroovyMethods.with(self, closure); }
[ "public", "static", "<", "T", ">", "T", "identity", "(", "Object", "self", ",", "Closure", "<", "T", ">", "closure", ")", "{", "return", "DefaultGroovyMethods", ".", "with", "(", "self", ",", "closure", ")", ";", "}" ]
Allows the closure to be called for the object reference self. Synonym for 'with()'. @param self the object to have a closure act upon @param closure the closure to call on the object @return result of calling the closure @since 1.0
[ "Allows", "the", "closure", "to", "be", "called", "for", "the", "object", "reference", "self", ".", "Synonym", "for", "with", "()", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L198-L200
spotbugs/spotbugs
eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java
MarkerRulerAction.includesRulerLine
protected boolean includesRulerLine(Position position, IDocument document) { """ Checks a Position in a document to see whether the line of last mouse activity falls within this region. @param position Position of the marker @param document the Document the marker resides in @return true if the last mouse ...
java
protected boolean includesRulerLine(Position position, IDocument document) { if (position != null && ruler != null) { try { int markerLine = document.getLineOfOffset(position.getOffset()); int line = ruler.getLineOfLastMouseButtonActivity(); if (line =...
[ "protected", "boolean", "includesRulerLine", "(", "Position", "position", ",", "IDocument", "document", ")", "{", "if", "(", "position", "!=", "null", "&&", "ruler", "!=", "null", ")", "{", "try", "{", "int", "markerLine", "=", "document", ".", "getLineOfOff...
Checks a Position in a document to see whether the line of last mouse activity falls within this region. @param position Position of the marker @param document the Document the marker resides in @return true if the last mouse click falls on the same line as the marker
[ "Checks", "a", "Position", "in", "a", "document", "to", "see", "whether", "the", "line", "of", "last", "mouse", "activity", "falls", "within", "this", "region", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java#L194-L207
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/util/Misc.java
Misc.checkNotNullOrEmpty
public static void checkNotNullOrEmpty(String param, String errorMessagePrefix) throws IllegalArgumentException { """ Check that a string parameter is not null or empty and throw IllegalArgumentException with a message of errorMessagePrefix + " must not be empty." if it is empty, defaulting to "Param...
java
public static void checkNotNullOrEmpty(String param, String errorMessagePrefix) throws IllegalArgumentException { checkNotNull(param, errorMessagePrefix); checkArgument(!param.isEmpty(), (errorMessagePrefix != null ? errorMessagePrefix : "Parameter") + " must not be empty.");...
[ "public", "static", "void", "checkNotNullOrEmpty", "(", "String", "param", ",", "String", "errorMessagePrefix", ")", "throws", "IllegalArgumentException", "{", "checkNotNull", "(", "param", ",", "errorMessagePrefix", ")", ";", "checkArgument", "(", "!", "param", "."...
Check that a string parameter is not null or empty and throw IllegalArgumentException with a message of errorMessagePrefix + " must not be empty." if it is empty, defaulting to "Parameter must not be empty". @param param the string to check @param errorMessagePrefix the prefix of the error message to use ...
[ "Check", "that", "a", "string", "parameter", "is", "not", "null", "or", "empty", "and", "throw", "IllegalArgumentException", "with", "a", "message", "of", "errorMessagePrefix", "+", "must", "not", "be", "empty", ".", "if", "it", "is", "empty", "defaulting", ...
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/util/Misc.java#L111-L116
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.truncatedCompareTo
public static int truncatedCompareTo(final Calendar cal1, final Calendar cal2, final int field) { """ Copied from Apache Commons Lang under Apache License v2. <br /> Determines how two calendars compare up to no more than the specified most significant field. @param cal1 the first calendar, not <code>null<...
java
public static int truncatedCompareTo(final Calendar cal1, final Calendar cal2, final int field) { return truncate(cal1, field).compareTo(truncate(cal2, field)); }
[ "public", "static", "int", "truncatedCompareTo", "(", "final", "Calendar", "cal1", ",", "final", "Calendar", "cal2", ",", "final", "int", "field", ")", "{", "return", "truncate", "(", "cal1", ",", "field", ")", ".", "compareTo", "(", "truncate", "(", "cal2...
Copied from Apache Commons Lang under Apache License v2. <br /> Determines how two calendars compare up to no more than the specified most significant field. @param cal1 the first calendar, not <code>null</code> @param cal2 the second calendar, not <code>null</code> @param field the field from {@code Calendar} @retur...
[ "Copied", "from", "Apache", "Commons", "Lang", "under", "Apache", "License", "v2", ".", "<br", "/", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L1581-L1583
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/StreamValueData.java
StreamValueData.readFromFile
protected long readFromFile(OutputStream stream, File file, long length, long position) throws IOException { """ Read <code>length</code> bytes from the binary value at <code>position</code> to the <code>stream</code>. """ FileInputStream in = null; try { if (channel == null || !ch...
java
protected long readFromFile(OutputStream stream, File file, long length, long position) throws IOException { FileInputStream in = null; try { if (channel == null || !channel.isOpen()) { in = PrivilegedFileHelper.fileInputStream(file); channel = in.getChann...
[ "protected", "long", "readFromFile", "(", "OutputStream", "stream", ",", "File", "file", ",", "long", "length", ",", "long", "position", ")", "throws", "IOException", "{", "FileInputStream", "in", "=", "null", ";", "try", "{", "if", "(", "channel", "==", "...
Read <code>length</code> bytes from the binary value at <code>position</code> to the <code>stream</code>.
[ "Read", "<code", ">", "length<", "/", "code", ">", "bytes", "from", "the", "binary", "value", "at", "<code", ">", "position<", "/", "code", ">", "to", "the", "<code", ">", "stream<", "/", "code", ">", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/StreamValueData.java#L177-L210
looly/hutool
hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java
SecureUtil.generateSignature
public static Signature generateSignature(AsymmetricAlgorithm asymmetricAlgorithm, DigestAlgorithm digestAlgorithm) { """ 生成签名对象,仅用于非对称加密 @param asymmetricAlgorithm {@link AsymmetricAlgorithm} 非对称加密算法 @param digestAlgorithm {@link DigestAlgorithm} 摘要算法 @return {@link Signature} """ try { return Sig...
java
public static Signature generateSignature(AsymmetricAlgorithm asymmetricAlgorithm, DigestAlgorithm digestAlgorithm) { try { return Signature.getInstance(generateAlgorithm(asymmetricAlgorithm, digestAlgorithm)); } catch (NoSuchAlgorithmException e) { throw new CryptoException(e); } }
[ "public", "static", "Signature", "generateSignature", "(", "AsymmetricAlgorithm", "asymmetricAlgorithm", ",", "DigestAlgorithm", "digestAlgorithm", ")", "{", "try", "{", "return", "Signature", ".", "getInstance", "(", "generateAlgorithm", "(", "asymmetricAlgorithm", ",", ...
生成签名对象,仅用于非对称加密 @param asymmetricAlgorithm {@link AsymmetricAlgorithm} 非对称加密算法 @param digestAlgorithm {@link DigestAlgorithm} 摘要算法 @return {@link Signature}
[ "生成签名对象,仅用于非对称加密" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-crypto/src/main/java/cn/hutool/crypto/SecureUtil.java#L289-L295
MenoData/Time4J
base/src/main/java/net/time4j/PlainDate.java
PlainDate.doAdd
static PlainDate doAdd( CalendarUnit unit, PlainDate context, long amount, int policy ) { """ <p>Additionsmethode. </p> @param unit calendar unit @param context calendar date @param amount amount to be added @param policy overflow policy @retu...
java
static PlainDate doAdd( CalendarUnit unit, PlainDate context, long amount, int policy ) { switch (unit) { case MILLENNIA: return doAdd( CalendarUnit.MONTHS, context, MathUtils.safeMultipl...
[ "static", "PlainDate", "doAdd", "(", "CalendarUnit", "unit", ",", "PlainDate", "context", ",", "long", "amount", ",", "int", "policy", ")", "{", "switch", "(", "unit", ")", "{", "case", "MILLENNIA", ":", "return", "doAdd", "(", "CalendarUnit", ".", "MONTHS...
<p>Additionsmethode. </p> @param unit calendar unit @param context calendar date @param amount amount to be added @param policy overflow policy @return result of addition
[ "<p", ">", "Additionsmethode", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/PlainDate.java#L1742-L1800
google/error-prone
check_api/src/main/java/com/google/errorprone/matchers/Matchers.java
Matchers.isField
public static Matcher<VariableTree> isField() { """ Matches if a {@link VariableTree} is a field declaration, as opposed to a local variable, enum constant, parameter to a method, etc. """ return new Matcher<VariableTree>() { @Override public boolean matches(VariableTree variableTree, VisitorS...
java
public static Matcher<VariableTree> isField() { return new Matcher<VariableTree>() { @Override public boolean matches(VariableTree variableTree, VisitorState state) { Element element = ASTHelpers.getSymbol(variableTree); return element.getKind() == ElementKind.FIELD; } }; }
[ "public", "static", "Matcher", "<", "VariableTree", ">", "isField", "(", ")", "{", "return", "new", "Matcher", "<", "VariableTree", ">", "(", ")", "{", "@", "Override", "public", "boolean", "matches", "(", "VariableTree", "variableTree", ",", "VisitorState", ...
Matches if a {@link VariableTree} is a field declaration, as opposed to a local variable, enum constant, parameter to a method, etc.
[ "Matches", "if", "a", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L1099-L1107
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/documentstore/DatabaseImpl.java
DatabaseImpl.attachmentsForRevision
public Map<String, ? extends Attachment> attachmentsForRevision(final InternalDocumentRevision rev) throws AttachmentException { """ <p>Returns all attachments for the revision.</p> <p>Used by replicator when pushing attachments</p> @param rev The revision with which the attachments are associate...
java
public Map<String, ? extends Attachment> attachmentsForRevision(final InternalDocumentRevision rev) throws AttachmentException { try { return get(queue.submit(new SQLCallable<Map<String, ? extends Attachment>>() { @Override public Map<String, ? extends At...
[ "public", "Map", "<", "String", ",", "?", "extends", "Attachment", ">", "attachmentsForRevision", "(", "final", "InternalDocumentRevision", "rev", ")", "throws", "AttachmentException", "{", "try", "{", "return", "get", "(", "queue", ".", "submit", "(", "new", ...
<p>Returns all attachments for the revision.</p> <p>Used by replicator when pushing attachments</p> @param rev The revision with which the attachments are associated @return List of <code>Attachment</code> @throws AttachmentException if there was an error reading the attachment metadata from the database
[ "<p", ">", "Returns", "all", "attachments", "for", "the", "revision", ".", "<", "/", "p", ">" ]
train
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/documentstore/DatabaseImpl.java#L855-L871
albfernandez/itext2
src/main/java/com/lowagie/text/SimpleTable.java
SimpleTable.addElement
public void addElement(SimpleCell element) throws BadElementException { """ Adds content to this object. @param element @throws BadElementException """ if(!element.isCellgroup()) { throw new BadElementException("You can't add cells to a table directly, add them to a row first."); } content.add(eleme...
java
public void addElement(SimpleCell element) throws BadElementException { if(!element.isCellgroup()) { throw new BadElementException("You can't add cells to a table directly, add them to a row first."); } content.add(element); }
[ "public", "void", "addElement", "(", "SimpleCell", "element", ")", "throws", "BadElementException", "{", "if", "(", "!", "element", ".", "isCellgroup", "(", ")", ")", "{", "throw", "new", "BadElementException", "(", "\"You can't add cells to a table directly, add them...
Adds content to this object. @param element @throws BadElementException
[ "Adds", "content", "to", "this", "object", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/SimpleTable.java#L92-L97
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/routes/InternalRoute.java
InternalRoute.getPathParametersEncoded
public Map<String, String> getPathParametersEncoded(String requestUri) { """ This method does not do any decoding / encoding. If you want to decode you have to do it yourself. {@linkplain URLCodec} @param requestUri The whole encoded uri. @return A map with all parameters of that uri. Encoded in => encod...
java
public Map<String, String> getPathParametersEncoded(String requestUri) { Matcher m = regex.matcher(requestUri); return mapParametersFromPath(requestUri, parameters, m); }
[ "public", "Map", "<", "String", ",", "String", ">", "getPathParametersEncoded", "(", "String", "requestUri", ")", "{", "Matcher", "m", "=", "regex", ".", "matcher", "(", "requestUri", ")", ";", "return", "mapParametersFromPath", "(", "requestUri", ",", "parame...
This method does not do any decoding / encoding. If you want to decode you have to do it yourself. {@linkplain URLCodec} @param requestUri The whole encoded uri. @return A map with all parameters of that uri. Encoded in => encoded out.
[ "This", "method", "does", "not", "do", "any", "decoding", "/", "encoding", "." ]
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/routes/InternalRoute.java#L58-L63
jhalterman/lyra
src/main/java/net/jodah/lyra/ConnectionOptions.java
ConnectionOptions.getAddresses
public Address[] getAddresses() { """ Returns the addresses to attempt connections to, in round-robin order. @see #withAddresses(Address...) @see #withAddresses(String) @see #withHost(String) @see #withHosts(String...) """ if (addresses != null) return addresses; if (hosts != null) { ...
java
public Address[] getAddresses() { if (addresses != null) return addresses; if (hosts != null) { addresses = new Address[hosts.length]; for (int i = 0; i < hosts.length; i++) addresses[i] = new Address(hosts[i], factory.getPort()); return addresses; } Address address = f...
[ "public", "Address", "[", "]", "getAddresses", "(", ")", "{", "if", "(", "addresses", "!=", "null", ")", "return", "addresses", ";", "if", "(", "hosts", "!=", "null", ")", "{", "addresses", "=", "new", "Address", "[", "hosts", ".", "length", "]", ";"...
Returns the addresses to attempt connections to, in round-robin order. @see #withAddresses(Address...) @see #withAddresses(String) @see #withHost(String) @see #withHosts(String...)
[ "Returns", "the", "addresses", "to", "attempt", "connections", "to", "in", "round", "-", "robin", "order", "." ]
train
https://github.com/jhalterman/lyra/blob/ce347a69357fef1b34e92d92a4f9e68792d81255/src/main/java/net/jodah/lyra/ConnectionOptions.java#L110-L124
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
Gen.completeBinop
Item completeBinop(JCTree lhs, JCTree rhs, OperatorSymbol operator) { """ Complete generating code for operation, with left operand already on stack. @param lhs The tree representing the left operand. @param rhs The tree representing the right operand. @param operator The operator symbol. """ ...
java
Item completeBinop(JCTree lhs, JCTree rhs, OperatorSymbol operator) { MethodType optype = (MethodType)operator.type; int opcode = operator.opcode; if (opcode >= if_icmpeq && opcode <= if_icmple && rhs.type.constValue() instanceof Number && ((Number) rh...
[ "Item", "completeBinop", "(", "JCTree", "lhs", ",", "JCTree", "rhs", ",", "OperatorSymbol", "operator", ")", "{", "MethodType", "optype", "=", "(", "MethodType", ")", "operator", ".", "type", ";", "int", "opcode", "=", "operator", ".", "opcode", ";", "if",...
Complete generating code for operation, with left operand already on stack. @param lhs The tree representing the left operand. @param rhs The tree representing the right operand. @param operator The operator symbol.
[ "Complete", "generating", "code", "for", "operation", "with", "left", "operand", "already", "on", "stack", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java#L1953-L1989
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/DataSynchronizer.java
DataSynchronizer.deleteOne
DeleteResult deleteOne(final MongoNamespace namespace, final Bson filter) { """ Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified. @param filter the query filter to apply the the delete operation @return the result of the re...
java
DeleteResult deleteOne(final MongoNamespace namespace, final Bson filter) { this.waitUntilInitialized(); try { ongoingOperationsGroup.enter(); final ChangeEvent<BsonDocument> event; final DeleteResult result; final NamespaceSynchronizationConfig nsConfig = this.syncConfig.getN...
[ "DeleteResult", "deleteOne", "(", "final", "MongoNamespace", "namespace", ",", "final", "Bson", "filter", ")", "{", "this", ".", "waitUntilInitialized", "(", ")", ";", "try", "{", "ongoingOperationsGroup", ".", "enter", "(", ")", ";", "final", "ChangeEvent", "...
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified. @param filter the query filter to apply the the delete operation @return the result of the remove one operation
[ "Removes", "at", "most", "one", "document", "from", "the", "collection", "that", "matches", "the", "given", "filter", ".", "If", "no", "documents", "match", "the", "collection", "is", "not", "modified", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/sync/internal/DataSynchronizer.java#L2715-L2773
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/registry/OperationTransformerRegistry.java
OperationTransformerRegistry.mergeSubsystem
public void mergeSubsystem(final GlobalTransformerRegistry registry, String subsystemName, ModelVersion version) { """ Merge a new subsystem from the global registration. @param registry the global registry @param subsystemName the subsystem name @param version the subsystem version """ final Path...
java
public void mergeSubsystem(final GlobalTransformerRegistry registry, String subsystemName, ModelVersion version) { final PathElement element = PathElement.pathElement(SUBSYSTEM, subsystemName); registry.mergeSubtree(this, PathAddress.EMPTY_ADDRESS.append(element), version); }
[ "public", "void", "mergeSubsystem", "(", "final", "GlobalTransformerRegistry", "registry", ",", "String", "subsystemName", ",", "ModelVersion", "version", ")", "{", "final", "PathElement", "element", "=", "PathElement", ".", "pathElement", "(", "SUBSYSTEM", ",", "su...
Merge a new subsystem from the global registration. @param registry the global registry @param subsystemName the subsystem name @param version the subsystem version
[ "Merge", "a", "new", "subsystem", "from", "the", "global", "registration", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/registry/OperationTransformerRegistry.java#L124-L127
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/MergedClass.java
MergedClass.getConstructor2
public static Constructor<?> getConstructor2(ClassInjector injector, Class<?>[] classes, String[] prefixes, int observerMode) throws IllegalArgumentException { "...
java
public static Constructor<?> getConstructor2(ClassInjector injector, Class<?>[] classes, String[] prefixes, int observerMode) throws IllegalArgumentException { ...
[ "public", "static", "Constructor", "<", "?", ">", "getConstructor2", "(", "ClassInjector", "injector", ",", "Class", "<", "?", ">", "[", "]", "classes", ",", "String", "[", "]", "prefixes", ",", "int", "observerMode", ")", "throws", "IllegalArgumentException",...
Returns the constructor for a class that merges all of the given source classes. The constructor accepts one parameter type: an {@link InstanceFactory}. Merged instances are requested only when first needed. An IllegalArgumentException is thrown if any of the given conditions are not satisfied: <ul> <li>None of the gi...
[ "Returns", "the", "constructor", "for", "a", "class", "that", "merges", "all", "of", "the", "given", "source", "classes", ".", "The", "constructor", "accepts", "one", "parameter", "type", ":", "an", "{", "@link", "InstanceFactory", "}", ".", "Merged", "insta...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/MergedClass.java#L382-L389
auth0/java-jwt
lib/src/main/java/com/auth0/jwt/impl/JsonNodeClaim.java
JsonNodeClaim.claimFromNode
static Claim claimFromNode(JsonNode node, ObjectReader objectReader) { """ Helper method to create a Claim representation from the given JsonNode. @param node the JsonNode to convert into a Claim. @return a valid Claim instance. If the node is null or missing, a NullClaim will be returned. """ if (...
java
static Claim claimFromNode(JsonNode node, ObjectReader objectReader) { if (node == null || node.isNull() || node.isMissingNode()) { return new NullClaim(); } return new JsonNodeClaim(node, objectReader); }
[ "static", "Claim", "claimFromNode", "(", "JsonNode", "node", ",", "ObjectReader", "objectReader", ")", "{", "if", "(", "node", "==", "null", "||", "node", ".", "isNull", "(", ")", "||", "node", ".", "isMissingNode", "(", ")", ")", "{", "return", "new", ...
Helper method to create a Claim representation from the given JsonNode. @param node the JsonNode to convert into a Claim. @return a valid Claim instance. If the node is null or missing, a NullClaim will be returned.
[ "Helper", "method", "to", "create", "a", "Claim", "representation", "from", "the", "given", "JsonNode", "." ]
train
https://github.com/auth0/java-jwt/blob/890538970a9699b7251a4bfe4f26e8d7605ad530/lib/src/main/java/com/auth0/jwt/impl/JsonNodeClaim.java#L149-L154
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ManagedInstancesInner.java
ManagedInstancesInner.beginUpdateAsync
public Observable<ManagedInstanceInner> beginUpdateAsync(String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters) { """ Updates a managed instance. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource...
java
public Observable<ManagedInstanceInner> beginUpdateAsync(String resourceGroupName, String managedInstanceName, ManagedInstanceUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, parameters).map(new Func1<ServiceResponse<ManagedInstanceInner>, ManagedInstanceIn...
[ "public", "Observable", "<", "ManagedInstanceInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "ManagedInstanceUpdate", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupNa...
Updates a managed instance. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param managedInstanceName The name of the managed instance. @param parameters The requested managed instance resource state. @thr...
[ "Updates", "a", "managed", "instance", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ManagedInstancesInner.java#L866-L873
apache/incubator-gobblin
gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/filesystem/MetricsFileSystemInstrumentation.java
MetricsFileSystemInstrumentation.setOwner
public void setOwner(Path f, String user, String group) throws IOException { """ Add timer metrics to {@link DistributedFileSystem#setOwner(Path, String, String)} """ try (Closeable context = new TimerContextWithLog(this.setOwnerTimer.time(), "setOwner", f, user, group)) { super.setOwner(f, user, gro...
java
public void setOwner(Path f, String user, String group) throws IOException { try (Closeable context = new TimerContextWithLog(this.setOwnerTimer.time(), "setOwner", f, user, group)) { super.setOwner(f, user, group); } }
[ "public", "void", "setOwner", "(", "Path", "f", ",", "String", "user", ",", "String", "group", ")", "throws", "IOException", "{", "try", "(", "Closeable", "context", "=", "new", "TimerContextWithLog", "(", "this", ".", "setOwnerTimer", ".", "time", "(", ")...
Add timer metrics to {@link DistributedFileSystem#setOwner(Path, String, String)}
[ "Add", "timer", "metrics", "to", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/filesystem/MetricsFileSystemInstrumentation.java#L289-L293
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.createPattern
public PdfPatternPainter createPattern(float width, float height, Color color) { """ Create a new uncolored tiling pattern. Variables xstep and ystep are set to the same values of width and height. @param width the width of the pattern @param height the height of the pattern @param color the default color. Ca...
java
public PdfPatternPainter createPattern(float width, float height, Color color) { return createPattern(width, height, width, height, color); }
[ "public", "PdfPatternPainter", "createPattern", "(", "float", "width", ",", "float", "height", ",", "Color", "color", ")", "{", "return", "createPattern", "(", "width", ",", "height", ",", "width", ",", "height", ",", "color", ")", ";", "}" ]
Create a new uncolored tiling pattern. Variables xstep and ystep are set to the same values of width and height. @param width the width of the pattern @param height the height of the pattern @param color the default color. Can be <CODE>null</CODE> @return the <CODE>PdfPatternPainter</CODE> where the pattern will be cre...
[ "Create", "a", "new", "uncolored", "tiling", "pattern", ".", "Variables", "xstep", "and", "ystep", "are", "set", "to", "the", "same", "values", "of", "width", "and", "height", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L1976-L1978
alibaba/Tangram-Android
tangram/src/main/java/com/tmall/wireless/tangram/TangramBuilder.java
TangramBuilder.newInnerBuilder
@NonNull public static InnerBuilder newInnerBuilder(@NonNull final Context context) { """ init a {@link TangramEngine} builder with build-in resource inited, such as registering build-in card and cell. Users use this builder to regiser custom card and cell, then call {@link InnerBuilder#build()} to create a {@...
java
@NonNull public static InnerBuilder newInnerBuilder(@NonNull final Context context) { if (!TangramBuilder.isInitialized()) { throw new IllegalStateException("Tangram must be init first"); } DefaultResolverRegistry registry = new DefaultResolverRegistry(); // install def...
[ "@", "NonNull", "public", "static", "InnerBuilder", "newInnerBuilder", "(", "@", "NonNull", "final", "Context", "context", ")", "{", "if", "(", "!", "TangramBuilder", ".", "isInitialized", "(", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Ta...
init a {@link TangramEngine} builder with build-in resource inited, such as registering build-in card and cell. Users use this builder to regiser custom card and cell, then call {@link InnerBuilder#build()} to create a {@link TangramEngine} instance. @param context activity context @return a {@link TangramEngine} build...
[ "init", "a", "{" ]
train
https://github.com/alibaba/Tangram-Android/blob/caa57f54e009c8dacd34a2322d5761956ebed321/tangram/src/main/java/com/tmall/wireless/tangram/TangramBuilder.java#L353-L365
paypal/SeLion
server/src/main/java/com/paypal/selion/grid/FileDownloader.java
FileDownloader.downloadFile
static String downloadFile(String artifactUrl, String checksum) { """ Download a file from the specified url @param artifactUrl url of the file to be downloaded. @param checksum checksum to downloaded file. @return the downloaded file path. """ LOGGER.entering(new Object[] { artifactUrl, checksu...
java
static String downloadFile(String artifactUrl, String checksum) { LOGGER.entering(new Object[] { artifactUrl, checksum }); Preconditions.checkArgument(StringUtils.isNotBlank(artifactUrl), "Invalid URL: Cannot be null or empty"); Preconditions.checkArgument(StringUtils.isNotBlank(checksum), "Inva...
[ "static", "String", "downloadFile", "(", "String", "artifactUrl", ",", "String", "checksum", ")", "{", "LOGGER", ".", "entering", "(", "new", "Object", "[", "]", "{", "artifactUrl", ",", "checksum", "}", ")", ";", "Preconditions", ".", "checkArgument", "(", ...
Download a file from the specified url @param artifactUrl url of the file to be downloaded. @param checksum checksum to downloaded file. @return the downloaded file path.
[ "Download", "a", "file", "from", "the", "specified", "url" ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/FileDownloader.java#L292-L307
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/spi/impl/proxyservice/impl/ProxyRegistry.java
ProxyRegistry.destroyProxy
void destroyProxy(String name, boolean publishEvent) { """ Destroys a proxy. @param name The name of the proxy to destroy. @param publishEvent true if this destroy should be published. """ final DistributedObjectFuture proxyFuture = proxies.remove(name); if (proxyFuture == null) { ...
java
void destroyProxy(String name, boolean publishEvent) { final DistributedObjectFuture proxyFuture = proxies.remove(name); if (proxyFuture == null) { return; } DistributedObject proxy; try { proxy = proxyFuture.get(); } catch (Throwable t) { ...
[ "void", "destroyProxy", "(", "String", "name", ",", "boolean", "publishEvent", ")", "{", "final", "DistributedObjectFuture", "proxyFuture", "=", "proxies", ".", "remove", "(", "name", ")", ";", "if", "(", "proxyFuture", "==", "null", ")", "{", "return", ";",...
Destroys a proxy. @param name The name of the proxy to destroy. @param publishEvent true if this destroy should be published.
[ "Destroys", "a", "proxy", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/proxyservice/impl/ProxyRegistry.java#L251-L273
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/dataset/CleanableHiveDataset.java
CleanableHiveDataset.clean
@Override public void clean() throws IOException { """ Drops the partitions selected by {@link #hiveSelectionPolicy}. Also deletes the data associated with it. <p> If an {@link Exception} occurs while processing a {@link Partition}, other {@link Partition}s will still be deleted. However, a {@link RuntimeExce...
java
@Override public void clean() throws IOException { List versions = Lists.newArrayList(this.hiveDatasetVersionFinder.findDatasetVersions(this)); if (versions.isEmpty()) { log.warn(String.format("No dataset version can be found. Ignoring %s", this.getTable().getCompleteName())); return; } ...
[ "@", "Override", "public", "void", "clean", "(", ")", "throws", "IOException", "{", "List", "versions", "=", "Lists", ".", "newArrayList", "(", "this", ".", "hiveDatasetVersionFinder", ".", "findDatasetVersions", "(", "this", ")", ")", ";", "if", "(", "versi...
Drops the partitions selected by {@link #hiveSelectionPolicy}. Also deletes the data associated with it. <p> If an {@link Exception} occurs while processing a {@link Partition}, other {@link Partition}s will still be deleted. However, a {@link RuntimeException} is thrown at the end if there was at least one {@link Exce...
[ "Drops", "the", "partitions", "selected", "by", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/retention/dataset/CleanableHiveDataset.java#L125-L165
whizzosoftware/WZWave
src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java
MultiInstanceCommandClass.createMultiInstanceGet
public DataFrame createMultiInstanceGet(byte nodeId, byte commandClass) { """ Create a MULTI_INSTANCE_GET command. @param nodeId the target node ID @param commandClass the command class being requested @return a DataFrame instance """ if (getVersion() > 1) { throw new ZWaveRuntimeExc...
java
public DataFrame createMultiInstanceGet(byte nodeId, byte commandClass) { if (getVersion() > 1) { throw new ZWaveRuntimeException("MULTI_INSTANCE_GET is deprecated for command class versions > 1"); } return createSendDataFrame( "MULTI_INSTANCE_GET", nodeId, ...
[ "public", "DataFrame", "createMultiInstanceGet", "(", "byte", "nodeId", ",", "byte", "commandClass", ")", "{", "if", "(", "getVersion", "(", ")", ">", "1", ")", "{", "throw", "new", "ZWaveRuntimeException", "(", "\"MULTI_INSTANCE_GET is deprecated for command class ve...
Create a MULTI_INSTANCE_GET command. @param nodeId the target node ID @param commandClass the command class being requested @return a DataFrame instance
[ "Create", "a", "MULTI_INSTANCE_GET", "command", "." ]
train
https://github.com/whizzosoftware/WZWave/blob/b9dfec6b55515226edf9d772a89933b336397501/src/main/java/com/whizzosoftware/wzwave/commandclass/MultiInstanceCommandClass.java#L234-L248