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
kstateome/canvas-api
src/main/java/edu/ksu/canvas/impl/ExternalToolImpl.java
ExternalToolImpl.ensureToolValidForCreation
private void ensureToolValidForCreation(ExternalTool tool) { """ Ensure that a tool object is valid for creation. The API requires certain fields to be filled out. Throws an IllegalArgumentException if the conditions are not met. @param tool The external tool object we are trying to create """ //chec...
java
private void ensureToolValidForCreation(ExternalTool tool) { //check for the unconditionally required fields if(StringUtils.isAnyBlank(tool.getName(), tool.getPrivacyLevel(), tool.getConsumerKey(), tool.getSharedSecret())) { throw new IllegalArgumentException("External tool requires all of t...
[ "private", "void", "ensureToolValidForCreation", "(", "ExternalTool", "tool", ")", "{", "//check for the unconditionally required fields", "if", "(", "StringUtils", ".", "isAnyBlank", "(", "tool", ".", "getName", "(", ")", ",", "tool", ".", "getPrivacyLevel", "(", "...
Ensure that a tool object is valid for creation. The API requires certain fields to be filled out. Throws an IllegalArgumentException if the conditions are not met. @param tool The external tool object we are trying to create
[ "Ensure", "that", "a", "tool", "object", "is", "valid", "for", "creation", ".", "The", "API", "requires", "certain", "fields", "to", "be", "filled", "out", ".", "Throws", "an", "IllegalArgumentException", "if", "the", "conditions", "are", "not", "met", "." ]
train
https://github.com/kstateome/canvas-api/blob/426bf403a8fd7aca3f170348005feda25b374e5a/src/main/java/edu/ksu/canvas/impl/ExternalToolImpl.java#L139-L148
sporniket/core
sporniket-core-io/src/main/java/com/sporniket/libre/io/AbstractTextFileConverter.java
AbstractTextFileConverter.openInputFile
private void openInputFile(final String inputFileName) throws IOException { """ Prepare the input stream. @param inputFileName the file to read from. @throws IOException if a problem occurs. """ myInputFile = new File(inputFileName); myInputStream = new FileInputStream(myInputFile); myStreamReader ...
java
private void openInputFile(final String inputFileName) throws IOException { myInputFile = new File(inputFileName); myInputStream = new FileInputStream(myInputFile); myStreamReader = new InputStreamReader(myInputStream, getInputEncodingCode()); myBufferedReader = new BufferedReader(myStreamReader); myLineRead...
[ "private", "void", "openInputFile", "(", "final", "String", "inputFileName", ")", "throws", "IOException", "{", "myInputFile", "=", "new", "File", "(", "inputFileName", ")", ";", "myInputStream", "=", "new", "FileInputStream", "(", "myInputFile", ")", ";", "mySt...
Prepare the input stream. @param inputFileName the file to read from. @throws IOException if a problem occurs.
[ "Prepare", "the", "input", "stream", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-io/src/main/java/com/sporniket/libre/io/AbstractTextFileConverter.java#L403-L410
eclecticlogic/pedal-dialect
src/main/java/com/eclecticlogic/pedal/provider/hibernate/ArrayType.java
ArrayType.setArrayValue
protected void setArrayValue(final PreparedStatement statement, final int i, Connection connection, Object[] array) throws SQLException { """ Stores the array conforming to the EMPTY_IS_NULL directive. @see org.hibernate.usertype.UserType#nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int, ...
java
protected void setArrayValue(final PreparedStatement statement, final int i, Connection connection, Object[] array) throws SQLException { if (array == null || (isEmptyStoredAsNull() && array.length == 0)) { statement.setNull(i, Types.ARRAY); } else { statement.setArra...
[ "protected", "void", "setArrayValue", "(", "final", "PreparedStatement", "statement", ",", "final", "int", "i", ",", "Connection", "connection", ",", "Object", "[", "]", "array", ")", "throws", "SQLException", "{", "if", "(", "array", "==", "null", "||", "("...
Stores the array conforming to the EMPTY_IS_NULL directive. @see org.hibernate.usertype.UserType#nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int, org.hibernate.engine.spi.SessionImplementor)
[ "Stores", "the", "array", "conforming", "to", "the", "EMPTY_IS_NULL", "directive", "." ]
train
https://github.com/eclecticlogic/pedal-dialect/blob/d92ccff34ef2363ce0db7ae4976302833182115b/src/main/java/com/eclecticlogic/pedal/provider/hibernate/ArrayType.java#L64-L71
primefaces/primefaces
src/main/java/org/primefaces/util/ComponentUtils.java
ComponentUtils.findParentForm
@Deprecated public static UIComponent findParentForm(FacesContext context, UIComponent component) { """ Use {@link ComponentTraversalUtils#closestForm(javax.faces.context.FacesContext, javax.faces.component.UIComponent)} instead. @param context @param component @return @deprecated """ return ...
java
@Deprecated public static UIComponent findParentForm(FacesContext context, UIComponent component) { return ComponentTraversalUtils.closestForm(context, component); }
[ "@", "Deprecated", "public", "static", "UIComponent", "findParentForm", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "{", "return", "ComponentTraversalUtils", ".", "closestForm", "(", "context", ",", "component", ")", ";", "}" ]
Use {@link ComponentTraversalUtils#closestForm(javax.faces.context.FacesContext, javax.faces.component.UIComponent)} instead. @param context @param component @return @deprecated
[ "Use", "{", "@link", "ComponentTraversalUtils#closestForm", "(", "javax", ".", "faces", ".", "context", ".", "FacesContext", "javax", ".", "faces", ".", "component", ".", "UIComponent", ")", "}", "instead", "." ]
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/util/ComponentUtils.java#L419-L422
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.setMultiMapConfigs
public Config setMultiMapConfigs(Map<String, MultiMapConfig> multiMapConfigs) { """ Sets the map of {@link com.hazelcast.core.MultiMap} configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param multiMapConfigs the multimap confi...
java
public Config setMultiMapConfigs(Map<String, MultiMapConfig> multiMapConfigs) { this.multiMapConfigs.clear(); this.multiMapConfigs.putAll(multiMapConfigs); for (final Entry<String, MultiMapConfig> entry : this.multiMapConfigs.entrySet()) { entry.getValue().setName(entry.getKey()); ...
[ "public", "Config", "setMultiMapConfigs", "(", "Map", "<", "String", ",", "MultiMapConfig", ">", "multiMapConfigs", ")", "{", "this", ".", "multiMapConfigs", ".", "clear", "(", ")", ";", "this", ".", "multiMapConfigs", ".", "putAll", "(", "multiMapConfigs", ")...
Sets the map of {@link com.hazelcast.core.MultiMap} configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param multiMapConfigs the multimap configuration map to set @return this config instance
[ "Sets", "the", "map", "of", "{", "@link", "com", ".", "hazelcast", ".", "core", ".", "MultiMap", "}", "configurations", "mapped", "by", "config", "name", ".", "The", "config", "name", "may", "be", "a", "pattern", "with", "which", "the", "configuration", ...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L1098-L1105
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java
DTMDocumentImpl.appendComment
void appendComment(int m_char_current_start,int contentLength) { """ Append a comment child at the current insertion point. Assumes that the actual content of the comment has previously been appended to the m_char buffer (shared with the builder). @param m_char_current_start int Starting offset of node's cont...
java
void appendComment(int m_char_current_start,int contentLength) { // create a Comment Node // %TBD% may be possible to combine with appendNode()to replace the next chunk of code int w0 = COMMENT_NODE; // W1: Parent int w1 = currentParent; // W2: Start position within m_char int w2 = m_char_...
[ "void", "appendComment", "(", "int", "m_char_current_start", ",", "int", "contentLength", ")", "{", "// create a Comment Node", "// %TBD% may be possible to combine with appendNode()to replace the next chunk of code", "int", "w0", "=", "COMMENT_NODE", ";", "// W1: Parent", "int",...
Append a comment child at the current insertion point. Assumes that the actual content of the comment has previously been appended to the m_char buffer (shared with the builder). @param m_char_current_start int Starting offset of node's content in m_char. @param contentLength int Length of node's content in m_char.
[ "Append", "a", "comment", "child", "at", "the", "current", "insertion", "point", ".", "Assumes", "that", "the", "actual", "content", "of", "the", "comment", "has", "previously", "been", "appended", "to", "the", "m_char", "buffer", "(", "shared", "with", "the...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L2114-L2128
apache/groovy
src/main/java/org/codehaus/groovy/ast/CompileUnit.java
CompileUnit.addClassNodeToCompile
public void addClassNodeToCompile(ClassNode node, SourceUnit location) { """ this method actually does not compile a class. It's only a marker that this type has to be compiled by the CompilationUnit at the end of a parse step no node should be be left. """ String nodeName = node.getName(); c...
java
public void addClassNodeToCompile(ClassNode node, SourceUnit location) { String nodeName = node.getName(); classesToCompile.put(nodeName, node); classNameToSource.put(nodeName, location); }
[ "public", "void", "addClassNodeToCompile", "(", "ClassNode", "node", ",", "SourceUnit", "location", ")", "{", "String", "nodeName", "=", "node", ".", "getName", "(", ")", ";", "classesToCompile", ".", "put", "(", "nodeName", ",", "node", ")", ";", "className...
this method actually does not compile a class. It's only a marker that this type has to be compiled by the CompilationUnit at the end of a parse step no node should be be left.
[ "this", "method", "actually", "does", "not", "compile", "a", "class", ".", "It", "s", "only", "a", "marker", "that", "this", "type", "has", "to", "be", "compiled", "by", "the", "CompilationUnit", "at", "the", "end", "of", "a", "parse", "step", "no", "n...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/ast/CompileUnit.java#L168-L172
RestComm/jain-slee.sip
examples/sip-uas/sbb/src/main/java/org/mobicents/slee/example/sip/SipUASExampleSbb.java
SipUASExampleSbb.onTimerEvent
public void onTimerEvent(TimerEvent event, ActivityContextInterface aci) { """ Event handler method for the timer event. @param event @param aci """ if (getFinalReplySent()) { aci.detach(sbbContext.getSbbLocalObject()); final DialogActivity dialog = (DialogActivity) aci.getActivity(); try { ...
java
public void onTimerEvent(TimerEvent event, ActivityContextInterface aci) { if (getFinalReplySent()) { aci.detach(sbbContext.getSbbLocalObject()); final DialogActivity dialog = (DialogActivity) aci.getActivity(); try { dialog.sendRequest(dialog.createRequest(Request.BYE)); } catch (Exception e) { ...
[ "public", "void", "onTimerEvent", "(", "TimerEvent", "event", ",", "ActivityContextInterface", "aci", ")", "{", "if", "(", "getFinalReplySent", "(", ")", ")", "{", "aci", ".", "detach", "(", "sbbContext", ".", "getSbbLocalObject", "(", ")", ")", ";", "final"...
Event handler method for the timer event. @param event @param aci
[ "Event", "handler", "method", "for", "the", "timer", "event", "." ]
train
https://github.com/RestComm/jain-slee.sip/blob/2c173af0a760cb0ea13fe0ffa58c0f82b14731f9/examples/sip-uas/sbb/src/main/java/org/mobicents/slee/example/sip/SipUASExampleSbb.java#L205-L246
dmurph/jgoogleanalyticstracker
src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java
JGoogleAnalyticsTracker.trackPageViewFromReferrer
public void trackPageViewFromReferrer(String argPageURL, String argPageTitle, String argHostName, String argReferrerSite, String argReferrerPage) { """ Tracks a page view. @param argPageURL required, Google won't track without it. Ex: <code>"org/me/javaclass.java"</code>, or anything you want as the page url...
java
public void trackPageViewFromReferrer(String argPageURL, String argPageTitle, String argHostName, String argReferrerSite, String argReferrerPage) { if (argPageURL == null) { throw new IllegalArgumentException("Page URL cannot be null, Google will not track the data."); } AnalyticsReq...
[ "public", "void", "trackPageViewFromReferrer", "(", "String", "argPageURL", ",", "String", "argPageTitle", ",", "String", "argHostName", ",", "String", "argReferrerSite", ",", "String", "argReferrerPage", ")", "{", "if", "(", "argPageURL", "==", "null", ")", "{", ...
Tracks a page view. @param argPageURL required, Google won't track without it. Ex: <code>"org/me/javaclass.java"</code>, or anything you want as the page url. @param argPageTitle content title @param argHostName the host name for the url @param argReferrerSite site of the referrer. ex, www.dmurph.com @param argReferre...
[ "Tracks", "a", "page", "view", "." ]
train
https://github.com/dmurph/jgoogleanalyticstracker/blob/69f68caf8e09a53e6f6076477bf05b84bc80e386/src/main/java/com/dmurph/tracking/JGoogleAnalyticsTracker.java#L316-L326
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/csv/CsvFileExtensions.java
CsvFileExtensions.readDataFromCVSFileToList
public static List<String> readDataFromCVSFileToList(final File input, final int position, final boolean putFirstLine, final String encoding) throws IOException { """ Reads from a csv-file the field from the given position and puts them to the List. @param input The input-file. @param position The position...
java
public static List<String> readDataFromCVSFileToList(final File input, final int position, final boolean putFirstLine, final String encoding) throws IOException { return readDataFromCVSFileToList(input, position, putFirstLine, ",", encoding); }
[ "public", "static", "List", "<", "String", ">", "readDataFromCVSFileToList", "(", "final", "File", "input", ",", "final", "int", "position", ",", "final", "boolean", "putFirstLine", ",", "final", "String", "encoding", ")", "throws", "IOException", "{", "return",...
Reads from a csv-file the field from the given position and puts them to the List. @param input The input-file. @param position The position from the field. @param putFirstLine Flag that tells if the first line will be put in the list. @param encoding the encoding @return The list with the data. @throws IOException Wh...
[ "Reads", "from", "a", "csv", "-", "file", "the", "field", "from", "the", "given", "position", "and", "puts", "them", "to", "the", "List", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/csv/CsvFileExtensions.java#L273-L277
anotheria/moskito
moskito-core/src/main/java/net/anotheria/moskito/core/util/MBeanUtil.java
MBeanUtil.registerMBean
public String registerMBean(Object bean, String name, boolean replace) throws MalformedObjectNameException, NotCompliantMBeanException, MBeanRegistrationException { """ Registers MBean in local MBean server. Method has mechanism to resolve bean name duplication depends on `replace` parameter of ths...
java
public String registerMBean(Object bean, String name, boolean replace) throws MalformedObjectNameException, NotCompliantMBeanException, MBeanRegistrationException{ synchronized (mBeanServer) { ObjectName newBeanName = null; try { newBeanName = new ObjectNam...
[ "public", "String", "registerMBean", "(", "Object", "bean", ",", "String", "name", ",", "boolean", "replace", ")", "throws", "MalformedObjectNameException", ",", "NotCompliantMBeanException", ",", "MBeanRegistrationException", "{", "synchronized", "(", "mBeanServer", ")...
Registers MBean in local MBean server. Method has mechanism to resolve bean name duplication depends on `replace` parameter of ths method. If true - old bean be replaced by new one. If false - prefix been added to bean name from method parameter Prefix format: copy{$number}.{$originalName} where: $number - bea...
[ "Registers", "MBean", "in", "local", "MBean", "server", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-core/src/main/java/net/anotheria/moskito/core/util/MBeanUtil.java#L131-L157
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java
FileListUtils.listPathsRecursively
public static List<FileStatus> listPathsRecursively(FileSystem fs, Path path, PathFilter fileFilter) throws IOException { """ Helper method to list out all paths under a specified path. If the {@link org.apache.hadoop.fs.FileSystem} is unable to list the contents of a relevant directory, will log an error a...
java
public static List<FileStatus> listPathsRecursively(FileSystem fs, Path path, PathFilter fileFilter) throws IOException { return listPathsRecursivelyHelper(fs, Lists.<FileStatus>newArrayList(), fs.getFileStatus(path), fileFilter); }
[ "public", "static", "List", "<", "FileStatus", ">", "listPathsRecursively", "(", "FileSystem", "fs", ",", "Path", "path", ",", "PathFilter", "fileFilter", ")", "throws", "IOException", "{", "return", "listPathsRecursivelyHelper", "(", "fs", ",", "Lists", ".", "<...
Helper method to list out all paths under a specified path. If the {@link org.apache.hadoop.fs.FileSystem} is unable to list the contents of a relevant directory, will log an error and skip.
[ "Helper", "method", "to", "list", "out", "all", "paths", "under", "a", "specified", "path", ".", "If", "the", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java#L212-L215
alipay/sofa-rpc
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java
AbstractCluster.selectPinpointProvider
protected ProviderInfo selectPinpointProvider(String targetIP, List<ProviderInfo> providerInfos) { """ Select provider. @param targetIP the target ip @return the provider """ ProviderInfo tp = ProviderHelper.toProviderInfo(targetIP); for (ProviderInfo providerInfo : providerInfos) { ...
java
protected ProviderInfo selectPinpointProvider(String targetIP, List<ProviderInfo> providerInfos) { ProviderInfo tp = ProviderHelper.toProviderInfo(targetIP); for (ProviderInfo providerInfo : providerInfos) { if (providerInfo.getHost().equals(tp.getHost()) && StringUtils.equal...
[ "protected", "ProviderInfo", "selectPinpointProvider", "(", "String", "targetIP", ",", "List", "<", "ProviderInfo", ">", "providerInfos", ")", "{", "ProviderInfo", "tp", "=", "ProviderHelper", ".", "toProviderInfo", "(", "targetIP", ")", ";", "for", "(", "Provider...
Select provider. @param targetIP the target ip @return the provider
[ "Select", "provider", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java#L404-L414
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java
MapDotApi.dotGetUnsafe
public static <T> T dotGetUnsafe(final Map map, final Class<T> clazz, final String pathString) { """ Walks by map's nodes and extracts optional value of type T. @param <T> value type @param clazz type of value @param map subject @param pathString nodes to walk in map @return optional value of type T """ ...
java
public static <T> T dotGetUnsafe(final Map map, final Class<T> clazz, final String pathString) { return dotGet(map, clazz, pathString).orElseThrow(() -> new IllegalAccessError( "Map " + map + " does not have value of type " ...
[ "public", "static", "<", "T", ">", "T", "dotGetUnsafe", "(", "final", "Map", "map", ",", "final", "Class", "<", "T", ">", "clazz", ",", "final", "String", "pathString", ")", "{", "return", "dotGet", "(", "map", ",", "clazz", ",", "pathString", ")", "...
Walks by map's nodes and extracts optional value of type T. @param <T> value type @param clazz type of value @param map subject @param pathString nodes to walk in map @return optional value of type T
[ "Walks", "by", "map", "s", "nodes", "and", "extracts", "optional", "value", "of", "type", "T", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapDotApi.java#L89-L98
sprylab/texturevideoview
library/src/main/java/com/sprylab/android/widget/TextureVideoView.java
TextureVideoView.setVideoURI
public void setVideoURI(Uri uri, Map<String, String> headers) { """ Sets video URI using specific headers. @param uri the URI of the video. @param headers the headers for the URI request. Note that the cross domain redirection is allowed by default, but that can be changed with key/value pairs through th...
java
public void setVideoURI(Uri uri, Map<String, String> headers) { mUri = uri; mHeaders = headers; mSeekWhenPrepared = 0; openVideo(); requestLayout(); invalidate(); }
[ "public", "void", "setVideoURI", "(", "Uri", "uri", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "mUri", "=", "uri", ";", "mHeaders", "=", "headers", ";", "mSeekWhenPrepared", "=", "0", ";", "openVideo", "(", ")", ";", "requestLa...
Sets video URI using specific headers. @param uri the URI of the video. @param headers the headers for the URI request. Note that the cross domain redirection is allowed by default, but that can be changed with key/value pairs through the headers parameter with "android-allow-cross-domain-redirect" as the key and ...
[ "Sets", "video", "URI", "using", "specific", "headers", "." ]
train
https://github.com/sprylab/texturevideoview/blob/4c3665b8342f1d7c13f84acd1d628db88a2bedf6/library/src/main/java/com/sprylab/android/widget/TextureVideoView.java#L252-L259
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java
PersonGroupPersonsImpl.get
public Person get(String personGroupId, UUID personId) { """ Retrieve a person's information, including registered persisted faces, name and userData. @param personGroupId Id referencing a particular person group. @param personId Id referencing a particular person. @throws IllegalArgumentException thrown if p...
java
public Person get(String personGroupId, UUID personId) { return getWithServiceResponseAsync(personGroupId, personId).toBlocking().single().body(); }
[ "public", "Person", "get", "(", "String", "personGroupId", ",", "UUID", "personId", ")", "{", "return", "getWithServiceResponseAsync", "(", "personGroupId", ",", "personId", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body", "(", ")", ...
Retrieve a person's information, including registered persisted faces, name and userData. @param personGroupId Id referencing a particular person group. @param personId Id referencing a particular person. @throws IllegalArgumentException thrown if parameters fail the validation @throws APIErrorException thrown if the ...
[ "Retrieve", "a", "person", "s", "information", "including", "registered", "persisted", "faces", "name", "and", "userData", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/PersonGroupPersonsImpl.java#L535-L537
SG-O/miIO
src/main/java/de/sg_o/app/miio/vacuum/Vacuum.java
Vacuum.setTimerEnabled
public boolean setTimerEnabled(VacuumTimer timer) throws CommandExecutionException { """ Enable or disable a scheduled cleanup. @param timer The timer to update. @return True if the command was received successfully. @throws CommandExecutionException When there has been a error during the communication or the r...
java
public boolean setTimerEnabled(VacuumTimer timer) throws CommandExecutionException { if (timer == null) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_PARAMETERS); JSONArray payload = new JSONArray(); payload.put(timer.getID()); payload.put(timer.getOnOff());...
[ "public", "boolean", "setTimerEnabled", "(", "VacuumTimer", "timer", ")", "throws", "CommandExecutionException", "{", "if", "(", "timer", "==", "null", ")", "throw", "new", "CommandExecutionException", "(", "CommandExecutionException", ".", "Error", ".", "INVALID_PARA...
Enable or disable a scheduled cleanup. @param timer The timer to update. @return True if the command was received successfully. @throws CommandExecutionException When there has been a error during the communication or the response was invalid.
[ "Enable", "or", "disable", "a", "scheduled", "cleanup", "." ]
train
https://github.com/SG-O/miIO/blob/f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b/src/main/java/de/sg_o/app/miio/vacuum/Vacuum.java#L221-L227
UrielCh/ovh-java-sdk
ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java
ApiOvhPackxdsl.packName_serviceInfos_PUT
public void packName_serviceInfos_PUT(String packName, OvhService body) throws IOException { """ Alter this object properties REST: PUT /pack/xdsl/{packName}/serviceInfos @param body [required] New object properties @param packName [required] The internal name of your pack """ String qPath = "/pack/xdsl...
java
public void packName_serviceInfos_PUT(String packName, OvhService body) throws IOException { String qPath = "/pack/xdsl/{packName}/serviceInfos"; StringBuilder sb = path(qPath, packName); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "packName_serviceInfos_PUT", "(", "String", "packName", ",", "OvhService", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/pack/xdsl/{packName}/serviceInfos\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "pac...
Alter this object properties REST: PUT /pack/xdsl/{packName}/serviceInfos @param body [required] New object properties @param packName [required] The internal name of your pack
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L460-L464
base2Services/kagura
shared/reporting-core/src/main/java/com/base2/kagura/core/storage/FileReportsProvider.java
FileReportsProvider.loadReport
protected void loadReport(ReportsConfig result, File report, String reportId) throws IOException { """ Custom separate dload report component, so it can be called elsewhere, or overwritten by child Providers. Checks the "report" to ensure it is a directory then looks for reportconf.yaml or reportconf.json inside ...
java
protected void loadReport(ReportsConfig result, File report, String reportId) throws IOException { if (report.isDirectory()) { FilenameFilter configYamlFilter = new PatternFilenameFilter("^reportconf.(yaml|json)$"); File[] selectYaml = report.listFiles(configYamlFilter); ...
[ "protected", "void", "loadReport", "(", "ReportsConfig", "result", ",", "File", "report", ",", "String", "reportId", ")", "throws", "IOException", "{", "if", "(", "report", ".", "isDirectory", "(", ")", ")", "{", "FilenameFilter", "configYamlFilter", "=", "new...
Custom separate dload report component, so it can be called elsewhere, or overwritten by child Providers. Checks the "report" to ensure it is a directory then looks for reportconf.yaml or reportconf.json inside the file. If it exists loads it. @param result The collection of reports to load the contents into. @param re...
[ "Custom", "separate", "dload", "report", "component", "so", "it", "can", "be", "called", "elsewhere", "or", "overwritten", "by", "child", "Providers", ".", "Checks", "the", "report", "to", "ensure", "it", "is", "a", "directory", "then", "looks", "for", "repo...
train
https://github.com/base2Services/kagura/blob/5564aa71bfa2cb3baaae2eb098c6c673dd4e82ee/shared/reporting-core/src/main/java/com/base2/kagura/core/storage/FileReportsProvider.java#L74-L85
geomajas/geomajas-project-client-gwt2
plugin/tilebasedlayer/impl/src/main/java/org/geomajas/gwt2/plugin/tilebasedlayer/client/TileBasedLayerClient.java
TileBasedLayerClient.createLayer
public TileBasedLayer createLayer(String id, TileConfiguration conf, final List<String> urls) { """ Create a new tile based layer with URLs to tile services. <p/> The URLs should have placeholders for the x- and y-coordinate and tile level in the form of {x}, {y}, {z}. The Y-coordinate can be inverted by specif...
java
public TileBasedLayer createLayer(String id, TileConfiguration conf, final List<String> urls) { return new AbstractTileBasedLayer(id, conf) { @Override public TileRenderer getTileRenderer() { return new DefaultTileRenderer(urls); } }; }
[ "public", "TileBasedLayer", "createLayer", "(", "String", "id", ",", "TileConfiguration", "conf", ",", "final", "List", "<", "String", ">", "urls", ")", "{", "return", "new", "AbstractTileBasedLayer", "(", "id", ",", "conf", ")", "{", "@", "Override", "publi...
Create a new tile based layer with URLs to tile services. <p/> The URLs should have placeholders for the x- and y-coordinate and tile level in the form of {x}, {y}, {z}. The Y-coordinate can be inverted by specifying {-y} instead of {y}. The file extension of the tiles should be part of the URL. @param id The unique...
[ "Create", "a", "new", "tile", "based", "layer", "with", "URLs", "to", "tile", "services", ".", "<p", "/", ">", "The", "URLs", "should", "have", "placeholders", "for", "the", "x", "-", "and", "y", "-", "coordinate", "and", "tile", "level", "in", "the", ...
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/tilebasedlayer/impl/src/main/java/org/geomajas/gwt2/plugin/tilebasedlayer/client/TileBasedLayerClient.java#L243-L250
UrielCh/ovh-java-sdk
ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java
ApiOvhHorizonView.serviceName_customerNetwork_POST
public ArrayList<OvhTask> serviceName_customerNetwork_POST(String serviceName, String name, String network) throws IOException { """ Add a new network REST: POST /horizonView/{serviceName}/customerNetwork @param network [required] The private network you want to reach. @param name [required] Name your network...
java
public ArrayList<OvhTask> serviceName_customerNetwork_POST(String serviceName, String name, String network) throws IOException { String qPath = "/horizonView/{serviceName}/customerNetwork"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "name", ...
[ "public", "ArrayList", "<", "OvhTask", ">", "serviceName_customerNetwork_POST", "(", "String", "serviceName", ",", "String", "name", ",", "String", "network", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/horizonView/{serviceName}/customerNetwork\"", ";...
Add a new network REST: POST /horizonView/{serviceName}/customerNetwork @param network [required] The private network you want to reach. @param name [required] Name your network @param serviceName [required] Domain of the service
[ "Add", "a", "new", "network" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-horizonView/src/main/java/net/minidev/ovh/api/ApiOvhHorizonView.java#L414-L422
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java
AutoRegisterActionServlet.processUnhandledAction
protected boolean processUnhandledAction( HttpServletRequest request, HttpServletResponse response, String uri ) throws IOException, ServletException { """ Last chance to handle an unhandled action URI. @return <code>true</code> if this method handled it (by forwarding somewhere or writing to the resp...
java
protected boolean processUnhandledAction( HttpServletRequest request, HttpServletResponse response, String uri ) throws IOException, ServletException { return false; }
[ "protected", "boolean", "processUnhandledAction", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ",", "String", "uri", ")", "throws", "IOException", ",", "ServletException", "{", "return", "false", ";", "}" ]
Last chance to handle an unhandled action URI. @return <code>true</code> if this method handled it (by forwarding somewhere or writing to the response).
[ "Last", "chance", "to", "handle", "an", "unhandled", "action", "URI", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java#L943-L947
alkacon/opencms-core
src/org/opencms/jsp/CmsJspActionElement.java
CmsJspActionElement.includeSilent
public void includeSilent(String target, String element, boolean editable, Map<String, Object> parameterMap) { """ Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as using {@link #include(String, String, Map)}.<p> This is a convenience method that allow...
java
public void includeSilent(String target, String element, boolean editable, Map<String, Object> parameterMap) { try { include(target, element, editable, parameterMap); } catch (Throwable t) { // ignore } }
[ "public", "void", "includeSilent", "(", "String", "target", ",", "String", "element", ",", "boolean", "editable", ",", "Map", "<", "String", ",", "Object", ">", "parameterMap", ")", "{", "try", "{", "include", "(", "target", ",", "element", ",", "editable"...
Includes a named sub-element suppressing all Exceptions that occur during the include, otherwise the same as using {@link #include(String, String, Map)}.<p> This is a convenience method that allows to include elements on a page without checking if they exist or not. If the target element does not exist, nothing is pri...
[ "Includes", "a", "named", "sub", "-", "element", "suppressing", "all", "Exceptions", "that", "occur", "during", "the", "include", "otherwise", "the", "same", "as", "using", "{", "@link", "#include", "(", "String", "String", "Map", ")", "}", ".", "<p", ">" ...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspActionElement.java#L630-L637
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepositoryConnection.java
MarkLogicRepositoryConnection.hasStatement
@Override public boolean hasStatement(Statement st, boolean includeInferred, Resource... contexts) throws RepositoryException { """ returns true or false if a statement exists in repository / context @param st @param includeInferred @param contexts @return boolean @throws RepositoryException """ ...
java
@Override public boolean hasStatement(Statement st, boolean includeInferred, Resource... contexts) throws RepositoryException { return hasStatement(st.getSubject(),st.getPredicate(),st.getObject(),includeInferred,contexts); }
[ "@", "Override", "public", "boolean", "hasStatement", "(", "Statement", "st", ",", "boolean", "includeInferred", ",", "Resource", "...", "contexts", ")", "throws", "RepositoryException", "{", "return", "hasStatement", "(", "st", ".", "getSubject", "(", ")", ",",...
returns true or false if a statement exists in repository / context @param st @param includeInferred @param contexts @return boolean @throws RepositoryException
[ "returns", "true", "or", "false", "if", "a", "statement", "exists", "in", "repository", "/", "context" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/MarkLogicRepositoryConnection.java#L627-L630
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java
CompletionKey.setBuffer
public void setBuffer(long address, long length, int index) { """ Sets the address and length of a buffer with a specified index. @param address of the buffer @param length of the buffer in bytes @param index of the buffer to set, where 0 is the first buffer @throws IllegalArgumentException if the index valu...
java
public void setBuffer(long address, long length, int index) { if ((index < 0) || (index >= this.bufferCount)) { throw new IllegalArgumentException(); } this.stagingByteBuffer.putLong((FIRST_BUFFER_INDEX + (2 * index)) * 8, address); this.stagingByteBuffer.putLong((FIRST_BUFF...
[ "public", "void", "setBuffer", "(", "long", "address", ",", "long", "length", ",", "int", "index", ")", "{", "if", "(", "(", "index", "<", "0", ")", "||", "(", "index", ">=", "this", ".", "bufferCount", ")", ")", "{", "throw", "new", "IllegalArgument...
Sets the address and length of a buffer with a specified index. @param address of the buffer @param length of the buffer in bytes @param index of the buffer to set, where 0 is the first buffer @throws IllegalArgumentException if the index value is <0 or >= bufferCount
[ "Sets", "the", "address", "and", "length", "of", "a", "buffer", "with", "a", "specified", "index", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/io/async/CompletionKey.java#L182-L189
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java
JsonPolicyReader.createPrincipal
private Principal createPrincipal(String schema, JsonNode principalNode) { """ Creates a new principal instance for the given schema and the Json node. @param schema the schema for the principal instance being created. @param principalNode the node indicating the AWS account that is making the request. @re...
java
private Principal createPrincipal(String schema, JsonNode principalNode) { if (schema.equalsIgnoreCase(PRINCIPAL_SCHEMA_USER)) { return new Principal(PRINCIPAL_SCHEMA_USER, principalNode.asText(), options.isStripAwsPrincipalIdHyphensEnabled()); } else if (schema.equalsIgnoreCase(PRINCIPAL_SC...
[ "private", "Principal", "createPrincipal", "(", "String", "schema", ",", "JsonNode", "principalNode", ")", "{", "if", "(", "schema", ".", "equalsIgnoreCase", "(", "PRINCIPAL_SCHEMA_USER", ")", ")", "{", "return", "new", "Principal", "(", "PRINCIPAL_SCHEMA_USER", "...
Creates a new principal instance for the given schema and the Json node. @param schema the schema for the principal instance being created. @param principalNode the node indicating the AWS account that is making the request. @return a principal instance.
[ "Creates", "a", "new", "principal", "instance", "for", "the", "given", "schema", "and", "the", "Json", "node", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/policy/internal/JsonPolicyReader.java#L254-L267
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service.location/src/com/ibm/ws/kernel/service/location/internal/FileLocator.java
FileLocator.matchFileInNamedPath
public static File matchFileInNamedPath(String regex, Collection<String> pathNameList) { """ Look for given file in any of the specified directories, return the first one found. @param name The name of the file to find @param pathNameList The collection of directories to check @return The File object if th...
java
public static File matchFileInNamedPath(String regex, Collection<String> pathNameList) { if (regex == null || pathNameList == null || pathNameList.size() == 0) return null; for (String currentPath : pathNameList) { if (currentPath == null || currentPath.length() == 0) ...
[ "public", "static", "File", "matchFileInNamedPath", "(", "String", "regex", ",", "Collection", "<", "String", ">", "pathNameList", ")", "{", "if", "(", "regex", "==", "null", "||", "pathNameList", "==", "null", "||", "pathNameList", ".", "size", "(", ")", ...
Look for given file in any of the specified directories, return the first one found. @param name The name of the file to find @param pathNameList The collection of directories to check @return The File object if the file is found; null if the pathList is null or empty, or file is not found. @throws SecurityException ...
[ "Look", "for", "given", "file", "in", "any", "of", "the", "specified", "directories", "return", "the", "first", "one", "found", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service.location/src/com/ibm/ws/kernel/service/location/internal/FileLocator.java#L148-L162
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java
TmdbMovies.getMovieReleaseInfo
public ResultList<ReleaseInfo> getMovieReleaseInfo(int movieId, String language) throws MovieDbException { """ This method is used to retrieve all of the release and certification data we have for a specific movie. @param movieId @param language @return @throws MovieDbException """ TmdbParameters...
java
public ResultList<ReleaseInfo> getMovieReleaseInfo(int movieId, String language) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, movieId); parameters.add(Param.LANGUAGE, language); URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMet...
[ "public", "ResultList", "<", "ReleaseInfo", ">", "getMovieReleaseInfo", "(", "int", "movieId", ",", "String", "language", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add",...
This method is used to retrieve all of the release and certification data we have for a specific movie. @param movieId @param language @return @throws MovieDbException
[ "This", "method", "is", "used", "to", "retrieve", "all", "of", "the", "release", "and", "certification", "data", "we", "have", "for", "a", "specific", "movie", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java#L291-L307
sirensolutions/siren-join
src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinCache.java
FilterJoinCache.put
public void put(final long cacheKey, final FilterJoinTerms terms) { """ Caches the provided list of encoded terms for the given filter join node. """ logger.debug("{}: New cache entry {}", Thread.currentThread().getName(), cacheKey); this.cache.put(cacheKey, new CacheEntry(terms.getEncodedTerms(), term...
java
public void put(final long cacheKey, final FilterJoinTerms terms) { logger.debug("{}: New cache entry {}", Thread.currentThread().getName(), cacheKey); this.cache.put(cacheKey, new CacheEntry(terms.getEncodedTerms(), terms.getSize(), terms.isPruned())); }
[ "public", "void", "put", "(", "final", "long", "cacheKey", ",", "final", "FilterJoinTerms", "terms", ")", "{", "logger", ".", "debug", "(", "\"{}: New cache entry {}\"", ",", "Thread", ".", "currentThread", "(", ")", ".", "getName", "(", ")", ",", "cacheKey"...
Caches the provided list of encoded terms for the given filter join node.
[ "Caches", "the", "provided", "list", "of", "encoded", "terms", "for", "the", "given", "filter", "join", "node", "." ]
train
https://github.com/sirensolutions/siren-join/blob/cba1111b209ce6f72ab7750d5488a573a6c77fe5/src/main/java/solutions/siren/join/action/coordinate/execution/FilterJoinCache.java#L76-L79
phax/ph-web
ph-network/src/main/java/com/helger/network/port/NetworkPortHelper.java
NetworkPortHelper.checkPortOpen
@Nonnull public static ENetworkPortStatus checkPortOpen (@Nonnull @Nonempty final String sHostName, @Nonnegative final int nPort, @Nonnegative final int nTimeoutMillisecs) { """ Check the status of a remote port. ...
java
@Nonnull public static ENetworkPortStatus checkPortOpen (@Nonnull @Nonempty final String sHostName, @Nonnegative final int nPort, @Nonnegative final int nTimeoutMillisecs) { ValueEnforcer.notEmpty (sHostName, "Ho...
[ "@", "Nonnull", "public", "static", "ENetworkPortStatus", "checkPortOpen", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sHostName", ",", "@", "Nonnegative", "final", "int", "nPort", ",", "@", "Nonnegative", "final", "int", "nTimeoutMillisecs", ")", ...
Check the status of a remote port. @param sHostName Hostname or IP address to check. @param nPort Port number to check. @param nTimeoutMillisecs Connection timeout in milliseconds. @return Never <code>null</code>.
[ "Check", "the", "status", "of", "a", "remote", "port", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-network/src/main/java/com/helger/network/port/NetworkPortHelper.java#L76-L118
code4everything/util
src/main/java/com/zhazhapan/util/ReflectUtils.java
ReflectUtils.invokeMethod
public static Object invokeMethod(Object object, String methodName, Object[] parameters) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { """ 调用方法 @param object 对象 @param methodName 方法名 @param parameters 参数 @return 方法返回的结果 @throws NoSuchMethodException 异常 @throws Invoca...
java
public static Object invokeMethod(Object object, String methodName, Object[] parameters) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { return invokeMethod(object, methodName, getTypes(parameters), parameters); }
[ "public", "static", "Object", "invokeMethod", "(", "Object", "object", ",", "String", "methodName", ",", "Object", "[", "]", "parameters", ")", "throws", "NoSuchMethodException", ",", "InvocationTargetException", ",", "IllegalAccessException", "{", "return", "invokeMe...
调用方法 @param object 对象 @param methodName 方法名 @param parameters 参数 @return 方法返回的结果 @throws NoSuchMethodException 异常 @throws InvocationTargetException 异常 @throws IllegalAccessException 异常
[ "调用方法" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/ReflectUtils.java#L101-L103
RestComm/Restcomm-Connect
restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/security/PermissionEvaluator.java
PermissionEvaluator.checkPermission
public void checkPermission(final String permission, UserIdentityContext userIdentityContext) { """ Grants access by permission. If the effective account has a role that resolves to the specified permission (accoording to mappings of restcomm.xml) access is granted. Administrator is granted access re...
java
public void checkPermission(final String permission, UserIdentityContext userIdentityContext) { //checkAuthenticatedAccount(); // ok there is a valid authenticated account if ( checkPermission(permission, userIdentityContext.getEffectiveAccountRoles()) != AuthOutcome.OK ) throw n...
[ "public", "void", "checkPermission", "(", "final", "String", "permission", ",", "UserIdentityContext", "userIdentityContext", ")", "{", "//checkAuthenticatedAccount(); // ok there is a valid authenticated account", "if", "(", "checkPermission", "(", "permission", ",", "userIden...
Grants access by permission. If the effective account has a role that resolves to the specified permission (accoording to mappings of restcomm.xml) access is granted. Administrator is granted access regardless of permissions. @param permission - e.g. 'RestComm:Create:Accounts' @param userIdentityContext
[ "Grants", "access", "by", "permission", ".", "If", "the", "effective", "account", "has", "a", "role", "that", "resolves", "to", "the", "specified", "permission", "(", "accoording", "to", "mappings", "of", "restcomm", ".", "xml", ")", "access", "is", "granted...
train
https://github.com/RestComm/Restcomm-Connect/blob/2194dee4fc524cdfd0af77a218ba5f212f97f7c5/restcomm/restcomm.http/src/main/java/org/restcomm/connect/http/security/PermissionEvaluator.java#L127-L132
seancfoley/IPAddress
IPAddress/src/inet.ipaddr/inet/ipaddr/format/validate/ParsedAddressGrouping.java
ParsedAddressGrouping.getHostSegmentIndex
public static int getHostSegmentIndex(int networkPrefixLength, int bytesPerSegment, int bitsPerSegment) { """ Returns the index of the segment containing the first byte outside the network prefix. When networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count. @param netwo...
java
public static int getHostSegmentIndex(int networkPrefixLength, int bytesPerSegment, int bitsPerSegment) { if(bytesPerSegment > 1) { if(bytesPerSegment == 2) { return networkPrefixLength >> 4; } return networkPrefixLength / bitsPerSegment; } return networkPrefixLength >> 3; }
[ "public", "static", "int", "getHostSegmentIndex", "(", "int", "networkPrefixLength", ",", "int", "bytesPerSegment", ",", "int", "bitsPerSegment", ")", "{", "if", "(", "bytesPerSegment", ">", "1", ")", "{", "if", "(", "bytesPerSegment", "==", "2", ")", "{", "...
Returns the index of the segment containing the first byte outside the network prefix. When networkPrefixLength is null, or it matches or exceeds the bit length, returns the segment count. @param networkPrefixLength @param byteLength @return
[ "Returns", "the", "index", "of", "the", "segment", "containing", "the", "first", "byte", "outside", "the", "network", "prefix", ".", "When", "networkPrefixLength", "is", "null", "or", "it", "matches", "or", "exceeds", "the", "bit", "length", "returns", "the", ...
train
https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/format/validate/ParsedAddressGrouping.java#L52-L60
liferay/com-liferay-commerce
commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java
CommerceNotificationQueueEntryPersistenceImpl.findAll
@Override public List<CommerceNotificationQueueEntry> findAll() { """ Returns all the commerce notification queue entries. @return the commerce notification queue entries """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceNotificationQueueEntry> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceNotificationQueueEntry", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce notification queue entries. @return the commerce notification queue entries
[ "Returns", "all", "the", "commerce", "notification", "queue", "entries", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-notification-service/src/main/java/com/liferay/commerce/notification/service/persistence/impl/CommerceNotificationQueueEntryPersistenceImpl.java#L2795-L2798
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Token.java
Token.setDepRel
public void setDepRel(int i, DependencyRelation v) { """ indexed setter for depRel - sets an indexed value - Contains a list of syntactical dependencies, see DependencyRelation, O @generated @param i index in the array to set @param v value to set into the array """ if (Token_Type.featOkTst && ((Token_...
java
public void setDepRel(int i, DependencyRelation v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depRel == null) jcasType.jcas.throwFeatMissing("depRel", "de.julielab.jules.types.Token"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Token_Type)jcasType).casFeatCode...
[ "public", "void", "setDepRel", "(", "int", "i", ",", "DependencyRelation", "v", ")", "{", "if", "(", "Token_Type", ".", "featOkTst", "&&", "(", "(", "Token_Type", ")", "jcasType", ")", ".", "casFeat_depRel", "==", "null", ")", "jcasType", ".", "jcas", "....
indexed setter for depRel - sets an indexed value - Contains a list of syntactical dependencies, see DependencyRelation, O @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "depRel", "-", "sets", "an", "indexed", "value", "-", "Contains", "a", "list", "of", "syntactical", "dependencies", "see", "DependencyRelation", "O" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/Token.java#L248-L252
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/TagLink.java
TagLink.score
public double score(StringWrapper s, StringWrapper t) { """ getStringMetric computes the similarity between a pair of strings T and U. @param T String @param U String @return double """ checkTrainingHasHappened(s,t); UnitVector sBag = asUnitVector(s); UnitVector tBag = asUnitVector(t); if (s.un...
java
public double score(StringWrapper s, StringWrapper t) { checkTrainingHasHappened(s,t); UnitVector sBag = asUnitVector(s); UnitVector tBag = asUnitVector(t); if (s.unwrap().equals(t.unwrap())) { return 1.0; } else { String[] sTokens = getTokenArray(sBag), tTokens = getTokenA...
[ "public", "double", "score", "(", "StringWrapper", "s", ",", "StringWrapper", "t", ")", "{", "checkTrainingHasHappened", "(", "s", ",", "t", ")", ";", "UnitVector", "sBag", "=", "asUnitVector", "(", "s", ")", ";", "UnitVector", "tBag", "=", "asUnitVector", ...
getStringMetric computes the similarity between a pair of strings T and U. @param T String @param U String @return double
[ "getStringMetric", "computes", "the", "similarity", "between", "a", "pair", "of", "strings", "T", "and", "U", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/TagLink.java#L120-L134
drinkjava2/jBeanBox
jbeanbox/src/main/java/com/github/drinkjava2/cglib3_2_0/proxy/BridgeMethodResolver.java
BridgeMethodResolver.resolveAll
public Map/*<Signature, Signature>*/resolveAll() { """ Finds all bridge methods that are being called with invokespecial & returns them. """ Map resolved = new HashMap(); for (Iterator entryIter = declToBridge.entrySet().iterator(); entryIter.hasNext(); ) { Map.Entry entry = (Map.E...
java
public Map/*<Signature, Signature>*/resolveAll() { Map resolved = new HashMap(); for (Iterator entryIter = declToBridge.entrySet().iterator(); entryIter.hasNext(); ) { Map.Entry entry = (Map.Entry)entryIter.next(); Class owner = (Class)entry.getKey(); Set bridges = (S...
[ "public", "Map", "/*<Signature, Signature>*/", "resolveAll", "(", ")", "{", "Map", "resolved", "=", "new", "HashMap", "(", ")", ";", "for", "(", "Iterator", "entryIter", "=", "declToBridge", ".", "entrySet", "(", ")", ".", "iterator", "(", ")", ";", "entry...
Finds all bridge methods that are being called with invokespecial & returns them.
[ "Finds", "all", "bridge", "methods", "that", "are", "being", "called", "with", "invokespecial", "&", "returns", "them", "." ]
train
https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/cglib3_2_0/proxy/BridgeMethodResolver.java#L50-L63
blinkfox/zealot
src/main/java/com/blinkfox/zealot/core/ZealotKhala.java
ZealotKhala.orNotLike
public ZealotKhala orNotLike(String field, Object value) { """ 生成带" OR "前缀的" NOT LIKE "模糊查询的SQL片段. <p>示例:传入 {"b.title", "Spring"} 两个参数,生成的SQL片段为:" OR b.title NOT LIKE ? ", SQL参数为:{"%Spring%"}</p> @param field 数据库字段 @param value 值 @return ZealotKhala实例 """ return this.doLike(ZealotConst.OR_PREFIX,...
java
public ZealotKhala orNotLike(String field, Object value) { return this.doLike(ZealotConst.OR_PREFIX, field, value, true, false); }
[ "public", "ZealotKhala", "orNotLike", "(", "String", "field", ",", "Object", "value", ")", "{", "return", "this", ".", "doLike", "(", "ZealotConst", ".", "OR_PREFIX", ",", "field", ",", "value", ",", "true", ",", "false", ")", ";", "}" ]
生成带" OR "前缀的" NOT LIKE "模糊查询的SQL片段. <p>示例:传入 {"b.title", "Spring"} 两个参数,生成的SQL片段为:" OR b.title NOT LIKE ? ", SQL参数为:{"%Spring%"}</p> @param field 数据库字段 @param value 值 @return ZealotKhala实例
[ "生成带", "OR", "前缀的", "NOT", "LIKE", "模糊查询的SQL片段", ".", "<p", ">", "示例:传入", "{", "b", ".", "title", "Spring", "}", "两个参数,生成的SQL片段为:", "OR", "b", ".", "title", "NOT", "LIKE", "?", "SQL参数为", ":", "{", "%Spring%", "}", "<", "/", "p", ">" ]
train
https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/ZealotKhala.java#L1015-L1017
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/NetUtil.java
NetUtil.getInputStreamHttp
public static InputStream getInputStreamHttp(final String pURL, final Properties pProperties, final boolean pFollowRedirects, final int pTimeout) throws IOException { """ Gets the InputStream from a given URL, with the given timeout. The timeout must be > 0. A timeout of zero is interpreted as an inf...
java
public static InputStream getInputStreamHttp(final String pURL, final Properties pProperties, final boolean pFollowRedirects, final int pTimeout) throws IOException { // Make sure we have properties Properties properties = pProperties != null ? pProperties : new Properties(); //URL...
[ "public", "static", "InputStream", "getInputStreamHttp", "(", "final", "String", "pURL", ",", "final", "Properties", "pProperties", ",", "final", "boolean", "pFollowRedirects", ",", "final", "int", "pTimeout", ")", "throws", "IOException", "{", "// Make sure we have p...
Gets the InputStream from a given URL, with the given timeout. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout. Supports basic HTTP authentication, using a URL string similar to most browsers. <P/> <SMALL>Implementation note: If the timeout parameter is greater than 0, this method uses ...
[ "Gets", "the", "InputStream", "from", "a", "given", "URL", "with", "the", "given", "timeout", ".", "The", "timeout", "must", "be", ">", "0", ".", "A", "timeout", "of", "zero", "is", "interpreted", "as", "an", "infinite", "timeout", ".", "Supports", "basi...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/NetUtil.java#L576-L587
groupe-sii/ogham
ogham-sms-cloudhopper/src/main/java/fr/sii/ogham/sms/sender/impl/cloudhopper/MapCloudhopperCharsetHandler.java
MapCloudhopperCharsetHandler.addCharset
public void addCharset(String nioCharsetName, String cloudhopperCharsetName) throws EncodingException { """ Add a charset mapping. @param nioCharsetName Java NIO charset name @param cloudhopperCharsetName Cloudhopper charset name @see CharsetUtil @throws EncodingException If Cloudhopper charset name is in...
java
public void addCharset(String nioCharsetName, String cloudhopperCharsetName) throws EncodingException { Charset charset = CharsetUtil.map(cloudhopperCharsetName); if (charset != null) { addCharset(nioCharsetName, charset); } else { throw new EncodingException("Invalid cloudhopper charset name : " + cloudhop...
[ "public", "void", "addCharset", "(", "String", "nioCharsetName", ",", "String", "cloudhopperCharsetName", ")", "throws", "EncodingException", "{", "Charset", "charset", "=", "CharsetUtil", ".", "map", "(", "cloudhopperCharsetName", ")", ";", "if", "(", "charset", ...
Add a charset mapping. @param nioCharsetName Java NIO charset name @param cloudhopperCharsetName Cloudhopper charset name @see CharsetUtil @throws EncodingException If Cloudhopper charset name is invalid
[ "Add", "a", "charset", "mapping", "." ]
train
https://github.com/groupe-sii/ogham/blob/e273b845604add74b5a25dfd931cb3c166b1008f/ogham-sms-cloudhopper/src/main/java/fr/sii/ogham/sms/sender/impl/cloudhopper/MapCloudhopperCharsetHandler.java#L70-L77
igniterealtime/REST-API-Client
src/main/java/org/igniterealtime/restclient/RestClient.java
RestClient.createSLLClient
private Client createSLLClient(ClientConfig clientConfig) throws KeyManagementException, NoSuchAlgorithmException { """ Creates the sll client. @param clientConfig the client config @return the client config @throws KeyManagementException the key management exception @throws NoSuchAlgorithmException th...
java
private Client createSLLClient(ClientConfig clientConfig) throws KeyManagementException, NoSuchAlgorithmException { TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { public X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted(X509Certificat...
[ "private", "Client", "createSLLClient", "(", "ClientConfig", "clientConfig", ")", "throws", "KeyManagementException", ",", "NoSuchAlgorithmException", "{", "TrustManager", "[", "]", "trustAllCerts", "=", "new", "TrustManager", "[", "]", "{", "new", "X509TrustManager", ...
Creates the sll client. @param clientConfig the client config @return the client config @throws KeyManagementException the key management exception @throws NoSuchAlgorithmException the no such algorithm exception
[ "Creates", "the", "sll", "client", "." ]
train
https://github.com/igniterealtime/REST-API-Client/blob/fd544dd770ec2ababa47fef51579522ddce09f05/src/main/java/org/igniterealtime/restclient/RestClient.java#L292-L322
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueSelectBucketHandler.java
KeyValueSelectBucketHandler.channelRead0
@Override protected void channelRead0(ChannelHandlerContext ctx, FullBinaryMemcacheResponse msg) throws Exception { """ Handles incoming Select bucket responses. @param ctx the handler context. @param msg the incoming message to investigate. @throws Exception if something goes wrong during communicating t...
java
@Override protected void channelRead0(ChannelHandlerContext ctx, FullBinaryMemcacheResponse msg) throws Exception { switch (msg.getStatus()) { case SUCCESS: originalPromise.setSuccess(); ctx.pipeline().remove(this); ctx.fireChannelActive(); ...
[ "@", "Override", "protected", "void", "channelRead0", "(", "ChannelHandlerContext", "ctx", ",", "FullBinaryMemcacheResponse", "msg", ")", "throws", "Exception", "{", "switch", "(", "msg", ".", "getStatus", "(", ")", ")", "{", "case", "SUCCESS", ":", "originalPro...
Handles incoming Select bucket responses. @param ctx the handler context. @param msg the incoming message to investigate. @throws Exception if something goes wrong during communicating to the server.
[ "Handles", "incoming", "Select", "bucket", "responses", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/endpoint/kv/KeyValueSelectBucketHandler.java#L142-L160
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/QuotedStringTokenizer.java
QuotedStringTokenizer.charsMatch
private boolean charsMatch(char[] chars, int pos1, int len1, int pos2, int len2) { """ @return true if two sequences of chars match within the array. @param chars char set @param pos1 pos 1 @param len1 length 1 @param pos2 pos 2 @param len2 length 2 """ if (len1 != len2) { return fal...
java
private boolean charsMatch(char[] chars, int pos1, int len1, int pos2, int len2) { if (len1 != len2) { return false; } if (pos1 + len1 > chars.length || pos2 + len2 > chars.length) { return false; } for (int i = 0; i < len1; i++) { if (chars[po...
[ "private", "boolean", "charsMatch", "(", "char", "[", "]", "chars", ",", "int", "pos1", ",", "int", "len1", ",", "int", "pos2", ",", "int", "len2", ")", "{", "if", "(", "len1", "!=", "len2", ")", "{", "return", "false", ";", "}", "if", "(", "pos1...
@return true if two sequences of chars match within the array. @param chars char set @param pos1 pos 1 @param len1 length 1 @param pos2 pos 2 @param len2 length 2
[ "@return", "true", "if", "two", "sequences", "of", "chars", "match", "within", "the", "array", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/QuotedStringTokenizer.java#L200-L213
ralscha/extdirectspring
src/main/java/ch/ralscha/extdirectspring/util/JsonHandler.java
JsonHandler.readValue
@SuppressWarnings("unchecked") public <T> T readValue(String json, TypeReference<T> typeReference) { """ Converts a JSON string into an object. In case of an exception returns null and logs the exception. @param <T> type of the object to create @param json string with the JSON @param typeReference {@link Ty...
java
@SuppressWarnings("unchecked") public <T> T readValue(String json, TypeReference<T> typeReference) { try { return (T) this.mapper.readValue(json, typeReference); } catch (Exception e) { LogFactory.getLog(JsonHandler.class).info("deserialize json to object", e); return null; } }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "readValue", "(", "String", "json", ",", "TypeReference", "<", "T", ">", "typeReference", ")", "{", "try", "{", "return", "(", "T", ")", "this", ".", "mapper", ".", "read...
Converts a JSON string into an object. In case of an exception returns null and logs the exception. @param <T> type of the object to create @param json string with the JSON @param typeReference {@link TypeReference} instance of the desired result type {@link com.fasterxml.jackson.core.type.TypeReference} @return the c...
[ "Converts", "a", "JSON", "string", "into", "an", "object", ".", "In", "case", "of", "an", "exception", "returns", "null", "and", "logs", "the", "exception", "." ]
train
https://github.com/ralscha/extdirectspring/blob/4b018497c4e7503033f91d0491b4e74bf8291d2c/src/main/java/ch/ralscha/extdirectspring/util/JsonHandler.java#L104-L113
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/ClassHelper.java
ClassHelper.getMethod
public static Method getMethod(Object object, String methodName, Class[] params) { """ Determines the method with the specified signature via reflection look-up. @param object The instance whose class is searched for the method @param methodName The method's name @param params The parameter types @re...
java
public static Method getMethod(Object object, String methodName, Class[] params) { return getMethod(object.getClass(), methodName, params); }
[ "public", "static", "Method", "getMethod", "(", "Object", "object", ",", "String", "methodName", ",", "Class", "[", "]", "params", ")", "{", "return", "getMethod", "(", "object", ".", "getClass", "(", ")", ",", "methodName", ",", "params", ")", ";", "}" ...
Determines the method with the specified signature via reflection look-up. @param object The instance whose class is searched for the method @param methodName The method's name @param params The parameter types @return A method object or <code>null</code> if no matching method was found
[ "Determines", "the", "method", "with", "the", "specified", "signature", "via", "reflection", "look", "-", "up", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L358-L361
orhanobut/wasp
wasp/src/main/java/com/orhanobut/wasp/utils/SSLUtils.java
SSLUtils.getTrustAllCertSslSocketFactory
public static SSLSocketFactory getTrustAllCertSslSocketFactory() { """ Helper method to create an empty {@link SSLSocketFactory} which trusts all certificates It is intended to be used only for testing purposes @return created empty factory """ try { TrustManager[] trustAllCerts = new TrustManage...
java
public static SSLSocketFactory getTrustAllCertSslSocketFactory() { try { TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { @Override public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException ...
[ "public", "static", "SSLSocketFactory", "getTrustAllCertSslSocketFactory", "(", ")", "{", "try", "{", "TrustManager", "[", "]", "trustAllCerts", "=", "new", "TrustManager", "[", "]", "{", "new", "X509TrustManager", "(", ")", "{", "@", "Override", "public", "void...
Helper method to create an empty {@link SSLSocketFactory} which trusts all certificates It is intended to be used only for testing purposes @return created empty factory
[ "Helper", "method", "to", "create", "an", "empty", "{", "@link", "SSLSocketFactory", "}", "which", "trusts", "all", "certificates", "It", "is", "intended", "to", "be", "used", "only", "for", "testing", "purposes" ]
train
https://github.com/orhanobut/wasp/blob/295d8747aa7e410b185a620a6b87239816a38c11/wasp/src/main/java/com/orhanobut/wasp/utils/SSLUtils.java#L33-L61
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java
FileUtils.copyFile
public static void copyFile(File dest, File source) throws IOException { """ Copy from one file to the other @param dest @param source @throws IOException """ InputStream input = null; try { input = new FileInputStream(source); createFile(dest, input); } fin...
java
public static void copyFile(File dest, File source) throws IOException { InputStream input = null; try { input = new FileInputStream(source); createFile(dest, input); } finally { Utils.tryToClose(input); } }
[ "public", "static", "void", "copyFile", "(", "File", "dest", ",", "File", "source", ")", "throws", "IOException", "{", "InputStream", "input", "=", "null", ";", "try", "{", "input", "=", "new", "FileInputStream", "(", "source", ")", ";", "createFile", "(",...
Copy from one file to the other @param dest @param source @throws IOException
[ "Copy", "from", "one", "file", "to", "the", "other" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/FileUtils.java#L80-L88
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
XpathUtils.asByte
public static Byte asByte(String expression, Node node, XPath xpath) throws XPathExpressionException { """ Same as {@link #asByte(String, Node)} but allows an xpath to be passed in explicitly for reuse. """ String byteString = evaluateAsString(expression, node, xpath); return (isEm...
java
public static Byte asByte(String expression, Node node, XPath xpath) throws XPathExpressionException { String byteString = evaluateAsString(expression, node, xpath); return (isEmptyString(byteString)) ? null : Byte.valueOf(byteString); }
[ "public", "static", "Byte", "asByte", "(", "String", "expression", ",", "Node", "node", ",", "XPath", "xpath", ")", "throws", "XPathExpressionException", "{", "String", "byteString", "=", "evaluateAsString", "(", "expression", ",", "node", ",", "xpath", ")", "...
Same as {@link #asByte(String, Node)} but allows an xpath to be passed in explicitly for reuse.
[ "Same", "as", "{" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L426-L430
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreException.java
FirestoreException.invalidState
static FirestoreException invalidState(String message, Object... params) { """ Creates a FirestoreException with an {@code INVALID_ARGUMENT} status code and the provided message in a nested exception. @return The FirestoreException """ return new FirestoreException(String.format(message, params), Statu...
java
static FirestoreException invalidState(String message, Object... params) { return new FirestoreException(String.format(message, params), Status.INVALID_ARGUMENT); }
[ "static", "FirestoreException", "invalidState", "(", "String", "message", ",", "Object", "...", "params", ")", "{", "return", "new", "FirestoreException", "(", "String", ".", "format", "(", "message", ",", "params", ")", ",", "Status", ".", "INVALID_ARGUMENT", ...
Creates a FirestoreException with an {@code INVALID_ARGUMENT} status code and the provided message in a nested exception. @return The FirestoreException
[ "Creates", "a", "FirestoreException", "with", "an", "{", "@code", "INVALID_ARGUMENT", "}", "status", "code", "and", "the", "provided", "message", "in", "a", "nested", "exception", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreException.java#L50-L52
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/core/CheckpointManager.java
CheckpointManager.getCheckpointBefore
public StoredBlock getCheckpointBefore(long time) { """ Returns a {@link StoredBlock} representing the last checkpoint before the given time, for example, normally you would want to know the checkpoint before the earliest wallet birthday. """ try { checkArgument(time > params.getGenesisBlo...
java
public StoredBlock getCheckpointBefore(long time) { try { checkArgument(time > params.getGenesisBlock().getTimeSeconds()); // This is thread safe because the map never changes after creation. Map.Entry<Long, StoredBlock> entry = checkpoints.floorEntry(time); if (e...
[ "public", "StoredBlock", "getCheckpointBefore", "(", "long", "time", ")", "{", "try", "{", "checkArgument", "(", "time", ">", "params", ".", "getGenesisBlock", "(", ")", ".", "getTimeSeconds", "(", ")", ")", ";", "// This is thread safe because the map never changes...
Returns a {@link StoredBlock} representing the last checkpoint before the given time, for example, normally you would want to know the checkpoint before the earliest wallet birthday.
[ "Returns", "a", "{" ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/core/CheckpointManager.java#L193-L204
spockframework/spock
spock-core/src/main/java/org/spockframework/compiler/SpecRewriter.java
SpecRewriter.visitCleanupBlock
@Override public void visitCleanupBlock(CleanupBlock block) { """ /* This emulates Java 7 try-with-resources exception handling Throwable $spock_feature_throwable = null; try { feature statements (setup, when/then, expect, etc. blocks) } catch (Throwable $spock_tmp_throwable) { $spock_feature_throwable...
java
@Override public void visitCleanupBlock(CleanupBlock block) { for (Block b : method.getBlocks()) { if (b == block) break; moveVariableDeclarations(b.getAst(), method.getStatements()); } VariableExpression featureThrowableVar = new VariableExpression("$spock_feature_throwable", nodeCac...
[ "@", "Override", "public", "void", "visitCleanupBlock", "(", "CleanupBlock", "block", ")", "{", "for", "(", "Block", "b", ":", "method", ".", "getBlocks", "(", ")", ")", "{", "if", "(", "b", "==", "block", ")", "break", ";", "moveVariableDeclarations", "...
/* This emulates Java 7 try-with-resources exception handling Throwable $spock_feature_throwable = null; try { feature statements (setup, when/then, expect, etc. blocks) } catch (Throwable $spock_tmp_throwable) { $spock_feature_throwable = $spock_tmp_throwable; throw $spock_tmp_throwable; } finally { try { feature cl...
[ "/", "*", "This", "emulates", "Java", "7", "try", "-", "with", "-", "resources", "exception", "handling" ]
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/org/spockframework/compiler/SpecRewriter.java#L392-L426
roboconf/roboconf-platform
core/roboconf-target-iaas-ec2/src/main/java/net/roboconf/target/ec2/internal/Ec2MachineConfigurator.java
Ec2MachineConfigurator.createVolume
private String createVolume(String storageId, String snapshotId, int size) { """ Creates volume for EBS. @return volume ID of newly created volume """ String volumeType = Ec2IaasHandler.findStorageProperty(this.targetProperties, storageId, VOLUME_TYPE_PREFIX); if(volumeType == null) volumeType = "standard...
java
private String createVolume(String storageId, String snapshotId, int size) { String volumeType = Ec2IaasHandler.findStorageProperty(this.targetProperties, storageId, VOLUME_TYPE_PREFIX); if(volumeType == null) volumeType = "standard"; CreateVolumeRequest createVolumeRequest = new CreateVolumeRequest() .withA...
[ "private", "String", "createVolume", "(", "String", "storageId", ",", "String", "snapshotId", ",", "int", "size", ")", "{", "String", "volumeType", "=", "Ec2IaasHandler", ".", "findStorageProperty", "(", "this", ".", "targetProperties", ",", "storageId", ",", "V...
Creates volume for EBS. @return volume ID of newly created volume
[ "Creates", "volume", "for", "EBS", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-ec2/src/main/java/net/roboconf/target/ec2/internal/Ec2MachineConfigurator.java#L284-L299
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java
ImageModerationsImpl.evaluateUrlInputWithServiceResponseAsync
public Observable<ServiceResponse<Evaluate>> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModelModel imageUrl, EvaluateUrlInputOptionalParameter evaluateUrlInputOptionalParameter) { """ Returns probabilities of the image containing racy or adult content. @param contentType The content type. ...
java
public Observable<ServiceResponse<Evaluate>> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModelModel imageUrl, EvaluateUrlInputOptionalParameter evaluateUrlInputOptionalParameter) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.bas...
[ "public", "Observable", "<", "ServiceResponse", "<", "Evaluate", ">", ">", "evaluateUrlInputWithServiceResponseAsync", "(", "String", "contentType", ",", "BodyModelModel", "imageUrl", ",", "EvaluateUrlInputOptionalParameter", "evaluateUrlInputOptionalParameter", ")", "{", "if...
Returns probabilities of the image containing racy or adult content. @param contentType The content type. @param imageUrl The image url. @param evaluateUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail ...
[ "Returns", "probabilities", "of", "the", "image", "containing", "racy", "or", "adult", "content", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java#L1624-L1638
alkacon/opencms-core
src/org/opencms/flex/CmsFlexResponse.java
CmsFlexResponse.addHeaderList
private void addHeaderList(Map<String, List<String>> headers, String name, String value) { """ Helper method to add a value in the internal header list.<p> @param headers the headers to look up the value in @param name the name to look up @param value the value to set """ List<String> values = he...
java
private void addHeaderList(Map<String, List<String>> headers, String name, String value) { List<String> values = headers.get(name); if (values == null) { values = new ArrayList<String>(); headers.put(name, values); } values.add(value); }
[ "private", "void", "addHeaderList", "(", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "headers", ",", "String", "name", ",", "String", "value", ")", "{", "List", "<", "String", ">", "values", "=", "headers", ".", "get", "(", "name", ")...
Helper method to add a value in the internal header list.<p> @param headers the headers to look up the value in @param name the name to look up @param value the value to set
[ "Helper", "method", "to", "add", "a", "value", "in", "the", "internal", "header", "list", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexResponse.java#L1067-L1075
wisdom-framework/wisdom
core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/TypeScriptCompilerMojo.java
TypeScriptCompilerMojo.processDirectory
protected void processDirectory(File input, File destination) throws WatchingException { """ Process all typescripts file from the given directory. Output files are generated in the given destination. @param input the input directory @param destination the output directory @throws WatchingException if t...
java
protected void processDirectory(File input, File destination) throws WatchingException { if (! input.isDirectory()) { return; } if (! destination.isDirectory()) { destination.mkdirs(); } // Now execute the compiler // We compute the set of argume...
[ "protected", "void", "processDirectory", "(", "File", "input", ",", "File", "destination", ")", "throws", "WatchingException", "{", "if", "(", "!", "input", ".", "isDirectory", "(", ")", ")", "{", "return", ";", "}", "if", "(", "!", "destination", ".", "...
Process all typescripts file from the given directory. Output files are generated in the given destination. @param input the input directory @param destination the output directory @throws WatchingException if the compilation failed
[ "Process", "all", "typescripts", "file", "from", "the", "given", "directory", ".", "Output", "files", "are", "generated", "in", "the", "given", "destination", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-maven-plugin/src/main/java/org/wisdom/maven/mojos/TypeScriptCompilerMojo.java#L167-L199
google/closure-compiler
src/com/google/javascript/jscomp/JsMessageVisitor.java
JsMessageVisitor.checkNode
protected void checkNode(@Nullable Node node, Token type) throws MalformedException { """ Checks a node's type. @throws MalformedException if the node is null or the wrong type """ if (node == null) { throw new MalformedException( "Expected node type " + type + "; found: null", node); ...
java
protected void checkNode(@Nullable Node node, Token type) throws MalformedException { if (node == null) { throw new MalformedException( "Expected node type " + type + "; found: null", node); } if (node.getToken() != type) { throw new MalformedException( "Expected node type " ...
[ "protected", "void", "checkNode", "(", "@", "Nullable", "Node", "node", ",", "Token", "type", ")", "throws", "MalformedException", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "MalformedException", "(", "\"Expected node type \"", "+", "type"...
Checks a node's type. @throws MalformedException if the node is null or the wrong type
[ "Checks", "a", "node", "s", "type", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/JsMessageVisitor.java#L982-L991
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/chrono/CopticChronology.java
CopticChronology.dateYearDay
@Override public CopticDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { """ Obtains a local date in Coptic calendar system from the era, year-of-era and day-of-year fields. @param era the Coptic era, not null @param yearOfEra the year-of-era @param dayOfYear the day-of-year @return the Copti...
java
@Override public CopticDate dateYearDay(Era era, int yearOfEra, int dayOfYear) { return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); }
[ "@", "Override", "public", "CopticDate", "dateYearDay", "(", "Era", "era", ",", "int", "yearOfEra", ",", "int", "dayOfYear", ")", "{", "return", "dateYearDay", "(", "prolepticYear", "(", "era", ",", "yearOfEra", ")", ",", "dayOfYear", ")", ";", "}" ]
Obtains a local date in Coptic calendar system from the era, year-of-era and day-of-year fields. @param era the Coptic era, not null @param yearOfEra the year-of-era @param dayOfYear the day-of-year @return the Coptic local date, not null @throws DateTimeException if unable to create the date @throws ClassCastExcep...
[ "Obtains", "a", "local", "date", "in", "Coptic", "calendar", "system", "from", "the", "era", "year", "-", "of", "-", "era", "and", "day", "-", "of", "-", "year", "fields", "." ]
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/CopticChronology.java#L183-L186
telly/groundy
library/src/main/java/com/telly/groundy/Groundy.java
Groundy.arg
public Groundy arg(String key, String value) { """ Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a String, or null """ mArgs.putString(key, value); return this; }
java
public Groundy arg(String key, String value) { mArgs.putString(key, value); return this; }
[ "public", "Groundy", "arg", "(", "String", "key", ",", "String", "value", ")", "{", "mArgs", ".", "putString", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a String, or null
[ "Inserts", "a", "String", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/Groundy.java#L512-L515
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java
BaseDetectFiducialSquare.configure
public void configure(LensDistortionNarrowFOV distortion, int width , int height , boolean cache ) { """ Specifies the image's intrinsic parameters and target size @param distortion Lens distortion @param width Image width @param height Image height @param cache If there's lens distortion should it cache the...
java
public void configure(LensDistortionNarrowFOV distortion, int width , int height , boolean cache ) { if( distortion == null ) { removePerspective.setModel(new PointToPixelTransform_F32(transformHomography)); squareDetector.setLensDistortion(width,height,null,null); undistToDist = new DoNothing2Transform2_F64...
[ "public", "void", "configure", "(", "LensDistortionNarrowFOV", "distortion", ",", "int", "width", ",", "int", "height", ",", "boolean", "cache", ")", "{", "if", "(", "distortion", "==", "null", ")", "{", "removePerspective", ".", "setModel", "(", "new", "Poi...
Specifies the image's intrinsic parameters and target size @param distortion Lens distortion @param width Image width @param height Image height @param cache If there's lens distortion should it cache the transforms? Speeds it up by about 12%. Ignored if no lens distortion
[ "Specifies", "the", "image", "s", "intrinsic", "parameters", "and", "target", "size" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/square/BaseDetectFiducialSquare.java#L179-L214
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.getSession
public GetSessionResponse getSession(GetSessionRequest request) { """ Get your live session by live session id. @param request The request object containing all parameters for getting live session. @return Your live session. """ checkNotNull(request, "The parameter request should NOT be null."); ...
java
public GetSessionResponse getSession(GetSessionRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getSessionId(), "The parameter sessionId should NOT be null or empty string."); InternalRequest internalRequest = createRequest(HttpMe...
[ "public", "GetSessionResponse", "getSession", "(", "GetSessionRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getSessionId", "(", ")", ",", "\"The...
Get your live session by live session id. @param request The request object containing all parameters for getting live session. @return Your live session.
[ "Get", "your", "live", "session", "by", "live", "session", "id", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L719-L725
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.zerosLike
public SDVariable zerosLike(String name, @NonNull SDVariable input) { """ Return a variable of all 0s, with the same shape as the input variable. Note that this is dynamic: if the input shape changes in later execution, the returned variable's shape will also be updated @param name Name of the new SDVariable ...
java
public SDVariable zerosLike(String name, @NonNull SDVariable input) { SDVariable ret = f().zerosLike(name, input); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "zerosLike", "(", "String", "name", ",", "@", "NonNull", "SDVariable", "input", ")", "{", "SDVariable", "ret", "=", "f", "(", ")", ".", "zerosLike", "(", "name", ",", "input", ")", ";", "return", "updateVariableNameAndReference", "(",...
Return a variable of all 0s, with the same shape as the input variable. Note that this is dynamic: if the input shape changes in later execution, the returned variable's shape will also be updated @param name Name of the new SDVariable @param input Input SDVariable @return A new SDVariable with the same (dynamic) sha...
[ "Return", "a", "variable", "of", "all", "0s", "with", "the", "same", "shape", "as", "the", "input", "variable", ".", "Note", "that", "this", "is", "dynamic", ":", "if", "the", "input", "shape", "changes", "in", "later", "execution", "the", "returned", "v...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L3095-L3098
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getUsers
public List<User> getUsers(HashMap<String, String> queryParameters) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Gets a list of User resources. @param queryParameters Query parameters of the Resource Parameters to filter the result of the list @return List of User @throws ...
java
public List<User> getUsers(HashMap<String, String> queryParameters) throws OAuthSystemException, OAuthProblemException, URISyntaxException { return getUsers(queryParameters, this.maxResults); }
[ "public", "List", "<", "User", ">", "getUsers", "(", "HashMap", "<", "String", ",", "String", ">", "queryParameters", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "return", "getUsers", "(", "queryParameters", ...
Gets a list of User resources. @param queryParameters Query parameters of the Resource Parameters to filter the result of the list @return List of User @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are errors validating t...
[ "Gets", "a", "list", "of", "User", "resources", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L451-L453
Azure/azure-sdk-for-java
batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/JobsInner.java
JobsInner.listByResourceGroupAsync
public Observable<Page<JobInner>> listByResourceGroupAsync(final String resourceGroupName, final JobsListByResourceGroupOptions jobsListByResourceGroupOptions) { """ Gets information about the Batch AI jobs associated within the specified resource group. @param resourceGroupName Name of the resource group to wh...
java
public Observable<Page<JobInner>> listByResourceGroupAsync(final String resourceGroupName, final JobsListByResourceGroupOptions jobsListByResourceGroupOptions) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName, jobsListByResourceGroupOptions) .map(new Func1<ServiceResponse<Page<...
[ "public", "Observable", "<", "Page", "<", "JobInner", ">", ">", "listByResourceGroupAsync", "(", "final", "String", "resourceGroupName", ",", "final", "JobsListByResourceGroupOptions", "jobsListByResourceGroupOptions", ")", "{", "return", "listByResourceGroupWithServiceRespon...
Gets information about the Batch AI jobs associated within the specified resource group. @param resourceGroupName Name of the resource group to which the resource belongs. @param jobsListByResourceGroupOptions Additional parameters for the operation @throws IllegalArgumentException thrown if parameters fail the valida...
[ "Gets", "information", "about", "the", "Batch", "AI", "jobs", "associated", "within", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batchai/resource-manager/v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/JobsInner.java#L1214-L1222
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Flowable.java
Flowable.mergeWith
@CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> mergeWith(@NonNull CompletableSource other) { """ Relays the items of this Flowable and completes only when the other CompletableSource completes as well. <p> <img ...
java
@CheckReturnValue @BackpressureSupport(BackpressureKind.PASS_THROUGH) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> mergeWith(@NonNull CompletableSource other) { ObjectHelper.requireNonNull(other, "other is null"); return RxJavaPlugins.onAssembly(new FlowableMergeWithComp...
[ "@", "CheckReturnValue", "@", "BackpressureSupport", "(", "BackpressureKind", ".", "PASS_THROUGH", ")", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "Flowable", "<", "T", ">", "mergeWith", "(", "@", "NonNull", "Completable...
Relays the items of this Flowable and completes only when the other CompletableSource completes as well. <p> <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/merge.png" alt=""> <dl> <dt><b>Backpressure:</b></dt> <dd>The operator doesn't interfere with backpressure whic...
[ "Relays", "the", "items", "of", "this", "Flowable", "and", "completes", "only", "when", "the", "other", "CompletableSource", "completes", "as", "well", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "380", "src", "=", "https", ":", "//", "ra...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Flowable.java#L11180-L11186
omadahealth/CircularBarPager
library/src/main/java/com/github/omadahealth/circularbarpager/library/viewpager/FadeViewPagerTransformer.java
FadeViewPagerTransformer.transformPage
@TargetApi(Build.VERSION_CODES.HONEYCOMB) public void transformPage(View view, float position) { """ Used for adding a fadein/fadeout animation in the ViewPager transition. Must be used with {@link android.support.v4.view.ViewPager#setPageTransformer(boolean, android.support.v4.view.ViewPager.PageTransformer)...
java
@TargetApi(Build.VERSION_CODES.HONEYCOMB) public void transformPage(View view, float position) { //Calculate real position (with padding) position -= (float) ((ViewPager) view.getParent()).getPaddingRight() / (float) view.getWidth(); if (position <= -1.0f || position >= 1.0f) { v...
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "HONEYCOMB", ")", "public", "void", "transformPage", "(", "View", "view", ",", "float", "position", ")", "{", "//Calculate real position (with padding)", "position", "-=", "(", "float", ")", "(", "(", ...
Used for adding a fadein/fadeout animation in the ViewPager transition. Must be used with {@link android.support.v4.view.ViewPager#setPageTransformer(boolean, android.support.v4.view.ViewPager.PageTransformer)}
[ "Used", "for", "adding", "a", "fadein", "/", "fadeout", "animation", "in", "the", "ViewPager", "transition", ".", "Must", "be", "used", "with", "{" ]
train
https://github.com/omadahealth/CircularBarPager/blob/3a43e8828849da727fd13345e83b8432f7271155/library/src/main/java/com/github/omadahealth/circularbarpager/library/viewpager/FadeViewPagerTransformer.java#L40-L59
google/error-prone
check_api/src/main/java/com/google/errorprone/matchers/Matchers.java
Matchers.toType
public static <S extends T, T extends Tree> Matcher<T> toType( final Class<S> type, final Matcher<? super S> matcher) { """ Converts the given matcher to one that can be applied to any tree but is only executed when run on a tree of {@code type} and returns {@code false} for all other tree types. """ ...
java
public static <S extends T, T extends Tree> Matcher<T> toType( final Class<S> type, final Matcher<? super S> matcher) { return new Matcher<T>() { @Override public boolean matches(T tree, VisitorState state) { return type.isInstance(tree) && matcher.matches(type.cast(tree), state); } ...
[ "public", "static", "<", "S", "extends", "T", ",", "T", "extends", "Tree", ">", "Matcher", "<", "T", ">", "toType", "(", "final", "Class", "<", "S", ">", "type", ",", "final", "Matcher", "<", "?", "super", "S", ">", "matcher", ")", "{", "return", ...
Converts the given matcher to one that can be applied to any tree but is only executed when run on a tree of {@code type} and returns {@code false} for all other tree types.
[ "Converts", "the", "given", "matcher", "to", "one", "that", "can", "be", "applied", "to", "any", "tree", "but", "is", "only", "executed", "when", "run", "on", "a", "tree", "of", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/Matchers.java#L1244-L1252
foundation-runtime/service-directory
2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java
DirectoryServiceClient.registerServiceInstance
public void registerServiceInstance(ProvidedServiceInstance instance, final RegistrationCallback cb, Object context) { """ Register ServiceInstance with Callback. @param instance the ProvidedServiceInstance. @param cb the callback. @param context the context Object. """ ProtocolHeader header =...
java
public void registerServiceInstance(ProvidedServiceInstance instance, final RegistrationCallback cb, Object context){ ProtocolHeader header = new ProtocolHeader(); header.setType(ProtocolType.RegisterServiceInstance); RegisterServiceInstanceProtocol p = new RegisterServiceInstanceProtocol(inst...
[ "public", "void", "registerServiceInstance", "(", "ProvidedServiceInstance", "instance", ",", "final", "RegistrationCallback", "cb", ",", "Object", "context", ")", "{", "ProtocolHeader", "header", "=", "new", "ProtocolHeader", "(", ")", ";", "header", ".", "setType"...
Register ServiceInstance with Callback. @param instance the ProvidedServiceInstance. @param cb the callback. @param context the context Object.
[ "Register", "ServiceInstance", "with", "Callback", "." ]
train
https://github.com/foundation-runtime/service-directory/blob/a7bdefe173dc99e75eff4a24e07e6407e62f2ed4/2.0/sd-api/src/main/java/com/cisco/oss/foundation/directory/impl/DirectoryServiceClient.java#L370-L389
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/distort/DistortImageOps.java
DistortImageOps.boundBox_F64
public static RectangleLength2D_F64 boundBox_F64( int srcWidth , int srcHeight , PixelTransform<Point2D_F64> transform , Point2D_F64 transformed ) { """ Finds an axis-aligned bounding box which would contain a image after it has been transformed. The returned bounding box can be larg...
java
public static RectangleLength2D_F64 boundBox_F64( int srcWidth , int srcHeight , PixelTransform<Point2D_F64> transform , Point2D_F64 transformed ) { ImageRectangle_F64 r = new ImageRectangle_F64(); r.x0=r.y0=Double.MAX_VALUE; r.x1=r.y1=-Double.MAX_VALUE; for( int y = 0; y < srcH...
[ "public", "static", "RectangleLength2D_F64", "boundBox_F64", "(", "int", "srcWidth", ",", "int", "srcHeight", ",", "PixelTransform", "<", "Point2D_F64", ">", "transform", ",", "Point2D_F64", "transformed", ")", "{", "ImageRectangle_F64", "r", "=", "new", "ImageRecta...
Finds an axis-aligned bounding box which would contain a image after it has been transformed. The returned bounding box can be larger then the original image. @param srcWidth Width of the source image @param srcHeight Height of the source image @param transform Transform being applied to the image @return Bounding box
[ "Finds", "an", "axis", "-", "aligned", "bounding", "box", "which", "would", "contain", "a", "image", "after", "it", "has", "been", "transformed", ".", "The", "returned", "bounding", "box", "can", "be", "larger", "then", "the", "original", "image", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/distort/DistortImageOps.java#L404-L428
camunda/camunda-xml-model
src/main/java/org/camunda/bpm/model/xml/impl/util/DomUtil.java
DomUtil.parseInputStream
public static DomDocument parseInputStream(DocumentBuilderFactory documentBuilderFactory, InputStream inputStream) { """ Create a new DOM document from the input stream @param documentBuilderFactory the factory to build to DOM document @param inputStream the input stream to parse @return the new DOM document ...
java
public static DomDocument parseInputStream(DocumentBuilderFactory documentBuilderFactory, InputStream inputStream) { try { DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); documentBuilder.setErrorHandler(new DomErrorHandler()); return new DomDocumentImpl(documentBuil...
[ "public", "static", "DomDocument", "parseInputStream", "(", "DocumentBuilderFactory", "documentBuilderFactory", ",", "InputStream", "inputStream", ")", "{", "try", "{", "DocumentBuilder", "documentBuilder", "=", "documentBuilderFactory", ".", "newDocumentBuilder", "(", ")",...
Create a new DOM document from the input stream @param documentBuilderFactory the factory to build to DOM document @param inputStream the input stream to parse @return the new DOM document @throws ModelParseException if a parsing or IO error is triggered
[ "Create", "a", "new", "DOM", "document", "from", "the", "input", "stream" ]
train
https://github.com/camunda/camunda-xml-model/blob/85b3f879e26d063f71c94cfd21ac17d9ff6baf4d/src/main/java/org/camunda/bpm/model/xml/impl/util/DomUtil.java#L235-L251
voldemort/voldemort
src/java/voldemort/utils/pool/QueuedKeyedResourcePool.java
QueuedKeyedResourcePool.registerResourceRequest
public void registerResourceRequest(K key, AsyncResourceRequest<V> resourceRequest) { """ This method is the asynchronous (nonblocking) version of KeyedResourcePool.checkout. This method necessarily has a different function declaration (i.e., arguments passed and return type). This method either checks out a ...
java
public void registerResourceRequest(K key, AsyncResourceRequest<V> resourceRequest) { checkNotClosed(); Queue<AsyncResourceRequest<V>> requestQueue = getRequestQueueForKey(key); if(requestQueue.isEmpty()) { // Attempt non-blocking checkout iff requestQueue is empty. Poo...
[ "public", "void", "registerResourceRequest", "(", "K", "key", ",", "AsyncResourceRequest", "<", "V", ">", "resourceRequest", ")", "{", "checkNotClosed", "(", ")", ";", "Queue", "<", "AsyncResourceRequest", "<", "V", ">", ">", "requestQueue", "=", "getRequestQueu...
This method is the asynchronous (nonblocking) version of KeyedResourcePool.checkout. This method necessarily has a different function declaration (i.e., arguments passed and return type). This method either checks out a resource and uses that resource or enqueues a request to checkout the resource. I.e., there is a no...
[ "This", "method", "is", "the", "asynchronous", "(", "nonblocking", ")", "version", "of", "KeyedResourcePool", ".", "checkout", ".", "This", "method", "necessarily", "has", "a", "different", "function", "declaration", "(", "i", ".", "e", ".", "arguments", "pass...
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/pool/QueuedKeyedResourcePool.java#L94-L122
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java
ServerUpdater.setNickname
public ServerUpdater setNickname(User user, String nickname) { """ Queues a user's nickname to be updated. @param user The user whose nickname should be updated. @param nickname The new nickname of the user. @return The current instance in order to chain call methods. """ delegate.setNickname(user...
java
public ServerUpdater setNickname(User user, String nickname) { delegate.setNickname(user, nickname); return this; }
[ "public", "ServerUpdater", "setNickname", "(", "User", "user", ",", "String", "nickname", ")", "{", "delegate", ".", "setNickname", "(", "user", ",", "nickname", ")", ";", "return", "this", ";", "}" ]
Queues a user's nickname to be updated. @param user The user whose nickname should be updated. @param nickname The new nickname of the user. @return The current instance in order to chain call methods.
[ "Queues", "a", "user", "s", "nickname", "to", "be", "updated", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/server/ServerUpdater.java#L408-L411
Azure/azure-sdk-for-java
dns/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/dns/v2017_10_01/implementation/ZonesInner.java
ZonesInner.getByResourceGroup
public ZoneInner getByResourceGroup(String resourceGroupName, String zoneName) { """ Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating dot). @throws I...
java
public ZoneInner getByResourceGroup(String resourceGroupName, String zoneName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, zoneName).toBlocking().single().body(); }
[ "public", "ZoneInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "zoneName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "zoneName", ")", ".", "toBlocking", "(", ")", ".", "single", "(...
Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating dot). @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown...
[ "Gets", "a", "DNS", "zone", ".", "Retrieves", "the", "zone", "properties", "but", "not", "the", "record", "sets", "within", "the", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/dns/v2017_10_01/implementation/ZonesInner.java#L620-L622
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.readResources
public List<CmsResource> readResources( CmsDbContext dbc, CmsResource parent, CmsResourceFilter filter, boolean readTree) throws CmsException, CmsDataAccessException { """ Reads all resources below the given path matching the filter criteria, including the full tree below the p...
java
public List<CmsResource> readResources( CmsDbContext dbc, CmsResource parent, CmsResourceFilter filter, boolean readTree) throws CmsException, CmsDataAccessException { // try to get the sub resources from the cache String cacheKey = getCacheKey( new Strin...
[ "public", "List", "<", "CmsResource", ">", "readResources", "(", "CmsDbContext", "dbc", ",", "CmsResource", "parent", ",", "CmsResourceFilter", "filter", ",", "boolean", "readTree", ")", "throws", "CmsException", ",", "CmsDataAccessException", "{", "// try to get the ...
Reads all resources below the given path matching the filter criteria, including the full tree below the path only in case the <code>readTree</code> parameter is <code>true</code>.<p> @param dbc the current database context @param parent the parent path to read the resources from @param filter the filter @param readTr...
[ "Reads", "all", "resources", "below", "the", "given", "path", "matching", "the", "filter", "criteria", "including", "the", "full", "tree", "below", "the", "path", "only", "in", "case", "the", "<code", ">", "readTree<", "/", "code", ">", "parameter", "is", ...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L7703-L7751
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
FSNamesystem.setQuota
void setQuota(String path, long nsQuota, long dsQuota) throws IOException { """ Set the namespace quota and diskspace quota for a directory. See {@link ClientProtocol#setQuota(String, long, long)} for the contract. """ writeLock(); try { if (isInSafeMode()) { throw new SafeModeException...
java
void setQuota(String path, long nsQuota, long dsQuota) throws IOException { writeLock(); try { if (isInSafeMode()) { throw new SafeModeException("Cannot setQuota " + path, safeMode); } INode[] inodes = this.dir.getExistingPathINodes(path); if (isPermissionEnabled && isP...
[ "void", "setQuota", "(", "String", "path", ",", "long", "nsQuota", ",", "long", "dsQuota", ")", "throws", "IOException", "{", "writeLock", "(", ")", ";", "try", "{", "if", "(", "isInSafeMode", "(", ")", ")", "{", "throw", "new", "SafeModeException", "(",...
Set the namespace quota and diskspace quota for a directory. See {@link ClientProtocol#setQuota(String, long, long)} for the contract.
[ "Set", "the", "namespace", "quota", "and", "diskspace", "quota", "for", "a", "directory", ".", "See", "{" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L4082-L4099
devcon5io/common
passwords/src/main/java/io/devcon5/password/Passwords.java
Passwords.validatePassword
public static boolean validatePassword(char[] password, String goodHash) throws NoSuchAlgorithmException, InvalidKeySpecException { """ Validates a password using a hash. @param password the password to check @param goodHash the hash of the valid password @return true if the password is correct, false if ...
java
public static boolean validatePassword(char[] password, String goodHash) throws NoSuchAlgorithmException, InvalidKeySpecException { final String[] params = goodHash.split(":"); final int iterations = Integer.parseInt(params[ITERATION_INDEX]); final byte[] salt = fromHex(params[SALT_INDEX]); final byte[...
[ "public", "static", "boolean", "validatePassword", "(", "char", "[", "]", "password", ",", "String", "goodHash", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", "{", "final", "String", "[", "]", "params", "=", "goodHash", ".", "split", ...
Validates a password using a hash. @param password the password to check @param goodHash the hash of the valid password @return true if the password is correct, false if not
[ "Validates", "a", "password", "using", "a", "hash", "." ]
train
https://github.com/devcon5io/common/blob/363688e0dc904d559682bf796bd6c836b4e0efc7/passwords/src/main/java/io/devcon5/password/Passwords.java#L107-L119
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/model/Tile.java
Tile.getOrigin
public Point getOrigin() { """ Returns the top-left point of this tile in absolute coordinates. @return the top-left point """ if (this.origin == null) { double x = MercatorProjection.tileToPixel(this.tileX, this.tileSize); double y = MercatorProjection.tileToPixel(this.tileY...
java
public Point getOrigin() { if (this.origin == null) { double x = MercatorProjection.tileToPixel(this.tileX, this.tileSize); double y = MercatorProjection.tileToPixel(this.tileY, this.tileSize); this.origin = new Point(x, y); } return this.origin; }
[ "public", "Point", "getOrigin", "(", ")", "{", "if", "(", "this", ".", "origin", "==", "null", ")", "{", "double", "x", "=", "MercatorProjection", ".", "tileToPixel", "(", "this", ".", "tileX", ",", "this", ".", "tileSize", ")", ";", "double", "y", "...
Returns the top-left point of this tile in absolute coordinates. @return the top-left point
[ "Returns", "the", "top", "-", "left", "point", "of", "this", "tile", "in", "absolute", "coordinates", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/model/Tile.java#L227-L234
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/Gtin8Validator.java
Gtin8Validator.isValid
@Override public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) { """ {@inheritDoc} check if given string is a valid gtin. @see javax.validation.ConstraintValidator#isValid(java.lang.Object, javax.validation.ConstraintValidatorContext) """ final String valueAsSt...
java
@Override public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) { final String valueAsString = Objects.toString(pvalue, null); if (StringUtils.isEmpty(valueAsString)) { return true; } if (!StringUtils.isNumeric(valueAsString)) { // EAN8 must be numeri...
[ "@", "Override", "public", "final", "boolean", "isValid", "(", "final", "Object", "pvalue", ",", "final", "ConstraintValidatorContext", "pcontext", ")", "{", "final", "String", "valueAsString", "=", "Objects", ".", "toString", "(", "pvalue", ",", "null", ")", ...
{@inheritDoc} check if given string is a valid gtin. @see javax.validation.ConstraintValidator#isValid(java.lang.Object, javax.validation.ConstraintValidatorContext)
[ "{", "@inheritDoc", "}", "check", "if", "given", "string", "is", "a", "valid", "gtin", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/impl/Gtin8Validator.java#L61-L77
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/RESTClient.java
RESTClient.createSocket
private void createSocket() throws Exception { """ Create a socket connection, setting m_socket, using configured parameters. """ // Some socket options, notably setReceiveBufferSize, must be set before the // socket is connected. So, first create the socket, then set options, then connect. ...
java
private void createSocket() throws Exception { // Some socket options, notably setReceiveBufferSize, must be set before the // socket is connected. So, first create the socket, then set options, then connect. if (m_sslParams != null) { SSLSocketFactory factory = m_sslParams.creat...
[ "private", "void", "createSocket", "(", ")", "throws", "Exception", "{", "// Some socket options, notably setReceiveBufferSize, must be set before the\r", "// socket is connected. So, first create the socket, then set options, then connect.\r", "if", "(", "m_sslParams", "!=", "null", "...
Create a socket connection, setting m_socket, using configured parameters.
[ "Create", "a", "socket", "connection", "setting", "m_socket", "using", "configured", "parameters", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/RESTClient.java#L558-L572
apereo/cas
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/scripting/ScriptingUtils.java
ScriptingUtils.executeGroovyScript
public static <T> T executeGroovyScript(final Resource groovyScript, final String methodName, final Class<T> clazz) { """ Execute groovy script. @param <T> the type parameter @param groovyScript the groovy script ...
java
public static <T> T executeGroovyScript(final Resource groovyScript, final String methodName, final Class<T> clazz) { return executeGroovyScript(groovyScript, methodName, ArrayUtils.EMPTY_OBJECT_ARRAY, clazz, false); }
[ "public", "static", "<", "T", ">", "T", "executeGroovyScript", "(", "final", "Resource", "groovyScript", ",", "final", "String", "methodName", ",", "final", "Class", "<", "T", ">", "clazz", ")", "{", "return", "executeGroovyScript", "(", "groovyScript", ",", ...
Execute groovy script. @param <T> the type parameter @param groovyScript the groovy script @param methodName the method name @param clazz the clazz @return the t
[ "Execute", "groovy", "script", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/scripting/ScriptingUtils.java#L183-L187
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/i18n/content/ContentPanel.java
ContentPanel.newHeaderLabel
protected Component newHeaderLabel(final String id, final IModel<String> model) { """ Factory method for creating the new {@link Label}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link Label}. @param id the id @p...
java
protected Component newHeaderLabel(final String id, final IModel<String> model) { return ComponentFactory.newLabel(id, model); }
[ "protected", "Component", "newHeaderLabel", "(", "final", "String", "id", ",", "final", "IModel", "<", "String", ">", "model", ")", "{", "return", "ComponentFactory", ".", "newLabel", "(", "id", ",", "model", ")", ";", "}" ]
Factory method for creating the new {@link Label}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link Label}. @param id the id @param model the model @return the new {@link Label}
[ "Factory", "method", "for", "creating", "the", "new", "{", "@link", "Label", "}", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "users", "can", "provide", "t...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/i18n/content/ContentPanel.java#L141-L144
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_GeomFromWKB.java
ST_GeomFromWKB.toGeometry
public static Geometry toGeometry(byte[] bytes, int srid) throws SQLException { """ Convert a WKB representation to a geometry @param bytes the input WKB object @param srid the input SRID @return @throws SQLException """ if(bytes==null) { return null; } WKBReader wkbRead...
java
public static Geometry toGeometry(byte[] bytes, int srid) throws SQLException{ if(bytes==null) { return null; } WKBReader wkbReader = new WKBReader(); try { Geometry geometry = wkbReader.read(bytes); geometry.setSRID(srid); return geometry;...
[ "public", "static", "Geometry", "toGeometry", "(", "byte", "[", "]", "bytes", ",", "int", "srid", ")", "throws", "SQLException", "{", "if", "(", "bytes", "==", "null", ")", "{", "return", "null", ";", "}", "WKBReader", "wkbReader", "=", "new", "WKBReader...
Convert a WKB representation to a geometry @param bytes the input WKB object @param srid the input SRID @return @throws SQLException
[ "Convert", "a", "WKB", "representation", "to", "a", "geometry" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/convert/ST_GeomFromWKB.java#L54-L66
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.rotationTowardsXY
public Matrix4f rotationTowardsXY(float dirX, float dirY) { """ Set this matrix to a rotation transformation about the Z axis to align the local <code>+X</code> towards <code>(dirX, dirY)</code>. <p> The vector <code>(dirX, dirY)</code> must be a unit vector. @param dirX the x component of the normalized dir...
java
public Matrix4f rotationTowardsXY(float dirX, float dirY) { if ((properties & PROPERTY_IDENTITY) == 0) MemUtil.INSTANCE.identity(this); this._m00(dirY); this._m01(dirX); this._m10(-dirX); this._m11(dirY); _properties(PROPERTY_AFFINE | PROPERTY_ORTHONORMAL); ...
[ "public", "Matrix4f", "rotationTowardsXY", "(", "float", "dirX", ",", "float", "dirY", ")", "{", "if", "(", "(", "properties", "&", "PROPERTY_IDENTITY", ")", "==", "0", ")", "MemUtil", ".", "INSTANCE", ".", "identity", "(", "this", ")", ";", "this", ".",...
Set this matrix to a rotation transformation about the Z axis to align the local <code>+X</code> towards <code>(dirX, dirY)</code>. <p> The vector <code>(dirX, dirY)</code> must be a unit vector. @param dirX the x component of the normalized direction @param dirY the y component of the normalized direction @return thi...
[ "Set", "this", "matrix", "to", "a", "rotation", "transformation", "about", "the", "Z", "axis", "to", "align", "the", "local", "<code", ">", "+", "X<", "/", "code", ">", "towards", "<code", ">", "(", "dirX", "dirY", ")", "<", "/", "code", ">", ".", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L3582-L3591
sjamesr/jfreesane
src/main/java/au/com/southsky/jfreesane/SaneSession.java
SaneSession.writePassword
private void writePassword(String resource, String password) throws IOException { """ Write password to outputstream depending on resource provided by saned. @param resource as provided by sane in authorization request @param password @throws IOException """ String[] resourceParts = resource.split("\\...
java
private void writePassword(String resource, String password) throws IOException { String[] resourceParts = resource.split("\\$MD5\\$"); if (resourceParts.length == 1) { // Write in clean outputStream.write(password); } else { outputStream.write("$MD5$" + SanePasswordEncoder.derivePassword(...
[ "private", "void", "writePassword", "(", "String", "resource", ",", "String", "password", ")", "throws", "IOException", "{", "String", "[", "]", "resourceParts", "=", "resource", ".", "split", "(", "\"\\\\$MD5\\\\$\"", ")", ";", "if", "(", "resourceParts", "."...
Write password to outputstream depending on resource provided by saned. @param resource as provided by sane in authorization request @param password @throws IOException
[ "Write", "password", "to", "outputstream", "depending", "on", "resource", "provided", "by", "saned", "." ]
train
https://github.com/sjamesr/jfreesane/blob/15ad0f73df0a8d0efec5167a2141cbd53afd862d/src/main/java/au/com/southsky/jfreesane/SaneSession.java#L375-L383
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java
UnicodeSet.findLastIn
@Deprecated public int findLastIn(CharSequence value, int fromIndex, boolean findNot) { """ Find the last index before fromIndex where the UnicodeSet matches at that index. If findNot is true, then reverse the sense of the match: find the last place where the UnicodeSet doesn't match. If there is no match, -...
java
@Deprecated public int findLastIn(CharSequence value, int fromIndex, boolean findNot) { //TODO add strings, optimize, using ICU4C algorithms int cp; fromIndex -= 1; for (; fromIndex >= 0; fromIndex -= UTF16.getCharCount(cp)) { cp = UTF16.charAt(value, fromIndex); ...
[ "@", "Deprecated", "public", "int", "findLastIn", "(", "CharSequence", "value", ",", "int", "fromIndex", ",", "boolean", "findNot", ")", "{", "//TODO add strings, optimize, using ICU4C algorithms", "int", "cp", ";", "fromIndex", "-=", "1", ";", "for", "(", ";", ...
Find the last index before fromIndex where the UnicodeSet matches at that index. If findNot is true, then reverse the sense of the match: find the last place where the UnicodeSet doesn't match. If there is no match, -1 is returned. BEFORE index is not in the UnicodeSet. @deprecated This API is ICU internal only. Use sp...
[ "Find", "the", "last", "index", "before", "fromIndex", "where", "the", "UnicodeSet", "matches", "at", "that", "index", ".", "If", "findNot", "is", "true", "then", "reverse", "the", "sense", "of", "the", "match", ":", "find", "the", "last", "place", "where"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L4621-L4633
unbescape/unbescape
src/main/java/org/unbescape/uri/UriEscape.java
UriEscape.escapeUriQueryParam
public static void escapeUriQueryParam(final Reader reader, final Writer writer) throws IOException { """ <p> Perform am URI query parameter (name or value) <strong>escape</strong> operation on a <tt>Reader</tt> input using <tt>UTF-8</tt> as encoding, writing results to a <tt>Writer</tt>. </p> <p>...
java
public static void escapeUriQueryParam(final Reader reader, final Writer writer) throws IOException { escapeUriQueryParam(reader, writer, DEFAULT_ENCODING); }
[ "public", "static", "void", "escapeUriQueryParam", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeUriQueryParam", "(", "reader", ",", "writer", ",", "DEFAULT_ENCODING", ")", ";", "}" ]
<p> Perform am URI query parameter (name or value) <strong>escape</strong> operation on a <tt>Reader</tt> input using <tt>UTF-8</tt> as encoding, writing results to a <tt>Writer</tt>. </p> <p> The following are the only allowed chars in an URI query parameter (will not be escaped): </p> <ul> <li><tt>A-Z a-z 0-9</tt></l...
[ "<p", ">", "Perform", "am", "URI", "query", "parameter", "(", "name", "or", "value", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "using", "<tt", ">", "UTF", "-", "8<", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/uri/UriEscape.java#L969-L972
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java
EJSHome.postCreate
public EJBObject postCreate(BeanO beanO, Object primaryKey) throws CreateException, RemoteException { """ Complete the bean creation process. <p> @param beanO the <code>BeanO</code> being created <p> @exception CreateException thrown if create-specific error occurs <p...
java
public EJBObject postCreate(BeanO beanO, Object primaryKey) throws CreateException, RemoteException { homeEnabled(); return postCreate(beanO, primaryKey, false); //142250 }
[ "public", "EJBObject", "postCreate", "(", "BeanO", "beanO", ",", "Object", "primaryKey", ")", "throws", "CreateException", ",", "RemoteException", "{", "homeEnabled", "(", ")", ";", "return", "postCreate", "(", "beanO", ",", "primaryKey", ",", "false", ")", ";...
Complete the bean creation process. <p> @param beanO the <code>BeanO</code> being created <p> @exception CreateException thrown if create-specific error occurs <p> @exception RemoteException thrown if a container error occurs <p>
[ "Complete", "the", "bean", "creation", "process", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/EJSHome.java#L2549-L2555
joniles/mpxj
src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java
MSPDIReader.readCalendar
private void readCalendar(Project.Calendars.Calendar calendar, HashMap<BigInteger, ProjectCalendar> map, List<Pair<ProjectCalendar, BigInteger>> baseCalendars) { """ This method extracts data for a single calendar from an MSPDI file. @param calendar Calendar data @param map Map of calendar UIDs to names @para...
java
private void readCalendar(Project.Calendars.Calendar calendar, HashMap<BigInteger, ProjectCalendar> map, List<Pair<ProjectCalendar, BigInteger>> baseCalendars) { ProjectCalendar bc = m_projectFile.addCalendar(); bc.setUniqueID(NumberHelper.getInteger(calendar.getUID())); bc.setName(calendar.getName...
[ "private", "void", "readCalendar", "(", "Project", ".", "Calendars", ".", "Calendar", "calendar", ",", "HashMap", "<", "BigInteger", ",", "ProjectCalendar", ">", "map", ",", "List", "<", "Pair", "<", "ProjectCalendar", ",", "BigInteger", ">", ">", "baseCalenda...
This method extracts data for a single calendar from an MSPDI file. @param calendar Calendar data @param map Map of calendar UIDs to names @param baseCalendars list of base calendars
[ "This", "method", "extracts", "data", "for", "a", "single", "calendar", "from", "an", "MSPDI", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mspdi/MSPDIReader.java#L444-L482
Azure/azure-sdk-for-java
mixedreality/resource-manager/v2019_02_28_preview/src/main/java/com/microsoft/azure/management/mixedreality/v2019_02_28_preview/implementation/SpatialAnchorsAccountsInner.java
SpatialAnchorsAccountsInner.getByResourceGroupAsync
public Observable<SpatialAnchorsAccountInner> getByResourceGroupAsync(String resourceGroupName, String spatialAnchorsAccountName) { """ Retrieve a Spatial Anchors Account. @param resourceGroupName Name of an Azure resource group. @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account...
java
public Observable<SpatialAnchorsAccountInner> getByResourceGroupAsync(String resourceGroupName, String spatialAnchorsAccountName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, spatialAnchorsAccountName).map(new Func1<ServiceResponse<SpatialAnchorsAccountInner>, SpatialAnchorsAccountInne...
[ "public", "Observable", "<", "SpatialAnchorsAccountInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "spatialAnchorsAccountName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "spatialAn...
Retrieve a Spatial Anchors Account. @param resourceGroupName Name of an Azure resource group. @param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the SpatialAnchorsAccountInner object
[ "Retrieve", "a", "Spatial", "Anchors", "Account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mixedreality/resource-manager/v2019_02_28_preview/src/main/java/com/microsoft/azure/management/mixedreality/v2019_02_28_preview/implementation/SpatialAnchorsAccountsInner.java#L455-L462
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
AmazonS3Client.addHeaderIfNotNull
private static void addHeaderIfNotNull(Request<?> request, String header, String value) { """ Adds the specified header to the specified request, if the header value is not null. @param request The request to add the header to. @param header The header name. @param value The header value. """ ...
java
private static void addHeaderIfNotNull(Request<?> request, String header, String value) { if (value != null) { request.addHeader(header, value); } }
[ "private", "static", "void", "addHeaderIfNotNull", "(", "Request", "<", "?", ">", "request", ",", "String", "header", ",", "String", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "request", ".", "addHeader", "(", "header", ",", "value", ...
Adds the specified header to the specified request, if the header value is not null. @param request The request to add the header to. @param header The header name. @param value The header value.
[ "Adds", "the", "specified", "header", "to", "the", "specified", "request", "if", "the", "header", "value", "is", "not", "null", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L4437-L4441
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonWriteDriver.java
GeoJsonWriteDriver.writeFeature
private void writeFeature(JsonGenerator jsonGenerator, ResultSet rs, int geoFieldIndex) throws IOException, SQLException { """ Write a GeoJSON feature. Features in GeoJSON contain a geometry object and additional properties, and a feature collection represents a list of features. A complete GeoJSON data str...
java
private void writeFeature(JsonGenerator jsonGenerator, ResultSet rs, int geoFieldIndex) throws IOException, SQLException { // feature header jsonGenerator.writeStartObject(); jsonGenerator.writeStringField("type", "Feature"); //Write the first geometry writeGeometry((Geometry) rs...
[ "private", "void", "writeFeature", "(", "JsonGenerator", "jsonGenerator", ",", "ResultSet", "rs", ",", "int", "geoFieldIndex", ")", "throws", "IOException", ",", "SQLException", "{", "// feature header", "jsonGenerator", ".", "writeStartObject", "(", ")", ";", "json...
Write a GeoJSON feature. Features in GeoJSON contain a geometry object and additional properties, and a feature collection represents a list of features. A complete GeoJSON data structure is always an object (in JSON terms). In GeoJSON, an object consists of a collection of name/value pairs -- also called members. Fo...
[ "Write", "a", "GeoJSON", "feature", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonWriteDriver.java#L288-L298
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/face/AipFace.java
AipFace.userCopy
public JSONObject userCopy(String userId, HashMap<String, String> options) { """ 复制用户接口 @param userId - 用户id(由数字、字母、下划线组成),长度限制128B @param options - 可选参数对象,key: value都为string类型 options - options列表: src_group_id 从指定组里复制信息 dst_group_id 需要添加用户的组id @return JSONObject """ AipRequest request = new Ai...
java
public JSONObject userCopy(String userId, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("user_id", userId); if (options != null) { request.addBody(options); } request.setUri(FaceConsts...
[ "public", "JSONObject", "userCopy", "(", "String", "userId", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "request", ".",...
复制用户接口 @param userId - 用户id(由数字、字母、下划线组成),长度限制128B @param options - 可选参数对象,key: value都为string类型 options - options列表: src_group_id 从指定组里复制信息 dst_group_id 需要添加用户的组id @return JSONObject
[ "复制用户接口" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/face/AipFace.java#L275-L287
VoltDB/voltdb
src/catgen/in/javasrc/CatalogDiffEngine.java
CatalogDiffEngine.processModifyResponses
private void processModifyResponses(String errorMessage, List<TablePopulationRequirements> responseList) { """ After we decide we can't modify, add or delete something on a full table, we do a check to see if we can do that on an empty table. The original error and any response from the empty table check is proc...
java
private void processModifyResponses(String errorMessage, List<TablePopulationRequirements> responseList) { assert(errorMessage != null); // if no requirements, then it's just not possible if (responseList == null) { m_supported = false; m_errors.append(errorMessage + "\n...
[ "private", "void", "processModifyResponses", "(", "String", "errorMessage", ",", "List", "<", "TablePopulationRequirements", ">", "responseList", ")", "{", "assert", "(", "errorMessage", "!=", "null", ")", ";", "// if no requirements, then it's just not possible", "if", ...
After we decide we can't modify, add or delete something on a full table, we do a check to see if we can do that on an empty table. The original error and any response from the empty table check is processed here. This code is basically in this method so it's not repeated 3 times for modify, add and delete. See where i...
[ "After", "we", "decide", "we", "can", "t", "modify", "add", "or", "delete", "something", "on", "a", "full", "table", "we", "do", "a", "check", "to", "see", "if", "we", "can", "do", "that", "on", "an", "empty", "table", ".", "The", "original", "error"...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/catgen/in/javasrc/CatalogDiffEngine.java#L1403-L1428
sirthias/parboiled
parboiled-core/src/main/java/org/parboiled/common/StringUtils.java
StringUtils.equalsIgnoreCase
public static boolean equalsIgnoreCase(String str1, String str2) { """ <p>Compares two Strings, returning <code>true</code> if they are equal ignoring the case.</p> <p><code>null</code>s are handled without exceptions. Two <code>null</code> references are considered equal. Comparison is case insensitive.</p> ...
java
public static boolean equalsIgnoreCase(String str1, String str2) { return str1 == null ? str2 == null : str1.equalsIgnoreCase(str2); }
[ "public", "static", "boolean", "equalsIgnoreCase", "(", "String", "str1", ",", "String", "str2", ")", "{", "return", "str1", "==", "null", "?", "str2", "==", "null", ":", "str1", ".", "equalsIgnoreCase", "(", "str2", ")", ";", "}" ]
<p>Compares two Strings, returning <code>true</code> if they are equal ignoring the case.</p> <p><code>null</code>s are handled without exceptions. Two <code>null</code> references are considered equal. Comparison is case insensitive.</p> <pre> StringUtils.equalsIgnoreCase(null, null) = true StringUtils.equalsIgnore...
[ "<p", ">", "Compares", "two", "Strings", "returning", "<code", ">", "true<", "/", "code", ">", "if", "they", "are", "equal", "ignoring", "the", "case", ".", "<", "/", "p", ">", "<p", ">", "<code", ">", "null<", "/", "code", ">", "s", "are", "handle...
train
https://github.com/sirthias/parboiled/blob/84f3ed43e3e171b4c6ab5e6ca6297d264a9d686a/parboiled-core/src/main/java/org/parboiled/common/StringUtils.java#L289-L291
apache/incubator-druid
server/src/main/java/org/apache/druid/segment/realtime/appenderator/BatchAppenderatorDriver.java
BatchAppenderatorDriver.pushAllAndClear
public SegmentsAndMetadata pushAllAndClear(long pushAndClearTimeoutMs) throws InterruptedException, ExecutionException, TimeoutException { """ Push and drop all segments in the {@link SegmentState#APPENDING} state. @param pushAndClearTimeoutMs timeout for pushing and dropping segments @return {@link Se...
java
public SegmentsAndMetadata pushAllAndClear(long pushAndClearTimeoutMs) throws InterruptedException, ExecutionException, TimeoutException { final Collection<String> sequences; synchronized (segments) { sequences = ImmutableList.copyOf(segments.keySet()); } return pushAndClear(sequences, pu...
[ "public", "SegmentsAndMetadata", "pushAllAndClear", "(", "long", "pushAndClearTimeoutMs", ")", "throws", "InterruptedException", ",", "ExecutionException", ",", "TimeoutException", "{", "final", "Collection", "<", "String", ">", "sequences", ";", "synchronized", "(", "s...
Push and drop all segments in the {@link SegmentState#APPENDING} state. @param pushAndClearTimeoutMs timeout for pushing and dropping segments @return {@link SegmentsAndMetadata} for pushed and dropped segments
[ "Push", "and", "drop", "all", "segments", "in", "the", "{", "@link", "SegmentState#APPENDING", "}", "state", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/segment/realtime/appenderator/BatchAppenderatorDriver.java#L116-L125
nmorel/gwt-jackson
gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/client/JsonSerializationContext.java
JsonSerializationContext.traceError
public JsonSerializationException traceError( Object value, String message, JsonWriter writer ) { """ Trace an error with current writer state and returns a corresponding exception. @param value current value @param message error message @param writer current writer @return a {@link JsonSerializationExcept...
java
public JsonSerializationException traceError( Object value, String message, JsonWriter writer ) { JsonSerializationException exception = traceError( value, message ); traceWriterInfo( value, writer ); return exception; }
[ "public", "JsonSerializationException", "traceError", "(", "Object", "value", ",", "String", "message", ",", "JsonWriter", "writer", ")", "{", "JsonSerializationException", "exception", "=", "traceError", "(", "value", ",", "message", ")", ";", "traceWriterInfo", "(...
Trace an error with current writer state and returns a corresponding exception. @param value current value @param message error message @param writer current writer @return a {@link JsonSerializationException} with the given message
[ "Trace", "an", "error", "with", "current", "writer", "state", "and", "returns", "a", "corresponding", "exception", "." ]
train
https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/client/JsonSerializationContext.java#L519-L523
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java
OjbTagsHandler.forAllIndexColumns
public void forAllIndexColumns(String template, Properties attributes) throws XDocletException { """ Processes the template for all columns of the current table index. @param template The template @param attributes The attributes of the tag @exception XDocletException if an error occu...
java
public void forAllIndexColumns(String template, Properties attributes) throws XDocletException { for (Iterator it = _curIndexDef.getColumns(); it.hasNext(); ) { _curColumnDef = _curTableDef.getColumn((String)it.next()); generate(template); } _curColumnD...
[ "public", "void", "forAllIndexColumns", "(", "String", "template", ",", "Properties", "attributes", ")", "throws", "XDocletException", "{", "for", "(", "Iterator", "it", "=", "_curIndexDef", ".", "getColumns", "(", ")", ";", "it", ".", "hasNext", "(", ")", "...
Processes the template for all columns of the current table index. @param template The template @param attributes The attributes of the tag @exception XDocletException if an error occurs @doc.tag type="block"
[ "Processes", "the", "template", "for", "all", "columns", "of", "the", "current", "table", "index", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/OjbTagsHandler.java#L1431-L1439
jamesagnew/hapi-fhir
hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsProvider.java
AbstractJaxRsProvider.getRequest
public Builder getRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation, final String theResourceName) { """ Return the requestbuilder for the server @param requestType the type of the request @param restOperation the rest operation type @param theResourceName the resource na...
java
public Builder getRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation, final String theResourceName) { return new JaxRsRequest.Builder(this, requestType, restOperation, myUriInfo.getRequestUri().toString(), theResourceName); }
[ "public", "Builder", "getRequest", "(", "final", "RequestTypeEnum", "requestType", ",", "final", "RestOperationTypeEnum", "restOperation", ",", "final", "String", "theResourceName", ")", "{", "return", "new", "JaxRsRequest", ".", "Builder", "(", "this", ",", "reques...
Return the requestbuilder for the server @param requestType the type of the request @param restOperation the rest operation type @param theResourceName the resource name @return the requestbuilder
[ "Return", "the", "requestbuilder", "for", "the", "server" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsProvider.java#L207-L209
FaritorKang/unmz-common-util
src/main/java/net/unmz/java/util/express/QueryExpInfoUtils.java
QueryExpInfoUtils.getExpInfo
public static ExpResultInfoVo getExpInfo(String orderNo, String type) { """ 返回物流实体 用于其他处理 @param orderNo 物流单号 @param type 物流公司 @return """ QueryHeard queryHeard = new QueryHeard(orderNo, type).invoke(); String host = queryHeard.getHost(); String path = queryHeard.getPath(); ...
java
public static ExpResultInfoVo getExpInfo(String orderNo, String type) { QueryHeard queryHeard = new QueryHeard(orderNo, type).invoke(); String host = queryHeard.getHost(); String path = queryHeard.getPath(); Map<String, String> headers = queryHeard.getHeaders(); Map<String, Strin...
[ "public", "static", "ExpResultInfoVo", "getExpInfo", "(", "String", "orderNo", ",", "String", "type", ")", "{", "QueryHeard", "queryHeard", "=", "new", "QueryHeard", "(", "orderNo", ",", "type", ")", ".", "invoke", "(", ")", ";", "String", "host", "=", "qu...
返回物流实体 用于其他处理 @param orderNo 物流单号 @param type 物流公司 @return
[ "返回物流实体", "用于其他处理" ]
train
https://github.com/FaritorKang/unmz-common-util/blob/2912b8889b85ed910d536f85b24b6fa68035814a/src/main/java/net/unmz/java/util/express/QueryExpInfoUtils.java#L94-L107
mgm-tp/jfunk
jfunk-common/src/main/java/com/mgmtp/jfunk/common/config/BaseScope.java
BaseScope.getScopedObject
protected <T> T getScopedObject(final Key<T> key, final Provider<T> unscoped, final Map<Key<?>, Object> scopeMap) { """ If already present, gets the object for the specified key from the scope map. Otherwise it is retrieved from the unscoped provider and stored in the scope map. @param key the key @param uns...
java
protected <T> T getScopedObject(final Key<T> key, final Provider<T> unscoped, final Map<Key<?>, Object> scopeMap) { // ok, because we know what we'd put in before @SuppressWarnings("unchecked") T value = (T) scopeMap.get(key); if (value == null) { /* * no cache instance present, so we use the one we get ...
[ "protected", "<", "T", ">", "T", "getScopedObject", "(", "final", "Key", "<", "T", ">", "key", ",", "final", "Provider", "<", "T", ">", "unscoped", ",", "final", "Map", "<", "Key", "<", "?", ">", ",", "Object", ">", "scopeMap", ")", "{", "// ok, be...
If already present, gets the object for the specified key from the scope map. Otherwise it is retrieved from the unscoped provider and stored in the scope map. @param key the key @param unscoped the unscoped provider for creating the object @param scopeMap the scope map @return the correctly scoped object
[ "If", "already", "present", "gets", "the", "object", "for", "the", "specified", "key", "from", "the", "scope", "map", ".", "Otherwise", "it", "is", "retrieved", "from", "the", "unscoped", "provider", "and", "stored", "in", "the", "scope", "map", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-common/src/main/java/com/mgmtp/jfunk/common/config/BaseScope.java#L67-L80
protostuff/protostuff
protostuff-msgpack/src/main/java/io/protostuff/MsgpackIOUtil.java
MsgpackIOUtil.mergeFrom
public static <T> void mergeFrom(MessageBufferInput in, T message, Schema<T> schema, boolean numeric) throws IOException { """ Merges the {@code message} from the {@link MessageBufferInput} using the given {@code schema}. """ MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(in); try ...
java
public static <T> void mergeFrom(MessageBufferInput in, T message, Schema<T> schema, boolean numeric) throws IOException { MessageUnpacker unpacker = MessagePack.newDefaultUnpacker(in); try { mergeFrom(unpacker, message, schema, numeric); } finally { ...
[ "public", "static", "<", "T", ">", "void", "mergeFrom", "(", "MessageBufferInput", "in", ",", "T", "message", ",", "Schema", "<", "T", ">", "schema", ",", "boolean", "numeric", ")", "throws", "IOException", "{", "MessageUnpacker", "unpacker", "=", "MessagePa...
Merges the {@code message} from the {@link MessageBufferInput} using the given {@code schema}.
[ "Merges", "the", "{" ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-msgpack/src/main/java/io/protostuff/MsgpackIOUtil.java#L145-L158