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
UrielCh/ovh-java-sdk
ovh-java-sdk-contact/src/main/java/net/minidev/ovh/api/ApiOvhContact.java
ApiOvhContact.form_send_POST
public void form_send_POST(OvhSafeKeyValue<String>[] form, String type) throws IOException { """ Send form following characteristics of /contact/form REST: POST /contact/form/send @param type [required] Form type @param form [required] Form informations """ String qPath = "/contact/form/send"; StringB...
java
public void form_send_POST(OvhSafeKeyValue<String>[] form, String type) throws IOException { String qPath = "/contact/form/send"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "form", form); addBody(o, "type", type); execN(qPath, "POST", sb.toString(), ...
[ "public", "void", "form_send_POST", "(", "OvhSafeKeyValue", "<", "String", ">", "[", "]", "form", ",", "String", "type", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/contact/form/send\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath",...
Send form following characteristics of /contact/form REST: POST /contact/form/send @param type [required] Form type @param form [required] Form informations
[ "Send", "form", "following", "characteristics", "of", "/", "contact", "/", "form" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-contact/src/main/java/net/minidev/ovh/api/ApiOvhContact.java#L42-L49
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PKeyArea.java
PKeyArea.compareKeys
public int compareKeys(int iAreaDesc, String strSeekSign, FieldTable table, KeyAreaInfo keyArea) { """ Compare these two keys and return the compare result. @param areaDesc The area that the key to compare is in. @param strSeekSign The seek sign. @param table The table. @param keyArea The table's key area. @r...
java
public int compareKeys(int iAreaDesc, String strSeekSign, FieldTable table, KeyAreaInfo keyArea) { int iCompareValue = keyArea.compareKeys(iAreaDesc); return iCompareValue; }
[ "public", "int", "compareKeys", "(", "int", "iAreaDesc", ",", "String", "strSeekSign", ",", "FieldTable", "table", ",", "KeyAreaInfo", "keyArea", ")", "{", "int", "iCompareValue", "=", "keyArea", ".", "compareKeys", "(", "iAreaDesc", ")", ";", "return", "iComp...
Compare these two keys and return the compare result. @param areaDesc The area that the key to compare is in. @param strSeekSign The seek sign. @param table The table. @param keyArea The table's key area. @return The compare result (-1, 0, or 1).
[ "Compare", "these", "two", "keys", "and", "return", "the", "compare", "result", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PKeyArea.java#L80-L84
apache/groovy
src/main/java/org/codehaus/groovy/transform/ImmutableASTTransformation.java
ImmutableASTTransformation.checkImmutable
@SuppressWarnings("Unchecked") public static Object checkImmutable(String className, String fieldName, Object field) { """ This method exists to be binary compatible with 1.7 - 1.8.6 compiled code. """ if (field == null || field instanceof Enum || ImmutablePropertyUtils.isBuiltinImmutable(field.get...
java
@SuppressWarnings("Unchecked") public static Object checkImmutable(String className, String fieldName, Object field) { if (field == null || field instanceof Enum || ImmutablePropertyUtils.isBuiltinImmutable(field.getClass().getName())) return field; if (field instanceof Collection) return DefaultGro...
[ "@", "SuppressWarnings", "(", "\"Unchecked\"", ")", "public", "static", "Object", "checkImmutable", "(", "String", "className", ",", "String", "fieldName", ",", "Object", "field", ")", "{", "if", "(", "field", "==", "null", "||", "field", "instanceof", "Enum",...
This method exists to be binary compatible with 1.7 - 1.8.6 compiled code.
[ "This", "method", "exists", "to", "be", "binary", "compatible", "with", "1", ".", "7", "-", "1", ".", "8", ".", "6", "compiled", "code", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/ImmutableASTTransformation.java#L329-L337
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Client/ClientStateMachine.java
ClientStateMachine.getStateEpisodeForState
@Override protected StateEpisode getStateEpisodeForState(IState state) { """ Create the episode object for the requested state. @param state the state the mod is entering @return a MissionStateEpisode that localises all the logic required to run this state """ if (!(state instanceof ClientState...
java
@Override protected StateEpisode getStateEpisodeForState(IState state) { if (!(state instanceof ClientState)) return null; ClientState cs = (ClientState) state; switch (cs) { case WAITING_FOR_MOD_READY: return new InitialiseClientModEpisode(this);...
[ "@", "Override", "protected", "StateEpisode", "getStateEpisodeForState", "(", "IState", "state", ")", "{", "if", "(", "!", "(", "state", "instanceof", "ClientState", ")", ")", "return", "null", ";", "ClientState", "cs", "=", "(", "ClientState", ")", "state", ...
Create the episode object for the requested state. @param state the state the mod is entering @return a MissionStateEpisode that localises all the logic required to run this state
[ "Create", "the", "episode", "object", "for", "the", "requested", "state", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Client/ClientStateMachine.java#L282-L341
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDMath.java
SDMath.setDiag
public SDVariable setDiag(String name, SDVariable in, SDVariable diag) { """ Set the diagonal value to the specified values<br> If input is<br> [ a, b, c]<br> [ d, e, f]<br> [ g, h, i]<br> and diag = [ 1, 2, 3] then output is<br> [ 1, b, c]<br> [ d, 2, f]<br> [ g, h, 3]<br> @param name Name of the outpu...
java
public SDVariable setDiag(String name, SDVariable in, SDVariable diag) { SDVariable ret = f().setDiag(in, diag); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "setDiag", "(", "String", "name", ",", "SDVariable", "in", ",", "SDVariable", "diag", ")", "{", "SDVariable", "ret", "=", "f", "(", ")", ".", "setDiag", "(", "in", ",", "diag", ")", ";", "return", "updateVariableNameAndReference", "...
Set the diagonal value to the specified values<br> If input is<br> [ a, b, c]<br> [ d, e, f]<br> [ g, h, i]<br> and diag = [ 1, 2, 3] then output is<br> [ 1, b, c]<br> [ d, 2, f]<br> [ g, h, 3]<br> @param name Name of the output variable @param in Input variable @param diag Diagonal @return Output variable
[ "Set", "the", "diagonal", "value", "to", "the", "specified", "values<br", ">", "If", "input", "is<br", ">", "[", "a", "b", "c", "]", "<br", ">", "[", "d", "e", "f", "]", "<br", ">", "[", "g", "h", "i", "]", "<br", ">", "and", "diag", "=", "["...
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#L2073-L2076
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java
PageFlowActionServlet.addServletMapping
public void addServletMapping( String servletName, String urlPattern ) { """ Struts keeps track of the action servlet URL pattern (e.g., *.do) so it can construct action URIs. We want to prevent it from noticing *.jpf so it doesn't use that to construct the URIs. @exclude """ if ( ! urlPattern.end...
java
public void addServletMapping( String servletName, String urlPattern ) { if ( ! urlPattern.endsWith( PageFlowConstants.PAGEFLOW_EXTENSION ) ) { super.addServletMapping( servletName, urlPattern ); } }
[ "public", "void", "addServletMapping", "(", "String", "servletName", ",", "String", "urlPattern", ")", "{", "if", "(", "!", "urlPattern", ".", "endsWith", "(", "PageFlowConstants", ".", "PAGEFLOW_EXTENSION", ")", ")", "{", "super", ".", "addServletMapping", "(",...
Struts keeps track of the action servlet URL pattern (e.g., *.do) so it can construct action URIs. We want to prevent it from noticing *.jpf so it doesn't use that to construct the URIs. @exclude
[ "Struts", "keeps", "track", "of", "the", "action", "servlet", "URL", "pattern", "(", "e", ".", "g", ".", "*", ".", "do", ")", "so", "it", "can", "construct", "action", "URIs", ".", "We", "want", "to", "prevent", "it", "from", "noticing", "*", ".", ...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java#L181-L187
Labs64/swid-generator
src/main/java/com/labs64/utils/swid/processor/ExtendedSwidProcessor.java
ExtendedSwidProcessor.setProductId
public ExtendedSwidProcessor setProductId(final String... productIdList) { """ Defines product identifiers (tag: product_id). @param productIdList product identifiers @return a reference to this object. """ if (productIdList.length > 0) { for (String productId : productIdList) { ...
java
public ExtendedSwidProcessor setProductId(final String... productIdList) { if (productIdList.length > 0) { for (String productId : productIdList) { swidTag.getProductId().add(new Token(productId, idGenerator.nextId())); } } return this; }
[ "public", "ExtendedSwidProcessor", "setProductId", "(", "final", "String", "...", "productIdList", ")", "{", "if", "(", "productIdList", ".", "length", ">", "0", ")", "{", "for", "(", "String", "productId", ":", "productIdList", ")", "{", "swidTag", ".", "ge...
Defines product identifiers (tag: product_id). @param productIdList product identifiers @return a reference to this object.
[ "Defines", "product", "identifiers", "(", "tag", ":", "product_id", ")", "." ]
train
https://github.com/Labs64/swid-generator/blob/cf78d2469469a09701bce7c5f966ac6de2b7c613/src/main/java/com/labs64/utils/swid/processor/ExtendedSwidProcessor.java#L113-L120
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java
CheckedMemorySegment.putBoolean
public final CheckedMemorySegment putBoolean(int index, boolean value) { """ Writes one byte containing the byte value into this buffer at the given position. @param position The position at which the memory will be written. @param value The char value to be written. @return This view itself. @throws Inde...
java
public final CheckedMemorySegment putBoolean(int index, boolean value) { if (index >= 0 && index < this.size) { this.memory[this.offset + index] = (byte) (value ? 1 : 0); return this; } else { throw new IndexOutOfBoundsException(); } }
[ "public", "final", "CheckedMemorySegment", "putBoolean", "(", "int", "index", ",", "boolean", "value", ")", "{", "if", "(", "index", ">=", "0", "&&", "index", "<", "this", ".", "size", ")", "{", "this", ".", "memory", "[", "this", ".", "offset", "+", ...
Writes one byte containing the byte value into this buffer at the given position. @param position The position at which the memory will be written. @param value The char value to be written. @return This view itself. @throws IndexOutOfBoundsException Thrown, if the index is negative, or larger then the segment size m...
[ "Writes", "one", "byte", "containing", "the", "byte", "value", "into", "this", "buffer", "at", "the", "given", "position", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/services/memorymanager/CheckedMemorySegment.java#L347-L354
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/WebhooksInner.java
WebhooksInner.createAsync
public Observable<WebhookInner> createAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { """ Creates a webhook for a container registry with the specified parameters. @param resourceGroupName The name of the resource group to which the con...
java
public Observable<WebhookInner> createAsync(String resourceGroupName, String registryName, String webhookName, WebhookCreateParameters webhookCreateParameters) { return createWithServiceResponseAsync(resourceGroupName, registryName, webhookName, webhookCreateParameters).map(new Func1<ServiceResponse<WebhookInne...
[ "public", "Observable", "<", "WebhookInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "webhookName", ",", "WebhookCreateParameters", "webhookCreateParameters", ")", "{", "return", "createWithServiceResponseAsync",...
Creates a webhook for a container registry with the specified parameters. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param webhookName The name of the webhook. @param webhookCreateParameters The parameters fo...
[ "Creates", "a", "webhook", "for", "a", "container", "registry", "with", "the", "specified", "parameters", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/WebhooksInner.java#L254-L261
ingwarsw/arquillian-suite-extension
src/main/java/org/eu/ingwar/tools/arquillian/extension/deployment/EarGenericBuilder.java
EarGenericBuilder.addMainModule
private static void addMainModule(EnterpriseArchive ear, ModuleType type, Archive<?> module, EarDescriptorBuilder descriptorBuilder) { """ Dodaje główny moduł do archiwum EAR. @param ear archiwum EAR @param type typ głównego modułu @param module główny moduł @param descriptorBuilder deskreptor builder dla EA...
java
private static void addMainModule(EnterpriseArchive ear, ModuleType type, Archive<?> module, EarDescriptorBuilder descriptorBuilder) { if (type.isModule()) { ear.addAsModule(module); if (type == ModuleType.EJB) { descriptorBuilder.addEjb(module.getName()); } ...
[ "private", "static", "void", "addMainModule", "(", "EnterpriseArchive", "ear", ",", "ModuleType", "type", ",", "Archive", "<", "?", ">", "module", ",", "EarDescriptorBuilder", "descriptorBuilder", ")", "{", "if", "(", "type", ".", "isModule", "(", ")", ")", ...
Dodaje główny moduł do archiwum EAR. @param ear archiwum EAR @param type typ głównego modułu @param module główny moduł @param descriptorBuilder deskreptor builder dla EAR'a
[ "Dodaje", "główny", "moduł", "do", "archiwum", "EAR", "." ]
train
https://github.com/ingwarsw/arquillian-suite-extension/blob/93c9e542ead1d52f45e87b0632bb02ac11f693c8/src/main/java/org/eu/ingwar/tools/arquillian/extension/deployment/EarGenericBuilder.java#L213-L225
alkacon/opencms-core
src/org/opencms/jsp/util/CmsJspStandardContextBean.java
CmsJspStandardContextBean.getReadResourceCategories
public Map<String, CmsJspCategoryAccessBean> getReadResourceCategories() { """ Reads the categories assigned to a resource. @return map from the resource path (root path) to the assigned categories """ if (null == m_resourceCategories) { m_resourceCategories = CmsCollectionsGenericWrapp...
java
public Map<String, CmsJspCategoryAccessBean> getReadResourceCategories() { if (null == m_resourceCategories) { m_resourceCategories = CmsCollectionsGenericWrapper.createLazyMap(new Transformer() { public Object transform(Object resourceName) { try { ...
[ "public", "Map", "<", "String", ",", "CmsJspCategoryAccessBean", ">", "getReadResourceCategories", "(", ")", "{", "if", "(", "null", "==", "m_resourceCategories", ")", "{", "m_resourceCategories", "=", "CmsCollectionsGenericWrapper", ".", "createLazyMap", "(", "new", ...
Reads the categories assigned to a resource. @return map from the resource path (root path) to the assigned categories
[ "Reads", "the", "categories", "assigned", "to", "a", "resource", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/util/CmsJspStandardContextBean.java#L1528-L1547
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java
VelocityUtil.toWriter
public static void toWriter(VelocityEngine ve, String templateFileName, VelocityContext context, Writer writer) { """ 生成内容写入流<br> 会自动关闭Writer @param ve 引擎 @param templateFileName 模板文件名 @param context 上下文 @param writer 流 """ final Template template = ve.getTemplate(templateFileName); merge(template...
java
public static void toWriter(VelocityEngine ve, String templateFileName, VelocityContext context, Writer writer) { final Template template = ve.getTemplate(templateFileName); merge(template, context, writer); }
[ "public", "static", "void", "toWriter", "(", "VelocityEngine", "ve", ",", "String", "templateFileName", ",", "VelocityContext", "context", ",", "Writer", "writer", ")", "{", "final", "Template", "template", "=", "ve", ".", "getTemplate", "(", "templateFileName", ...
生成内容写入流<br> 会自动关闭Writer @param ve 引擎 @param templateFileName 模板文件名 @param context 上下文 @param writer 流
[ "生成内容写入流<br", ">", "会自动关闭Writer" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/template/engine/velocity/VelocityUtil.java#L186-L189
mozilla/rhino
src/org/mozilla/javascript/ScriptRuntime.java
ScriptRuntime.jsDelegatesTo
public static boolean jsDelegatesTo(Scriptable lhs, Scriptable rhs) { """ Delegates to @return true iff rhs appears in lhs' proto chain """ Scriptable proto = lhs.getPrototype(); while (proto != null) { if (proto.equals(rhs)) return true; proto = proto.getPrototype()...
java
public static boolean jsDelegatesTo(Scriptable lhs, Scriptable rhs) { Scriptable proto = lhs.getPrototype(); while (proto != null) { if (proto.equals(rhs)) return true; proto = proto.getPrototype(); } return false; }
[ "public", "static", "boolean", "jsDelegatesTo", "(", "Scriptable", "lhs", ",", "Scriptable", "rhs", ")", "{", "Scriptable", "proto", "=", "lhs", ".", "getPrototype", "(", ")", ";", "while", "(", "proto", "!=", "null", ")", "{", "if", "(", "proto", ".", ...
Delegates to @return true iff rhs appears in lhs' proto chain
[ "Delegates", "to" ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptRuntime.java#L3422-L3431
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorableDroppedDatabasesInner.java
RestorableDroppedDatabasesInner.getAsync
public Observable<RestorableDroppedDatabaseInner> getAsync(String resourceGroupName, String serverName, String restorableDroppededDatabaseId) { """ Gets a deleted database that can be restored. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the...
java
public Observable<RestorableDroppedDatabaseInner> getAsync(String resourceGroupName, String serverName, String restorableDroppededDatabaseId) { return getWithServiceResponseAsync(resourceGroupName, serverName, restorableDroppededDatabaseId).map(new Func1<ServiceResponse<RestorableDroppedDatabaseInner>, Restorab...
[ "public", "Observable", "<", "RestorableDroppedDatabaseInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "restorableDroppededDatabaseId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",",...
Gets a deleted database that can be restored. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param restorableDroppededDatabaseId The id of the deleted database in...
[ "Gets", "a", "deleted", "database", "that", "can", "be", "restored", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorableDroppedDatabasesInner.java#L103-L110
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
FSNamesystem.addToInvalidates
private void addToInvalidates(Block b, boolean ackRequired) { """ Adds block to list of blocks which will be invalidated on all its datanodes. """ StringBuilder sb = new StringBuilder(); for (Iterator<DatanodeDescriptor> it = blocksMap.nodeIterator(b); it.hasNext();) { DatanodeDescriptor n...
java
private void addToInvalidates(Block b, boolean ackRequired) { StringBuilder sb = new StringBuilder(); for (Iterator<DatanodeDescriptor> it = blocksMap.nodeIterator(b); it.hasNext();) { DatanodeDescriptor node = it.next(); addToInvalidatesNoLog(b, node, ackRequired); sb.append(node.getNam...
[ "private", "void", "addToInvalidates", "(", "Block", "b", ",", "boolean", "ackRequired", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Iterator", "<", "DatanodeDescriptor", ">", "it", "=", "blocksMap", ".", "nodeIt...
Adds block to list of blocks which will be invalidated on all its datanodes.
[ "Adds", "block", "to", "list", "of", "blocks", "which", "will", "be", "invalidated", "on", "all", "its", "datanodes", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L3441-L3455
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLAttributeList.java
XMLAttributeList.addOptionalAttribute
public XMLAttributeList addOptionalAttribute(@Nonnull String name, @CheckForNull String value) { """ Add a single attribute name and value. @param name the attribute name @param value the attribute value @return this object (so calls to addAttribute() can be chained) """ if (value == null) { ...
java
public XMLAttributeList addOptionalAttribute(@Nonnull String name, @CheckForNull String value) { if (value == null) { return this; } return addAttribute(name, value); }
[ "public", "XMLAttributeList", "addOptionalAttribute", "(", "@", "Nonnull", "String", "name", ",", "@", "CheckForNull", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "return", "this", ";", "}", "return", "addAttribute", "(", "name",...
Add a single attribute name and value. @param name the attribute name @param value the attribute value @return this object (so calls to addAttribute() can be chained)
[ "Add", "a", "single", "attribute", "name", "and", "value", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLAttributeList.java#L95-L100
Qkyrie/Markdown2Pdf
src/main/java/com/qkyrie/markdown2pdf/internal/converting/HtmlCleaner.java
HtmlCleaner.cleanWithOutputEncoding
public String cleanWithOutputEncoding(String input, String outputEncoding) throws ConversionException { """ Clean-up HTML code with specified output encoding, asumes UTF-8 as input encoding. @param input @param outputEncoding @return @throws ConversionException """ return clean(input, null, outputEnc...
java
public String cleanWithOutputEncoding(String input, String outputEncoding) throws ConversionException { return clean(input, null, outputEncoding); }
[ "public", "String", "cleanWithOutputEncoding", "(", "String", "input", ",", "String", "outputEncoding", ")", "throws", "ConversionException", "{", "return", "clean", "(", "input", ",", "null", ",", "outputEncoding", ")", ";", "}" ]
Clean-up HTML code with specified output encoding, asumes UTF-8 as input encoding. @param input @param outputEncoding @return @throws ConversionException
[ "Clean", "-", "up", "HTML", "code", "with", "specified", "output", "encoding", "asumes", "UTF", "-", "8", "as", "input", "encoding", "." ]
train
https://github.com/Qkyrie/Markdown2Pdf/blob/f89167ddcfad96c64b3371a6dfb1cd11c5bb1b5a/src/main/java/com/qkyrie/markdown2pdf/internal/converting/HtmlCleaner.java#L38-L40
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java
StringUtils.checkSize
public static String checkSize(Object value, int limitSize, String defaultValue) { """ limit string size. @param value the value @param limitSize the limit size @param defaultValue the default value @return the string """ if (value != null) { if (byte[].class.getSimpleName().equals(value.getClass()....
java
public static String checkSize(Object value, int limitSize, String defaultValue) { if (value != null) { if (byte[].class.getSimpleName().equals(value.getClass().getSimpleName())) { return checkSize((byte[]) value, limitSize/2); } String str = value.toString(); if (str.length() > limitSize) { retu...
[ "public", "static", "String", "checkSize", "(", "Object", "value", ",", "int", "limitSize", ",", "String", "defaultValue", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "if", "(", "byte", "[", "]", ".", "class", ".", "getSimpleName", "(", ")", ...
limit string size. @param value the value @param limitSize the limit size @param defaultValue the default value @return the string
[ "limit", "string", "size", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java#L76-L90
google/closure-compiler
src/com/google/javascript/jscomp/TypeCheck.java
TypeCheck.getPropertyTypeIfDeclared
private JSType getPropertyTypeIfDeclared(@Nullable ObjectType objectType, String propertyName) { """ Returns the type of the property with the given name if declared. Otherwise returns unknown. """ if (objectType != null && objectType.hasProperty(propertyName) && !objectType.isPropertyTypeI...
java
private JSType getPropertyTypeIfDeclared(@Nullable ObjectType objectType, String propertyName) { if (objectType != null && objectType.hasProperty(propertyName) && !objectType.isPropertyTypeInferred(propertyName)) { return objectType.getPropertyType(propertyName); } return getNativeType...
[ "private", "JSType", "getPropertyTypeIfDeclared", "(", "@", "Nullable", "ObjectType", "objectType", ",", "String", "propertyName", ")", "{", "if", "(", "objectType", "!=", "null", "&&", "objectType", ".", "hasProperty", "(", "propertyName", ")", "&&", "!", "obje...
Returns the type of the property with the given name if declared. Otherwise returns unknown.
[ "Returns", "the", "type", "of", "the", "property", "with", "the", "given", "name", "if", "declared", ".", "Otherwise", "returns", "unknown", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeCheck.java#L2998-L3005
stapler/stapler
core/src/main/java/org/kohsuke/stapler/AttributeKey.java
AttributeKey.appScoped
public static <T> AttributeKey<T> appScoped() { """ Creates a new {@link ServletContext}-scoped {@link AttributeKey}. """ return new AttributeKey<T>() { public T get(HttpServletRequest req) { return (T) getContext(req).getAttribute(name); } public vo...
java
public static <T> AttributeKey<T> appScoped() { return new AttributeKey<T>() { public T get(HttpServletRequest req) { return (T) getContext(req).getAttribute(name); } public void set(HttpServletRequest req, T value) { getContext(req).setAttrib...
[ "public", "static", "<", "T", ">", "AttributeKey", "<", "T", ">", "appScoped", "(", ")", "{", "return", "new", "AttributeKey", "<", "T", ">", "(", ")", "{", "public", "T", "get", "(", "HttpServletRequest", "req", ")", "{", "return", "(", "T", ")", ...
Creates a new {@link ServletContext}-scoped {@link AttributeKey}.
[ "Creates", "a", "new", "{" ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/AttributeKey.java#L98-L116
facebookarchive/hadoop-20
src/contrib/benchmark/src/java/org/apache/hadoop/mapred/GenWriterThread.java
GenWriterThread.writeChecksumFile
private Path writeChecksumFile(FileSystem fs, String name, GenThread[] threads) throws IOException { """ Each mapper will write one checksum file. checksum file contains N pairs where N is the number of threads Each pair is has two entries: outputPath and checksum outputPath is the directory of files w...
java
private Path writeChecksumFile(FileSystem fs, String name, GenThread[] threads) throws IOException { Path checksumFile = new Path(rtc.output_dir, name + ".checksum"); SequenceFile.Writer write = null; write = SequenceFile.createWriter(fs, fs.getConf(), checksumFile, Text.class, Text...
[ "private", "Path", "writeChecksumFile", "(", "FileSystem", "fs", ",", "String", "name", ",", "GenThread", "[", "]", "threads", ")", "throws", "IOException", "{", "Path", "checksumFile", "=", "new", "Path", "(", "rtc", ".", "output_dir", ",", "name", "+", "...
Each mapper will write one checksum file. checksum file contains N pairs where N is the number of threads Each pair is has two entries: outputPath and checksum outputPath is the directory of files written by the thread checksum is the CRC checksum of all files under that directory @param name checksum file name @param ...
[ "Each", "mapper", "will", "write", "one", "checksum", "file", ".", "checksum", "file", "contains", "N", "pairs", "where", "N", "is", "the", "number", "of", "threads", "Each", "pair", "is", "has", "two", "entries", ":", "outputPath", "and", "checksum", "out...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/benchmark/src/java/org/apache/hadoop/mapred/GenWriterThread.java#L237-L255
lessthanoptimal/BoofCV
main/boofcv-learning/src/main/java/boofcv/alg/bow/LearnSceneFromFiles.java
LearnSceneFromFiles.evaluate
protected Confusion evaluate( Map<String,List<String>> set ) { """ Given a set of images with known classification, predict which scene each one belongs in and compute a confusion matrix for the results. @param set Set of classified images @return Confusion matrix """ ClassificationHistogram histogram =...
java
protected Confusion evaluate( Map<String,List<String>> set ) { ClassificationHistogram histogram = new ClassificationHistogram(scenes.size()); int total = 0; for (int i = 0; i < scenes.size(); i++) { total += set.get(scenes.get(i)).size(); } System.out.println("total images "+total); for (int i = 0; i ...
[ "protected", "Confusion", "evaluate", "(", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "set", ")", "{", "ClassificationHistogram", "histogram", "=", "new", "ClassificationHistogram", "(", "scenes", ".", "size", "(", ")", ")", ";", "int", "t...
Given a set of images with known classification, predict which scene each one belongs in and compute a confusion matrix for the results. @param set Set of classified images @return Confusion matrix
[ "Given", "a", "set", "of", "images", "with", "known", "classification", "predict", "which", "scene", "each", "one", "belongs", "in", "and", "compute", "a", "confusion", "matrix", "for", "the", "results", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-learning/src/main/java/boofcv/alg/bow/LearnSceneFromFiles.java#L65-L86
rterp/GMapsFX
GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptRuntime.java
JavascriptRuntime.getArrayFunction
@Override public String getArrayFunction(String function, Object[] ary) { """ Gets an array function as a String, which then can be passed to the execute() method. @param function The function to invoke @param ary The array of arguments to pass to the function. @return A string which can be passed to the...
java
@Override public String getArrayFunction(String function, Object[] ary) { if (ary == null || ary.length == 0) { return function + "([]);"; } StringBuilder sb = new StringBuilder(); sb.append(function).append("(["); for (Object arg : ary) { if (arg inst...
[ "@", "Override", "public", "String", "getArrayFunction", "(", "String", "function", ",", "Object", "[", "]", "ary", ")", "{", "if", "(", "ary", "==", "null", "||", "ary", ".", "length", "==", "0", ")", "{", "return", "function", "+", "\"([]);\"", ";", ...
Gets an array function as a String, which then can be passed to the execute() method. @param function The function to invoke @param ary The array of arguments to pass to the function. @return A string which can be passed to the JavaScript environment to invoke the function
[ "Gets", "an", "array", "function", "as", "a", "String", "which", "then", "can", "be", "passed", "to", "the", "execute", "()", "method", "." ]
train
https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptRuntime.java#L147-L164
codeprimate-software/cp-elements
src/main/java/org/cp/elements/tools/net/support/AbstractClientServerSupport.java
AbstractClientServerSupport.newServerSocket
public ServerSocket newServerSocket(int port) { """ Constructs and configures a new {@link ServerSocket}. @param port {@link Integer} value indicating the port number to which the {@link ServerSocket} is bound listening for client connections. @return a new {@link ServerSocket}. @throws RuntimeException if t...
java
public ServerSocket newServerSocket(int port) { try { ServerSocket serverSocket = newServerSocket(); serverSocket.setReuseAddress(DEFAULT_REUSE_ADDRESS); serverSocket.bind(newSocketAddress(port)); return serverSocket; } catch (IOException cause) { throw newRuntimeException(caus...
[ "public", "ServerSocket", "newServerSocket", "(", "int", "port", ")", "{", "try", "{", "ServerSocket", "serverSocket", "=", "newServerSocket", "(", ")", ";", "serverSocket", ".", "setReuseAddress", "(", "DEFAULT_REUSE_ADDRESS", ")", ";", "serverSocket", ".", "bind...
Constructs and configures a new {@link ServerSocket}. @param port {@link Integer} value indicating the port number to which the {@link ServerSocket} is bound listening for client connections. @return a new {@link ServerSocket}. @throws RuntimeException if the {@link ServerSocket} could not be created. @see java.net.Se...
[ "Constructs", "and", "configures", "a", "new", "{", "@link", "ServerSocket", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/tools/net/support/AbstractClientServerSupport.java#L119-L129
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java
VMath.almostEquals
public static boolean almostEquals(final double[] m1, final double[] m2, final double maxdelta) { """ Compare two matrices with a delta parameter to take numerical errors into account. @param m1 Input matrix @param m2 other matrix to compare with @param maxdelta maximum delta allowed @return true if delta s...
java
public static boolean almostEquals(final double[] m1, final double[] m2, final double maxdelta) { if(m1 == m2) { return true; } if(m1 == null || m2 == null) { return false; } final int rowdim = m1.length; if(rowdim != m2.length) { return false; } for(int i = 0; i < rowd...
[ "public", "static", "boolean", "almostEquals", "(", "final", "double", "[", "]", "m1", ",", "final", "double", "[", "]", "m2", ",", "final", "double", "maxdelta", ")", "{", "if", "(", "m1", "==", "m2", ")", "{", "return", "true", ";", "}", "if", "(...
Compare two matrices with a delta parameter to take numerical errors into account. @param m1 Input matrix @param m2 other matrix to compare with @param maxdelta maximum delta allowed @return true if delta smaller than maximum
[ "Compare", "two", "matrices", "with", "a", "delta", "parameter", "to", "take", "numerical", "errors", "into", "account", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java#L1771-L1788
shrinkwrap/resolver
spi/src/main/java/org/jboss/shrinkwrap/resolver/spi/loader/SpiServiceLoader.java
SpiServiceLoader.createInstance
private <T> T createInstance(final Class<T> implClass) { """ Create a new instance of the found Service. <br/> Verifies that the found ServiceImpl implements Service. @param <T> @param serviceType The Service interface @param className The name of the implementation class @param loader The ClassLoader to ...
java
private <T> T createInstance(final Class<T> implClass) { { // Get the constructor to use in making the new instance final Constructor<? extends T> ctor; try { ctor = SecurityActions.getConstructor(implClass, new Class<?>[] {}); } catch (final NoSuc...
[ "private", "<", "T", ">", "T", "createInstance", "(", "final", "Class", "<", "T", ">", "implClass", ")", "{", "{", "// Get the constructor to use in making the new instance", "final", "Constructor", "<", "?", "extends", "T", ">", "ctor", ";", "try", "{", "ctor...
Create a new instance of the found Service. <br/> Verifies that the found ServiceImpl implements Service. @param <T> @param serviceType The Service interface @param className The name of the implementation class @param loader The ClassLoader to load the ServiceImpl from @return A new instance of the ServiceImpl @thro...
[ "Create", "a", "new", "instance", "of", "the", "found", "Service", ".", "<br", "/", ">" ]
train
https://github.com/shrinkwrap/resolver/blob/e881a84b8cff5b0a014f2a5ebf612be3eb9db01f/spi/src/main/java/org/jboss/shrinkwrap/resolver/spi/loader/SpiServiceLoader.java#L234-L258
mockito/mockito
src/main/java/org/mockito/internal/invocation/InvocationsFinder.java
InvocationsFinder.findMatchingChunk
public static List<Invocation> findMatchingChunk(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context) { """ some examples how it works: Given invocations sequence: 1,1,2,1 if wanted is 1 and mode is times(2) then returns 1,1 if wanted is 1 and mode is atLeas...
java
public static List<Invocation> findMatchingChunk(List<Invocation> invocations, MatchableInvocation wanted, int wantedCount, InOrderContext context) { List<Invocation> unverified = removeVerifiedInOrder(invocations, context); List<Invocation> firstChunk = getFirstMatchingChunk(wanted, unverified); ...
[ "public", "static", "List", "<", "Invocation", ">", "findMatchingChunk", "(", "List", "<", "Invocation", ">", "invocations", ",", "MatchableInvocation", "wanted", ",", "int", "wantedCount", ",", "InOrderContext", "context", ")", "{", "List", "<", "Invocation", "...
some examples how it works: Given invocations sequence: 1,1,2,1 if wanted is 1 and mode is times(2) then returns 1,1 if wanted is 1 and mode is atLeast() then returns 1,1,1 if wanted is 1 and mode is times(x), where x != 2 then returns 1,1,1
[ "some", "examples", "how", "it", "works", ":" ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/invocation/InvocationsFinder.java#L47-L56
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/cdn/CdnClient.java
CdnClient.listDomains
public ListDomainsResponse listDomains(ListDomainsRequest request) { """ Returns a list of all CDN domains that the authenticated sender of the request owns. @param request The request containing all of the options related to the listing of domains. @return All of the CDN domains owned by the authenticated sen...
java
public ListDomainsResponse listDomains(ListDomainsRequest request) { checkNotNull(request, "The parameter request should NOT be null."); InternalRequest internalRequest = createRequest(request, HttpMethodName.GET, DOMAIN); return invokeHttpClient(internalRequest, ListDomainsResponse.class); ...
[ "public", "ListDomainsResponse", "listDomains", "(", "ListDomainsRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "InternalRequest", "internalRequest", "=", "createRequest", "(", "request", ",", ...
Returns a list of all CDN domains that the authenticated sender of the request owns. @param request The request containing all of the options related to the listing of domains. @return All of the CDN domains owned by the authenticated sender of the request.
[ "Returns", "a", "list", "of", "all", "CDN", "domains", "that", "the", "authenticated", "sender", "of", "the", "request", "owns", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/cdn/CdnClient.java#L269-L273
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readResource
protected CmsResource readResource(CmsDbContext dbc, String resourcePath, CmsResourceFilter filter) throws CmsException { """ Reads a resource from the OpenCms VFS, using the specified resource filter.<p> @param dbc the current database context @param resourcePath the name of the resource to read (full pat...
java
protected CmsResource readResource(CmsDbContext dbc, String resourcePath, CmsResourceFilter filter) throws CmsException { // read the resource from the VFS CmsResource resource = m_driverManager.readResource(dbc, resourcePath, filter); // check if the user has read access to the resource ...
[ "protected", "CmsResource", "readResource", "(", "CmsDbContext", "dbc", ",", "String", "resourcePath", ",", "CmsResourceFilter", "filter", ")", "throws", "CmsException", "{", "// read the resource from the VFS", "CmsResource", "resource", "=", "m_driverManager", ".", "rea...
Reads a resource from the OpenCms VFS, using the specified resource filter.<p> @param dbc the current database context @param resourcePath the name of the resource to read (full path) @param filter the resource filter to use while reading @return the resource that was read @throws CmsException if something goes wron...
[ "Reads", "a", "resource", "from", "the", "OpenCms", "VFS", "using", "the", "specified", "resource", "filter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L7477-L7488
sundrio/sundrio
codegen/src/main/java/io/sundr/codegen/utils/StringUtils.java
StringUtils.toPojoName
public static final String toPojoName(String name, String prefix, String suffix) { """ Converts a name of an interface or abstract class to Pojo name. Remove leading "I" and "Abstract" or trailing "Interface". @param name The name to convert. @param prefix The prefix to use if needed. @param suffix ...
java
public static final String toPojoName(String name, String prefix, String suffix) { LinkedList<String> parts = new LinkedList<>(Arrays.asList(name.split(SPLITTER_REGEX))); if (parts.isEmpty()) { return prefix + name + suffix; } if (parts.getFirst().equals("I")) { ...
[ "public", "static", "final", "String", "toPojoName", "(", "String", "name", ",", "String", "prefix", ",", "String", "suffix", ")", "{", "LinkedList", "<", "String", ">", "parts", "=", "new", "LinkedList", "<>", "(", "Arrays", ".", "asList", "(", "name", ...
Converts a name of an interface or abstract class to Pojo name. Remove leading "I" and "Abstract" or trailing "Interface". @param name The name to convert. @param prefix The prefix to use if needed. @param suffix The suffix to user if needed. @return The converted name, if a conversion actually happ...
[ "Converts", "a", "name", "of", "an", "interface", "or", "abstract", "class", "to", "Pojo", "name", ".", "Remove", "leading", "I", "and", "Abstract", "or", "trailing", "Interface", "." ]
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/codegen/src/main/java/io/sundr/codegen/utils/StringUtils.java#L249-L273
keenlabs/KeenClient-Java
core/src/main/java/io/keen/client/java/KeenClient.java
KeenClient.queueEvent
public void queueEvent(String eventCollection, Map<String, Object> event) { """ Queues an event in the default project with default Keen properties and no callbacks. @see #queueEvent(KeenProject, String, java.util.Map, java.util.Map, KeenCallback) @param eventCollection The name of the collection in which to p...
java
public void queueEvent(String eventCollection, Map<String, Object> event) { queueEvent(eventCollection, event, null); }
[ "public", "void", "queueEvent", "(", "String", "eventCollection", ",", "Map", "<", "String", ",", "Object", ">", "event", ")", "{", "queueEvent", "(", "eventCollection", ",", "event", ",", "null", ")", ";", "}" ]
Queues an event in the default project with default Keen properties and no callbacks. @see #queueEvent(KeenProject, String, java.util.Map, java.util.Map, KeenCallback) @param eventCollection The name of the collection in which to publish the event. @param event A Map that consists of key/value pairs. Keen na...
[ "Queues", "an", "event", "in", "the", "default", "project", "with", "default", "Keen", "properties", "and", "no", "callbacks", "." ]
train
https://github.com/keenlabs/KeenClient-Java/blob/2ea021547b5338257c951a2596bd49749038d018/core/src/main/java/io/keen/client/java/KeenClient.java#L262-L264
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/OneStepIterator.java
OneStepIterator.setRoot
public void setRoot(int context, Object environment) { """ Initialize the context values for this expression after it is cloned. @param context The XPath runtime context for this transformation. """ super.setRoot(context, environment); if(m_axis > -1) m_iterator = m_cdtm.getAxisIterator(m_ax...
java
public void setRoot(int context, Object environment) { super.setRoot(context, environment); if(m_axis > -1) m_iterator = m_cdtm.getAxisIterator(m_axis); m_iterator.setStartNode(m_context); }
[ "public", "void", "setRoot", "(", "int", "context", ",", "Object", "environment", ")", "{", "super", ".", "setRoot", "(", "context", ",", "environment", ")", ";", "if", "(", "m_axis", ">", "-", "1", ")", "m_iterator", "=", "m_cdtm", ".", "getAxisIterator...
Initialize the context values for this expression after it is cloned. @param context The XPath runtime context for this transformation.
[ "Initialize", "the", "context", "values", "for", "this", "expression", "after", "it", "is", "cloned", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/OneStepIterator.java#L93-L99
Azure/autorest-clientruntime-for-java
azure-client-runtime/src/main/java/com/microsoft/azure/AzureClient.java
AzureClient.pollPutOrPatchSingleAsync
private <T> Single<PollingState<T>> pollPutOrPatchSingleAsync(final PollingState<T> pollingState, final Type resourceType) { """ Given a polling state representing state of a PUT or PATCH operation, this method returns {@link Single} object, when subscribed to it, a single poll will be performed and emits the lat...
java
private <T> Single<PollingState<T>> pollPutOrPatchSingleAsync(final PollingState<T> pollingState, final Type resourceType) { pollingState.withResourceType(resourceType); pollingState.withSerializerAdapter(restClient().serializerAdapter()); if (pollingState.isStatusTerminal()) { if (p...
[ "private", "<", "T", ">", "Single", "<", "PollingState", "<", "T", ">", ">", "pollPutOrPatchSingleAsync", "(", "final", "PollingState", "<", "T", ">", "pollingState", ",", "final", "Type", "resourceType", ")", "{", "pollingState", ".", "withResourceType", "(",...
Given a polling state representing state of a PUT or PATCH operation, this method returns {@link Single} object, when subscribed to it, a single poll will be performed and emits the latest polling state. A poll will be performed only if the current polling state is not in terminal state. Note: this method does not imp...
[ "Given", "a", "polling", "state", "representing", "state", "of", "a", "PUT", "or", "PATCH", "operation", "this", "method", "returns", "{", "@link", "Single", "}", "object", "when", "subscribed", "to", "it", "a", "single", "poll", "will", "be", "performed", ...
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/azure-client-runtime/src/main/java/com/microsoft/azure/AzureClient.java#L190-L217
soi-toolkit/soi-toolkit-mule
commons/components/module-logger/src/main/java/org/soitoolkit/commons/module/logger/SoitoolkitLoggerModule.java
SoitoolkitLoggerModule.logInfo
@Processor public Object logInfo( String message, @Optional String integrationScenario, @Optional String contractId, @Optional String correlationId, @Optional Map<String, String> extra) { """ Log processor for level INFO {@sample.xml ../../../doc/SoitoolkitLogger-connector.xml.sa...
java
@Processor public Object logInfo( String message, @Optional String integrationScenario, @Optional String contractId, @Optional String correlationId, @Optional Map<String, String> extra) { return doLog(LogLevelType.INFO, message, integrationScenario, contractId, correlationId, extra...
[ "@", "Processor", "public", "Object", "logInfo", "(", "String", "message", ",", "@", "Optional", "String", "integrationScenario", ",", "@", "Optional", "String", "contractId", ",", "@", "Optional", "String", "correlationId", ",", "@", "Optional", "Map", "<", "...
Log processor for level INFO {@sample.xml ../../../doc/SoitoolkitLogger-connector.xml.sample soitoolkitlogger:log} @param message Log-message to be processed @param integrationScenario Optional name of the integration scenario or business process @param contractId Optional name of the contract in use @param correlati...
[ "Log", "processor", "for", "level", "INFO" ]
train
https://github.com/soi-toolkit/soi-toolkit-mule/blob/e891350dbf55e6307be94d193d056bdb785b37d3/commons/components/module-logger/src/main/java/org/soitoolkit/commons/module/logger/SoitoolkitLoggerModule.java#L144-L153
OpenLiberty/open-liberty
dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThreadPoolController.java
ThreadPoolController.getSmallestValidPoolSize
private Integer getSmallestValidPoolSize(Integer poolSize, Double forecast) { """ Returns the smallest valid poolSize in the current historical dataset. @param poolSize - current poolSize @param forecast - expected throughput at current poolSize @return - smallest valid poolSize found """ Integer ...
java
private Integer getSmallestValidPoolSize(Integer poolSize, Double forecast) { Integer smallestPoolSize = threadStats.firstKey(); Integer nextPoolSize = threadStats.higherKey(smallestPoolSize); Integer pruneSize = -1; boolean validSmallData = false; while (!validSmallData && nextP...
[ "private", "Integer", "getSmallestValidPoolSize", "(", "Integer", "poolSize", ",", "Double", "forecast", ")", "{", "Integer", "smallestPoolSize", "=", "threadStats", ".", "firstKey", "(", ")", ";", "Integer", "nextPoolSize", "=", "threadStats", ".", "higherKey", "...
Returns the smallest valid poolSize in the current historical dataset. @param poolSize - current poolSize @param forecast - expected throughput at current poolSize @return - smallest valid poolSize found
[ "Returns", "the", "smallest", "valid", "poolSize", "in", "the", "current", "historical", "dataset", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.threading/src/com/ibm/ws/threading/internal/ThreadPoolController.java#L1609-L1629
sagiegurari/fax4j
src/main/java/org/fax4j/spi/http/JSONHTTPResponseHandler.java
JSONHTTPResponseHandler.convertToObject
@Override protected JSONObject convertToObject(HTTPResponse httpResponse) { """ This function converts the HTTP response content to the specific object. @param httpResponse The HTTP response @return The object """ //get response text JSONObject jsonObject=null; String conten...
java
@Override protected JSONObject convertToObject(HTTPResponse httpResponse) { //get response text JSONObject jsonObject=null; String content=httpResponse.getContent(); if(content!=null) { try { //convert to JSON jsonOb...
[ "@", "Override", "protected", "JSONObject", "convertToObject", "(", "HTTPResponse", "httpResponse", ")", "{", "//get response text", "JSONObject", "jsonObject", "=", "null", ";", "String", "content", "=", "httpResponse", ".", "getContent", "(", ")", ";", "if", "("...
This function converts the HTTP response content to the specific object. @param httpResponse The HTTP response @return The object
[ "This", "function", "converts", "the", "HTTP", "response", "content", "to", "the", "specific", "object", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/http/JSONHTTPResponseHandler.java#L317-L337
Wikidata/Wikidata-Toolkit
wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/helpers/EntityDocumentBuilder.java
EntityDocumentBuilder.withDescription
public T withDescription(String text, String languageCode) { """ Adds an additional description to the constructed document. @param text the text of the description @param languageCode the language code of the description @return builder object to continue construction """ withDescription(factory.getM...
java
public T withDescription(String text, String languageCode) { withDescription(factory.getMonolingualTextValue(text, languageCode)); return getThis(); }
[ "public", "T", "withDescription", "(", "String", "text", ",", "String", "languageCode", ")", "{", "withDescription", "(", "factory", ".", "getMonolingualTextValue", "(", "text", ",", "languageCode", ")", ")", ";", "return", "getThis", "(", ")", ";", "}" ]
Adds an additional description to the constructed document. @param text the text of the description @param languageCode the language code of the description @return builder object to continue construction
[ "Adds", "an", "additional", "description", "to", "the", "constructed", "document", "." ]
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/helpers/EntityDocumentBuilder.java#L149-L152
twilio/twilio-java
src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java
TaskQueueStatistics.fromJson
public static TaskQueueStatistics fromJson(final String json, final ObjectMapper objectMapper) { """ Converts a JSON String into a TaskQueueStatistics object using the provided ObjectMapper. @param json Raw JSON String @param objectMapper Jackson ObjectMapper @return TaskQueueStatistics object represented by...
java
public static TaskQueueStatistics fromJson(final String json, final ObjectMapper objectMapper) { // Convert all checked exceptions to Runtime try { return objectMapper.readValue(json, TaskQueueStatistics.class); } catch (final JsonMappingException | JsonParseException e) { ...
[ "public", "static", "TaskQueueStatistics", "fromJson", "(", "final", "String", "json", ",", "final", "ObjectMapper", "objectMapper", ")", "{", "// Convert all checked exceptions to Runtime", "try", "{", "return", "objectMapper", ".", "readValue", "(", "json", ",", "Ta...
Converts a JSON String into a TaskQueueStatistics object using the provided ObjectMapper. @param json Raw JSON String @param objectMapper Jackson ObjectMapper @return TaskQueueStatistics object represented by the provided JSON
[ "Converts", "a", "JSON", "String", "into", "a", "TaskQueueStatistics", "object", "using", "the", "provided", "ObjectMapper", "." ]
train
https://github.com/twilio/twilio-java/blob/0318974c0a6a152994af167d430255684d5e9b9f/src/main/java/com/twilio/rest/taskrouter/v1/workspace/taskqueue/TaskQueueStatistics.java#L58-L67
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/MediaApi.java
MediaApi.mediaStartMonitoring
public ApiSuccessResponse mediaStartMonitoring(String mediatype, MediaStartMonitoringData mediaStartMonitoringData) throws ApiException { """ Start monitoring an agent Start supervisor monitoring of an agent on the specified media channel. When a monitored agent accepts a chat, the supervisor also receives the ch...
java
public ApiSuccessResponse mediaStartMonitoring(String mediatype, MediaStartMonitoringData mediaStartMonitoringData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = mediaStartMonitoringWithHttpInfo(mediatype, mediaStartMonitoringData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "mediaStartMonitoring", "(", "String", "mediatype", ",", "MediaStartMonitoringData", "mediaStartMonitoringData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "mediaStartMonitoringWithHttpInfo", ...
Start monitoring an agent Start supervisor monitoring of an agent on the specified media channel. When a monitored agent accepts a chat, the supervisor also receives the chat and all related notifications. If the agent is currently in a chat, the supervisor is added to the agent&#39;s next chat. The supervisor can&#39;...
[ "Start", "monitoring", "an", "agent", "Start", "supervisor", "monitoring", "of", "an", "agent", "on", "the", "specified", "media", "channel", ".", "When", "a", "monitored", "agent", "accepts", "a", "chat", "the", "supervisor", "also", "receives", "the", "chat"...
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L2186-L2189
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_voicemail_serviceName_greetings_POST
public Long billingAccount_voicemail_serviceName_greetings_POST(String billingAccount, String serviceName, OvhVoicemailMessageFolderGreetingEnum dir, String documentId) throws IOException { """ Upload a new sound for a specific greeting. Return a task id. REST: POST /telephony/{billingAccount}/voicemail/{servic...
java
public Long billingAccount_voicemail_serviceName_greetings_POST(String billingAccount, String serviceName, OvhVoicemailMessageFolderGreetingEnum dir, String documentId) throws IOException { String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/greetings"; StringBuilder sb = path(qPath, billingAccount,...
[ "public", "Long", "billingAccount_voicemail_serviceName_greetings_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "OvhVoicemailMessageFolderGreetingEnum", "dir", ",", "String", "documentId", ")", "throws", "IOException", "{", "String", "qPath", "=...
Upload a new sound for a specific greeting. Return a task id. REST: POST /telephony/{billingAccount}/voicemail/{serviceName}/greetings @param dir [required] Greeting voicemail directory @param documentId [required] Get the /me/document uuid generated @param billingAccount [required] The name of your billingAccount @pa...
[ "Upload", "a", "new", "sound", "for", "a", "specific", "greeting", ".", "Return", "a", "task", "id", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7798-L7806
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Note.java
Note.createResponse
public Note createResponse(String name, String content, boolean personal) { """ Create a response to this note @param name The name of the note @param content The content of the note @param personal True if the note is only visible to the currently logged in user @return a new note """ return getI...
java
public Note createResponse(String name, String content, boolean personal) { return getInstance().create().note(this, name, content, personal); }
[ "public", "Note", "createResponse", "(", "String", "name", ",", "String", "content", ",", "boolean", "personal", ")", "{", "return", "getInstance", "(", ")", ".", "create", "(", ")", ".", "note", "(", "this", ",", "name", ",", "content", ",", "personal",...
Create a response to this note @param name The name of the note @param content The content of the note @param personal True if the note is only visible to the currently logged in user @return a new note
[ "Create", "a", "response", "to", "this", "note" ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Note.java#L122-L124
undertow-io/undertow
core/src/main/java/io/undertow/util/ETagUtils.java
ETagUtils.handleIfNoneMatch
public static boolean handleIfNoneMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak) { """ Handles the if-none-match header. returns true if the request should proceed, false otherwise @param exchange the exchange @param etags The etags @return """ return handle...
java
public static boolean handleIfNoneMatch(final HttpServerExchange exchange, final List<ETag> etags, boolean allowWeak) { return handleIfNoneMatch(exchange.getRequestHeaders().getFirst(Headers.IF_NONE_MATCH), etags, allowWeak); }
[ "public", "static", "boolean", "handleIfNoneMatch", "(", "final", "HttpServerExchange", "exchange", ",", "final", "List", "<", "ETag", ">", "etags", ",", "boolean", "allowWeak", ")", "{", "return", "handleIfNoneMatch", "(", "exchange", ".", "getRequestHeaders", "(...
Handles the if-none-match header. returns true if the request should proceed, false otherwise @param exchange the exchange @param etags The etags @return
[ "Handles", "the", "if", "-", "none", "-", "match", "header", ".", "returns", "true", "if", "the", "request", "should", "proceed", "false", "otherwise" ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/ETagUtils.java#L122-L124
jbundle/osgi
core/src/main/java/org/jbundle/util/osgi/finder/BaseClassFinderService.java
BaseClassFinderService.findResourceURL
public URL findResourceURL(String resourcePath, String versionRange) { """ Find, resolve, and return this resource's URL. @param resourcePath @return The class definition or null if not found. """ //if (ClassServiceBootstrap.repositoryAdmin == null) // return null; URL url = this....
java
public URL findResourceURL(String resourcePath, String versionRange) { //if (ClassServiceBootstrap.repositoryAdmin == null) // return null; URL url = this.getResourceFromBundle(null, resourcePath, versionRange); if (url == null) { Object resource = this.deployThisRes...
[ "public", "URL", "findResourceURL", "(", "String", "resourcePath", ",", "String", "versionRange", ")", "{", "//if (ClassServiceBootstrap.repositoryAdmin == null)", "// return null;", "URL", "url", "=", "this", ".", "getResourceFromBundle", "(", "null", ",", "resourcePa...
Find, resolve, and return this resource's URL. @param resourcePath @return The class definition or null if not found.
[ "Find", "resolve", "and", "return", "this", "resource", "s", "URL", "." ]
train
https://github.com/jbundle/osgi/blob/beb02aef78736a4f799aaac001c8f0327bf0536c/core/src/main/java/org/jbundle/util/osgi/finder/BaseClassFinderService.java#L114-L128
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java
Frame.getNumArguments
public int getNumArguments(InvokeInstruction ins, ConstantPoolGen cpg) { """ Get the number of arguments passed to given method invocation. @param ins the method invocation instruction @param cpg the ConstantPoolGen for the class containing the method @return number of arguments; note that this excludes the...
java
public int getNumArguments(InvokeInstruction ins, ConstantPoolGen cpg) { SignatureParser parser = new SignatureParser(ins.getSignature(cpg)); return parser.getNumParameters(); }
[ "public", "int", "getNumArguments", "(", "InvokeInstruction", "ins", ",", "ConstantPoolGen", "cpg", ")", "{", "SignatureParser", "parser", "=", "new", "SignatureParser", "(", "ins", ".", "getSignature", "(", "cpg", ")", ")", ";", "return", "parser", ".", "getN...
Get the number of arguments passed to given method invocation. @param ins the method invocation instruction @param cpg the ConstantPoolGen for the class containing the method @return number of arguments; note that this excludes the object instance for instance methods
[ "Get", "the", "number", "of", "arguments", "passed", "to", "given", "method", "invocation", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/Frame.java#L348-L351
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/super_src/org/opencms/relations/CmsCategory.java
CmsCategory.getCategoryPath
public static String getCategoryPath(String rootPath, String baseFolder) throws Exception { """ Returns the category path for the given root path.<p> @param rootPath the root path @param baseFolder the categories base folder name @return the category path @throws Exception if the root path does not match...
java
public static String getCategoryPath(String rootPath, String baseFolder) throws Exception { String base; if (rootPath.startsWith(CmsCategoryService.CENTRALIZED_REPOSITORY)) { base = CmsCategoryService.CENTRALIZED_REPOSITORY; } else { base = baseFolder; if (!b...
[ "public", "static", "String", "getCategoryPath", "(", "String", "rootPath", ",", "String", "baseFolder", ")", "throws", "Exception", "{", "String", "base", ";", "if", "(", "rootPath", ".", "startsWith", "(", "CmsCategoryService", ".", "CENTRALIZED_REPOSITORY", ")"...
Returns the category path for the given root path.<p> @param rootPath the root path @param baseFolder the categories base folder name @return the category path @throws Exception if the root path does not match the given base folder
[ "Returns", "the", "category", "path", "for", "the", "given", "root", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/super_src/org/opencms/relations/CmsCategory.java#L114-L134
deephacks/confit
provider-hbase/src/main/java/org/deephacks/confit/internal/hbase/HBaseBeanManager.java
HBaseBeanManager.createUids
public static UniqueIds createUids(Configuration conf) { """ Create the unique lookup tables. @param conf HBase configuration. @return a holder for sid and iid lookup. """ UniqueId usid = new UniqueId(SID_TABLE, SID_WIDTH, conf, true); UniqueId uiid = new UniqueId(IID_TABLE, IID_WIDTH, conf, ...
java
public static UniqueIds createUids(Configuration conf) { UniqueId usid = new UniqueId(SID_TABLE, SID_WIDTH, conf, true); UniqueId uiid = new UniqueId(IID_TABLE, IID_WIDTH, conf, true); UniqueId upid = new UniqueId(PID_TABLE, PID_WIDTH, conf, true); return new UniqueIds(uiid, usid, upid);...
[ "public", "static", "UniqueIds", "createUids", "(", "Configuration", "conf", ")", "{", "UniqueId", "usid", "=", "new", "UniqueId", "(", "SID_TABLE", ",", "SID_WIDTH", ",", "conf", ",", "true", ")", ";", "UniqueId", "uiid", "=", "new", "UniqueId", "(", "IID...
Create the unique lookup tables. @param conf HBase configuration. @return a holder for sid and iid lookup.
[ "Create", "the", "unique", "lookup", "tables", "." ]
train
https://github.com/deephacks/confit/blob/4e6d4ee5fed32cbc5104433e61de1bcf1b360832/provider-hbase/src/main/java/org/deephacks/confit/internal/hbase/HBaseBeanManager.java#L91-L96
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java
SchemaManager.getTable
public Table getTable(Session session, String name, String schema) { """ Returns the specified user-defined table or view visible within the context of the specified Session, or any system table of the given name. It excludes any temp tables created in other Sessions. Throws if the table does not exist in the c...
java
public Table getTable(Session session, String name, String schema) { Table t = null; if (schema == null) { t = findSessionTable(session, name, schema); } if (t == null) { schema = session.getSchemaName(schema); t = findUserTable(session, name, ...
[ "public", "Table", "getTable", "(", "Session", "session", ",", "String", "name", ",", "String", "schema", ")", "{", "Table", "t", "=", "null", ";", "if", "(", "schema", "==", "null", ")", "{", "t", "=", "findSessionTable", "(", "session", ",", "name", ...
Returns the specified user-defined table or view visible within the context of the specified Session, or any system table of the given name. It excludes any temp tables created in other Sessions. Throws if the table does not exist in the context.
[ "Returns", "the", "specified", "user", "-", "defined", "table", "or", "view", "visible", "within", "the", "context", "of", "the", "specified", "Session", "or", "any", "system", "table", "of", "the", "given", "name", ".", "It", "excludes", "any", "temp", "t...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/SchemaManager.java#L470-L495
fernandospr/javapns-jdk16
src/main/java/javapns/communication/KeystoreManager.java
KeystoreManager.verifyKeystoreContent
public static void verifyKeystoreContent(AppleServer server, Object keystore) throws KeystoreException { """ Perform basic tests on a keystore to detect common user mistakes. If a problem is found, a KeystoreException is thrown. If no problem is found, this method simply returns without exceptions. @param ser...
java
public static void verifyKeystoreContent(AppleServer server, Object keystore) throws KeystoreException { KeyStore keystoreToValidate = null; if (keystore instanceof KeyStore) keystoreToValidate = (KeyStore) keystore; else keystoreToValidate = loadKeystore(server, keystore); verifyKeystoreContent(keystoreToValid...
[ "public", "static", "void", "verifyKeystoreContent", "(", "AppleServer", "server", ",", "Object", "keystore", ")", "throws", "KeystoreException", "{", "KeyStore", "keystoreToValidate", "=", "null", ";", "if", "(", "keystore", "instanceof", "KeyStore", ")", "keystore...
Perform basic tests on a keystore to detect common user mistakes. If a problem is found, a KeystoreException is thrown. If no problem is found, this method simply returns without exceptions. @param server the server the keystore is intended for @param keystore a keystore containing your private key and the certificate...
[ "Perform", "basic", "tests", "on", "a", "keystore", "to", "detect", "common", "user", "mistakes", ".", "If", "a", "problem", "is", "found", "a", "KeystoreException", "is", "thrown", ".", "If", "no", "problem", "is", "found", "this", "method", "simply", "re...
train
https://github.com/fernandospr/javapns-jdk16/blob/84de6d9328ab01af92f77cc60c4554de02420909/src/main/java/javapns/communication/KeystoreManager.java#L101-L106
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/primitives/Ints.java
Ints.tryParse
@Beta @Nullable @CheckForNull public static Integer tryParse(String string, int radix) { """ Parses the specified string as a signed integer value using the specified radix. The ASCII character {@code '-'} (<code>'&#92;u002D'</code>) is recognized as the minus sign. <p>Unlike {@link Integer#parseInt(Stri...
java
@Beta @Nullable @CheckForNull public static Integer tryParse(String string, int radix) { Long result = Longs.tryParse(string, radix); if (result == null || result.longValue() != result.intValue()) { return null; } else { return result.intValue(); } }
[ "@", "Beta", "@", "Nullable", "@", "CheckForNull", "public", "static", "Integer", "tryParse", "(", "String", "string", ",", "int", "radix", ")", "{", "Long", "result", "=", "Longs", ".", "tryParse", "(", "string", ",", "radix", ")", ";", "if", "(", "re...
Parses the specified string as a signed integer value using the specified radix. The ASCII character {@code '-'} (<code>'&#92;u002D'</code>) is recognized as the minus sign. <p>Unlike {@link Integer#parseInt(String, int)}, this method returns {@code null} instead of throwing an exception if parsing fails. Additionally...
[ "Parses", "the", "specified", "string", "as", "a", "signed", "integer", "value", "using", "the", "specified", "radix", ".", "The", "ASCII", "character", "{", "@code", "-", "}", "(", "<code", ">", "&#92", ";", "u002D", "<", "/", "code", ">", ")", "is", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/primitives/Ints.java#L667-L677
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/StringHelper.java
StringHelper.convertStrToLong
public static long convertStrToLong( final String string, final long defaultValue ) { """ Convert a string to a long value. If an error occurs during the conversion, the default value is returned instead. Unlike the {@link Integer#parseInt(String)} method, this method will not throw an exception. @param str...
java
public static long convertStrToLong( final String string, final long defaultValue ) { if ( string == null ) { return defaultValue; } try { return Long.parseLong( string ); } catch ( Exception e ) { return defaultVal...
[ "public", "static", "long", "convertStrToLong", "(", "final", "String", "string", ",", "final", "long", "defaultValue", ")", "{", "if", "(", "string", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "try", "{", "return", "Long", ".", "parseLong...
Convert a string to a long value. If an error occurs during the conversion, the default value is returned instead. Unlike the {@link Integer#parseInt(String)} method, this method will not throw an exception. @param string value to test @param defaultValue value to return in case of difficulting converting. @re...
[ "Convert", "a", "string", "to", "a", "long", "value", ".", "If", "an", "error", "occurs", "during", "the", "conversion", "the", "default", "value", "is", "returned", "instead", ".", "Unlike", "the", "{", "@link", "Integer#parseInt", "(", "String", ")", "}"...
train
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/StringHelper.java#L90-L105
ggrandes/kvstore
src/main/java/org/javastack/kvstore/utils/HexStrings.java
HexStrings.nativeAsHex
public static final String nativeAsHex(final long input, final int bits) { """ Return hex string (zero-left-padded) of an native number @param input the number @param bits the size in bits for a number (64 for long, 32 for int, 16 for short, 8 for byte) @return string """ final char[] sb = new char[(bit...
java
public static final String nativeAsHex(final long input, final int bits) { final char[] sb = new char[(bits > 64 ? 64 : (bits < 8 ? 8 : bits)) >> 2]; final int len = (sb.length - 1); for (int i = 0; i <= len; i++) { // MSB sb[i] = HEX_TABLE[((int) (input >>> ((len - i) << 2))) & 0xF]; } return new String(...
[ "public", "static", "final", "String", "nativeAsHex", "(", "final", "long", "input", ",", "final", "int", "bits", ")", "{", "final", "char", "[", "]", "sb", "=", "new", "char", "[", "(", "bits", ">", "64", "?", "64", ":", "(", "bits", "<", "8", "...
Return hex string (zero-left-padded) of an native number @param input the number @param bits the size in bits for a number (64 for long, 32 for int, 16 for short, 8 for byte) @return string
[ "Return", "hex", "string", "(", "zero", "-", "left", "-", "padded", ")", "of", "an", "native", "number" ]
train
https://github.com/ggrandes/kvstore/blob/c79277f79f4604e0fec8349a98519838e3de38f0/src/main/java/org/javastack/kvstore/utils/HexStrings.java#L76-L84
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addNotIn
public void addNotIn(String attribute, Query subQuery) { """ NOT IN Criteria with SubQuery @param attribute The field name to be used @param subQuery The subQuery """ // PAW // addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getAlias())); addSelectionCriteria(ValueCriteri...
java
public void addNotIn(String attribute, Query subQuery) { // PAW // addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getAlias())); addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getUserAlias(attribute))); }
[ "public", "void", "addNotIn", "(", "String", "attribute", ",", "Query", "subQuery", ")", "{", "// PAW\r", "// addSelectionCriteria(ValueCriteria.buildNotInCriteria(attribute, subQuery, getAlias()));\r", "addSelectionCriteria", "(", "ValueCriteria", ".", "buildNotInCriteria", "(",...
NOT IN Criteria with SubQuery @param attribute The field name to be used @param subQuery The subQuery
[ "NOT", "IN", "Criteria", "with", "SubQuery" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L853-L858
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.sinterstore
@Override public Long sinterstore(final byte[] dstkey, final byte[]... keys) { """ This commanad works exactly like {@link #sinter(byte[]...) SINTER} but instead of being returned the resulting set is stored as dstkey. <p> Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M ...
java
@Override public Long sinterstore(final byte[] dstkey, final byte[]... keys) { checkIsInMultiOrPipeline(); client.sinterstore(dstkey, keys); return client.getIntegerReply(); }
[ "@", "Override", "public", "Long", "sinterstore", "(", "final", "byte", "[", "]", "dstkey", ",", "final", "byte", "[", "]", "...", "keys", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "sinterstore", "(", "dstkey", ",", "keys", ")",...
This commanad works exactly like {@link #sinter(byte[]...) SINTER} but instead of being returned the resulting set is stored as dstkey. <p> Time complexity O(N*M) worst case where N is the cardinality of the smallest set and M the number of sets @param dstkey @param keys @return Status code reply
[ "This", "commanad", "works", "exactly", "like", "{" ]
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L1535-L1540
fommil/matrix-toolkits-java
src/main/java/no/uib/cipr/matrix/PermutationMatrix.java
PermutationMatrix.fromPartialPivots
public static PermutationMatrix fromPartialPivots(int[] pivots) { """ The sequential row permutations to perform, e.g. (2, 3, 3) means: permute row 1 with row 2, then permute row 2 with row 3, then permute row 3 with row 3 (i.e. do nothing). <p> Using this factory will ensure that LAPACK optimisations are avai...
java
public static PermutationMatrix fromPartialPivots(int[] pivots) { int[] permutations = new int[pivots.length]; for (int i = 0; i < pivots.length; i++) { permutations[i] = i; } for (int i = 0; i < pivots.length; i++) { int j = pivots[i] - 1; if (j == i...
[ "public", "static", "PermutationMatrix", "fromPartialPivots", "(", "int", "[", "]", "pivots", ")", "{", "int", "[", "]", "permutations", "=", "new", "int", "[", "pivots", ".", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "pivo...
The sequential row permutations to perform, e.g. (2, 3, 3) means: permute row 1 with row 2, then permute row 2 with row 3, then permute row 3 with row 3 (i.e. do nothing). <p> Using this factory will ensure that LAPACK optimisations are available for multiplication operations. @param pivots using fortran (1-indexed) n...
[ "The", "sequential", "row", "permutations", "to", "perform", "e", ".", "g", ".", "(", "2", "3", "3", ")", "means", ":", "permute", "row", "1", "with", "row", "2", "then", "permute", "row", "2", "with", "row", "3", "then", "permute", "row", "3", "wi...
train
https://github.com/fommil/matrix-toolkits-java/blob/6157618bc86bcda3749af2a60bf869d8f3292960/src/main/java/no/uib/cipr/matrix/PermutationMatrix.java#L51-L67
js-lib-com/commons
src/main/java/js/converter/EnumsConverter.java
EnumsConverter.asObject
@SuppressWarnings("rawtypes") @Override public <T> T asObject(String string, Class<T> valueType) throws IllegalArgumentException { """ Create enumeration constant for given string and enumeration type. @throws IllegalArgumentException string argument is not a valid constant for given enumeration type. @t...
java
@SuppressWarnings("rawtypes") @Override public <T> T asObject(String string, Class<T> valueType) throws IllegalArgumentException { if(string.isEmpty()) { return null; } // at this point value type is guaranteed to be enumeration if(Types.isKindOf(valueType, OrdinalEnum.class)) { ...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "@", "Override", "public", "<", "T", ">", "T", "asObject", "(", "String", "string", ",", "Class", "<", "T", ">", "valueType", ")", "throws", "IllegalArgumentException", "{", "if", "(", "string", ".", "isEm...
Create enumeration constant for given string and enumeration type. @throws IllegalArgumentException string argument is not a valid constant for given enumeration type. @throws NumberFormatException if string argument is not a valid numeric value and value type implements {@link OrdinalEnum}. @throws IndexOutOfBoundsEx...
[ "Create", "enumeration", "constant", "for", "given", "string", "and", "enumeration", "type", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/converter/EnumsConverter.java#L34-L46
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/util/Bootstrap.java
Bootstrap.fromDnsSrv
public static List<String> fromDnsSrv(final String serviceName, boolean full, boolean secure, String nameServerIP) throws NamingException { """ Fetch a bootstrap list from DNS SRV using a specific nameserver IP. @param serviceName the DNS SRV locator. @param full if the service name is the full one...
java
public static List<String> fromDnsSrv(final String serviceName, boolean full, boolean secure, String nameServerIP) throws NamingException { String fullService; if (full) { fullService = serviceName; } else { fullService = (secure ? DEFAULT_DNS_SECURE_SERVICE :...
[ "public", "static", "List", "<", "String", ">", "fromDnsSrv", "(", "final", "String", "serviceName", ",", "boolean", "full", ",", "boolean", "secure", ",", "String", "nameServerIP", ")", "throws", "NamingException", "{", "String", "fullService", ";", "if", "("...
Fetch a bootstrap list from DNS SRV using a specific nameserver IP. @param serviceName the DNS SRV locator. @param full if the service name is the full one or needs to be enriched by the couchbase prefixes. @param secure if the secure service prefix should be used. @param nameServerIP an IPv4 for the name server to us...
[ "Fetch", "a", "bootstrap", "list", "from", "DNS", "SRV", "using", "a", "specific", "nameserver", "IP", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/util/Bootstrap.java#L88-L106
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/utils/URIBuilder.java
URIBuilder.queryParameters
public URIBuilder queryParameters( Map<String, String> queryParams ) { """ Set the query parameters @param queryParams The parameters to use in the URI (not url encoded) @return The builder """ this.queryParams.clear(); this.queryParams.putAll( queryParams ); return this; }
java
public URIBuilder queryParameters( Map<String, String> queryParams ) { this.queryParams.clear(); this.queryParams.putAll( queryParams ); return this; }
[ "public", "URIBuilder", "queryParameters", "(", "Map", "<", "String", ",", "String", ">", "queryParams", ")", "{", "this", ".", "queryParams", ".", "clear", "(", ")", ";", "this", ".", "queryParams", ".", "putAll", "(", "queryParams", ")", ";", "return", ...
Set the query parameters @param queryParams The parameters to use in the URI (not url encoded) @return The builder
[ "Set", "the", "query", "parameters" ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/utils/URIBuilder.java#L86-L91
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/util/LightWeightBitSet.java
LightWeightBitSet.clear
public static void clear(long[] bits, int pos) { """ Set the bit for the given position to false. @param bits - bitset @param pos - position to be set to false """ int offset = pos >> LONG_SHIFT; if (offset >= bits.length) throw new IndexOutOfBoundsException(); bits[offset] &= ~(1L << pos...
java
public static void clear(long[] bits, int pos) { int offset = pos >> LONG_SHIFT; if (offset >= bits.length) throw new IndexOutOfBoundsException(); bits[offset] &= ~(1L << pos); }
[ "public", "static", "void", "clear", "(", "long", "[", "]", "bits", ",", "int", "pos", ")", "{", "int", "offset", "=", "pos", ">>", "LONG_SHIFT", ";", "if", "(", "offset", ">=", "bits", ".", "length", ")", "throw", "new", "IndexOutOfBoundsException", "...
Set the bit for the given position to false. @param bits - bitset @param pos - position to be set to false
[ "Set", "the", "bit", "for", "the", "given", "position", "to", "false", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/util/LightWeightBitSet.java#L75-L80
alkacon/opencms-core
src/org/opencms/site/xmlsitemap/CmsXmlSitemapActionElement.java
CmsXmlSitemapActionElement.prepareSitemapGenerator
public static CmsXmlSitemapGenerator prepareSitemapGenerator(CmsResource seoFileRes, CmsXmlSeoConfiguration config) throws CmsException { """ Constructs an XML sitemap generator given an XML sitemap configuration file.<p> @param seoFileRes the sitemap XML file @param config the parsed configuration @re...
java
public static CmsXmlSitemapGenerator prepareSitemapGenerator(CmsResource seoFileRes, CmsXmlSeoConfiguration config) throws CmsException { if (config.getMode().equals(CmsXmlSeoConfiguration.MODE_XML_SITEMAP)) { String baseFolderRootPath = CmsFileUtil.removeTrailingSeparator( ...
[ "public", "static", "CmsXmlSitemapGenerator", "prepareSitemapGenerator", "(", "CmsResource", "seoFileRes", ",", "CmsXmlSeoConfiguration", "config", ")", "throws", "CmsException", "{", "if", "(", "config", ".", "getMode", "(", ")", ".", "equals", "(", "CmsXmlSeoConfigu...
Constructs an XML sitemap generator given an XML sitemap configuration file.<p> @param seoFileRes the sitemap XML file @param config the parsed configuration @return the sitemap generator, or null if the given configuration is not an XML sitemap configuration @throws CmsException if something goes wrong
[ "Constructs", "an", "XML", "sitemap", "generator", "given", "an", "XML", "sitemap", "configuration", "file", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/site/xmlsitemap/CmsXmlSitemapActionElement.java#L121-L142
landawn/AbacusUtil
src/com/landawn/abacus/util/ShortList.java
ShortList.noneMatch
public <E extends Exception> boolean noneMatch(Try.ShortPredicate<E> filter) throws E { """ Returns whether no elements of this List match the provided predicate. @param filter @return """ return noneMatch(0, size(), filter); }
java
public <E extends Exception> boolean noneMatch(Try.ShortPredicate<E> filter) throws E { return noneMatch(0, size(), filter); }
[ "public", "<", "E", "extends", "Exception", ">", "boolean", "noneMatch", "(", "Try", ".", "ShortPredicate", "<", "E", ">", "filter", ")", "throws", "E", "{", "return", "noneMatch", "(", "0", ",", "size", "(", ")", ",", "filter", ")", ";", "}" ]
Returns whether no elements of this List match the provided predicate. @param filter @return
[ "Returns", "whether", "no", "elements", "of", "this", "List", "match", "the", "provided", "predicate", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/ShortList.java#L969-L971
opsmatters/opsmatters-core
src/main/java/com/opsmatters/core/documents/XlsWorkbook.java
XlsWorkbook.appendToSheet
@Override public void appendToSheet(FileColumn[] columns, List<String[]> lines, String sheetName) throws IOException { """ Adds the given lines of data to an existing sheet in the workbook. @param columns The column definitions for the worksheet @param lines The list of lines to be added to the works...
java
@Override public void appendToSheet(FileColumn[] columns, List<String[]> lines, String sheetName) throws IOException { try { XlsWorksheet sheet = getSheet(sheetName); if(sheet != null) appendRows((WritableSheet)sheet.getSheet(), columns, lines, she...
[ "@", "Override", "public", "void", "appendToSheet", "(", "FileColumn", "[", "]", "columns", ",", "List", "<", "String", "[", "]", ">", "lines", ",", "String", "sheetName", ")", "throws", "IOException", "{", "try", "{", "XlsWorksheet", "sheet", "=", "getShe...
Adds the given lines of data to an existing sheet in the workbook. @param columns The column definitions for the worksheet @param lines The list of lines to be added to the worksheet @param sheetName The name of the worksheet to be added @throws IOException if the data cannot be appended
[ "Adds", "the", "given", "lines", "of", "data", "to", "an", "existing", "sheet", "in", "the", "workbook", "." ]
train
https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/documents/XlsWorkbook.java#L279-L293
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/io/DataIO.java
DataIO.getDate
public static Date getDate(CSProperties p, String key) throws ParseException { """ Get a value as date. @param p @param key @return a property as Date @throws java.text.ParseException """ String val = p.get(key).toString(); if (val == null) { throw new IllegalArgumentException...
java
public static Date getDate(CSProperties p, String key) throws ParseException { String val = p.get(key).toString(); if (val == null) { throw new IllegalArgumentException(key); } String f = p.getInfo(key).get(KEY_FORMAT); DateFormat fmt = new SimpleDateFormat(f == null ...
[ "public", "static", "Date", "getDate", "(", "CSProperties", "p", ",", "String", "key", ")", "throws", "ParseException", "{", "String", "val", "=", "p", ".", "get", "(", "key", ")", ".", "toString", "(", ")", ";", "if", "(", "val", "==", "null", ")", ...
Get a value as date. @param p @param key @return a property as Date @throws java.text.ParseException
[ "Get", "a", "value", "as", "date", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/io/DataIO.java#L961-L969
docusign/docusign-java-client
src/main/java/com/docusign/esign/api/TemplatesApi.java
TemplatesApi.getDocumentPageImage
public byte[] getDocumentPageImage(String accountId, String templateId, String documentId, String pageNumber) throws ApiException { """ Gets a page image from a template for display. Retrieves a page image for display from the specified template. @param accountId The external account number (int) or account ID G...
java
public byte[] getDocumentPageImage(String accountId, String templateId, String documentId, String pageNumber) throws ApiException { return getDocumentPageImage(accountId, templateId, documentId, pageNumber, null); }
[ "public", "byte", "[", "]", "getDocumentPageImage", "(", "String", "accountId", ",", "String", "templateId", ",", "String", "documentId", ",", "String", "pageNumber", ")", "throws", "ApiException", "{", "return", "getDocumentPageImage", "(", "accountId", ",", "tem...
Gets a page image from a template for display. Retrieves a page image for display from the specified template. @param accountId The external account number (int) or account ID Guid. (required) @param templateId The ID of the template being accessed. (required) @param documentId The ID of the document being accessed. (r...
[ "Gets", "a", "page", "image", "from", "a", "template", "for", "display", ".", "Retrieves", "a", "page", "image", "for", "display", "from", "the", "specified", "template", "." ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/api/TemplatesApi.java#L1369-L1371
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java
TimeGuard.addPoint
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") // WARNING! Don't make a call from methods of the class to not break stack depth! public static void addPoint(@Nonnull final String timePointName, @Nonnull final TimeAlertListener listener) { """ Add a named time point. ...
java
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth") // WARNING! Don't make a call from methods of the class to not break stack depth! public static void addPoint(@Nonnull final String timePointName, @Nonnull final TimeAlertListener listener) { final List<TimeData> list = R...
[ "@", "Weight", "(", "value", "=", "Weight", ".", "Unit", ".", "VARIABLE", ",", "comment", "=", "\"Depends on the current call stack depth\"", ")", "// WARNING! Don't make a call from methods of the class to not break stack depth!", "public", "static", "void", "addPoint", "(",...
Add a named time point. @param timePointName name for the time point @param listener listener to be notified @see #checkPoint(java.lang.String) @since 1.0
[ "Add", "a", "named", "time", "point", "." ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/TimeGuard.java#L105-L110
hal/elemento
core/src/main/java/org/jboss/gwt/elemento/core/BodyObserver.java
BodyObserver.addAttachObserver
static void addAttachObserver(HTMLElement element, ObserverCallback callback) { """ Check if the observer is already started, if not it will start it, then register and callback for when the element is attached to the dom. """ if (!ready) { startObserving(); } attachObserve...
java
static void addAttachObserver(HTMLElement element, ObserverCallback callback) { if (!ready) { startObserving(); } attachObservers.add(createObserver(element, callback, ATTACH_UID_KEY)); }
[ "static", "void", "addAttachObserver", "(", "HTMLElement", "element", ",", "ObserverCallback", "callback", ")", "{", "if", "(", "!", "ready", ")", "{", "startObserving", "(", ")", ";", "}", "attachObservers", ".", "add", "(", "createObserver", "(", "element", ...
Check if the observer is already started, if not it will start it, then register and callback for when the element is attached to the dom.
[ "Check", "if", "the", "observer", "is", "already", "started", "if", "not", "it", "will", "start", "it", "then", "register", "and", "callback", "for", "when", "the", "element", "is", "attached", "to", "the", "dom", "." ]
train
https://github.com/hal/elemento/blob/26da2d5a1fe2ec55b779737dbaeda25a942eee61/core/src/main/java/org/jboss/gwt/elemento/core/BodyObserver.java#L100-L105
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/persister/MapTilePersisterModel.java
MapTilePersisterModel.loadTile
protected Tile loadTile(FileReading file, int i) throws IOException { """ Load tile. Data are loaded this way: <pre> (integer) sheet number (integer) index number inside sheet (integer) tile location x (integer tile location y </pre> @param file The file reader reference. @param i The last loaded tile ...
java
protected Tile loadTile(FileReading file, int i) throws IOException { Check.notNull(file); final Integer sheet = Integer.valueOf(file.readInteger()); final int number = file.readInteger(); final int x = file.readInteger() * map.getTileWidth() + i * BLOC_SIZE * map.getTileWidth...
[ "protected", "Tile", "loadTile", "(", "FileReading", "file", ",", "int", "i", ")", "throws", "IOException", "{", "Check", ".", "notNull", "(", "file", ")", ";", "final", "Integer", "sheet", "=", "Integer", ".", "valueOf", "(", "file", ".", "readInteger", ...
Load tile. Data are loaded this way: <pre> (integer) sheet number (integer) index number inside sheet (integer) tile location x (integer tile location y </pre> @param file The file reader reference. @param i The last loaded tile number. @return The loaded tile. @throws IOException If error on reading.
[ "Load", "tile", ".", "Data", "are", "loaded", "this", "way", ":" ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/persister/MapTilePersisterModel.java#L100-L109
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/collections/TableUtils.java
TableUtils.toColumnKeyFunction
public static <R, C, V> Function<Table.Cell<R, C, V>, C> toColumnKeyFunction() { """ Guava {@link Function} to transform a cell to its column key. """ return new Function<Table.Cell<R, C, V>, C>() { @Override public C apply(final Table.Cell<R, C, V> input) { return input.getColumnKey();...
java
public static <R, C, V> Function<Table.Cell<R, C, V>, C> toColumnKeyFunction() { return new Function<Table.Cell<R, C, V>, C>() { @Override public C apply(final Table.Cell<R, C, V> input) { return input.getColumnKey(); } }; }
[ "public", "static", "<", "R", ",", "C", ",", "V", ">", "Function", "<", "Table", ".", "Cell", "<", "R", ",", "C", ",", "V", ">", ",", "C", ">", "toColumnKeyFunction", "(", ")", "{", "return", "new", "Function", "<", "Table", ".", "Cell", "<", "...
Guava {@link Function} to transform a cell to its column key.
[ "Guava", "{" ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/TableUtils.java#L120-L127
hawkular/hawkular-apm
api/src/main/java/org/hawkular/apm/api/model/trace/Message.java
Message.addContent
public Message addContent(String name, String type, String value) { """ This method adds new content. @param name The optional name @param type The optional type @param value The value @return This message """ content.put(name, new Content(type, value)); return this; }
java
public Message addContent(String name, String type, String value) { content.put(name, new Content(type, value)); return this; }
[ "public", "Message", "addContent", "(", "String", "name", ",", "String", "type", ",", "String", "value", ")", "{", "content", ".", "put", "(", "name", ",", "new", "Content", "(", "type", ",", "value", ")", ")", ";", "return", "this", ";", "}" ]
This method adds new content. @param name The optional name @param type The optional type @param value The value @return This message
[ "This", "method", "adds", "new", "content", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/api/src/main/java/org/hawkular/apm/api/model/trace/Message.java#L79-L82
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java
MessagePattern.partSubstringMatches
public boolean partSubstringMatches(Part part, String s) { """ Compares the part's substring with the input string s. @param part a part of this MessagePattern. @param s a string. @return true if getSubstring(part).equals(s). """ return part.length == s.length() && msg.regionMatches(part.index, s, 0...
java
public boolean partSubstringMatches(Part part, String s) { return part.length == s.length() && msg.regionMatches(part.index, s, 0, part.length); }
[ "public", "boolean", "partSubstringMatches", "(", "Part", "part", ",", "String", "s", ")", "{", "return", "part", ".", "length", "==", "s", ".", "length", "(", ")", "&&", "msg", ".", "regionMatches", "(", "part", ".", "index", ",", "s", ",", "0", ","...
Compares the part's substring with the input string s. @param part a part of this MessagePattern. @param s a string. @return true if getSubstring(part).equals(s).
[ "Compares", "the", "part", "s", "substring", "with", "the", "input", "string", "s", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L456-L458
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
ReflectionUtils.assertNotFinal
public static void assertNotFinal(final Field field, Class<? extends Annotation> annotation) { """ Asserts field is not final. @param field to validate @param annotation annotation to propagate in exception message """ if (Modifier.isFinal(field.getModifiers())) { throw annotation == n...
java
public static void assertNotFinal(final Field field, Class<? extends Annotation> annotation) { if (Modifier.isFinal(field.getModifiers())) { throw annotation == null ? MESSAGES.fieldCannotBeStaticOrFinal(field) : MESSAGES.fieldCannotBeStaticOrFinal2(field, annotation); } }
[ "public", "static", "void", "assertNotFinal", "(", "final", "Field", "field", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "if", "(", "Modifier", ".", "isFinal", "(", "field", ".", "getModifiers", "(", ")", ")", ")", "{",...
Asserts field is not final. @param field to validate @param annotation annotation to propagate in exception message
[ "Asserts", "field", "is", "not", "final", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java#L253-L259
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/distort/mls/ImageDeformPointMLS_F32.java
ImageDeformPointMLS_F32.interpolateDeformedPoint
void interpolateDeformedPoint(float v_x , float v_y , Point2D_F32 deformed ) { """ Samples the 4 grid points around v and performs bilinear interpolation @param v_x Grid coordinate x-axis, undistorted @param v_y Grid coordinate y-axis, undistorted @param deformed Distorted grid coordinate in image pixels ...
java
void interpolateDeformedPoint(float v_x , float v_y , Point2D_F32 deformed ) { // sample the closest point and x+1,y+1 int x0 = (int)v_x; int y0 = (int)v_y; int x1 = x0+1; int y1 = y0+1; // make sure the 4 sample points are in bounds if( x1 >= gridCols ) x1 = gridCols-1; if( y1 >= gridRows ) y1 ...
[ "void", "interpolateDeformedPoint", "(", "float", "v_x", ",", "float", "v_y", ",", "Point2D_F32", "deformed", ")", "{", "// sample the closest point and x+1,y+1", "int", "x0", "=", "(", "int", ")", "v_x", ";", "int", "y0", "=", "(", "int", ")", "v_y", ";", ...
Samples the 4 grid points around v and performs bilinear interpolation @param v_x Grid coordinate x-axis, undistorted @param v_y Grid coordinate y-axis, undistorted @param deformed Distorted grid coordinate in image pixels
[ "Samples", "the", "4", "grid", "points", "around", "v", "and", "performs", "bilinear", "interpolation" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/distort/mls/ImageDeformPointMLS_F32.java#L298-L338
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
SynchronousRequest.getAllEmblemIDs
public List<Integer> getAllEmblemIDs(Emblem.Type type) throws GuildWars2Exception { """ For more info on emblem API go <a href="https://wiki.guildwars2.com/wiki/API:2/emblem">here</a><br/> @param type foregrounds/backgrounds @return list of emblem id(s) @throws GuildWars2Exception see {@link ErrorCode} for de...
java
public List<Integer> getAllEmblemIDs(Emblem.Type type) throws GuildWars2Exception { try { Response<List<Integer>> response = gw2API.getAllEmblemIDs(type.name()).execute(); if (!response.isSuccessful()) throwError(response.code(), response.errorBody()); return response.body(); } catch (IOException e) { t...
[ "public", "List", "<", "Integer", ">", "getAllEmblemIDs", "(", "Emblem", ".", "Type", "type", ")", "throws", "GuildWars2Exception", "{", "try", "{", "Response", "<", "List", "<", "Integer", ">>", "response", "=", "gw2API", ".", "getAllEmblemIDs", "(", "type"...
For more info on emblem API go <a href="https://wiki.guildwars2.com/wiki/API:2/emblem">here</a><br/> @param type foregrounds/backgrounds @return list of emblem id(s) @throws GuildWars2Exception see {@link ErrorCode} for detail @see Emblem Emblem info
[ "For", "more", "info", "on", "emblem", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "emblem", ">", "here<", "/", "a", ">", "<br", "/", ">" ]
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L1764-L1772
nohana/Amalgam
amalgam/src/main/java/com/amalgam/content/pm/PackageManagerUtils.java
PackageManagerUtils.getSignaturePackageInfo
public static PackageInfo getSignaturePackageInfo(Context context, String targetPackage) throws NameNotFoundException { """ Get the {@link android.content.pm.PackageInfo} that contains signature info. @param context the context. @param targetPackage the the target package name. @return the {@link android.conten...
java
public static PackageInfo getSignaturePackageInfo(Context context, String targetPackage) throws NameNotFoundException { PackageManager manager = context.getPackageManager(); return manager.getPackageInfo(targetPackage, PackageManager.GET_SIGNATURES); }
[ "public", "static", "PackageInfo", "getSignaturePackageInfo", "(", "Context", "context", ",", "String", "targetPackage", ")", "throws", "NameNotFoundException", "{", "PackageManager", "manager", "=", "context", ".", "getPackageManager", "(", ")", ";", "return", "manag...
Get the {@link android.content.pm.PackageInfo} that contains signature info. @param context the context. @param targetPackage the the target package name. @return the {@link android.content.pm.PackageInfo} @throws NameNotFoundException if no package found.
[ "Get", "the", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/content/pm/PackageManagerUtils.java#L111-L114
google/closure-compiler
src/com/google/javascript/jscomp/TypeValidator.java
TypeValidator.expectAllInterfaceProperties
void expectAllInterfaceProperties(Node n, FunctionType type) { """ Expect that all properties on interfaces that this type implements are implemented and correctly typed. """ ObjectType instance = type.getInstanceType(); for (ObjectType implemented : type.getAllImplementedInterfaces()) { if (imp...
java
void expectAllInterfaceProperties(Node n, FunctionType type) { ObjectType instance = type.getInstanceType(); for (ObjectType implemented : type.getAllImplementedInterfaces()) { if (implemented.getImplicitPrototype() != null) { for (String prop : implemented.getImplicitPrototype().getO...
[ "void", "expectAllInterfaceProperties", "(", "Node", "n", ",", "FunctionType", "type", ")", "{", "ObjectType", "instance", "=", "type", ".", "getInstanceType", "(", ")", ";", "for", "(", "ObjectType", "implemented", ":", "type", ".", "getAllImplementedInterfaces",...
Expect that all properties on interfaces that this type implements are implemented and correctly typed.
[ "Expect", "that", "all", "properties", "on", "interfaces", "that", "this", "type", "implements", "are", "implemented", "and", "correctly", "typed", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeValidator.java#L877-L887
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/AnnotationIssues.java
AnnotationIssues.clearAssumptions
public static void clearAssumptions(Map<Integer, Integer> assumptionTill, int pc) { """ the map is keyed by register, and value by when an assumption holds to a byte offset if we have passed when the assumption holds, clear the item from the map @param assumptionTill the map of assumptions @param pc ...
java
public static void clearAssumptions(Map<Integer, Integer> assumptionTill, int pc) { Iterator<Integer> it = assumptionTill.values().iterator(); while (it.hasNext()) { if (it.next().intValue() <= pc) { it.remove(); } } }
[ "public", "static", "void", "clearAssumptions", "(", "Map", "<", "Integer", ",", "Integer", ">", "assumptionTill", ",", "int", "pc", ")", "{", "Iterator", "<", "Integer", ">", "it", "=", "assumptionTill", ".", "values", "(", ")", ".", "iterator", "(", ")...
the map is keyed by register, and value by when an assumption holds to a byte offset if we have passed when the assumption holds, clear the item from the map @param assumptionTill the map of assumptions @param pc // * the current pc
[ "the", "map", "is", "keyed", "by", "register", "and", "value", "by", "when", "an", "assumption", "holds", "to", "a", "byte", "offset", "if", "we", "have", "passed", "when", "the", "assumption", "holds", "clear", "the", "item", "from", "the", "map" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/AnnotationIssues.java#L396-L403
PinaeOS/nala
src/main/java/org/pinae/nala/xb/util/ResourceReader.java
ResourceReader.getFileStream
public InputStreamReader getFileStream(String filename, String encoding) throws NoSuchPathException, UnmarshalException { """ 将文件读出为输出流 @param filename 需要读取的文件名称 @param encoding 文件编码 @return 文件内容输出流 @throws NoSuchPathException 无法找到对应的文件或者路径 @throws UnmarshalException 解组失败(通常由于编码问题引起) """ try { ...
java
public InputStreamReader getFileStream(String filename, String encoding) throws NoSuchPathException, UnmarshalException{ try { return new InputStreamReader(new FileInputStream(filename), encoding); } catch (FileNotFoundException e) { throw new NoSuchPathException(e); } catch (UnsupportedEncodingException...
[ "public", "InputStreamReader", "getFileStream", "(", "String", "filename", ",", "String", "encoding", ")", "throws", "NoSuchPathException", ",", "UnmarshalException", "{", "try", "{", "return", "new", "InputStreamReader", "(", "new", "FileInputStream", "(", "filename"...
将文件读出为输出流 @param filename 需要读取的文件名称 @param encoding 文件编码 @return 文件内容输出流 @throws NoSuchPathException 无法找到对应的文件或者路径 @throws UnmarshalException 解组失败(通常由于编码问题引起)
[ "将文件读出为输出流" ]
train
https://github.com/PinaeOS/nala/blob/2047ade4af197cec938278d300d111ea94af6fbf/src/main/java/org/pinae/nala/xb/util/ResourceReader.java#L97-L106
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/configure/AbstractPropertyReader.java
AbstractPropertyReader.onParseXML
private ClientProperties onParseXML(String propertyFileName, PersistenceUnitMetadata puMetadata) { """ If property file is xml. @param propertyFileName @param puMetadata @return """ InputStream inStream = puMetadata.getClassLoader().getResourceAsStream(propertyFileName); if (inStream == nu...
java
private ClientProperties onParseXML(String propertyFileName, PersistenceUnitMetadata puMetadata) { InputStream inStream = puMetadata.getClassLoader().getResourceAsStream(propertyFileName); if (inStream == null) { propertyFileName = KunderaCoreUtils.resolvePath(propertyFileName); ...
[ "private", "ClientProperties", "onParseXML", "(", "String", "propertyFileName", ",", "PersistenceUnitMetadata", "puMetadata", ")", "{", "InputStream", "inStream", "=", "puMetadata", ".", "getClassLoader", "(", ")", ".", "getResourceAsStream", "(", "propertyFileName", ")...
If property file is xml. @param propertyFileName @param puMetadata @return
[ "If", "property", "file", "is", "xml", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/configure/AbstractPropertyReader.java#L96-L122
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getSasDefinitionAsync
public Observable<SasDefinitionBundle> getSasDefinitionAsync(String vaultBaseUrl, String storageAccountName, String sasDefinitionName) { """ Gets information about a SAS definition for the specified storage account. This operation requires the storage/getsas permission. @param vaultBaseUrl The vault name, for e...
java
public Observable<SasDefinitionBundle> getSasDefinitionAsync(String vaultBaseUrl, String storageAccountName, String sasDefinitionName) { return getSasDefinitionWithServiceResponseAsync(vaultBaseUrl, storageAccountName, sasDefinitionName).map(new Func1<ServiceResponse<SasDefinitionBundle>, SasDefinitionBundle>()...
[ "public", "Observable", "<", "SasDefinitionBundle", ">", "getSasDefinitionAsync", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ",", "String", "sasDefinitionName", ")", "{", "return", "getSasDefinitionWithServiceResponseAsync", "(", "vaultBaseUrl", ","...
Gets information about a SAS definition for the specified storage account. This operation requires the storage/getsas permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName The name of the storage account. @param sasDefinitionName The name of the SAS defi...
[ "Gets", "information", "about", "a", "SAS", "definition", "for", "the", "specified", "storage", "account", ".", "This", "operation", "requires", "the", "storage", "/", "getsas", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L11187-L11194
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionReplicaVersions.java
PartitionReplicaVersions.isStale
boolean isStale(ServiceNamespace namespace, long[] newVersions, int replicaIndex) { """ Returns whether given replica version is behind the current version or not. @param namespace replica namespace @param newVersions new replica versions @param replicaIndex replica index @return true if given version is stale...
java
boolean isStale(ServiceNamespace namespace, long[] newVersions, int replicaIndex) { return getFragmentVersions(namespace).isStale(newVersions, replicaIndex); }
[ "boolean", "isStale", "(", "ServiceNamespace", "namespace", ",", "long", "[", "]", "newVersions", ",", "int", "replicaIndex", ")", "{", "return", "getFragmentVersions", "(", "namespace", ")", ".", "isStale", "(", "newVersions", ",", "replicaIndex", ")", ";", "...
Returns whether given replica version is behind the current version or not. @param namespace replica namespace @param newVersions new replica versions @param replicaIndex replica index @return true if given version is stale, false otherwise
[ "Returns", "whether", "given", "replica", "version", "is", "behind", "the", "current", "version", "or", "not", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionReplicaVersions.java#L51-L53
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/OrientedBox3f.java
OrientedBox3f.setSecondAxis
@Override public void setSecondAxis(double x, double y, double z, double extent, CoordinateSystem3D system) { """ Set the second axis of the box. The third axis is updated to be perpendicular to the two other axis. @param x @param y @param z @param extent @param system """ this.axis2.set(x, y, z); ...
java
@Override public void setSecondAxis(double x, double y, double z, double extent, CoordinateSystem3D system) { this.axis2.set(x, y, z); assert(this.axis2.isUnitVector()); if (system.isLeftHanded()) { this.axis3.set(this.axis1.crossLeftHand(this.axis2)); } else { this.axis3.set(this.axis3.crossRightHand(th...
[ "@", "Override", "public", "void", "setSecondAxis", "(", "double", "x", ",", "double", "y", ",", "double", "z", ",", "double", "extent", ",", "CoordinateSystem3D", "system", ")", "{", "this", ".", "axis2", ".", "set", "(", "x", ",", "y", ",", "z", ")...
Set the second axis of the box. The third axis is updated to be perpendicular to the two other axis. @param x @param y @param z @param extent @param system
[ "Set", "the", "second", "axis", "of", "the", "box", ".", "The", "third", "axis", "is", "updated", "to", "be", "perpendicular", "to", "the", "two", "other", "axis", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/OrientedBox3f.java#L520-L530
carewebframework/carewebframework-core
org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/messaging/MessageUtil.java
MessageUtil.isMessageExcluded
public static boolean isMessageExcluded(Message message, Recipient recipient) { """ Returns true if the message should be excluded based on the given recipient. A message is considered excluded if it has any constraint on the recipient's type and does not have a matching recipient for that type. @param messag...
java
public static boolean isMessageExcluded(Message message, Recipient recipient) { return isMessageExcluded(message, recipient.getType(), recipient.getValue()); }
[ "public", "static", "boolean", "isMessageExcluded", "(", "Message", "message", ",", "Recipient", "recipient", ")", "{", "return", "isMessageExcluded", "(", "message", ",", "recipient", ".", "getType", "(", ")", ",", "recipient", ".", "getValue", "(", ")", ")",...
Returns true if the message should be excluded based on the given recipient. A message is considered excluded if it has any constraint on the recipient's type and does not have a matching recipient for that type. @param message The message to examine. @param recipient The recipient. @return True if the message should ...
[ "Returns", "true", "if", "the", "message", "should", "be", "excluded", "based", "on", "the", "given", "recipient", ".", "A", "message", "is", "considered", "excluded", "if", "it", "has", "any", "constraint", "on", "the", "recipient", "s", "type", "and", "d...
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.api-parent/org.carewebframework.api.core/src/main/java/org/carewebframework/api/messaging/MessageUtil.java#L44-L46
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexChangesFilter.java
ISPNIndexChangesFilter.createIndexInfos
private IndexInfos createIndexInfos(Boolean system, IndexerIoModeHandler modeHandler, QueryHandlerEntry config, QueryHandler handler) throws RepositoryConfigurationException { """ Factory method for creating corresponding IndexInfos class. RSyncIndexInfos created if RSync configured and ISPNIndexInfos other...
java
private IndexInfos createIndexInfos(Boolean system, IndexerIoModeHandler modeHandler, QueryHandlerEntry config, QueryHandler handler) throws RepositoryConfigurationException { try { // read RSYNC configuration RSyncConfiguration rSyncConfiguration = new RSyncConfiguration(config);...
[ "private", "IndexInfos", "createIndexInfos", "(", "Boolean", "system", ",", "IndexerIoModeHandler", "modeHandler", ",", "QueryHandlerEntry", "config", ",", "QueryHandler", "handler", ")", "throws", "RepositoryConfigurationException", "{", "try", "{", "// read RSYNC configur...
Factory method for creating corresponding IndexInfos class. RSyncIndexInfos created if RSync configured and ISPNIndexInfos otherwise @param system @param modeHandler @param config @param handler @return @throws RepositoryConfigurationException
[ "Factory", "method", "for", "creating", "corresponding", "IndexInfos", "class", ".", "RSyncIndexInfos", "created", "if", "RSync", "configured", "and", "ISPNIndexInfos", "otherwise" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/ispn/ISPNIndexChangesFilter.java#L125-L148
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/util/ClassUtils.java
ClassUtils.isCacheSafe
public static boolean isCacheSafe(Class<?> clazz, ClassLoader classLoader) { """ Check whether the given class is cache-safe in the given context, i.e. whether it is loaded by the given ClassLoader or a parent of it. @param clazz the class to analyze @param classLoader the ClassLoader to potentially cache metad...
java
public static boolean isCacheSafe(Class<?> clazz, ClassLoader classLoader) { Assert.notNull(clazz, "Class must not be null"); try { ClassLoader target = clazz.getClassLoader(); if (target == null) { return true; } ClassLoader cur = classLoader; if (cur == target) { return true; } while ...
[ "public", "static", "boolean", "isCacheSafe", "(", "Class", "<", "?", ">", "clazz", ",", "ClassLoader", "classLoader", ")", "{", "Assert", ".", "notNull", "(", "clazz", ",", "\"Class must not be null\"", ")", ";", "try", "{", "ClassLoader", "target", "=", "c...
Check whether the given class is cache-safe in the given context, i.e. whether it is loaded by the given ClassLoader or a parent of it. @param clazz the class to analyze @param classLoader the ClassLoader to potentially cache metadata in
[ "Check", "whether", "the", "given", "class", "is", "cache", "-", "safe", "in", "the", "given", "context", "i", ".", "e", ".", "whether", "it", "is", "loaded", "by", "the", "given", "ClassLoader", "or", "a", "parent", "of", "it", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/ClassUtils.java#L396-L419
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java
ESResponseWrapper.onEnum
private Object onEnum(Attribute attribute, Object fieldValue) { """ On enum. @param attribute the attribute @param fieldValue the field value @return the object """ if (((Field) attribute.getJavaMember()).getType().isEnum()) { EnumAccessor accessor = new EnumAccessor(); ...
java
private Object onEnum(Attribute attribute, Object fieldValue) { if (((Field) attribute.getJavaMember()).getType().isEnum()) { EnumAccessor accessor = new EnumAccessor(); fieldValue = accessor.fromString(((AbstractAttribute) attribute).getBindableJavaType(), ...
[ "private", "Object", "onEnum", "(", "Attribute", "attribute", ",", "Object", "fieldValue", ")", "{", "if", "(", "(", "(", "Field", ")", "attribute", ".", "getJavaMember", "(", ")", ")", ".", "getType", "(", ")", ".", "isEnum", "(", ")", ")", "{", "En...
On enum. @param attribute the attribute @param fieldValue the field value @return the object
[ "On", "enum", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java#L662-L671
apache/incubator-heron
eco-heron-examples/src/java/org/apache/heron/examples/eco/StatefulRandomIntSpout.java
StatefulRandomIntSpout.open
@Override public void open(Map<String, Object> map, TopologyContext ctx, SpoutOutputCollector collector) { """ These three methods are required to extend the BaseRichSpout abstract class """ spoutOutputCollector = collector; }
java
@Override public void open(Map<String, Object> map, TopologyContext ctx, SpoutOutputCollector collector) { spoutOutputCollector = collector; }
[ "@", "Override", "public", "void", "open", "(", "Map", "<", "String", ",", "Object", ">", "map", ",", "TopologyContext", "ctx", ",", "SpoutOutputCollector", "collector", ")", "{", "spoutOutputCollector", "=", "collector", ";", "}" ]
These three methods are required to extend the BaseRichSpout abstract class
[ "These", "three", "methods", "are", "required", "to", "extend", "the", "BaseRichSpout", "abstract", "class" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/eco-heron-examples/src/java/org/apache/heron/examples/eco/StatefulRandomIntSpout.java#L61-L64
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java
PathManagerService.changePath
final void changePath(String pathName, String path) { """ Updates the {@link PathEntry#getPath() path} value for an entry and sends an {@link org.jboss.as.controller.services.path.PathManager.Event#UPDATED} notification to any registered {@linkplain org.jboss.as.controller.services.path.PathManager.Callback#pat...
java
final void changePath(String pathName, String path) { PathEntry pathEntry = findPathEntry(pathName); pathEntry.setPath(path); triggerCallbacksForEvent(pathEntry, Event.UPDATED); }
[ "final", "void", "changePath", "(", "String", "pathName", ",", "String", "path", ")", "{", "PathEntry", "pathEntry", "=", "findPathEntry", "(", "pathName", ")", ";", "pathEntry", ".", "setPath", "(", "path", ")", ";", "triggerCallbacksForEvent", "(", "pathEntr...
Updates the {@link PathEntry#getPath() path} value for an entry and sends an {@link org.jboss.as.controller.services.path.PathManager.Event#UPDATED} notification to any registered {@linkplain org.jboss.as.controller.services.path.PathManager.Callback#pathEvent(Event, PathEntry) callbacks}. @param pathName the logical n...
[ "Updates", "the", "{" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/services/path/PathManagerService.java#L352-L356
nohana/Amalgam
amalgam/src/main/java/com/amalgam/content/pm/PackageManagerUtils.java
PackageManagerUtils.getServicePackageInfo
public static PackageInfo getServicePackageInfo(Context context, String targetPackage) throws NameNotFoundException { """ Get the {@link android.content.pm.PackageInfo} that contains all service declaration for the context. @param context the context. @param targetPackage the target package name. @return the {@...
java
public static PackageInfo getServicePackageInfo(Context context, String targetPackage) throws NameNotFoundException { PackageManager manager = context.getPackageManager(); return manager.getPackageInfo(targetPackage, PackageManager.GET_SERVICES); }
[ "public", "static", "PackageInfo", "getServicePackageInfo", "(", "Context", "context", ",", "String", "targetPackage", ")", "throws", "NameNotFoundException", "{", "PackageManager", "manager", "=", "context", ".", "getPackageManager", "(", ")", ";", "return", "manager...
Get the {@link android.content.pm.PackageInfo} that contains all service declaration for the context. @param context the context. @param targetPackage the target package name. @return the {@link android.content.pm.PackageInfo}. @throws NameNotFoundException if no package found.
[ "Get", "the", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/content/pm/PackageManagerUtils.java#L176-L179
cdk/cdk
legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java
GeometryTools.getBestAlignmentForLabelXY
public static int getBestAlignmentForLabelXY(IAtomContainer container, IAtom atom) { """ Determines the best alignment for the label of an atom in 2D space. It returns 1 if right (=default) aligned, and -1 if left aligned. returns 2 if top aligned, and -2 if H is aligned below the atom See comment for center(IA...
java
public static int getBestAlignmentForLabelXY(IAtomContainer container, IAtom atom) { double overallDiffX = 0; double overallDiffY = 0; for (IAtom connectedAtom : container.getConnectedAtomsList(atom)) { overallDiffX += connectedAtom.getPoint2d().x - atom.getPoint2d().x; o...
[ "public", "static", "int", "getBestAlignmentForLabelXY", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ")", "{", "double", "overallDiffX", "=", "0", ";", "double", "overallDiffY", "=", "0", ";", "for", "(", "IAtom", "connectedAtom", ":", "container",...
Determines the best alignment for the label of an atom in 2D space. It returns 1 if right (=default) aligned, and -1 if left aligned. returns 2 if top aligned, and -2 if H is aligned below the atom See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate ...
[ "Determines", "the", "best", "alignment", "for", "the", "label", "of", "an", "atom", "in", "2D", "space", ".", "It", "returns", "1", "if", "right", "(", "=", "default", ")", "aligned", "and", "-", "1", "if", "left", "aligned", ".", "returns", "2", "i...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java#L1218-L1236
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/tracer/Tracer.java
Tracer.popCCMContext
public static synchronized void popCCMContext(String key, Throwable callstack) { """ Pop CCM context @param key The frame key @param callstack The call stack """ log.tracef("%s", new TraceEvent("CachedConnectionManager", "NONE", TraceEvent.POP_CCM_CONTEXT, "NONE", ...
java
public static synchronized void popCCMContext(String key, Throwable callstack) { log.tracef("%s", new TraceEvent("CachedConnectionManager", "NONE", TraceEvent.POP_CCM_CONTEXT, "NONE", key, callstack != null ? toString(callstack) : "")); }
[ "public", "static", "synchronized", "void", "popCCMContext", "(", "String", "key", ",", "Throwable", "callstack", ")", "{", "log", ".", "tracef", "(", "\"%s\"", ",", "new", "TraceEvent", "(", "\"CachedConnectionManager\"", ",", "\"NONE\"", ",", "TraceEvent", "."...
Pop CCM context @param key The frame key @param callstack The call stack
[ "Pop", "CCM", "context" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/tracer/Tracer.java#L595-L599
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystem.java
CloudStorageFileSystem.listBuckets
public static Page<Bucket> listBuckets( @Nullable String project, Storage.BucketListOption... options) { """ Lists the project's buckets. Pass "null" to use the default project. <p>Example of listing buckets, specifying the page size and a name prefix. <pre>{@code String prefix = "bucket_"; Page<Buck...
java
public static Page<Bucket> listBuckets( @Nullable String project, Storage.BucketListOption... options) { CloudStorageFileSystemProvider provider = new CloudStorageFileSystemProvider( null, StorageOptions.newBuilder().setProjectId(project).build()); return provider.listBuckets(options);...
[ "public", "static", "Page", "<", "Bucket", ">", "listBuckets", "(", "@", "Nullable", "String", "project", ",", "Storage", ".", "BucketListOption", "...", "options", ")", "{", "CloudStorageFileSystemProvider", "provider", "=", "new", "CloudStorageFileSystemProvider", ...
Lists the project's buckets. Pass "null" to use the default project. <p>Example of listing buckets, specifying the page size and a name prefix. <pre>{@code String prefix = "bucket_"; Page<Bucket> buckets = CloudStorageFileSystem.listBuckets("my-project", BucketListOption.prefix(prefix)); Iterator<Bucket> bucketIterat...
[ "Lists", "the", "project", "s", "buckets", ".", "Pass", "null", "to", "use", "the", "default", "project", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystem.java#L107-L113
igniterealtime/Smack
smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
MultiUserChat.changeAvailabilityStatus
public void changeAvailabilityStatus(String status, Presence.Mode mode) throws NotConnectedException, InterruptedException, MucNotJoinedException { """ Changes the occupant's availability status within the room. The presence type will remain available but with a new status that describes the presence update and ...
java
public void changeAvailabilityStatus(String status, Presence.Mode mode) throws NotConnectedException, InterruptedException, MucNotJoinedException { final EntityFullJid myRoomJid = this.myRoomJid; if (myRoomJid == null) { throw new MucNotJoinedException(this); } // Check that...
[ "public", "void", "changeAvailabilityStatus", "(", "String", "status", ",", "Presence", ".", "Mode", "mode", ")", "throws", "NotConnectedException", ",", "InterruptedException", ",", "MucNotJoinedException", "{", "final", "EntityFullJid", "myRoomJid", "=", "this", "."...
Changes the occupant's availability status within the room. The presence type will remain available but with a new status that describes the presence update and a new presence mode (e.g. Extended away). @param status a text message describing the presence update. @param mode the mode type for the presence update. @thr...
[ "Changes", "the", "occupant", "s", "availability", "status", "within", "the", "room", ".", "The", "presence", "type", "will", "remain", "available", "but", "with", "a", "new", "status", "that", "describes", "the", "presence", "update", "and", "a", "new", "pr...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java#L1157-L1177
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_easyHunting_serviceName_records_id_GET
public OvhOvhPabxRecord billingAccount_easyHunting_serviceName_records_id_GET(String billingAccount, String serviceName, Long id) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/easyHunting/{serviceName}/records/{id} @param billingAccount [required] The name of your bi...
java
public OvhOvhPabxRecord billingAccount_easyHunting_serviceName_records_id_GET(String billingAccount, String serviceName, Long id) throws IOException { String qPath = "/telephony/{billingAccount}/easyHunting/{serviceName}/records/{id}"; StringBuilder sb = path(qPath, billingAccount, serviceName, id); String resp =...
[ "public", "OvhOvhPabxRecord", "billingAccount_easyHunting_serviceName_records_id_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/easyHunting/{servic...
Get this object properties REST: GET /telephony/{billingAccount}/easyHunting/{serviceName}/records/{id} @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param id [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L2256-L2261
azkaban/azkaban
az-core/src/main/java/azkaban/utils/PropsUtils.java
PropsUtils.fromJSONString
public static Props fromJSONString(final String json) throws IOException { """ Convert json String to Prop Object @param json json formatted string @return a new constructed Prop Object @throws IOException exception on parsing json string to prop object """ final Map<String, String> obj = (Map<String,...
java
public static Props fromJSONString(final String json) throws IOException { final Map<String, String> obj = (Map<String, String>) JSONUtils.parseJSONFromString(json); final Props props = new Props(null, obj); return props; }
[ "public", "static", "Props", "fromJSONString", "(", "final", "String", "json", ")", "throws", "IOException", "{", "final", "Map", "<", "String", ",", "String", ">", "obj", "=", "(", "Map", "<", "String", ",", "String", ">", ")", "JSONUtils", ".", "parseJ...
Convert json String to Prop Object @param json json formatted string @return a new constructed Prop Object @throws IOException exception on parsing json string to prop object
[ "Convert", "json", "String", "to", "Prop", "Object" ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/az-core/src/main/java/azkaban/utils/PropsUtils.java#L387-L391
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/GridTable.java
GridTable.setHandle
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException { """ Reposition to this record Using this bookmark. @param Object bookmark Bookmark. @param int iHandleType Type of handle (see getHandle). @exception FILE_NOT_OPEN. @return record if found/null - record not found. """ ...
java
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException { m_objectID = null; // No current record m_dataSource = null; FieldList fieldList = this.getNextTable().setHandle(bookmark, iHandleType); if (fieldList != null) m_iRecordStatus = DBConst...
[ "public", "FieldList", "setHandle", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "throws", "DBException", "{", "m_objectID", "=", "null", ";", "// No current record", "m_dataSource", "=", "null", ";", "FieldList", "fieldList", "=", "this", ".", "ge...
Reposition to this record Using this bookmark. @param Object bookmark Bookmark. @param int iHandleType Type of handle (see getHandle). @exception FILE_NOT_OPEN. @return record if found/null - record not found.
[ "Reposition", "to", "this", "record", "Using", "this", "bookmark", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/GridTable.java#L571-L581
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/DefaultURLRewriter.java
DefaultURLRewriter.getAjaxUrl
public AjaxUrlInfo getAjaxUrl(ServletContext servletContext, ServletRequest request, Object nameable) { """ This method will get the prefix for all URLs that are used for AJAX processing @param servletContext the current ServletContext. @param request the current ServletRequest. @param nameable the INamable obj...
java
public AjaxUrlInfo getAjaxUrl(ServletContext servletContext, ServletRequest request, Object nameable) { HttpServletRequest req = (HttpServletRequest) request; // the default behavior is to set the parameter as the nameable's name or null String name = null; if (nameable instanceof IN...
[ "public", "AjaxUrlInfo", "getAjaxUrl", "(", "ServletContext", "servletContext", ",", "ServletRequest", "request", ",", "Object", "nameable", ")", "{", "HttpServletRequest", "req", "=", "(", "HttpServletRequest", ")", "request", ";", "// the default behavior is to set the ...
This method will get the prefix for all URLs that are used for AJAX processing @param servletContext the current ServletContext. @param request the current ServletRequest. @param nameable the INamable object that will handle the request
[ "This", "method", "will", "get", "the", "prefix", "for", "all", "URLs", "that", "are", "used", "for", "AJAX", "processing" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/DefaultURLRewriter.java#L51-L67
Coveros/selenified
src/main/java/com/coveros/selenified/utilities/Property.java
Property.getAppURL
public static String getAppURL(String clazz, ITestContext context) throws InvalidHTTPException { """ Obtains the application under test, as a URL. If the site was provided as a system property, that value will override whatever was set in the particular test suite. If no site was set, null will be returned, whic...
java
public static String getAppURL(String clazz, ITestContext context) throws InvalidHTTPException { String appURL = checkAppURL(null, (String) context.getAttribute(clazz + APP_URL), "The provided app via test case setup '"); Properties prop = new Properties(); try (InputStream input = new FileInput...
[ "public", "static", "String", "getAppURL", "(", "String", "clazz", ",", "ITestContext", "context", ")", "throws", "InvalidHTTPException", "{", "String", "appURL", "=", "checkAppURL", "(", "null", ",", "(", "String", ")", "context", ".", "getAttribute", "(", "c...
Obtains the application under test, as a URL. If the site was provided as a system property, that value will override whatever was set in the particular test suite. If no site was set, null will be returned, which will causes the tests to error out @param clazz - the test suite class, used for making threadsafe stor...
[ "Obtains", "the", "application", "under", "test", "as", "a", "URL", ".", "If", "the", "site", "was", "provided", "as", "a", "system", "property", "that", "value", "will", "override", "whatever", "was", "set", "in", "the", "particular", "test", "suite", "."...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Property.java#L207-L221
vladmihalcea/flexy-pool
flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java
ReflectionUtils.handleException
private static ReflectionException handleException(String methodName, InvocationTargetException e) { """ Handle {@link InvocationTargetException} by logging it and rethrown it as a {@link ReflectionException} @param methodName method name @param e exception @return wrapped exception """ L...
java
private static ReflectionException handleException(String methodName, InvocationTargetException e) { LOGGER.error("Couldn't invoke method " + methodName, e); return new ReflectionException(e); }
[ "private", "static", "ReflectionException", "handleException", "(", "String", "methodName", ",", "InvocationTargetException", "e", ")", "{", "LOGGER", ".", "error", "(", "\"Couldn't invoke method \"", "+", "methodName", ",", "e", ")", ";", "return", "new", "Reflecti...
Handle {@link InvocationTargetException} by logging it and rethrown it as a {@link ReflectionException} @param methodName method name @param e exception @return wrapped exception
[ "Handle", "{", "@link", "InvocationTargetException", "}", "by", "logging", "it", "and", "rethrown", "it", "as", "a", "{", "@link", "ReflectionException", "}" ]
train
https://github.com/vladmihalcea/flexy-pool/blob/d763d359e68299c2b4e28e4b67770581ae083431/flexy-pool-core/src/main/java/com/vladmihalcea/flexypool/util/ReflectionUtils.java#L196-L199
google/closure-compiler
src/com/google/javascript/jscomp/GlobalNamespace.java
GlobalNamespace.isGlobalNameReference
private boolean isGlobalNameReference(String name, Scope s) { """ Determines whether a name reference in a particular scope is a global name reference. @param name A variable or property name (e.g. "a" or "a.b.c.d") @param s The scope in which the name is referenced @return Whether the name reference is a glo...
java
private boolean isGlobalNameReference(String name, Scope s) { String topVarName = getTopVarName(name); return isGlobalVarReference(topVarName, s); }
[ "private", "boolean", "isGlobalNameReference", "(", "String", "name", ",", "Scope", "s", ")", "{", "String", "topVarName", "=", "getTopVarName", "(", "name", ")", ";", "return", "isGlobalVarReference", "(", "topVarName", ",", "s", ")", ";", "}" ]
Determines whether a name reference in a particular scope is a global name reference. @param name A variable or property name (e.g. "a" or "a.b.c.d") @param s The scope in which the name is referenced @return Whether the name reference is a global name reference
[ "Determines", "whether", "a", "name", "reference", "in", "a", "particular", "scope", "is", "a", "global", "name", "reference", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/GlobalNamespace.java#L280-L283
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/installation/LayersConfig.java
LayersConfig.getLayersConfig
public static LayersConfig getLayersConfig(final File repoRoot) throws IOException { """ Process the layers.conf file. @param repoRoot the root @return the layers conf @throws java.io.IOException """ final File layersList = new File(repoRoot, LAYERS_CONF); if (!layersList.exists()) { ...
java
public static LayersConfig getLayersConfig(final File repoRoot) throws IOException { final File layersList = new File(repoRoot, LAYERS_CONF); if (!layersList.exists()) { return new LayersConfig(); } final Properties properties = PatchUtils.loadProperties(layersList); ...
[ "public", "static", "LayersConfig", "getLayersConfig", "(", "final", "File", "repoRoot", ")", "throws", "IOException", "{", "final", "File", "layersList", "=", "new", "File", "(", "repoRoot", ",", "LAYERS_CONF", ")", ";", "if", "(", "!", "layersList", ".", "...
Process the layers.conf file. @param repoRoot the root @return the layers conf @throws java.io.IOException
[ "Process", "the", "layers", ".", "conf", "file", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/installation/LayersConfig.java#L86-L93
jhy/jsoup
src/main/java/org/jsoup/nodes/Entities.java
Entities.getByName
public static String getByName(String name) { """ Get the character(s) represented by the named entity @param name entity (e.g. "lt" or "amp") @return the string value of the character(s) represented by this entity, or "" if not defined """ String val = multipoints.get(name); if (val != nul...
java
public static String getByName(String name) { String val = multipoints.get(name); if (val != null) return val; int codepoint = extended.codepointForName(name); if (codepoint != empty) return new String(new int[]{codepoint}, 0, 1); return emptyName; }
[ "public", "static", "String", "getByName", "(", "String", "name", ")", "{", "String", "val", "=", "multipoints", ".", "get", "(", "name", ")", ";", "if", "(", "val", "!=", "null", ")", "return", "val", ";", "int", "codepoint", "=", "extended", ".", "...
Get the character(s) represented by the named entity @param name entity (e.g. "lt" or "amp") @return the string value of the character(s) represented by this entity, or "" if not defined
[ "Get", "the", "character", "(", "s", ")", "represented", "by", "the", "named", "entity" ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/Entities.java#L117-L125