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
igniterealtime/Smack
smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java
EnhancedDebugger.addSentPacketToTable
private void addSentPacketToTable(final SimpleDateFormat dateFormatter, final TopLevelStreamElement packet) { """ Adds the sent stanza detail to the messages table. @param dateFormatter the SimpleDateFormat to use to format Dates @param packet the sent stanza to add to the table """ SwingUti...
java
private void addSentPacketToTable(final SimpleDateFormat dateFormatter, final TopLevelStreamElement packet) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { String messageType; Jid to; String stanzaId; ...
[ "private", "void", "addSentPacketToTable", "(", "final", "SimpleDateFormat", "dateFormatter", ",", "final", "TopLevelStreamElement", "packet", ")", "{", "SwingUtilities", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", ...
Adds the sent stanza detail to the messages table. @param dateFormatter the SimpleDateFormat to use to format Dates @param packet the sent stanza to add to the table
[ "Adds", "the", "sent", "stanza", "detail", "to", "the", "messages", "table", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java#L835-L899
duracloud/duracloud
durastore/src/main/java/org/duracloud/durastore/rest/SpaceRest.java
SpaceRest.getSpaces
@Path("/spaces") @GET @Produces(XML) public Response getSpaces(@QueryParam("storeID") String storeID) { """ see SpaceResource.getSpaces() @return 200 response with XML listing of spaces """ String msg = "getting spaces(" + storeID + ")"; try { String xml = spaceResou...
java
@Path("/spaces") @GET @Produces(XML) public Response getSpaces(@QueryParam("storeID") String storeID) { String msg = "getting spaces(" + storeID + ")"; try { String xml = spaceResource.getSpaces(storeID); return responseOkXml(msg, xml); } catch (ResourceExce...
[ "@", "Path", "(", "\"/spaces\"", ")", "@", "GET", "@", "Produces", "(", "XML", ")", "public", "Response", "getSpaces", "(", "@", "QueryParam", "(", "\"storeID\"", ")", "String", "storeID", ")", "{", "String", "msg", "=", "\"getting spaces(\"", "+", "storeI...
see SpaceResource.getSpaces() @return 200 response with XML listing of spaces
[ "see", "SpaceResource", ".", "getSpaces", "()" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/durastore/src/main/java/org/duracloud/durastore/rest/SpaceRest.java#L67-L83
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/raster/RasterImage.java
RasterImage.createRaster
private ImageBuffer createRaster(Media rasterMedia, Raster raster, int i, boolean save) { """ Create raster from data or load from cache. @param rasterMedia The raster media. @param raster The raster data. @param i The raster index. @param save <code>true</code> to save generated raster, <code>false</code> e...
java
private ImageBuffer createRaster(Media rasterMedia, Raster raster, int i, boolean save) { final ImageBuffer rasterBuffer; if (rasterMedia.exists()) { rasterBuffer = Graphics.getImageBuffer(rasterMedia); rasterBuffer.prepare(); } else {...
[ "private", "ImageBuffer", "createRaster", "(", "Media", "rasterMedia", ",", "Raster", "raster", ",", "int", "i", ",", "boolean", "save", ")", "{", "final", "ImageBuffer", "rasterBuffer", ";", "if", "(", "rasterMedia", ".", "exists", "(", ")", ")", "{", "ra...
Create raster from data or load from cache. @param rasterMedia The raster media. @param raster The raster data. @param i The raster index. @param save <code>true</code> to save generated raster, <code>false</code> else. @return The created raster.
[ "Create", "raster", "from", "data", "or", "load", "from", "cache", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/raster/RasterImage.java#L219-L241
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/JobTrackerJspHelper.java
JobTrackerJspHelper.generateJobTable
public void generateJobTable(JspWriter out, String label, List<JobInProgress> jobs) throws IOException { """ Returns an XML-formatted table of the jobs in the list. This is called repeatedly for different lists of jobs (e.g., running, completed, failed). """ if (jobs.size() > 0) { for (JobInPr...
java
public void generateJobTable(JspWriter out, String label, List<JobInProgress> jobs) throws IOException { if (jobs.size() > 0) { for (JobInProgress job : jobs) { JobProfile profile = job.getProfile(); JobStatus status = job.getStatus(); JobID jobid = profile.getJobID(); i...
[ "public", "void", "generateJobTable", "(", "JspWriter", "out", ",", "String", "label", ",", "List", "<", "JobInProgress", ">", "jobs", ")", "throws", "IOException", "{", "if", "(", "jobs", ".", "size", "(", ")", ">", "0", ")", "{", "for", "(", "JobInPr...
Returns an XML-formatted table of the jobs in the list. This is called repeatedly for different lists of jobs (e.g., running, completed, failed).
[ "Returns", "an", "XML", "-", "formatted", "table", "of", "the", "jobs", "in", "the", "list", ".", "This", "is", "called", "repeatedly", "for", "different", "lists", "of", "jobs", "(", "e", ".", "g", ".", "running", "completed", "failed", ")", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapreduce/server/jobtracker/JobTrackerJspHelper.java#L53-L80
beihaifeiwu/dolphin
dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java
AnnotationUtils.getDefaultValue
public static Object getDefaultValue(Class<? extends Annotation> annotationType, String attributeName) { """ Retrieve the <em>default value</em> of a named attribute, given the {@link Class annotation type}. @param annotationType the <em>annotation type</em> for which the default value should be retrieved @para...
java
public static Object getDefaultValue(Class<? extends Annotation> annotationType, String attributeName) { if (annotationType == null || !StringUtils.hasLength(attributeName)) { return null; } try { return annotationType.getDeclaredMethod(attributeName).getDefaultValue(); } catch (Exception ex) { retur...
[ "public", "static", "Object", "getDefaultValue", "(", "Class", "<", "?", "extends", "Annotation", ">", "annotationType", ",", "String", "attributeName", ")", "{", "if", "(", "annotationType", "==", "null", "||", "!", "StringUtils", ".", "hasLength", "(", "attr...
Retrieve the <em>default value</em> of a named attribute, given the {@link Class annotation type}. @param annotationType the <em>annotation type</em> for which the default value should be retrieved @param attributeName the name of the attribute value to retrieve. @return the default value of the named attribute, or {@c...
[ "Retrieve", "the", "<em", ">", "default", "value<", "/", "em", ">", "of", "a", "named", "attribute", "given", "the", "{" ]
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-common/src/main/java/com/freetmp/common/annotation/AnnotationUtils.java#L694-L704
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/io/SynchronizedIO.java
SynchronizedIO.writeFile
public void writeFile(String aFileName, URL aData) throws Exception { """ Write binary file data @param aFileName @param aData @throws Exception """ Object lock = retrieveLock(aFileName); synchronized (lock) { IO.writeFile(aFileName, aData); } }
java
public void writeFile(String aFileName, URL aData) throws Exception { Object lock = retrieveLock(aFileName); synchronized (lock) { IO.writeFile(aFileName, aData); } }
[ "public", "void", "writeFile", "(", "String", "aFileName", ",", "URL", "aData", ")", "throws", "Exception", "{", "Object", "lock", "=", "retrieveLock", "(", "aFileName", ")", ";", "synchronized", "(", "lock", ")", "{", "IO", ".", "writeFile", "(", "aFileNa...
Write binary file data @param aFileName @param aData @throws Exception
[ "Write", "binary", "file", "data" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/io/SynchronizedIO.java#L134-L142
jingwei/krati
krati-main/src/main/java/krati/io/IOFactory.java
IOFactory.createDataWriter
public final static DataWriter createDataWriter(File file, IOType type) { """ Creates a new DataWriter to write to a file. @param file - file to write. @param type - I/O type. @return a new DataWriter instance of type {@link BasicIO}. """ if(type == IOType.MAPPED) { if(file.length() <=...
java
public final static DataWriter createDataWriter(File file, IOType type) { if(type == IOType.MAPPED) { if(file.length() <= Integer.MAX_VALUE) { return new MappedWriter(file); } else { return new MultiMappedWriter(file); } } else { ...
[ "public", "final", "static", "DataWriter", "createDataWriter", "(", "File", "file", ",", "IOType", "type", ")", "{", "if", "(", "type", "==", "IOType", ".", "MAPPED", ")", "{", "if", "(", "file", ".", "length", "(", ")", "<=", "Integer", ".", "MAX_VALU...
Creates a new DataWriter to write to a file. @param file - file to write. @param type - I/O type. @return a new DataWriter instance of type {@link BasicIO}.
[ "Creates", "a", "new", "DataWriter", "to", "write", "to", "a", "file", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/io/IOFactory.java#L56-L66
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/web/util/UriUtils.java
UriUtils.encodeScheme
public static String encodeScheme(String scheme, String encoding) throws UnsupportedEncodingException { """ Encodes the given URI scheme with the given encoding. @param scheme the scheme to be encoded @param encoding the character encoding to encode to @return the encoded scheme @throws UnsupportedEncodingExce...
java
public static String encodeScheme(String scheme, String encoding) throws UnsupportedEncodingException { return HierarchicalUriComponents.encodeUriComponent(scheme, encoding, HierarchicalUriComponents.Type.SCHEME); }
[ "public", "static", "String", "encodeScheme", "(", "String", "scheme", ",", "String", "encoding", ")", "throws", "UnsupportedEncodingException", "{", "return", "HierarchicalUriComponents", ".", "encodeUriComponent", "(", "scheme", ",", "encoding", ",", "HierarchicalUriC...
Encodes the given URI scheme with the given encoding. @param scheme the scheme to be encoded @param encoding the character encoding to encode to @return the encoded scheme @throws UnsupportedEncodingException when the given encoding parameter is not supported
[ "Encodes", "the", "given", "URI", "scheme", "with", "the", "given", "encoding", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/web/util/UriUtils.java#L219-L221
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/JcrSystemViewExporter.java
JcrSystemViewExporter.emitValue
private void emitValue( Value value, ContentHandler contentHandler, int propertyType, boolean skipBinary ) throws RepositoryException, SAXException { """ Fires the appropriate SAX events on the content handler to build the XML elem...
java
private void emitValue( Value value, ContentHandler contentHandler, int propertyType, boolean skipBinary ) throws RepositoryException, SAXException { if (PropertyType.BINARY == propertyType) { startElement(contentHa...
[ "private", "void", "emitValue", "(", "Value", "value", ",", "ContentHandler", "contentHandler", ",", "int", "propertyType", ",", "boolean", "skipBinary", ")", "throws", "RepositoryException", ",", "SAXException", "{", "if", "(", "PropertyType", ".", "BINARY", "=="...
Fires the appropriate SAX events on the content handler to build the XML elements for the value. @param value the value to be exported @param contentHandler the SAX content handler for which SAX events will be invoked as the XML document is created. @param propertyType the {@link PropertyType} for the given value @par...
[ "Fires", "the", "appropriate", "SAX", "events", "on", "the", "content", "handler", "to", "build", "the", "XML", "elements", "for", "the", "value", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrSystemViewExporter.java#L256-L290
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java
ParserUtils.getBooleanAttribute
public static Boolean getBooleanAttribute(XmlPullParser parser, String name) { """ Get the boolean value of an argument. @param parser @param name @return the boolean value or null of no argument of the given name exists """ String valueString = parser.getAttributeValue("", name); if (valu...
java
public static Boolean getBooleanAttribute(XmlPullParser parser, String name) { String valueString = parser.getAttributeValue("", name); if (valueString == null) return null; valueString = valueString.toLowerCase(Locale.US); return parseXmlBoolean(valueString); }
[ "public", "static", "Boolean", "getBooleanAttribute", "(", "XmlPullParser", "parser", ",", "String", "name", ")", "{", "String", "valueString", "=", "parser", ".", "getAttributeValue", "(", "\"\"", ",", "name", ")", ";", "if", "(", "valueString", "==", "null",...
Get the boolean value of an argument. @param parser @param name @return the boolean value or null of no argument of the given name exists
[ "Get", "the", "boolean", "value", "of", "an", "argument", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java#L162-L168
james-hu/jabb-core
src/main/java/net/sf/jabb/util/text/StartWithMatcher.java
StartWithMatcher.setAttachmentByExample
protected void setAttachmentByExample(String example, Object att, String exp) { """ Set attachment object for each state, by testing which state the example string can run into.<br> 根据示范字符串,设置各状态所对应的附件对象。 @param example Example string.<br>示范字符串 @param att Attachment object.<br>附件对象 @param exp Regular expre...
java
protected void setAttachmentByExample(String example, Object att, String exp){ int p = getLastAcceptedState(example, 0); if (p != -1){ this.attachments[p] = att; }else{ // 说明精确匹配示范字符串有错误 throw new IllegalArgumentException("\"" + example + "\" can not match \"" + exp + "\""); } }
[ "protected", "void", "setAttachmentByExample", "(", "String", "example", ",", "Object", "att", ",", "String", "exp", ")", "{", "int", "p", "=", "getLastAcceptedState", "(", "example", ",", "0", ")", ";", "if", "(", "p", "!=", "-", "1", ")", "{", "this"...
Set attachment object for each state, by testing which state the example string can run into.<br> 根据示范字符串,设置各状态所对应的附件对象。 @param example Example string.<br>示范字符串 @param att Attachment object.<br>附件对象 @param exp Regular expression which will only be used within the exception message.<br> 正则表达式字符串(仅被用在抛出的异常消息中)
[ "Set", "attachment", "object", "for", "each", "state", "by", "testing", "which", "state", "the", "example", "string", "can", "run", "into", ".", "<br", ">", "根据示范字符串,设置各状态所对应的附件对象。" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/text/StartWithMatcher.java#L184-L192
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.iiop/src/com/ibm/ws/transport/iiop/yoko/helper/SocketFactoryHelper.java
SocketFactoryHelper.attemptSocketBind
private void attemptSocketBind(ServerSocket serverSocket, SocketAddress address, boolean reuseflag, int backlog) throws IOException { """ Attempt a socket bind to the input address with the given re-use option flag. @param address @param reuseflag @throws IOException """ serverSocket.setReuseAddr...
java
private void attemptSocketBind(ServerSocket serverSocket, SocketAddress address, boolean reuseflag, int backlog) throws IOException { serverSocket.setReuseAddress(reuseflag); serverSocket.bind(address, backlog); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.de...
[ "private", "void", "attemptSocketBind", "(", "ServerSocket", "serverSocket", ",", "SocketAddress", "address", ",", "boolean", "reuseflag", ",", "int", "backlog", ")", "throws", "IOException", "{", "serverSocket", ".", "setReuseAddress", "(", "reuseflag", ")", ";", ...
Attempt a socket bind to the input address with the given re-use option flag. @param address @param reuseflag @throws IOException
[ "Attempt", "a", "socket", "bind", "to", "the", "input", "address", "with", "the", "given", "re", "-", "use", "option", "flag", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.iiop/src/com/ibm/ws/transport/iiop/yoko/helper/SocketFactoryHelper.java#L137-L143
Azure/azure-sdk-for-java
cognitiveservices/data-plane/search/bingwebsearch/src/main/java/com/microsoft/azure/cognitiveservices/search/websearch/implementation/BingWebSearchImpl.java
BingWebSearchImpl.searchWithServiceResponseAsync
public Observable<ServiceResponse<SearchResponse>> searchWithServiceResponseAsync(String query, SearchOptionalParameter searchOptionalParameter) { """ The Web Search API lets you send a search query to Bing and get back search results that include links to webpages, images, and more. @param query The user's sea...
java
public Observable<ServiceResponse<SearchResponse>> searchWithServiceResponseAsync(String query, SearchOptionalParameter searchOptionalParameter) { if (query == null) { throw new IllegalArgumentException("Parameter query is required and cannot be null."); } final String acceptLanguage...
[ "public", "Observable", "<", "ServiceResponse", "<", "SearchResponse", ">", ">", "searchWithServiceResponseAsync", "(", "String", "query", ",", "SearchOptionalParameter", "searchOptionalParameter", ")", "{", "if", "(", "query", "==", "null", ")", "{", "throw", "new"...
The Web Search API lets you send a search query to Bing and get back search results that include links to webpages, images, and more. @param query The user's search query term. The term may not be empty. The term may contain Bing Advanced Operators. For example, to limit results to a specific domain, use the site: ope...
[ "The", "Web", "Search", "API", "lets", "you", "send", "a", "search", "query", "to", "Bing", "and", "get", "back", "search", "results", "that", "include", "links", "to", "webpages", "images", "and", "more", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/search/bingwebsearch/src/main/java/com/microsoft/azure/cognitiveservices/search/websearch/implementation/BingWebSearchImpl.java#L122-L146
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/DoubleStream.java
DoubleStream.peek
@NotNull public DoubleStream peek(@NotNull final DoubleConsumer action) { """ Performs provided action on each element. <p>This is an intermediate operation. @param action the action to be performed on each element @return the new stream """ return new DoubleStream(params, new DoublePeek(ite...
java
@NotNull public DoubleStream peek(@NotNull final DoubleConsumer action) { return new DoubleStream(params, new DoublePeek(iterator, action)); }
[ "@", "NotNull", "public", "DoubleStream", "peek", "(", "@", "NotNull", "final", "DoubleConsumer", "action", ")", "{", "return", "new", "DoubleStream", "(", "params", ",", "new", "DoublePeek", "(", "iterator", ",", "action", ")", ")", ";", "}" ]
Performs provided action on each element. <p>This is an intermediate operation. @param action the action to be performed on each element @return the new stream
[ "Performs", "provided", "action", "on", "each", "element", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/DoubleStream.java#L621-L624
sksamuel/scrimage
scrimage-core/src/main/java/com/sksamuel/scrimage/AutocropOps.java
AutocropOps.scanright
public static int scanright(Color color, int height, int width, int col, PixelsExtractor f, int tolerance) { """ Starting with the given column index, will return the first column index which contains a colour that does not match the given color. """ if (col == width || !PixelTools.colorMatches(color,...
java
public static int scanright(Color color, int height, int width, int col, PixelsExtractor f, int tolerance) { if (col == width || !PixelTools.colorMatches(color, tolerance, f.apply(new Area(col, 0, 1, height)))) return col; else return scanright(color, height, width, col + 1, f, t...
[ "public", "static", "int", "scanright", "(", "Color", "color", ",", "int", "height", ",", "int", "width", ",", "int", "col", ",", "PixelsExtractor", "f", ",", "int", "tolerance", ")", "{", "if", "(", "col", "==", "width", "||", "!", "PixelTools", ".", ...
Starting with the given column index, will return the first column index which contains a colour that does not match the given color.
[ "Starting", "with", "the", "given", "column", "index", "will", "return", "the", "first", "column", "index", "which", "contains", "a", "colour", "that", "does", "not", "match", "the", "given", "color", "." ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-core/src/main/java/com/sksamuel/scrimage/AutocropOps.java#L9-L14
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java
DTMDefaultBase.findGTE
protected int findGTE(int[] list, int start, int len, int value) { """ Find the first index that occurs in the list that is greater than or equal to the given value. @param list A list of integers. @param start The start index to begin the search. @param len The number of items to search. @param value Find ...
java
protected int findGTE(int[] list, int start, int len, int value) { int low = start; int high = start + (len - 1); int end = high; while (low <= high) { int mid = (low + high) / 2; int c = list[mid]; if (c > value) high = mid - 1; else if (c < value) low =...
[ "protected", "int", "findGTE", "(", "int", "[", "]", "list", ",", "int", "start", ",", "int", "len", ",", "int", "value", ")", "{", "int", "low", "=", "start", ";", "int", "high", "=", "start", "+", "(", "len", "-", "1", ")", ";", "int", "end",...
Find the first index that occurs in the list that is greater than or equal to the given value. @param list A list of integers. @param start The start index to begin the search. @param len The number of items to search. @param value Find the slot that has a value that is greater than or identical to this argument. @re...
[ "Find", "the", "first", "index", "that", "occurs", "in", "the", "list", "that", "is", "greater", "than", "or", "equal", "to", "the", "given", "value", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L351-L372
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java
ContentKeyPoliciesInner.updateAsync
public Observable<ContentKeyPolicyInner> updateAsync(String resourceGroupName, String accountName, String contentKeyPolicyName, ContentKeyPolicyInner parameters) { """ Update a Content Key Policy. Updates an existing Content Key Policy in the Media Services account. @param resourceGroupName The name of the res...
java
public Observable<ContentKeyPolicyInner> updateAsync(String resourceGroupName, String accountName, String contentKeyPolicyName, ContentKeyPolicyInner parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, contentKeyPolicyName, parameters).map(new Func1<ServiceResponse<ContentKeyPoli...
[ "public", "Observable", "<", "ContentKeyPolicyInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "contentKeyPolicyName", ",", "ContentKeyPolicyInner", "parameters", ")", "{", "return", "updateWithServiceResponseAsync...
Update a Content Key Policy. Updates an existing Content Key Policy in the Media Services account. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param contentKeyPolicyName The Content Key Policy name. @param parameters The re...
[ "Update", "a", "Content", "Key", "Policy", ".", "Updates", "an", "existing", "Content", "Key", "Policy", "in", "the", "Media", "Services", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/ContentKeyPoliciesInner.java#L708-L715
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/text/StrBuilder.java
StrBuilder.appendln
public StrBuilder appendln(final char[] chars, final int startIndex, final int length) { """ Appends a char array followed by a new line to the string builder. Appending null will call {@link #appendNull()}. @param chars the char array to append @param startIndex the start index, inclusive, must be valid @...
java
public StrBuilder appendln(final char[] chars, final int startIndex, final int length) { return append(chars, startIndex, length).appendNewLine(); }
[ "public", "StrBuilder", "appendln", "(", "final", "char", "[", "]", "chars", ",", "final", "int", "startIndex", ",", "final", "int", "length", ")", "{", "return", "append", "(", "chars", ",", "startIndex", ",", "length", ")", ".", "appendNewLine", "(", "...
Appends a char array followed by a new line to the string builder. Appending null will call {@link #appendNull()}. @param chars the char array to append @param startIndex the start index, inclusive, must be valid @param length the length to append, must be valid @return this, to enable chaining @since 2.3
[ "Appends", "a", "char", "array", "followed", "by", "a", "new", "line", "to", "the", "string", "builder", ".", "Appending", "null", "will", "call", "{", "@link", "#appendNull", "()", "}", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/text/StrBuilder.java#L1108-L1110
jamesagnew/hapi-fhir
hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/BaseWorkerContext.java
BaseWorkerContext.hasDelimiter
private boolean hasDelimiter(String s1, String s2, String delimiter) { """ /* Returns true if both strings include the delimiter and have the same number of occurrences of it """ return s1.contains(delimiter) && s2.contains(delimiter) && s1.split(delimiter).length == s2.split(delimiter).length; }
java
private boolean hasDelimiter(String s1, String s2, String delimiter) { return s1.contains(delimiter) && s2.contains(delimiter) && s1.split(delimiter).length == s2.split(delimiter).length; }
[ "private", "boolean", "hasDelimiter", "(", "String", "s1", ",", "String", "s2", ",", "String", "delimiter", ")", "{", "return", "s1", ".", "contains", "(", "delimiter", ")", "&&", "s2", ".", "contains", "(", "delimiter", ")", "&&", "s1", ".", "split", ...
/* Returns true if both strings include the delimiter and have the same number of occurrences of it
[ "/", "*", "Returns", "true", "if", "both", "strings", "include", "the", "delimiter", "and", "have", "the", "same", "number", "of", "occurrences", "of", "it" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/context/BaseWorkerContext.java#L250-L252
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java
RestClientUtil.addDocument
public String addDocument(String indexName, Object bean, ClientOptions clientOptions) throws ElasticSearchException { """ 创建或者更新索引文档 For Elasticsearch 7 and 7+ @param indexName @param bean @return @throws ElasticSearchException """ return addDocument( indexName, _doc, bean,clientOptions); }
java
public String addDocument(String indexName, Object bean, ClientOptions clientOptions) throws ElasticSearchException{ return addDocument( indexName, _doc, bean,clientOptions); }
[ "public", "String", "addDocument", "(", "String", "indexName", ",", "Object", "bean", ",", "ClientOptions", "clientOptions", ")", "throws", "ElasticSearchException", "{", "return", "addDocument", "(", "indexName", ",", "_doc", ",", "bean", ",", "clientOptions", ")...
创建或者更新索引文档 For Elasticsearch 7 and 7+ @param indexName @param bean @return @throws ElasticSearchException
[ "创建或者更新索引文档", "For", "Elasticsearch", "7", "and", "7", "+" ]
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L4393-L4395
btrplace/scheduler
api/src/main/java/org/btrplace/model/view/ShareableResource.java
ShareableResource.sumCapacities
public int sumCapacities(Collection<Node> ids, boolean undef) { """ Get the cumulative nodes capacity. @param ids the nodes. @param undef {@code true} to include the undefined elements using the default value @return the value """ int s = 0; for (Node u: ids) { if (capacityDefined(u) || un...
java
public int sumCapacities(Collection<Node> ids, boolean undef) { int s = 0; for (Node u: ids) { if (capacityDefined(u) || undef) { s += nodesCapacity.get(u); } } return s; }
[ "public", "int", "sumCapacities", "(", "Collection", "<", "Node", ">", "ids", ",", "boolean", "undef", ")", "{", "int", "s", "=", "0", ";", "for", "(", "Node", "u", ":", "ids", ")", "{", "if", "(", "capacityDefined", "(", "u", ")", "||", "undef", ...
Get the cumulative nodes capacity. @param ids the nodes. @param undef {@code true} to include the undefined elements using the default value @return the value
[ "Get", "the", "cumulative", "nodes", "capacity", "." ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/api/src/main/java/org/btrplace/model/view/ShareableResource.java#L384-L392
ef-labs/vertx-when
vertx-when/src/main/java/com/englishtown/vertx/promises/impl/DefaultWhenFileSystem.java
DefaultWhenFileSystem.chmod
@Override public Promise<Void> chmod(String path, String perms) { """ Change the permissions on the file represented by {@code path} to {@code perms}, asynchronously. <p> The permission String takes the form rwxr-x--- as specified <a href="http://download.oracle.com/javase/7/docs/api/java/nio/file/attribute...
java
@Override public Promise<Void> chmod(String path, String perms) { return adapter.toPromise(handler -> vertx.fileSystem().chmod(path, perms, handler)); }
[ "@", "Override", "public", "Promise", "<", "Void", ">", "chmod", "(", "String", "path", ",", "String", "perms", ")", "{", "return", "adapter", ".", "toPromise", "(", "handler", "->", "vertx", ".", "fileSystem", "(", ")", ".", "chmod", "(", "path", ",",...
Change the permissions on the file represented by {@code path} to {@code perms}, asynchronously. <p> The permission String takes the form rwxr-x--- as specified <a href="http://download.oracle.com/javase/7/docs/api/java/nio/file/attribute/PosixFilePermissions.html">here</a>. @param path the path to the file @param pe...
[ "Change", "the", "permissions", "on", "the", "file", "represented", "by", "{", "@code", "path", "}", "to", "{", "@code", "perms", "}", "asynchronously", ".", "<p", ">", "The", "permission", "String", "takes", "the", "form", "rwxr", "-", "x", "---", "as",...
train
https://github.com/ef-labs/vertx-when/blob/dc4fde973f58130f2eb2159206ee78b867048f4d/vertx-when/src/main/java/com/englishtown/vertx/promises/impl/DefaultWhenFileSystem.java#L105-L108
rapidpro/expressions
java/src/main/java/io/rapidpro/expressions/functions/CustomFunctions.java
CustomFunctions.word_slice
public static String word_slice(EvaluationContext ctx, Object text, Object start, @IntegerDefault(0) Object stop, @BooleanDefault(false) Object bySpaces) { """ Extracts a substring spanning from start up to but not-including stop """ String _text = Conversions.toString(text, ctx); int _start = ...
java
public static String word_slice(EvaluationContext ctx, Object text, Object start, @IntegerDefault(0) Object stop, @BooleanDefault(false) Object bySpaces) { String _text = Conversions.toString(text, ctx); int _start = Conversions.toInteger(start, ctx); Integer _stop = Conversions.toInteger(stop, ...
[ "public", "static", "String", "word_slice", "(", "EvaluationContext", "ctx", ",", "Object", "text", ",", "Object", "start", ",", "@", "IntegerDefault", "(", "0", ")", "Object", "stop", ",", "@", "BooleanDefault", "(", "false", ")", "Object", "bySpaces", ")",...
Extracts a substring spanning from start up to but not-including stop
[ "Extracts", "a", "substring", "spanning", "from", "start", "up", "to", "but", "not", "-", "including", "stop" ]
train
https://github.com/rapidpro/expressions/blob/b03d91ec58fc328960bce90ecb5fa49dcf467627/java/src/main/java/io/rapidpro/expressions/functions/CustomFunctions.java#L135-L158
groupon/odo
client/src/main/java/com/groupon/odo/client/Client.java
Client.uploadConfigurationAndProfile
public boolean uploadConfigurationAndProfile(String fileName, String odoImport) { """ Upload file and set odo overrides and configuration of odo @param fileName File containing configuration @param odoImport Import odo configuration in addition to overrides @return If upload was successful """ Fil...
java
public boolean uploadConfigurationAndProfile(String fileName, String odoImport) { File file = new File(fileName); MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create(); FileBody fileBody = new FileBody(file, ContentType.MULTIPART_FORM_DATA); multipartEntityBuild...
[ "public", "boolean", "uploadConfigurationAndProfile", "(", "String", "fileName", ",", "String", "odoImport", ")", "{", "File", "file", "=", "new", "File", "(", "fileName", ")", ";", "MultipartEntityBuilder", "multipartEntityBuilder", "=", "MultipartEntityBuilder", "."...
Upload file and set odo overrides and configuration of odo @param fileName File containing configuration @param odoImport Import odo configuration in addition to overrides @return If upload was successful
[ "Upload", "file", "and", "set", "odo", "overrides", "and", "configuration", "of", "odo" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/client/src/main/java/com/groupon/odo/client/Client.java#L1347-L1364
segmentio/analytics-android
analytics/src/main/java/com/segment/analytics/internal/Utils.java
Utils.toJsonObject
public static JSONObject toJsonObject(Map<String, ?> map) { """ Return a copy of the contents of the given map as a {@link JSONObject}. Instead of failing on {@code null} values like the {@link JSONObject} map constructor, it cleans them up and correctly converts them to {@link JSONObject#NULL}. """ JSON...
java
public static JSONObject toJsonObject(Map<String, ?> map) { JSONObject jsonObject = new JSONObject(); for (Map.Entry<String, ?> entry : map.entrySet()) { Object value = wrap(entry.getValue()); try { jsonObject.put(entry.getKey(), value); } catch (JSONException ignored) { // Ign...
[ "public", "static", "JSONObject", "toJsonObject", "(", "Map", "<", "String", ",", "?", ">", "map", ")", "{", "JSONObject", "jsonObject", "=", "new", "JSONObject", "(", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", "?", ">", "entry", ...
Return a copy of the contents of the given map as a {@link JSONObject}. Instead of failing on {@code null} values like the {@link JSONObject} map constructor, it cleans them up and correctly converts them to {@link JSONObject#NULL}.
[ "Return", "a", "copy", "of", "the", "contents", "of", "the", "given", "map", "as", "a", "{" ]
train
https://github.com/segmentio/analytics-android/blob/93c7d5bb09b593440a2347a6089db3e9f74012da/analytics/src/main/java/com/segment/analytics/internal/Utils.java#L398-L409
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/config/refresher/HttpRefresher.java
HttpRefresher.isValidConfigNode
private static boolean isValidConfigNode(final boolean sslEnabled, final NodeInfo nodeInfo) { """ Helper method to detect if the given node can actually perform http config refresh. @param sslEnabled true if ssl enabled, false otherwise. @param nodeInfo the node info for the given node. @return true if it is ...
java
private static boolean isValidConfigNode(final boolean sslEnabled, final NodeInfo nodeInfo) { if (sslEnabled && nodeInfo.sslServices().containsKey(ServiceType.CONFIG)) { return true; } else if (nodeInfo.services().containsKey(ServiceType.CONFIG)) { return true; } ...
[ "private", "static", "boolean", "isValidConfigNode", "(", "final", "boolean", "sslEnabled", ",", "final", "NodeInfo", "nodeInfo", ")", "{", "if", "(", "sslEnabled", "&&", "nodeInfo", ".", "sslServices", "(", ")", ".", "containsKey", "(", "ServiceType", ".", "C...
Helper method to detect if the given node can actually perform http config refresh. @param sslEnabled true if ssl enabled, false otherwise. @param nodeInfo the node info for the given node. @return true if it is a valid config node, false otherwise.
[ "Helper", "method", "to", "detect", "if", "the", "given", "node", "can", "actually", "perform", "http", "config", "refresh", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/config/refresher/HttpRefresher.java#L367-L374
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/result/render/JFreeChartRender.java
JFreeChartRender.setStyle
public JFreeChartRender setStyle(int style) { """ Applies prepared style to a chart. Recognizes {@link JFreeChartRender#STYLE_THESIS} and {@link JFreeChartRender#STYLE_THESIS_LEGEND}. @param style code of style @return updated chart """ switch (style) { case JFreeChartRender.STYLE_TH...
java
public JFreeChartRender setStyle(int style) { switch (style) { case JFreeChartRender.STYLE_THESIS: return this.setBaseShapesVisible(true). setBaseShapesFilled(false). setBaseLinesVisible(false). setLegendItemFont...
[ "public", "JFreeChartRender", "setStyle", "(", "int", "style", ")", "{", "switch", "(", "style", ")", "{", "case", "JFreeChartRender", ".", "STYLE_THESIS", ":", "return", "this", ".", "setBaseShapesVisible", "(", "true", ")", ".", "setBaseShapesFilled", "(", "...
Applies prepared style to a chart. Recognizes {@link JFreeChartRender#STYLE_THESIS} and {@link JFreeChartRender#STYLE_THESIS_LEGEND}. @param style code of style @return updated chart
[ "Applies", "prepared", "style", "to", "a", "chart", "." ]
train
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/result/render/JFreeChartRender.java#L288-L310
samskivert/pythagoras
src/main/java/pythagoras/d/Frustum.java
Frustum.setToOrtho
public Frustum setToOrtho ( double left, double right, double bottom, double top, double near, double far) { """ Sets this frustum to an orthographic one pointing in the Z- direction with the specified parameters determining its size (see the OpenGL documentation for <code>glOrtho</code>). @return a re...
java
public Frustum setToOrtho ( double left, double right, double bottom, double top, double near, double far) { return setToProjection(left, right, bottom, top, near, far, Vector3.UNIT_Z, true, false); }
[ "public", "Frustum", "setToOrtho", "(", "double", "left", ",", "double", "right", ",", "double", "bottom", ",", "double", "top", ",", "double", "near", ",", "double", "far", ")", "{", "return", "setToProjection", "(", "left", ",", "right", ",", "bottom", ...
Sets this frustum to an orthographic one pointing in the Z- direction with the specified parameters determining its size (see the OpenGL documentation for <code>glOrtho</code>). @return a reference to this frustum, for chaining.
[ "Sets", "this", "frustum", "to", "an", "orthographic", "one", "pointing", "in", "the", "Z", "-", "direction", "with", "the", "specified", "parameters", "determining", "its", "size", "(", "see", "the", "OpenGL", "documentation", "for", "<code", ">", "glOrtho<",...
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Frustum.java#L77-L80
facebookarchive/hadoop-20
src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairSchedulerServlet.java
FairSchedulerServlet.showAdminFormLocalityDelay
private void showAdminFormLocalityDelay(PrintWriter out, boolean advancedView) { """ Print the administration form at the bottom of the page, which currently only includes the button for switching between FIFO and Fair Scheduling. """ out.print("<h2>Locality Delay</h2>\n"); String advParam = advancedV...
java
private void showAdminFormLocalityDelay(PrintWriter out, boolean advancedView) { out.print("<h2>Locality Delay</h2>\n"); String advParam = advancedView ? "&advanced" : ""; long localityDelayRackLocal = scheduler.getLocalityDelayRackLocal(); long localityDelayNodeLocal = scheduler.getLocalityDelayNodeLoc...
[ "private", "void", "showAdminFormLocalityDelay", "(", "PrintWriter", "out", ",", "boolean", "advancedView", ")", "{", "out", ".", "print", "(", "\"<h2>Locality Delay</h2>\\n\"", ")", ";", "String", "advParam", "=", "advancedView", "?", "\"&advanced\"", ":", "\"\"", ...
Print the administration form at the bottom of the page, which currently only includes the button for switching between FIFO and Fair Scheduling.
[ "Print", "the", "administration", "form", "at", "the", "bottom", "of", "the", "page", "which", "currently", "only", "includes", "the", "button", "for", "switching", "between", "FIFO", "and", "Fair", "Scheduling", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairSchedulerServlet.java#L717-L730
Azure/azure-sdk-for-java
eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/LoggingUtils.java
LoggingUtils.unwrapException
static Throwable unwrapException(Throwable wrapped, StringBuilder outAction) { """ outAction can be null if you don't care about any action string """ Throwable unwrapped = wrapped; while ((unwrapped instanceof ExecutionException) || (unwrapped instanceof CompletionException) |...
java
static Throwable unwrapException(Throwable wrapped, StringBuilder outAction) { Throwable unwrapped = wrapped; while ((unwrapped instanceof ExecutionException) || (unwrapped instanceof CompletionException) || (unwrapped instanceof ExceptionWithAction)) { if ((unwrapped instan...
[ "static", "Throwable", "unwrapException", "(", "Throwable", "wrapped", ",", "StringBuilder", "outAction", ")", "{", "Throwable", "unwrapped", "=", "wrapped", ";", "while", "(", "(", "unwrapped", "instanceof", "ExecutionException", ")", "||", "(", "unwrapped", "ins...
outAction can be null if you don't care about any action string
[ "outAction", "can", "be", "null", "if", "you", "don", "t", "care", "about", "any", "action", "string" ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/LoggingUtils.java#L24-L42
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/github/lgooddatepicker/components/TimePicker.java
TimePicker.zInternalSetLastValidTimeAndNotifyListeners
private void zInternalSetLastValidTimeAndNotifyListeners(LocalTime newTime) { """ zInternalSetLastValidTimeAndNotifyListeners, This should be called whenever we need to change the last valid time variable. This will store the supplied last valid time. If needed, this will notify all time change listeners that th...
java
private void zInternalSetLastValidTimeAndNotifyListeners(LocalTime newTime) { LocalTime oldTime = lastValidTime; lastValidTime = newTime; if (!PickerUtilities.isSameLocalTime(oldTime, newTime)) { for (TimeChangeListener timeChangeListener : timeChangeListeners) { Time...
[ "private", "void", "zInternalSetLastValidTimeAndNotifyListeners", "(", "LocalTime", "newTime", ")", "{", "LocalTime", "oldTime", "=", "lastValidTime", ";", "lastValidTime", "=", "newTime", ";", "if", "(", "!", "PickerUtilities", ".", "isSameLocalTime", "(", "oldTime",...
zInternalSetLastValidTimeAndNotifyListeners, This should be called whenever we need to change the last valid time variable. This will store the supplied last valid time. If needed, this will notify all time change listeners that the time has been changed. This does not perform any other tasks besides those described he...
[ "zInternalSetLastValidTimeAndNotifyListeners", "This", "should", "be", "called", "whenever", "we", "need", "to", "change", "the", "last", "valid", "time", "variable", ".", "This", "will", "store", "the", "supplied", "last", "valid", "time", ".", "If", "needed", ...
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/github/lgooddatepicker/components/TimePicker.java#L975-L986
windup/windup
config/api/src/main/java/org/jboss/windup/config/tags/TagService.java
TagService.getOrCreateTag
public Tag getOrCreateTag(String tagName, boolean isRef) { """ Gets the {@link Tag} with the given name or creates a new {@link Tag} if one does not already exist. @param isRef True if the given tag name is a reference, in which case it should already exist. """ if (null == tagName) thro...
java
public Tag getOrCreateTag(String tagName, boolean isRef) { if (null == tagName) throw new IllegalArgumentException("Looking for a null tag name."); tagName = Tag.normalizeName(tagName); synchronized (this.definedTags) { if (definedTags.containsKey(tagName)) ...
[ "public", "Tag", "getOrCreateTag", "(", "String", "tagName", ",", "boolean", "isRef", ")", "{", "if", "(", "null", "==", "tagName", ")", "throw", "new", "IllegalArgumentException", "(", "\"Looking for a null tag name.\"", ")", ";", "tagName", "=", "Tag", ".", ...
Gets the {@link Tag} with the given name or creates a new {@link Tag} if one does not already exist. @param isRef True if the given tag name is a reference, in which case it should already exist.
[ "Gets", "the", "{", "@link", "Tag", "}", "with", "the", "given", "name", "or", "creates", "a", "new", "{", "@link", "Tag", "}", "if", "one", "does", "not", "already", "exist", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/tags/TagService.java#L95-L112
JOML-CI/JOML
src/org/joml/Quaternionf.java
Quaternionf.fromAxisAngleRad
public Quaternionf fromAxisAngleRad(Vector3fc axis, float angle) { """ Set this quaternion to be a representation of the supplied axis and angle (in radians). @param axis the rotation axis @param angle the angle in radians @return this """ return fromAxisAngleRad(axis.x(), axis.y(), axis.z(), a...
java
public Quaternionf fromAxisAngleRad(Vector3fc axis, float angle) { return fromAxisAngleRad(axis.x(), axis.y(), axis.z(), angle); }
[ "public", "Quaternionf", "fromAxisAngleRad", "(", "Vector3fc", "axis", ",", "float", "angle", ")", "{", "return", "fromAxisAngleRad", "(", "axis", ".", "x", "(", ")", ",", "axis", ".", "y", "(", ")", ",", "axis", ".", "z", "(", ")", ",", "angle", ")"...
Set this quaternion to be a representation of the supplied axis and angle (in radians). @param axis the rotation axis @param angle the angle in radians @return this
[ "Set", "this", "quaternion", "to", "be", "a", "representation", "of", "the", "supplied", "axis", "and", "angle", "(", "in", "radians", ")", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaternionf.java#L881-L883
otto-de/edison-microservice
edison-jobs/src/main/java/de/otto/edison/jobs/definition/DefaultJobDefinition.java
DefaultJobDefinition.retryableCronJobDefinition
public static JobDefinition retryableCronJobDefinition(final String jobType, final String jobName, final String description, final String cron,...
java
public static JobDefinition retryableCronJobDefinition(final String jobType, final String jobName, final String description, final String cron,...
[ "public", "static", "JobDefinition", "retryableCronJobDefinition", "(", "final", "String", "jobType", ",", "final", "String", "jobName", ",", "final", "String", "description", ",", "final", "String", "cron", ",", "final", "int", "restarts", ",", "final", "int", ...
Create a JobDefinition that is using a cron expression to specify, when and how often the job should be triggered. @param jobType The type of the Job @param jobName A human readable name of the Job @param description A human readable description of the Job. @param cron The cron expression. Must conform ...
[ "Create", "a", "JobDefinition", "that", "is", "using", "a", "cron", "expression", "to", "specify", "when", "and", "how", "often", "the", "job", "should", "be", "triggered", "." ]
train
https://github.com/otto-de/edison-microservice/blob/89ecf0a0dee40977f004370b0b474a36c699e8a2/edison-jobs/src/main/java/de/otto/edison/jobs/definition/DefaultJobDefinition.java#L83-L92
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java
Character.codePointBefore
public static int codePointBefore(char[] a, int index, int start) { """ Returns the code point preceding the given index of the {@code char} array, where only array elements with {@code index} greater than or equal to {@code start} can be used. If the {@code char} value at {@code (index - 1)} in the {@code cha...
java
public static int codePointBefore(char[] a, int index, int start) { if (index <= start || start < 0 || start >= a.length) { throw new IndexOutOfBoundsException(); } return codePointBeforeImpl(a, index, start); }
[ "public", "static", "int", "codePointBefore", "(", "char", "[", "]", "a", ",", "int", "index", ",", "int", "start", ")", "{", "if", "(", "index", "<=", "start", "||", "start", "<", "0", "||", "start", ">=", "a", ".", "length", ")", "{", "throw", ...
Returns the code point preceding the given index of the {@code char} array, where only array elements with {@code index} greater than or equal to {@code start} can be used. If the {@code char} value at {@code (index - 1)} in the {@code char} array is in the low-surrogate range, {@code (index - 2)} is not less than {@co...
[ "Returns", "the", "code", "point", "preceding", "the", "given", "index", "of", "the", "{", "@code", "char", "}", "array", "where", "only", "array", "elements", "with", "{", "@code", "index", "}", "greater", "than", "or", "equal", "to", "{", "@code", "sta...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java#L5090-L5095
dbracewell/mango
src/main/java/com/davidbracewell/json/JsonReader.java
JsonReader.endArray
public JsonReader endArray() throws IOException { """ Ends an Array @return the structured reader @throws IOException Something went wrong reading """ if (currentValue.getKey() != END_ARRAY) { throw new IOException("Expecting END_ARRAY, but found " + jsonTokenToStructuredElement(null)); ...
java
public JsonReader endArray() throws IOException { if (currentValue.getKey() != END_ARRAY) { throw new IOException("Expecting END_ARRAY, but found " + jsonTokenToStructuredElement(null)); } consume(); return this; }
[ "public", "JsonReader", "endArray", "(", ")", "throws", "IOException", "{", "if", "(", "currentValue", ".", "getKey", "(", ")", "!=", "END_ARRAY", ")", "{", "throw", "new", "IOException", "(", "\"Expecting END_ARRAY, but found \"", "+", "jsonTokenToStructuredElement...
Ends an Array @return the structured reader @throws IOException Something went wrong reading
[ "Ends", "an", "Array" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/json/JsonReader.java#L246-L252
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.sqlcurdate
public static void sqlcurdate(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { """ curdate to current_date translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens """ zeroArgumentFunctionCall(buf, "cu...
java
public static void sqlcurdate(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { zeroArgumentFunctionCall(buf, "current_date", "curdate", parsedArgs); }
[ "public", "static", "void", "sqlcurdate", "(", "StringBuilder", "buf", ",", "List", "<", "?", "extends", "CharSequence", ">", "parsedArgs", ")", "throws", "SQLException", "{", "zeroArgumentFunctionCall", "(", "buf", ",", "\"current_date\"", ",", "\"curdate\"", ","...
curdate to current_date translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens
[ "curdate", "to", "current_date", "translation" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L331-L333
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/datetime/PDTFormatter.java
PDTFormatter.getFormatterTime
@Nonnull public static DateTimeFormatter getFormatterTime (@Nonnull final FormatStyle eStyle, @Nullable final Locale aDisplayLocale, @Nonnull final EDTFormatterMode eMode) { """ Get the time formatter for the ...
java
@Nonnull public static DateTimeFormatter getFormatterTime (@Nonnull final FormatStyle eStyle, @Nullable final Locale aDisplayLocale, @Nonnull final EDTFormatterMode eMode) { return _getFormatter (new CacheKey...
[ "@", "Nonnull", "public", "static", "DateTimeFormatter", "getFormatterTime", "(", "@", "Nonnull", "final", "FormatStyle", "eStyle", ",", "@", "Nullable", "final", "Locale", "aDisplayLocale", ",", "@", "Nonnull", "final", "EDTFormatterMode", "eMode", ")", "{", "ret...
Get the time formatter for the passed locale. @param eStyle The format style to be used. May not be <code>null</code>. @param aDisplayLocale The display locale to be used. May be <code>null</code>. @param eMode Print or parse? May not be <code>null</code>. @return The created time formatter. Never <code>null</code>. @...
[ "Get", "the", "time", "formatter", "for", "the", "passed", "locale", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/datetime/PDTFormatter.java#L277-L283
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/FastByteArrayOutputStream.java
FastByteArrayOutputStream.writeToViaSmoosh
void writeToViaSmoosh(Writer out, String encoding) throws IOException { """ This is recommended to be used where there's more than 1 buffer to write, instead use {@link #writeTo(java.io.Writer, String)} which auto detects if {@link #writeToViaString(java.io.Writer, String)} is to be used or {@link #writeToViaSm...
java
void writeToViaSmoosh(Writer out, String encoding) throws IOException { byte[] bufferToWrite = toByteArray(); int bufferToWriteLen = bufferToWrite.length; writeToImpl(out, encoding, bufferToWrite, bufferToWriteLen); }
[ "void", "writeToViaSmoosh", "(", "Writer", "out", ",", "String", "encoding", ")", "throws", "IOException", "{", "byte", "[", "]", "bufferToWrite", "=", "toByteArray", "(", ")", ";", "int", "bufferToWriteLen", "=", "bufferToWrite", ".", "length", ";", "writeToI...
This is recommended to be used where there's more than 1 buffer to write, instead use {@link #writeTo(java.io.Writer, String)} which auto detects if {@link #writeToViaString(java.io.Writer, String)} is to be used or {@link #writeToViaSmoosh(java.io.Writer, String)}. @param out @param encoding @throws IOException
[ "This", "is", "recommended", "to", "be", "used", "where", "there", "s", "more", "than", "1", "buffer", "to", "write", "instead", "use", "{", "@link", "#writeTo", "(", "java", ".", "io", ".", "Writer", "String", ")", "}", "which", "auto", "detects", "if...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/FastByteArrayOutputStream.java#L233-L237
cdk/cdk
base/valencycheck/src/main/java/org/openscience/cdk/tools/AtomTypeAwareSaturationChecker.java
AtomTypeAwareSaturationChecker.isConnected
private boolean isConnected(IBond bond1, IBond bond2) { """ Look if any atoms in <code>bond1</code> also are in <code>bond2</code> and if so it conceder the bonds connected. @param bond1 The first bond @param bond2 The other bond @return True if any of the atoms in <code>bond1</code> also are in <code>bond2<...
java
private boolean isConnected(IBond bond1, IBond bond2) { for (IAtom atom : bond1.atoms()) if (bond2.contains(atom)) return true; return false; }
[ "private", "boolean", "isConnected", "(", "IBond", "bond1", ",", "IBond", "bond2", ")", "{", "for", "(", "IAtom", "atom", ":", "bond1", ".", "atoms", "(", ")", ")", "if", "(", "bond2", ".", "contains", "(", "atom", ")", ")", "return", "true", ";", ...
Look if any atoms in <code>bond1</code> also are in <code>bond2</code> and if so it conceder the bonds connected. @param bond1 The first bond @param bond2 The other bond @return True if any of the atoms in <code>bond1</code> also are in <code>bond2</code>
[ "Look", "if", "any", "atoms", "in", "<code", ">", "bond1<", "/", "code", ">", "also", "are", "in", "<code", ">", "bond2<", "/", "code", ">", "and", "if", "so", "it", "conceder", "the", "bonds", "connected", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/AtomTypeAwareSaturationChecker.java#L279-L283
getsentry/sentry-java
sentry/src/main/java/io/sentry/connection/HttpConnection.java
HttpConnection.getSentryApiUrl
public static URL getSentryApiUrl(URI sentryUri, String projectId) { """ Automatically determines the URL to the HTTP API of Sentry. @param sentryUri URI of the Sentry server. @param projectId unique identifier of the current project. @return an URL to the HTTP API of Sentry. """ try { ...
java
public static URL getSentryApiUrl(URI sentryUri, String projectId) { try { String url = sentryUri.toString() + "api/" + projectId + "/store/"; return new URL(url); } catch (MalformedURLException e) { throw new IllegalArgumentException("Couldn't build a valid URL from ...
[ "public", "static", "URL", "getSentryApiUrl", "(", "URI", "sentryUri", ",", "String", "projectId", ")", "{", "try", "{", "String", "url", "=", "sentryUri", ".", "toString", "(", ")", "+", "\"api/\"", "+", "projectId", "+", "\"/store/\"", ";", "return", "ne...
Automatically determines the URL to the HTTP API of Sentry. @param sentryUri URI of the Sentry server. @param projectId unique identifier of the current project. @return an URL to the HTTP API of Sentry.
[ "Automatically", "determines", "the", "URL", "to", "the", "HTTP", "API", "of", "Sentry", "." ]
train
https://github.com/getsentry/sentry-java/blob/2e01461775cbd5951ff82b566069c349146d8aca/sentry/src/main/java/io/sentry/connection/HttpConnection.java#L113-L120
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java
TreeBin.tieBreakOrder
static int tieBreakOrder(Object a, Object b) { """ Tie-breaking utility for ordering insertions when equal hashCodes and non-comparable. We don't require a total order, just a consistent insertion rule to maintain equivalence across rebalancings. Tie-breaking further than necessary simplifies testing a bit. ...
java
static int tieBreakOrder(Object a, Object b) { int d; if (a == null || b == null || (d = a.getClass().getName(). compareTo(b.getClass().getName())) == 0) d = (System.identityHashCode(a) <= System.identityHashCode(b) ? -1 : 1);...
[ "static", "int", "tieBreakOrder", "(", "Object", "a", ",", "Object", "b", ")", "{", "int", "d", ";", "if", "(", "a", "==", "null", "||", "b", "==", "null", "||", "(", "d", "=", "a", ".", "getClass", "(", ")", ".", "getName", "(", ")", ".", "c...
Tie-breaking utility for ordering insertions when equal hashCodes and non-comparable. We don't require a total order, just a consistent insertion rule to maintain equivalence across rebalancings. Tie-breaking further than necessary simplifies testing a bit.
[ "Tie", "-", "breaking", "utility", "for", "ordering", "insertions", "when", "equal", "hashCodes", "and", "non", "-", "comparable", ".", "We", "don", "t", "require", "a", "total", "order", "just", "a", "consistent", "insertion", "rule", "to", "maintain", "equ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L2800-L2808
eurekaclinical/eurekaclinical-standard-apis
src/main/java/org/eurekaclinical/standardapis/filter/AbstractRolesFilter.java
AbstractRolesFilter.doFilter
@Override public void doFilter(ServletRequest inRequest, ServletResponse inResponse, FilterChain inChain) throws IOException, ServletException { """ Sets a <code>roles</code> session attribute containing an array of role names for the current user principal. It fetches the roles array from the {@link #getRole...
java
@Override public void doFilter(ServletRequest inRequest, ServletResponse inResponse, FilterChain inChain) throws IOException, ServletException { HttpServletRequest servletRequest = (HttpServletRequest) inRequest; Principal principal = servletRequest.getUserPrincipal(); HttpSession session = ...
[ "@", "Override", "public", "void", "doFilter", "(", "ServletRequest", "inRequest", ",", "ServletResponse", "inResponse", ",", "FilterChain", "inChain", ")", "throws", "IOException", ",", "ServletException", "{", "HttpServletRequest", "servletRequest", "=", "(", "HttpS...
Sets a <code>roles</code> session attribute containing an array of role names for the current user principal. It fetches the roles array from the {@link #getRoles(java.security.Principal, javax.servlet.ServletRequest) } call. If the session attribute is not null, it will not fetch the user's roles again. If there is no...
[ "Sets", "a", "<code", ">", "roles<", "/", "code", ">", "session", "attribute", "containing", "an", "array", "of", "role", "names", "for", "the", "current", "user", "principal", ".", "It", "fetches", "the", "roles", "array", "from", "the", "{", "@link", "...
train
https://github.com/eurekaclinical/eurekaclinical-standard-apis/blob/690036dde82a4f2c2106d32403cdf1c713429377/src/main/java/org/eurekaclinical/standardapis/filter/AbstractRolesFilter.java#L69-L90
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java
CustomerAccountUrl.getLoginStateByEmailAddressUrl
public static MozuUrl getLoginStateByEmailAddressUrl(String customerSetCode, String emailAddress, String responseFields) { """ Get Resource Url for GetLoginStateByEmailAddress @param customerSetCode The unique idenfitier of the customer set. @param emailAddress The email address associated with the customer acco...
java
public static MozuUrl getLoginStateByEmailAddressUrl(String customerSetCode, String emailAddress, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/accounts/loginstatebyemailaddress?emailAddress={emailAddress}&responseFields={responseFields}"); formatter.formatUrl("custo...
[ "public", "static", "MozuUrl", "getLoginStateByEmailAddressUrl", "(", "String", "customerSetCode", ",", "String", "emailAddress", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/customer/accounts/logi...
Get Resource Url for GetLoginStateByEmailAddress @param customerSetCode The unique idenfitier of the customer set. @param emailAddress The email address associated with the customer account. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON ...
[ "Get", "Resource", "Url", "for", "GetLoginStateByEmailAddress" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/customer/CustomerAccountUrl.java#L201-L208
arquillian/arquillian-extension-warp
spi/src/main/java/org/jboss/arquillian/warp/spi/LifecycleManagerStore.java
LifecycleManagerStore.get
public static <T> LifecycleManager get(Class<T> type, T boundObject) throws ObjectNotAssociatedException { """ Retrieves instance of {@link LifecycleManager} for given instance of given class. @param clazz the class used as denominator during retrieval @param boundObject the object used as key for retriv...
java
public static <T> LifecycleManager get(Class<T> type, T boundObject) throws ObjectNotAssociatedException { return getCurrentStore().obtain(type, boundObject); }
[ "public", "static", "<", "T", ">", "LifecycleManager", "get", "(", "Class", "<", "T", ">", "type", ",", "T", "boundObject", ")", "throws", "ObjectNotAssociatedException", "{", "return", "getCurrentStore", "(", ")", ".", "obtain", "(", "type", ",", "boundObje...
Retrieves instance of {@link LifecycleManager} for given instance of given class. @param clazz the class used as denominator during retrieval @param boundObject the object used as key for retriving {@link LifecycleManager} @return the bound instance of {@link LifecycleManager} @throws ObjectNotAssociatedExceptio...
[ "Retrieves", "instance", "of", "{", "@link", "LifecycleManager", "}", "for", "given", "instance", "of", "given", "class", "." ]
train
https://github.com/arquillian/arquillian-extension-warp/blob/e958f4d782851baf7f40e39835d3d1ad185b74dd/spi/src/main/java/org/jboss/arquillian/warp/spi/LifecycleManagerStore.java#L68-L70
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedClient.java
MemcachedClient.asyncIncr
@Override public OperationFuture<Long> asyncIncr(String key, long by, long def) { """ Asychronous increment. @param key key to increment @param by the amount to increment the value by @param def the default value (if the counter does not exist) @return a future with the incremented value, or -1 if the incr...
java
@Override public OperationFuture<Long> asyncIncr(String key, long by, long def) { return asyncMutate(Mutator.incr, key, by, def, 0); }
[ "@", "Override", "public", "OperationFuture", "<", "Long", ">", "asyncIncr", "(", "String", "key", ",", "long", "by", ",", "long", "def", ")", "{", "return", "asyncMutate", "(", "Mutator", ".", "incr", ",", "key", ",", "by", ",", "def", ",", "0", ")"...
Asychronous increment. @param key key to increment @param by the amount to increment the value by @param def the default value (if the counter does not exist) @return a future with the incremented value, or -1 if the increment failed. @throws IllegalStateException in the rare circumstance where queue is too full to ac...
[ "Asychronous", "increment", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L2143-L2146
janus-project/guava.janusproject.io
guava/src/com/google/common/collect/Ordering.java
Ordering.binarySearch
public int binarySearch(List<? extends T> sortedList, @Nullable T key) { """ {@link Collections#binarySearch(List, Object, Comparator) Searches} {@code sortedList} for {@code key} using the binary search algorithm. The list must be sorted using this ordering. @param sortedList the list to be searched @param ...
java
public int binarySearch(List<? extends T> sortedList, @Nullable T key) { return Collections.binarySearch(sortedList, key, this); }
[ "public", "int", "binarySearch", "(", "List", "<", "?", "extends", "T", ">", "sortedList", ",", "@", "Nullable", "T", "key", ")", "{", "return", "Collections", ".", "binarySearch", "(", "sortedList", ",", "key", ",", "this", ")", ";", "}" ]
{@link Collections#binarySearch(List, Object, Comparator) Searches} {@code sortedList} for {@code key} using the binary search algorithm. The list must be sorted using this ordering. @param sortedList the list to be searched @param key the key to be searched for
[ "{", "@link", "Collections#binarySearch", "(", "List", "Object", "Comparator", ")", "Searches", "}", "{", "@code", "sortedList", "}", "for", "{", "@code", "key", "}", "using", "the", "binary", "search", "algorithm", ".", "The", "list", "must", "be", "sorted"...
train
https://github.com/janus-project/guava.janusproject.io/blob/1c48fb672c9fdfddf276970570f703fa1115f588/guava/src/com/google/common/collect/Ordering.java#L900-L902
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLImages.java
SARLImages.forEvent
public ImageDescriptor forEvent(JvmVisibility visibility, int flags) { """ Replies the image descriptor for the "events". @param visibility the visibility of the event. @param flags the mark flags. See {@link JavaElementImageDescriptor#setAdornments(int)} for a description of the available flags. @return the...
java
public ImageDescriptor forEvent(JvmVisibility visibility, int flags) { return getDecorated(getTypeImageDescriptor( SarlElementType.EVENT, false, false, toFlags(visibility), USE_LIGHT_ICONS), flags); }
[ "public", "ImageDescriptor", "forEvent", "(", "JvmVisibility", "visibility", ",", "int", "flags", ")", "{", "return", "getDecorated", "(", "getTypeImageDescriptor", "(", "SarlElementType", ".", "EVENT", ",", "false", ",", "false", ",", "toFlags", "(", "visibility"...
Replies the image descriptor for the "events". @param visibility the visibility of the event. @param flags the mark flags. See {@link JavaElementImageDescriptor#setAdornments(int)} for a description of the available flags. @return the image descriptor for the events.
[ "Replies", "the", "image", "descriptor", "for", "the", "events", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLImages.java#L175-L178
glookast/commons-timecode
src/main/java/com/glookast/commons/timecode/Timecode.java
Timecode.valueOf
public static Timecode valueOf(String timecode, int timecodeBase, StringType stringType) throws IllegalArgumentException { """ Returns a Timecode instance for given timecode string and timecode base. What is considered acceptable input varies per selected StringType @param timecode @param timecodeBase @param...
java
public static Timecode valueOf(String timecode, int timecodeBase, StringType stringType) throws IllegalArgumentException { Timecode tc = new Timecode(); return (Timecode) tc.parse(timecode, timecodeBase, stringType); }
[ "public", "static", "Timecode", "valueOf", "(", "String", "timecode", ",", "int", "timecodeBase", ",", "StringType", "stringType", ")", "throws", "IllegalArgumentException", "{", "Timecode", "tc", "=", "new", "Timecode", "(", ")", ";", "return", "(", "Timecode",...
Returns a Timecode instance for given timecode string and timecode base. What is considered acceptable input varies per selected StringType @param timecode @param timecodeBase @param stringType @return the timecode @throws IllegalArgumentException
[ "Returns", "a", "Timecode", "instance", "for", "given", "timecode", "string", "and", "timecode", "base", ".", "What", "is", "considered", "acceptable", "input", "varies", "per", "selected", "StringType" ]
train
https://github.com/glookast/commons-timecode/blob/ec2f682a51d1cc435d0b42d80de48ff15adb4ee8/src/main/java/com/glookast/commons/timecode/Timecode.java#L112-L116
facebook/fresco
fbcore/src/main/java/com/facebook/common/webp/WebpSupportStatus.java
WebpSupportStatus.isWebpHeader
public static boolean isWebpHeader( final byte[] imageHeaderBytes, final int offset, final int headerSize) { """ Checks if imageHeaderBytes contains WEBP_RIFF_BYTES and WEBP_NAME_BYTES and if the header is long enough to be WebP's header. WebP file format can be found here: <a href="https://de...
java
public static boolean isWebpHeader( final byte[] imageHeaderBytes, final int offset, final int headerSize) { return headerSize >= SIMPLE_WEBP_HEADER_LENGTH && matchBytePattern(imageHeaderBytes, offset, WEBP_RIFF_BYTES) && matchBytePattern(imageHeaderBytes, offset + 8, WEBP_NAME_BYT...
[ "public", "static", "boolean", "isWebpHeader", "(", "final", "byte", "[", "]", "imageHeaderBytes", ",", "final", "int", "offset", ",", "final", "int", "headerSize", ")", "{", "return", "headerSize", ">=", "SIMPLE_WEBP_HEADER_LENGTH", "&&", "matchBytePattern", "(",...
Checks if imageHeaderBytes contains WEBP_RIFF_BYTES and WEBP_NAME_BYTES and if the header is long enough to be WebP's header. WebP file format can be found here: <a href="https://developers.google.com/speed/webp/docs/riff_container"> https://developers.google.com/speed/webp/docs/riff_container</a> @param imageHeaderByt...
[ "Checks", "if", "imageHeaderBytes", "contains", "WEBP_RIFF_BYTES", "and", "WEBP_NAME_BYTES", "and", "if", "the", "header", "is", "long", "enough", "to", "be", "WebP", "s", "header", ".", "WebP", "file", "format", "can", "be", "found", "here", ":", "<a", "hre...
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/fbcore/src/main/java/com/facebook/common/webp/WebpSupportStatus.java#L185-L192
opendatatrentino/smatch-webapi-client
src/main/java/it/unitn/disi/smatch/webapi/client/WebApiClient.java
WebApiClient.match
@Override public Correspondence match(String sourceName, List<String> sourceNodes, String targetName, List<String> targetNodes) { """ Returns the correspondence between the source and the target contexts @param sourceName - The name of the root node in the source tree @param sourceNodes - Names...
java
@Override public Correspondence match(String sourceName, List<String> sourceNodes, String targetName, List<String> targetNodes) { MatchMethods method = new MatchMethods(httpClient, locale, serverPath); Correspondence correspondace = null; try { correspondace = metho...
[ "@", "Override", "public", "Correspondence", "match", "(", "String", "sourceName", ",", "List", "<", "String", ">", "sourceNodes", ",", "String", "targetName", ",", "List", "<", "String", ">", "targetNodes", ")", "{", "MatchMethods", "method", "=", "new", "M...
Returns the correspondence between the source and the target contexts @param sourceName - The name of the root node in the source tree @param sourceNodes - Names of the source nodes under the source root node @param targetName - The name of the root node in the target tree @param targetNodes -Names of the target nodes...
[ "Returns", "the", "correspondence", "between", "the", "source", "and", "the", "target", "contexts" ]
train
https://github.com/opendatatrentino/smatch-webapi-client/blob/d74fc41ab5bdc29afafd11c9001ac25dff20f965/src/main/java/it/unitn/disi/smatch/webapi/client/WebApiClient.java#L173-L187
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java
DynamicURLClassLoader.newInstance
@Pure public static DynamicURLClassLoader newInstance(final ClassLoader parent, final URL... urls) { """ Creates a new instance of DynamicURLClassLoader for the specified URLs and parent class loader. If a security manager is installed, the <code>loadClass</code> method of the URLClassLoader returned by this m...
java
@Pure public static DynamicURLClassLoader newInstance(final ClassLoader parent, final URL... urls) { // Save the caller's context final AccessControlContext acc = AccessController.getContext(); // Need a privileged block to create the class loader return AccessController.doPrivileged(new PrivilegedAction<Dynam...
[ "@", "Pure", "public", "static", "DynamicURLClassLoader", "newInstance", "(", "final", "ClassLoader", "parent", ",", "final", "URL", "...", "urls", ")", "{", "// Save the caller's context", "final", "AccessControlContext", "acc", "=", "AccessController", ".", "getCont...
Creates a new instance of DynamicURLClassLoader for the specified URLs and parent class loader. If a security manager is installed, the <code>loadClass</code> method of the URLClassLoader returned by this method will invoke the <code>SecurityManager.checkPackageAccess</code> method before loading the class. @param par...
[ "Creates", "a", "new", "instance", "of", "DynamicURLClassLoader", "for", "the", "specified", "URLs", "and", "parent", "class", "loader", ".", "If", "a", "security", "manager", "is", "installed", "the", "<code", ">", "loadClass<", "/", "code", ">", "method", ...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/DynamicURLClassLoader.java#L519-L532
mikepenz/Materialize
library/src/main/java/com/mikepenz/materialize/util/UIUtils.java
UIUtils.setBackground
@Deprecated @SuppressLint("NewApi") public static void setBackground(View v, Drawable d) { """ helper method to set the background depending on the android version @param v @param d """ ViewCompat.setBackground(v, d); }
java
@Deprecated @SuppressLint("NewApi") public static void setBackground(View v, Drawable d) { ViewCompat.setBackground(v, d); }
[ "@", "Deprecated", "@", "SuppressLint", "(", "\"NewApi\"", ")", "public", "static", "void", "setBackground", "(", "View", "v", ",", "Drawable", "d", ")", "{", "ViewCompat", ".", "setBackground", "(", "v", ",", "d", ")", ";", "}" ]
helper method to set the background depending on the android version @param v @param d
[ "helper", "method", "to", "set", "the", "background", "depending", "on", "the", "android", "version" ]
train
https://github.com/mikepenz/Materialize/blob/2612c10c7570191a78d57f23620e945d61370e3d/library/src/main/java/com/mikepenz/materialize/util/UIUtils.java#L69-L73
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseField.java
BaseField.setupTablePopup
public ScreenComponent setupTablePopup(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Rec record, String iQueryKeySeq, String iDisplayFieldSeq, boolean bIncludeBlankOption, boolean bIncludeFormButton) { """ Add a popup for the table tied to this field. Key must be t...
java
public ScreenComponent setupTablePopup(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Rec record, String iQueryKeySeq, String iDisplayFieldSeq, boolean bIncludeBlankOption, boolean bIncludeFormButton) { if ((!(this instanceof ReferenceField)) && (!(this instan...
[ "public", "ScreenComponent", "setupTablePopup", "(", "ScreenLoc", "itsLocation", ",", "ComponentParent", "targetScreen", ",", "Convert", "converter", ",", "int", "iDisplayFieldDesc", ",", "Rec", "record", ",", "String", "iQueryKeySeq", ",", "String", "iDisplayFieldSeq",...
Add a popup for the table tied to this field. Key must be the first and primary and only key. @param record Record to display in a popup @param iQueryKeySeq Order to display the record (-1 = Primary field) @param iDisplayFieldSeq Description field for the popup (-1 = second field) @param bIncludeBlankOption Include a b...
[ "Add", "a", "popup", "for", "the", "table", "tied", "to", "this", "field", ".", "Key", "must", "be", "the", "first", "and", "primary", "and", "only", "key", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseField.java#L1226-L1249
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getFieldEx
public static Field getFieldEx(Class<?> clazz, String fieldName) throws NoSuchFieldException { """ Get named field of requested class class or its super-classes package hierarchy, with checked exception. Tries to get requested field from given class; if not found try with super-classes hierarchy but limited to re...
java
public static Field getFieldEx(Class<?> clazz, String fieldName) throws NoSuchFieldException { try { Field field = clazz.getDeclaredField(fieldName); field.setAccessible(true); return field; } catch(NoSuchFieldException e) { Class<?> superclass = clazz.getSuperclass(); ...
[ "public", "static", "Field", "getFieldEx", "(", "Class", "<", "?", ">", "clazz", ",", "String", "fieldName", ")", "throws", "NoSuchFieldException", "{", "try", "{", "Field", "field", "=", "clazz", ".", "getDeclaredField", "(", "fieldName", ")", ";", "field",...
Get named field of requested class class or its super-classes package hierarchy, with checked exception. Tries to get requested field from given class; if not found try with super-classes hierarchy but limited to requested class package. If field still not found throw {@link NoSuchFieldException}. <p> Implementation no...
[ "Get", "named", "field", "of", "requested", "class", "class", "or", "its", "super", "-", "classes", "package", "hierarchy", "with", "checked", "exception", ".", "Tries", "to", "get", "requested", "field", "from", "given", "class", ";", "if", "not", "found", ...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L658-L675
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.generateLogForContentProviderBeginning
static void generateLogForContentProviderBeginning(SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { """ <p> Generate log info at beginning of method </p> . @param method the method @param methodBuilder the method builder """ if (method.getParent().isLogEnabled()) { methodBuilder.addS...
java
static void generateLogForContentProviderBeginning(SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { if (method.getParent().isLogEnabled()) { methodBuilder.addStatement("$T.info($S, uri.toString())", Logger.class, "Execute " + method.jql.operationType + " for URI %s"); } }
[ "static", "void", "generateLogForContentProviderBeginning", "(", "SQLiteModelMethod", "method", ",", "MethodSpec", ".", "Builder", "methodBuilder", ")", "{", "if", "(", "method", ".", "getParent", "(", ")", ".", "isLogEnabled", "(", ")", ")", "{", "methodBuilder",...
<p> Generate log info at beginning of method </p> . @param method the method @param methodBuilder the method builder
[ "<p", ">", "Generate", "log", "info", "at", "beginning", "of", "method", "<", "/", "p", ">", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L332-L337
jenkinsci/email-ext-plugin
src/main/java/hudson/plugins/emailext/plugins/trigger/AbstractScriptTrigger.java
AbstractScriptTrigger.readResolve
private Object readResolve() throws ObjectStreamException { """ Called when object has been deserialized from a stream. @return {@code this}, or a replacement for {@code this}. @throws ObjectStreamException if the object cannot be restored. @see <a href="http://download.oracle.com/javase/1.3/docs/guide/serial...
java
private Object readResolve() throws ObjectStreamException { if (triggerScript != null && secureTriggerScript == null) { this.secureTriggerScript = new SecureGroovyScript(triggerScript, false, null); this.secureTriggerScript.configuring(ApprovalContext.create()); triggerSc...
[ "private", "Object", "readResolve", "(", ")", "throws", "ObjectStreamException", "{", "if", "(", "triggerScript", "!=", "null", "&&", "secureTriggerScript", "==", "null", ")", "{", "this", ".", "secureTriggerScript", "=", "new", "SecureGroovyScript", "(", "trigger...
Called when object has been deserialized from a stream. @return {@code this}, or a replacement for {@code this}. @throws ObjectStreamException if the object cannot be restored. @see <a href="http://download.oracle.com/javase/1.3/docs/guide/serialization/spec/input.doc6.html">The Java Object Serialization Specification...
[ "Called", "when", "object", "has", "been", "deserialized", "from", "a", "stream", "." ]
train
https://github.com/jenkinsci/email-ext-plugin/blob/21fbd402665848a18205b26751424149e51e86e4/src/main/java/hudson/plugins/emailext/plugins/trigger/AbstractScriptTrigger.java#L176-L183
keenon/loglinear
src/main/java/com/github/keenon/loglinear/model/ConcatVectorNamespace.java
ConcatVectorNamespace.setSparseFeature
public void setSparseFeature(ConcatVector vector, String featureName, Map<String,Double> sparseFeatures) { """ This adds a sparse set feature to a vector, setting the appropriate components of the given vector to the passed in value. @param vector the vector @param featureName the feature whose value to set @p...
java
public void setSparseFeature(ConcatVector vector, String featureName, Map<String,Double> sparseFeatures) { int[] indices = new int[sparseFeatures.size()]; double[] values = new double[sparseFeatures.size()]; int offset = 0; for (String index : sparseFeatures.keySet()) { indic...
[ "public", "void", "setSparseFeature", "(", "ConcatVector", "vector", ",", "String", "featureName", ",", "Map", "<", "String", ",", "Double", ">", "sparseFeatures", ")", "{", "int", "[", "]", "indices", "=", "new", "int", "[", "sparseFeatures", ".", "size", ...
This adds a sparse set feature to a vector, setting the appropriate components of the given vector to the passed in value. @param vector the vector @param featureName the feature whose value to set @param sparseFeatures the indices we wish to set, and their values
[ "This", "adds", "a", "sparse", "set", "feature", "to", "a", "vector", "setting", "the", "appropriate", "components", "of", "the", "given", "vector", "to", "the", "passed", "in", "value", "." ]
train
https://github.com/keenon/loglinear/blob/fa0c370ab6782015412f676ef2ab11c97be58e29/src/main/java/com/github/keenon/loglinear/model/ConcatVectorNamespace.java#L157-L167
infinispan/infinispan
object-filter/src/main/java/org/infinispan/objectfilter/impl/ql/QueryParser.java
QueryParser.parseQuery
public CommonTree parseQuery(String queryString, QueryResolverDelegate resolverDelegate, QueryRendererDelegate rendererDelegate) throws ParsingException { """ Parses the given query string. @param queryString the query string to parse @return the result of the parsing after being transformed by the processors ...
java
public CommonTree parseQuery(String queryString, QueryResolverDelegate resolverDelegate, QueryRendererDelegate rendererDelegate) throws ParsingException { IckleLexer lexer = new IckleLexer(new ANTLRStringStream(queryString)); CommonTokenStream tokens = new CommonTokenStream(lexer); IckleParser parser ...
[ "public", "CommonTree", "parseQuery", "(", "String", "queryString", ",", "QueryResolverDelegate", "resolverDelegate", ",", "QueryRendererDelegate", "rendererDelegate", ")", "throws", "ParsingException", "{", "IckleLexer", "lexer", "=", "new", "IckleLexer", "(", "new", "...
Parses the given query string. @param queryString the query string to parse @return the result of the parsing after being transformed by the processors @throws ParsingException in case any exception occurs during parsing
[ "Parses", "the", "given", "query", "string", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/object-filter/src/main/java/org/infinispan/objectfilter/impl/ql/QueryParser.java#L55-L75
Erudika/para
para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java
AWSDynamoUtils.getClient
public static AmazonDynamoDB getClient() { """ Returns a client instance for AWS DynamoDB. @return a client that talks to DynamoDB """ if (ddbClient != null) { return ddbClient; } if (Config.IN_PRODUCTION) { ddbClient = AmazonDynamoDBClientBuilder.standard().build(); } else { ddbClient = Ama...
java
public static AmazonDynamoDB getClient() { if (ddbClient != null) { return ddbClient; } if (Config.IN_PRODUCTION) { ddbClient = AmazonDynamoDBClientBuilder.standard().build(); } else { ddbClient = AmazonDynamoDBClientBuilder.standard(). withCredentials(new AWSStaticCredentialsProvider(new BasicAW...
[ "public", "static", "AmazonDynamoDB", "getClient", "(", ")", "{", "if", "(", "ddbClient", "!=", "null", ")", "{", "return", "ddbClient", ";", "}", "if", "(", "Config", ".", "IN_PRODUCTION", ")", "{", "ddbClient", "=", "AmazonDynamoDBClientBuilder", ".", "sta...
Returns a client instance for AWS DynamoDB. @return a client that talks to DynamoDB
[ "Returns", "a", "client", "instance", "for", "AWS", "DynamoDB", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java#L105-L131
JavaMoney/jsr354-ri-bp
src/main/java/org/javamoney/moneta/spi/base/BaseMonetaryRoundingsSingletonSpi.java
BaseMonetaryRoundingsSingletonSpi.getRounding
public MonetaryRounding getRounding(String roundingName, String... providers) { """ Access a {@link javax.money.MonetaryRounding} using the rounding name. @param roundingName The rounding name, not null. @param providers the optional provider list and ordering to be used @return the corresponding {@link ja...
java
public MonetaryRounding getRounding(String roundingName, String... providers) { MonetaryRounding op = getRounding(RoundingQueryBuilder.of().setProviderNames(providers).setRoundingName(roundingName).build()); if(op==null) { throw new MonetaryException("No rounding provided wit...
[ "public", "MonetaryRounding", "getRounding", "(", "String", "roundingName", ",", "String", "...", "providers", ")", "{", "MonetaryRounding", "op", "=", "getRounding", "(", "RoundingQueryBuilder", ".", "of", "(", ")", ".", "setProviderNames", "(", "providers", ")",...
Access a {@link javax.money.MonetaryRounding} using the rounding name. @param roundingName The rounding name, not null. @param providers the optional provider list and ordering to be used @return the corresponding {@link javax.money.MonetaryOperator} implementing the rounding, never {@code null}. @throws IllegalArg...
[ "Access", "a", "{", "@link", "javax", ".", "money", ".", "MonetaryRounding", "}", "using", "the", "rounding", "name", "." ]
train
https://github.com/JavaMoney/jsr354-ri-bp/blob/9c147ef5623d8032a6dc4c0e5eefdfb41641a9a2/src/main/java/org/javamoney/moneta/spi/base/BaseMonetaryRoundingsSingletonSpi.java#L65-L72
peholmst/vaadin4spring
extensions/security/src/main/java/org/vaadin/spring/security/shared/DefaultVaadinSharedSecurity.java
DefaultVaadinSharedSecurity.unsuccessfulAuthentication
protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response) { """ Called by {@link #login(Authentication, boolean)} upon unsuccessful authentication. This implementation will clear the security context holder and inform the {@code RememberMeServices} of the failed login. ...
java
protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response) { LOGGER.debug("Authentication failed"); SecurityContextHolder.clearContext(); getRememberMeServices().loginFail(request, response); }
[ "protected", "void", "unsuccessfulAuthentication", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "LOGGER", ".", "debug", "(", "\"Authentication failed\"", ")", ";", "SecurityContextHolder", ".", "clearContext", "(", ")", ";", ...
Called by {@link #login(Authentication, boolean)} upon unsuccessful authentication. This implementation will clear the security context holder and inform the {@code RememberMeServices} of the failed login. @param request the current request. @param response the current response.
[ "Called", "by", "{", "@link", "#login", "(", "Authentication", "boolean", ")", "}", "upon", "unsuccessful", "authentication", ".", "This", "implementation", "will", "clear", "the", "security", "context", "holder", "and", "inform", "the", "{", "@code", "RememberM...
train
https://github.com/peholmst/vaadin4spring/blob/ea896012f15d6abea6e6391def9a0001113a1f7a/extensions/security/src/main/java/org/vaadin/spring/security/shared/DefaultVaadinSharedSecurity.java#L115-L119
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java
CpnlElFunctions.unmappedExternalUrl
public static String unmappedExternalUrl(SlingHttpServletRequest request, String path) { """ Builds an external (full qualified) URL for a repository path using the LinkUtil.getUnmappedURL() method. @param request the current request (domain host hint) @param path the repository path @return the URL built ...
java
public static String unmappedExternalUrl(SlingHttpServletRequest request, String path) { return LinkUtil.getAbsoluteUrl(request, LinkUtil.getUnmappedUrl(request, path)); }
[ "public", "static", "String", "unmappedExternalUrl", "(", "SlingHttpServletRequest", "request", ",", "String", "path", ")", "{", "return", "LinkUtil", ".", "getAbsoluteUrl", "(", "request", ",", "LinkUtil", ".", "getUnmappedUrl", "(", "request", ",", "path", ")", ...
Builds an external (full qualified) URL for a repository path using the LinkUtil.getUnmappedURL() method. @param request the current request (domain host hint) @param path the repository path @return the URL built in the context of the requested domain host
[ "Builds", "an", "external", "(", "full", "qualified", ")", "URL", "for", "a", "repository", "path", "using", "the", "LinkUtil", ".", "getUnmappedURL", "()", "method", "." ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/cpnl/CpnlElFunctions.java#L231-L233
OpenLiberty/open-liberty
dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/DistributedObjectCacheAdapter.java
DistributedObjectCacheAdapter.addAlias
@Override public void addAlias(Object key, Object[] aliasArray) { """ Adds one or more aliases 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 t...
java
@Override public void addAlias(Object key, Object[] aliasArray) { final String methodName = "addAlias(key, aliasArray)"; functionNotAvailable(methodName); }
[ "@", "Override", "public", "void", "addAlias", "(", "Object", "key", ",", "Object", "[", "]", "aliasArray", ")", "{", "final", "String", "methodName", "=", "\"addAlias(key, aliasArray)\"", ";", "functionNotAvailable", "(", "methodName", ")", ";", "}" ]
Adds one or more aliases 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 aliases to use for lookups @throws IllegalArgumentException if the key is not in...
[ "Adds", "one", "or", "more", "aliases", "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", "wi...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/DistributedObjectCacheAdapter.java#L964-L968
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java
GridBagLayoutBuilder.appendSeparator
public GridBagLayoutBuilder appendSeparator(String labelKey) { """ Appends a seperator (usually a horizonal line) using the provided string as the key to look in the {@link #setComponentFactory(ComponentFactory) ComponentFactory's}message bundle for the text to put along with the seperator. Has an implicit {@l...
java
public GridBagLayoutBuilder appendSeparator(String labelKey) { if (this.currentRowList.size() > 0) { nextLine(); } final JComponent separator = getComponentFactory().createLabeledSeparator(labelKey); return append(separator, 1, 1, true, false).nextLine(); }
[ "public", "GridBagLayoutBuilder", "appendSeparator", "(", "String", "labelKey", ")", "{", "if", "(", "this", ".", "currentRowList", ".", "size", "(", ")", ">", "0", ")", "{", "nextLine", "(", ")", ";", "}", "final", "JComponent", "separator", "=", "getComp...
Appends a seperator (usually a horizonal line) using the provided string as the key to look in the {@link #setComponentFactory(ComponentFactory) ComponentFactory's}message bundle for the text to put along with the seperator. Has an implicit {@link #nextLine()}before and after it. @return "this" to make it easier to st...
[ "Appends", "a", "seperator", "(", "usually", "a", "horizonal", "line", ")", "using", "the", "provided", "string", "as", "the", "key", "to", "look", "in", "the", "{", "@link", "#setComponentFactory", "(", "ComponentFactory", ")", "ComponentFactory", "s", "}", ...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java#L585-L591
groupe-sii/ogham
ogham-email-javamail/src/main/java/fr/sii/ogham/email/sender/impl/JavaMailSender.java
JavaMailSender.setRecipients
private void setRecipients(Email email, MimeMessage mimeMsg) throws MessagingException, AddressException, UnsupportedEncodingException { """ Set the recipients addresses on the mime message. @param email the source email @param mimeMsg the mime message to fill @throws MessagingException when the email addr...
java
private void setRecipients(Email email, MimeMessage mimeMsg) throws MessagingException, AddressException, UnsupportedEncodingException { for (Recipient recipient : email.getRecipients()) { mimeMsg.addRecipient(convert(recipient.getType()), toInternetAddress(recipient.getAddress())); } }
[ "private", "void", "setRecipients", "(", "Email", "email", ",", "MimeMessage", "mimeMsg", ")", "throws", "MessagingException", ",", "AddressException", ",", "UnsupportedEncodingException", "{", "for", "(", "Recipient", "recipient", ":", "email", ".", "getRecipients", ...
Set the recipients addresses on the mime message. @param email the source email @param mimeMsg the mime message to fill @throws MessagingException when the email address is not valid @throws AddressException when the email address is not valid @throws UnsupportedEncodingException when the email address is not valid
[ "Set", "the", "recipients", "addresses", "on", "the", "mime", "message", "." ]
train
https://github.com/groupe-sii/ogham/blob/e273b845604add74b5a25dfd931cb3c166b1008f/ogham-email-javamail/src/main/java/fr/sii/ogham/email/sender/impl/JavaMailSender.java#L165-L169
ironjacamar/ironjacamar
web/src/main/java/org/ironjacamar/web/console/HtmlAdaptorServlet.java
HtmlAdaptorServlet.invokeOpByName
private void invokeOpByName(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { """ Invoke a MBean operation given the method name and its signature. @param request The HTTP request @param response The HTTP response @exception ServletException Thrown if an erro...
java
private void invokeOpByName(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name = request.getParameter("name"); if (trace) log.trace("invokeOpByName, name=" + name); String[] argTypes = request.getParameterValues("argType"); ...
[ "private", "void", "invokeOpByName", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "String", "name", "=", "request", ".", "getParameter", "(", "\"name\"", ")", ";", "if", "...
Invoke a MBean operation given the method name and its signature. @param request The HTTP request @param response The HTTP response @exception ServletException Thrown if an error occurs @exception IOException Thrown if an I/O error occurs
[ "Invoke", "a", "MBean", "operation", "given", "the", "method", "name", "and", "its", "signature", "." ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/web/src/main/java/org/ironjacamar/web/console/HtmlAdaptorServlet.java#L294-L321
jayantk/jklol
src/com/jayantkrish/jklol/cfg/CfgParser.java
CfgParser.parseMarginal
public CfgParseChart parseMarginal(List<?> terminals, boolean useSumProduct) { """ Computes the marginal distribution over CFG parses given terminals. @param terminals @param useSumProduct @return """ Factor rootDist = TableFactor.unity(parentVar); return parseMarginal(terminals, rootDist, useSumP...
java
public CfgParseChart parseMarginal(List<?> terminals, boolean useSumProduct) { Factor rootDist = TableFactor.unity(parentVar); return parseMarginal(terminals, rootDist, useSumProduct); }
[ "public", "CfgParseChart", "parseMarginal", "(", "List", "<", "?", ">", "terminals", ",", "boolean", "useSumProduct", ")", "{", "Factor", "rootDist", "=", "TableFactor", ".", "unity", "(", "parentVar", ")", ";", "return", "parseMarginal", "(", "terminals", ","...
Computes the marginal distribution over CFG parses given terminals. @param terminals @param useSumProduct @return
[ "Computes", "the", "marginal", "distribution", "over", "CFG", "parses", "given", "terminals", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/cfg/CfgParser.java#L147-L150
jOOQ/jOOL
jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java
Agg.minBy
public static <T, U extends Comparable<? super U>> Collector<T, ?, Optional<T>> minBy(Function<? super T, ? extends U> function) { """ Get a {@link Collector} that calculates the <code>MIN()</code> function. """ return minBy(function, naturalOrder()); }
java
public static <T, U extends Comparable<? super U>> Collector<T, ?, Optional<T>> minBy(Function<? super T, ? extends U> function) { return minBy(function, naturalOrder()); }
[ "public", "static", "<", "T", ",", "U", "extends", "Comparable", "<", "?", "super", "U", ">", ">", "Collector", "<", "T", ",", "?", ",", "Optional", "<", "T", ">", ">", "minBy", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "U", ...
Get a {@link Collector} that calculates the <code>MIN()</code> function.
[ "Get", "a", "{" ]
train
https://github.com/jOOQ/jOOL/blob/889d87c85ca57bafd4eddd78e0f7ae2804d2ee86/jOOL-java-8/src/main/java/org/jooq/lambda/Agg.java#L207-L209
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/convert/PropertiesConverter.java
PropertiesConverter.setString
public int setString(String fieldPtr, boolean bDisplayOption, int iMoveMode) // init this field override for other value { """ Convert and move string to this field. Set this property in the property field. @param strString the state to set the data to. @param bDisplayOption Display the data ...
java
public int setString(String fieldPtr, boolean bDisplayOption, int iMoveMode) // init this field override for other value { if (this.getField() instanceof PropertiesField) // Always return ((PropertiesField)this.getField()).setProperty(m_strProperty, fieldPtr, bDisplayOption,...
[ "public", "int", "setString", "(", "String", "fieldPtr", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "// init this field override for other value", "{", "if", "(", "this", ".", "getField", "(", ")", "instanceof", "PropertiesField", ")", "// Alway...
Convert and move string to this field. Set this property in the property field. @param strString the state to set the data to. @param bDisplayOption Display the data on the screen if true. @param iMoveMode INIT, SCREEN, or READ move mode. @return The error code (or NORMAL_RETURN).
[ "Convert", "and", "move", "string", "to", "this", "field", ".", "Set", "this", "property", "in", "the", "property", "field", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/PropertiesConverter.java#L85-L90
shrinkwrap/resolver
maven/api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/repository/MavenRemoteRepositories.java
MavenRemoteRepositories.createRemoteRepository
public static MavenRemoteRepository createRemoteRepository(final String id, final URL url, final String layout) { """ Creates a new <code>MavenRemoteRepository</code> with ID and URL. Please note that the repository layout should always be set to default. @param id The unique ID of the repository to create (arb...
java
public static MavenRemoteRepository createRemoteRepository(final String id, final URL url, final String layout) { // Argument tests are inside the impl constructor return new MavenRemoteRepositoryImpl(id, url, layout); }
[ "public", "static", "MavenRemoteRepository", "createRemoteRepository", "(", "final", "String", "id", ",", "final", "URL", "url", ",", "final", "String", "layout", ")", "{", "// Argument tests are inside the impl constructor", "return", "new", "MavenRemoteRepositoryImpl", ...
Creates a new <code>MavenRemoteRepository</code> with ID and URL. Please note that the repository layout should always be set to default. @param id The unique ID of the repository to create (arbitrary name) @param url The base URL of the Maven repository @param layout he repository layout. Should always be "default" @...
[ "Creates", "a", "new", "<code", ">", "MavenRemoteRepository<", "/", "code", ">", "with", "ID", "and", "URL", ".", "Please", "note", "that", "the", "repository", "layout", "should", "always", "be", "set", "to", "default", "." ]
train
https://github.com/shrinkwrap/resolver/blob/e881a84b8cff5b0a014f2a5ebf612be3eb9db01f/maven/api-maven/src/main/java/org/jboss/shrinkwrap/resolver/api/maven/repository/MavenRemoteRepositories.java#L25-L28
rharter/auto-value-gson
auto-value-gson/src/main/java/com/ryanharter/auto/value/gson/AutoValueGsonAdapterFactoryProcessor.java
AutoValueGsonAdapterFactoryProcessor.classNameOf
private static String classNameOf(TypeElement type, String delimiter) { """ Returns the name of the given type, including any enclosing types but not the package, separated by a delimiter. """ String name = type.getSimpleName().toString(); while (type.getEnclosingElement() instanceof TypeElement) { ...
java
private static String classNameOf(TypeElement type, String delimiter) { String name = type.getSimpleName().toString(); while (type.getEnclosingElement() instanceof TypeElement) { type = (TypeElement) type.getEnclosingElement(); name = type.getSimpleName() + delimiter + name; } return name; ...
[ "private", "static", "String", "classNameOf", "(", "TypeElement", "type", ",", "String", "delimiter", ")", "{", "String", "name", "=", "type", ".", "getSimpleName", "(", ")", ".", "toString", "(", ")", ";", "while", "(", "type", ".", "getEnclosingElement", ...
Returns the name of the given type, including any enclosing types but not the package, separated by a delimiter.
[ "Returns", "the", "name", "of", "the", "given", "type", "including", "any", "enclosing", "types", "but", "not", "the", "package", "separated", "by", "a", "delimiter", "." ]
train
https://github.com/rharter/auto-value-gson/blob/68be3b6a208d25ac0580164f6372a38c279cf4fc/auto-value-gson/src/main/java/com/ryanharter/auto/value/gson/AutoValueGsonAdapterFactoryProcessor.java#L328-L335
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/Coin.java
Coin.valueOf
public static Coin valueOf(final int coins, final int cents) { """ Convert an amount expressed in the way humans are used to into satoshis. """ checkArgument(cents < 100); checkArgument(cents >= 0); checkArgument(coins >= 0); final Coin coin = COIN.multiply(coins).add(CENT.multi...
java
public static Coin valueOf(final int coins, final int cents) { checkArgument(cents < 100); checkArgument(cents >= 0); checkArgument(coins >= 0); final Coin coin = COIN.multiply(coins).add(CENT.multiply(cents)); return coin; }
[ "public", "static", "Coin", "valueOf", "(", "final", "int", "coins", ",", "final", "int", "cents", ")", "{", "checkArgument", "(", "cents", "<", "100", ")", ";", "checkArgument", "(", "cents", ">=", "0", ")", ";", "checkArgument", "(", "coins", ">=", "...
Convert an amount expressed in the way humans are used to into satoshis.
[ "Convert", "an", "amount", "expressed", "in", "the", "way", "humans", "are", "used", "to", "into", "satoshis", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/Coin.java#L109-L115
beanshell/beanshell
src/main/java/bsh/Types.java
Types.areSignaturesEqual
static boolean areSignaturesEqual(Class[] from, Class[] to) { """ Are the two signatures exactly equal? This is checked for a special case in overload resolution. """ if (from.length != to.length) return false; for (int i = 0; i < from.length; i++) if (from[i] != to[i]...
java
static boolean areSignaturesEqual(Class[] from, Class[] to) { if (from.length != to.length) return false; for (int i = 0; i < from.length; i++) if (from[i] != to[i]) return false; return true; }
[ "static", "boolean", "areSignaturesEqual", "(", "Class", "[", "]", "from", ",", "Class", "[", "]", "to", ")", "{", "if", "(", "from", ".", "length", "!=", "to", ".", "length", ")", "return", "false", ";", "for", "(", "int", "i", "=", "0", ";", "i...
Are the two signatures exactly equal? This is checked for a special case in overload resolution.
[ "Are", "the", "two", "signatures", "exactly", "equal?", "This", "is", "checked", "for", "a", "special", "case", "in", "overload", "resolution", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Types.java#L220-L230
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.getDiagnosticsItem
public HostingEnvironmentDiagnosticsInner getDiagnosticsItem(String resourceGroupName, String name, String diagnosticsName) { """ Get a diagnostics item for an App Service Environment. Get a diagnostics item for an App Service Environment. @param resourceGroupName Name of the resource group to which the resour...
java
public HostingEnvironmentDiagnosticsInner getDiagnosticsItem(String resourceGroupName, String name, String diagnosticsName) { return getDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName).toBlocking().single().body(); }
[ "public", "HostingEnvironmentDiagnosticsInner", "getDiagnosticsItem", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "diagnosticsName", ")", "{", "return", "getDiagnosticsItemWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ",", "...
Get a diagnostics item for an App Service Environment. Get a diagnostics item for an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param diagnosticsName Name of the diagnostics item. @throws IllegalArgumentE...
[ "Get", "a", "diagnostics", "item", "for", "an", "App", "Service", "Environment", ".", "Get", "a", "diagnostics", "item", "for", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L1607-L1609
braintree/browser-switch-android
browser-switch/src/main/java/com/braintreepayments/browserswitch/BrowserSwitchFragment.java
BrowserSwitchFragment.browserSwitch
public void browserSwitch(int requestCode, Intent intent) { """ Open a browser or <a href="https://developer.chrome.com/multidevice/android/customtabs">Chrome Custom Tab</a> with the given intent. @param requestCode the request code used to differentiate requests from one another. @param intent an {@link Inte...
java
public void browserSwitch(int requestCode, Intent intent) { if (requestCode == Integer.MIN_VALUE) { BrowserSwitchResult result = BrowserSwitchResult.ERROR .setErrorMessage("Request code cannot be Integer.MIN_VALUE"); onBrowserSwitchResult(requestCode, result, null); ...
[ "public", "void", "browserSwitch", "(", "int", "requestCode", ",", "Intent", "intent", ")", "{", "if", "(", "requestCode", "==", "Integer", ".", "MIN_VALUE", ")", "{", "BrowserSwitchResult", "result", "=", "BrowserSwitchResult", ".", "ERROR", ".", "setErrorMessa...
Open a browser or <a href="https://developer.chrome.com/multidevice/android/customtabs">Chrome Custom Tab</a> with the given intent. @param requestCode the request code used to differentiate requests from one another. @param intent an {@link Intent} containing a url to open.
[ "Open", "a", "browser", "or", "<a", "href", "=", "https", ":", "//", "developer", ".", "chrome", ".", "com", "/", "multidevice", "/", "android", "/", "customtabs", ">", "Chrome", "Custom", "Tab<", "/", "a", ">", "with", "the", "given", "intent", "." ]
train
https://github.com/braintree/browser-switch-android/blob/d830de21bc732b51e658e7296aad7b9037842a19/browser-switch/src/main/java/com/braintreepayments/browserswitch/BrowserSwitchFragment.java#L118-L144
jMotif/GI
src/main/java/net/seninp/gi/clusterrule/DistanceComputation.java
DistanceComputation.eculideanDistNorm
protected double eculideanDistNorm(double[] ts1, double[] ts2) { """ Normalized Euclidean distance. @param ts1 the first series. @param ts2 the second series. @return the distance value. """ double dist = 0; double tsLen = ts1.length; for (int i = 0; i < ts1.length; i++) { double d...
java
protected double eculideanDistNorm(double[] ts1, double[] ts2) { double dist = 0; double tsLen = ts1.length; for (int i = 0; i < ts1.length; i++) { double diff = ts1[i] - ts2[i]; dist += Math.pow(diff, 2); } return Math.sqrt(dist) / tsLen; }
[ "protected", "double", "eculideanDistNorm", "(", "double", "[", "]", "ts1", ",", "double", "[", "]", "ts2", ")", "{", "double", "dist", "=", "0", ";", "double", "tsLen", "=", "ts1", ".", "length", ";", "for", "(", "int", "i", "=", "0", ";", "i", ...
Normalized Euclidean distance. @param ts1 the first series. @param ts2 the second series. @return the distance value.
[ "Normalized", "Euclidean", "distance", "." ]
train
https://github.com/jMotif/GI/blob/381212dd4f193246a6df82bd46f0d2bcd04a68d6/src/main/java/net/seninp/gi/clusterrule/DistanceComputation.java#L76-L86
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/IOIssues.java
IOIssues.visitCode
@Override public void visitCode(Code obj) { """ implements the visitor to reset the opcode stack @param obj the currently parsed code block """ stack.resetForMethodEntry(this); unendedZLIBs.clear(); super.visitCode(obj); for (SourceLineAnnotation sa : unendedZLIBs.value...
java
@Override public void visitCode(Code obj) { stack.resetForMethodEntry(this); unendedZLIBs.clear(); super.visitCode(obj); for (SourceLineAnnotation sa : unendedZLIBs.values()) { bugReporter.reportBug(new BugInstance(this, BugType.IOI_UNENDED_ZLIB_OBJECT.name(), NORMAL_PR...
[ "@", "Override", "public", "void", "visitCode", "(", "Code", "obj", ")", "{", "stack", ".", "resetForMethodEntry", "(", "this", ")", ";", "unendedZLIBs", ".", "clear", "(", ")", ";", "super", ".", "visitCode", "(", "obj", ")", ";", "for", "(", "SourceL...
implements the visitor to reset the opcode stack @param obj the currently parsed code block
[ "implements", "the", "visitor", "to", "reset", "the", "opcode", "stack" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/IOIssues.java#L129-L140
structurizr/java
structurizr-core/src/com/structurizr/view/ViewSet.java
ViewSet.createDynamicView
public DynamicView createDynamicView(Container container, String key, String description) { """ Creates a dynamic view, where the scope is the specified container. The following elements can be added to the resulting view: <ul> <li>People</li> <li>Software systems</li> <li>Containers with the same parent so...
java
public DynamicView createDynamicView(Container container, String key, String description) { assertThatTheContainerIsNotNull(container); assertThatTheViewKeyIsSpecifiedAndUnique(key); DynamicView view = new DynamicView(container, key, description); view.setViewSet(this); dynamicV...
[ "public", "DynamicView", "createDynamicView", "(", "Container", "container", ",", "String", "key", ",", "String", "description", ")", "{", "assertThatTheContainerIsNotNull", "(", "container", ")", ";", "assertThatTheViewKeyIsSpecifiedAndUnique", "(", "key", ")", ";", ...
Creates a dynamic view, where the scope is the specified container. The following elements can be added to the resulting view: <ul> <li>People</li> <li>Software systems</li> <li>Containers with the same parent software system as the specified container</li> <li>Components within the specified container</li> </ul> @pa...
[ "Creates", "a", "dynamic", "view", "where", "the", "scope", "is", "the", "specified", "container", ".", "The", "following", "elements", "can", "be", "added", "to", "the", "resulting", "view", ":" ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/view/ViewSet.java#L179-L187
kaazing/gateway
transport/http/src/main/java/org/kaazing/gateway/transport/http/bridge/filter/HttpBaseSecurityFilter.java
HttpBaseSecurityFilter.writeResponse
protected void writeResponse(final HttpStatus httpStatus, final String httpBodyReason, final NextFilter nextFilter, final IoSession session, final HttpRequestMessage httpRequest) { """...
java
protected void writeResponse(final HttpStatus httpStatus, final String httpBodyReason, final NextFilter nextFilter, final IoSession session, final HttpRequestMessage httpRequest) { ...
[ "protected", "void", "writeResponse", "(", "final", "HttpStatus", "httpStatus", ",", "final", "String", "httpBodyReason", ",", "final", "NextFilter", "nextFilter", ",", "final", "IoSession", "session", ",", "final", "HttpRequestMessage", "httpRequest", ")", "{", "//...
Write a response back to the client (downstream) with a particular Http Status code. @param httpStatus the http status to write onto the response @param httpBodyReason the http status reason to write into the <em>body</em> of the message @param nextFilter the next filter to write the reply to @param session the cli...
[ "Write", "a", "response", "back", "to", "the", "client", "(", "downstream", ")", "with", "a", "particular", "Http", "Status", "code", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/transport/http/src/main/java/org/kaazing/gateway/transport/http/bridge/filter/HttpBaseSecurityFilter.java#L73-L86
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java
XmlUtil.getNodeByXPath
public static Node getNodeByXPath(String expression, Object source) { """ 通过XPath方式读取XML节点等信息<br> Xpath相关文章:https://www.ibm.com/developerworks/cn/xml/x-javaxpathapi.html @param expression XPath表达式 @param source 资源,可以是Docunent、Node节点等 @return 匹配返回类型的值 @since 4.0.9 """ return (Node) getByXPath(expressi...
java
public static Node getNodeByXPath(String expression, Object source) { return (Node) getByXPath(expression, source, XPathConstants.NODE); }
[ "public", "static", "Node", "getNodeByXPath", "(", "String", "expression", ",", "Object", "source", ")", "{", "return", "(", "Node", ")", "getByXPath", "(", "expression", ",", "source", ",", "XPathConstants", ".", "NODE", ")", ";", "}" ]
通过XPath方式读取XML节点等信息<br> Xpath相关文章:https://www.ibm.com/developerworks/cn/xml/x-javaxpathapi.html @param expression XPath表达式 @param source 资源,可以是Docunent、Node节点等 @return 匹配返回类型的值 @since 4.0.9
[ "通过XPath方式读取XML节点等信息<br", ">", "Xpath相关文章:https", ":", "//", "www", ".", "ibm", ".", "com", "/", "developerworks", "/", "cn", "/", "xml", "/", "x", "-", "javaxpathapi", ".", "html" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/XmlUtil.java#L598-L600
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java
AbstractMemberWriter.addModifiers
protected void addModifiers(Element member, Content htmltree) { """ Add the modifier for the member. The modifiers are ordered as specified by <em>The Java Language Specification</em>. @param member the member for which teh modifier will be added. @param htmltree the content tree to which the modifier informa...
java
protected void addModifiers(Element member, Content htmltree) { Set<Modifier> set = new TreeSet<>(member.getModifiers()); // remove the ones we really don't need set.remove(NATIVE); set.remove(SYNCHRONIZED); set.remove(STRICTFP); // According to JLS, we should not be sh...
[ "protected", "void", "addModifiers", "(", "Element", "member", ",", "Content", "htmltree", ")", "{", "Set", "<", "Modifier", ">", "set", "=", "new", "TreeSet", "<>", "(", "member", ".", "getModifiers", "(", ")", ")", ";", "// remove the ones we really don't ne...
Add the modifier for the member. The modifiers are ordered as specified by <em>The Java Language Specification</em>. @param member the member for which teh modifier will be added. @param htmltree the content tree to which the modifier information will be added.
[ "Add", "the", "modifier", "for", "the", "member", ".", "The", "modifiers", "are", "ordered", "as", "specified", "by", "<em", ">", "The", "Java", "Language", "Specification<", "/", "em", ">", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java#L234-L264
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/DeckReference.java
DeckReference.getDeckReference
public static synchronized DeckReference getDeckReference(int player, int hotCue) { """ Get a unique reference to a place where a track is currently loaded in a player. @param player the player in which the track is loaded @param hotCue hot cue number in which the track is loaded, or 0 if it is actively loaded...
java
public static synchronized DeckReference getDeckReference(int player, int hotCue) { Map<Integer, DeckReference> playerMap = instances.get(player); if (playerMap == null) { playerMap = new HashMap<Integer, DeckReference>(); instances.put(player, playerMap); } DeckR...
[ "public", "static", "synchronized", "DeckReference", "getDeckReference", "(", "int", "player", ",", "int", "hotCue", ")", "{", "Map", "<", "Integer", ",", "DeckReference", ">", "playerMap", "=", "instances", ".", "get", "(", "player", ")", ";", "if", "(", ...
Get a unique reference to a place where a track is currently loaded in a player. @param player the player in which the track is loaded @param hotCue hot cue number in which the track is loaded, or 0 if it is actively loaded on the playback deck @return the instance that will always represent a reference to the specif...
[ "Get", "a", "unique", "reference", "to", "a", "place", "where", "a", "track", "is", "currently", "loaded", "in", "a", "player", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/DeckReference.java#L50-L62
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getProfessionInfo
public void getProfessionInfo(String[] ids, Callback<List<Profession>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on professions API go <a href="https://wiki.guildwars2.com/wiki/API:2/professions">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)}...
java
public void getProfessionInfo(String[] ids, Callback<List<Profession>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getProfessionInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getProfessionInfo", "(", "String", "[", "]", "ids", ",", "Callback", "<", "List", "<", "Profession", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(",...
For more info on professions API go <a href="https://wiki.guildwars2.com/wiki/API:2/professions">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of profession id @param callback callba...
[ "For", "more", "info", "on", "professions", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "professions", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "u...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1992-L1995
aws/aws-sdk-java
aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/SimulationJob.java
SimulationJob.withTags
public SimulationJob withTags(java.util.Map<String, String> tags) { """ <p> A map that contains tag keys and tag values that are attached to the simulation job. </p> @param tags A map that contains tag keys and tag values that are attached to the simulation job. @return Returns a reference to this object so...
java
public SimulationJob withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "SimulationJob", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> A map that contains tag keys and tag values that are attached to the simulation job. </p> @param tags A map that contains tag keys and tag values that are attached to the simulation job. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "A", "map", "that", "contains", "tag", "keys", "and", "tag", "values", "that", "are", "attached", "to", "the", "simulation", "job", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/SimulationJob.java#L984-L987
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetAutomationRuleResourcesImpl.java
SheetAutomationRuleResourcesImpl.updateAutomationRule
public AutomationRule updateAutomationRule(long sheetId, AutomationRule automationRule) throws SmartsheetException { """ Updates an automation rule. It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/automationrules/{automationRuleId} Exceptions: IllegalArgumentException : if any ...
java
public AutomationRule updateAutomationRule(long sheetId, AutomationRule automationRule) throws SmartsheetException { Util.throwIfNull(automationRule); return this.updateResource("sheets/" + sheetId + "/automationrules/" + automationRule.getId(), AutomationRule.class, automationRule); ...
[ "public", "AutomationRule", "updateAutomationRule", "(", "long", "sheetId", ",", "AutomationRule", "automationRule", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "automationRule", ")", ";", "return", "this", ".", "updateResource", "(", ...
Updates an automation rule. It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/automationrules/{automationRuleId} Exceptions: IllegalArgumentException : if any argument is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is a...
[ "Updates", "an", "automation", "rule", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetAutomationRuleResourcesImpl.java#L114-L118
treelogic-swe/aws-mock
example/java/full/client-usage/TerminateInstancesExample.java
TerminateInstancesExample.terminateInstances
public static List<InstanceStateChange> terminateInstances(final List<String> instanceIDs) { """ Terminate specified instances (power-on the instances). @param instanceIDs IDs of the instances to terminate @return a list of state changes for the instances """ // pass any credentials as aws-mock do...
java
public static List<InstanceStateChange> terminateInstances(final List<String> instanceIDs) { // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials...
[ "public", "static", "List", "<", "InstanceStateChange", ">", "terminateInstances", "(", "final", "List", "<", "String", ">", "instanceIDs", ")", "{", "// pass any credentials as aws-mock does not authenticate them at all", "AWSCredentials", "credentials", "=", "new", "Basic...
Terminate specified instances (power-on the instances). @param instanceIDs IDs of the instances to terminate @return a list of state changes for the instances
[ "Terminate", "specified", "instances", "(", "power", "-", "on", "the", "instances", ")", "." ]
train
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/example/java/full/client-usage/TerminateInstancesExample.java#L34-L49
samskivert/pythagoras
src/main/java/pythagoras/f/Crossing.java
Crossing.crossShape
public static int crossShape (IShape s, float x, float y) { """ Returns how many times a ray from point (x,y) crosses a shape. """ if (!s.bounds().contains(x, y)) { return 0; } return crossPath(s.pathIterator(null), x, y); }
java
public static int crossShape (IShape s, float x, float y) { if (!s.bounds().contains(x, y)) { return 0; } return crossPath(s.pathIterator(null), x, y); }
[ "public", "static", "int", "crossShape", "(", "IShape", "s", ",", "float", "x", ",", "float", "y", ")", "{", "if", "(", "!", "s", ".", "bounds", "(", ")", ".", "contains", "(", "x", ",", "y", ")", ")", "{", "return", "0", ";", "}", "return", ...
Returns how many times a ray from point (x,y) crosses a shape.
[ "Returns", "how", "many", "times", "a", "ray", "from", "point", "(", "x", "y", ")", "crosses", "a", "shape", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/f/Crossing.java#L474-L479
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java
KickflipApiClient.getStreamInfo
public void getStreamInfo(Stream stream, final KickflipCallback cb) { """ Get Stream Metadata for a a public {@link io.kickflip.sdk.api.json.Stream}. The target Stream must belong a User of your Kickflip app. @param stream the {@link io.kickflip.sdk.api.json.Stream} to get Meta data for @param cb A callba...
java
public void getStreamInfo(Stream stream, final KickflipCallback cb) { GenericData data = new GenericData(); data.put("stream_id", stream.getStreamId()); post(GET_META, new UrlEncodedContent(data), Stream.class, cb); }
[ "public", "void", "getStreamInfo", "(", "Stream", "stream", ",", "final", "KickflipCallback", "cb", ")", "{", "GenericData", "data", "=", "new", "GenericData", "(", ")", ";", "data", ".", "put", "(", "\"stream_id\"", ",", "stream", ".", "getStreamId", "(", ...
Get Stream Metadata for a a public {@link io.kickflip.sdk.api.json.Stream}. The target Stream must belong a User of your Kickflip app. @param stream the {@link io.kickflip.sdk.api.json.Stream} to get Meta data for @param cb A callback to receive the updated Stream upon request completion
[ "Get", "Stream", "Metadata", "for", "a", "a", "public", "{", "@link", "io", ".", "kickflip", ".", "sdk", ".", "api", ".", "json", ".", "Stream", "}", ".", "The", "target", "Stream", "must", "belong", "a", "User", "of", "your", "Kickflip", "app", "." ...
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java#L440-L445
primefaces-extensions/core
src/main/java/org/primefaces/extensions/component/sheet/SheetRenderer.java
SheetRenderer.encodeHeader
private void encodeHeader(final FacesContext context, final ResponseWriter responseWriter, final Sheet sheet) throws IOException { """ Encode the Sheet header @param context @param responseWriter @param sheet @throws IOException """ // header final UIComponent header = she...
java
private void encodeHeader(final FacesContext context, final ResponseWriter responseWriter, final Sheet sheet) throws IOException { // header final UIComponent header = sheet.getFacet("header"); if (header != null) { responseWriter.startElement("div", null); ...
[ "private", "void", "encodeHeader", "(", "final", "FacesContext", "context", ",", "final", "ResponseWriter", "responseWriter", ",", "final", "Sheet", "sheet", ")", "throws", "IOException", "{", "// header", "final", "UIComponent", "header", "=", "sheet", ".", "getF...
Encode the Sheet header @param context @param responseWriter @param sheet @throws IOException
[ "Encode", "the", "Sheet", "header" ]
train
https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/component/sheet/SheetRenderer.java#L684-L694
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/CmsGalleryController.java
CmsGalleryController.openPreview
public void openPreview(String resourcePath, String resourceType) { """ Opens the preview for the given resource by the given resource type.<p> @param resourcePath the resource path @param resourceType the resource type name """ if (m_currentPreview != null) { m_currentPreview.removePr...
java
public void openPreview(String resourcePath, String resourceType) { if (m_currentPreview != null) { m_currentPreview.removePreview(); } String provider = getProviderName(resourceType); if (m_previewFactoryRegistration.containsKey(provider)) { m_handler.m_galleryD...
[ "public", "void", "openPreview", "(", "String", "resourcePath", ",", "String", "resourceType", ")", "{", "if", "(", "m_currentPreview", "!=", "null", ")", "{", "m_currentPreview", ".", "removePreview", "(", ")", ";", "}", "String", "provider", "=", "getProvide...
Opens the preview for the given resource by the given resource type.<p> @param resourcePath the resource path @param resourceType the resource type name
[ "Opens", "the", "preview", "for", "the", "given", "resource", "by", "the", "given", "resource", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/CmsGalleryController.java#L1009-L1024
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java
Functions.randomString
public static String randomString(Long numberOfLetters, boolean useNumbers, TestContext context) { """ Runs random string function with arguments. @param numberOfLetters @param useNumbers @return """ return randomString(numberOfLetters, RandomStringFunction.MIXED, useNumbers, context); }
java
public static String randomString(Long numberOfLetters, boolean useNumbers, TestContext context) { return randomString(numberOfLetters, RandomStringFunction.MIXED, useNumbers, context); }
[ "public", "static", "String", "randomString", "(", "Long", "numberOfLetters", ",", "boolean", "useNumbers", ",", "TestContext", "context", ")", "{", "return", "randomString", "(", "numberOfLetters", ",", "RandomStringFunction", ".", "MIXED", ",", "useNumbers", ",", ...
Runs random string function with arguments. @param numberOfLetters @param useNumbers @return
[ "Runs", "random", "string", "function", "with", "arguments", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java#L197-L199
VoltDB/voltdb
src/frontend/org/voltdb/exportclient/ExportEncoder.java
ExportEncoder.encodeString
static public void encodeString(final FastSerializer fs, String value) throws IOException { """ Read a string according to the Export encoding specification @param fds @throws IOException """ final byte[] strdata = value.getBytes("UTF-8"); fs.writeInt(strdata.length); fs.write(s...
java
static public void encodeString(final FastSerializer fs, String value) throws IOException { final byte[] strdata = value.getBytes("UTF-8"); fs.writeInt(strdata.length); fs.write(strdata); }
[ "static", "public", "void", "encodeString", "(", "final", "FastSerializer", "fs", ",", "String", "value", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "strdata", "=", "value", ".", "getBytes", "(", "\"UTF-8\"", ")", ";", "fs", ".", "writeI...
Read a string according to the Export encoding specification @param fds @throws IOException
[ "Read", "a", "string", "according", "to", "the", "Export", "encoding", "specification" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/exportclient/ExportEncoder.java#L235-L240
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/Controller.java
Controller.mapInField
void mapInField(Object from, String from_field, Object to, String to_in) { """ Map an input field. @param from @param from_field @param to @param to_in """ if (to == ca.getComponent()) { throw new ComponentException("wrong connect:" + from_field); } ComponentAccess ca_...
java
void mapInField(Object from, String from_field, Object to, String to_in) { if (to == ca.getComponent()) { throw new ComponentException("wrong connect:" + from_field); } ComponentAccess ca_to = lookup(to); Access to_access = ca_to.input(to_in); checkFA(to_access, to, t...
[ "void", "mapInField", "(", "Object", "from", ",", "String", "from_field", ",", "Object", "to", ",", "String", "to_in", ")", "{", "if", "(", "to", "==", "ca", ".", "getComponent", "(", ")", ")", "{", "throw", "new", "ComponentException", "(", "\"wrong con...
Map an input field. @param from @param from_field @param to @param to_in
[ "Map", "an", "input", "field", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/Controller.java#L165-L182
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/locale/LocaleHelper.java
LocaleHelper.getLocaleNativeDisplayName
@Nonnull public static String getLocaleNativeDisplayName (@Nonnull final Locale aLocale) { """ Get the display name of the passed locale <em>in</em> the passed locale. @param aLocale The locale to use. May not be <code>null</code>. @return The native display name of the passed locale. """ ValueEnfor...
java
@Nonnull public static String getLocaleNativeDisplayName (@Nonnull final Locale aLocale) { ValueEnforcer.notNull (aLocale, "Locale"); return getLocaleDisplayName (aLocale, aLocale); }
[ "@", "Nonnull", "public", "static", "String", "getLocaleNativeDisplayName", "(", "@", "Nonnull", "final", "Locale", "aLocale", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aLocale", ",", "\"Locale\"", ")", ";", "return", "getLocaleDisplayName", "(", "aLocale",...
Get the display name of the passed locale <em>in</em> the passed locale. @param aLocale The locale to use. May not be <code>null</code>. @return The native display name of the passed locale.
[ "Get", "the", "display", "name", "of", "the", "passed", "locale", "<em", ">", "in<", "/", "em", ">", "the", "passed", "locale", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/locale/LocaleHelper.java#L165-L170
SvenEwald/xmlbeam
src/main/java/org/xmlbeam/DefaultXPathBinder.java
DefaultXPathBinder.asBoolean
@Override public CloseableValue<Boolean> asBoolean() { """ Evaluates the XPath as a boolean value. This method is just a shortcut for as(Boolean.TYPE); @return true when the selected value equals (ignoring case) 'true' """ final Class<?> callerClass = ReflectionHelper.getDirectCallerClass(); ...
java
@Override public CloseableValue<Boolean> asBoolean() { final Class<?> callerClass = ReflectionHelper.getDirectCallerClass(); return bindSingeValue(Boolean.TYPE, callerClass); }
[ "@", "Override", "public", "CloseableValue", "<", "Boolean", ">", "asBoolean", "(", ")", "{", "final", "Class", "<", "?", ">", "callerClass", "=", "ReflectionHelper", ".", "getDirectCallerClass", "(", ")", ";", "return", "bindSingeValue", "(", "Boolean", ".", ...
Evaluates the XPath as a boolean value. This method is just a shortcut for as(Boolean.TYPE); @return true when the selected value equals (ignoring case) 'true'
[ "Evaluates", "the", "XPath", "as", "a", "boolean", "value", ".", "This", "method", "is", "just", "a", "shortcut", "for", "as", "(", "Boolean", ".", "TYPE", ")", ";" ]
train
https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/DefaultXPathBinder.java#L76-L80
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.setPerspectiveRect
public Matrix4f setPerspectiveRect(float width, float height, float zNear, float zFar) { """ Set this matrix to be a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> In order to apply the perspective projection ...
java
public Matrix4f setPerspectiveRect(float width, float height, float zNear, float zFar) { return setPerspectiveRect(width, height, zNear, zFar, false); }
[ "public", "Matrix4f", "setPerspectiveRect", "(", "float", "width", ",", "float", "height", ",", "float", "zNear", ",", "float", "zFar", ")", "{", "return", "setPerspectiveRect", "(", "width", ",", "height", ",", "zNear", ",", "zFar", ",", "false", ")", ";"...
Set this matrix to be a symmetric perspective projection frustum transformation for a right-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> In order to apply the perspective projection transformation to an existing transformation, use {@link #perspectiveRect(float, float, float, float)...
[ "Set", "this", "matrix", "to", "be", "a", "symmetric", "perspective", "projection", "frustum", "transformation", "for", "a", "right", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", ".....
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L9932-L9934
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.delegatedAccount_email_PUT
public void delegatedAccount_email_PUT(String email, OvhAccountDelegated body) throws IOException { """ Alter this object properties REST: PUT /email/domain/delegatedAccount/{email} @param body [required] New object properties @param email [required] Email """ String qPath = "/email/domain/delegatedAcco...
java
public void delegatedAccount_email_PUT(String email, OvhAccountDelegated body) throws IOException { String qPath = "/email/domain/delegatedAccount/{email}"; StringBuilder sb = path(qPath, email); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "delegatedAccount_email_PUT", "(", "String", "email", ",", "OvhAccountDelegated", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/delegatedAccount/{email}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ...
Alter this object properties REST: PUT /email/domain/delegatedAccount/{email} @param body [required] New object properties @param email [required] Email
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L285-L289
dyu/protostuff-1.0.x
protostuff-runtime/src/main/java/com/dyuproject/protostuff/runtime/DerivativeSchema.java
DerivativeSchema.mergeFrom
public void mergeFrom(Input input, final Object owner) throws IOException { """ Delegates to the schema derived from the input. The {@code owner} owns the message (polymorphic) that is tied to this schema. """ final int first = input.readFieldNumber(this); if(first != ID_POJO) thro...
java
public void mergeFrom(Input input, final Object owner) throws IOException { final int first = input.readFieldNumber(this); if(first != ID_POJO) throw new ProtostuffException("order not preserved."); doMergeFrom(input, strategy.resolvePojoFrom(input, ID_P...
[ "public", "void", "mergeFrom", "(", "Input", "input", ",", "final", "Object", "owner", ")", "throws", "IOException", "{", "final", "int", "first", "=", "input", ".", "readFieldNumber", "(", "this", ")", ";", "if", "(", "first", "!=", "ID_POJO", ")", "thr...
Delegates to the schema derived from the input. The {@code owner} owns the message (polymorphic) that is tied to this schema.
[ "Delegates", "to", "the", "schema", "derived", "from", "the", "input", ".", "The", "{" ]
train
https://github.com/dyu/protostuff-1.0.x/blob/d7c964ec20da3fe44699d86ee95c2677ddffde96/protostuff-runtime/src/main/java/com/dyuproject/protostuff/runtime/DerivativeSchema.java#L85-L94
google/closure-compiler
src/com/google/javascript/jscomp/DestructuringGlobalNameExtractor.java
DestructuringGlobalNameExtractor.reassignDestructringLvalue
static void reassignDestructringLvalue( Node stringKey, Node newName, @Nullable Set<AstChange> newNodes, Ref ref, AbstractCompiler compiler) { """ Given an lvalue in a destructuring pattern, and a detached subtree, rewrites the AST to assign the lvalue to the subtree instead of its p...
java
static void reassignDestructringLvalue( Node stringKey, Node newName, @Nullable Set<AstChange> newNodes, Ref ref, AbstractCompiler compiler) { Node pattern = stringKey.getParent(); Node assignmentType = pattern.getParent(); checkState(assignmentType.isAssign() || assignmentType...
[ "static", "void", "reassignDestructringLvalue", "(", "Node", "stringKey", ",", "Node", "newName", ",", "@", "Nullable", "Set", "<", "AstChange", ">", "newNodes", ",", "Ref", "ref", ",", "AbstractCompiler", "compiler", ")", "{", "Node", "pattern", "=", "stringK...
Given an lvalue in a destructuring pattern, and a detached subtree, rewrites the AST to assign the lvalue to the subtree instead of its previous value, while preserving the rest of the destructuring pattern <p>For example: given stringKey: 'y' and newName: 'new.name', where 'y' is contained in the declaration `const {...
[ "Given", "an", "lvalue", "in", "a", "destructuring", "pattern", "and", "a", "detached", "subtree", "rewrites", "the", "AST", "to", "assign", "the", "lvalue", "to", "the", "subtree", "instead", "of", "its", "previous", "value", "while", "preserving", "the", "...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/DestructuringGlobalNameExtractor.java#L60-L112