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
playn/playn
android/src/playn/android/AndroidAudio.java
AndroidAudio.createSound
public SoundImpl<?> createSound(FileDescriptor fd, long offset, long length) { """ Creates a sound instance from the supplied file descriptor offset. """ PooledSound sound = new PooledSound(pool.load(fd, offset, length, 1)); loadingSounds.put(sound.soundId, sound); return sound; }
java
public SoundImpl<?> createSound(FileDescriptor fd, long offset, long length) { PooledSound sound = new PooledSound(pool.load(fd, offset, length, 1)); loadingSounds.put(sound.soundId, sound); return sound; }
[ "public", "SoundImpl", "<", "?", ">", "createSound", "(", "FileDescriptor", "fd", ",", "long", "offset", ",", "long", "length", ")", "{", "PooledSound", "sound", "=", "new", "PooledSound", "(", "pool", ".", "load", "(", "fd", ",", "offset", ",", "length"...
Creates a sound instance from the supplied file descriptor offset.
[ "Creates", "a", "sound", "instance", "from", "the", "supplied", "file", "descriptor", "offset", "." ]
train
https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/android/src/playn/android/AndroidAudio.java#L134-L138
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataTable.java
WDataTable.updateBeanValue
@Override public void updateBeanValue() { """ Updates the bean using the table data model's {@link TableDataModel#setValueAt(Object, int, int)} method. """ TableDataModel model = getDataModel(); if (model instanceof ScrollableTableDataModel) { LOG.warn("UpdateBeanValue only updating the current page f...
java
@Override public void updateBeanValue() { TableDataModel model = getDataModel(); if (model instanceof ScrollableTableDataModel) { LOG.warn("UpdateBeanValue only updating the current page for ScrollableTableDataModel"); updateBeanValueCurrentPageOnly(); } else if (model.getRowCount() > 0) { // Temporari...
[ "@", "Override", "public", "void", "updateBeanValue", "(", ")", "{", "TableDataModel", "model", "=", "getDataModel", "(", ")", ";", "if", "(", "model", "instanceof", "ScrollableTableDataModel", ")", "{", "LOG", ".", "warn", "(", "\"UpdateBeanValue only updating th...
Updates the bean using the table data model's {@link TableDataModel#setValueAt(Object, int, int)} method.
[ "Updates", "the", "bean", "using", "the", "table", "data", "model", "s", "{" ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDataTable.java#L342-L356
ppiastucki/recast4j
detour-extras/src/main/java/org/recast4j/detour/extras/unity/astar/LinkBuilder.java
LinkBuilder.buildExternalLink
private void buildExternalLink(MeshData tile, Poly node, MeshData neighbourTile) { """ In case of external link to other tiles we must find the direction """ if (neighbourTile.header.bmin[0] > tile.header.bmin[0]) { node.neis[PolyUtils.findEdge(node, tile, neighbourTile.header.bmin[0], 0)] = NavMesh.DT_EX...
java
private void buildExternalLink(MeshData tile, Poly node, MeshData neighbourTile) { if (neighbourTile.header.bmin[0] > tile.header.bmin[0]) { node.neis[PolyUtils.findEdge(node, tile, neighbourTile.header.bmin[0], 0)] = NavMesh.DT_EXT_LINK; } else if (neighbourTile.header.bmin[0] < tile.header.bmin[0]) { node.n...
[ "private", "void", "buildExternalLink", "(", "MeshData", "tile", ",", "Poly", "node", ",", "MeshData", "neighbourTile", ")", "{", "if", "(", "neighbourTile", ".", "header", ".", "bmin", "[", "0", "]", ">", "tile", ".", "header", ".", "bmin", "[", "0", ...
In case of external link to other tiles we must find the direction
[ "In", "case", "of", "external", "link", "to", "other", "tiles", "we", "must", "find", "the", "direction" ]
train
https://github.com/ppiastucki/recast4j/blob/a414dc34f16b87c95fb4e0f46c28a7830d421788/detour-extras/src/main/java/org/recast4j/detour/extras/unity/astar/LinkBuilder.java#L40-L50
WASdev/ci.gradle
src/main/groovy/net/wasdev/wlp/gradle/plugins/utils/ServerConfigDocument.java
ServerConfigDocument.getFileFromConfigDirectory
private File getFileFromConfigDirectory(String file, File def) { """ /* Get the file from configDrectory if it exists; otherwise return def only if it exists, or null if not """ File f = new File(configDirectory, file); if (configDirectory != null && f.exists()) { return f; ...
java
private File getFileFromConfigDirectory(String file, File def) { File f = new File(configDirectory, file); if (configDirectory != null && f.exists()) { return f; } if (def != null && def.exists()) { return def; } return null; }
[ "private", "File", "getFileFromConfigDirectory", "(", "String", "file", ",", "File", "def", ")", "{", "File", "f", "=", "new", "File", "(", "configDirectory", ",", "file", ")", ";", "if", "(", "configDirectory", "!=", "null", "&&", "f", ".", "exists", "(...
/* Get the file from configDrectory if it exists; otherwise return def only if it exists, or null if not
[ "/", "*", "Get", "the", "file", "from", "configDrectory", "if", "it", "exists", ";", "otherwise", "return", "def", "only", "if", "it", "exists", "or", "null", "if", "not" ]
train
https://github.com/WASdev/ci.gradle/blob/523a35e5146c1c5ab8f3aa00d353bbe91eecc180/src/main/groovy/net/wasdev/wlp/gradle/plugins/utils/ServerConfigDocument.java#L493-L502
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/exception/http/RedirectionActionHelper.java
RedirectionActionHelper.buildRedirectUrlAction
public static RedirectionAction buildRedirectUrlAction(final WebContext context, final String location) { """ Build the appropriate redirection action for a location. @param context the web context @param location the location @return the appropriate redirection action """ if (ContextHelper.isPost...
java
public static RedirectionAction buildRedirectUrlAction(final WebContext context, final String location) { if (ContextHelper.isPost(context) && useModernHttpCodes) { return new SeeOtherAction(location); } else { return new FoundAction(location); } }
[ "public", "static", "RedirectionAction", "buildRedirectUrlAction", "(", "final", "WebContext", "context", ",", "final", "String", "location", ")", "{", "if", "(", "ContextHelper", ".", "isPost", "(", "context", ")", "&&", "useModernHttpCodes", ")", "{", "return", ...
Build the appropriate redirection action for a location. @param context the web context @param location the location @return the appropriate redirection action
[ "Build", "the", "appropriate", "redirection", "action", "for", "a", "location", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/exception/http/RedirectionActionHelper.java#L25-L31
Appendium/flatpack
flatpack/src/main/java/net/sf/flatpack/ordering/OrderBy.java
OrderBy.compare
@Override public int compare(final Row row0, final Row row1) { """ overridden from the Comparator class. Performs the sort @return int """ int result = 0; for (int i = 0; i < orderbys.size(); i++) { final OrderColumn oc = orderbys.get(i); // null indicat...
java
@Override public int compare(final Row row0, final Row row1) { int result = 0; for (int i = 0; i < orderbys.size(); i++) { final OrderColumn oc = orderbys.get(i); // null indicates "detail" record which is what the parser assigns // to <column> 's setup ou...
[ "@", "Override", "public", "int", "compare", "(", "final", "Row", "row0", ",", "final", "Row", "row1", ")", "{", "int", "result", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "orderbys", ".", "size", "(", ")", ";", "i", "++",...
overridden from the Comparator class. Performs the sort @return int
[ "overridden", "from", "the", "Comparator", "class", "." ]
train
https://github.com/Appendium/flatpack/blob/5e09875d97db7038e3ba6af9468f5313d99b0082/flatpack/src/main/java/net/sf/flatpack/ordering/OrderBy.java#L84-L114
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectPropertyImpl_CustomFieldSerializer.java
OWLObjectPropertyImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectProperty instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.cl...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLObjectProperty instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLObjectProperty", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.client.rp...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectPropertyImpl_CustomFieldSerializer.java#L64-L67
kotcrab/vis-ui
ui/src/main/java/com/kotcrab/vis/ui/util/dialog/Dialogs.java
Dialogs.showInputDialog
public static InputDialog showInputDialog (Stage stage, String title, String fieldTitle, InputDialogListener listener) { """ Dialog with text and text field for user input. Cannot be canceled. @param title dialog title. @param fieldTitle displayed before input field, may be null. @param listener dialog buttons ...
java
public static InputDialog showInputDialog (Stage stage, String title, String fieldTitle, InputDialogListener listener) { InputDialog dialog = new InputDialog(title, fieldTitle, true, null, listener); stage.addActor(dialog.fadeIn()); return dialog; }
[ "public", "static", "InputDialog", "showInputDialog", "(", "Stage", "stage", ",", "String", "title", ",", "String", "fieldTitle", ",", "InputDialogListener", "listener", ")", "{", "InputDialog", "dialog", "=", "new", "InputDialog", "(", "title", ",", "fieldTitle",...
Dialog with text and text field for user input. Cannot be canceled. @param title dialog title. @param fieldTitle displayed before input field, may be null. @param listener dialog buttons listener.
[ "Dialog", "with", "text", "and", "text", "field", "for", "user", "input", ".", "Cannot", "be", "canceled", "." ]
train
https://github.com/kotcrab/vis-ui/blob/3b68f82d94ae32bffa2a3399c63f432e0f4908e0/ui/src/main/java/com/kotcrab/vis/ui/util/dialog/Dialogs.java#L110-L114
javalite/activejdbc
javalite-common/src/main/java/org/javalite/common/Util.java
Util.recursiveDelete
public static void recursiveDelete(Path directory) throws IOException { """ Deletes a directory recursively with all its contents. Will ignore files and directories if they are disappear during the oprtation. @param directory directory to delete. """ try { Files.walkFileTree(directory, ...
java
public static void recursiveDelete(Path directory) throws IOException { try { Files.walkFileTree(directory, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws java.io.IOException { ...
[ "public", "static", "void", "recursiveDelete", "(", "Path", "directory", ")", "throws", "IOException", "{", "try", "{", "Files", ".", "walkFileTree", "(", "directory", ",", "new", "SimpleFileVisitor", "<", "Path", ">", "(", ")", "{", "@", "Override", "public...
Deletes a directory recursively with all its contents. Will ignore files and directories if they are disappear during the oprtation. @param directory directory to delete.
[ "Deletes", "a", "directory", "recursively", "with", "all", "its", "contents", ".", "Will", "ignore", "files", "and", "directories", "if", "they", "are", "disappear", "during", "the", "oprtation", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/javalite-common/src/main/java/org/javalite/common/Util.java#L547-L569
JodaOrg/joda-beans
src/main/java/org/joda/beans/ser/CollectSerIteratorFactory.java
CollectSerIteratorFactory.createIterable
@Override public SerIterable createIterable(final String metaTypeDescription, final JodaBeanSer settings, final Map<String, Class<?>> knownTypes) { """ Creates an iterator wrapper for a meta-property value. @param metaTypeDescription the description of the collection type, not null @param settings the se...
java
@Override public SerIterable createIterable(final String metaTypeDescription, final JodaBeanSer settings, final Map<String, Class<?>> knownTypes) { if (metaTypeDescription.equals("Grid")) { return grid(Object.class, EMPTY_VALUE_TYPES); } return super.createIterable(metaTypeDescri...
[ "@", "Override", "public", "SerIterable", "createIterable", "(", "final", "String", "metaTypeDescription", ",", "final", "JodaBeanSer", "settings", ",", "final", "Map", "<", "String", ",", "Class", "<", "?", ">", ">", "knownTypes", ")", "{", "if", "(", "meta...
Creates an iterator wrapper for a meta-property value. @param metaTypeDescription the description of the collection type, not null @param settings the settings object, not null @param knownTypes the known types map, null if not using known type shortening @return the iterator, null if not a collection-like type
[ "Creates", "an", "iterator", "wrapper", "for", "a", "meta", "-", "property", "value", "." ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/ser/CollectSerIteratorFactory.java#L85-L91
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/xml/XmlConvertToMessage.java
XmlConvertToMessage.unmarshalRootElement
public Object unmarshalRootElement(Reader inStream, BaseXmlTrxMessageIn soapTrxMessage) throws Exception { """ Create the root element for this message. You must override this. @return The root element. """ String xml = Utility.transferURLStream(null, null, inStream, null); soapTrxMessage.getMessag...
java
public Object unmarshalRootElement(Reader inStream, BaseXmlTrxMessageIn soapTrxMessage) throws Exception { String xml = Utility.transferURLStream(null, null, inStream, null); soapTrxMessage.getMessage().setXML(xml); return xml; }
[ "public", "Object", "unmarshalRootElement", "(", "Reader", "inStream", ",", "BaseXmlTrxMessageIn", "soapTrxMessage", ")", "throws", "Exception", "{", "String", "xml", "=", "Utility", ".", "transferURLStream", "(", "null", ",", "null", ",", "inStream", ",", "null",...
Create the root element for this message. You must override this. @return The root element.
[ "Create", "the", "root", "element", "for", "this", "message", ".", "You", "must", "override", "this", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/xml/XmlConvertToMessage.java#L59-L65
RestComm/jss7
cap/cap-impl/src/main/java/org/restcomm/protocols/ss7/cap/CAPServiceBaseImpl.java
CAPServiceBaseImpl.createNewTCAPDialog
protected Dialog createNewTCAPDialog(SccpAddress origAddress, SccpAddress destAddress, Long localTrId) throws CAPException { """ Creating new outgoing TCAP Dialog. Used when creating a new outgoing CAP Dialog @param origAddress @param destAddress @return @throws CAPException """ try { ...
java
protected Dialog createNewTCAPDialog(SccpAddress origAddress, SccpAddress destAddress, Long localTrId) throws CAPException { try { return this.capProviderImpl.getTCAPProvider().getNewDialog(origAddress, destAddress, localTrId); } catch (TCAPException e) { throw new CAPException(e...
[ "protected", "Dialog", "createNewTCAPDialog", "(", "SccpAddress", "origAddress", ",", "SccpAddress", "destAddress", ",", "Long", "localTrId", ")", "throws", "CAPException", "{", "try", "{", "return", "this", ".", "capProviderImpl", ".", "getTCAPProvider", "(", ")", ...
Creating new outgoing TCAP Dialog. Used when creating a new outgoing CAP Dialog @param origAddress @param destAddress @return @throws CAPException
[ "Creating", "new", "outgoing", "TCAP", "Dialog", ".", "Used", "when", "creating", "a", "new", "outgoing", "CAP", "Dialog" ]
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/cap/cap-impl/src/main/java/org/restcomm/protocols/ss7/cap/CAPServiceBaseImpl.java#L82-L88
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/msg/MsgChecker.java
MsgChecker.replaceCallback
public MsgChecker replaceCallback(BasicCheckRule type, ValidationInvalidCallback cb) { """ Replace callback msg checker. @param type the type @param cb the cb @return the msg checker """ this.callbackMap.put(type.name(), cb); return this; }
java
public MsgChecker replaceCallback(BasicCheckRule type, ValidationInvalidCallback cb) { this.callbackMap.put(type.name(), cb); return this; }
[ "public", "MsgChecker", "replaceCallback", "(", "BasicCheckRule", "type", ",", "ValidationInvalidCallback", "cb", ")", "{", "this", ".", "callbackMap", ".", "put", "(", "type", ".", "name", "(", ")", ",", "cb", ")", ";", "return", "this", ";", "}" ]
Replace callback msg checker. @param type the type @param cb the cb @return the msg checker
[ "Replace", "callback", "msg", "checker", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/msg/MsgChecker.java#L36-L39
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringParser.java
StringParser.parseBool
public static boolean parseBool (@Nullable final Object aObject, final boolean bDefault) { """ Try to interpret the passed object as boolean. This works only if the passed object is either a {@link String} or a {@link Boolean}. @param aObject The object to be interpreted. May be <code>null</code>. @param bDe...
java
public static boolean parseBool (@Nullable final Object aObject, final boolean bDefault) { if (aObject instanceof Boolean) return ((Boolean) aObject).booleanValue (); if (aObject instanceof String) return parseBool ((String) aObject); return bDefault; }
[ "public", "static", "boolean", "parseBool", "(", "@", "Nullable", "final", "Object", "aObject", ",", "final", "boolean", "bDefault", ")", "{", "if", "(", "aObject", "instanceof", "Boolean", ")", "return", "(", "(", "Boolean", ")", "aObject", ")", ".", "boo...
Try to interpret the passed object as boolean. This works only if the passed object is either a {@link String} or a {@link Boolean}. @param aObject The object to be interpreted. May be <code>null</code>. @param bDefault The default value to be returned, if the object cannot be interpreted. @return The boolean represen...
[ "Try", "to", "interpret", "the", "passed", "object", "as", "boolean", ".", "This", "works", "only", "if", "the", "passed", "object", "is", "either", "a", "{", "@link", "String", "}", "or", "a", "{", "@link", "Boolean", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringParser.java#L93-L100
dita-ot/dita-ot
src/main/plugins/org.dita.htmlhelp/src/main/java/org/dita/dost/writer/CHMIndexWriter.java
CHMIndexWriter.outputIndexTerm
private void outputIndexTerm(final IndexTerm term, final XMLSerializer serializer) throws SAXException { """ Output the given indexterm into the XML writer. @param term term to serialize @param serializer XML output to write to """ List<IndexTermTarget> targets = term.getTargetList(); final...
java
private void outputIndexTerm(final IndexTerm term, final XMLSerializer serializer) throws SAXException { List<IndexTermTarget> targets = term.getTargetList(); final List<IndexTerm> subTerms = term.getSubTerms(); int targetNum = targets.size(); final int subTermNum = subTerms.size(); ...
[ "private", "void", "outputIndexTerm", "(", "final", "IndexTerm", "term", ",", "final", "XMLSerializer", "serializer", ")", "throws", "SAXException", "{", "List", "<", "IndexTermTarget", ">", "targets", "=", "term", ".", "getTargetList", "(", ")", ";", "final", ...
Output the given indexterm into the XML writer. @param term term to serialize @param serializer XML output to write to
[ "Output", "the", "given", "indexterm", "into", "the", "XML", "writer", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/plugins/org.dita.htmlhelp/src/main/java/org/dita/dost/writer/CHMIndexWriter.java#L87-L127
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java
JavaCompiler.genCode
JavaFileObject genCode(Env<AttrContext> env, JCClassDecl cdef) throws IOException { """ Generate code and emit a class file for a given class @param env The attribution environment of the outermost class containing this class. @param cdef The class definition from which code is generated. """ t...
java
JavaFileObject genCode(Env<AttrContext> env, JCClassDecl cdef) throws IOException { try { if (gen.genClass(env, cdef) && (errorCount() == 0)) return writer.writeClass(cdef.sym); } catch (ClassWriter.PoolOverflow ex) { log.error(cdef.pos(), "limit.pool"); }...
[ "JavaFileObject", "genCode", "(", "Env", "<", "AttrContext", ">", "env", ",", "JCClassDecl", "cdef", ")", "throws", "IOException", "{", "try", "{", "if", "(", "gen", ".", "genClass", "(", "env", ",", "cdef", ")", "&&", "(", "errorCount", "(", ")", "=="...
Generate code and emit a class file for a given class @param env The attribution environment of the outermost class containing this class. @param cdef The class definition from which code is generated.
[ "Generate", "code", "and", "emit", "a", "class", "file", "for", "a", "given", "class" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java#L740-L753
Impetus/Kundera
examples/polyglot/kvapps/src/main/java/com/impetus/kvapps/runner/ExecutorService.java
ExecutorService.onPersist
static void onPersist(final EntityManager em, final User user) { """ On persist user. @param em entity manager instance. @param user user object. """ logger.info(""); logger.info(""); logger.info("#######################Persisting##########################################"); logger....
java
static void onPersist(final EntityManager em, final User user) { logger.info(""); logger.info(""); logger.info("#######################Persisting##########################################"); logger.info(""); logger.info(user.toString()); persist(user, em); logger.info(""); System.out.println(...
[ "static", "void", "onPersist", "(", "final", "EntityManager", "em", ",", "final", "User", "user", ")", "{", "logger", ".", "info", "(", "\"\"", ")", ";", "logger", ".", "info", "(", "\"\"", ")", ";", "logger", ".", "info", "(", "\"#######################...
On persist user. @param em entity manager instance. @param user user object.
[ "On", "persist", "user", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/examples/polyglot/kvapps/src/main/java/com/impetus/kvapps/runner/ExecutorService.java#L75-L87
ocelotds/ocelot
ocelot-web/src/main/java/org/ocelotds/topic/topicAccess/TopicAccessManager.java
TopicAccessManager.checkAccessTopicFromJsTopicControl
boolean checkAccessTopicFromJsTopicControl(UserContext ctx, String topic) throws IllegalAccessException { """ Check if specific access control is allowed @param session @param topic @return true if at least one specific topicAccessControl exist @throws IllegalAccessException """ logger.debug("Looking for...
java
boolean checkAccessTopicFromJsTopicControl(UserContext ctx, String topic) throws IllegalAccessException { logger.debug("Looking for accessController for topic '{}' from JsTopicControl annotation", topic); Iterable<JsTopicAccessController> accessControls = topicAccessController.select(new JsTopicCtrlAnnotationLitera...
[ "boolean", "checkAccessTopicFromJsTopicControl", "(", "UserContext", "ctx", ",", "String", "topic", ")", "throws", "IllegalAccessException", "{", "logger", ".", "debug", "(", "\"Looking for accessController for topic '{}' from JsTopicControl annotation\"", ",", "topic", ")", ...
Check if specific access control is allowed @param session @param topic @return true if at least one specific topicAccessControl exist @throws IllegalAccessException
[ "Check", "if", "specific", "access", "control", "is", "allowed" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-web/src/main/java/org/ocelotds/topic/topicAccess/TopicAccessManager.java#L80-L84
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.deleteDataLakeStoreAccount
public void deleteDataLakeStoreAccount(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { """ Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake...
java
public void deleteDataLakeStoreAccount(String resourceGroupName, String accountName, String dataLakeStoreAccountName) { deleteDataLakeStoreAccountWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName).toBlocking().single().body(); }
[ "public", "void", "deleteDataLakeStoreAccount", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "dataLakeStoreAccountName", ")", "{", "deleteDataLakeStoreAccountWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "dat...
Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake Analytics account from which to remove the Data Lake Store account...
[ "Updates", "the", "Data", "Lake", "Analytics", "account", "specified", "to", "remove", "the", "specified", "Data", "Lake", "Store", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L1039-L1041
arakelian/more-commons
src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java
XmlStreamReaderUtils.requiredIntAttribute
public static int requiredIntAttribute(final XMLStreamReader reader, final String localName) throws XMLStreamException { """ Returns the value of an attribute as a int. If the attribute is empty, this method throws an exception. @param reader <code>XMLStreamReader</code> that contains attribute va...
java
public static int requiredIntAttribute(final XMLStreamReader reader, final String localName) throws XMLStreamException { return requiredIntAttribute(reader, null, localName); }
[ "public", "static", "int", "requiredIntAttribute", "(", "final", "XMLStreamReader", "reader", ",", "final", "String", "localName", ")", "throws", "XMLStreamException", "{", "return", "requiredIntAttribute", "(", "reader", ",", "null", ",", "localName", ")", ";", "...
Returns the value of an attribute as a int. If the attribute is empty, this method throws an exception. @param reader <code>XMLStreamReader</code> that contains attribute values. @param localName local name of attribute (the namespace is ignored). @return value of attribute as int @throws XMLStreamException if attribu...
[ "Returns", "the", "value", "of", "an", "attribute", "as", "a", "int", ".", "If", "the", "attribute", "is", "empty", "this", "method", "throws", "an", "exception", "." ]
train
https://github.com/arakelian/more-commons/blob/83c607044f64a7f6c005a67866c0ef7cb68d6e29/src/main/java/com/arakelian/core/utils/XmlStreamReaderUtils.java#L1217-L1220
facebookarchive/hadoop-20
src/contrib/corona/src/java/org/apache/hadoop/util/CoronaSerializer.java
CoronaSerializer.readToken
public void readToken(String parentFieldName, JsonToken expectedToken) throws IOException { """ This is a helper method that reads a JSON token using a JsonParser instance, and throws an exception if the next token is not the same as the token we expect. @param parentFieldName The name of the field @para...
java
public void readToken(String parentFieldName, JsonToken expectedToken) throws IOException { JsonToken currentToken = jsonParser.nextToken(); if (currentToken != expectedToken) { throw new IOException("Expected a " + expectedToken.toString() + " token when reading the value of the field: " + ...
[ "public", "void", "readToken", "(", "String", "parentFieldName", ",", "JsonToken", "expectedToken", ")", "throws", "IOException", "{", "JsonToken", "currentToken", "=", "jsonParser", ".", "nextToken", "(", ")", ";", "if", "(", "currentToken", "!=", "expectedToken"...
This is a helper method that reads a JSON token using a JsonParser instance, and throws an exception if the next token is not the same as the token we expect. @param parentFieldName The name of the field @param expectedToken The expected token @throws IOException
[ "This", "is", "a", "helper", "method", "that", "reads", "a", "JSON", "token", "using", "a", "JsonParser", "instance", "and", "throws", "an", "exception", "if", "the", "next", "token", "is", "not", "the", "same", "as", "the", "token", "we", "expect", "." ...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/corona/src/java/org/apache/hadoop/util/CoronaSerializer.java#L121-L131
facebookarchive/hadoop-20
src/core/org/apache/hadoop/security/UnixUserGroupInformation.java
UnixUserGroupInformation.setUserGroupNames
private void setUserGroupNames(String userName, String[] groupNames) { """ /* Set this object's user name and group names @param userName a user's name @param groupNames groups list, the first of which is the default group @exception IllegalArgumentException if any argument is null """ if (userName==n...
java
private void setUserGroupNames(String userName, String[] groupNames) { if (userName==null || userName.length()==0 || groupNames== null || groupNames.length==0) { throw new IllegalArgumentException( "Parameters should not be null or an empty string/array"); } for (int i=0; i<groupName...
[ "private", "void", "setUserGroupNames", "(", "String", "userName", ",", "String", "[", "]", "groupNames", ")", "{", "if", "(", "userName", "==", "null", "||", "userName", ".", "length", "(", ")", "==", "0", "||", "groupNames", "==", "null", "||", "groupN...
/* Set this object's user name and group names @param userName a user's name @param groupNames groups list, the first of which is the default group @exception IllegalArgumentException if any argument is null
[ "/", "*", "Set", "this", "object", "s", "user", "name", "and", "group", "names" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/security/UnixUserGroupInformation.java#L109-L122
mfornos/humanize
humanize-slim/src/main/java/humanize/Humanize.java
Humanize.lossyEquals
public static boolean lossyEquals(final Locale locale, final String source, final String target) { """ <p> Same as {@link #lossyEquals(String, String)} for the specified locale. </p> @param locale The target locale @param source The source string to be compared @param target The target string to be compa...
java
public static boolean lossyEquals(final Locale locale, final String source, final String target) { return withinLocale(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return lossyEquals(source, target); } ...
[ "public", "static", "boolean", "lossyEquals", "(", "final", "Locale", "locale", ",", "final", "String", "source", ",", "final", "String", "target", ")", "{", "return", "withinLocale", "(", "new", "Callable", "<", "Boolean", ">", "(", ")", "{", "@", "Overri...
<p> Same as {@link #lossyEquals(String, String)} for the specified locale. </p> @param locale The target locale @param source The source string to be compared @param target The target string to be compared @return true if the two strings are equals according to primary differences only, false otherwise
[ "<p", ">", "Same", "as", "{", "@link", "#lossyEquals", "(", "String", "String", ")", "}", "for", "the", "specified", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L1242-L1253
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/avro/AvroSchemaManager.java
AvroSchemaManager.getOrGenerateSchemaFile
private Path getOrGenerateSchemaFile(Schema schema) throws IOException { """ If url for schema already exists, return the url. If not create a new temporary schema file and return a the url. """ Preconditions.checkNotNull(schema, "Avro Schema should not be null"); String hashedSchema = Hashing.sha256...
java
private Path getOrGenerateSchemaFile(Schema schema) throws IOException { Preconditions.checkNotNull(schema, "Avro Schema should not be null"); String hashedSchema = Hashing.sha256().hashString(schema.toString(), StandardCharsets.UTF_8).toString(); if (!this.schemaPaths.containsKey(hashedSchema)) { ...
[ "private", "Path", "getOrGenerateSchemaFile", "(", "Schema", "schema", ")", "throws", "IOException", "{", "Preconditions", ".", "checkNotNull", "(", "schema", ",", "\"Avro Schema should not be null\"", ")", ";", "String", "hashedSchema", "=", "Hashing", ".", "sha256",...
If url for schema already exists, return the url. If not create a new temporary schema file and return a the url.
[ "If", "url", "for", "schema", "already", "exists", "return", "the", "url", ".", "If", "not", "create", "a", "new", "temporary", "schema", "file", "and", "return", "a", "the", "url", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/conversion/hive/avro/AvroSchemaManager.java#L185-L200
Azure/azure-sdk-for-java
compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java
DisksInner.grantAccess
public AccessUriInner grantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { """ Grants access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is c...
java
public AccessUriInner grantAccess(String resourceGroupName, String diskName, GrantAccessData grantAccessData) { return grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).toBlocking().last().body(); }
[ "public", "AccessUriInner", "grantAccess", "(", "String", "resourceGroupName", ",", "String", "diskName", ",", "GrantAccessData", "grantAccessData", ")", "{", "return", "grantAccessWithServiceResponseAsync", "(", "resourceGroupName", ",", "diskName", ",", "grantAccessData",...
Grants access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @param grantAcc...
[ "Grants", "access", "to", "a", "disk", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java#L951-L953
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Attributes.java
Attributes.putValue
public String putValue(String name, String value) { """ Associates the specified value with the specified attribute name, specified as a String. The attributes name is case-insensitive. If the Map previously contained a mapping for the attribute name, the old value is replaced. <p> This method is defined as: ...
java
public String putValue(String name, String value) { return (String)put(new Name(name), value); }
[ "public", "String", "putValue", "(", "String", "name", ",", "String", "value", ")", "{", "return", "(", "String", ")", "put", "(", "new", "Name", "(", "name", ")", ",", "value", ")", ";", "}" ]
Associates the specified value with the specified attribute name, specified as a String. The attributes name is case-insensitive. If the Map previously contained a mapping for the attribute name, the old value is replaced. <p> This method is defined as: <pre> return (String)put(new Attributes.Name(name), value); </pre>...
[ "Associates", "the", "specified", "value", "with", "the", "specified", "attribute", "name", "specified", "as", "a", "String", ".", "The", "attributes", "name", "is", "case", "-", "insensitive", ".", "If", "the", "Map", "previously", "contained", "a", "mapping"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Attributes.java#L168-L170
Azure/azure-sdk-for-java
containerregistry/resource-manager/v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RunsInner.java
RunsInner.getAsync
public Observable<RunInner> getAsync(String resourceGroupName, String registryName, String runId) { """ Gets the detailed information for a given run. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param...
java
public Observable<RunInner> getAsync(String resourceGroupName, String registryName, String runId) { return getWithServiceResponseAsync(resourceGroupName, registryName, runId).map(new Func1<ServiceResponse<RunInner>, RunInner>() { @Override public RunInner call(ServiceResponse<RunInner> r...
[ "public", "Observable", "<", "RunInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "registryName", ",", "String", "runId", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "registryName", ",", "runId", ")", ...
Gets the detailed information for a given run. @param resourceGroupName The name of the resource group to which the container registry belongs. @param registryName The name of the container registry. @param runId The run ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observab...
[ "Gets", "the", "detailed", "information", "for", "a", "given", "run", "." ]
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/RunsInner.java#L383-L390
buschmais/extended-objects
impl/src/main/java/com/buschmais/xo/impl/metadata/MetadataProviderImpl.java
MetadataProviderImpl.isOfDefinitionType
private boolean isOfDefinitionType(AnnotatedType annotatedType, Class<? extends Annotation> definitionType) { """ Determines if an {@link AnnotatedType} represents a specific type identified by a meta annotation. @param annotatedType The {@link AnnotatedType}. @param definitionType The meta annotation. @re...
java
private boolean isOfDefinitionType(AnnotatedType annotatedType, Class<? extends Annotation> definitionType) { Annotation definition = annotatedType.getByMetaAnnotation(definitionType); if (definition != null) { return true; } for (Class<?> superType : annotatedType.getAnnotat...
[ "private", "boolean", "isOfDefinitionType", "(", "AnnotatedType", "annotatedType", ",", "Class", "<", "?", "extends", "Annotation", ">", "definitionType", ")", "{", "Annotation", "definition", "=", "annotatedType", ".", "getByMetaAnnotation", "(", "definitionType", ")...
Determines if an {@link AnnotatedType} represents a specific type identified by a meta annotation. @param annotatedType The {@link AnnotatedType}. @param definitionType The meta annotation. @return <code>true</code> if the annotated type represents relation type.
[ "Determines", "if", "an", "{", "@link", "AnnotatedType", "}", "represents", "a", "specific", "type", "identified", "by", "a", "meta", "annotation", "." ]
train
https://github.com/buschmais/extended-objects/blob/186431e81f3d8d26c511cfe1143dee59b03c2e7a/impl/src/main/java/com/buschmais/xo/impl/metadata/MetadataProviderImpl.java#L241-L252
apereo/cas
support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java
LdapUtils.newLdaptiveSearchFilter
public static SearchFilter newLdaptiveSearchFilter(final String filterQuery, final String paramName, final List<String> params) { """ Constructs a new search filter using {@link SearchExecutor#getSearchFilter()} as a template and the username as a parameter. @param filterQuery the query filter @param paramNam...
java
public static SearchFilter newLdaptiveSearchFilter(final String filterQuery, final String paramName, final List<String> params) { val filter = new SearchFilter(); filter.setFilter(filterQuery); if (params != null) { IntStream.range(0, params.size()).forEach(i -> { if ...
[ "public", "static", "SearchFilter", "newLdaptiveSearchFilter", "(", "final", "String", "filterQuery", ",", "final", "String", "paramName", ",", "final", "List", "<", "String", ">", "params", ")", "{", "val", "filter", "=", "new", "SearchFilter", "(", ")", ";",...
Constructs a new search filter using {@link SearchExecutor#getSearchFilter()} as a template and the username as a parameter. @param filterQuery the query filter @param paramName the param name @param params the username @return Search filter with parameters applied.
[ "Constructs", "a", "new", "search", "filter", "using", "{", "@link", "SearchExecutor#getSearchFilter", "()", "}", "as", "a", "template", "and", "the", "username", "as", "a", "parameter", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java#L525-L539
jMotif/SAX
src/main/java/net/seninp/jmotif/sax/datastructure/SAXRecords.java
SAXRecords.getSimpleMotifs
public ArrayList<SAXRecord> getSimpleMotifs(int num) { """ Get motifs. @param num how many motifs to report. @return the array of motif SAXRecords. """ ArrayList<SAXRecord> res = new ArrayList<SAXRecord>(num); DoublyLinkedSortedList<Entry<String, SAXRecord>> list = new DoublyLinkedSortedList<Entry<...
java
public ArrayList<SAXRecord> getSimpleMotifs(int num) { ArrayList<SAXRecord> res = new ArrayList<SAXRecord>(num); DoublyLinkedSortedList<Entry<String, SAXRecord>> list = new DoublyLinkedSortedList<Entry<String, SAXRecord>>( num, new Comparator<Entry<String, SAXRecord>>() { @Override p...
[ "public", "ArrayList", "<", "SAXRecord", ">", "getSimpleMotifs", "(", "int", "num", ")", "{", "ArrayList", "<", "SAXRecord", ">", "res", "=", "new", "ArrayList", "<", "SAXRecord", ">", "(", "num", ")", ";", "DoublyLinkedSortedList", "<", "Entry", "<", "Str...
Get motifs. @param num how many motifs to report. @return the array of motif SAXRecords.
[ "Get", "motifs", "." ]
train
https://github.com/jMotif/SAX/blob/39ee07a69facaa330def5130b8790aeda85f1061/src/main/java/net/seninp/jmotif/sax/datastructure/SAXRecords.java#L271-L290
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java
WorkerHelper.shredInputStream
public static void shredInputStream(final INodeWriteTrx wtx, final InputStream value, final EShredderInsert child) { """ Shreds a given InputStream @param wtx current write transaction reference @param value InputStream to be shred """ final XMLInputFactory factory = XMLInputFactory.newIn...
java
public static void shredInputStream(final INodeWriteTrx wtx, final InputStream value, final EShredderInsert child) { final XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); XMLEventReader parser; try { pa...
[ "public", "static", "void", "shredInputStream", "(", "final", "INodeWriteTrx", "wtx", ",", "final", "InputStream", "value", ",", "final", "EShredderInsert", "child", ")", "{", "final", "XMLInputFactory", "factory", "=", "XMLInputFactory", ".", "newInstance", "(", ...
Shreds a given InputStream @param wtx current write transaction reference @param value InputStream to be shred
[ "Shreds", "a", "given", "InputStream" ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java#L91-L108
dbmdz/iiif-presentation-api
iiif-presentation-frontend-impl-springmvc/src/main/java/de/digitalcollections/iiif/presentation/frontend/impl/springmvc/controller/v2/IIIFPresentationApiController.java
IIIFPresentationApiController.getManifest
@CrossOrigin(allowedHeaders = { """ The manifest response contains sufficient information for the client to initialize itself and begin to display something quickly to the user. The manifest resource represents a single object and any intellectual work or works embodied within that object. In particular it inclu...
java
@CrossOrigin(allowedHeaders = {"*"}, origins = {"*"}) @RequestMapping(value = {"{identifier}/manifest", "{identifier}"}, method = RequestMethod.GET, produces = "application/json") @ResponseBody public Manifest getManifest(@PathVariable String identifier, HttpServletRequest request) throws NotFoundExcept...
[ "@", "CrossOrigin", "(", "allowedHeaders", "=", "{", "\"*\"", "}", ",", "origins", "=", "{", "\"*\"", "}", ")", "@", "RequestMapping", "(", "value", "=", "{", "\"{identifier}/manifest\"", ",", "\"{identifier}\"", "}", ",", "method", "=", "RequestMethod", "."...
The manifest response contains sufficient information for the client to initialize itself and begin to display something quickly to the user. The manifest resource represents a single object and any intellectual work or works embodied within that object. In particular it includes the descriptive, rights and linking inf...
[ "The", "manifest", "response", "contains", "sufficient", "information", "for", "the", "client", "to", "initialize", "itself", "and", "begin", "to", "display", "something", "quickly", "to", "the", "user", ".", "The", "manifest", "resource", "represents", "a", "si...
train
https://github.com/dbmdz/iiif-presentation-api/blob/8b551d3717eed2620bc9e50b4c23f945b73b9cea/iiif-presentation-frontend-impl-springmvc/src/main/java/de/digitalcollections/iiif/presentation/frontend/impl/springmvc/controller/v2/IIIFPresentationApiController.java#L55-L75
stratosphere/stratosphere
stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/MessagingFunction.java
MessagingFunction.sendMessageTo
public void sendMessageTo(VertexKey target, Message m) { """ Sends the given message to the vertex identified by the given key. If the target vertex does not exist, the next superstep will cause an exception due to a non-deliverable message. @param target The key (id) of the target vertex to message. @param m...
java
public void sendMessageTo(VertexKey target, Message m) { outValue.f0 = target; outValue.f1 = m; out.collect(outValue); }
[ "public", "void", "sendMessageTo", "(", "VertexKey", "target", ",", "Message", "m", ")", "{", "outValue", ".", "f0", "=", "target", ";", "outValue", ".", "f1", "=", "m", ";", "out", ".", "collect", "(", "outValue", ")", ";", "}" ]
Sends the given message to the vertex identified by the given key. If the target vertex does not exist, the next superstep will cause an exception due to a non-deliverable message. @param target The key (id) of the target vertex to message. @param m The message.
[ "Sends", "the", "given", "message", "to", "the", "vertex", "identified", "by", "the", "given", "key", ".", "If", "the", "target", "vertex", "does", "not", "exist", "the", "next", "superstep", "will", "cause", "an", "exception", "due", "to", "a", "non", "...
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-addons/spargel/src/main/java/eu/stratosphere/spargel/java/MessagingFunction.java#L122-L126
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/metadata/CustomMatchingStrategy.java
CustomMatchingStrategy.getCollectionMatchForWebResourceCollection
@Override protected CollectionMatch getCollectionMatchForWebResourceCollection(WebResourceCollection webResourceCollection, String resourceName, String method) { """ Gets the collection match for the web resource collection based on the following custom method algorithm. <pre> Custom method matching use case...
java
@Override protected CollectionMatch getCollectionMatchForWebResourceCollection(WebResourceCollection webResourceCollection, String resourceName, String method) { CollectionMatch match = null; CollectionMatch collectionMatchFound = webResourceCollection.performUrlMatch(resourceName); if (coll...
[ "@", "Override", "protected", "CollectionMatch", "getCollectionMatchForWebResourceCollection", "(", "WebResourceCollection", "webResourceCollection", ",", "String", "resourceName", ",", "String", "method", ")", "{", "CollectionMatch", "match", "=", "null", ";", "CollectionM...
Gets the collection match for the web resource collection based on the following custom method algorithm. <pre> Custom method matching use case. Happy path: 1. Validate the resource name matches one of the URL patterns 2. Validate the method matches 3. Return the collection match found Exceptional path: 1.a If resourc...
[ "Gets", "the", "collection", "match", "for", "the", "web", "resource", "collection", "based", "on", "the", "following", "custom", "method", "algorithm", ".", "<pre", ">", "Custom", "method", "matching", "use", "case", ".", "Happy", "path", ":", "1", ".", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/metadata/CustomMatchingStrategy.java#L83-L97
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
ReflectionUtils.assertNoPrimitiveParameters
public static void assertNoPrimitiveParameters(final Method method, Class<? extends Annotation> annotation) { """ Asserts method don't declare primitive parameters. @param method to validate @param annotation annotation to propagate in exception message """ for (Class<?> type : method.getParameterTyp...
java
public static void assertNoPrimitiveParameters(final Method method, Class<? extends Annotation> annotation) { for (Class<?> type : method.getParameterTypes()) { if (type.isPrimitive()) { throw annotation == null ? MESSAGES.methodCannotDeclarePrimitiveParameters(method) : MES...
[ "public", "static", "void", "assertNoPrimitiveParameters", "(", "final", "Method", "method", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "for", "(", "Class", "<", "?", ">", "type", ":", "method", ".", "getParameterTypes", "(...
Asserts method don't declare primitive parameters. @param method to validate @param annotation annotation to propagate in exception message
[ "Asserts", "method", "don", "t", "declare", "primitive", "parameters", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java#L53-L62
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java
DOMHelper.getNamespaceForPrefix
public String getNamespaceForPrefix(String prefix, Element namespaceContext) { """ Given an XML Namespace prefix and a context in which the prefix is to be evaluated, return the Namespace Name this prefix was bound to. Note that DOM Level 3 is expected to provide a version of this which deals with the DOM's "ea...
java
public String getNamespaceForPrefix(String prefix, Element namespaceContext) { int type; Node parent = namespaceContext; String namespace = null; if (prefix.equals("xml")) { namespace = QName.S_XMLNAMESPACEURI; // Hardcoded, per Namespace spec } else if(prefix.equals("xmlns")) ...
[ "public", "String", "getNamespaceForPrefix", "(", "String", "prefix", ",", "Element", "namespaceContext", ")", "{", "int", "type", ";", "Node", "parent", "=", "namespaceContext", ";", "String", "namespace", "=", "null", ";", "if", "(", "prefix", ".", "equals",...
Given an XML Namespace prefix and a context in which the prefix is to be evaluated, return the Namespace Name this prefix was bound to. Note that DOM Level 3 is expected to provide a version of this which deals with the DOM's "early binding" behavior. Default handling: @param prefix String containing namespace prefix...
[ "Given", "an", "XML", "Namespace", "prefix", "and", "a", "context", "in", "which", "the", "prefix", "is", "to", "be", "evaluated", "return", "the", "Namespace", "Name", "this", "prefix", "was", "bound", "to", ".", "Note", "that", "DOM", "Level", "3", "is...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java#L512-L568
gocd/gocd
util/src/main/java/com/thoughtworks/go/util/Csv.java
Csv.containsRow
public boolean containsRow(Map<String, String> row) { """ Test if this Csv contains specified row. Note: Provided row may only contain part of the columns. @param row Each row is represented as a map, with column name as key, and column value as value @return """ for (CsvRow csvRow : data) { ...
java
public boolean containsRow(Map<String, String> row) { for (CsvRow csvRow : data) { if (csvRow.contains(row)) { return true; } } return false; }
[ "public", "boolean", "containsRow", "(", "Map", "<", "String", ",", "String", ">", "row", ")", "{", "for", "(", "CsvRow", "csvRow", ":", "data", ")", "{", "if", "(", "csvRow", ".", "contains", "(", "row", ")", ")", "{", "return", "true", ";", "}", ...
Test if this Csv contains specified row. Note: Provided row may only contain part of the columns. @param row Each row is represented as a map, with column name as key, and column value as value @return
[ "Test", "if", "this", "Csv", "contains", "specified", "row", ".", "Note", ":", "Provided", "row", "may", "only", "contain", "part", "of", "the", "columns", "." ]
train
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/util/src/main/java/com/thoughtworks/go/util/Csv.java#L80-L87
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/SearchIndex.java
SearchIndex.findChild
public ManagedEntity findChild(ManagedEntity parent, String name) throws RuntimeFault, RemoteException { """ Find a child entity under a ManagedObjectReference in the inventory. @param parent The parent managed entity. @param name The name of the child to search. @return A child entity. @throws RemoteExcep...
java
public ManagedEntity findChild(ManagedEntity parent, String name) throws RuntimeFault, RemoteException { if (parent == null) { throw new IllegalArgumentException("parent entity must not be null."); } ManagedObjectReference mor = getVimService().findChild(getMOR(), parent.getMOR()...
[ "public", "ManagedEntity", "findChild", "(", "ManagedEntity", "parent", ",", "String", "name", ")", "throws", "RuntimeFault", ",", "RemoteException", "{", "if", "(", "parent", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"parent entit...
Find a child entity under a ManagedObjectReference in the inventory. @param parent The parent managed entity. @param name The name of the child to search. @return A child entity. @throws RemoteException @throws RuntimeFault
[ "Find", "a", "child", "entity", "under", "a", "ManagedObjectReference", "in", "the", "inventory", "." ]
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/SearchIndex.java#L172-L178
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java
FilesImpl.deleteFromComputeNode
public void deleteFromComputeNode(String poolId, String nodeId, String filePath) { """ Deletes the specified file from the compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node from which you want to delete the file. @param filePath The path to...
java
public void deleteFromComputeNode(String poolId, String nodeId, String filePath) { deleteFromComputeNodeWithServiceResponseAsync(poolId, nodeId, filePath).toBlocking().single().body(); }
[ "public", "void", "deleteFromComputeNode", "(", "String", "poolId", ",", "String", "nodeId", ",", "String", "filePath", ")", "{", "deleteFromComputeNodeWithServiceResponseAsync", "(", "poolId", ",", "nodeId", ",", "filePath", ")", ".", "toBlocking", "(", ")", ".",...
Deletes the specified file from the compute node. @param poolId The ID of the pool that contains the compute node. @param nodeId The ID of the compute node from which you want to delete the file. @param filePath The path to the file or directory that you want to delete. @throws IllegalArgumentException thrown if param...
[ "Deletes", "the", "specified", "file", "from", "the", "compute", "node", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/FilesImpl.java#L875-L877
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/media/markup/DummyResponsiveImageMediaMarkupBuilder.java
DummyResponsiveImageMediaMarkupBuilder.toReponsiveImageSource
protected JSONObject toReponsiveImageSource(Media media, MediaFormat mediaFormat) { """ Build JSON metadata for one rendition as image source. @param media Media @param mediaFormat Media format @return JSON metadata """ String url = buildDummyImageUrl(mediaFormat); try { JSONObject source = ne...
java
protected JSONObject toReponsiveImageSource(Media media, MediaFormat mediaFormat) { String url = buildDummyImageUrl(mediaFormat); try { JSONObject source = new JSONObject(); source.put(MediaNameConstants.PROP_BREAKPOINT, mediaFormat.getProperties().get(MediaNameConstants.PROP_BREAKPOINT)); sou...
[ "protected", "JSONObject", "toReponsiveImageSource", "(", "Media", "media", ",", "MediaFormat", "mediaFormat", ")", "{", "String", "url", "=", "buildDummyImageUrl", "(", "mediaFormat", ")", ";", "try", "{", "JSONObject", "source", "=", "new", "JSONObject", "(", ...
Build JSON metadata for one rendition as image source. @param media Media @param mediaFormat Media format @return JSON metadata
[ "Build", "JSON", "metadata", "for", "one", "rendition", "as", "image", "source", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/media/markup/DummyResponsiveImageMediaMarkupBuilder.java#L136-L147
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldDetection.java
TldDetection.selectBestRegionsFern
protected void selectBestRegionsFern(double totalP, double totalN) { """ compute the probability that each region is the target conditional upon this image the sumP and sumN are needed for image conditional probability NOTE: This is a big change from the original paper """ for( int i = 0; i < fernInfo.s...
java
protected void selectBestRegionsFern(double totalP, double totalN) { for( int i = 0; i < fernInfo.size; i++ ) { TldRegionFernInfo info = fernInfo.get(i); double probP = info.sumP/totalP; double probN = info.sumN/totalN; // only consider regions with a higher P likelihood if( probP > probN ) { //...
[ "protected", "void", "selectBestRegionsFern", "(", "double", "totalP", ",", "double", "totalN", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "fernInfo", ".", "size", ";", "i", "++", ")", "{", "TldRegionFernInfo", "info", "=", "fernInfo", ...
compute the probability that each region is the target conditional upon this image the sumP and sumN are needed for image conditional probability NOTE: This is a big change from the original paper
[ "compute", "the", "probability", "that", "each", "region", "is", "the", "target", "conditional", "upon", "this", "image", "the", "sumP", "and", "sumN", "are", "needed", "for", "image", "conditional", "probability" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/tracker/tld/TldDetection.java#L189-L217
apollographql/apollo-android
apollo-runtime/src/main/java/com/apollographql/apollo/internal/ApolloCallTracker.java
ApolloCallTracker.activeMutationCalls
@NotNull Set<ApolloMutationCall> activeMutationCalls(@NotNull OperationName operationName) { """ Returns currently active {@link ApolloMutationCall} calls by operation name. @param operationName query operation name @return set of active mutation calls """ return activeCalls(activeMutationCalls, operat...
java
@NotNull Set<ApolloMutationCall> activeMutationCalls(@NotNull OperationName operationName) { return activeCalls(activeMutationCalls, operationName); }
[ "@", "NotNull", "Set", "<", "ApolloMutationCall", ">", "activeMutationCalls", "(", "@", "NotNull", "OperationName", "operationName", ")", "{", "return", "activeCalls", "(", "activeMutationCalls", ",", "operationName", ")", ";", "}" ]
Returns currently active {@link ApolloMutationCall} calls by operation name. @param operationName query operation name @return set of active mutation calls
[ "Returns", "currently", "active", "{", "@link", "ApolloMutationCall", "}", "calls", "by", "operation", "name", "." ]
train
https://github.com/apollographql/apollo-android/blob/a78869a76e17f77e42c7a88f0099914fe7ffa5b6/apollo-runtime/src/main/java/com/apollographql/apollo/internal/ApolloCallTracker.java#L187-L189
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/menu/suckerfish/MenuItemFactory.java
MenuItemFactory.newMenuItem
public static MenuItem newMenuItem(final Class<? extends Page> pageClass, final String resourceModelKey, final Component component, final PageParameters parameters) { """ Creates the menu item. @param pageClass the page class @param resourceModelKey the resource model key @param component the component ...
java
public static MenuItem newMenuItem(final Class<? extends Page> pageClass, final String resourceModelKey, final Component component, final PageParameters parameters) { final BookmarkablePageLink<String> bookmarkablePageLink = new BookmarkablePageLink<>( MenuPanel.LINK_ID, pageClass, parameters); final IMo...
[ "public", "static", "MenuItem", "newMenuItem", "(", "final", "Class", "<", "?", "extends", "Page", ">", "pageClass", ",", "final", "String", "resourceModelKey", ",", "final", "Component", "component", ",", "final", "PageParameters", "parameters", ")", "{", "fina...
Creates the menu item. @param pageClass the page class @param resourceModelKey the resource model key @param component the component @param parameters the {@link PageParameters} @return the suckerfish menu panel. menu item
[ "Creates", "the", "menu", "item", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/menu/suckerfish/MenuItemFactory.java#L97-L106
dottydingo/hyperion
jpa/src/main/java/com/dottydingo/hyperion/jpa/persistence/query/AbstractEntityJpaQueryBuilder.java
AbstractEntityJpaQueryBuilder.createPredicate
protected Predicate createPredicate(Path root, CriteriaQuery<?> query, CriteriaBuilder cb, String propertyName, ComparisonOperator operator, Object argument, PersistenceContext context) { """ Delegate creating of a Predicate to an appropriate method according to operator. ...
java
protected Predicate createPredicate(Path root, CriteriaQuery<?> query, CriteriaBuilder cb, String propertyName, ComparisonOperator operator, Object argument, PersistenceContext context) { logger.debug("Creating criterion: {} {} {}", propertyName, operator, argument); ...
[ "protected", "Predicate", "createPredicate", "(", "Path", "root", ",", "CriteriaQuery", "<", "?", ">", "query", ",", "CriteriaBuilder", "cb", ",", "String", "propertyName", ",", "ComparisonOperator", "operator", ",", "Object", "argument", ",", "PersistenceContext", ...
Delegate creating of a Predicate to an appropriate method according to operator. @param root root @param query query @param propertyName property name @param operator comparison operator @param argument argument @param context context @return Predicate
[ "Delegate", "creating", "of", "a", "Predicate", "to", "an", "appropriate", "method", "according", "to", "operator", "." ]
train
https://github.com/dottydingo/hyperion/blob/c4d119c90024a88c0335d7d318e9ccdb70149764/jpa/src/main/java/com/dottydingo/hyperion/jpa/persistence/query/AbstractEntityJpaQueryBuilder.java#L43-L86
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/KeyDecoder.java
KeyDecoder.decodeBooleanDesc
public static boolean decodeBooleanDesc(byte[] src, int srcOffset) throws CorruptEncodingException { """ Decodes a boolean from exactly 1 byte, as encoded for descending order. @param src source of encoded bytes @param srcOffset offset into source array @return boolean value """ try { ...
java
public static boolean decodeBooleanDesc(byte[] src, int srcOffset) throws CorruptEncodingException { try { return src[srcOffset] == 127; } catch (IndexOutOfBoundsException e) { throw new CorruptEncodingException(null, e); } }
[ "public", "static", "boolean", "decodeBooleanDesc", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ")", "throws", "CorruptEncodingException", "{", "try", "{", "return", "src", "[", "srcOffset", "]", "==", "127", ";", "}", "catch", "(", "IndexOutOfBou...
Decodes a boolean from exactly 1 byte, as encoded for descending order. @param src source of encoded bytes @param srcOffset offset into source array @return boolean value
[ "Decodes", "a", "boolean", "from", "exactly", "1", "byte", "as", "encoded", "for", "descending", "order", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/KeyDecoder.java#L234-L242
micrometer-metrics/micrometer
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/HazelcastCacheMetrics.java
HazelcastCacheMetrics.monitor
public static <K, V, C extends IMap<K, V>> C monitor(MeterRegistry registry, C cache, Iterable<Tag> tags) { """ Record metrics on a Hazelcast cache. @param registry The registry to bind metrics to. @param cache The cache to instrument. @param tags Tags to apply to all recorded metrics. @param <C> ...
java
public static <K, V, C extends IMap<K, V>> C monitor(MeterRegistry registry, C cache, Iterable<Tag> tags) { new HazelcastCacheMetrics(cache, tags).bindTo(registry); return cache; }
[ "public", "static", "<", "K", ",", "V", ",", "C", "extends", "IMap", "<", "K", ",", "V", ">", ">", "C", "monitor", "(", "MeterRegistry", "registry", ",", "C", "cache", ",", "Iterable", "<", "Tag", ">", "tags", ")", "{", "new", "HazelcastCacheMetrics"...
Record metrics on a Hazelcast cache. @param registry The registry to bind metrics to. @param cache The cache to instrument. @param tags Tags to apply to all recorded metrics. @param <C> The cache type. @param <K> The cache key type. @param <V> The cache value type. @return The instrumented cache,...
[ "Record", "metrics", "on", "a", "Hazelcast", "cache", "." ]
train
https://github.com/micrometer-metrics/micrometer/blob/127fa3265325cc894f368312ed8890b76a055d88/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/cache/HazelcastCacheMetrics.java#L62-L65
fcrepo3/fcrepo
fcrepo-common/src/main/java/org/fcrepo/utilities/FileUtils.java
FileUtils.copy
public static boolean copy(InputStream source, ByteBuffer destination) { """ This method should only be used when the ByteBuffer is known to be able to accomodate the input! @param source @param destination @return success of the operation """ try { byte [] buffer = new byte[4096]; ...
java
public static boolean copy(InputStream source, ByteBuffer destination) { try { byte [] buffer = new byte[4096]; int n = 0; while (-1 != (n = source.read(buffer))) { destination.put(buffer, 0, n); } return true; } catch (IOExcept...
[ "public", "static", "boolean", "copy", "(", "InputStream", "source", ",", "ByteBuffer", "destination", ")", "{", "try", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "4096", "]", ";", "int", "n", "=", "0", ";", "while", "(", "-", "1", "...
This method should only be used when the ByteBuffer is known to be able to accomodate the input! @param source @param destination @return success of the operation
[ "This", "method", "should", "only", "be", "used", "when", "the", "ByteBuffer", "is", "known", "to", "be", "able", "to", "accomodate", "the", "input!" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-common/src/main/java/org/fcrepo/utilities/FileUtils.java#L58-L69
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java
Searcher.searchInFile
public static void searchInFile(Pattern p, String inFile, String outFile) throws FileNotFoundException { """ Searches a pattern reading the model from the given file, and creates another model that is excised using the matching patterns. @param p pattern to search for @param inFile filename for the model to sea...
java
public static void searchInFile(Pattern p, String inFile, String outFile) throws FileNotFoundException { searchInFile(p, inFile, outFile, Integer.MAX_VALUE, Integer.MAX_VALUE); }
[ "public", "static", "void", "searchInFile", "(", "Pattern", "p", ",", "String", "inFile", ",", "String", "outFile", ")", "throws", "FileNotFoundException", "{", "searchInFile", "(", "p", ",", "inFile", ",", "outFile", ",", "Integer", ".", "MAX_VALUE", ",", "...
Searches a pattern reading the model from the given file, and creates another model that is excised using the matching patterns. @param p pattern to search for @param inFile filename for the model to search in @param outFile filename for the result model @throws FileNotFoundException when no file exists
[ "Searches", "a", "pattern", "reading", "the", "model", "from", "the", "given", "file", "and", "creates", "another", "model", "that", "is", "excised", "using", "the", "matching", "patterns", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/Searcher.java#L327-L330
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/JobInProgress.java
JobInProgress.updateJobInfo
synchronized void updateJobInfo(long startTime, long launchTime) { """ Update the job start/launch time (upon restart) and log to history """ // log and change to the job's start/launch time this.startTime = startTime; this.launchTime = launchTime; JobHistory.JobInfo.logJobInfo(jobId, startTime...
java
synchronized void updateJobInfo(long startTime, long launchTime) { // log and change to the job's start/launch time this.startTime = startTime; this.launchTime = launchTime; JobHistory.JobInfo.logJobInfo(jobId, startTime, launchTime); }
[ "synchronized", "void", "updateJobInfo", "(", "long", "startTime", ",", "long", "launchTime", ")", "{", "// log and change to the job's start/launch time", "this", ".", "startTime", "=", "startTime", ";", "this", ".", "launchTime", "=", "launchTime", ";", "JobHistory"...
Update the job start/launch time (upon restart) and log to history
[ "Update", "the", "job", "start", "/", "launch", "time", "(", "upon", "restart", ")", "and", "log", "to", "history" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/JobInProgress.java#L1003-L1008
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.serviceName_vrack_vrack_DELETE
public net.minidev.ovh.api.vrack.OvhTask serviceName_vrack_vrack_DELETE(String serviceName, String vrack) throws IOException { """ remove this dedicatedCloud (VmNetwork) from this vrack REST: DELETE /dedicatedCloud/{serviceName}/vrack/{vrack} @param serviceName [required] Domain of the service @param vrack [r...
java
public net.minidev.ovh.api.vrack.OvhTask serviceName_vrack_vrack_DELETE(String serviceName, String vrack) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/vrack/{vrack}"; StringBuilder sb = path(qPath, serviceName, vrack); String resp = exec(qPath, "DELETE", sb.toString(), null); return conver...
[ "public", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "vrack", ".", "OvhTask", "serviceName_vrack_vrack_DELETE", "(", "String", "serviceName", ",", "String", "vrack", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/{serviceNam...
remove this dedicatedCloud (VmNetwork) from this vrack REST: DELETE /dedicatedCloud/{serviceName}/vrack/{vrack} @param serviceName [required] Domain of the service @param vrack [required] vrack name
[ "remove", "this", "dedicatedCloud", "(", "VmNetwork", ")", "from", "this", "vrack" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L1270-L1275
duracloud/duracloud
durastore/src/main/java/org/duracloud/durastore/rest/SpaceRest.java
SpaceRest.updateSpaceACLs
@Path("/acl/ { """ This method sets the ACLs associated with a space. Only values included in the ACLs headers will be updated, others will be removed. @return 200 response """spaceID}") @POST public Response updateSpaceACLs(@PathParam("spaceID") String spaceID, ...
java
@Path("/acl/{spaceID}") @POST public Response updateSpaceACLs(@PathParam("spaceID") String spaceID, @QueryParam("storeID") String storeID) { String msg = "update space ACLs(" + spaceID + ", " + storeID + ")"; try { log.debug(msg); retu...
[ "@", "Path", "(", "\"/acl/{spaceID}\"", ")", "@", "POST", "public", "Response", "updateSpaceACLs", "(", "@", "PathParam", "(", "\"spaceID\"", ")", "String", "spaceID", ",", "@", "QueryParam", "(", "\"storeID\"", ")", "String", "storeID", ")", "{", "String", ...
This method sets the ACLs associated with a space. Only values included in the ACLs headers will be updated, others will be removed. @return 200 response
[ "This", "method", "sets", "the", "ACLs", "associated", "with", "a", "space", ".", "Only", "values", "included", "in", "the", "ACLs", "headers", "will", "be", "updated", "others", "will", "be", "removed", "." ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/durastore/src/main/java/org/duracloud/durastore/rest/SpaceRest.java#L288-L307
michael-rapp/AndroidBottomSheet
library/src/main/java/de/mrapp/android/bottomsheet/view/DraggableView.java
DraggableView.createAnimationListener
private AnimationListener createAnimationListener(final boolean show, final boolean cancel) { """ Creates and returns a listener, which allows to handle the end of an animation, which has been used to show or hide the view. @param show True, if the view should be shown at the end of the animation, false other...
java
private AnimationListener createAnimationListener(final boolean show, final boolean cancel) { return new AnimationListener() { @Override public void onAnimationStart(final Animation animation) { } @Override public void onAnimationEnd(final Animation...
[ "private", "AnimationListener", "createAnimationListener", "(", "final", "boolean", "show", ",", "final", "boolean", "cancel", ")", "{", "return", "new", "AnimationListener", "(", ")", "{", "@", "Override", "public", "void", "onAnimationStart", "(", "final", "Anim...
Creates and returns a listener, which allows to handle the end of an animation, which has been used to show or hide the view. @param show True, if the view should be shown at the end of the animation, false otherwise @param cancel True, if the view should be canceled, false otherwise @return The listener, which has be...
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "handle", "the", "end", "of", "an", "animation", "which", "has", "been", "used", "to", "show", "or", "hide", "the", "view", "." ]
train
https://github.com/michael-rapp/AndroidBottomSheet/blob/6e4690ee9f63b14a7b143d3a3717b5f8a11ca503/library/src/main/java/de/mrapp/android/bottomsheet/view/DraggableView.java#L331-L357
zk1931/jzab
src/main/java/com/github/zk1931/jzab/PersistentState.java
PersistentState.setSnapshotFile
File setSnapshotFile(File tempFile, Zxid zxid) throws IOException { """ Turns a temporary snapshot file into a valid snapshot file. @param tempFile the temporary file which stores current state. @param zxid the last applied zxid for state machine. @return the snapshot file. """ File snapshot = n...
java
File setSnapshotFile(File tempFile, Zxid zxid) throws IOException { File snapshot = new File(dataDir, String.format("snapshot.%s", zxid.toSimpleString())); LOG.debug("Atomically move snapshot file to {}", snapshot); FileUtils.atomicMove(tempFile, snapshot); // Since the new snapshot file gets crea...
[ "File", "setSnapshotFile", "(", "File", "tempFile", ",", "Zxid", "zxid", ")", "throws", "IOException", "{", "File", "snapshot", "=", "new", "File", "(", "dataDir", ",", "String", ".", "format", "(", "\"snapshot.%s\"", ",", "zxid", ".", "toSimpleString", "(",...
Turns a temporary snapshot file into a valid snapshot file. @param tempFile the temporary file which stores current state. @param zxid the last applied zxid for state machine. @return the snapshot file.
[ "Turns", "a", "temporary", "snapshot", "file", "into", "a", "valid", "snapshot", "file", "." ]
train
https://github.com/zk1931/jzab/blob/2a8893bcc1a125f3aebdaddee80ad49c9761bba1/src/main/java/com/github/zk1931/jzab/PersistentState.java#L286-L294
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESFilterBuilder.java
ESFilterBuilder.populateBetweenFilter
private QueryBuilder populateBetweenFilter(BetweenExpression betweenExpression, EntityMetadata m) { """ Populate between filter. @param betweenExpression the between expression @param m the m @param entity the entity @return the filter builder """ String lowerBoundExpression = getBetweenBounda...
java
private QueryBuilder populateBetweenFilter(BetweenExpression betweenExpression, EntityMetadata m) { String lowerBoundExpression = getBetweenBoundaryValues(betweenExpression.getLowerBoundExpression()); String upperBoundExpression = getBetweenBoundaryValues(betweenExpression.getUpperBoundExpression())...
[ "private", "QueryBuilder", "populateBetweenFilter", "(", "BetweenExpression", "betweenExpression", ",", "EntityMetadata", "m", ")", "{", "String", "lowerBoundExpression", "=", "getBetweenBoundaryValues", "(", "betweenExpression", ".", "getLowerBoundExpression", "(", ")", ")...
Populate between filter. @param betweenExpression the between expression @param m the m @param entity the entity @return the filter builder
[ "Populate", "between", "filter", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESFilterBuilder.java#L253-L265
wildfly/wildfly-core
embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java
EmbeddedProcessFactory.createHostController
public static HostController createHostController(String jbossHomePath, String modulePath, String[] systemPackages, String[] cmdargs) { """ Create an embedded host controller. @param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty. @param modulePath t...
java
public static HostController createHostController(String jbossHomePath, String modulePath, String[] systemPackages, String[] cmdargs) { if (jbossHomePath == null || jbossHomePath.isEmpty()) { throw EmbeddedLogger.ROOT_LOGGER.invalidJBossHome(jbossHomePath); } File jbossHomeDir = new ...
[ "public", "static", "HostController", "createHostController", "(", "String", "jbossHomePath", ",", "String", "modulePath", ",", "String", "[", "]", "systemPackages", ",", "String", "[", "]", "cmdargs", ")", "{", "if", "(", "jbossHomePath", "==", "null", "||", ...
Create an embedded host controller. @param jbossHomePath the location of the root of the host controller installation. Cannot be {@code null} or empty. @param modulePath the location of the root of the module repository. May be {@code null} if the standard location under {@code jbossHomePath} should be used @param sys...
[ "Create", "an", "embedded", "host", "controller", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/embedded/src/main/java/org/wildfly/core/embedded/EmbeddedProcessFactory.java#L206-L221
hsiafan/requests
src/main/java/net/dongliu/requests/utils/CookieDateUtil.java
CookieDateUtil.formatDate
public static String formatDate(Date date, String pattern) { """ Formats the given date according to the specified pattern. The pattern must conform to that used by the {@link SimpleDateFormat simple date format} class. @param date The date to format. @param pattern The pattern to use for formatting the ...
java
public static String formatDate(Date date, String pattern) { SimpleDateFormat formatter = new SimpleDateFormat(pattern, Locale.US); formatter.setTimeZone(GMT); return formatter.format(date); }
[ "public", "static", "String", "formatDate", "(", "Date", "date", ",", "String", "pattern", ")", "{", "SimpleDateFormat", "formatter", "=", "new", "SimpleDateFormat", "(", "pattern", ",", "Locale", ".", "US", ")", ";", "formatter", ".", "setTimeZone", "(", "G...
Formats the given date according to the specified pattern. The pattern must conform to that used by the {@link SimpleDateFormat simple date format} class. @param date The date to format. @param pattern The pattern to use for formatting the date. @return A formatted date string. @throws IllegalArgumentException If ...
[ "Formats", "the", "given", "date", "according", "to", "the", "specified", "pattern", ".", "The", "pattern", "must", "conform", "to", "that", "used", "by", "the", "{", "@link", "SimpleDateFormat", "simple", "date", "format", "}", "class", "." ]
train
https://github.com/hsiafan/requests/blob/a6cc6f8293e808cc937d3789aec2616a8383dee0/src/main/java/net/dongliu/requests/utils/CookieDateUtil.java#L137-L141
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/util/partition/Partitioner.java
Partitioner.getSize
public PartitionSize getSize(Date first, Date last, int maxP) { """ Attempt to find the smallest PartitionSize implementation which, spanning the range first and last specified, produces at most maxP partitions. @param first Date of beginning of time range @param last Date of end of time range @param maxP maxi...
java
public PartitionSize getSize(Date first, Date last, int maxP) { long diffMS = last.getTime() - first.getTime(); for(PartitionSize pa : sizes) { long maxMS = maxP * pa.intervalMS(); if(maxMS > diffMS) { return pa; } } return twoYearSize; }
[ "public", "PartitionSize", "getSize", "(", "Date", "first", ",", "Date", "last", ",", "int", "maxP", ")", "{", "long", "diffMS", "=", "last", ".", "getTime", "(", ")", "-", "first", ".", "getTime", "(", ")", ";", "for", "(", "PartitionSize", "pa", ":...
Attempt to find the smallest PartitionSize implementation which, spanning the range first and last specified, produces at most maxP partitions. @param first Date of beginning of time range @param last Date of end of time range @param maxP maximum number of Partitions to use @return a PartitionSize object which will div...
[ "Attempt", "to", "find", "the", "smallest", "PartitionSize", "implementation", "which", "spanning", "the", "range", "first", "and", "last", "specified", "produces", "at", "most", "maxP", "partitions", "." ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/util/partition/Partitioner.java#L135-L144
Pi4J/pi4j
pi4j-device/src/main/java/com/pi4j/component/potentiometer/microchip/impl/MicrochipPotentiometerDeviceController.java
MicrochipPotentiometerDeviceController.decrease
public void decrease(final DeviceControllerChannel channel, final int steps) throws IOException { """ Decrements the volatile wiper for the given number steps. @param channel Which wiper @param steps The number of steps @throws IOException Thrown if communication fails or device returned a malformed result...
java
public void decrease(final DeviceControllerChannel channel, final int steps) throws IOException { if (channel == null) { throw new RuntimeException("null-channel is not allowed. For devices " + "knowing just one wiper Channel.A is mandatory for " + "parameter 'channel'"); } // decrease only work...
[ "public", "void", "decrease", "(", "final", "DeviceControllerChannel", "channel", ",", "final", "int", "steps", ")", "throws", "IOException", "{", "if", "(", "channel", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"null-channel is not allowed...
Decrements the volatile wiper for the given number steps. @param channel Which wiper @param steps The number of steps @throws IOException Thrown if communication fails or device returned a malformed result
[ "Decrements", "the", "volatile", "wiper", "for", "the", "given", "number", "steps", "." ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-device/src/main/java/com/pi4j/component/potentiometer/microchip/impl/MicrochipPotentiometerDeviceController.java#L181-L195
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/ReceiveQueueProxy.java
ReceiveQueueProxy.updateRemoteFilterProperties
public void updateRemoteFilterProperties(BaseMessageFilter messageFilter, Object[][] properties, Map<String,Object> propFilter) throws RemoteException { """ Update this filter with this new information. @param messageFilter The message filter I am updating. @param properties New filter information (ie, bookmark=...
java
public void updateRemoteFilterProperties(BaseMessageFilter messageFilter, Object[][] properties, Map<String,Object> propFilter) throws RemoteException { BaseTransport transport = this.createProxyTransport(REMOVE_REMOTE_MESSAGE_FILTER); transport.addParam(FILTER, messageFilter); // Don't use COMMAN...
[ "public", "void", "updateRemoteFilterProperties", "(", "BaseMessageFilter", "messageFilter", ",", "Object", "[", "]", "[", "]", "properties", ",", "Map", "<", "String", ",", "Object", ">", "propFilter", ")", "throws", "RemoteException", "{", "BaseTransport", "tran...
Update this filter with this new information. @param messageFilter The message filter I am updating. @param properties New filter information (ie, bookmark=345).
[ "Update", "this", "filter", "with", "this", "new", "information", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/ReceiveQueueProxy.java#L114-L121
groupon/odo
proxyui/src/main/java/com/groupon/odo/controllers/GroupController.java
GroupController.removeOverride
@RequestMapping(value = "api/group/ { """ Remove an override from a group @param model @param overrideId @return """groupId}/{overrideId}", method = RequestMethod.DELETE) public @ResponseBody String removeOverride(Model model, @PathVariable int overrideId) { pathOverrideService.removeO...
java
@RequestMapping(value = "api/group/{groupId}/{overrideId}", method = RequestMethod.DELETE) public @ResponseBody String removeOverride(Model model, @PathVariable int overrideId) { pathOverrideService.removeOverride(overrideId); return null; }
[ "@", "RequestMapping", "(", "value", "=", "\"api/group/{groupId}/{overrideId}\"", ",", "method", "=", "RequestMethod", ".", "DELETE", ")", "public", "@", "ResponseBody", "String", "removeOverride", "(", "Model", "model", ",", "@", "PathVariable", "int", "overrideId"...
Remove an override from a group @param model @param overrideId @return
[ "Remove", "an", "override", "from", "a", "group" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxyui/src/main/java/com/groupon/odo/controllers/GroupController.java#L177-L183
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java
UnboundTypeReference.canResolveTo
public boolean canResolveTo(LightweightTypeReference reference) { """ Returns true if the existing hints would allow to resolve to the given reference. """ if (internalIsResolved()) return reference.isAssignableFrom(resolvedTo, new TypeConformanceComputationArgument(false, true, true, true, false, false /...
java
public boolean canResolveTo(LightweightTypeReference reference) { if (internalIsResolved()) return reference.isAssignableFrom(resolvedTo, new TypeConformanceComputationArgument(false, true, true, true, false, false /* TODO do we need to support synonmys here? */)); List<LightweightBoundTypeArgument> hints = getA...
[ "public", "boolean", "canResolveTo", "(", "LightweightTypeReference", "reference", ")", "{", "if", "(", "internalIsResolved", "(", ")", ")", "return", "reference", ".", "isAssignableFrom", "(", "resolvedTo", ",", "new", "TypeConformanceComputationArgument", "(", "fals...
Returns true if the existing hints would allow to resolve to the given reference.
[ "Returns", "true", "if", "the", "existing", "hints", "would", "allow", "to", "resolve", "to", "the", "given", "reference", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/references/UnboundTypeReference.java#L147-L155
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasConstraintUtils.java
KerasConstraintUtils.mapConstraint
public static LayerConstraint mapConstraint(String kerasConstraint, KerasLayerConfiguration conf, Map<String, Object> constraintConfig) throws UnsupportedKerasConfigurationException { """ Map Keras to DL4J constraint. @param kerasConstraint String cont...
java
public static LayerConstraint mapConstraint(String kerasConstraint, KerasLayerConfiguration conf, Map<String, Object> constraintConfig) throws UnsupportedKerasConfigurationException { LayerConstraint constraint; if (kerasConstraint.equals(conf....
[ "public", "static", "LayerConstraint", "mapConstraint", "(", "String", "kerasConstraint", ",", "KerasLayerConfiguration", "conf", ",", "Map", "<", "String", ",", "Object", ">", "constraintConfig", ")", "throws", "UnsupportedKerasConfigurationException", "{", "LayerConstra...
Map Keras to DL4J constraint. @param kerasConstraint String containing Keras constraint name @param conf Keras layer configuration @return DL4J LayerConstraint @see LayerConstraint
[ "Map", "Keras", "to", "DL4J", "constraint", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/utils/KerasConstraintUtils.java#L48-L79
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_http_farm_farmId_PUT
public void serviceName_http_farm_farmId_PUT(String serviceName, Long farmId, OvhBackendHttp body) throws IOException { """ Alter this object properties REST: PUT /ipLoadbalancing/{serviceName}/http/farm/{farmId} @param body [required] New object properties @param serviceName [required] The internal name of y...
java
public void serviceName_http_farm_farmId_PUT(String serviceName, Long farmId, OvhBackendHttp body) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/http/farm/{farmId}"; StringBuilder sb = path(qPath, serviceName, farmId); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_http_farm_farmId_PUT", "(", "String", "serviceName", ",", "Long", "farmId", ",", "OvhBackendHttp", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/http/farm/{farmId}\"", ";", "StringBuilder"...
Alter this object properties REST: PUT /ipLoadbalancing/{serviceName}/http/farm/{farmId} @param body [required] New object properties @param serviceName [required] The internal name of your IP load balancing @param farmId [required] Id of your farm
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L379-L383
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/fieldaccessor/FieldAccessor.java
FieldAccessor.setMapPosition
public void setMapPosition(final Object targetObj, final CellPosition position, final String key) { """ {@link XlsMapColumns}フィールド用の位置情報を設定します。 <p>位置情報を保持するフィールドがない場合は、処理はスキップされます。</p> @param targetObj フィールドが定義されているクラスのインスタンス @param position 位置情報 @param key マップのキー @throws IllegalArgumentException {@literal ...
java
public void setMapPosition(final Object targetObj, final CellPosition position, final String key) { ArgUtils.notNull(targetObj, "targetObj"); ArgUtils.notNull(position, "position"); ArgUtils.notEmpty(key, "key"); mapPositionSetter.ifPresent(setter -> setter.set(ta...
[ "public", "void", "setMapPosition", "(", "final", "Object", "targetObj", ",", "final", "CellPosition", "position", ",", "final", "String", "key", ")", "{", "ArgUtils", ".", "notNull", "(", "targetObj", ",", "\"targetObj\"", ")", ";", "ArgUtils", ".", "notNull"...
{@link XlsMapColumns}フィールド用の位置情報を設定します。 <p>位置情報を保持するフィールドがない場合は、処理はスキップされます。</p> @param targetObj フィールドが定義されているクラスのインスタンス @param position 位置情報 @param key マップのキー @throws IllegalArgumentException {@literal targetObj == null or position == null or key == null} @throws IllegalArgumentException {@literal key is empty.}
[ "{", "@link", "XlsMapColumns", "}", "フィールド用の位置情報を設定します。", "<p", ">", "位置情報を保持するフィールドがない場合は、処理はスキップされます。<", "/", "p", ">" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/fieldaccessor/FieldAccessor.java#L385-L393
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java
SightResourcesImpl.moveSight
public Sight moveSight(long sightId, ContainerDestination destination) throws SmartsheetException { """ Creates s copy of the specified Sight. It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/move @param sightId the Id of the Sight @param destination the destination to copy to ...
java
public Sight moveSight(long sightId, ContainerDestination destination) throws SmartsheetException { return this.createResource("sights/" + sightId + "/move", Sight.class, destination); }
[ "public", "Sight", "moveSight", "(", "long", "sightId", ",", "ContainerDestination", "destination", ")", "throws", "SmartsheetException", "{", "return", "this", ".", "createResource", "(", "\"sights/\"", "+", "sightId", "+", "\"/move\"", ",", "Sight", ".", "class"...
Creates s copy of the specified Sight. It mirrors to the following Smartsheet REST API method: POST /sights/{sightId}/move @param sightId the Id of the Sight @param destination the destination to copy to @return the newly created Sight resource. @throws IllegalArgumentException if any argument is null or empty string...
[ "Creates", "s", "copy", "of", "the", "specified", "Sight", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SightResourcesImpl.java#L203-L205
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicBondGenerator.java
BasicBondGenerator.generateInnerElement
public LineElement generateInnerElement(IBond bond, IRing ring, RendererModel model) { """ Make the inner ring bond, which is slightly shorter than the outer bond. @param bond the ring bond @param ring the ring that the bond is in @param model the renderer model @return the line element """ Point...
java
public LineElement generateInnerElement(IBond bond, IRing ring, RendererModel model) { Point2d center = GeometryUtil.get2DCenter(ring); Point2d a = bond.getBegin().getPoint2d(); Point2d b = bond.getEnd().getPoint2d(); // the proportion to move in towards the ring center double d...
[ "public", "LineElement", "generateInnerElement", "(", "IBond", "bond", ",", "IRing", "ring", ",", "RendererModel", "model", ")", "{", "Point2d", "center", "=", "GeometryUtil", ".", "get2DCenter", "(", "ring", ")", ";", "Point2d", "a", "=", "bond", ".", "getB...
Make the inner ring bond, which is slightly shorter than the outer bond. @param bond the ring bond @param ring the ring that the bond is in @param model the renderer model @return the line element
[ "Make", "the", "inner", "ring", "bond", "which", "is", "slightly", "shorter", "than", "the", "outer", "bond", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicBondGenerator.java#L399-L424
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/utilities/StringUtility.java
StringUtility.splitAndIndent
@Deprecated public static String splitAndIndent(String str, int indent, int numChars) { """ Method that attempts to break a string up into lines no longer than the specified line length. <p>The string is assumed to a large chunk of undifferentiated text such as base 64 encoded binary data. @param str ...
java
@Deprecated public static String splitAndIndent(String str, int indent, int numChars) { final int inputLength = str.length(); // to prevent resizing, we can predict the size of the indented string // the formatting addition is the indent spaces plus a newline // this length is added ...
[ "@", "Deprecated", "public", "static", "String", "splitAndIndent", "(", "String", "str", ",", "int", "indent", ",", "int", "numChars", ")", "{", "final", "int", "inputLength", "=", "str", ".", "length", "(", ")", ";", "// to prevent resizing, we can predict the ...
Method that attempts to break a string up into lines no longer than the specified line length. <p>The string is assumed to a large chunk of undifferentiated text such as base 64 encoded binary data. @param str The input string to be split into lines. @param indent The number of spaces to insert at the start of each l...
[ "Method", "that", "attempts", "to", "break", "a", "string", "up", "into", "lines", "no", "longer", "than", "the", "specified", "line", "length", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/utilities/StringUtility.java#L83-L106
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/BeanUtils.java
BeanUtils.setterMethod
public static Method setterMethod(Class<?> target, Class<?> componentClass) { """ Returns a Method object corresponding to a setter that sets an instance of componentClass from target. @param target class that the setter should exist on @param componentClass component to set @return Method object, or ...
java
public static Method setterMethod(Class<?> target, Class<?> componentClass) { try { return target.getMethod(setterName(componentClass), componentClass); } catch (NoSuchMethodException e) { //if (log.isTraceEnabled()) log.trace("Unable to find method " + setterName(componentClass) + "...
[ "public", "static", "Method", "setterMethod", "(", "Class", "<", "?", ">", "target", ",", "Class", "<", "?", ">", "componentClass", ")", "{", "try", "{", "return", "target", ".", "getMethod", "(", "setterName", "(", "componentClass", ")", ",", "componentCl...
Returns a Method object corresponding to a setter that sets an instance of componentClass from target. @param target class that the setter should exist on @param componentClass component to set @return Method object, or null of one does not exist
[ "Returns", "a", "Method", "object", "corresponding", "to", "a", "setter", "that", "sets", "an", "instance", "of", "componentClass", "from", "target", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/BeanUtils.java#L101-L112
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getStorageAccountsWithServiceResponseAsync
public Observable<ServiceResponse<Page<StorageAccountItem>>> getStorageAccountsWithServiceResponseAsync(final String vaultBaseUrl, final Integer maxresults) { """ List storage accounts managed by the specified key vault. This operation requires the storage/list permission. @param vaultBaseUrl The vault name, fo...
java
public Observable<ServiceResponse<Page<StorageAccountItem>>> getStorageAccountsWithServiceResponseAsync(final String vaultBaseUrl, final Integer maxresults) { return getStorageAccountsSinglePageAsync(vaultBaseUrl, maxresults) .concatMap(new Func1<ServiceResponse<Page<StorageAccountItem>>, Observable...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "StorageAccountItem", ">", ">", ">", "getStorageAccountsWithServiceResponseAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "Integer", "maxresults", ")", "{", "return", "getStorageAccountsSin...
List storage accounts managed by the specified key vault. This operation requires the storage/list permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results. @th...
[ "List", "storage", "accounts", "managed", "by", "the", "specified", "key", "vault", ".", "This", "operation", "requires", "the", "storage", "/", "list", "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#L8960-L8972
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/XfaForm.java
XfaForm.setNodeText
public void setNodeText(Node n, String text) { """ Sets the text of this node. All the child's node are deleted and a new child text node is created. @param n the <CODE>Node</CODE> to add the text to @param text the text to add """ if (n == null) return; Node nc = null; w...
java
public void setNodeText(Node n, String text) { if (n == null) return; Node nc = null; while ((nc = n.getFirstChild()) != null) { n.removeChild(nc); } if (n.getAttributes().getNamedItemNS(XFA_DATA_SCHEMA, "dataNode") != null) n.getAttributes().r...
[ "public", "void", "setNodeText", "(", "Node", "n", ",", "String", "text", ")", "{", "if", "(", "n", "==", "null", ")", "return", ";", "Node", "nc", "=", "null", ";", "while", "(", "(", "nc", "=", "n", ".", "getFirstChild", "(", ")", ")", "!=", ...
Sets the text of this node. All the child's node are deleted and a new child text node is created. @param n the <CODE>Node</CODE> to add the text to @param text the text to add
[ "Sets", "the", "text", "of", "this", "node", ".", "All", "the", "child", "s", "node", "are", "deleted", "and", "a", "new", "child", "text", "node", "is", "created", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/XfaForm.java#L351-L362
brunocvcunha/inutils4j
src/main/java/org/brunocvcunha/inutils4j/MyNumberUtils.java
MyNumberUtils.randomIntBetween
public static int randomIntBetween(int min, int max) { """ Returns an integer between interval @param min Minimum value @param max Maximum value @return int number """ Random rand = new Random(); return rand.nextInt((max - min) + 1) + min; }
java
public static int randomIntBetween(int min, int max) { Random rand = new Random(); return rand.nextInt((max - min) + 1) + min; }
[ "public", "static", "int", "randomIntBetween", "(", "int", "min", ",", "int", "max", ")", "{", "Random", "rand", "=", "new", "Random", "(", ")", ";", "return", "rand", ".", "nextInt", "(", "(", "max", "-", "min", ")", "+", "1", ")", "+", "min", "...
Returns an integer between interval @param min Minimum value @param max Maximum value @return int number
[ "Returns", "an", "integer", "between", "interval" ]
train
https://github.com/brunocvcunha/inutils4j/blob/223c4443c2cee662576ce644e552588fa114aa94/src/main/java/org/brunocvcunha/inutils4j/MyNumberUtils.java#L34-L37
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/GeoPackageOverlayFactory.java
GeoPackageOverlayFactory.getLinkedFeatureOverlay
public static BoundedOverlay getLinkedFeatureOverlay(FeatureOverlay featureOverlay, GeoPackage geoPackage) { """ Create a composite overlay linking the feature overly with @param featureOverlay feature overlay @param geoPackage GeoPackage @return linked bounded overlay """ BoundedOverlay over...
java
public static BoundedOverlay getLinkedFeatureOverlay(FeatureOverlay featureOverlay, GeoPackage geoPackage) { BoundedOverlay overlay; // Get the linked tile daos FeatureTileTableLinker linker = new FeatureTileTableLinker(geoPackage); List<TileDao> tileDaos = linker.getTileDaosForFeature...
[ "public", "static", "BoundedOverlay", "getLinkedFeatureOverlay", "(", "FeatureOverlay", "featureOverlay", ",", "GeoPackage", "geoPackage", ")", "{", "BoundedOverlay", "overlay", ";", "// Get the linked tile daos", "FeatureTileTableLinker", "linker", "=", "new", "FeatureTileTa...
Create a composite overlay linking the feature overly with @param featureOverlay feature overlay @param geoPackage GeoPackage @return linked bounded overlay
[ "Create", "a", "composite", "overlay", "linking", "the", "feature", "overly", "with" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/GeoPackageOverlayFactory.java#L165-L181
pac4j/spring-security-pac4j
src/main/java/org/pac4j/springframework/security/util/SpringSecurityHelper.java
SpringSecurityHelper.populateAuthentication
public static void populateAuthentication(final LinkedHashMap<String, CommonProfile> profiles) { """ Populate the authenticated user profiles in the Spring Security context. @param profiles the linked hashmap of profiles """ if (profiles != null && profiles.size() > 0) { final List<Commo...
java
public static void populateAuthentication(final LinkedHashMap<String, CommonProfile> profiles) { if (profiles != null && profiles.size() > 0) { final List<CommonProfile> listProfiles = ProfileHelper.flatIntoAProfileList(profiles); try { if (IS_FULLY_AUTHENTICATED_AUTHORIZ...
[ "public", "static", "void", "populateAuthentication", "(", "final", "LinkedHashMap", "<", "String", ",", "CommonProfile", ">", "profiles", ")", "{", "if", "(", "profiles", "!=", "null", "&&", "profiles", ".", "size", "(", ")", ">", "0", ")", "{", "final", ...
Populate the authenticated user profiles in the Spring Security context. @param profiles the linked hashmap of profiles
[ "Populate", "the", "authenticated", "user", "profiles", "in", "the", "Spring", "Security", "context", "." ]
train
https://github.com/pac4j/spring-security-pac4j/blob/5beaea9c9667a60dc933fa9738a5bfe24830c63d/src/main/java/org/pac4j/springframework/security/util/SpringSecurityHelper.java#L55-L68
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/text/CompressionUtil.java
CompressionUtil.decodeLZToString
public static String decodeLZToString(byte[] data, String dictionary) { """ Decode lz to string string. @param data the data @param dictionary the dictionary @return the string """ try { return new String(decodeLZ(data), "UTF-8"); } catch (UnsupportedEncodingException e) { throw ...
java
public static String decodeLZToString(byte[] data, String dictionary) { try { return new String(decodeLZ(data), "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
[ "public", "static", "String", "decodeLZToString", "(", "byte", "[", "]", "data", ",", "String", "dictionary", ")", "{", "try", "{", "return", "new", "String", "(", "decodeLZ", "(", "data", ")", ",", "\"UTF-8\"", ")", ";", "}", "catch", "(", "UnsupportedE...
Decode lz to string string. @param data the data @param dictionary the dictionary @return the string
[ "Decode", "lz", "to", "string", "string", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/text/CompressionUtil.java#L143-L149
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.putAt
public static void putAt(BitSet self, IntRange range, boolean value) { """ Support assigning a range of values with a single assignment statement. @param self a BitSet @param range the range of values to set @param value value @see java.util.BitSet @see groovy.lang.Range @since 1.5.0 """ Range...
java
public static void putAt(BitSet self, IntRange range, boolean value) { RangeInfo info = subListBorders(self.length(), range); self.set(info.from, info.to, value); }
[ "public", "static", "void", "putAt", "(", "BitSet", "self", ",", "IntRange", "range", ",", "boolean", "value", ")", "{", "RangeInfo", "info", "=", "subListBorders", "(", "self", ".", "length", "(", ")", ",", "range", ")", ";", "self", ".", "set", "(", ...
Support assigning a range of values with a single assignment statement. @param self a BitSet @param range the range of values to set @param value value @see java.util.BitSet @see groovy.lang.Range @since 1.5.0
[ "Support", "assigning", "a", "range", "of", "values", "with", "a", "single", "assignment", "statement", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L14151-L14154
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/CmsSitemapView.java
CmsSitemapView.addGalleryEntries
private void addGalleryEntries(CmsGalleryTreeItem parent, List<CmsGalleryFolderEntry> galleries) { """ Adds the gallery tree items to the parent.<p> @param parent the parent item @param galleries the gallery folder entries """ for (CmsGalleryFolderEntry galleryFolder : galleries) { Cms...
java
private void addGalleryEntries(CmsGalleryTreeItem parent, List<CmsGalleryFolderEntry> galleries) { for (CmsGalleryFolderEntry galleryFolder : galleries) { CmsGalleryTreeItem folderItem = createGalleryFolderItem(galleryFolder); parent.addChild(folderItem); m_galleryTreeItems....
[ "private", "void", "addGalleryEntries", "(", "CmsGalleryTreeItem", "parent", ",", "List", "<", "CmsGalleryFolderEntry", ">", "galleries", ")", "{", "for", "(", "CmsGalleryFolderEntry", "galleryFolder", ":", "galleries", ")", "{", "CmsGalleryTreeItem", "folderItem", "=...
Adds the gallery tree items to the parent.<p> @param parent the parent item @param galleries the gallery folder entries
[ "Adds", "the", "gallery", "tree", "items", "to", "the", "parent", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/CmsSitemapView.java#L1518-L1526
googleapis/google-cloud-java
google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceClient.java
GroupServiceClient.createGroup
public final Group createGroup(ProjectName name, Group group) { """ Creates a new group. <p>Sample code: <pre><code> try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { ProjectName name = ProjectName.of("[PROJECT]"); Group group = Group.newBuilder().build(); Group response = group...
java
public final Group createGroup(ProjectName name, Group group) { CreateGroupRequest request = CreateGroupRequest.newBuilder() .setName(name == null ? null : name.toString()) .setGroup(group) .build(); return createGroup(request); }
[ "public", "final", "Group", "createGroup", "(", "ProjectName", "name", ",", "Group", "group", ")", "{", "CreateGroupRequest", "request", "=", "CreateGroupRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", "==", "null", "?", "null", ":", "nam...
Creates a new group. <p>Sample code: <pre><code> try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { ProjectName name = ProjectName.of("[PROJECT]"); Group group = Group.newBuilder().build(); Group response = groupServiceClient.createGroup(name, group); } </code></pre> @param name The project ...
[ "Creates", "a", "new", "group", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/GroupServiceClient.java#L367-L375
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/QRCode.java
QRCode.tryParse
public static QRCode tryParse(String hhd, String msg) { """ Versucht die Daten als QR-Code zu parsen. @param hhd der HHDuc. @param msg die Nachricht. @return der QR-Code oder NULL. """ try { return new QRCode(hhd, msg); } catch (Exception e) { return null; }...
java
public static QRCode tryParse(String hhd, String msg) { try { return new QRCode(hhd, msg); } catch (Exception e) { return null; } }
[ "public", "static", "QRCode", "tryParse", "(", "String", "hhd", ",", "String", "msg", ")", "{", "try", "{", "return", "new", "QRCode", "(", "hhd", ",", "msg", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "null", ";", "}", "}" ...
Versucht die Daten als QR-Code zu parsen. @param hhd der HHDuc. @param msg die Nachricht. @return der QR-Code oder NULL.
[ "Versucht", "die", "Daten", "als", "QR", "-", "Code", "zu", "parsen", "." ]
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/QRCode.java#L139-L145
cache2k/cache2k
cache2k-api/src/main/java/org/cache2k/expiry/Expiry.java
Expiry.mixTimeSpanAndPointInTime
public static long mixTimeSpanAndPointInTime(long loadTime, long refreshAfter, long pointInTime) { """ Combine a refresh time span and an expiry at a specified point in time. <p>If the expiry time is far ahead of time the refresh time span takes precedence. If the point in time is close by this time takes prec...
java
public static long mixTimeSpanAndPointInTime(long loadTime, long refreshAfter, long pointInTime) { long _refreshTime = loadTime + refreshAfter; if (_refreshTime < 0) { _refreshTime = ETERNAL; } if (pointInTime == ETERNAL) { return _refreshTime; } if (pointInTime > _refreshTime) { ...
[ "public", "static", "long", "mixTimeSpanAndPointInTime", "(", "long", "loadTime", ",", "long", "refreshAfter", ",", "long", "pointInTime", ")", "{", "long", "_refreshTime", "=", "loadTime", "+", "refreshAfter", ";", "if", "(", "_refreshTime", "<", "0", ")", "{...
Combine a refresh time span and an expiry at a specified point in time. <p>If the expiry time is far ahead of time the refresh time span takes precedence. If the point in time is close by this time takes precedence. If the refresh time is too close to the requested point an earlier refresh time is used to keep maximum...
[ "Combine", "a", "refresh", "time", "span", "and", "an", "expiry", "at", "a", "specified", "point", "in", "time", "." ]
train
https://github.com/cache2k/cache2k/blob/3c9ccff12608c598c387ec50957089784cc4b618/cache2k-api/src/main/java/org/cache2k/expiry/Expiry.java#L98-L118
ops4j/org.ops4j.pax.wicket
service/src/main/java/org/ops4j/pax/wicket/internal/filter/FilterTrackerCustomizer.java
FilterTrackerCustomizer.modifiedService
public void modifiedService(ServiceReference<FilterFactory> reference, FilterFactoryReference service) { """ <p>modifiedService.</p> @param reference a {@link org.osgi.framework.ServiceReference} object. @param service a {@link org.ops4j.pax.wicket.internal.filter.FilterFactoryReference} object. """ ...
java
public void modifiedService(ServiceReference<FilterFactory> reference, FilterFactoryReference service) { if (service != null) { service.setProperties(reference); LOGGER.debug("updated FilterFactory {} for application {}", service.getFactory().getClass().getName(), applica...
[ "public", "void", "modifiedService", "(", "ServiceReference", "<", "FilterFactory", ">", "reference", ",", "FilterFactoryReference", "service", ")", "{", "if", "(", "service", "!=", "null", ")", "{", "service", ".", "setProperties", "(", "reference", ")", ";", ...
<p>modifiedService.</p> @param reference a {@link org.osgi.framework.ServiceReference} object. @param service a {@link org.ops4j.pax.wicket.internal.filter.FilterFactoryReference} object.
[ "<p", ">", "modifiedService", ".", "<", "/", "p", ">" ]
train
https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/internal/filter/FilterTrackerCustomizer.java#L76-L82
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getResourceAsStream
public static InputStream getResourceAsStream(String name) { """ Retrieve resource, identified by qualified name, as input stream. This method does its best to load requested resource but throws exception if fail. Resource is loaded using {@link ClassLoader#getResourceAsStream(String)} and <code>name</code> argu...
java
public static InputStream getResourceAsStream(String name) { Params.notNullOrEmpty(name, "Resource name"); // not documented behavior: accept but ignore trailing path separator if(name.charAt(0) == '/') { name = name.substring(1); } InputStream stream = getResourceAsStream(name, new...
[ "public", "static", "InputStream", "getResourceAsStream", "(", "String", "name", ")", "{", "Params", ".", "notNullOrEmpty", "(", "name", ",", "\"Resource name\"", ")", ";", "// not documented behavior: accept but ignore trailing path separator\r", "if", "(", "name", ".", ...
Retrieve resource, identified by qualified name, as input stream. This method does its best to load requested resource but throws exception if fail. Resource is loaded using {@link ClassLoader#getResourceAsStream(String)} and <code>name</code> argument should follow Java class loader convention: it is always considered...
[ "Retrieve", "resource", "identified", "by", "qualified", "name", "as", "input", "stream", ".", "This", "method", "does", "its", "best", "to", "load", "requested", "resource", "but", "throws", "exception", "if", "fail", ".", "Resource", "is", "loaded", "using",...
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L1035-L1051
alkacon/opencms-core
src/org/opencms/db/generic/CmsSqlManager.java
CmsSqlManager.getPreparedStatement
public PreparedStatement getPreparedStatement(Connection con, CmsUUID projectId, String queryKey) throws SQLException { """ Returns a PreparedStatement for a JDBC connection specified by the key of a SQL query and the project-ID.<p> @param con the JDBC connection @param projectId the ID of the specified C...
java
public PreparedStatement getPreparedStatement(Connection con, CmsUUID projectId, String queryKey) throws SQLException { String rawSql = readQuery(projectId, queryKey); return getPreparedStatementForSql(con, rawSql); }
[ "public", "PreparedStatement", "getPreparedStatement", "(", "Connection", "con", ",", "CmsUUID", "projectId", ",", "String", "queryKey", ")", "throws", "SQLException", "{", "String", "rawSql", "=", "readQuery", "(", "projectId", ",", "queryKey", ")", ";", "return"...
Returns a PreparedStatement for a JDBC connection specified by the key of a SQL query and the project-ID.<p> @param con the JDBC connection @param projectId the ID of the specified CmsProject @param queryKey the key of the SQL query @return PreparedStatement a new PreparedStatement containing the pre-compiled SQL sta...
[ "Returns", "a", "PreparedStatement", "for", "a", "JDBC", "connection", "specified", "by", "the", "key", "of", "a", "SQL", "query", "and", "the", "project", "-", "ID", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsSqlManager.java#L257-L262
Alluxio/alluxio
core/server/worker/src/main/java/alluxio/worker/block/allocator/RoundRobinAllocator.java
RoundRobinAllocator.getNextAvailDirInTier
private int getNextAvailDirInTier(StorageTierView tierView, long blockSize) { """ Finds an available dir in a given tier for a block with blockSize. @param tierView the tier to find a dir @param blockSize the requested block size @return the index of the dir if non-negative; -1 if fail to find a dir """ ...
java
private int getNextAvailDirInTier(StorageTierView tierView, long blockSize) { int dirViewIndex = mTierAliasToLastDirMap.get(tierView.getTierViewAlias()); for (int i = 0; i < tierView.getDirViews().size(); i++) { // try this many times dirViewIndex = (dirViewIndex + 1) % tierView.getDirViews().size(); ...
[ "private", "int", "getNextAvailDirInTier", "(", "StorageTierView", "tierView", ",", "long", "blockSize", ")", "{", "int", "dirViewIndex", "=", "mTierAliasToLastDirMap", ".", "get", "(", "tierView", ".", "getTierViewAlias", "(", ")", ")", ";", "for", "(", "int", ...
Finds an available dir in a given tier for a block with blockSize. @param tierView the tier to find a dir @param blockSize the requested block size @return the index of the dir if non-negative; -1 if fail to find a dir
[ "Finds", "an", "available", "dir", "in", "a", "given", "tier", "for", "a", "block", "with", "blockSize", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/worker/src/main/java/alluxio/worker/block/allocator/RoundRobinAllocator.java#L109-L118
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java
RolloutHelper.verifyRolloutGroupParameter
public static void verifyRolloutGroupParameter(final int amountGroup, final QuotaManagement quotaManagement) { """ Verify if the supplied amount of groups is in range @param amountGroup amount of groups @param quotaManagement to retrieve maximum number of groups allowed """ if (amountGroup <= 0) ...
java
public static void verifyRolloutGroupParameter(final int amountGroup, final QuotaManagement quotaManagement) { if (amountGroup <= 0) { throw new ValidationException("The amount of groups cannot be lower than zero"); } else if (amountGroup > quotaManagement.getMaxRolloutGroupsPerRollout()) { ...
[ "public", "static", "void", "verifyRolloutGroupParameter", "(", "final", "int", "amountGroup", ",", "final", "QuotaManagement", "quotaManagement", ")", "{", "if", "(", "amountGroup", "<=", "0", ")", "{", "throw", "new", "ValidationException", "(", "\"The amount of g...
Verify if the supplied amount of groups is in range @param amountGroup amount of groups @param quotaManagement to retrieve maximum number of groups allowed
[ "Verify", "if", "the", "supplied", "amount", "of", "groups", "is", "in", "range" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-core/src/main/java/org/eclipse/hawkbit/repository/RolloutHelper.java#L77-L85
etourdot/xincproc
xpointer/src/main/java/org/etourdot/xincproc/xpointer/XPointerEngine.java
XPointerEngine.executeToDestination
public int executeToDestination(final String pointerStr, final Source source, final Destination destination) throws XPointerException { """ Execute a xpointer expression on a xml source. The result is send to a Saxon {@link net.sf.saxon.s9api.Destination} @param pointerStr xpointer expression @par...
java
public int executeToDestination(final String pointerStr, final Source source, final Destination destination) throws XPointerException { final Pointer pointer = getPointer(pointerStr); final XdmNode node = processor.newDocumentBuilder().wrap(source); if (pointer != null) {...
[ "public", "int", "executeToDestination", "(", "final", "String", "pointerStr", ",", "final", "Source", "source", ",", "final", "Destination", "destination", ")", "throws", "XPointerException", "{", "final", "Pointer", "pointer", "=", "getPointer", "(", "pointerStr",...
Execute a xpointer expression on a xml source. The result is send to a Saxon {@link net.sf.saxon.s9api.Destination} @param pointerStr xpointer expression @param source xml source @param destination Saxon destination of result stream @return number of elements in result infoset excluding comments et processing instruct...
[ "Execute", "a", "xpointer", "expression", "on", "a", "xml", "source", ".", "The", "result", "is", "send", "to", "a", "Saxon", "{", "@link", "net", ".", "sf", ".", "saxon", ".", "s9api", ".", "Destination", "}" ]
train
https://github.com/etourdot/xincproc/blob/6e9e9352e1975957ae6821a04c248ea49c7323ec/xpointer/src/main/java/org/etourdot/xincproc/xpointer/XPointerEngine.java#L192-L216
elibom/jogger
src/main/java/com/elibom/jogger/middleware/router/RouterMiddleware.java
RouterMiddleware.getRoute
private Route getRoute(String httpMethod, String path) { """ Retrieves the {@link Route} that matches the specified <code>httpMethod</code> and <code>path</code>. @param httpMethod the HTTP method to match. Should not be null or empty. @param path the path to match. Should not be null but can be empty (which i...
java
private Route getRoute(String httpMethod, String path) { Preconditions.notEmpty(httpMethod, "no httpMethod provided."); Preconditions.notNull(path, "no path provided."); String cleanPath = parsePath(path); for (Route route : routes) { if (matchesPath(route.getPath(), cleanPath) && route.getHttpMethod().toS...
[ "private", "Route", "getRoute", "(", "String", "httpMethod", ",", "String", "path", ")", "{", "Preconditions", ".", "notEmpty", "(", "httpMethod", ",", "\"no httpMethod provided.\"", ")", ";", "Preconditions", ".", "notNull", "(", "path", ",", "\"no path provided....
Retrieves the {@link Route} that matches the specified <code>httpMethod</code> and <code>path</code>. @param httpMethod the HTTP method to match. Should not be null or empty. @param path the path to match. Should not be null but can be empty (which is interpreted as /) @return a {@link Route} object that matches the ...
[ "Retrieves", "the", "{", "@link", "Route", "}", "that", "matches", "the", "specified", "<code", ">", "httpMethod<", "/", "code", ">", "and", "<code", ">", "path<", "/", "code", ">", "." ]
train
https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/middleware/router/RouterMiddleware.java#L111-L124
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/ConfigReader.java
ConfigReader.loadAccessors
public void loadAccessors(Class<?> targetClass, MappedField configuredField, MappedField targetField) { """ Fill fields with they custom methods. @param targetClass class of the target field @param configuredField configured field @param targetField target field """ // First checks xml configuratio...
java
public void loadAccessors(Class<?> targetClass, MappedField configuredField, MappedField targetField) { // First checks xml configuration xml.fillMappedField(configuredClass, configuredField) .fillMappedField(targetClass, targetField) // fill target field with custom methods defined in the configured...
[ "public", "void", "loadAccessors", "(", "Class", "<", "?", ">", "targetClass", ",", "MappedField", "configuredField", ",", "MappedField", "targetField", ")", "{", "// First checks xml configuration\r", "xml", ".", "fillMappedField", "(", "configuredClass", ",", "confi...
Fill fields with they custom methods. @param targetClass class of the target field @param configuredField configured field @param targetField target field
[ "Fill", "fields", "with", "they", "custom", "methods", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/ConfigReader.java#L301-L315
roboconf/roboconf-platform
core/roboconf-target-embedded/src/main/java/net/roboconf/target/embedded/internal/ConfiguratorOnCreation.java
ConfiguratorOnCreation.updateAgentConfigurationFile
void updateAgentConfigurationFile( TargetHandlerParameters parameters, SSHClient ssh, File tmpDir, Map<String,String> keyToNewValue ) throws IOException { """ Updates the configuration file of an agent. @param parameters @param ssh @param tmpDir @param keyToNewValue @throws IOException """ ...
java
void updateAgentConfigurationFile( TargetHandlerParameters parameters, SSHClient ssh, File tmpDir, Map<String,String> keyToNewValue ) throws IOException { this.logger.fine( "Updating agent parameters on remote host..." ); // Update the agent's configuration file String agentConfigDir = Utils.getVal...
[ "void", "updateAgentConfigurationFile", "(", "TargetHandlerParameters", "parameters", ",", "SSHClient", "ssh", ",", "File", "tmpDir", ",", "Map", "<", "String", ",", "String", ">", "keyToNewValue", ")", "throws", "IOException", "{", "this", ".", "logger", ".", "...
Updates the configuration file of an agent. @param parameters @param ssh @param tmpDir @param keyToNewValue @throws IOException
[ "Updates", "the", "configuration", "file", "of", "an", "agent", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-embedded/src/main/java/net/roboconf/target/embedded/internal/ConfiguratorOnCreation.java#L241-L265
facebookarchive/hadoop-20
src/contrib/benchmark/src/java/org/apache/hadoop/mapred/GenWriterThread.java
GenWriterThread.writeControlFile
private void writeControlFile(FileSystem fs, Path outputPath, Path checksumFile, String name) throws IOException { """ This is used for verification Each mapper writes one control file control file only contains the base directory written by this mapper and the checksum file path so that we could creat...
java
private void writeControlFile(FileSystem fs, Path outputPath, Path checksumFile, String name) throws IOException { SequenceFile.Writer write = null; try { Path parentDir = new Path(rtc.input, "filelists"); if (!fs.exists(parentDir)) { fs.mkdirs(parentDir); } ...
[ "private", "void", "writeControlFile", "(", "FileSystem", "fs", ",", "Path", "outputPath", ",", "Path", "checksumFile", ",", "String", "name", ")", "throws", "IOException", "{", "SequenceFile", ".", "Writer", "write", "=", "null", ";", "try", "{", "Path", "p...
This is used for verification Each mapper writes one control file control file only contains the base directory written by this mapper and the checksum file path so that we could create a Read mapper which scanned the files under the base directory and verify the checksum of files with the information given in the chec...
[ "This", "is", "used", "for", "verification", "Each", "mapper", "writes", "one", "control", "file", "control", "file", "only", "contains", "the", "base", "directory", "written", "by", "this", "mapper", "and", "the", "checksum", "file", "path", "so", "that", "...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/benchmark/src/java/org/apache/hadoop/mapred/GenWriterThread.java#L270-L288
h2oai/h2o-3
h2o-core/src/main/java/water/jdbc/SQLManager.java
SQLManager.buildSelectChunkSql
static String buildSelectChunkSql(String databaseType, String table, long start, int length, String columns, String[] columnNames) { """ Builds SQL SELECT to retrieve chunk of rows from a table based on row offset and number of rows in a chunk. Pagination in following Databases: SQL Server, Oracle 12c: OFFSET ...
java
static String buildSelectChunkSql(String databaseType, String table, long start, int length, String columns, String[] columnNames) { String sqlText = "SELECT " + columns + " FROM " + table; switch(databaseType) { case SQL_SERVER_DB_TYPE: // requires ORDER BY clause with OFFSET/FETCH NEXT clauses, syntax...
[ "static", "String", "buildSelectChunkSql", "(", "String", "databaseType", ",", "String", "table", ",", "long", "start", ",", "int", "length", ",", "String", "columns", ",", "String", "[", "]", "columnNames", ")", "{", "String", "sqlText", "=", "\"SELECT \"", ...
Builds SQL SELECT to retrieve chunk of rows from a table based on row offset and number of rows in a chunk. Pagination in following Databases: SQL Server, Oracle 12c: OFFSET x ROWS FETCH NEXT y ROWS ONLY SQL Server, Vertica may need ORDER BY MySQL, PostgreSQL, MariaDB: LIMIT y OFFSET x Teradata (and possibly older O...
[ "Builds", "SQL", "SELECT", "to", "retrieve", "chunk", "of", "rows", "from", "a", "table", "based", "on", "row", "offset", "and", "number", "of", "rows", "in", "a", "chunk", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/jdbc/SQLManager.java#L346-L368
JOML-CI/JOML
src/org/joml/Quaternionf.java
Quaternionf.nlerpIterative
public static Quaternionfc nlerpIterative(Quaternionf[] qs, float[] weights, float dotThreshold, Quaternionf dest) { """ Interpolate between all of the quaternions given in <code>qs</code> via iterative non-spherical linear interpolation using the specified interpolation factors <code>weights</code>, and store th...
java
public static Quaternionfc nlerpIterative(Quaternionf[] qs, float[] weights, float dotThreshold, Quaternionf dest) { dest.set(qs[0]); float w = weights[0]; for (int i = 1; i < qs.length; i++) { float w0 = w; float w1 = weights[i]; float rw1 = w1 / (w0 + w1); ...
[ "public", "static", "Quaternionfc", "nlerpIterative", "(", "Quaternionf", "[", "]", "qs", ",", "float", "[", "]", "weights", ",", "float", "dotThreshold", ",", "Quaternionf", "dest", ")", "{", "dest", ".", "set", "(", "qs", "[", "0", "]", ")", ";", "fl...
Interpolate between all of the quaternions given in <code>qs</code> via iterative non-spherical linear interpolation using the specified interpolation factors <code>weights</code>, and store the result in <code>dest</code>. <p> This method will interpolate between each two successive quaternions via {@link #nlerpIterat...
[ "Interpolate", "between", "all", "of", "the", "quaternions", "given", "in", "<code", ">", "qs<", "/", "code", ">", "via", "iterative", "non", "-", "spherical", "linear", "interpolation", "using", "the", "specified", "interpolation", "factors", "<code", ">", "w...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaternionf.java#L2056-L2067
GCRC/nunaliit
nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/impl/PathComputer.java
PathComputer.computeBinDir
static public File computeBinDir(File installDir) { """ Finds the "bin" directory from the installation location and returns it. If the command-line tool is packaged and deployed, then the "bin" directory is found at the root of the installation. If the command-line tool is run from the development environment...
java
static public File computeBinDir(File installDir) { if( null != installDir ) { // Command-line package File binDir = new File(installDir, "bin"); if( binDir.exists() && binDir.isDirectory() ) { return binDir; } // Development environment File nunaliit2Dir = computeNunaliitDir(installDir); ...
[ "static", "public", "File", "computeBinDir", "(", "File", "installDir", ")", "{", "if", "(", "null", "!=", "installDir", ")", "{", "// Command-line package", "File", "binDir", "=", "new", "File", "(", "installDir", ",", "\"bin\"", ")", ";", "if", "(", "bin...
Finds the "bin" directory from the installation location and returns it. If the command-line tool is packaged and deployed, then the "bin" directory is found at the root of the installation. If the command-line tool is run from the development environment, then the "bin" directory is found in the SDK sub-project. @para...
[ "Finds", "the", "bin", "directory", "from", "the", "installation", "location", "and", "returns", "it", ".", "If", "the", "command", "-", "line", "tool", "is", "packaged", "and", "deployed", "then", "the", "bin", "directory", "is", "found", "at", "the", "ro...
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/impl/PathComputer.java#L174-L191
hector-client/hector
core/src/main/java/me/prettyprint/hector/api/factory/HFactory.java
HFactory.getOrCreateCluster
public static Cluster getOrCreateCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator) { """ Calls the three argument version with a null credentials map. {@link #getOrCreateCluster(String, me.prettyprint.cassandra.service.CassandraHostConfigurator, java.util.Map)} for details. ...
java
public static Cluster getOrCreateCluster(String clusterName, CassandraHostConfigurator cassandraHostConfigurator) { return createCluster(clusterName, cassandraHostConfigurator, null); }
[ "public", "static", "Cluster", "getOrCreateCluster", "(", "String", "clusterName", ",", "CassandraHostConfigurator", "cassandraHostConfigurator", ")", "{", "return", "createCluster", "(", "clusterName", ",", "cassandraHostConfigurator", ",", "null", ")", ";", "}" ]
Calls the three argument version with a null credentials map. {@link #getOrCreateCluster(String, me.prettyprint.cassandra.service.CassandraHostConfigurator, java.util.Map)} for details.
[ "Calls", "the", "three", "argument", "version", "with", "a", "null", "credentials", "map", ".", "{" ]
train
https://github.com/hector-client/hector/blob/a302e68ca8d91b45d332e8c9afd7d98030b54de1/core/src/main/java/me/prettyprint/hector/api/factory/HFactory.java#L142-L145
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/dnd/CmsDNDHandler.java
CmsDNDHandler.showEndAnimation
private void showEndAnimation(Command callback, int top, int left, boolean isDrop) { """ Shows the end animation on drop or cancel. Executes the given callback afterwards.<p> @param callback the callback to execute @param top absolute top of the animation end position @param left absolute left of the animatio...
java
private void showEndAnimation(Command callback, int top, int left, boolean isDrop) { if (!isAnimationEnabled() || (m_dragHelper == null)) { callback.execute(); return; } switch (m_animationType) { case SPECIAL: List<Element> overlays = CmsDomU...
[ "private", "void", "showEndAnimation", "(", "Command", "callback", ",", "int", "top", ",", "int", "left", ",", "boolean", "isDrop", ")", "{", "if", "(", "!", "isAnimationEnabled", "(", ")", "||", "(", "m_dragHelper", "==", "null", ")", ")", "{", "callbac...
Shows the end animation on drop or cancel. Executes the given callback afterwards.<p> @param callback the callback to execute @param top absolute top of the animation end position @param left absolute left of the animation end position @param isDrop if the animation is done on drop
[ "Shows", "the", "end", "animation", "on", "drop", "or", "cancel", ".", "Executes", "the", "given", "callback", "afterwards", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/dnd/CmsDNDHandler.java#L1097-L1131
Coveros/selenified
src/main/java/com/coveros/selenified/element/Element.java
Element.isNotEnabled
private boolean isNotEnabled(String action, String expected, String extra) { """ Determines if the element is displayed. If it isn't, it'll wait up to the default time (5 seconds) for the element to be displayed @param action - what action is occurring @param expected - what is the expected result @param e...
java
private boolean isNotEnabled(String action, String expected, String extra) { // wait for element to be displayed if (!is.enabled()) { waitForState.enabled(); } if (!is.enabled()) { reporter.fail(action, expected, extra + prettyOutput() + NOT_ENABLED); ...
[ "private", "boolean", "isNotEnabled", "(", "String", "action", ",", "String", "expected", ",", "String", "extra", ")", "{", "// wait for element to be displayed", "if", "(", "!", "is", ".", "enabled", "(", ")", ")", "{", "waitForState", ".", "enabled", "(", ...
Determines if the element is displayed. If it isn't, it'll wait up to the default time (5 seconds) for the element to be displayed @param action - what action is occurring @param expected - what is the expected result @param extra - what actually is occurring @return Boolean: is the element enabled?
[ "Determines", "if", "the", "element", "is", "displayed", ".", "If", "it", "isn", "t", "it", "ll", "wait", "up", "to", "the", "default", "time", "(", "5", "seconds", ")", "for", "the", "element", "to", "be", "displayed" ]
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/element/Element.java#L637-L648
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java
NamespaceMappings.pushNamespace
public boolean pushNamespace(String prefix, String uri, int elemDepth) { """ Declare a mapping of a prefix to namespace URI at the given element depth. @param prefix a String with the prefix for a qualified name @param uri a String with the uri to which the prefix is to map @param elemDepth the depth of current...
java
public boolean pushNamespace(String prefix, String uri, int elemDepth) { // Prefixes "xml" and "xmlns" cannot be redefined if (prefix.startsWith(XML_PREFIX)) { return false; } Stack stack; // Get the stack that contains URIs for the specified prefix ...
[ "public", "boolean", "pushNamespace", "(", "String", "prefix", ",", "String", "uri", ",", "int", "elemDepth", ")", "{", "// Prefixes \"xml\" and \"xmlns\" cannot be redefined", "if", "(", "prefix", ".", "startsWith", "(", "XML_PREFIX", ")", ")", "{", "return", "fa...
Declare a mapping of a prefix to namespace URI at the given element depth. @param prefix a String with the prefix for a qualified name @param uri a String with the uri to which the prefix is to map @param elemDepth the depth of current declaration
[ "Declare", "a", "mapping", "of", "a", "prefix", "to", "namespace", "URI", "at", "the", "given", "element", "depth", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java#L225-L255
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/RandomUtil.java
RandomUtil.randomLowerMaxLength
public String randomLowerMaxLength(int minLength, int maxLength) { """ Creates a random string consisting of lowercase letters. @param minLength minimum length of String to create. @param maxLength maximum length (non inclusive) of String to create. @return lowercase letters. """ int range = maxLeng...
java
public String randomLowerMaxLength(int minLength, int maxLength) { int range = maxLength - minLength; int randomLength = 0; if (range > 0) { randomLength = random(range); } return randomLower(minLength + randomLength); }
[ "public", "String", "randomLowerMaxLength", "(", "int", "minLength", ",", "int", "maxLength", ")", "{", "int", "range", "=", "maxLength", "-", "minLength", ";", "int", "randomLength", "=", "0", ";", "if", "(", "range", ">", "0", ")", "{", "randomLength", ...
Creates a random string consisting of lowercase letters. @param minLength minimum length of String to create. @param maxLength maximum length (non inclusive) of String to create. @return lowercase letters.
[ "Creates", "a", "random", "string", "consisting", "of", "lowercase", "letters", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/RandomUtil.java#L26-L33
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/utility/ResourceCache.java
ResourceCache.wrapCallback
public static BitmapTextureCallback wrapCallback( ResourceCache<GVRImage> cache, BitmapTextureCallback callback) { """ Wrap the callback, to cache the {@link BitmapTextureCallback#loaded(GVRHybridObject, GVRAndroidResource) loaded()} resource """ return new BitmapTextureCallbackWrapper(ca...
java
public static BitmapTextureCallback wrapCallback( ResourceCache<GVRImage> cache, BitmapTextureCallback callback) { return new BitmapTextureCallbackWrapper(cache, callback); }
[ "public", "static", "BitmapTextureCallback", "wrapCallback", "(", "ResourceCache", "<", "GVRImage", ">", "cache", ",", "BitmapTextureCallback", "callback", ")", "{", "return", "new", "BitmapTextureCallbackWrapper", "(", "cache", ",", "callback", ")", ";", "}" ]
Wrap the callback, to cache the {@link BitmapTextureCallback#loaded(GVRHybridObject, GVRAndroidResource) loaded()} resource
[ "Wrap", "the", "callback", "to", "cache", "the", "{" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/utility/ResourceCache.java#L87-L90
nikhaldi/android-view-selector
src/main/java/com/nikhaldimann/viewselector/attributes/ViewAttributes.java
ViewAttributes.callGetterNormalizingStrings
public static Object callGetterNormalizingStrings(View view, String methodName) { """ Calls the given method by name on the given view, assuming that it's a getter, i.e., it doesn't have arguments. This method normalizes all instances of CharSequences to be instances of String. This is useful because Android ...
java
public static Object callGetterNormalizingStrings(View view, String methodName) { Object value = callGetter(view, methodName); if (value instanceof CharSequence) { value = value.toString(); } return value; }
[ "public", "static", "Object", "callGetterNormalizingStrings", "(", "View", "view", ",", "String", "methodName", ")", "{", "Object", "value", "=", "callGetter", "(", "view", ",", "methodName", ")", ";", "if", "(", "value", "instanceof", "CharSequence", ")", "{"...
Calls the given method by name on the given view, assuming that it's a getter, i.e., it doesn't have arguments. This method normalizes all instances of CharSequences to be instances of String. This is useful because Android is using some CharSequence representations internally that don't compare well with strings (in ...
[ "Calls", "the", "given", "method", "by", "name", "on", "the", "given", "view", "assuming", "that", "it", "s", "a", "getter", "i", ".", "e", ".", "it", "doesn", "t", "have", "arguments", "." ]
train
https://github.com/nikhaldi/android-view-selector/blob/d3e4bf05f6111d116c6b0c1a8c51396e8bfae9b5/src/main/java/com/nikhaldimann/viewselector/attributes/ViewAttributes.java#L69-L75
aws/aws-sdk-java
aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/Table.java
Table.withParameters
public Table withParameters(java.util.Map<String, String> parameters) { """ <p> These key-value pairs define properties associated with the table. </p> @param parameters These key-value pairs define properties associated with the table. @return Returns a reference to this object so that method calls can be ...
java
public Table withParameters(java.util.Map<String, String> parameters) { setParameters(parameters); return this; }
[ "public", "Table", "withParameters", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "setParameters", "(", "parameters", ")", ";", "return", "this", ";", "}" ]
<p> These key-value pairs define properties associated with the table. </p> @param parameters These key-value pairs define properties associated with the table. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "These", "key", "-", "value", "pairs", "define", "properties", "associated", "with", "the", "table", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/Table.java#L822-L825