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
hawkular/hawkular-bus
hawkular-bus-common/src/main/java/org/hawkular/bus/common/MessageProcessor.java
MessageProcessor.createMessage
protected Message createMessage(ConnectionContext context, BasicMessage basicMessage, Map<String, String> headers) throws JMSException { """ Creates a text message that can be send via a producer that contains the given BasicMessage's JSON encoded data. @param context the context whose session is us...
java
protected Message createMessage(ConnectionContext context, BasicMessage basicMessage, Map<String, String> headers) throws JMSException { if (context == null) { throw new IllegalArgumentException("The context is null"); } if (basicMessage == null) { throw new I...
[ "protected", "Message", "createMessage", "(", "ConnectionContext", "context", ",", "BasicMessage", "basicMessage", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "throws", "JMSException", "{", "if", "(", "context", "==", "null", ")", "{", "thro...
Creates a text message that can be send via a producer that contains the given BasicMessage's JSON encoded data. @param context the context whose session is used to create the message @param basicMessage contains the data that will be JSON-encoded and encapsulated in the created message, with optional headers included...
[ "Creates", "a", "text", "message", "that", "can", "be", "send", "via", "a", "producer", "that", "contains", "the", "given", "BasicMessage", "s", "JSON", "encoded", "data", "." ]
train
https://github.com/hawkular/hawkular-bus/blob/28d6b58bec81a50f8344d39f309b6971271ae627/hawkular-bus-common/src/main/java/org/hawkular/bus/common/MessageProcessor.java#L359-L379
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addErrorsPropertyTypeFloat
public FessMessages addErrorsPropertyTypeFloat(String property, String arg0) { """ Add the created action message for the key 'errors.property_type_float' with parameters. <pre> message: {0} should be numeric. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 f...
java
public FessMessages addErrorsPropertyTypeFloat(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_property_type_float, arg0)); return this; }
[ "public", "FessMessages", "addErrorsPropertyTypeFloat", "(", "String", "property", ",", "String", "arg0", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "ERRORS_property_type_float", ",", "arg0",...
Add the created action message for the key 'errors.property_type_float' with parameters. <pre> message: {0} should be numeric. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "errors", ".", "property_type_float", "with", "parameters", ".", "<pre", ">", "message", ":", "{", "0", "}", "should", "be", "numeric", ".", "<", "/", "pre", ">" ]
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L2230-L2234
m-m-m/util
value/src/main/java/net/sf/mmm/util/value/base/StringValueConverterImpl.java
StringValueConverterImpl.parseNumber
private Number parseNumber(String numberValue, Object valueSource) throws WrongValueTypeException { """ This method parses a numeric value. @param numberValue is the number value as string. @param valueSource describes the source of the value. This may be the filename where the value was read from, an XPath w...
java
private Number parseNumber(String numberValue, Object valueSource) throws WrongValueTypeException { try { Double d = Double.valueOf(numberValue); return this.mathUtil.toSimplestNumber(d); } catch (NumberFormatException e) { throw new WrongValueTypeException(e, numberValue, valueSource, Number...
[ "private", "Number", "parseNumber", "(", "String", "numberValue", ",", "Object", "valueSource", ")", "throws", "WrongValueTypeException", "{", "try", "{", "Double", "d", "=", "Double", ".", "valueOf", "(", "numberValue", ")", ";", "return", "this", ".", "mathU...
This method parses a numeric value. @param numberValue is the number value as string. @param valueSource describes the source of the value. This may be the filename where the value was read from, an XPath where the value was located in an XML document, etc. It is used in exceptions thrown if something goes wrong. This...
[ "This", "method", "parses", "a", "numeric", "value", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/value/src/main/java/net/sf/mmm/util/value/base/StringValueConverterImpl.java#L111-L119
sagiegurari/fax4j
src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java
WindowsJNIFaxClientSpi.winCancelFaxJob
private void winCancelFaxJob(String serverName,int faxJobID) { """ This function will cancel an existing fax job. @param serverName The fax server name @param faxJobID The fax job ID """ synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK) { //pre native call th...
java
private void winCancelFaxJob(String serverName,int faxJobID) { synchronized(WindowsFaxClientSpiHelper.NATIVE_LOCK) { //pre native call this.preNativeCall(); //invoke native WindowsJNIFaxClientSpi.cancelFaxJobNative(serverName,faxJobID); ...
[ "private", "void", "winCancelFaxJob", "(", "String", "serverName", ",", "int", "faxJobID", ")", "{", "synchronized", "(", "WindowsFaxClientSpiHelper", ".", "NATIVE_LOCK", ")", "{", "//pre native call", "this", ".", "preNativeCall", "(", ")", ";", "//invoke native", ...
This function will cancel an existing fax job. @param serverName The fax server name @param faxJobID The fax job ID
[ "This", "function", "will", "cancel", "an", "existing", "fax", "job", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/windows/WindowsJNIFaxClientSpi.java#L328-L338
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/wikipedia/Descriptor.java
Descriptor.setIncomingLinks
public void setIncomingLinks(int i, Title v) { """ indexed setter for incomingLinks - sets an indexed value - List of incoming links (from other Wikipedia pages) associated with a Wikipedia page. @generated @param i index in the array to set @param v value to set into the array """ if (Descriptor_Type....
java
public void setIncomingLinks(int i, Title v) { if (Descriptor_Type.featOkTst && ((Descriptor_Type)jcasType).casFeat_incomingLinks == null) jcasType.jcas.throwFeatMissing("incomingLinks", "de.julielab.jules.types.wikipedia.Descriptor"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, (...
[ "public", "void", "setIncomingLinks", "(", "int", "i", ",", "Title", "v", ")", "{", "if", "(", "Descriptor_Type", ".", "featOkTst", "&&", "(", "(", "Descriptor_Type", ")", "jcasType", ")", ".", "casFeat_incomingLinks", "==", "null", ")", "jcasType", ".", "...
indexed setter for incomingLinks - sets an indexed value - List of incoming links (from other Wikipedia pages) associated with a Wikipedia page. @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "incomingLinks", "-", "sets", "an", "indexed", "value", "-", "List", "of", "incoming", "links", "(", "from", "other", "Wikipedia", "pages", ")", "associated", "with", "a", "Wikipedia", "page", "." ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/wikipedia/Descriptor.java#L161-L165
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java
SDMath.matrixInverse
public SDVariable matrixInverse(String name, SDVariable in) { """ Matrix inverse op. For 2D input, this returns the standard matrix inverse. For higher dimensional input with shape [..., m, m] the matrix inverse is returned for each shape [m,m] sub-matrix. @param name Name of the output variable @param in ...
java
public SDVariable matrixInverse(String name, SDVariable in) { validateFloatingPoint("matrix inverse", in); SDVariable ret = f().matrixInverse(in); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "matrixInverse", "(", "String", "name", ",", "SDVariable", "in", ")", "{", "validateFloatingPoint", "(", "\"matrix inverse\"", ",", "in", ")", ";", "SDVariable", "ret", "=", "f", "(", ")", ".", "matrixInverse", "(", "in", ")", ";", ...
Matrix inverse op. For 2D input, this returns the standard matrix inverse. For higher dimensional input with shape [..., m, m] the matrix inverse is returned for each shape [m,m] sub-matrix. @param name Name of the output variable @param in Input @return Matrix inverse variable
[ "Matrix", "inverse", "op", ".", "For", "2D", "input", "this", "returns", "the", "standard", "matrix", "inverse", ".", "For", "higher", "dimensional", "input", "with", "shape", "[", "...", "m", "m", "]", "the", "matrix", "inverse", "is", "returned", "for", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java#L1702-L1706
alkacon/opencms-core
src-gwt/org/opencms/ade/galleries/client/ui/CmsGalleryDialog.java
CmsGalleryDialog.setDialogSize
public void setDialogSize(int width, int height) { """ Sets the size of the gallery parent panel and triggers the event to the tab.<p> @param width the new width @param height the new height """ if (height > 50) { m_height = height; m_parentPanel.setHeight(m_height + "px");...
java
public void setDialogSize(int width, int height) { if (height > 50) { m_height = height; m_parentPanel.setHeight(m_height + "px"); } m_width = width; m_parentPanel.setWidth(m_width + "px"); truncateTabs(); }
[ "public", "void", "setDialogSize", "(", "int", "width", ",", "int", "height", ")", "{", "if", "(", "height", ">", "50", ")", "{", "m_height", "=", "height", ";", "m_parentPanel", ".", "setHeight", "(", "m_height", "+", "\"px\"", ")", ";", "}", "m_width...
Sets the size of the gallery parent panel and triggers the event to the tab.<p> @param width the new width @param height the new height
[ "Sets", "the", "size", "of", "the", "gallery", "parent", "panel", "and", "triggers", "the", "event", "to", "the", "tab", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/galleries/client/ui/CmsGalleryDialog.java#L613-L622
apache/spark
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java
ExternalShuffleBlockResolver.executorRemoved
public void executorRemoved(String executorId, String appId) { """ Removes all the non-shuffle files in any local directories associated with the finished executor. """ logger.info("Clean up non-shuffle files associated with the finished executor {}", executorId); AppExecId fullId = new AppExecId(appI...
java
public void executorRemoved(String executorId, String appId) { logger.info("Clean up non-shuffle files associated with the finished executor {}", executorId); AppExecId fullId = new AppExecId(appId, executorId); final ExecutorShuffleInfo executor = executors.get(fullId); if (executor == null) { //...
[ "public", "void", "executorRemoved", "(", "String", "executorId", ",", "String", "appId", ")", "{", "logger", ".", "info", "(", "\"Clean up non-shuffle files associated with the finished executor {}\"", ",", "executorId", ")", ";", "AppExecId", "fullId", "=", "new", "...
Removes all the non-shuffle files in any local directories associated with the finished executor.
[ "Removes", "all", "the", "non", "-", "shuffle", "files", "in", "any", "local", "directories", "associated", "with", "the", "finished", "executor", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java#L223-L237
graphhopper/graphhopper
api/src/main/java/com/graphhopper/PathWrapper.java
PathWrapper.addPathDetails
public void addPathDetails(Map<String, List<PathDetail>> details) { """ Adds the given PathDetails to the existing ones. If there are already PathDetails set, the number details has to be equal to <code>details</code>. @param details The PathDetails to add """ if (!this.pathDetails.isEmpty() && !de...
java
public void addPathDetails(Map<String, List<PathDetail>> details) { if (!this.pathDetails.isEmpty() && !details.isEmpty() && this.pathDetails.size() != details.size()) { throw new IllegalStateException("Details have to be the same size"); } for (Map.Entry<String, List<PathDetail>> de...
[ "public", "void", "addPathDetails", "(", "Map", "<", "String", ",", "List", "<", "PathDetail", ">", ">", "details", ")", "{", "if", "(", "!", "this", ".", "pathDetails", ".", "isEmpty", "(", ")", "&&", "!", "details", ".", "isEmpty", "(", ")", "&&", ...
Adds the given PathDetails to the existing ones. If there are already PathDetails set, the number details has to be equal to <code>details</code>. @param details The PathDetails to add
[ "Adds", "the", "given", "PathDetails", "to", "the", "existing", "ones", ".", "If", "there", "are", "already", "PathDetails", "set", "the", "number", "details", "has", "to", "be", "equal", "to", "<code", ">", "details<", "/", "code", ">", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/api/src/main/java/com/graphhopper/PathWrapper.java#L241-L253
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getContinentRegionInfo
public void getContinentRegionInfo(int continentID, int floorID, int[] ids, Callback<List<ContinentRegion>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on continents API go <a href="https://wiki.guildwars2.com/wiki/API:2/continents">here</a><br/> Give user the access to {@link C...
java
public void getContinentRegionInfo(int continentID, int floorID, int[] ids, Callback<List<ContinentRegion>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getContinentRegionInfo(Integer.toString(continentID), Integer.toString(floorID), processIds(ids), Guild...
[ "public", "void", "getContinentRegionInfo", "(", "int", "continentID", ",", "int", "floorID", ",", "int", "[", "]", "ids", ",", "Callback", "<", "List", "<", "ContinentRegion", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerExceptio...
For more info on continents API go <a href="https://wiki.guildwars2.com/wiki/API:2/continents">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param continentID {@link Continent#id} @param floorID {@l...
[ "For", "more", "info", "on", "continents", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "continents", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "use...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1092-L1095
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Mod.java
Mod.operate
public XObject operate(XObject left, XObject right) throws javax.xml.transform.TransformerException { """ Apply the operation to two operands, and return the result. @param left non-null reference to the evaluated left operand. @param right non-null reference to the evaluated right operand. @ret...
java
public XObject operate(XObject left, XObject right) throws javax.xml.transform.TransformerException { return new XNumber(left.num() % right.num()); }
[ "public", "XObject", "operate", "(", "XObject", "left", ",", "XObject", "right", ")", "throws", "javax", ".", "xml", ".", "transform", ".", "TransformerException", "{", "return", "new", "XNumber", "(", "left", ".", "num", "(", ")", "%", "right", ".", "nu...
Apply the operation to two operands, and return the result. @param left non-null reference to the evaluated left operand. @param right non-null reference to the evaluated right operand. @return non-null reference to the XObject that represents the result of the operation. @throws javax.xml.transform.TransformerExce...
[ "Apply", "the", "operation", "to", "two", "operands", "and", "return", "the", "result", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Mod.java#L45-L49
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java
DFSAdmin.getBlockInfo
private int getBlockInfo(String[] argv, int i) throws IOException { """ Display the filename the block belongs to and its locations. @throws IOException """ long blockId = Long.valueOf(argv[i++]); LocatedBlockWithFileName locatedBlock = getDFS().getClient().getBlockInfo(blockId); if (null ...
java
private int getBlockInfo(String[] argv, int i) throws IOException { long blockId = Long.valueOf(argv[i++]); LocatedBlockWithFileName locatedBlock = getDFS().getClient().getBlockInfo(blockId); if (null == locatedBlock) { System.err.println("Could not find the block with id : " + blockId); retur...
[ "private", "int", "getBlockInfo", "(", "String", "[", "]", "argv", ",", "int", "i", ")", "throws", "IOException", "{", "long", "blockId", "=", "Long", ".", "valueOf", "(", "argv", "[", "i", "++", "]", ")", ";", "LocatedBlockWithFileName", "locatedBlock", ...
Display the filename the block belongs to and its locations. @throws IOException
[ "Display", "the", "filename", "the", "block", "belongs", "to", "and", "its", "locations", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/DFSAdmin.java#L1009-L1036
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
PersistenceBrokerImpl.createProxy
public Object createProxy(Class baseClassForProxy, Identity realSubjectsIdentity) { """ Creates a proxy instance. @param baseClassForProxy The base class that the Proxy should extend. For dynamic Proxies, the method of generation is dependent on the ProxyFactory implementation. @param realSubjectsIdentity Th...
java
public Object createProxy(Class baseClassForProxy, Identity realSubjectsIdentity) { try { // the invocation handler manages all delegation stuff IndirectionHandler handler = getProxyFactory().createIndirectionHandler(pbKey, realSubjectsIdentity); // the proxy...
[ "public", "Object", "createProxy", "(", "Class", "baseClassForProxy", ",", "Identity", "realSubjectsIdentity", ")", "{", "try", "{", "// the invocation handler manages all delegation stuff", "IndirectionHandler", "handler", "=", "getProxyFactory", "(", ")", ".", "createIndi...
Creates a proxy instance. @param baseClassForProxy The base class that the Proxy should extend. For dynamic Proxies, the method of generation is dependent on the ProxyFactory implementation. @param realSubjectsIdentity The identity of the subject @return An instance of the proxy subclass @throws PersistenceBrokerExce...
[ "Creates", "a", "proxy", "instance", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java#L2241-L2265
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.listQueryResultsForSubscriptionAsync
public Observable<PolicyStatesQueryResultsInner> listQueryResultsForSubscriptionAsync(PolicyStatesResource policyStatesResource, String subscriptionId, QueryOptions queryOptions) { """ Queries policy states for the resources under the subscription. @param policyStatesResource The virtual resource under PolicySt...
java
public Observable<PolicyStatesQueryResultsInner> listQueryResultsForSubscriptionAsync(PolicyStatesResource policyStatesResource, String subscriptionId, QueryOptions queryOptions) { return listQueryResultsForSubscriptionWithServiceResponseAsync(policyStatesResource, subscriptionId, queryOptions).map(new Func1<Se...
[ "public", "Observable", "<", "PolicyStatesQueryResultsInner", ">", "listQueryResultsForSubscriptionAsync", "(", "PolicyStatesResource", "policyStatesResource", ",", "String", "subscriptionId", ",", "QueryOptions", "queryOptions", ")", "{", "return", "listQueryResultsForSubscripti...
Queries policy states for the resources under the subscription. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest' @param...
[ "Queries", "policy", "states", "for", "the", "resources", "under", "the", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L628-L635
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProject.java
FrameworkProject.mergeProjectProperties
@Override public void mergeProjectProperties(final Properties properties, final Set<String> removePrefixes) { """ Update the project properties file by setting updating the given properties, and removing any properties that have a prefix in the removePrefixes set @param properties new properties to put in th...
java
@Override public void mergeProjectProperties(final Properties properties, final Set<String> removePrefixes) { projectConfigModifier.mergeProjectProperties(properties, removePrefixes); }
[ "@", "Override", "public", "void", "mergeProjectProperties", "(", "final", "Properties", "properties", ",", "final", "Set", "<", "String", ">", "removePrefixes", ")", "{", "projectConfigModifier", ".", "mergeProjectProperties", "(", "properties", ",", "removePrefixes"...
Update the project properties file by setting updating the given properties, and removing any properties that have a prefix in the removePrefixes set @param properties new properties to put in the file @param removePrefixes prefixes of properties to remove from the file
[ "Update", "the", "project", "properties", "file", "by", "setting", "updating", "the", "given", "properties", "and", "removing", "any", "properties", "that", "have", "a", "prefix", "in", "the", "removePrefixes", "set" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProject.java#L396-L399
JOML-CI/JOML
src/org/joml/Intersectionf.java
Intersectionf.intersectSphereSphere
public static boolean intersectSphereSphere(Spheref sphereA, Spheref sphereB, Vector4f centerAndRadiusOfIntersectionCircle) { """ Test whether the one sphere with intersects the other sphere, and store the center of the circle of intersection in the <code>(x, y, z)</code> components of the supplied vector and the...
java
public static boolean intersectSphereSphere(Spheref sphereA, Spheref sphereB, Vector4f centerAndRadiusOfIntersectionCircle) { return intersectSphereSphere(sphereA.x, sphereA.y, sphereA.z, sphereA.r*sphereA.r, sphereB.x, sphereB.y, sphereB.z, sphereB.r*sphereB.r, centerAndRadiusOfIntersectionCircle); }
[ "public", "static", "boolean", "intersectSphereSphere", "(", "Spheref", "sphereA", ",", "Spheref", "sphereB", ",", "Vector4f", "centerAndRadiusOfIntersectionCircle", ")", "{", "return", "intersectSphereSphere", "(", "sphereA", ".", "x", ",", "sphereA", ".", "y", ","...
Test whether the one sphere with intersects the other sphere, and store the center of the circle of intersection in the <code>(x, y, z)</code> components of the supplied vector and the radius of that circle in the w component. <p> The normal vector of the circle of intersection can simply be obtained by subtracting the...
[ "Test", "whether", "the", "one", "sphere", "with", "intersects", "the", "other", "sphere", "and", "store", "the", "center", "of", "the", "circle", "of", "intersection", "in", "the", "<code", ">", "(", "x", "y", "z", ")", "<", "/", "code", ">", "compone...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectionf.java#L825-L827
samskivert/samskivert
src/main/java/com/samskivert/util/StringUtil.java
StringUtil.stringCode
public static int stringCode (String value, StringBuilder encoded) { """ Encodes (case-insensitively) a short English language string into a semi-unique integer. This is done by selecting the first eight characters in the string that fall into the set of the 16 most frequently used characters in the English lang...
java
public static int stringCode (String value, StringBuilder encoded) { int code = 0; for (int ii = 0, uu = 0; ii < value.length(); ii++) { char c = Character.toLowerCase(value.charAt(ii)); Integer cc = _letterToBits.get(c); if (cc == null) { continue...
[ "public", "static", "int", "stringCode", "(", "String", "value", ",", "StringBuilder", "encoded", ")", "{", "int", "code", "=", "0", ";", "for", "(", "int", "ii", "=", "0", ",", "uu", "=", "0", ";", "ii", "<", "value", ".", "length", "(", ")", ";...
Encodes (case-insensitively) a short English language string into a semi-unique integer. This is done by selecting the first eight characters in the string that fall into the set of the 16 most frequently used characters in the English language and converting them to a 4 bit value and storing the result into the return...
[ "Encodes", "(", "case", "-", "insensitively", ")", "a", "short", "English", "language", "string", "into", "a", "semi", "-", "unique", "integer", ".", "This", "is", "done", "by", "selecting", "the", "first", "eight", "characters", "in", "the", "string", "th...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/StringUtil.java#L1194-L1213
brianwhu/xillium
core/src/main/java/org/xillium/core/util/CompoundChannel.java
CompoundChannel.sendMessage
@Override public void sendMessage(String subject, String message) { """ Sends a message that consists of a subject and a message body. """ first.sendMessage(subject, message); second.sendMessage(subject, message); }
java
@Override public void sendMessage(String subject, String message) { first.sendMessage(subject, message); second.sendMessage(subject, message); }
[ "@", "Override", "public", "void", "sendMessage", "(", "String", "subject", ",", "String", "message", ")", "{", "first", ".", "sendMessage", "(", "subject", ",", "message", ")", ";", "second", ".", "sendMessage", "(", "subject", ",", "message", ")", ";", ...
Sends a message that consists of a subject and a message body.
[ "Sends", "a", "message", "that", "consists", "of", "a", "subject", "and", "a", "message", "body", "." ]
train
https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/core/src/main/java/org/xillium/core/util/CompoundChannel.java#L20-L24
jenetics/jenetics
jenetics.ext/src/main/java/io/jenetics/ext/internal/IntList.java
IntList.addAll
public boolean addAll(final int index, final int[] elements) { """ Inserts all of the elements in the specified array into this list, starting at the specified position. @param index index at which to insert the first element from the specified collection @param elements collection containing elements to be ...
java
public boolean addAll(final int index, final int[] elements) { addRangeCheck(index); final int count = elements.length; ensureSize(_size + count); final int moved = _size - index; if (moved > 0) { arraycopy(_data, index, _data, index + count, moved); } arraycopy(elements, 0, _data, index, count); ...
[ "public", "boolean", "addAll", "(", "final", "int", "index", ",", "final", "int", "[", "]", "elements", ")", "{", "addRangeCheck", "(", "index", ")", ";", "final", "int", "count", "=", "elements", ".", "length", ";", "ensureSize", "(", "_size", "+", "c...
Inserts all of the elements in the specified array into this list, starting at the specified position. @param index index at which to insert the first element from the specified collection @param elements collection containing elements to be added to this list @return <tt>true</tt> if this list changed as a result of ...
[ "Inserts", "all", "of", "the", "elements", "in", "the", "specified", "array", "into", "this", "list", "starting", "at", "the", "specified", "position", "." ]
train
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics.ext/src/main/java/io/jenetics/ext/internal/IntList.java#L174-L188
DDTH/ddth-kafka
src/main/java/com/github/ddth/kafka/KafkaClient.java
KafkaClient.commmitAsync
public boolean commmitAsync(KafkaMessage msg, String groupId) { """ Commit the specified offsets for the last consumed message. @param msg @param groupId @return {@code true} if the topic is in subscription list, {@code false} otherwise @since 1.3.2 """ KafkaMsgConsumer kafkaConsumer = cacheCons...
java
public boolean commmitAsync(KafkaMessage msg, String groupId) { KafkaMsgConsumer kafkaConsumer = cacheConsumers.get(groupId); return kafkaConsumer != null ? kafkaConsumer.commitAsync(msg) : false; }
[ "public", "boolean", "commmitAsync", "(", "KafkaMessage", "msg", ",", "String", "groupId", ")", "{", "KafkaMsgConsumer", "kafkaConsumer", "=", "cacheConsumers", ".", "get", "(", "groupId", ")", ";", "return", "kafkaConsumer", "!=", "null", "?", "kafkaConsumer", ...
Commit the specified offsets for the last consumed message. @param msg @param groupId @return {@code true} if the topic is in subscription list, {@code false} otherwise @since 1.3.2
[ "Commit", "the", "specified", "offsets", "for", "the", "last", "consumed", "message", "." ]
train
https://github.com/DDTH/ddth-kafka/blob/aaeb8536e28a109ac0b69022f0ea4bbf5696b76f/src/main/java/com/github/ddth/kafka/KafkaClient.java#L580-L583
undertow-io/undertow
core/src/main/java/io/undertow/Handlers.java
Handlers.learningPushHandler
public static LearningPushHandler learningPushHandler(int maxEntries, int maxAge, HttpHandler next) { """ Creates a handler that automatically learns which resources to push based on the referer header @param maxEntries The maximum number of entries to store @param maxAge The maximum age of the entries @param...
java
public static LearningPushHandler learningPushHandler(int maxEntries, int maxAge, HttpHandler next) { return new LearningPushHandler(maxEntries, maxAge, next); }
[ "public", "static", "LearningPushHandler", "learningPushHandler", "(", "int", "maxEntries", ",", "int", "maxAge", ",", "HttpHandler", "next", ")", "{", "return", "new", "LearningPushHandler", "(", "maxEntries", ",", "maxAge", ",", "next", ")", ";", "}" ]
Creates a handler that automatically learns which resources to push based on the referer header @param maxEntries The maximum number of entries to store @param maxAge The maximum age of the entries @param next The next handler @return A caching push handler
[ "Creates", "a", "handler", "that", "automatically", "learns", "which", "resources", "to", "push", "based", "on", "the", "referer", "header" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/Handlers.java#L561-L563
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java
ResourceGroovyMethods.relativePath
public static String relativePath(File self, File to) throws IOException { """ Relative path to file. @param self the <code>File</code> to calculate the path from @param to the <code>File</code> to calculate the path to @return the relative path between the files """ String fromPath = self.getCa...
java
public static String relativePath(File self, File to) throws IOException { String fromPath = self.getCanonicalPath(); String toPath = to.getCanonicalPath(); // build the path stack info to compare String[] fromPathStack = getPathStack(fromPath); String[] toPathStack = getPathSta...
[ "public", "static", "String", "relativePath", "(", "File", "self", ",", "File", "to", ")", "throws", "IOException", "{", "String", "fromPath", "=", "self", ".", "getCanonicalPath", "(", ")", ";", "String", "toPath", "=", "to", ".", "getCanonicalPath", "(", ...
Relative path to file. @param self the <code>File</code> to calculate the path from @param to the <code>File</code> to calculate the path to @return the relative path between the files
[ "Relative", "path", "to", "file", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java#L1650-L1689
icode/ameba
src/main/java/ameba/mvc/template/internal/TemplateHelper.java
TemplateHelper.getAbsolutePath
public static String getAbsolutePath(Class<?> resourceClass, String path, char delim) { """ Return an absolute path to the given class where segments are separated using {@code delim} character and {@code path} is appended to this path. @param resourceClass class for which an absolute path should be obtained. ...
java
public static String getAbsolutePath(Class<?> resourceClass, String path, char delim) { return '/' + resourceClass.getName().replace('.', '/').replace('$', delim) + delim + path; }
[ "public", "static", "String", "getAbsolutePath", "(", "Class", "<", "?", ">", "resourceClass", ",", "String", "path", ",", "char", "delim", ")", "{", "return", "'", "'", "+", "resourceClass", ".", "getName", "(", ")", ".", "replace", "(", "'", "'", ","...
Return an absolute path to the given class where segments are separated using {@code delim} character and {@code path} is appended to this path. @param resourceClass class for which an absolute path should be obtained. @param path segment to be appended to the resulting path. @param delim character us...
[ "Return", "an", "absolute", "path", "to", "the", "given", "class", "where", "segments", "are", "separated", "using", "{", "@code", "delim", "}", "character", "and", "{", "@code", "path", "}", "is", "appended", "to", "this", "path", "." ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/mvc/template/internal/TemplateHelper.java#L58-L60
signalapp/libsignal-service-java
java/src/main/java/org/whispersystems/signalservice/api/SignalServiceAccountManager.java
SignalServiceAccountManager.requestSmsVerificationCode
public void requestSmsVerificationCode(boolean androidSmsRetrieverSupported, Optional<String> captchaToken) throws IOException { """ Request an SMS verification code. On success, the server will send an SMS verification code to this Signal user. @throws IOException """ this.pushServiceSocket.requestSm...
java
public void requestSmsVerificationCode(boolean androidSmsRetrieverSupported, Optional<String> captchaToken) throws IOException { this.pushServiceSocket.requestSmsVerificationCode(androidSmsRetrieverSupported, captchaToken); }
[ "public", "void", "requestSmsVerificationCode", "(", "boolean", "androidSmsRetrieverSupported", ",", "Optional", "<", "String", ">", "captchaToken", ")", "throws", "IOException", "{", "this", ".", "pushServiceSocket", ".", "requestSmsVerificationCode", "(", "androidSmsRet...
Request an SMS verification code. On success, the server will send an SMS verification code to this Signal user. @throws IOException
[ "Request", "an", "SMS", "verification", "code", ".", "On", "success", "the", "server", "will", "send", "an", "SMS", "verification", "code", "to", "this", "Signal", "user", "." ]
train
https://github.com/signalapp/libsignal-service-java/blob/64f1150c5e4062d67d31c9a2a9c3a0237d022902/java/src/main/java/org/whispersystems/signalservice/api/SignalServiceAccountManager.java#L137-L139
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbConnection.java
MariaDbConnection.setCatalog
public void setCatalog(final String catalog) throws SQLException { """ <p>Sets the given catalog name in order to select a subspace of this <code>Connection</code> object's database in which to work.</p> <p>If the driver does not support catalogs, it will silently ignore this request.</p> MariaDB treats catalog...
java
public void setCatalog(final String catalog) throws SQLException { if (catalog == null) { throw new SQLException("The catalog name may not be null", "XAE05"); } try { stateFlag |= ConnectionState.STATE_DATABASE; protocol.setCatalog(catalog); } catch (SQLException e) { throw Excep...
[ "public", "void", "setCatalog", "(", "final", "String", "catalog", ")", "throws", "SQLException", "{", "if", "(", "catalog", "==", "null", ")", "{", "throw", "new", "SQLException", "(", "\"The catalog name may not be null\"", ",", "\"XAE05\"", ")", ";", "}", "...
<p>Sets the given catalog name in order to select a subspace of this <code>Connection</code> object's database in which to work.</p> <p>If the driver does not support catalogs, it will silently ignore this request.</p> MariaDB treats catalogs and databases as equivalent @param catalog the name of a catalog (subspace i...
[ "<p", ">", "Sets", "the", "given", "catalog", "name", "in", "order", "to", "select", "a", "subspace", "of", "this", "<code", ">", "Connection<", "/", "code", ">", "object", "s", "database", "in", "which", "to", "work", ".", "<", "/", "p", ">", "<p", ...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbConnection.java#L888-L898
basho/riak-java-client
src/main/java/com/basho/riak/client/core/query/UserMetadata/RiakUserMetadata.java
RiakUserMetadata.containsKey
public boolean containsKey(String key, Charset charset) { """ Determine if a specific usermeta entry is present. <p> This method uses the supplied {@code Charset} to convert the supplied key. </p> @param key the metadata key @return {@code true} if the entry is present, {@code false} otherwise. """ ...
java
public boolean containsKey(String key, Charset charset) { return meta.containsKey(BinaryValue.unsafeCreate(key.getBytes(charset))); }
[ "public", "boolean", "containsKey", "(", "String", "key", ",", "Charset", "charset", ")", "{", "return", "meta", ".", "containsKey", "(", "BinaryValue", ".", "unsafeCreate", "(", "key", ".", "getBytes", "(", "charset", ")", ")", ")", ";", "}" ]
Determine if a specific usermeta entry is present. <p> This method uses the supplied {@code Charset} to convert the supplied key. </p> @param key the metadata key @return {@code true} if the entry is present, {@code false} otherwise.
[ "Determine", "if", "a", "specific", "usermeta", "entry", "is", "present", ".", "<p", ">", "This", "method", "uses", "the", "supplied", "{", "@code", "Charset", "}", "to", "convert", "the", "supplied", "key", ".", "<", "/", "p", ">" ]
train
https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/core/query/UserMetadata/RiakUserMetadata.java#L81-L84
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/SecretKeyFactory.java
SecretKeyFactory.generateSecret
public final SecretKey generateSecret(KeySpec keySpec) throws InvalidKeySpecException { """ Generates a <code>SecretKey</code> object from the provided key specification (key material). @param keySpec the specification (key material) of the secret key @return the secret key @exception Invalid...
java
public final SecretKey generateSecret(KeySpec keySpec) throws InvalidKeySpecException { if (serviceIterator == null) { return spi.engineGenerateSecret(keySpec); } Exception failure = null; SecretKeyFactorySpi mySpi = spi; do { try { ...
[ "public", "final", "SecretKey", "generateSecret", "(", "KeySpec", "keySpec", ")", "throws", "InvalidKeySpecException", "{", "if", "(", "serviceIterator", "==", "null", ")", "{", "return", "spi", ".", "engineGenerateSecret", "(", "keySpec", ")", ";", "}", "Except...
Generates a <code>SecretKey</code> object from the provided key specification (key material). @param keySpec the specification (key material) of the secret key @return the secret key @exception InvalidKeySpecException if the given key specification is inappropriate for this secret-key factory to produce a secret key...
[ "Generates", "a", "<code", ">", "SecretKey<", "/", "code", ">", "object", "from", "the", "provided", "key", "specification", "(", "key", "material", ")", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/SecretKeyFactory.java#L511-L533
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/FileUtil.java
FileUtil.addFileToZip
public static void addFileToZip(String path, String srcFile, ZipOutputStream zip, boolean flag) throws IOException { """ Appends file to the archive. @param path path to the file @param srcFile file name @param zip archive @param flag @throws IOException """ File folder = new File(srcFile); ...
java
public static void addFileToZip(String path, String srcFile, ZipOutputStream zip, boolean flag) throws IOException { File folder = new File(srcFile); if (flag) { zip.putNextEntry(new ZipEntry(path + "/" + folder.getName() + "/")); } else { if (folder.isDirectory()) { ...
[ "public", "static", "void", "addFileToZip", "(", "String", "path", ",", "String", "srcFile", ",", "ZipOutputStream", "zip", ",", "boolean", "flag", ")", "throws", "IOException", "{", "File", "folder", "=", "new", "File", "(", "srcFile", ")", ";", "if", "("...
Appends file to the archive. @param path path to the file @param srcFile file name @param zip archive @param flag @throws IOException
[ "Appends", "file", "to", "the", "archive", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/FileUtil.java#L290-L308
querydsl/querydsl
querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpressions.java
GeometryExpressions.asGeometry
public static <T extends Geometry> GeometryExpression<T> asGeometry(Expression<T> expr) { """ Create a new GeometryExpression @param expr Expression of type Geometry @return new GeometryExpression """ Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanc...
java
public static <T extends Geometry> GeometryExpression<T> asGeometry(Expression<T> expr) { Expression<T> underlyingMixin = ExpressionUtils.extract(expr); if (underlyingMixin instanceof PathImpl) { return new GeometryPath<T>((PathImpl<T>) underlyingMixin); } else if (underlyingMixin in...
[ "public", "static", "<", "T", "extends", "Geometry", ">", "GeometryExpression", "<", "T", ">", "asGeometry", "(", "Expression", "<", "T", ">", "expr", ")", "{", "Expression", "<", "T", ">", "underlyingMixin", "=", "ExpressionUtils", ".", "extract", "(", "e...
Create a new GeometryExpression @param expr Expression of type Geometry @return new GeometryExpression
[ "Create", "a", "new", "GeometryExpression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-spatial/src/main/java/com/querydsl/spatial/GeometryExpressions.java#L260-L278
igniterealtime/Smack
smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java
OpenPgpPubSubUtil.changeAccessModelIfNecessary
public static void changeAccessModelIfNecessary(LeafNode node, AccessModel accessModel) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { """ Query the access model of {@code node}. If it is different fr...
java
public static void changeAccessModelIfNecessary(LeafNode node, AccessModel accessModel) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { ConfigureForm current = node.getNodeConfiguration(); i...
[ "public", "static", "void", "changeAccessModelIfNecessary", "(", "LeafNode", "node", ",", "AccessModel", "accessModel", ")", "throws", "XMPPException", ".", "XMPPErrorException", ",", "SmackException", ".", "NotConnectedException", ",", "InterruptedException", ",", "Smack...
Query the access model of {@code node}. If it is different from {@code accessModel}, change the access model of the node to {@code accessModel}. @see <a href="https://xmpp.org/extensions/xep-0060.html#accessmodels">XEP-0060 §4.5 - Node Access Models</a> @param node {@link LeafNode} whose PubSub access model we want t...
[ "Query", "the", "access", "model", "of", "{", "@code", "node", "}", ".", "If", "it", "is", "different", "from", "{", "@code", "accessModel", "}", "change", "the", "access", "model", "of", "the", "node", "to", "{", "@code", "accessModel", "}", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/util/OpenPgpPubSubUtil.java#L98-L107
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/op/OpNegateNumber.java
OpNegateNumber.toExprDouble
public static ExprDouble toExprDouble(Expression expr, Position start, Position end) { """ Create a String expression from a Expression @param left @param right @return String expression @throws TemplateException """ if (expr instanceof Literal) { Double d = ((Literal) expr).getDouble(null); ...
java
public static ExprDouble toExprDouble(Expression expr, Position start, Position end) { if (expr instanceof Literal) { Double d = ((Literal) expr).getDouble(null); if (d != null) { return expr.getFactory().createLitDouble(-d.doubleValue(), start, end); } } return new OpNegateNumber(expr, start, end);...
[ "public", "static", "ExprDouble", "toExprDouble", "(", "Expression", "expr", ",", "Position", "start", ",", "Position", "end", ")", "{", "if", "(", "expr", "instanceof", "Literal", ")", "{", "Double", "d", "=", "(", "(", "Literal", ")", "expr", ")", ".",...
Create a String expression from a Expression @param left @param right @return String expression @throws TemplateException
[ "Create", "a", "String", "expression", "from", "a", "Expression" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/op/OpNegateNumber.java#L58-L66
Pixplicity/EasyPrefs
library/src/main/java/com/pixplicity/easyprefs/library/Prefs.java
Prefs.putDouble
public static void putDouble(final String key, final double value) { """ Stores a double value as a long raw bits value. @param key The name of the preference to modify. @param value The double value to be save in the preferences. @see android.content.SharedPreferences.Editor#putLong(String, long) """ ...
java
public static void putDouble(final String key, final double value) { final Editor editor = getPreferences().edit(); editor.putLong(key, Double.doubleToRawLongBits(value)); editor.apply(); }
[ "public", "static", "void", "putDouble", "(", "final", "String", "key", ",", "final", "double", "value", ")", "{", "final", "Editor", "editor", "=", "getPreferences", "(", ")", ".", "edit", "(", ")", ";", "editor", ".", "putLong", "(", "key", ",", "Dou...
Stores a double value as a long raw bits value. @param key The name of the preference to modify. @param value The double value to be save in the preferences. @see android.content.SharedPreferences.Editor#putLong(String, long)
[ "Stores", "a", "double", "value", "as", "a", "long", "raw", "bits", "value", "." ]
train
https://github.com/Pixplicity/EasyPrefs/blob/0ca13a403bf099019a13d68b38edcf55fca5a653/library/src/main/java/com/pixplicity/easyprefs/library/Prefs.java#L303-L307
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java
Frame.getNumArgumentsIncludingObjectInstance
public int getNumArgumentsIncludingObjectInstance(InvokeInstruction ins, ConstantPoolGen cpg) throws DataflowAnalysisException { """ Get the number of arguments passed to given method invocation, including the object instance if the call is to an instance method. @param ins the method invocation i...
java
public int getNumArgumentsIncludingObjectInstance(InvokeInstruction ins, ConstantPoolGen cpg) throws DataflowAnalysisException { int numConsumed = ins.consumeStack(cpg); if (numConsumed == Const.UNPREDICTABLE) { throw new DataflowAnalysisException("Unpredictable stack consumption...
[ "public", "int", "getNumArgumentsIncludingObjectInstance", "(", "InvokeInstruction", "ins", ",", "ConstantPoolGen", "cpg", ")", "throws", "DataflowAnalysisException", "{", "int", "numConsumed", "=", "ins", ".", "consumeStack", "(", "cpg", ")", ";", "if", "(", "numCo...
Get the number of arguments passed to given method invocation, including the object instance if the call is to an instance method. @param ins the method invocation instruction @param cpg the ConstantPoolGen for the class containing the method @return number of arguments, including object instance if appropriate @throw...
[ "Get", "the", "number", "of", "arguments", "passed", "to", "given", "method", "invocation", "including", "the", "object", "instance", "if", "the", "call", "is", "to", "an", "instance", "method", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L364-L371
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GitLabApiForm.java
GitLabApiForm.withParam
public GitLabApiForm withParam(String name, AccessLevel level, boolean required) throws IllegalArgumentException { """ Fluent method for adding AccessLevel query and form parameters to a get() or post() call. @param name the name of the field/attribute to add @param level the value of the field/attribute to ad...
java
public GitLabApiForm withParam(String name, AccessLevel level, boolean required) throws IllegalArgumentException { return (withParam(name, (level == null ? null : level.toValue()), required)); }
[ "public", "GitLabApiForm", "withParam", "(", "String", "name", ",", "AccessLevel", "level", ",", "boolean", "required", ")", "throws", "IllegalArgumentException", "{", "return", "(", "withParam", "(", "name", ",", "(", "level", "==", "null", "?", "null", ":", ...
Fluent method for adding AccessLevel query and form parameters to a get() or post() call. @param name the name of the field/attribute to add @param level the value of the field/attribute to add @param required the field is required flag @return this GitLabAPiForm instance @throws IllegalArgumentException if a required...
[ "Fluent", "method", "for", "adding", "AccessLevel", "query", "and", "form", "parameters", "to", "a", "get", "()", "or", "post", "()", "call", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiForm.java#L94-L96
arxanchain/java-common
src/main/java/com/arxanfintech/common/crypto/core/ECKey.java
ECKey.decryptAES
public byte[] decryptAES(byte[] cipher) { """ Decrypt cipher by AES in SIC(also know as CTR) mode @param cipher -proper cipher @return decrypted cipher, equal length to the cipher. @deprecated should not use EC private scalar value as an AES key """ if (privKey == null) { throw new M...
java
public byte[] decryptAES(byte[] cipher) { if (privKey == null) { throw new MissingPrivateKeyException(); } if (!(privKey instanceof BCECPrivateKey)) { throw new UnsupportedOperationException("Cannot use the private key as an AES key"); } AESFastEngine en...
[ "public", "byte", "[", "]", "decryptAES", "(", "byte", "[", "]", "cipher", ")", "{", "if", "(", "privKey", "==", "null", ")", "{", "throw", "new", "MissingPrivateKeyException", "(", ")", ";", "}", "if", "(", "!", "(", "privKey", "instanceof", "BCECPriv...
Decrypt cipher by AES in SIC(also know as CTR) mode @param cipher -proper cipher @return decrypted cipher, equal length to the cipher. @deprecated should not use EC private scalar value as an AES key
[ "Decrypt", "cipher", "by", "AES", "in", "SIC", "(", "also", "know", "as", "CTR", ")", "mode" ]
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/core/ECKey.java#L951-L986
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java
GImageDerivativeOps.derivativeForScaleSpace
public static <I extends ImageGray<I>, D extends ImageGray<D>> AnyImageDerivative<I,D> derivativeForScaleSpace( Class<I> inputType , Class<D> derivType ) { """ Creates an instance of {@link AnyImageDerivative} which is intended for use of calculating scale-spaces. It uses {@link DerivativeType#THREE} since it do...
java
public static <I extends ImageGray<I>, D extends ImageGray<D>> AnyImageDerivative<I,D> derivativeForScaleSpace( Class<I> inputType , Class<D> derivType ) { return createAnyDerivatives(DerivativeType.THREE,inputType,derivType); }
[ "public", "static", "<", "I", "extends", "ImageGray", "<", "I", ">", ",", "D", "extends", "ImageGray", "<", "D", ">", ">", "AnyImageDerivative", "<", "I", ",", "D", ">", "derivativeForScaleSpace", "(", "Class", "<", "I", ">", "inputType", ",", "Class", ...
Creates an instance of {@link AnyImageDerivative} which is intended for use of calculating scale-spaces. It uses {@link DerivativeType#THREE} since it does not blur the image. More typical operators, such as Sobel and Prewitt, blur the image. @param inputType Type of input image. @param derivType Type of derivative i...
[ "Creates", "an", "instance", "of", "{", "@link", "AnyImageDerivative", "}", "which", "is", "intended", "for", "use", "of", "calculating", "scale", "-", "spaces", ".", "It", "uses", "{", "@link", "DerivativeType#THREE", "}", "since", "it", "does", "not", "blu...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/derivative/GImageDerivativeOps.java#L326-L329
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/WidgetUtil.java
WidgetUtil.getWidget
public static Widget getWidget(long guildId) throws RateLimitedException { """ Makes a GET request to get the information for a Guild's widget. This widget (if available) contains information about the guild, including the Guild's name, an invite code (if set), a list of voice channels, and a list of online mem...
java
public static Widget getWidget(long guildId) throws RateLimitedException { Checks.notNull(guildId, "GuildId"); HttpURLConnection connection; OkHttpClient client = new OkHttpClient.Builder().build(); Request request = new Request.Builder() .url(String.format(WIDGE...
[ "public", "static", "Widget", "getWidget", "(", "long", "guildId", ")", "throws", "RateLimitedException", "{", "Checks", ".", "notNull", "(", "guildId", ",", "\"GuildId\"", ")", ";", "HttpURLConnection", "connection", ";", "OkHttpClient", "client", "=", "new", "...
Makes a GET request to get the information for a Guild's widget. This widget (if available) contains information about the guild, including the Guild's name, an invite code (if set), a list of voice channels, and a list of online members (plus the voice states of any members in voice channels). <p>This Widget can be o...
[ "Makes", "a", "GET", "request", "to", "get", "the", "information", "for", "a", "Guild", "s", "widget", ".", "This", "widget", "(", "if", "available", ")", "contains", "information", "about", "the", "guild", "including", "the", "Guild", "s", "name", "an", ...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/WidgetUtil.java#L191-L248
SonarSource/sonarqube
sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java
Settings.setProperty
public Settings setProperty(String key, @Nullable String value) { """ Change a property value in a restricted scope only, depending on execution context. New value is <b>never</b> persisted. New value is ephemeral and kept in memory only: <ul> <li>during current analysis in the case of scanner stack</li> <li>d...
java
public Settings setProperty(String key, @Nullable String value) { String validKey = definitions.validKey(key); if (value == null) { removeProperty(validKey); } else { set(validKey, trim(value)); } return this; }
[ "public", "Settings", "setProperty", "(", "String", "key", ",", "@", "Nullable", "String", "value", ")", "{", "String", "validKey", "=", "definitions", ".", "validKey", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "removeProperty", "...
Change a property value in a restricted scope only, depending on execution context. New value is <b>never</b> persisted. New value is ephemeral and kept in memory only: <ul> <li>during current analysis in the case of scanner stack</li> <li>during processing of current HTTP request in the case of web server stack</li> <...
[ "Change", "a", "property", "value", "in", "a", "restricted", "scope", "only", "depending", "on", "execution", "context", ".", "New", "value", "is", "<b", ">", "never<", "/", "b", ">", "persisted", ".", "New", "value", "is", "ephemeral", "and", "kept", "i...
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java#L368-L376
wcm-io/wcm-io-handler
url/src/main/java/io/wcm/handler/url/suffix/SuffixParser.java
SuffixParser.getResources
public @NotNull List<Resource> getResources(@NotNull Predicate<Resource> filter) { """ Get the resources selected in the suffix of the URL @param filter optional filter to select only specific resources @return a list containing the Resources """ return getResources(filter, (Resource)null); }
java
public @NotNull List<Resource> getResources(@NotNull Predicate<Resource> filter) { return getResources(filter, (Resource)null); }
[ "public", "@", "NotNull", "List", "<", "Resource", ">", "getResources", "(", "@", "NotNull", "Predicate", "<", "Resource", ">", "filter", ")", "{", "return", "getResources", "(", "filter", ",", "(", "Resource", ")", "null", ")", ";", "}" ]
Get the resources selected in the suffix of the URL @param filter optional filter to select only specific resources @return a list containing the Resources
[ "Get", "the", "resources", "selected", "in", "the", "suffix", "of", "the", "URL" ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/url/src/main/java/io/wcm/handler/url/suffix/SuffixParser.java#L250-L252
ksoichiro/Android-ObservableScrollView
library/src/main/java/com/github/ksoichiro/android/observablescrollview/ScrollUtils.java
ScrollUtils.addOnGlobalLayoutListener
public static void addOnGlobalLayoutListener(final View view, final Runnable runnable) { """ Add an OnGlobalLayoutListener for the view. <p>This is just a convenience method for using {@code ViewTreeObserver.OnGlobalLayoutListener()}. This also handles removing listener when onGlobalLayout is called.</p> @par...
java
public static void addOnGlobalLayoutListener(final View view, final Runnable runnable) { ViewTreeObserver vto = view.getViewTreeObserver(); vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @SuppressWarnings("deprecation") @Override public ...
[ "public", "static", "void", "addOnGlobalLayoutListener", "(", "final", "View", "view", ",", "final", "Runnable", "runnable", ")", "{", "ViewTreeObserver", "vto", "=", "view", ".", "getViewTreeObserver", "(", ")", ";", "vto", ".", "addOnGlobalLayoutListener", "(", ...
Add an OnGlobalLayoutListener for the view. <p>This is just a convenience method for using {@code ViewTreeObserver.OnGlobalLayoutListener()}. This also handles removing listener when onGlobalLayout is called.</p> @param view The target view to add global layout listener. @param runnable Runnable to be executed aft...
[ "Add", "an", "OnGlobalLayoutListener", "for", "the", "view", ".", "<p", ">", "This", "is", "just", "a", "convenience", "method", "for", "using", "{", "@code", "ViewTreeObserver", ".", "OnGlobalLayoutListener", "()", "}", ".", "This", "also", "handles", "removi...
train
https://github.com/ksoichiro/Android-ObservableScrollView/blob/47a5fb2db5e93d923a8c6772cde48bbb7d932345/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ScrollUtils.java#L67-L81
kejunxia/AndroidMvc
library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/MvcFragment.java
MvcFragment.onOrientationChanged
protected void onOrientationChanged(int lastOrientation, int currentOrientation) { """ Called after {@link #onViewReady(View, Bundle, Reason)} when orientation changed. @param lastOrientation Orientation before rotation @param currentOrientation Current orientation """ if (controller != null) { ...
java
protected void onOrientationChanged(int lastOrientation, int currentOrientation) { if (controller != null) { controller.onOrientationChanged( parseOrientation(lastOrientation), parseOrientation(currentOrientation)); } }
[ "protected", "void", "onOrientationChanged", "(", "int", "lastOrientation", ",", "int", "currentOrientation", ")", "{", "if", "(", "controller", "!=", "null", ")", "{", "controller", ".", "onOrientationChanged", "(", "parseOrientation", "(", "lastOrientation", ")", ...
Called after {@link #onViewReady(View, Bundle, Reason)} when orientation changed. @param lastOrientation Orientation before rotation @param currentOrientation Current orientation
[ "Called", "after", "{", "@link", "#onViewReady", "(", "View", "Bundle", "Reason", ")", "}", "when", "orientation", "changed", "." ]
train
https://github.com/kejunxia/AndroidMvc/blob/c7893f0a13119d64297b9eb2988f7323b7da5bbc/library/android-mvc/src/main/java/com/shipdream/lib/android/mvc/MvcFragment.java#L407-L413
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.copyFile
public static File copyFile(String src, String dest, StandardCopyOption... options) throws IORuntimeException { """ 通过JDK7+的 {@link Files#copy(Path, Path, CopyOption...)} 方法拷贝文件 @param src 源文件路径 @param dest 目标文件或目录路径,如果为目录使用与源文件相同的文件名 @param options {@link StandardCopyOption} @return File @throws IORuntimeE...
java
public static File copyFile(String src, String dest, StandardCopyOption... options) throws IORuntimeException { Assert.notBlank(src, "Source File path is blank !"); Assert.notNull(src, "Destination File path is null !"); return copyFile(Paths.get(src), Paths.get(dest), options).toFile(); }
[ "public", "static", "File", "copyFile", "(", "String", "src", ",", "String", "dest", ",", "StandardCopyOption", "...", "options", ")", "throws", "IORuntimeException", "{", "Assert", ".", "notBlank", "(", "src", ",", "\"Source File path is blank !\"", ")", ";", "...
通过JDK7+的 {@link Files#copy(Path, Path, CopyOption...)} 方法拷贝文件 @param src 源文件路径 @param dest 目标文件或目录路径,如果为目录使用与源文件相同的文件名 @param options {@link StandardCopyOption} @return File @throws IORuntimeException IO异常
[ "通过JDK7", "+", "的", "{", "@link", "Files#copy", "(", "Path", "Path", "CopyOption", "...", ")", "}", "方法拷贝文件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L924-L928
eurekaclinical/javautil
src/main/java/org/arp/javautil/sql/DatabaseMetaDataWrapper.java
DatabaseMetaDataWrapper.isDriverCompatible
public boolean isDriverCompatible(String driverName, DriverVersion minVersion, DriverVersion maxVersion) throws SQLException { """ Compares JDBC driver name and version information to that reported by the driver. @param driverName the expected driver name. @param minVersion the expected minimum version, if an...
java
public boolean isDriverCompatible(String driverName, DriverVersion minVersion, DriverVersion maxVersion) throws SQLException { readMetaDataIfNeeded(); if (!this.driverName.equals(driverName)) { return false; } return new VersionRange(minVersion, maxVersion).isWithinR...
[ "public", "boolean", "isDriverCompatible", "(", "String", "driverName", ",", "DriverVersion", "minVersion", ",", "DriverVersion", "maxVersion", ")", "throws", "SQLException", "{", "readMetaDataIfNeeded", "(", ")", ";", "if", "(", "!", "this", ".", "driverName", "....
Compares JDBC driver name and version information to that reported by the driver. @param driverName the expected driver name. @param minVersion the expected minimum version, if any. @param maxVersion the expected maximum version, if any. @return whether the actual JDBC driver name and version match the provided argume...
[ "Compares", "JDBC", "driver", "name", "and", "version", "information", "to", "that", "reported", "by", "the", "driver", "." ]
train
https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/sql/DatabaseMetaDataWrapper.java#L95-L102
phax/ph-commons
ph-security/src/main/java/com/helger/security/authentication/result/AuthIdentificationResult.java
AuthIdentificationResult.createFailure
@Nonnull public static AuthIdentificationResult createFailure (@Nonnull final ICredentialValidationResult aCredentialValidationFailure) { """ Factory method for error in authentication. @param aCredentialValidationFailure The validation failure. May not be <code>null</code> in case of failure! @return Neve...
java
@Nonnull public static AuthIdentificationResult createFailure (@Nonnull final ICredentialValidationResult aCredentialValidationFailure) { ValueEnforcer.notNull (aCredentialValidationFailure, "CredentialValidationFailure"); return new AuthIdentificationResult (null, aCredentialValidationFailure); }
[ "@", "Nonnull", "public", "static", "AuthIdentificationResult", "createFailure", "(", "@", "Nonnull", "final", "ICredentialValidationResult", "aCredentialValidationFailure", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aCredentialValidationFailure", ",", "\"CredentialVali...
Factory method for error in authentication. @param aCredentialValidationFailure The validation failure. May not be <code>null</code> in case of failure! @return Never <code>null</code>.
[ "Factory", "method", "for", "error", "in", "authentication", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/authentication/result/AuthIdentificationResult.java#L121-L126
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java
ComputeNodeOperations.updateComputeNodeUser
public void updateComputeNodeUser(String poolId, String nodeId, String userName, String sshPublicKey) throws BatchErrorException, IOException { """ Updates the specified user account on the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the comp...
java
public void updateComputeNodeUser(String poolId, String nodeId, String userName, String sshPublicKey) throws BatchErrorException, IOException { updateComputeNodeUser(poolId, nodeId, userName, sshPublicKey, (Iterable<BatchClientBehavior>) null); }
[ "public", "void", "updateComputeNodeUser", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "userName", ",", "String", "sshPublicKey", ")", "throws", "BatchErrorException", ",", "IOException", "{", "updateComputeNodeUser", "(", "poolId", ",", "nodeId...
Updates the specified user account on the specified compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node where the user account will be updated. @param userName The name of the user account to update. @param sshPublicKey The SSH public key that can be ...
[ "Updates", "the", "specified", "user", "account", "on", "the", "specified", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/ComputeNodeOperations.java#L180-L182
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.countByC_LtD_S
@Override public int countByC_LtD_S(long CPDefinitionId, Date displayDate, int status) { """ Returns the number of cp instances where CPDefinitionId = &#63; and displayDate &lt; &#63; and status = &#63;. @param CPDefinitionId the cp definition ID @param displayDate the display date @param status the status ...
java
@Override public int countByC_LtD_S(long CPDefinitionId, Date displayDate, int status) { FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_LTD_S; Object[] finderArgs = new Object[] { CPDefinitionId, _getTime(displayDate), status }; Long count = (Long)finderCache.getResult(finderPath, finder...
[ "@", "Override", "public", "int", "countByC_LtD_S", "(", "long", "CPDefinitionId", ",", "Date", "displayDate", ",", "int", "status", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_WITH_PAGINATION_COUNT_BY_C_LTD_S", ";", "Object", "[", "]", "finderArgs", "="...
Returns the number of cp instances where CPDefinitionId = &#63; and displayDate &lt; &#63; and status = &#63;. @param CPDefinitionId the cp definition ID @param displayDate the display date @param status the status @return the number of matching cp instances
[ "Returns", "the", "number", "of", "cp", "instances", "where", "CPDefinitionId", "=", "&#63", ";", "and", "displayDate", "&lt", ";", "&#63", ";", "and", "status", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L6737-L6801
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Waiter.java
Waiter.isActivityMatching
private boolean isActivityMatching(Activity currentActivity, String name) { """ Compares Activity names. @param currentActivity the Activity that is currently active @param name the name to compare @return true if the Activity names match """ if(currentActivity != null && currentActivity.getClass().ge...
java
private boolean isActivityMatching(Activity currentActivity, String name){ if(currentActivity != null && currentActivity.getClass().getSimpleName().equals(name)) { return true; } return false; }
[ "private", "boolean", "isActivityMatching", "(", "Activity", "currentActivity", ",", "String", "name", ")", "{", "if", "(", "currentActivity", "!=", "null", "&&", "currentActivity", ".", "getClass", "(", ")", ".", "getSimpleName", "(", ")", ".", "equals", "(",...
Compares Activity names. @param currentActivity the Activity that is currently active @param name the name to compare @return true if the Activity names match
[ "Compares", "Activity", "names", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L111-L116
samskivert/samskivert
src/main/java/com/samskivert/util/IntSets.java
IntSets.differenceView
public static IntSet differenceView (IntSet set1, IntSet set2) { """ Returns an <b>immutable</b> view containing the ints contained in set1 but not in set2. Set2 may also contain elements not present in set1, these are ignored. """ return andView(set1, notView(set2)); }
java
public static IntSet differenceView (IntSet set1, IntSet set2) { return andView(set1, notView(set2)); }
[ "public", "static", "IntSet", "differenceView", "(", "IntSet", "set1", ",", "IntSet", "set2", ")", "{", "return", "andView", "(", "set1", ",", "notView", "(", "set2", ")", ")", ";", "}" ]
Returns an <b>immutable</b> view containing the ints contained in set1 but not in set2. Set2 may also contain elements not present in set1, these are ignored.
[ "Returns", "an", "<b", ">", "immutable<", "/", "b", ">", "view", "containing", "the", "ints", "contained", "in", "set1", "but", "not", "in", "set2", ".", "Set2", "may", "also", "contain", "elements", "not", "present", "in", "set1", "these", "are", "ignor...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/IntSets.java#L140-L143
jbundle/jbundle
main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/GetWSDL11.java
GetWSDL11.getElementNameFromMessageName
public String getElementNameFromMessageName(TDefinitions descriptionType, TParam message) { """ Search through the messages for this one and return the element name. """ QName qName = message.getMessage(); String name = qName.getLocalPart(); for (TDocumented nextElement : descriptionTyp...
java
public String getElementNameFromMessageName(TDefinitions descriptionType, TParam message) { QName qName = message.getMessage(); String name = qName.getLocalPart(); for (TDocumented nextElement : descriptionType.getAnyTopLevelOptionalElement()) { // Create the service type...
[ "public", "String", "getElementNameFromMessageName", "(", "TDefinitions", "descriptionType", ",", "TParam", "message", ")", "{", "QName", "qName", "=", "message", ".", "getMessage", "(", ")", ";", "String", "name", "=", "qName", ".", "getLocalPart", "(", ")", ...
Search through the messages for this one and return the element name.
[ "Search", "through", "the", "messages", "for", "this", "one", "and", "return", "the", "element", "name", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/GetWSDL11.java#L167-L187
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/tiles/user/TileDao.java
TileDao.queryForTilesInColumn
public TileResultSet queryForTilesInColumn(long column, long zoomLevel) { """ Query for Tiles at a zoom level and column @param column column @param zoomLevel zoom level @return tile result set """ Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(TileTable.COLUMN_TIL...
java
public TileResultSet queryForTilesInColumn(long column, long zoomLevel) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(TileTable.COLUMN_TILE_COLUMN, column); fieldValues.put(TileTable.COLUMN_ZOOM_LEVEL, zoomLevel); return queryForFieldValues(fieldValues); }
[ "public", "TileResultSet", "queryForTilesInColumn", "(", "long", "column", ",", "long", "zoomLevel", ")", "{", "Map", "<", "String", ",", "Object", ">", "fieldValues", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", "fieldValues", ...
Query for Tiles at a zoom level and column @param column column @param zoomLevel zoom level @return tile result set
[ "Query", "for", "Tiles", "at", "a", "zoom", "level", "and", "column" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/tiles/user/TileDao.java#L324-L331
mapsforge/mapsforge
mapsforge-map-reader/src/main/java/org/mapsforge/map/reader/Deserializer.java
Deserializer.getLong
static long getLong(byte[] buffer, int offset) { """ Converts eight bytes of a byte array to a signed long. <p/> The byte order is big-endian. @param buffer the byte array. @param offset the offset in the array. @return the long value. """ return (buffer[offset] & 0xffL) << 56 | (buffer[offset +...
java
static long getLong(byte[] buffer, int offset) { return (buffer[offset] & 0xffL) << 56 | (buffer[offset + 1] & 0xffL) << 48 | (buffer[offset + 2] & 0xffL) << 40 | (buffer[offset + 3] & 0xffL) << 32 | (buffer[offset + 4] & 0xffL) << 24 | (buffer[offset + 5] & 0xffL) << 16 | (buffe...
[ "static", "long", "getLong", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ")", "{", "return", "(", "buffer", "[", "offset", "]", "&", "0xff", "L", ")", "<<", "56", "|", "(", "buffer", "[", "offset", "+", "1", "]", "&", "0xff", "L", ")...
Converts eight bytes of a byte array to a signed long. <p/> The byte order is big-endian. @param buffer the byte array. @param offset the offset in the array. @return the long value.
[ "Converts", "eight", "bytes", "of", "a", "byte", "array", "to", "a", "signed", "long", ".", "<p", "/", ">", "The", "byte", "order", "is", "big", "-", "endian", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-reader/src/main/java/org/mapsforge/map/reader/Deserializer.java#L58-L62
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java
JSONHelpers.optPoint
public static <P extends Enum<P>> Point optPoint(final JSONObject json, P e, boolean emptyForNull) { """ Return the value mapped by enum if it exists and is a {@link JSONObject} by mapping "x" and "y" members into a {@link Point}. If the value does not exist by that enum, and {@code emptyForNull} is {@code true}...
java
public static <P extends Enum<P>> Point optPoint(final JSONObject json, P e, boolean emptyForNull) { Point p = optPoint(json, e); if (p == null && emptyForNull) { p = new Point(); } return p; }
[ "public", "static", "<", "P", "extends", "Enum", "<", "P", ">", ">", "Point", "optPoint", "(", "final", "JSONObject", "json", ",", "P", "e", ",", "boolean", "emptyForNull", ")", "{", "Point", "p", "=", "optPoint", "(", "json", ",", "e", ")", ";", "...
Return the value mapped by enum if it exists and is a {@link JSONObject} by mapping "x" and "y" members into a {@link Point}. If the value does not exist by that enum, and {@code emptyForNull} is {@code true}, returns a default constructed {@code Point}. Otherwise, returns {@code null}. @param json {@code JSON...
[ "Return", "the", "value", "mapped", "by", "enum", "if", "it", "exists", "and", "is", "a", "{", "@link", "JSONObject", "}", "by", "mapping", "x", "and", "y", "members", "into", "a", "{", "@link", "Point", "}", ".", "If", "the", "value", "does", "not",...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java#L541-L547
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DateUtils.java
DateUtils.isSameInstant
public static boolean isSameInstant(final Date date1, final Date date2) { """ <p>Checks if two date objects represent the same instant in time.</p> <p>This method compares the long millisecond time of the two objects.</p> @param date1 the first date, not altered, not null @param date2 the second date, not...
java
public static boolean isSameInstant(final Date date1, final Date date2) { if (date1 == null || date2 == null) { throw new IllegalArgumentException("The date must not be null"); } return date1.getTime() == date2.getTime(); }
[ "public", "static", "boolean", "isSameInstant", "(", "final", "Date", "date1", ",", "final", "Date", "date2", ")", "{", "if", "(", "date1", "==", "null", "||", "date2", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The date must...
<p>Checks if two date objects represent the same instant in time.</p> <p>This method compares the long millisecond time of the two objects.</p> @param date1 the first date, not altered, not null @param date2 the second date, not altered, not null @return true if they represent the same millisecond instant @throws I...
[ "<p", ">", "Checks", "if", "two", "date", "objects", "represent", "the", "same", "instant", "in", "time", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DateUtils.java#L213-L218
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/BeatGridFinder.java
BeatGridFinder.getBeatGrid
BeatGrid getBeatGrid(int rekordboxId, SlotReference slot, Client client) throws IOException { """ Requests the beat grid for a specific track ID, given a connection to a player that has already been set up. @param rekordboxId the track of interest @param slot identifies the media slot we are queryi...
java
BeatGrid getBeatGrid(int rekordboxId, SlotReference slot, Client client) throws IOException { Message response = client.simpleRequest(Message.KnownType.BEAT_GRID_REQ, null, client.buildRMST(Message.MenuIdentifier.DATA, slot.slot), new NumberField(rekordboxId)); if (response.k...
[ "BeatGrid", "getBeatGrid", "(", "int", "rekordboxId", ",", "SlotReference", "slot", ",", "Client", "client", ")", "throws", "IOException", "{", "Message", "response", "=", "client", ".", "simpleRequest", "(", "Message", ".", "KnownType", ".", "BEAT_GRID_REQ", ",...
Requests the beat grid for a specific track ID, given a connection to a player that has already been set up. @param rekordboxId the track of interest @param slot identifies the media slot we are querying @param client the dbserver client that is communicating with the appropriate player @return the retrieved beat gri...
[ "Requests", "the", "beat", "grid", "for", "a", "specific", "track", "ID", "given", "a", "connection", "to", "a", "player", "that", "has", "already", "been", "set", "up", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/BeatGridFinder.java#L298-L307
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/v1/DbxClientV1.java
DbxClientV1.chunkedUploadFirst
public String chunkedUploadFirst(byte[] data, int dataOffset, int dataLength) throws DbxException { """ Upload the first chunk of a multi-chunk upload. @param data The data to append. @param dataOffset The start offset in {@code data} to read from. @param dataLength The number of bytes to read from...
java
public String chunkedUploadFirst(byte[] data, int dataOffset, int dataLength) throws DbxException { return chunkedUploadFirst(dataLength, new DbxStreamWriter.ByteArrayCopier(data, dataOffset, dataLength)); }
[ "public", "String", "chunkedUploadFirst", "(", "byte", "[", "]", "data", ",", "int", "dataOffset", ",", "int", "dataLength", ")", "throws", "DbxException", "{", "return", "chunkedUploadFirst", "(", "dataLength", ",", "new", "DbxStreamWriter", ".", "ByteArrayCopier...
Upload the first chunk of a multi-chunk upload. @param data The data to append. @param dataOffset The start offset in {@code data} to read from. @param dataLength The number of bytes to read from {@code data}, starting from {@code dataOffset}. @return The ID designated by the Dropbox server to identify the chunked up...
[ "Upload", "the", "first", "chunk", "of", "a", "multi", "-", "chunk", "upload", "." ]
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/v1/DbxClientV1.java#L1017-L1021
bugsnag/bugsnag-java
bugsnag/src/main/java/com/bugsnag/Report.java
Report.setAppInfo
@Deprecated public Report setAppInfo(String key, Object value) { """ Add some application info on the report. @param key the key of app info to add @param value the value of app info to add @return the modified report @deprecated use {@link #addToTab(String, String, Object)} instead """ dia...
java
@Deprecated public Report setAppInfo(String key, Object value) { diagnostics.app.put(key, value); return this; }
[ "@", "Deprecated", "public", "Report", "setAppInfo", "(", "String", "key", ",", "Object", "value", ")", "{", "diagnostics", ".", "app", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add some application info on the report. @param key the key of app info to add @param value the value of app info to add @return the modified report @deprecated use {@link #addToTab(String, String, Object)} instead
[ "Add", "some", "application", "info", "on", "the", "report", "." ]
train
https://github.com/bugsnag/bugsnag-java/blob/11817d63949bcf2b2b6b765a1d37305cdec356f2/bugsnag/src/main/java/com/bugsnag/Report.java#L214-L218
apiman/apiman
gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/CachingESRegistry.java
CachingESRegistry.getApi
protected Api getApi(String orgId, String apiId, String version) throws IOException { """ Gets the api either from the cache or from ES. @param orgId @param apiId @param version """ String apiIdx = getApiIdx(orgId, apiId, version); Api api; synchronized (mutex) { api = ap...
java
protected Api getApi(String orgId, String apiId, String version) throws IOException { String apiIdx = getApiIdx(orgId, apiId, version); Api api; synchronized (mutex) { api = apiCache.get(apiIdx); } if (api == null) { api = super.getApi(getApiId(orgId, api...
[ "protected", "Api", "getApi", "(", "String", "orgId", ",", "String", "apiId", ",", "String", "version", ")", "throws", "IOException", "{", "String", "apiIdx", "=", "getApiIdx", "(", "orgId", ",", "apiId", ",", "version", ")", ";", "Api", "api", ";", "syn...
Gets the api either from the cache or from ES. @param orgId @param apiId @param version
[ "Gets", "the", "api", "either", "from", "the", "cache", "or", "from", "ES", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/gateway/engine/es/src/main/java/io/apiman/gateway/engine/es/CachingESRegistry.java#L129-L146
alkacon/opencms-core
src/org/opencms/ui/apps/CmsDefaultAppButtonProvider.java
CmsDefaultAppButtonProvider.createAppFolderIconButton
public static Button createAppFolderIconButton(I_CmsFolderAppCategory appCat, Locale locale) { """ Creates a properly styled button for the given app, without adding a click handler or checking visibility settings.<p> @param appCat the app category @param locale the locale @return the button component "...
java
public static Button createAppFolderIconButton(I_CmsFolderAppCategory appCat, Locale locale) { return createIconButton( appCat.getName(locale), appCat.getHelpText(locale), appCat.getIcon(), appCat.getButtonStyle()); }
[ "public", "static", "Button", "createAppFolderIconButton", "(", "I_CmsFolderAppCategory", "appCat", ",", "Locale", "locale", ")", "{", "return", "createIconButton", "(", "appCat", ".", "getName", "(", "locale", ")", ",", "appCat", ".", "getHelpText", "(", "locale"...
Creates a properly styled button for the given app, without adding a click handler or checking visibility settings.<p> @param appCat the app category @param locale the locale @return the button component
[ "Creates", "a", "properly", "styled", "button", "for", "the", "given", "app", "without", "adding", "a", "click", "handler", "or", "checking", "visibility", "settings", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/CmsDefaultAppButtonProvider.java#L160-L167
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java
UnsafeOperations.putObject
public final void putObject(Object parent, long offset, Object value) { """ Puts the object's reference at the given offset of the supplied parent object @param parent The Object's parent @param offset The offset @param value Object to be put """ THE_UNSAFE.putObject(parent, offset, value); }
java
public final void putObject(Object parent, long offset, Object value) { THE_UNSAFE.putObject(parent, offset, value); }
[ "public", "final", "void", "putObject", "(", "Object", "parent", ",", "long", "offset", ",", "Object", "value", ")", "{", "THE_UNSAFE", ".", "putObject", "(", "parent", ",", "offset", ",", "value", ")", ";", "}" ]
Puts the object's reference at the given offset of the supplied parent object @param parent The Object's parent @param offset The offset @param value Object to be put
[ "Puts", "the", "object", "s", "reference", "at", "the", "given", "offset", "of", "the", "supplied", "parent", "object" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/access/unsafe/UnsafeOperations.java#L943-L945
ingwarsw/arquillian-suite-extension
src/main/java/org/eu/ingwar/tools/arquillian/extension/deployment/EarGenericBuilder.java
EarGenericBuilder.getModuleDeployment
public static EnterpriseArchive getModuleDeployment(ModuleType type, String basename) { """ Generates deployment for given application. @param type Module type to generate @param basename Base name of module to generate @return EnterpriseArchive containing given module and all dependencies """ ret...
java
public static EnterpriseArchive getModuleDeployment(ModuleType type, String basename) { return getModuleDeployment(type, basename, true); }
[ "public", "static", "EnterpriseArchive", "getModuleDeployment", "(", "ModuleType", "type", ",", "String", "basename", ")", "{", "return", "getModuleDeployment", "(", "type", ",", "basename", ",", "true", ")", ";", "}" ]
Generates deployment for given application. @param type Module type to generate @param basename Base name of module to generate @return EnterpriseArchive containing given module and all dependencies
[ "Generates", "deployment", "for", "given", "application", "." ]
train
https://github.com/ingwarsw/arquillian-suite-extension/blob/93c9e542ead1d52f45e87b0632bb02ac11f693c8/src/main/java/org/eu/ingwar/tools/arquillian/extension/deployment/EarGenericBuilder.java#L72-L74
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.getElementsByClass
public static List<Element> getElementsByClass(String className) { """ Returns all elements from the DOM with the given CSS class.<p> @param className the class name to look for @return the matching elements """ return getElementsByClass(className, Tag.ALL, Document.get().getBody()); }
java
public static List<Element> getElementsByClass(String className) { return getElementsByClass(className, Tag.ALL, Document.get().getBody()); }
[ "public", "static", "List", "<", "Element", ">", "getElementsByClass", "(", "String", "className", ")", "{", "return", "getElementsByClass", "(", "className", ",", "Tag", ".", "ALL", ",", "Document", ".", "get", "(", ")", ".", "getBody", "(", ")", ")", "...
Returns all elements from the DOM with the given CSS class.<p> @param className the class name to look for @return the matching elements
[ "Returns", "all", "elements", "from", "the", "DOM", "with", "the", "given", "CSS", "class", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1331-L1334
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java
RolloutStatusCache.getRolloutStatus
public List<TotalTargetCountActionStatus> getRolloutStatus(final Long rolloutId) { """ Retrieves cached list of {@link TotalTargetCountActionStatus} of {@link Rollout}s. @param rolloutId to retrieve cache entries for @return map of cached entries """ final Cache cache = cacheManager.getCache(CACH...
java
public List<TotalTargetCountActionStatus> getRolloutStatus(final Long rolloutId) { final Cache cache = cacheManager.getCache(CACHE_RO_NAME); return retrieveFromCache(rolloutId, cache); }
[ "public", "List", "<", "TotalTargetCountActionStatus", ">", "getRolloutStatus", "(", "final", "Long", "rolloutId", ")", "{", "final", "Cache", "cache", "=", "cacheManager", ".", "getCache", "(", "CACHE_RO_NAME", ")", ";", "return", "retrieveFromCache", "(", "rollo...
Retrieves cached list of {@link TotalTargetCountActionStatus} of {@link Rollout}s. @param rolloutId to retrieve cache entries for @return map of cached entries
[ "Retrieves", "cached", "list", "of", "{", "@link", "TotalTargetCountActionStatus", "}", "of", "{", "@link", "Rollout", "}", "s", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutStatusCache.java#L89-L93
mkotsur/restito
src/main/java/com/xebialabs/restito/resources/SmartDiscoverer.java
SmartDiscoverer.discoverResource
public URL discoverResource(Method m, String uri) { """ Discovers resource based on request Tries different options: <ul> <li>GET asd/bsd/asd - resource: {resourcePrefix}/get.asd.bsd.asd</li> <li>GET asd/bsd/asd - resource: {resourcePrefix}/get/asd/bsd/asd</li> <li>GET asd/bsd/asd - resource: {resourcePrefix}...
java
public URL discoverResource(Method m, String uri) { for (String s : possibleLocations(m, uri)) { try { URL resource = this.getClass().getClassLoader().getResource(resourcePrefix + "/" + URLDecoder.decode(s, UTF_8)); if (resource == null) { throw ne...
[ "public", "URL", "discoverResource", "(", "Method", "m", ",", "String", "uri", ")", "{", "for", "(", "String", "s", ":", "possibleLocations", "(", "m", ",", "uri", ")", ")", "{", "try", "{", "URL", "resource", "=", "this", ".", "getClass", "(", ")", ...
Discovers resource based on request Tries different options: <ul> <li>GET asd/bsd/asd - resource: {resourcePrefix}/get.asd.bsd.asd</li> <li>GET asd/bsd/asd - resource: {resourcePrefix}/get/asd/bsd/asd</li> <li>GET asd/bsd/asd - resource: {resourcePrefix}/asd.bsd.asd</li> <li>GET asd/bsd/asd - resource: {resourcePrefix}...
[ "Discovers", "resource", "based", "on", "request", "Tries", "different", "options", ":", "<ul", ">", "<li", ">", "GET", "asd", "/", "bsd", "/", "asd", "-", "resource", ":", "{", "resourcePrefix", "}", "/", "get", ".", "asd", ".", "bsd", ".", "asd<", ...
train
https://github.com/mkotsur/restito/blob/b999293616ca84fdea1ffe929e92a5db29c7e415/src/main/java/com/xebialabs/restito/resources/SmartDiscoverer.java#L49-L65
TestFX/Monocle
src/main/java/com/sun/glass/ui/monocle/LinuxAbsoluteInputCapabilities.java
LinuxAbsoluteInputCapabilities.getCapabilities
static Map<Integer, LinuxAbsoluteInputCapabilities> getCapabilities( File devNode, BitSet axes) throws IOException { """ Reads capabilities from a device node. @return A Map of capabilities for each supported axis, or null if no capabilities are available. @throws IOException if an error occured w...
java
static Map<Integer, LinuxAbsoluteInputCapabilities> getCapabilities( File devNode, BitSet axes) throws IOException { if (axes == null || axes.isEmpty()) { return null; } LinuxSystem system = LinuxSystem.getLinuxSystem(); LinuxSystem.InputAbsInfo info = new LinuxSy...
[ "static", "Map", "<", "Integer", ",", "LinuxAbsoluteInputCapabilities", ">", "getCapabilities", "(", "File", "devNode", ",", "BitSet", "axes", ")", "throws", "IOException", "{", "if", "(", "axes", "==", "null", "||", "axes", ".", "isEmpty", "(", ")", ")", ...
Reads capabilities from a device node. @return A Map of capabilities for each supported axis, or null if no capabilities are available. @throws IOException if an error occured when reading capabilities
[ "Reads", "capabilities", "from", "a", "device", "node", "." ]
train
https://github.com/TestFX/Monocle/blob/267ccba8889cab244bf8c562dbaa0345a612874c/src/main/java/com/sun/glass/ui/monocle/LinuxAbsoluteInputCapabilities.java#L73-L91
jamesagnew/hapi-fhir
hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java
AbstractJaxRsResourceProvider.customOperation
protected Response customOperation(final String resource, final RequestTypeEnum requestType, final String id, final String operationName, final RestOperationTypeEnum operationType) throws IOException { """ Execute a custom operation @param resource the resource to create @param requestT...
java
protected Response customOperation(final String resource, final RequestTypeEnum requestType, final String id, final String operationName, final RestOperationTypeEnum operationType) throws IOException { final Builder request = getResourceRequest(requestType, operationType).resource(resour...
[ "protected", "Response", "customOperation", "(", "final", "String", "resource", ",", "final", "RequestTypeEnum", "requestType", ",", "final", "String", "id", ",", "final", "String", "operationName", ",", "final", "RestOperationTypeEnum", "operationType", ")", "throws"...
Execute a custom operation @param resource the resource to create @param requestType the type of request @param id the id of the resource on which to perform the operation @param operationName the name of the operation to execute @param operationType the rest operation type @return the response @see <a href="https://w...
[ "Execute", "a", "custom", "operation" ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L240-L245
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/constraint/SelfOrThis.java
SelfOrThis.satisfies
@Override public boolean satisfies(Match match, int... ind) { """ Checks if the last index is either generated or equal to the first element. @param match current pattern match @param ind mapped indices @return true if the last index is either generated or equal to the first element """ return match.get(...
java
@Override public boolean satisfies(Match match, int... ind) { return match.get(ind[selfIndex]) == match.get(ind[ind.length-1]) || super.satisfies(match, ind); }
[ "@", "Override", "public", "boolean", "satisfies", "(", "Match", "match", ",", "int", "...", "ind", ")", "{", "return", "match", ".", "get", "(", "ind", "[", "selfIndex", "]", ")", "==", "match", ".", "get", "(", "ind", "[", "ind", ".", "length", "...
Checks if the last index is either generated or equal to the first element. @param match current pattern match @param ind mapped indices @return true if the last index is either generated or equal to the first element
[ "Checks", "if", "the", "last", "index", "is", "either", "generated", "or", "equal", "to", "the", "first", "element", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/SelfOrThis.java#L90-L95
carewebframework/carewebframework-vista
org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/NotificationService.java
NotificationService.toRecipients
private void toRecipients(List<String> recipientData, boolean isGroup, String filter, Collection<Recipient> result) { """ Creates a list of recipients from a list of raw data. @param recipientData List of raw data as returned by lookup. @param isGroup If true, the list represents mail groups. If false, it repr...
java
private void toRecipients(List<String> recipientData, boolean isGroup, String filter, Collection<Recipient> result) { result.clear(); for (String data : recipientData) { Recipient recipient = new Recipient(data, isGroup); if (StringUtils.startsWithIgnoreCase(recipient.getName()...
[ "private", "void", "toRecipients", "(", "List", "<", "String", ">", "recipientData", ",", "boolean", "isGroup", ",", "String", "filter", ",", "Collection", "<", "Recipient", ">", "result", ")", "{", "result", ".", "clear", "(", ")", ";", "for", "(", "Str...
Creates a list of recipients from a list of raw data. @param recipientData List of raw data as returned by lookup. @param isGroup If true, the list represents mail groups. If false, it represents users. @param filter The text used in the lookup. It will be used to limit the returned results. @param result List of reci...
[ "Creates", "a", "list", "of", "recipients", "from", "a", "list", "of", "raw", "data", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/NotificationService.java#L165-L177
Alluxio/alluxio
integration/yarn/src/main/java/alluxio/yarn/CommandBuilder.java
CommandBuilder.addArg
public CommandBuilder addArg(String opt, Object arg) { """ Adds the string value of the given option argument to the command. For example, to add "-name myFile" to construct the command "find . -name myFile", opt should be "-name" and arg should be "myFile". @param opt the option flag @param arg the argume...
java
public CommandBuilder addArg(String opt, Object arg) { mArgs.add(opt + " " + String.valueOf(arg)); return this; }
[ "public", "CommandBuilder", "addArg", "(", "String", "opt", ",", "Object", "arg", ")", "{", "mArgs", ".", "add", "(", "opt", "+", "\" \"", "+", "String", ".", "valueOf", "(", "arg", ")", ")", ";", "return", "this", ";", "}" ]
Adds the string value of the given option argument to the command. For example, to add "-name myFile" to construct the command "find . -name myFile", opt should be "-name" and arg should be "myFile". @param opt the option flag @param arg the argument @return the {@link CommandBuilder} with the argument added
[ "Adds", "the", "string", "value", "of", "the", "given", "option", "argument", "to", "the", "command", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/integration/yarn/src/main/java/alluxio/yarn/CommandBuilder.java#L59-L62
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/panelGrid/PanelGridRenderer.java
PanelGridRenderer.generateRowStart
protected void generateRowStart(ResponseWriter writer, int row, String[] rowClasses, PanelGrid panelGrid) throws IOException { """ Generates the start of each Bootstrap row. @param writer the current response writer. @param row the current row index @param rowClasses the array of row classes @throws IOExc...
java
protected void generateRowStart(ResponseWriter writer, int row, String[] rowClasses, PanelGrid panelGrid) throws IOException { writer.startElement("div", panelGrid); if (null == rowClasses) writer.writeAttribute("class", "row", "class"); else writer.writeAttribute("class", "row " + rowClasses[row % rowClass...
[ "protected", "void", "generateRowStart", "(", "ResponseWriter", "writer", ",", "int", "row", ",", "String", "[", "]", "rowClasses", ",", "PanelGrid", "panelGrid", ")", "throws", "IOException", "{", "writer", ".", "startElement", "(", "\"div\"", ",", "panelGrid",...
Generates the start of each Bootstrap row. @param writer the current response writer. @param row the current row index @param rowClasses the array of row classes @throws IOException if something's wrong with the response writer.
[ "Generates", "the", "start", "of", "each", "Bootstrap", "row", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/panelGrid/PanelGridRenderer.java#L288-L294
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/common/StaticSemanticSpace.java
StaticSemanticSpace.loadBinary
private Matrix loadBinary(InputStream fileStream) throws IOException { """ Loads the {@link SemanticSpace} from the binary formatted file, adding its words to {@link #termToIndex} and returning the {@code Matrix} containing the space's vectors. @param sspaceFile a file in {@link SSpaceFormat#BINARY binary} fo...
java
private Matrix loadBinary(InputStream fileStream) throws IOException { DataInputStream dis = new DataInputStream(fileStream); int rows = dis.readInt(); int cols = dis.readInt(); // create a dense matrix Matrix m = new ArrayMatrix(rows, cols); double[] d = new double[cols...
[ "private", "Matrix", "loadBinary", "(", "InputStream", "fileStream", ")", "throws", "IOException", "{", "DataInputStream", "dis", "=", "new", "DataInputStream", "(", "fileStream", ")", ";", "int", "rows", "=", "dis", ".", "readInt", "(", ")", ";", "int", "co...
Loads the {@link SemanticSpace} from the binary formatted file, adding its words to {@link #termToIndex} and returning the {@code Matrix} containing the space's vectors. @param sspaceFile a file in {@link SSpaceFormat#BINARY binary} format
[ "Loads", "the", "{", "@link", "SemanticSpace", "}", "from", "the", "binary", "formatted", "file", "adding", "its", "words", "to", "{", "@link", "#termToIndex", "}", "and", "returning", "the", "{", "@code", "Matrix", "}", "containing", "the", "space", "s", ...
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/common/StaticSemanticSpace.java#L295-L313
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.createOrUpdateCertificateAsync
public Observable<AppServiceCertificateResourceInner> createOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { """ Creates or updates a certificate and associates with key vault secret. Creates or updates a certifi...
java
public Observable<AppServiceCertificateResourceInner> createOrUpdateCertificateAsync(String resourceGroupName, String certificateOrderName, String name, AppServiceCertificateResourceInner keyVaultCertificate) { return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, nam...
[ "public", "Observable", "<", "AppServiceCertificateResourceInner", ">", "createOrUpdateCertificateAsync", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ",", "String", "name", ",", "AppServiceCertificateResourceInner", "keyVaultCertificate", ")", "{"...
Creates or updates a certificate and associates with key vault secret. Creates or updates a certificate and associates with key vault secret. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @param name Name of the certificate...
[ "Creates", "or", "updates", "a", "certificate", "and", "associates", "with", "key", "vault", "secret", ".", "Creates", "or", "updates", "a", "certificate", "and", "associates", "with", "key", "vault", "secret", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L1220-L1227
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.notEmptyNoNullValue
@CodingStyleguideUnaware public static <T extends Map <?, ?>> T notEmptyNoNullValue (final T aValue, final String sName) { """ Check that the passed map is neither <code>null</code> nor empty and that no <code>null</code> value is contained. @param <T> Type to be checked and returned @param aValue The map...
java
@CodingStyleguideUnaware public static <T extends Map <?, ?>> T notEmptyNoNullValue (final T aValue, final String sName) { if (isEnabled ()) return notEmptyNoNullValue (aValue, () -> sName); return aValue; }
[ "@", "CodingStyleguideUnaware", "public", "static", "<", "T", "extends", "Map", "<", "?", ",", "?", ">", ">", "T", "notEmptyNoNullValue", "(", "final", "T", "aValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "re...
Check that the passed map is neither <code>null</code> nor empty and that no <code>null</code> value is contained. @param <T> Type to be checked and returned @param aValue The map to check. @param sName The name of the value (e.g. the parameter name) @return The passed value. @throws IllegalArgumentException if the pa...
[ "Check", "that", "the", "passed", "map", "is", "neither", "<code", ">", "null<", "/", "code", ">", "nor", "empty", "and", "that", "no", "<code", ">", "null<", "/", "code", ">", "value", "is", "contained", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L1269-L1275
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/indexing/Indices.java
Indices.linearOffset
public static long linearOffset(int index, INDArray arr) { """ Compute the linear offset for an index in an ndarray. For c ordering this is just the index itself. For fortran ordering, the following algorithm is used. Assuming an ndarray is a list of vectors. The index of the vector relative to the given ...
java
public static long linearOffset(int index, INDArray arr) { if (arr.ordering() == NDArrayFactory.C) { double otherTest = ((double) index) % arr.size(-1); int test = (int) Math.floor(otherTest); INDArray vec = arr.vectorAlongDimension(test, -1); long otherDim = arr....
[ "public", "static", "long", "linearOffset", "(", "int", "index", ",", "INDArray", "arr", ")", "{", "if", "(", "arr", ".", "ordering", "(", ")", "==", "NDArrayFactory", ".", "C", ")", "{", "double", "otherTest", "=", "(", "(", "double", ")", "index", ...
Compute the linear offset for an index in an ndarray. For c ordering this is just the index itself. For fortran ordering, the following algorithm is used. Assuming an ndarray is a list of vectors. The index of the vector relative to the given index is calculated. vectorAlongDimension is then used along the last dime...
[ "Compute", "the", "linear", "offset", "for", "an", "index", "in", "an", "ndarray", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/indexing/Indices.java#L89-L111
iron-io/iron_mq_java
src/main/java/io/iron/ironmq/Queue.java
Queue.releaseMessage
public void releaseMessage(String id, String reservationId, Long delay) throws IOException { """ Release reserved message after specified time. If there is no message with such id on the queue, an EmptyQueueException is thrown. @param id The ID of the message to release. @param delay The time after which the ...
java
public void releaseMessage(String id, String reservationId, Long delay) throws IOException { String url = "queues/" + name + "/messages/" + id + "/release"; String payload = gson.toJson(new MessageOptions(reservationId, delay)); IronReader reader = client.post(url, payload); reader.close...
[ "public", "void", "releaseMessage", "(", "String", "id", ",", "String", "reservationId", ",", "Long", "delay", ")", "throws", "IOException", "{", "String", "url", "=", "\"queues/\"", "+", "name", "+", "\"/messages/\"", "+", "id", "+", "\"/release\"", ";", "S...
Release reserved message after specified time. If there is no message with such id on the queue, an EmptyQueueException is thrown. @param id The ID of the message to release. @param delay The time after which the message will be released. @throws io.iron.ironmq.HTTPException If the IronMQ service returns a status oth...
[ "Release", "reserved", "message", "after", "specified", "time", ".", "If", "there", "is", "no", "message", "with", "such", "id", "on", "the", "queue", "an", "EmptyQueueException", "is", "thrown", "." ]
train
https://github.com/iron-io/iron_mq_java/blob/62d6a86545ca7ef31b7b4797aae0c5b31394a507/src/main/java/io/iron/ironmq/Queue.java#L517-L522
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/TrackerMeanShiftComaniciu2003.java
TrackerMeanShiftComaniciu2003.updateLocation
protected void updateLocation( T image , RectangleRotate_F32 region ) { """ Updates the region's location using the standard mean-shift algorithm """ double bestHistScore = Double.MAX_VALUE; float bestX = -1, bestY = -1; for( int i = 0; i < maxIterations; i++ ) { calcHistogram.computeHistogram(image...
java
protected void updateLocation( T image , RectangleRotate_F32 region ) { double bestHistScore = Double.MAX_VALUE; float bestX = -1, bestY = -1; for( int i = 0; i < maxIterations; i++ ) { calcHistogram.computeHistogram(image,region); float histogram[] = calcHistogram.getHistogram(); updateWeights(histog...
[ "protected", "void", "updateLocation", "(", "T", "image", ",", "RectangleRotate_F32", "region", ")", "{", "double", "bestHistScore", "=", "Double", ".", "MAX_VALUE", ";", "float", "bestX", "=", "-", "1", ",", "bestY", "=", "-", "1", ";", "for", "(", "int...
Updates the region's location using the standard mean-shift algorithm
[ "Updates", "the", "region", "s", "location", "using", "the", "standard", "mean", "-", "shift", "algorithm" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/meanshift/TrackerMeanShiftComaniciu2003.java#L240-L303
datacleaner/AnalyzerBeans
env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java
JaxbConfigurationReader.checkName
private static void checkName(final String name, Class<?> type, final Map<String, ?> previousEntries) throws IllegalStateException { """ Checks if a string is a valid name of a component. @param name the name to be validated @param type the type of component (used for error messages) @param prev...
java
private static void checkName(final String name, Class<?> type, final Map<String, ?> previousEntries) throws IllegalStateException { if (StringUtils.isNullOrEmpty(name)) { throw new IllegalStateException(type.getSimpleName() + " name cannot be null"); } if (previousEntrie...
[ "private", "static", "void", "checkName", "(", "final", "String", "name", ",", "Class", "<", "?", ">", "type", ",", "final", "Map", "<", "String", ",", "?", ">", "previousEntries", ")", "throws", "IllegalStateException", "{", "if", "(", "StringUtils", ".",...
Checks if a string is a valid name of a component. @param name the name to be validated @param type the type of component (used for error messages) @param previousEntries the previous entries of that component type (for uniqueness check) @throws IllegalStateException if the name is invalid
[ "Checks", "if", "a", "string", "is", "a", "valid", "name", "of", "a", "component", "." ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/env/xml-config/src/main/java/org/eobjects/analyzer/configuration/JaxbConfigurationReader.java#L1227-L1235
JOML-CI/JOML
src/org/joml/Matrix4x3f.java
Matrix4x3f.setOrthoSymmetricLH
public Matrix4x3f setOrthoSymmetricLH(float width, float height, float zNear, float zFar) { """ Set this matrix to be a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> This method is equivalent to calling {@link #setOr...
java
public Matrix4x3f setOrthoSymmetricLH(float width, float height, float zNear, float zFar) { return setOrthoSymmetricLH(width, height, zNear, zFar, false); }
[ "public", "Matrix4x3f", "setOrthoSymmetricLH", "(", "float", "width", ",", "float", "height", ",", "float", "zNear", ",", "float", "zFar", ")", "{", "return", "setOrthoSymmetricLH", "(", "width", ",", "height", ",", "zNear", ",", "zFar", ",", "false", ")", ...
Set this matrix to be a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code>. <p> This method is equivalent to calling {@link #setOrthoLH(float, float, float, float, float, float) setOrthoLH()} with <code>left=-width/2</code>, <code>rig...
[ "Set", "this", "matrix", "to", "be", "a", "symmetric", "orthographic", "projection", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", "...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3f.java#L5648-L5650
alkacon/opencms-core
src/org/opencms/lock/CmsLockManager.java
CmsLockManager.getLock
public CmsLock getLock(CmsDbContext dbc, CmsResource resource) throws CmsException { """ Returns the lock state of the given resource.<p> In case no lock is set, the <code>null lock</code> which can be obtained by {@link CmsLock#getNullLock()} is returned.<p> @param dbc the current database context @param ...
java
public CmsLock getLock(CmsDbContext dbc, CmsResource resource) throws CmsException { return getLock(dbc, resource, true); }
[ "public", "CmsLock", "getLock", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "return", "getLock", "(", "dbc", ",", "resource", ",", "true", ")", ";", "}" ]
Returns the lock state of the given resource.<p> In case no lock is set, the <code>null lock</code> which can be obtained by {@link CmsLock#getNullLock()} is returned.<p> @param dbc the current database context @param resource the resource @return the lock state of the given resource @throws CmsException if somethi...
[ "Returns", "the", "lock", "state", "of", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/lock/CmsLockManager.java#L173-L176
HalBuilder/halbuilder-guava
src/main/java/com/theoryinpractise/halbuilder/guava/Representations.java
Representations.withLink
public static void withLink(Representation representation, String rel, URI uri, Optional<Predicate<ReadableRepresentation>> predicate, Optional<String> name, Optional<String> title, Optional<String> hreflang, Optional<String> profile) { """ Add a link to this resource @param rel @param uri The target URI for t...
java
public static void withLink(Representation representation, String rel, URI uri, Optional<Predicate<ReadableRepresentation>> predicate, Optional<String> name, Optional<String> title, Optional<String> hreflang, Optional<String> profile) { withLink(representation, rel, uri.toASCIIString(), predicate, name, title, ...
[ "public", "static", "void", "withLink", "(", "Representation", "representation", ",", "String", "rel", ",", "URI", "uri", ",", "Optional", "<", "Predicate", "<", "ReadableRepresentation", ">", ">", "predicate", ",", "Optional", "<", "String", ">", "name", ",",...
Add a link to this resource @param rel @param uri The target URI for the link, possibly relative to the href of this resource.
[ "Add", "a", "link", "to", "this", "resource" ]
train
https://github.com/HalBuilder/halbuilder-guava/blob/648cb1ae6c4b4cebd82364a8d72d9801bd3db771/src/main/java/com/theoryinpractise/halbuilder/guava/Representations.java#L61-L63
albfernandez/itext2
src/main/java/com/lowagie/text/factories/GreekAlphabetFactory.java
GreekAlphabetFactory.getString
public static final String getString(int index, boolean lowercase) { """ Changes an int into a Greek letter combination. @param index the original number @return the letter combination """ if (index < 1) return ""; index--; int bytes = 1; int start = 0; int symbols = 24; ...
java
public static final String getString(int index, boolean lowercase) { if (index < 1) return ""; index--; int bytes = 1; int start = 0; int symbols = 24; while(index >= symbols + start) { bytes++; start += symbols; symbols *= 24; } ...
[ "public", "static", "final", "String", "getString", "(", "int", "index", ",", "boolean", "lowercase", ")", "{", "if", "(", "index", "<", "1", ")", "return", "\"\"", ";", "index", "--", ";", "int", "bytes", "=", "1", ";", "int", "start", "=", "0", "...
Changes an int into a Greek letter combination. @param index the original number @return the letter combination
[ "Changes", "an", "int", "into", "a", "Greek", "letter", "combination", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/factories/GreekAlphabetFactory.java#L96-L121
EvidentSolutions/dalesbred
dalesbred/src/main/java/org/dalesbred/Database.java
Database.findAll
public @NotNull <T> List<T> findAll(@NotNull RowMapper<T> rowMapper, @NotNull @SQL String sql, Object... args) { """ Executes a query and processes each row of the result with given {@link RowMapper} to produce a list of results. """ return findAll(rowMapper, SqlQuery.query(sql, args)); }
java
public @NotNull <T> List<T> findAll(@NotNull RowMapper<T> rowMapper, @NotNull @SQL String sql, Object... args) { return findAll(rowMapper, SqlQuery.query(sql, args)); }
[ "public", "@", "NotNull", "<", "T", ">", "List", "<", "T", ">", "findAll", "(", "@", "NotNull", "RowMapper", "<", "T", ">", "rowMapper", ",", "@", "NotNull", "@", "SQL", "String", "sql", ",", "Object", "...", "args", ")", "{", "return", "findAll", ...
Executes a query and processes each row of the result with given {@link RowMapper} to produce a list of results.
[ "Executes", "a", "query", "and", "processes", "each", "row", "of", "the", "result", "with", "given", "{" ]
train
https://github.com/EvidentSolutions/dalesbred/blob/713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1/dalesbred/src/main/java/org/dalesbred/Database.java#L308-L310
googleapis/google-cloud-java
google-cloud-clients/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceClient.java
LanguageServiceClient.analyzeSyntax
public final AnalyzeSyntaxResponse analyzeSyntax(Document document, EncodingType encodingType) { """ Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. <p>Sample code: <pre><code> try (LanguageServiceClie...
java
public final AnalyzeSyntaxResponse analyzeSyntax(Document document, EncodingType encodingType) { AnalyzeSyntaxRequest request = AnalyzeSyntaxRequest.newBuilder() .setDocument(document) .setEncodingType(encodingType) .build(); return analyzeSyntax(request); }
[ "public", "final", "AnalyzeSyntaxResponse", "analyzeSyntax", "(", "Document", "document", ",", "EncodingType", "encodingType", ")", "{", "AnalyzeSyntaxRequest", "request", "=", "AnalyzeSyntaxRequest", ".", "newBuilder", "(", ")", ".", "setDocument", "(", "document", "...
Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. <p>Sample code: <pre><code> try (LanguageServiceClient languageServiceClient = LanguageServiceClient.create()) { Document document = Document.newBuilder().build(); ...
[ "Analyzes", "the", "syntax", "of", "the", "text", "and", "provides", "sentence", "boundaries", "and", "tokenization", "along", "with", "part", "of", "speech", "tags", "dependency", "trees", "and", "other", "properties", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-language/src/main/java/com/google/cloud/language/v1beta2/LanguageServiceClient.java#L397-L405
code4everything/util
src/main/java/com/zhazhapan/util/dialog/Alerts.java
Alerts.showError
public static Optional<ButtonType> showError(String title, String content) { """ 弹出错误框 @param title 标题 @param content 内容 @return {@link ButtonType} """ return showError(title, null, content); }
java
public static Optional<ButtonType> showError(String title, String content) { return showError(title, null, content); }
[ "public", "static", "Optional", "<", "ButtonType", ">", "showError", "(", "String", "title", ",", "String", "content", ")", "{", "return", "showError", "(", "title", ",", "null", ",", "content", ")", ";", "}" ]
弹出错误框 @param title 标题 @param content 内容 @return {@link ButtonType}
[ "弹出错误框" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/dialog/Alerts.java#L82-L84
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java
TreeUtil.getClosestContextForId
public static UIContext getClosestContextForId(final WComponent root, final String id, final boolean visibleOnly) { """ Retrieves the closest context for the component with the given Id. @param root the root component to search from. @param id the id to search for. @param visibleOnly true if process visibl...
java
public static UIContext getClosestContextForId(final WComponent root, final String id, final boolean visibleOnly) { FindComponentByIdVisitor visitor = new FindComponentByIdVisitor(id) { @Override public VisitorResult visit(final WComponent comp) { VisitorResult result = super.visit(comp); if (result...
[ "public", "static", "UIContext", "getClosestContextForId", "(", "final", "WComponent", "root", ",", "final", "String", "id", ",", "final", "boolean", "visibleOnly", ")", "{", "FindComponentByIdVisitor", "visitor", "=", "new", "FindComponentByIdVisitor", "(", "id", "...
Retrieves the closest context for the component with the given Id. @param root the root component to search from. @param id the id to search for. @param visibleOnly true if process visible only @return the closest context for the component with the given id, or null if not found.
[ "Retrieves", "the", "closest", "context", "for", "the", "component", "with", "the", "given", "Id", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/TreeUtil.java#L226-L244
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/store/JCRStoreResource.java
JCRStoreResource.setIdentifer
protected void setIdentifer(final String _identifier) throws EFapsException { """ Set the identifier in the eFaps DataBase. @param _identifier identifer to set @throws EFapsException on error """ if (!_identifier.equals(this.identifier)) { ConnectionResource res = null; ...
java
protected void setIdentifer(final String _identifier) throws EFapsException { if (!_identifier.equals(this.identifier)) { ConnectionResource res = null; try { res = Context.getThreadContext().getConnectionResource(); final StringBuffer cmd = ...
[ "protected", "void", "setIdentifer", "(", "final", "String", "_identifier", ")", "throws", "EFapsException", "{", "if", "(", "!", "_identifier", ".", "equals", "(", "this", ".", "identifier", ")", ")", "{", "ConnectionResource", "res", "=", "null", ";", "try...
Set the identifier in the eFaps DataBase. @param _identifier identifer to set @throws EFapsException on error
[ "Set", "the", "identifier", "in", "the", "eFaps", "DataBase", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/store/JCRStoreResource.java#L326-L354
javamelody/javamelody
javamelody-spring-boot-starter/src/main/java/net/bull/javamelody/JavaMelodyAutoConfiguration.java
JavaMelodyAutoConfiguration.monitoringSpringScheduledAdvisor
@Bean @ConditionalOnProperty(prefix = JavaMelodyConfigurationProperties.PREFIX, name = "scheduled-monitoring-enabled", matchIfMissing = true) @ConditionalOnMissingBean(DefaultAdvisorAutoProxyCreator.class) public MonitoringSpringAdvisor monitoringSpringScheduledAdvisor() { """ Monitoring of beans methods having...
java
@Bean @ConditionalOnProperty(prefix = JavaMelodyConfigurationProperties.PREFIX, name = "scheduled-monitoring-enabled", matchIfMissing = true) @ConditionalOnMissingBean(DefaultAdvisorAutoProxyCreator.class) public MonitoringSpringAdvisor monitoringSpringScheduledAdvisor() { // scheduled-monitoring-enabled was false...
[ "@", "Bean", "@", "ConditionalOnProperty", "(", "prefix", "=", "JavaMelodyConfigurationProperties", ".", "PREFIX", ",", "name", "=", "\"scheduled-monitoring-enabled\"", ",", "matchIfMissing", "=", "true", ")", "@", "ConditionalOnMissingBean", "(", "DefaultAdvisorAutoProxy...
Monitoring of beans methods having the {@link Scheduled} or {@link Schedules} annotations. @return MonitoringSpringAdvisor
[ "Monitoring", "of", "beans", "methods", "having", "the", "{" ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-spring-boot-starter/src/main/java/net/bull/javamelody/JavaMelodyAutoConfiguration.java#L262-L272
HtmlUnit/htmlunit-cssparser
src/main/java/com/gargoylesoftware/css/dom/CSSStyleDeclarationImpl.java
CSSStyleDeclarationImpl.setProperty
public void setProperty( final String propertyName, final String value, final String priority) throws DOMException { """ Set a property. @param propertyName the name of the property @param value the new value @param priority the priority @throws DOMException in case of error...
java
public void setProperty( final String propertyName, final String value, final String priority) throws DOMException { try { CSSValueImpl expr = null; if (!value.isEmpty()) { final CSSOMParser parser = new CSSOMParser(); e...
[ "public", "void", "setProperty", "(", "final", "String", "propertyName", ",", "final", "String", "value", ",", "final", "String", "priority", ")", "throws", "DOMException", "{", "try", "{", "CSSValueImpl", "expr", "=", "null", ";", "if", "(", "!", "value", ...
Set a property. @param propertyName the name of the property @param value the new value @param priority the priority @throws DOMException in case of error
[ "Set", "a", "property", "." ]
train
https://github.com/HtmlUnit/htmlunit-cssparser/blob/384e4170737169b5b4c87c5766495d9b8a6d3866/src/main/java/com/gargoylesoftware/css/dom/CSSStyleDeclarationImpl.java#L155-L182
mcxiaoke/Android-Next
core/src/main/java/com/mcxiaoke/next/collection/WeakFastHashMap.java
WeakFastHashMap.put
@Override public V put(K key, V value) { """ Associate the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced and returned. @param key the key with which the value is to be associated @param value the value to be associ...
java
@Override public V put(K key, V value) { if (fast) { synchronized (this) { Map<K, V> temp = cloneMap(map); V result = temp.put(key, value); map = temp; return (result); } } else { synchroniz...
[ "@", "Override", "public", "V", "put", "(", "K", "key", ",", "V", "value", ")", "{", "if", "(", "fast", ")", "{", "synchronized", "(", "this", ")", "{", "Map", "<", "K", ",", "V", ">", "temp", "=", "cloneMap", "(", "map", ")", ";", "V", "resu...
Associate the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced and returned. @param key the key with which the value is to be associated @param value the value to be associated with this key @return the value previously mapped to th...
[ "Associate", "the", "specified", "value", "with", "the", "specified", "key", "in", "this", "map", ".", "If", "the", "map", "previously", "contained", "a", "mapping", "for", "this", "key", "the", "old", "value", "is", "replaced", "and", "returned", "." ]
train
https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/collection/WeakFastHashMap.java#L357-L371
igniterealtime/Smack
smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java
Jingle.getSessionHash
public static int getSessionHash(final String sid, final Jid initiator) { """ Get a hash key for the session this stanza belongs to. @param sid The session id @param initiator The initiator @return A hash key """ final int PRIME = 31; int result = 1; result = PRIME * result +...
java
public static int getSessionHash(final String sid, final Jid initiator) { final int PRIME = 31; int result = 1; result = PRIME * result + (initiator == null ? 0 : initiator.hashCode()); result = PRIME * result + (sid == null ? 0 : sid.hashCode()); return result; }
[ "public", "static", "int", "getSessionHash", "(", "final", "String", "sid", ",", "final", "Jid", "initiator", ")", "{", "final", "int", "PRIME", "=", "31", ";", "int", "result", "=", "1", ";", "result", "=", "PRIME", "*", "result", "+", "(", "initiator...
Get a hash key for the session this stanza belongs to. @param sid The session id @param initiator The initiator @return A hash key
[ "Get", "a", "hash", "key", "for", "the", "session", "this", "stanza", "belongs", "to", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java#L335-L341
awslabs/jsii
packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java
JsiiClient.createObject
public JsiiObjectRef createObject(final String fqn, final List<Object> initializerArgs) { """ Creates a remote jsii object. @param fqn The fully-qualified-name of the class. @param initializerArgs Constructor arguments. @return A jsii object reference. """ return createObject(fqn, initializerArgs, C...
java
public JsiiObjectRef createObject(final String fqn, final List<Object> initializerArgs) { return createObject(fqn, initializerArgs, Collections.emptyList()); }
[ "public", "JsiiObjectRef", "createObject", "(", "final", "String", "fqn", ",", "final", "List", "<", "Object", ">", "initializerArgs", ")", "{", "return", "createObject", "(", "fqn", ",", "initializerArgs", ",", "Collections", ".", "emptyList", "(", ")", ")", ...
Creates a remote jsii object. @param fqn The fully-qualified-name of the class. @param initializerArgs Constructor arguments. @return A jsii object reference.
[ "Creates", "a", "remote", "jsii", "object", "." ]
train
https://github.com/awslabs/jsii/blob/6bbf743f5f65e98e5199ad31c93961533ffc40e5/packages/jsii-java-runtime/project/src/main/java/software/amazon/jsii/JsiiClient.java#L65-L67
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java
AbstractConversionTable.setTypeConversions
protected void setTypeConversions(List<Pair<String, String>> typeConversions, boolean notifyController) { """ Sets the type conversions to be displayed in this block. @param typeConversions the type conversions. @param notifyController indicates if the controller should be notified. """ this.conversions....
java
protected void setTypeConversions(List<Pair<String, String>> typeConversions, boolean notifyController) { this.conversions.clear(); if (typeConversions != null) { for (final Pair<String, String> entry : typeConversions) { this.conversions.add(new ConversionMapping(entry.getKey(), entry.getValue())); } }...
[ "protected", "void", "setTypeConversions", "(", "List", "<", "Pair", "<", "String", ",", "String", ">", ">", "typeConversions", ",", "boolean", "notifyController", ")", "{", "this", ".", "conversions", ".", "clear", "(", ")", ";", "if", "(", "typeConversions...
Sets the type conversions to be displayed in this block. @param typeConversions the type conversions. @param notifyController indicates if the controller should be notified.
[ "Sets", "the", "type", "conversions", "to", "be", "displayed", "in", "this", "block", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/extralanguage/properties/AbstractConversionTable.java#L422-L434
michael-rapp/AndroidBottomSheet
library/src/main/java/de/mrapp/android/bottomsheet/BottomSheet.java
BottomSheet.setItem
public final void setItem(final int index, final int id, @StringRes final int titleId) { """ Replaces the item at a specific index with another item. @param index The index of the item, which should be replaced, as an {@link Integer} value @param id The id of the item, which should be added, as an {@link Int...
java
public final void setItem(final int index, final int id, @StringRes final int titleId) { Item item = new Item(getContext(), id, titleId); adapter.set(index, item); adaptGridViewHeight(); }
[ "public", "final", "void", "setItem", "(", "final", "int", "index", ",", "final", "int", "id", ",", "@", "StringRes", "final", "int", "titleId", ")", "{", "Item", "item", "=", "new", "Item", "(", "getContext", "(", ")", ",", "id", ",", "titleId", ")"...
Replaces the item at a specific index with another item. @param index The index of the item, which should be replaced, as an {@link Integer} value @param id The id of the item, which should be added, as an {@link Integer} value. The id must be at least 0 @param titleId The resource id of the title of the item, which s...
[ "Replaces", "the", "item", "at", "a", "specific", "index", "with", "another", "item", "." ]
train
https://github.com/michael-rapp/AndroidBottomSheet/blob/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/library/src/main/java/de/mrapp/android/bottomsheet/BottomSheet.java#L2099-L2103
w3c/epubcheck
src/main/java/com/adobe/epubcheck/messages/LocalizedMessages.java
LocalizedMessages.getMessage
public Message getMessage(MessageId id) { """ Gets the message for the given id. @param id @return A Message object, using the localized string if necessary. """ // Performance note: this method uses a lazy initialization pattern. When // a MessageId is first requested, we fetch the data from the R...
java
public Message getMessage(MessageId id) { // Performance note: this method uses a lazy initialization pattern. When // a MessageId is first requested, we fetch the data from the ResourceBundle // and create a new Message object, which is then cached. On the next // request, we'll use the cached versi...
[ "public", "Message", "getMessage", "(", "MessageId", "id", ")", "{", "// Performance note: this method uses a lazy initialization pattern. When", "// a MessageId is first requested, we fetch the data from the ResourceBundle", "// and create a new Message object, which is then cached. On the next...
Gets the message for the given id. @param id @return A Message object, using the localized string if necessary.
[ "Gets", "the", "message", "for", "the", "given", "id", "." ]
train
https://github.com/w3c/epubcheck/blob/4d5a24d9f2878a2a5497eb11c036cc18fe2c0a78/src/main/java/com/adobe/epubcheck/messages/LocalizedMessages.java#L84-L102
henkexbg/gallery-api
src/main/java/com/github/henkexbg/gallery/controller/GalleryController.java
GalleryController.getPreviousPath
private String getPreviousPath(String contextPath, String path) { """ Helper method that retrieves the URL to the previous path if available. Previous in this case always means one step up in the hierarchy. It is assumed that this is always a directory i.e. the URL will point to the {@value #DIR_LISTING_PREFIX}...
java
private String getPreviousPath(String contextPath, String path) { if (StringUtils.isBlank(path)) { return null; } int lastIndexOfSlash = path.lastIndexOf('/'); if (lastIndexOfSlash == -1) { return null; } return contextPath + DIR_LISTING_PREFIX + p...
[ "private", "String", "getPreviousPath", "(", "String", "contextPath", ",", "String", "path", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "path", ")", ")", "{", "return", "null", ";", "}", "int", "lastIndexOfSlash", "=", "path", ".", "lastIndex...
Helper method that retrieves the URL to the previous path if available. Previous in this case always means one step up in the hierarchy. It is assumed that this is always a directory i.e. the URL will point to the {@value #DIR_LISTING_PREFIX} service. @param contextPath Webapp context path. @param path Webapp-specific...
[ "Helper", "method", "that", "retrieves", "the", "URL", "to", "the", "previous", "path", "if", "available", ".", "Previous", "in", "this", "case", "always", "means", "one", "step", "up", "in", "the", "hierarchy", ".", "It", "is", "assumed", "that", "this", ...
train
https://github.com/henkexbg/gallery-api/blob/530e68c225b5e8fc3b608d670b34bd539a5b0a71/src/main/java/com/github/henkexbg/gallery/controller/GalleryController.java#L403-L412
baratine/baratine
framework/src/main/java/com/caucho/v5/http/pod/PodLoader.java
PodLoader.buildClassLoader
public ClassLoader buildClassLoader(ClassLoader serviceLoader) { """ Builds a combined class-loader with the target service loader as a parent, and this calling pod loader as a child. """ synchronized (_loaderMap) { SoftReference<ClassLoader> extLoaderRef = _loaderMap.get(serviceLoader); ...
java
public ClassLoader buildClassLoader(ClassLoader serviceLoader) { synchronized (_loaderMap) { SoftReference<ClassLoader> extLoaderRef = _loaderMap.get(serviceLoader); if (extLoaderRef != null) { ClassLoader extLoader = extLoaderRef.get(); if (extLoader != null) { ...
[ "public", "ClassLoader", "buildClassLoader", "(", "ClassLoader", "serviceLoader", ")", "{", "synchronized", "(", "_loaderMap", ")", "{", "SoftReference", "<", "ClassLoader", ">", "extLoaderRef", "=", "_loaderMap", ".", "get", "(", "serviceLoader", ")", ";", "if", ...
Builds a combined class-loader with the target service loader as a parent, and this calling pod loader as a child.
[ "Builds", "a", "combined", "class", "-", "loader", "with", "the", "target", "service", "loader", "as", "a", "parent", "and", "this", "calling", "pod", "loader", "as", "a", "child", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/http/pod/PodLoader.java#L191-L237
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java
GrailsHibernateUtil.ensureCorrectGroovyMetaClass
@Deprecated public static void ensureCorrectGroovyMetaClass(Object target, Class<?> persistentClass) { """ Ensures the meta class is correct for a given class @param target The GroovyObject @param persistentClass The persistent class """ if (target instanceof GroovyObject) { GroovyO...
java
@Deprecated public static void ensureCorrectGroovyMetaClass(Object target, Class<?> persistentClass) { if (target instanceof GroovyObject) { GroovyObject go = ((GroovyObject)target); if (!go.getMetaClass().getTheClass().equals(persistentClass)) { go.setMetaClass(Groov...
[ "@", "Deprecated", "public", "static", "void", "ensureCorrectGroovyMetaClass", "(", "Object", "target", ",", "Class", "<", "?", ">", "persistentClass", ")", "{", "if", "(", "target", "instanceof", "GroovyObject", ")", "{", "GroovyObject", "go", "=", "(", "(", ...
Ensures the meta class is correct for a given class @param target The GroovyObject @param persistentClass The persistent class
[ "Ensures", "the", "meta", "class", "is", "correct", "for", "a", "given", "class" ]
train
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L363-L371
deeplearning4j/deeplearning4j
nd4j/nd4j-parameter-server-parent/nd4j-parameter-server-node/src/main/java/org/nd4j/parameterserver/distributed/v2/transport/impl/AeronUdpTransport.java
AeronUdpTransport.jointMessageHandler
protected void jointMessageHandler(DirectBuffer buffer, int offset, int length, Header header) { """ This method converts aeron buffer into VoidMessage and puts into temp queue for further processing @param buffer @param offset @param length @param header """ byte[] data = new byte[length]; ...
java
protected void jointMessageHandler(DirectBuffer buffer, int offset, int length, Header header) { byte[] data = new byte[length]; buffer.getBytes(offset, data); // deserialize message val message = VoidMessage.fromBytes(data); // we're checking if this is known connection or not...
[ "protected", "void", "jointMessageHandler", "(", "DirectBuffer", "buffer", ",", "int", "offset", ",", "int", "length", ",", "Header", "header", ")", "{", "byte", "[", "]", "data", "=", "new", "byte", "[", "length", "]", ";", "buffer", ".", "getBytes", "(...
This method converts aeron buffer into VoidMessage and puts into temp queue for further processing @param buffer @param offset @param length @param header
[ "This", "method", "converts", "aeron", "buffer", "into", "VoidMessage", "and", "puts", "into", "temp", "queue", "for", "further", "processing" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-parameter-server-parent/nd4j-parameter-server-node/src/main/java/org/nd4j/parameterserver/distributed/v2/transport/impl/AeronUdpTransport.java#L245-L265
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java
SqlGeneratorDefaultImpl.toSQLClause
private String toSQLClause(ExistsCriteria c, ClassDescriptor cld) { """ Answer the SQL-Clause for an ExistsCriteria @param c ExistsCriteria @param cld ClassDescriptor """ StringBuffer buf = new StringBuffer(); Query subQuery = (Query) c.getValue(); buf.append(c.getClause()); ...
java
private String toSQLClause(ExistsCriteria c, ClassDescriptor cld) { StringBuffer buf = new StringBuffer(); Query subQuery = (Query) c.getValue(); buf.append(c.getClause()); buf.append(" ("); // If it's a proper call if (cld != null) { ...
[ "private", "String", "toSQLClause", "(", "ExistsCriteria", "c", ",", "ClassDescriptor", "cld", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "Query", "subQuery", "=", "(", "Query", ")", "c", ".", "getValue", "(", ")", ";", "...
Answer the SQL-Clause for an ExistsCriteria @param c ExistsCriteria @param cld ClassDescriptor
[ "Answer", "the", "SQL", "-", "Clause", "for", "an", "ExistsCriteria" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlGeneratorDefaultImpl.java#L525-L550
tootedom/related
app/web/indexing/src/main/java/org/greencheek/related/indexing/web/RelatedItemIndexOrderServlet.java
RelatedItemIndexOrderServlet.parseContentLength
private int parseContentLength(int maxPostDataSize, String length) { """ If there is a content length header. Check the reported length, making sure it isn't over the max post data size. @param maxPostDataSize @return -1 if size of post data is too large, or corrupt, -2 if we don't have content length (chunk...
java
private int parseContentLength(int maxPostDataSize, String length) { if(length!=null) { try { int size = Integer.parseInt(length); if(size>maxPostDataSize) return -1; else return size; } catch(NumberFormatException e) { // s...
[ "private", "int", "parseContentLength", "(", "int", "maxPostDataSize", ",", "String", "length", ")", "{", "if", "(", "length", "!=", "null", ")", "{", "try", "{", "int", "size", "=", "Integer", ".", "parseInt", "(", "length", ")", ";", "if", "(", "size...
If there is a content length header. Check the reported length, making sure it isn't over the max post data size. @param maxPostDataSize @return -1 if size of post data is too large, or corrupt, -2 if we don't have content length (chunked), or the size (this could be 0)
[ "If", "there", "is", "a", "content", "length", "header", ".", "Check", "the", "reported", "length", "making", "sure", "it", "isn", "t", "over", "the", "max", "post", "data", "size", "." ]
train
https://github.com/tootedom/related/blob/3782dd5a839bbcdc15661d598e8b895aae8aabb7/app/web/indexing/src/main/java/org/greencheek/related/indexing/web/RelatedItemIndexOrderServlet.java#L123-L138
wellner/jcarafe
jcarafe-core/src/main/java/cern/colt/list/DoubleArrayList.java
DoubleArrayList.get
public double get(int index) { """ Returns the element at the specified position in the receiver. @param index index of element to return. @exception IndexOutOfBoundsException index is out of range (index &lt; 0 || index &gt;= size()). """ // overridden for performance only. if (index >= size || index...
java
public double get(int index) { // overridden for performance only. if (index >= size || index < 0) throw new IndexOutOfBoundsException("Index: "+index+", Size: "+size); return elements[index]; }
[ "public", "double", "get", "(", "int", "index", ")", "{", "// overridden for performance only.\r", "if", "(", "index", ">=", "size", "||", "index", "<", "0", ")", "throw", "new", "IndexOutOfBoundsException", "(", "\"Index: \"", "+", "index", "+", "\", Size: \"",...
Returns the element at the specified position in the receiver. @param index index of element to return. @exception IndexOutOfBoundsException index is out of range (index &lt; 0 || index &gt;= size()).
[ "Returns", "the", "element", "at", "the", "specified", "position", "in", "the", "receiver", "." ]
train
https://github.com/wellner/jcarafe/blob/ab8b0a83dbf600fe80c27711815c90bd3055b217/jcarafe-core/src/main/java/cern/colt/list/DoubleArrayList.java#L209-L214