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
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/notifications/ApptentiveNotificationCenter.java
ApptentiveNotificationCenter.addObserver
public synchronized ApptentiveNotificationCenter addObserver(String notification, ApptentiveNotificationObserver observer) { """ Adds an entry to the receiver’s dispatch table with an observer using strong reference. """ addObserver(notification, observer, false); return this; }
java
public synchronized ApptentiveNotificationCenter addObserver(String notification, ApptentiveNotificationObserver observer) { addObserver(notification, observer, false); return this; }
[ "public", "synchronized", "ApptentiveNotificationCenter", "addObserver", "(", "String", "notification", ",", "ApptentiveNotificationObserver", "observer", ")", "{", "addObserver", "(", "notification", ",", "observer", ",", "false", ")", ";", "return", "this", ";", "}"...
Adds an entry to the receiver’s dispatch table with an observer using strong reference.
[ "Adds", "an", "entry", "to", "the", "receiver’s", "dispatch", "table", "with", "an", "observer", "using", "strong", "reference", "." ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/notifications/ApptentiveNotificationCenter.java#L45-L48
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/MembershipManager.java
MembershipManager.isMissingMember
boolean isMissingMember(Address address, String uuid) { """ Returns whether member with given identity (either {@code UUID} or {@code Address} depending on Hot Restart is enabled or not) is a known missing member or not. @param address Address of the missing member @param uuid Uuid of the missing member @ret...
java
boolean isMissingMember(Address address, String uuid) { Map<Object, MemberImpl> m = missingMembersRef.get(); return isHotRestartEnabled() ? m.containsKey(uuid) : m.containsKey(address); }
[ "boolean", "isMissingMember", "(", "Address", "address", ",", "String", "uuid", ")", "{", "Map", "<", "Object", ",", "MemberImpl", ">", "m", "=", "missingMembersRef", ".", "get", "(", ")", ";", "return", "isHotRestartEnabled", "(", ")", "?", "m", ".", "c...
Returns whether member with given identity (either {@code UUID} or {@code Address} depending on Hot Restart is enabled or not) is a known missing member or not. @param address Address of the missing member @param uuid Uuid of the missing member @return true if it's a known missing member, false otherwise
[ "Returns", "whether", "member", "with", "given", "identity", "(", "either", "{", "@code", "UUID", "}", "or", "{", "@code", "Address", "}", "depending", "on", "Hot", "Restart", "is", "enabled", "or", "not", ")", "is", "a", "known", "missing", "member", "o...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/MembershipManager.java#L953-L956
sdl/odata
odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomWriter.java
AtomWriter.startDocument
public void startDocument(OutputStream os) throws ODataRenderException { """ Start the XML stream document by defining things like the type of encoding, and prefixes used. It needs to be used before calling any write method. @param os {@link OutputStream} to write to. @throws ODataRenderException if unable to...
java
public void startDocument(OutputStream os) throws ODataRenderException { try { outputStream = os; xmlWriter = XML_OUTPUT_FACTORY.createXMLStreamWriter(os, UTF_8.name()); metadataWriter = new AtomMetadataWriter(xmlWriter, oDataUri, entityDataModel, nsConfigurationProvider); ...
[ "public", "void", "startDocument", "(", "OutputStream", "os", ")", "throws", "ODataRenderException", "{", "try", "{", "outputStream", "=", "os", ";", "xmlWriter", "=", "XML_OUTPUT_FACTORY", ".", "createXMLStreamWriter", "(", "os", ",", "UTF_8", ".", "name", "(",...
Start the XML stream document by defining things like the type of encoding, and prefixes used. It needs to be used before calling any write method. @param os {@link OutputStream} to write to. @throws ODataRenderException if unable to render the feed
[ "Start", "the", "XML", "stream", "document", "by", "defining", "things", "like", "the", "type", "of", "encoding", "and", "prefixes", "used", ".", "It", "needs", "to", "be", "used", "before", "calling", "any", "write", "method", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomWriter.java#L157-L170
dmfs/jdav
src/org/dmfs/dav/rfc4918/PropertyUpdate.java
PropertyUpdate.set
public <T> void set(ElementDescriptor<T> property, T value) { """ Add a new property with a specific value to the resource. @param property The {@link ElementDescriptor} of the property to add. @param value The value of the property. """ if (mSet == null) { mSet = new HashMap<ElementDescriptor<?>,...
java
public <T> void set(ElementDescriptor<T> property, T value) { if (mSet == null) { mSet = new HashMap<ElementDescriptor<?>, Object>(16); } mSet.put(property, value); if (mRemove != null) { mRemove.remove(property); } }
[ "public", "<", "T", ">", "void", "set", "(", "ElementDescriptor", "<", "T", ">", "property", ",", "T", "value", ")", "{", "if", "(", "mSet", "==", "null", ")", "{", "mSet", "=", "new", "HashMap", "<", "ElementDescriptor", "<", "?", ">", ",", "Objec...
Add a new property with a specific value to the resource. @param property The {@link ElementDescriptor} of the property to add. @param value The value of the property.
[ "Add", "a", "new", "property", "with", "a", "specific", "value", "to", "the", "resource", "." ]
train
https://github.com/dmfs/jdav/blob/a619d85423210a283b3eb1fba9abda4fdc894969/src/org/dmfs/dav/rfc4918/PropertyUpdate.java#L142-L154
mangstadt/biweekly
src/main/java/biweekly/util/com/google/ical/iter/Generators.java
Generators.serialMinuteGenerator
static Generator serialMinuteGenerator(final int interval, final DateValue dtStart) { """ Constructs a generator that generates minutes in the given date's hour successively counting from the first minute passed in. @param interval number of minutes to advance each step @param dtStart the date @return the minu...
java
static Generator serialMinuteGenerator(final int interval, final DateValue dtStart) { final TimeValue dtStartTime = TimeUtils.timeOf(dtStart); return new Generator() { int minute = dtStartTime.minute() - interval; int hour = dtStartTime.hour(); int day = dtStart.day(); int month = dtStart.month(); in...
[ "static", "Generator", "serialMinuteGenerator", "(", "final", "int", "interval", ",", "final", "DateValue", "dtStart", ")", "{", "final", "TimeValue", "dtStartTime", "=", "TimeUtils", ".", "timeOf", "(", "dtStart", ")", ";", "return", "new", "Generator", "(", ...
Constructs a generator that generates minutes in the given date's hour successively counting from the first minute passed in. @param interval number of minutes to advance each step @param dtStart the date @return the minute in dtStart the first time called and interval + last return value on subsequent calls
[ "Constructs", "a", "generator", "that", "generates", "minutes", "in", "the", "given", "date", "s", "hour", "successively", "counting", "from", "the", "first", "minute", "passed", "in", "." ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/util/com/google/ical/iter/Generators.java#L296-L338
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Validator.java
Validator.validateGeneralWithChinese
public static <T extends CharSequence> T validateGeneralWithChinese(T value, String errorMsg) throws ValidateException { """ 验证是否为中文字、英文字母、数字和下划线 @param <T> 字符串类型 @param value 值 @param errorMsg 验证错误的信息 @return 验证后的值 @throws ValidateException 验证异常 """ if (false == isGeneralWithChinese(value)) { th...
java
public static <T extends CharSequence> T validateGeneralWithChinese(T value, String errorMsg) throws ValidateException { if (false == isGeneralWithChinese(value)) { throw new ValidateException(errorMsg); } return value; }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "validateGeneralWithChinese", "(", "T", "value", ",", "String", "errorMsg", ")", "throws", "ValidateException", "{", "if", "(", "false", "==", "isGeneralWithChinese", "(", "value", ")", ")", "{...
验证是否为中文字、英文字母、数字和下划线 @param <T> 字符串类型 @param value 值 @param errorMsg 验证错误的信息 @return 验证后的值 @throws ValidateException 验证异常
[ "验证是否为中文字、英文字母、数字和下划线" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Validator.java#L974-L979
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/webapp/UIComponentTag.java
UIComponentTag.createComponent
protected UIComponent createComponent(FacesContext context, String newId) { """ <p>Implement <code>createComponent</code> using Faces 1.1 EL API.</p> @param context {@inheritDoc} @param newId {@inheritDoc} """ UIComponent component; Application application = context.getApplication(); ...
java
protected UIComponent createComponent(FacesContext context, String newId) { UIComponent component; Application application = context.getApplication(); if (binding != null) { ValueBinding vb = application.createValueBinding(binding); component = application.createComponent...
[ "protected", "UIComponent", "createComponent", "(", "FacesContext", "context", ",", "String", "newId", ")", "{", "UIComponent", "component", ";", "Application", "application", "=", "context", ".", "getApplication", "(", ")", ";", "if", "(", "binding", "!=", "nul...
<p>Implement <code>createComponent</code> using Faces 1.1 EL API.</p> @param context {@inheritDoc} @param newId {@inheritDoc}
[ "<p", ">", "Implement", "<code", ">", "createComponent<", "/", "code", ">", "using", "Faces", "1", ".", "1", "EL", "API", ".", "<", "/", "p", ">" ]
train
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/webapp/UIComponentTag.java#L207-L223
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperCube.java
SVGHyperCube.recDrawEdges
private static void recDrawEdges(SVGPath path, double minx, double miny, List<double[]> r_edges, long[] b) { """ Recursive helper for hypercube drawing. @param path path @param minx starting corner @param miny starting corner @param r_edges edge vectors @param b bit set of drawn edges """ // Draw al...
java
private static void recDrawEdges(SVGPath path, double minx, double miny, List<double[]> r_edges, long[] b) { // Draw all "missing" edges for(int i = 0; i < r_edges.size(); i++) { if(BitsUtil.get(b, i)) { continue; } final double[] edge = r_edges.get(i); final double x_i = minx + ...
[ "private", "static", "void", "recDrawEdges", "(", "SVGPath", "path", ",", "double", "minx", ",", "double", "miny", ",", "List", "<", "double", "[", "]", ">", "r_edges", ",", "long", "[", "]", "b", ")", "{", "// Draw all \"missing\" edges", "for", "(", "i...
Recursive helper for hypercube drawing. @param path path @param minx starting corner @param miny starting corner @param r_edges edge vectors @param b bit set of drawn edges
[ "Recursive", "helper", "for", "hypercube", "drawing", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGHyperCube.java#L248-L265
kiegroup/drools
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/CompiledFEELSemanticMappings.java
CompiledFEELSemanticMappings.gte
public static Boolean gte(Object left, Object right) { """ FEEL spec Table 42 and derivations Delegates to {@link EvalHelper} except evaluationcontext """ return or(gt(left, right), eq(left, right)); // do not use Java || to avoid potential NPE due to FEEL 3vl. }
java
public static Boolean gte(Object left, Object right) { return or(gt(left, right), eq(left, right)); // do not use Java || to avoid potential NPE due to FEEL 3vl. }
[ "public", "static", "Boolean", "gte", "(", "Object", "left", ",", "Object", "right", ")", "{", "return", "or", "(", "gt", "(", "left", ",", "right", ")", ",", "eq", "(", "left", ",", "right", ")", ")", ";", "// do not use Java || to avoid potential NPE due...
FEEL spec Table 42 and derivations Delegates to {@link EvalHelper} except evaluationcontext
[ "FEEL", "spec", "Table", "42", "and", "derivations", "Delegates", "to", "{" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/codegen/feel11/CompiledFEELSemanticMappings.java#L356-L359
google/closure-compiler
src/com/google/javascript/rhino/jstype/RecordTypeBuilder.java
RecordTypeBuilder.build
public JSType build() { """ Creates a record. Fails if any duplicate property names were added. @return The record type. """ // If we have an empty record, simply return the object type. if (isEmpty) { return registry.getNativeObjectType(JSTypeNative.OBJECT_TYPE); } ImmutableSortedMap....
java
public JSType build() { // If we have an empty record, simply return the object type. if (isEmpty) { return registry.getNativeObjectType(JSTypeNative.OBJECT_TYPE); } ImmutableSortedMap.Builder<String, RecordProperty> m = ImmutableSortedMap.naturalOrder(); m.putAll(this.properties); retur...
[ "public", "JSType", "build", "(", ")", "{", "// If we have an empty record, simply return the object type.", "if", "(", "isEmpty", ")", "{", "return", "registry", ".", "getNativeObjectType", "(", "JSTypeNative", ".", "OBJECT_TYPE", ")", ";", "}", "ImmutableSortedMap", ...
Creates a record. Fails if any duplicate property names were added. @return The record type.
[ "Creates", "a", "record", ".", "Fails", "if", "any", "duplicate", "property", "names", "were", "added", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/rhino/jstype/RecordTypeBuilder.java#L85-L93
norbsoft/android-typeface-helper
lib/src/main/java/com/norbsoft/typefacehelper/TypefaceHelper.java
TypefaceHelper.applyTypeface
private static void applyTypeface(ViewGroup viewGroup, TypefaceCollection typefaceCollection) { """ Apply typeface to all ViewGroup childs @param viewGroup to typeface typeface @param typefaceCollection typeface collection """ for (int i = 0; i < viewGroup.getChildCount(); i++) { View childView = vie...
java
private static void applyTypeface(ViewGroup viewGroup, TypefaceCollection typefaceCollection) { for (int i = 0; i < viewGroup.getChildCount(); i++) { View childView = viewGroup.getChildAt(i); if (childView instanceof ViewGroup) { applyTypeface((ViewGroup) childView, typefaceCollection); } else { app...
[ "private", "static", "void", "applyTypeface", "(", "ViewGroup", "viewGroup", ",", "TypefaceCollection", "typefaceCollection", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "viewGroup", ".", "getChildCount", "(", ")", ";", "i", "++", ")", "{", ...
Apply typeface to all ViewGroup childs @param viewGroup to typeface typeface @param typefaceCollection typeface collection
[ "Apply", "typeface", "to", "all", "ViewGroup", "childs" ]
train
https://github.com/norbsoft/android-typeface-helper/blob/f9e12655f01144efa937c1172f5de7f9b29c4df7/lib/src/main/java/com/norbsoft/typefacehelper/TypefaceHelper.java#L226-L236
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java
FastTrackUtility.hexdump
public static final String hexdump(byte[] buffer, int offset, int length, boolean ascii, int columns, String prefix) { """ Dump raw data as hex. @param buffer buffer @param offset offset into buffer @param length length of data to dump @param ascii true if ASCII should also be printed @param columns number ...
java
public static final String hexdump(byte[] buffer, int offset, int length, boolean ascii, int columns, String prefix) { StringBuilder sb = new StringBuilder(); if (buffer != null) { int index = offset; DecimalFormat df = new DecimalFormat("00000"); while (index < (offset ...
[ "public", "static", "final", "String", "hexdump", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ",", "boolean", "ascii", ",", "int", "columns", ",", "String", "prefix", ")", "{", "StringBuilder", "sb", "=", "new", "StringBu...
Dump raw data as hex. @param buffer buffer @param offset offset into buffer @param length length of data to dump @param ascii true if ASCII should also be printed @param columns number of columns @param prefix prefix when printing @return hex dump
[ "Dump", "raw", "data", "as", "hex", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackUtility.java#L249-L275
alkacon/opencms-core
src/org/opencms/db/generic/CmsUserDriver.java
CmsUserDriver.internalOrgUnitFolder
protected CmsResource internalOrgUnitFolder(CmsDbContext dbc, CmsOrganizationalUnit orgUnit) throws CmsException { """ Returns the folder for the given organizational units, or the base folder if <code>null</code>.<p> The base folder will be created if it does not exist.<p> @param dbc the current db context ...
java
protected CmsResource internalOrgUnitFolder(CmsDbContext dbc, CmsOrganizationalUnit orgUnit) throws CmsException { if (orgUnit != null) { return m_driverManager.readResource( dbc, ORGUNIT_BASE_FOLDER + orgUnit.getName(), CmsResourceFilter.DEFAULT); ...
[ "protected", "CmsResource", "internalOrgUnitFolder", "(", "CmsDbContext", "dbc", ",", "CmsOrganizationalUnit", "orgUnit", ")", "throws", "CmsException", "{", "if", "(", "orgUnit", "!=", "null", ")", "{", "return", "m_driverManager", ".", "readResource", "(", "dbc", ...
Returns the folder for the given organizational units, or the base folder if <code>null</code>.<p> The base folder will be created if it does not exist.<p> @param dbc the current db context @param orgUnit the organizational unit to get the folder for @return the base folder for organizational units @throws CmsExcep...
[ "Returns", "the", "folder", "for", "the", "given", "organizational", "units", "or", "the", "base", "folder", "if", "<code", ">", "null<", "/", "code", ">", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsUserDriver.java#L2709-L2719
RuedigerMoeller/kontraktor
modules/kontraktor-reallive/src/main/java/org/nustaq/reallive/messages/ChangeUtils.java
ChangeUtils.copyAndDiff
public static Diff copyAndDiff(Record from, Record to) { """ copy different (equals) fields and return resulting list of changed fields + old values @param from @param to @return """ String[] fields = from.getFields(); return copyAndDiff(from, to, fields); }
java
public static Diff copyAndDiff(Record from, Record to) { String[] fields = from.getFields(); return copyAndDiff(from, to, fields); }
[ "public", "static", "Diff", "copyAndDiff", "(", "Record", "from", ",", "Record", "to", ")", "{", "String", "[", "]", "fields", "=", "from", ".", "getFields", "(", ")", ";", "return", "copyAndDiff", "(", "from", ",", "to", ",", "fields", ")", ";", "}"...
copy different (equals) fields and return resulting list of changed fields + old values @param from @param to @return
[ "copy", "different", "(", "equals", ")", "fields", "and", "return", "resulting", "list", "of", "changed", "fields", "+", "old", "values" ]
train
https://github.com/RuedigerMoeller/kontraktor/blob/d5f3817f9476f3786187b8ef00400b7a4f25a404/modules/kontraktor-reallive/src/main/java/org/nustaq/reallive/messages/ChangeUtils.java#L21-L24
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java
StandardAtomGenerator.generateSymbol
AtomSymbol generateSymbol(IAtomContainer container, IAtom atom, HydrogenPosition position, RendererModel model) { """ Generate the displayed atom symbol for an atom in given structure with the specified hydrogen position. @param container structure to which the atom belongs @param atom the atom to genera...
java
AtomSymbol generateSymbol(IAtomContainer container, IAtom atom, HydrogenPosition position, RendererModel model) { if (atom instanceof IPseudoAtom) { IPseudoAtom pAtom = (IPseudoAtom) atom; if (pAtom.getAttachPointNum() <= 0) { if (pAtom.getLabel().equals("*")) { ...
[ "AtomSymbol", "generateSymbol", "(", "IAtomContainer", "container", ",", "IAtom", "atom", ",", "HydrogenPosition", "position", ",", "RendererModel", "model", ")", "{", "if", "(", "atom", "instanceof", "IPseudoAtom", ")", "{", "IPseudoAtom", "pAtom", "=", "(", "I...
Generate the displayed atom symbol for an atom in given structure with the specified hydrogen position. @param container structure to which the atom belongs @param atom the atom to generate the symbol for @param position the hydrogen position @param model additional rendering options @return atom symbol
[ "Generate", "the", "displayed", "atom", "symbol", "for", "an", "atom", "in", "given", "structure", "with", "the", "specified", "hydrogen", "position", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/standard/StandardAtomGenerator.java#L118-L154
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java
SARLAgentMainLaunchConfigurationTab.createAgentNameEditor
protected void createAgentNameEditor(Composite parent, String text) { """ Creates the widgets for specifying a agent name. @param parent the parent composite. @param text the label of the group. """ final Group group = SWTFactory.createGroup(parent, text, 2, 1, GridData.FILL_HORIZONTAL); this.agentName...
java
protected void createAgentNameEditor(Composite parent, String text) { final Group group = SWTFactory.createGroup(parent, text, 2, 1, GridData.FILL_HORIZONTAL); this.agentNameTextField = SWTFactory.createSingleText(group, 1); this.agentNameTextField.addModifyListener(new ModifyListener() { @SuppressWarnings("sy...
[ "protected", "void", "createAgentNameEditor", "(", "Composite", "parent", ",", "String", "text", ")", "{", "final", "Group", "group", "=", "SWTFactory", ".", "createGroup", "(", "parent", ",", "text", ",", "2", ",", "1", ",", "GridData", ".", "FILL_HORIZONTA...
Creates the widgets for specifying a agent name. @param parent the parent composite. @param text the label of the group.
[ "Creates", "the", "widgets", "for", "specifying", "a", "agent", "name", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLAgentMainLaunchConfigurationTab.java#L164-L188
httl/httl
httl/src/main/java/httl/spi/codecs/json/JSONArray.java
JSONArray.getInt
public int getInt(int index, int def) { """ get int value. @param index index. @param def default value. @return value or default value. """ Object tmp = mArray.get(index); return tmp != null && tmp instanceof Number ? ((Number) tmp).intValue() : def; }
java
public int getInt(int index, int def) { Object tmp = mArray.get(index); return tmp != null && tmp instanceof Number ? ((Number) tmp).intValue() : def; }
[ "public", "int", "getInt", "(", "int", "index", ",", "int", "def", ")", "{", "Object", "tmp", "=", "mArray", ".", "get", "(", "index", ")", ";", "return", "tmp", "!=", "null", "&&", "tmp", "instanceof", "Number", "?", "(", "(", "Number", ")", "tmp"...
get int value. @param index index. @param def default value. @return value or default value.
[ "get", "int", "value", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/spi/codecs/json/JSONArray.java#L62-L66
elvishew/xLog
library/src/main/java/com/elvishew/xlog/Logger.java
Logger.println
private void println(int logLevel, Object[] array) { """ Print an array in a new line. @param logLevel the log level of the printing array @param array the array to print """ if (logLevel < logConfiguration.logLevel) { return; } printlnInternal(logLevel, Arrays.deepToString(array)); ...
java
private void println(int logLevel, Object[] array) { if (logLevel < logConfiguration.logLevel) { return; } printlnInternal(logLevel, Arrays.deepToString(array)); }
[ "private", "void", "println", "(", "int", "logLevel", ",", "Object", "[", "]", "array", ")", "{", "if", "(", "logLevel", "<", "logConfiguration", ".", "logLevel", ")", "{", "return", ";", "}", "printlnInternal", "(", "logLevel", ",", "Arrays", ".", "deep...
Print an array in a new line. @param logLevel the log level of the printing array @param array the array to print
[ "Print", "an", "array", "in", "a", "new", "line", "." ]
train
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/Logger.java#L501-L506
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateSubPatternAssociation.java
TemplateSubPatternAssociation.matches
public boolean matches(XPathContext xctxt, int targetNode, QName mode) throws TransformerException { """ Return the mode associated with the template. @param xctxt XPath context to use with this template @param targetNode Target node @param mode reference, which may be null, to the <a href="http:/...
java
public boolean matches(XPathContext xctxt, int targetNode, QName mode) throws TransformerException { double score = m_stepPattern.getMatchScore(xctxt, targetNode); return (XPath.MATCH_SCORE_NONE != score) && matchModes(mode, m_template.getMode()); }
[ "public", "boolean", "matches", "(", "XPathContext", "xctxt", ",", "int", "targetNode", ",", "QName", "mode", ")", "throws", "TransformerException", "{", "double", "score", "=", "m_stepPattern", ".", "getMatchScore", "(", "xctxt", ",", "targetNode", ")", ";", ...
Return the mode associated with the template. @param xctxt XPath context to use with this template @param targetNode Target node @param mode reference, which may be null, to the <a href="http://www.w3.org/TR/xslt#modes">current mode</a>. @return The mode associated with the template. @throws TransformerException
[ "Return", "the", "mode", "associated", "with", "the", "template", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/TemplateSubPatternAssociation.java#L151-L159
apache/groovy
src/main/java/org/codehaus/groovy/runtime/GroovyCategorySupport.java
GroovyCategorySupport.use
public static <T> T use(List<Class> categoryClasses, Closure<T> closure) { """ Create a scope based on given categoryClasses and invoke closure within that scope. @param categoryClasses the list of classes containing category methods @param closure the closure during which to make the category class methods av...
java
public static <T> T use(List<Class> categoryClasses, Closure<T> closure) { return THREAD_INFO.getInfo().use(categoryClasses, closure); }
[ "public", "static", "<", "T", ">", "T", "use", "(", "List", "<", "Class", ">", "categoryClasses", ",", "Closure", "<", "T", ">", "closure", ")", "{", "return", "THREAD_INFO", ".", "getInfo", "(", ")", ".", "use", "(", "categoryClasses", ",", "closure",...
Create a scope based on given categoryClasses and invoke closure within that scope. @param categoryClasses the list of classes containing category methods @param closure the closure during which to make the category class methods available @return the value returned from the closure
[ "Create", "a", "scope", "based", "on", "given", "categoryClasses", "and", "invoke", "closure", "within", "that", "scope", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/GroovyCategorySupport.java#L272-L274
JetBrains/xodus
entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java
PersistentEntityStoreImpl.deleteEntity
boolean deleteEntity(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) { """ Deletes specified entity clearing all its properties and deleting all its outgoing links. @param entity to delete. """ clearProperties(txn, entity); clearBlobs(txn, entity); ...
java
boolean deleteEntity(@NotNull final PersistentStoreTransaction txn, @NotNull final PersistentEntity entity) { clearProperties(txn, entity); clearBlobs(txn, entity); deleteLinks(txn, entity); final PersistentEntityId id = entity.getId(); final int entityTypeId = id.getTypeId(); ...
[ "boolean", "deleteEntity", "(", "@", "NotNull", "final", "PersistentStoreTransaction", "txn", ",", "@", "NotNull", "final", "PersistentEntity", "entity", ")", "{", "clearProperties", "(", "txn", ",", "entity", ")", ";", "clearBlobs", "(", "txn", ",", "entity", ...
Deletes specified entity clearing all its properties and deleting all its outgoing links. @param entity to delete.
[ "Deletes", "specified", "entity", "clearing", "all", "its", "properties", "and", "deleting", "all", "its", "outgoing", "links", "." ]
train
https://github.com/JetBrains/xodus/blob/7b3476c4e81db66f9c7529148c761605cc8eea6d/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java#L1510-L1536
jbundle/jbundle
base/db/physical/src/main/java/org/jbundle/base/db/physical/PhysicalTable.java
PhysicalTable.doSetHandle
public boolean doSetHandle(Object bookmark, int iHandleType) throws DBException { """ Read the record given the ID to this persistent object. Note: You can't use an OBJECT_ID handle, as these tables are non-persistent. @param objectID java.lang.Object The handle to lookup. @return true if found. @exception DBE...
java
public boolean doSetHandle(Object bookmark, int iHandleType) throws DBException { try { if (iHandleType == DBConstants.OBJECT_ID_HANDLE) { return super.doSetHandle(bookmark, iHandleType); //? throw new DBException("Object IDs are not supported for ...
[ "public", "boolean", "doSetHandle", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "throws", "DBException", "{", "try", "{", "if", "(", "iHandleType", "==", "DBConstants", ".", "OBJECT_ID_HANDLE", ")", "{", "return", "super", ".", "doSetHandle", "(...
Read the record given the ID to this persistent object. Note: You can't use an OBJECT_ID handle, as these tables are non-persistent. @param objectID java.lang.Object The handle to lookup. @return true if found. @exception DBException File exception.
[ "Read", "the", "record", "given", "the", "ID", "to", "this", "persistent", "object", ".", "Note", ":", "You", "can", "t", "use", "an", "OBJECT_ID", "handle", "as", "these", "tables", "are", "non", "-", "persistent", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/db/physical/src/main/java/org/jbundle/base/db/physical/PhysicalTable.java#L297-L310
sporniket/core
sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java
XmlStringTools.getTextInsideTag
public static String getTextInsideTag(String text, String tag) { """ Wrap a text inside a tag with attributes. @param text the text to wrap @param tag the tag to use @return the xml code """ return getTextInsideTag(text, tag, EMPTY_MAP); }
java
public static String getTextInsideTag(String text, String tag) { return getTextInsideTag(text, tag, EMPTY_MAP); }
[ "public", "static", "String", "getTextInsideTag", "(", "String", "text", ",", "String", "tag", ")", "{", "return", "getTextInsideTag", "(", "text", ",", "tag", ",", "EMPTY_MAP", ")", ";", "}" ]
Wrap a text inside a tag with attributes. @param text the text to wrap @param tag the tag to use @return the xml code
[ "Wrap", "a", "text", "inside", "a", "tag", "with", "attributes", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java#L609-L612
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicatedCloud_serviceName_host_duration_POST
public OvhOrder dedicatedCloud_serviceName_host_duration_POST(String serviceName, String duration, Long datacenterId, String name, Long quantity) throws IOException { """ Create order REST: POST /order/dedicatedCloud/{serviceName}/host/{duration} @param datacenterId [required] Datacenter where the Host will be...
java
public OvhOrder dedicatedCloud_serviceName_host_duration_POST(String serviceName, String duration, Long datacenterId, String name, Long quantity) throws IOException { String qPath = "/order/dedicatedCloud/{serviceName}/host/{duration}"; StringBuilder sb = path(qPath, serviceName, duration); HashMap<String, Object...
[ "public", "OvhOrder", "dedicatedCloud_serviceName_host_duration_POST", "(", "String", "serviceName", ",", "String", "duration", ",", "Long", "datacenterId", ",", "String", "name", ",", "Long", "quantity", ")", "throws", "IOException", "{", "String", "qPath", "=", "\...
Create order REST: POST /order/dedicatedCloud/{serviceName}/host/{duration} @param datacenterId [required] Datacenter where the Host will be added @param quantity [required] Quantity of hosts you want to order (default 1) @param name [required] Host profile you want to order ("name" field of a Profile returned by /ded...
[ "Create", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L5641-L5650
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/bos/BosClient.java
BosClient.abortMultipartUpload
public void abortMultipartUpload(String bucketName, String key, String uploadId) { """ Aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are c...
java
public void abortMultipartUpload(String bucketName, String key, String uploadId) { this.abortMultipartUpload(new AbortMultipartUploadRequest(bucketName, key, uploadId)); }
[ "public", "void", "abortMultipartUpload", "(", "String", "bucketName", ",", "String", "key", ",", "String", "uploadId", ")", "{", "this", ".", "abortMultipartUpload", "(", "new", "AbortMultipartUploadRequest", "(", "bucketName", ",", "key", ",", "uploadId", ")", ...
Aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads may or may not succeed. As a result, it may be necessa...
[ "Aborts", "a", "multipart", "upload", ".", "After", "a", "multipart", "upload", "is", "aborted", "no", "additional", "parts", "can", "be", "uploaded", "using", "that", "upload", "ID", ".", "The", "storage", "consumed", "by", "any", "previously", "uploaded", ...
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/bos/BosClient.java#L1312-L1314
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbooksInner.java
RunbooksInner.getAsync
public Observable<RunbookInner> getAsync(String resourceGroupName, String automationAccountName, String runbookName) { """ Retrieve the runbook identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param runbookN...
java
public Observable<RunbookInner> getAsync(String resourceGroupName, String automationAccountName, String runbookName) { return getWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName).map(new Func1<ServiceResponse<RunbookInner>, RunbookInner>() { @Override public...
[ "public", "Observable", "<", "RunbookInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ",", "String", "runbookName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName...
Retrieve the runbook identified by runbook name. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @param runbookName The runbook name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Runboo...
[ "Retrieve", "the", "runbook", "identified", "by", "runbook", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbooksInner.java#L227-L234
windup/windup
rules-xml/api/src/main/java/org/jboss/windup/rules/apps/xml/service/XmlFileService.java
XmlFileService.loadDocumentQuiet
public Document loadDocumentQuiet(GraphRewrite event, EvaluationContext context, XmlFileModel model) { """ Loads and parses the provided XML file. This will quietly fail (not throwing an {@link Exception}) and return null if it is unable to parse the provided {@link XmlFileModel}. A {@link ClassificationModel} wi...
java
public Document loadDocumentQuiet(GraphRewrite event, EvaluationContext context, XmlFileModel model) { try { return loadDocument(event, context, model); } catch(Exception ex) { return null; } }
[ "public", "Document", "loadDocumentQuiet", "(", "GraphRewrite", "event", ",", "EvaluationContext", "context", ",", "XmlFileModel", "model", ")", "{", "try", "{", "return", "loadDocument", "(", "event", ",", "context", ",", "model", ")", ";", "}", "catch", "(",...
Loads and parses the provided XML file. This will quietly fail (not throwing an {@link Exception}) and return null if it is unable to parse the provided {@link XmlFileModel}. A {@link ClassificationModel} will be created to indicate that this file failed to parse. @return Returns either the parsed {@link Document} or ...
[ "Loads", "and", "parses", "the", "provided", "XML", "file", ".", "This", "will", "quietly", "fail", "(", "not", "throwing", "an", "{", "@link", "Exception", "}", ")", "and", "return", "null", "if", "it", "is", "unable", "to", "parse", "the", "provided", ...
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-xml/api/src/main/java/org/jboss/windup/rules/apps/xml/service/XmlFileService.java#L47-L57
fabric8io/docker-maven-plugin
src/main/java/io/fabric8/maven/docker/util/EnvUtil.java
EnvUtil.extractLargerVersion
public static String extractLargerVersion(String versionA, String versionB) { """ Compare to version strings and return the larger version strings. This is used in calculating the minimal required API version for this plugin. Version strings must be comparable as floating numbers. The versions must be given in t...
java
public static String extractLargerVersion(String versionA, String versionB) { if (versionB == null || versionA == null) { return versionA == null ? versionB : versionA; } else { String partsA[] = versionA.split("\\."); String partsB[] = versionB.split("\\."); ...
[ "public", "static", "String", "extractLargerVersion", "(", "String", "versionA", ",", "String", "versionB", ")", "{", "if", "(", "versionB", "==", "null", "||", "versionA", "==", "null", ")", "{", "return", "versionA", "==", "null", "?", "versionB", ":", "...
Compare to version strings and return the larger version strings. This is used in calculating the minimal required API version for this plugin. Version strings must be comparable as floating numbers. The versions must be given in the format in a semantic version foramt (e.g. "1.23" If either version is <code>null</cod...
[ "Compare", "to", "version", "strings", "and", "return", "the", "larger", "version", "strings", ".", "This", "is", "used", "in", "calculating", "the", "minimal", "required", "API", "version", "for", "this", "plugin", ".", "Version", "strings", "must", "be", "...
train
https://github.com/fabric8io/docker-maven-plugin/blob/70ce4f56125d8efb8ddcf2ad4dbb5d6e2c7642b3/src/main/java/io/fabric8/maven/docker/util/EnvUtil.java#L59-L76
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBeanContext.java
ControlBeanContext.getAnnotationMap
public PropertyMap getAnnotationMap(AnnotatedElement annotElem) { """ Returns the PropertyMap containing default properties for an AnnotatedElement in the current context. The initialization of PropertyMap binding is always done by delegating to a {@link ControlContainerContext}, enabling containers to implemen...
java
public PropertyMap getAnnotationMap(AnnotatedElement annotElem) { ControlBeanContext beanContext = this; while (beanContext != null) { // REVIEW: should ControlContainerContext-derived classes override getBeanAnnotationMap? Not sure // that name makes sense, and perh...
[ "public", "PropertyMap", "getAnnotationMap", "(", "AnnotatedElement", "annotElem", ")", "{", "ControlBeanContext", "beanContext", "=", "this", ";", "while", "(", "beanContext", "!=", "null", ")", "{", "// REVIEW: should ControlContainerContext-derived classes override getBean...
Returns the PropertyMap containing default properties for an AnnotatedElement in the current context. The initialization of PropertyMap binding is always done by delegating to a {@link ControlContainerContext}, enabling containers to implement property binding mechanisms (such as external config) that may override the...
[ "Returns", "the", "PropertyMap", "containing", "default", "properties", "for", "an", "AnnotatedElement", "in", "the", "current", "context", ".", "The", "initialization", "of", "PropertyMap", "binding", "is", "always", "done", "by", "delegating", "to", "a", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/bean/ControlBeanContext.java#L371-L385
Netflix/spectator
spectator-ext-ipc/src/main/java/com/netflix/spectator/ipc/http/HttpRequestBuilder.java
HttpRequestBuilder.addHeader
public HttpRequestBuilder addHeader(String name, String value) { """ Add a header to the request. Note the content type will be set automatically when providing the content payload and should not be set here. If the value is null, then the header will get ignored. """ if (value != null) { reqHeader...
java
public HttpRequestBuilder addHeader(String name, String value) { if (value != null) { reqHeaders.put(name, value); } return this; }
[ "public", "HttpRequestBuilder", "addHeader", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "reqHeaders", ".", "put", "(", "name", ",", "value", ")", ";", "}", "return", "this", ";", "}" ]
Add a header to the request. Note the content type will be set automatically when providing the content payload and should not be set here. If the value is null, then the header will get ignored.
[ "Add", "a", "header", "to", "the", "request", ".", "Note", "the", "content", "type", "will", "be", "set", "automatically", "when", "providing", "the", "content", "payload", "and", "should", "not", "be", "set", "here", ".", "If", "the", "value", "is", "nu...
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-ext-ipc/src/main/java/com/netflix/spectator/ipc/http/HttpRequestBuilder.java#L90-L95
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java
ReUtil.delPre
public static String delPre(String regex, CharSequence content) { """ 删除正则匹配到的内容之前的字符 如果没有找到,则返回原文 @param regex 定位正则 @param content 被查找的内容 @return 删除前缀后的新内容 """ if (null == content || null == regex) { return StrUtil.str(content); } // Pattern pattern = Pattern.compile(regex, Pattern.DOTALL)...
java
public static String delPre(String regex, CharSequence content) { if (null == content || null == regex) { return StrUtil.str(content); } // Pattern pattern = Pattern.compile(regex, Pattern.DOTALL); final Pattern pattern = PatternPool.get(regex, Pattern.DOTALL); Matcher matcher = pattern.matcher(con...
[ "public", "static", "String", "delPre", "(", "String", "regex", ",", "CharSequence", "content", ")", "{", "if", "(", "null", "==", "content", "||", "null", "==", "regex", ")", "{", "return", "StrUtil", ".", "str", "(", "content", ")", ";", "}", "// Pat...
删除正则匹配到的内容之前的字符 如果没有找到,则返回原文 @param regex 定位正则 @param content 被查找的内容 @return 删除前缀后的新内容
[ "删除正则匹配到的内容之前的字符", "如果没有找到,则返回原文" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java#L341-L353
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java
Pixel.getGrey
public int getGrey(final int redWeight, final int greenWeight, final int blueWeight) { """ Calculates the grey value of this pixel using specified weights. @param redWeight weight for red channel @param greenWeight weight for green channel @param blueWeight weight for blue channel @return grey value of pixel f...
java
public int getGrey(final int redWeight, final int greenWeight, final int blueWeight){ return Pixel.getGrey(getValue(), redWeight, greenWeight, blueWeight); }
[ "public", "int", "getGrey", "(", "final", "int", "redWeight", ",", "final", "int", "greenWeight", ",", "final", "int", "blueWeight", ")", "{", "return", "Pixel", ".", "getGrey", "(", "getValue", "(", ")", ",", "redWeight", ",", "greenWeight", ",", "blueWei...
Calculates the grey value of this pixel using specified weights. @param redWeight weight for red channel @param greenWeight weight for green channel @param blueWeight weight for blue channel @return grey value of pixel for specified weights @throws ArithmeticException divide by zero if the weights sum up to 0. @throws ...
[ "Calculates", "the", "grey", "value", "of", "this", "pixel", "using", "specified", "weights", "." ]
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Pixel.java#L552-L554
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optStringArray
@Nullable public static String[] optStringArray(@Nullable Bundle bundle, @Nullable String key) { """ Returns a optional {@link java.lang.String} array value. In other words, returns the value mapped by key if it exists and is a {@link java.lang.String} array. The bundle argument is allowed to be {@code null}....
java
@Nullable public static String[] optStringArray(@Nullable Bundle bundle, @Nullable String key) { return optStringArray(bundle, key, new String[0]); }
[ "@", "Nullable", "public", "static", "String", "[", "]", "optStringArray", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optStringArray", "(", "bundle", ",", "key", ",", "new", "String", "[", "0", "...
Returns a optional {@link java.lang.String} array value. In other words, returns the value mapped by key if it exists and is a {@link java.lang.String} array. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method wi...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L995-L998
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/system.java
system.navigateToActivityByClassName
public static void navigateToActivityByClassName(Context context, String className) throws ClassNotFoundException { """ Navigate to an activity programmatically by providing the package + activity name @param context Context where I am coming from @param className Full path to the desired Activity (e.g. "c...
java
public static void navigateToActivityByClassName(Context context, String className) throws ClassNotFoundException { Class<?> c = null; if (className != null) { try { c = Class.forName(className); } catch (ClassNotFoundException e) { QuickUtils.log....
[ "public", "static", "void", "navigateToActivityByClassName", "(", "Context", "context", ",", "String", "className", ")", "throws", "ClassNotFoundException", "{", "Class", "<", "?", ">", "c", "=", "null", ";", "if", "(", "className", "!=", "null", ")", "{", "...
Navigate to an activity programmatically by providing the package + activity name @param context Context where I am coming from @param className Full path to the desired Activity (e.g. "com.sample.MainActivity")
[ "Navigate", "to", "an", "activity", "programmatically", "by", "providing", "the", "package", "+", "activity", "name" ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/system.java#L80-L91
alkacon/opencms-core
src/org/opencms/ade/containerpage/CmsContainerpageService.java
CmsContainerpageService.getNoEditReason
private String getNoEditReason(CmsObject cms, CmsResource containerPage) throws CmsException { """ Returns the no-edit reason for the given resource.<p> @param cms the current cms object @param containerPage the resource @return the no-edit reason, empty if editing is allowed @throws CmsException is some...
java
private String getNoEditReason(CmsObject cms, CmsResource containerPage) throws CmsException { return new CmsResourceUtil(cms, containerPage).getNoEditReason( OpenCms.getWorkplaceManager().getWorkplaceLocale(cms)); }
[ "private", "String", "getNoEditReason", "(", "CmsObject", "cms", ",", "CmsResource", "containerPage", ")", "throws", "CmsException", "{", "return", "new", "CmsResourceUtil", "(", "cms", ",", "containerPage", ")", ".", "getNoEditReason", "(", "OpenCms", ".", "getWo...
Returns the no-edit reason for the given resource.<p> @param cms the current cms object @param containerPage the resource @return the no-edit reason, empty if editing is allowed @throws CmsException is something goes wrong
[ "Returns", "the", "no", "-", "edit", "reason", "for", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/CmsContainerpageService.java#L2591-L2595
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Utils/BlockDrawingHelper.java
BlockDrawingHelper.placeItem
public void placeItem(ItemStack stack, BlockPos pos, World world, boolean centreItem) { """ Spawn a single item at the specified position. @param item the actual item to be spawned. @param pos the position at which to spawn it. @param world the world in which to spawn the item. """ EntityItem entity...
java
public void placeItem(ItemStack stack, BlockPos pos, World world, boolean centreItem) { EntityItem entityitem = createItem(stack, (double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), world, centreItem); // Set the motions to zero to prevent random movement. entityitem.motionX = 0; ...
[ "public", "void", "placeItem", "(", "ItemStack", "stack", ",", "BlockPos", "pos", ",", "World", "world", ",", "boolean", "centreItem", ")", "{", "EntityItem", "entityitem", "=", "createItem", "(", "stack", ",", "(", "double", ")", "pos", ".", "getX", "(", ...
Spawn a single item at the specified position. @param item the actual item to be spawned. @param pos the position at which to spawn it. @param world the world in which to spawn the item.
[ "Spawn", "a", "single", "item", "at", "the", "specified", "position", "." ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Utils/BlockDrawingHelper.java#L486-L495
FasterXML/woodstox
src/main/java/com/ctc/wstx/sr/InputElementStack.java
InputElementStack.createNonTransientNsContext
public BaseNsContext createNonTransientNsContext(Location loc) { """ Method called to construct a non-transient NamespaceContext instance; generally needed when creating events to return from event-based iterators. """ // Have an instance we can reuse? Great! if (mLastNsContext != null) { ...
java
public BaseNsContext createNonTransientNsContext(Location loc) { // Have an instance we can reuse? Great! if (mLastNsContext != null) { return mLastNsContext; } // No namespaces declared at this point? Easy, as well: int totalNsSize = mNamespaces.size(); ...
[ "public", "BaseNsContext", "createNonTransientNsContext", "(", "Location", "loc", ")", "{", "// Have an instance we can reuse? Great!", "if", "(", "mLastNsContext", "!=", "null", ")", "{", "return", "mLastNsContext", ";", "}", "// No namespaces declared at this point? Easy, a...
Method called to construct a non-transient NamespaceContext instance; generally needed when creating events to return from event-based iterators.
[ "Method", "called", "to", "construct", "a", "non", "-", "transient", "NamespaceContext", "instance", ";", "generally", "needed", "when", "creating", "events", "to", "return", "from", "event", "-", "based", "iterators", "." ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/sr/InputElementStack.java#L289-L316
haifengl/smile
math/src/main/java/smile/math/special/Beta.java
Beta.regularizedIncompleteBetaFunction
public static double regularizedIncompleteBetaFunction(double alpha, double beta, double x) { """ Regularized Incomplete Beta function. Continued Fraction approximation (see Numerical recipies for details) """ if (x < 0.0 || x > 1.0) { throw new IllegalArgumentException("Invalid x: " + x);...
java
public static double regularizedIncompleteBetaFunction(double alpha, double beta, double x) { if (x < 0.0 || x > 1.0) { throw new IllegalArgumentException("Invalid x: " + x); } double ibeta = 0.0; if (x == 0.0) { ibeta = 0.0; } else { if (x ==...
[ "public", "static", "double", "regularizedIncompleteBetaFunction", "(", "double", "alpha", ",", "double", "beta", ",", "double", "x", ")", "{", "if", "(", "x", "<", "0.0", "||", "x", ">", "1.0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\...
Regularized Incomplete Beta function. Continued Fraction approximation (see Numerical recipies for details)
[ "Regularized", "Incomplete", "Beta", "function", ".", "Continued", "Fraction", "approximation", "(", "see", "Numerical", "recipies", "for", "details", ")" ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/math/special/Beta.java#L56-L80
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/mr/security/TokenUtil.java
TokenUtil.obtainEsToken
private static EsToken obtainEsToken(final RestClient client, User user) { """ Obtain the given user's authentication token from Elasticsearch by performing the getAuthToken operation as the given user, thus ensuring the subject's private credentials available on the thread's access control context for the life ...
java
private static EsToken obtainEsToken(final RestClient client, User user) { // TODO: Should we extend this to basic authentication at some point? KerberosPrincipal principal = user.getKerberosPrincipal(); if (user.isProxyUser()) { principal = user.getRealUserProvider().getUser().getKe...
[ "private", "static", "EsToken", "obtainEsToken", "(", "final", "RestClient", "client", ",", "User", "user", ")", "{", "// TODO: Should we extend this to basic authentication at some point?", "KerberosPrincipal", "principal", "=", "user", ".", "getKerberosPrincipal", "(", ")...
Obtain the given user's authentication token from Elasticsearch by performing the getAuthToken operation as the given user, thus ensuring the subject's private credentials available on the thread's access control context for the life of the operation. @param client The Elasticsearch client @param user the user object t...
[ "Obtain", "the", "given", "user", "s", "authentication", "token", "from", "Elasticsearch", "by", "performing", "the", "getAuthToken", "operation", "as", "the", "given", "user", "thus", "ensuring", "the", "subject", "s", "private", "credentials", "available", "on",...
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/mr/security/TokenUtil.java#L67-L80
lucee/Lucee
core/src/main/java/lucee/runtime/interpreter/CFMLExpressionInterpreter.java
CFMLExpressionInterpreter.assignOp
protected Ref assignOp() throws PageException { """ Transfomiert Zuweisungs Operation. <br /> EBNF:<br /> <code>eqvOp ["=" spaces assignOp];</code> @return CFXD Element @throws PageException """ Ref ref = contOp(); if (cfml.forwardIfCurrent('=')) { cfml.removeSpace(); if (mode == STATIC || r...
java
protected Ref assignOp() throws PageException { Ref ref = contOp(); if (cfml.forwardIfCurrent('=')) { cfml.removeSpace(); if (mode == STATIC || ref instanceof Literal) { ref = new DynAssign(ref, assignOp(), limited); } else { ref = new Assign(ref, assignOp(), limited); } } return ref; ...
[ "protected", "Ref", "assignOp", "(", ")", "throws", "PageException", "{", "Ref", "ref", "=", "contOp", "(", ")", ";", "if", "(", "cfml", ".", "forwardIfCurrent", "(", "'", "'", ")", ")", "{", "cfml", ".", "removeSpace", "(", ")", ";", "if", "(", "m...
Transfomiert Zuweisungs Operation. <br /> EBNF:<br /> <code>eqvOp ["=" spaces assignOp];</code> @return CFXD Element @throws PageException
[ "Transfomiert", "Zuweisungs", "Operation", ".", "<br", "/", ">", "EBNF", ":", "<br", "/", ">", "<code", ">", "eqvOp", "[", "=", "spaces", "assignOp", "]", ";", "<", "/", "code", ">" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/interpreter/CFMLExpressionInterpreter.java#L302-L315
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/util/Util.java
Util.readOID
private static String readOID(ByteArrayInputStream bais, int oid_len) throws IOException { """ /* WARNING: The stream must have read up to the OID length. This method reads and decodes the OID after the length. """ byte[] oid_tmp_arr = new byte[oid_len]; bais.read(oid_tmp_arr, 0, oid_len); ...
java
private static String readOID(ByteArrayInputStream bais, int oid_len) throws IOException { byte[] oid_tmp_arr = new byte[oid_len]; bais.read(oid_tmp_arr, 0, oid_len); byte[] oid_arr = new byte[oid_len + 2]; oid_arr[0] = ASN_TAG_OID; oid_arr[1] = (byte) oid_len; System.arr...
[ "private", "static", "String", "readOID", "(", "ByteArrayInputStream", "bais", ",", "int", "oid_len", ")", "throws", "IOException", "{", "byte", "[", "]", "oid_tmp_arr", "=", "new", "byte", "[", "oid_len", "]", ";", "bais", ".", "read", "(", "oid_tmp_arr", ...
/* WARNING: The stream must have read up to the OID length. This method reads and decodes the OID after the length.
[ "/", "*", "WARNING", ":", "The", "stream", "must", "have", "read", "up", "to", "the", "OID", "length", ".", "This", "method", "reads", "and", "decodes", "the", "OID", "after", "the", "length", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/transport/iiop/security/util/Util.java#L674-L682
landawn/AbacusUtil
src/com/landawn/abacus/util/N.java
N.checkArgPositive
public static int checkArgPositive(final int arg, final String argNameOrErrorMsg) { """ Checks if the specified {@code arg} is positive, and throws {@code IllegalArgumentException} if it is not. @param arg @param argNameOrErrorMsg @throws IllegalArgumentException if the specified {@code arg} is negative. ...
java
public static int checkArgPositive(final int arg, final String argNameOrErrorMsg) { if (arg <= 0) { if (argNameOrErrorMsg.indexOf(' ') == N.INDEX_NOT_FOUND) { throw new IllegalArgumentException("'" + argNameOrErrorMsg + "' can not be zero or negative: " + arg); } else...
[ "public", "static", "int", "checkArgPositive", "(", "final", "int", "arg", ",", "final", "String", "argNameOrErrorMsg", ")", "{", "if", "(", "arg", "<=", "0", ")", "{", "if", "(", "argNameOrErrorMsg", ".", "indexOf", "(", "'", "'", ")", "==", "N", ".",...
Checks if the specified {@code arg} is positive, and throws {@code IllegalArgumentException} if it is not. @param arg @param argNameOrErrorMsg @throws IllegalArgumentException if the specified {@code arg} is negative.
[ "Checks", "if", "the", "specified", "{", "@code", "arg", "}", "is", "positive", "and", "throws", "{", "@code", "IllegalArgumentException", "}", "if", "it", "is", "not", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/N.java#L5884-L5894
stephanenicolas/robospice
extensions/robospice-ui-spicelist-parent/robospice-ui-spicelist/src/main/java/com/octo/android/robospice/spicelist/BaseSpiceArrayAdapter.java
BaseSpiceArrayAdapter.updateListItemViewAsynchronously
protected final void updateListItemViewAsynchronously(final T data, final SpiceListItemView<T> spiceListItemView) { """ Updates a {@link SpiceListItemView} containing some data. The method {@link #createRequest(Object)} will be applied to data to know which bitmapRequest to execute to get data from network if ne...
java
protected final void updateListItemViewAsynchronously(final T data, final SpiceListItemView<T> spiceListItemView) { if (!registered(spiceListItemView)) { addSpiceListItemView(spiceListItemView); freshDrawableSet.add(data); } for (int imageIndex = 0; imageIndex < spiceList...
[ "protected", "final", "void", "updateListItemViewAsynchronously", "(", "final", "T", "data", ",", "final", "SpiceListItemView", "<", "T", ">", "spiceListItemView", ")", "{", "if", "(", "!", "registered", "(", "spiceListItemView", ")", ")", "{", "addSpiceListItemVi...
Updates a {@link SpiceListItemView} containing some data. The method {@link #createRequest(Object)} will be applied to data to know which bitmapRequest to execute to get data from network if needed. This method must be called during {@link #getView(int, android.view.View, android.view.ViewGroup)}. @param data the data ...
[ "Updates", "a", "{" ]
train
https://github.com/stephanenicolas/robospice/blob/8bffde88b3534a961a13cab72a8f07a755f0a0fe/extensions/robospice-ui-spicelist-parent/robospice-ui-spicelist/src/main/java/com/octo/android/robospice/spicelist/BaseSpiceArrayAdapter.java#L120-L130
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java
SqlQueryStatement.buildSuperJoinTree
protected void buildSuperJoinTree(TableAlias left, ClassDescriptor cld, String name, boolean useOuterJoin) { """ build the Join-Information if a super reference exists @param left @param cld @param name """ ClassDescriptor superCld = cld.getSuperClassDescriptor(); if (superCld != null) ...
java
protected void buildSuperJoinTree(TableAlias left, ClassDescriptor cld, String name, boolean useOuterJoin) { ClassDescriptor superCld = cld.getSuperClassDescriptor(); if (superCld != null) { SuperReferenceDescriptor superRef = cld.getSuperReference(); FieldDescr...
[ "protected", "void", "buildSuperJoinTree", "(", "TableAlias", "left", ",", "ClassDescriptor", "cld", ",", "String", "name", ",", "boolean", "useOuterJoin", ")", "{", "ClassDescriptor", "superCld", "=", "cld", ".", "getSuperClassDescriptor", "(", ")", ";", "if", ...
build the Join-Information if a super reference exists @param left @param cld @param name
[ "build", "the", "Join", "-", "Information", "if", "a", "super", "reference", "exists" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/sql/SqlQueryStatement.java#L1730-L1746
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.addVideoFrameUrlAsync
public Observable<Void> addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List<VideoFrameBodyItem> videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter) { """ Use this method to add frames for a video review.Timescale: This parameter is a factor which is use...
java
public Observable<Void> addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List<VideoFrameBodyItem> videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter) { return addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, add...
[ "public", "Observable", "<", "Void", ">", "addVideoFrameUrlAsync", "(", "String", "teamName", ",", "String", "reviewId", ",", "String", "contentType", ",", "List", "<", "VideoFrameBodyItem", ">", "videoFrameBody", ",", "AddVideoFrameUrlOptionalParameter", "addVideoFrame...
Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is ...
[ "Use", "this", "method", "to", "add", "frames", "for", "a", "video", "review", ".", "Timescale", ":", "This", "parameter", "is", "a", "factor", "which", "is", "used", "to", "convert", "the", "timestamp", "on", "a", "frame", "into", "milliseconds", ".", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java#L2212-L2219
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFiltersInner.java
RouteFiltersInner.getByResourceGroupAsync
public Observable<RouteFilterInner> getByResourceGroupAsync(String resourceGroupName, String routeFilterName, String expand) { """ Gets the specified route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param expand Expands referenced exp...
java
public Observable<RouteFilterInner> getByResourceGroupAsync(String resourceGroupName, String routeFilterName, String expand) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, routeFilterName, expand).map(new Func1<ServiceResponse<RouteFilterInner>, RouteFilterInner>() { @Overrid...
[ "public", "Observable", "<", "RouteFilterInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "routeFilterName", ",", "String", "expand", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Gets the specified route filter. @param resourceGroupName The name of the resource group. @param routeFilterName The name of the route filter. @param expand Expands referenced express route bgp peering resources. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the Ro...
[ "Gets", "the", "specified", "route", "filter", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFiltersInner.java#L382-L389
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.setBytes
public static void setBytes(OutputStream os, byte[] bytes) throws IOException { """ Write the byte[] to the output stream. The stream is closed before this method returns. @param os an output stream @param bytes the byte[] to write to the output stream @throws IOException if an IOException occurs. @since...
java
public static void setBytes(OutputStream os, byte[] bytes) throws IOException { try { os.write(bytes); } finally { closeWithWarning(os); } }
[ "public", "static", "void", "setBytes", "(", "OutputStream", "os", ",", "byte", "[", "]", "bytes", ")", "throws", "IOException", "{", "try", "{", "os", ".", "write", "(", "bytes", ")", ";", "}", "finally", "{", "closeWithWarning", "(", "os", ")", ";", ...
Write the byte[] to the output stream. The stream is closed before this method returns. @param os an output stream @param bytes the byte[] to write to the output stream @throws IOException if an IOException occurs. @since 1.7.1
[ "Write", "the", "byte", "[]", "to", "the", "output", "stream", ".", "The", "stream", "is", "closed", "before", "this", "method", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L909-L915
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.eachLine
public static <T> T eachLine(InputStream stream, String charset, int firstLine, @ClosureParams(value=FromString.class,options= { """ Iterates through this stream reading with the provided charset, passing each line to the given 1 or 2 arg closure. The stream is closed after this method returns. @param stream ...
java
public static <T> T eachLine(InputStream stream, String charset, int firstLine, @ClosureParams(value=FromString.class,options={"String","String,Integer"}) Closure<T> closure) throws IOException { return eachLine(new InputStreamReader(stream, charset), firstLine, closure); }
[ "public", "static", "<", "T", ">", "T", "eachLine", "(", "InputStream", "stream", ",", "String", "charset", ",", "int", "firstLine", ",", "@", "ClosureParams", "(", "value", "=", "FromString", ".", "class", ",", "options", "=", "{", "\"String\"", ",", "\...
Iterates through this stream reading with the provided charset, passing each line to the given 1 or 2 arg closure. The stream is closed after this method returns. @param stream a stream @param charset opens the stream with a specified charset @param firstLine the line number value used for the first line (defaul...
[ "Iterates", "through", "this", "stream", "reading", "with", "the", "provided", "charset", "passing", "each", "line", "to", "the", "given", "1", "or", "2", "arg", "closure", ".", "The", "stream", "is", "closed", "after", "this", "method", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L378-L380
ogaclejapan/SmartTabLayout
utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java
Bundler.putStringArray
public Bundler putStringArray(String key, String[] value) { """ Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a String array object, or null @return this """ bun...
java
public Bundler putStringArray(String key, String[] value) { bundle.putStringArray(key, value); return this; }
[ "public", "Bundler", "putStringArray", "(", "String", "key", ",", "String", "[", "]", "value", ")", "{", "bundle", ".", "putStringArray", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a String array object, or null @return this
[ "Inserts", "a", "String", "array", "value", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/ogaclejapan/SmartTabLayout/blob/712e81a92f1e12a3c33dcbda03d813e0162e8589/utils-v4/src/main/java/com/ogaclejapan/smarttablayout/utils/v4/Bundler.java#L495-L498
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/WikisApi.java
WikisApi.uploadAttachment
public WikiAttachment uploadAttachment(Object projectIdOrPath, File fileToUpload) throws GitLabApiException { """ Uploads a file to the attachment folder inside the wiki’s repository. The attachment folder is the uploads folder. <pre><code>POST /projects/:id/wikis/attachments</code></pre> @param projectIdOrP...
java
public WikiAttachment uploadAttachment(Object projectIdOrPath, File fileToUpload) throws GitLabApiException { return (uploadAttachment(projectIdOrPath, fileToUpload, null)); }
[ "public", "WikiAttachment", "uploadAttachment", "(", "Object", "projectIdOrPath", ",", "File", "fileToUpload", ")", "throws", "GitLabApiException", "{", "return", "(", "uploadAttachment", "(", "projectIdOrPath", ",", "fileToUpload", ",", "null", ")", ")", ";", "}" ]
Uploads a file to the attachment folder inside the wiki’s repository. The attachment folder is the uploads folder. <pre><code>POST /projects/:id/wikis/attachments</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param fileToUpl...
[ "Uploads", "a", "file", "to", "the", "attachment", "folder", "inside", "the", "wiki’s", "repository", ".", "The", "attachment", "folder", "is", "the", "uploads", "folder", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L181-L183
PawelAdamski/HttpClientMock
src/main/java/com/github/paweladamski/httpclientmock/HttpClientResponseBuilder.java
HttpClientResponseBuilder.doReturnXML
public HttpClientResponseBuilder doReturnXML(String response, Charset charset) { """ Adds action which returns provided XML in UTF-8 and status 200. Additionally it sets "Content-type" header to "application/xml". @param response JSON to return @return response builder """ return doReturn(response,...
java
public HttpClientResponseBuilder doReturnXML(String response, Charset charset) { return doReturn(response, charset).withHeader("Content-type", APPLICATION_XML.toString()); }
[ "public", "HttpClientResponseBuilder", "doReturnXML", "(", "String", "response", ",", "Charset", "charset", ")", "{", "return", "doReturn", "(", "response", ",", "charset", ")", ".", "withHeader", "(", "\"Content-type\"", ",", "APPLICATION_XML", ".", "toString", "...
Adds action which returns provided XML in UTF-8 and status 200. Additionally it sets "Content-type" header to "application/xml". @param response JSON to return @return response builder
[ "Adds", "action", "which", "returns", "provided", "XML", "in", "UTF", "-", "8", "and", "status", "200", ".", "Additionally", "it", "sets", "Content", "-", "type", "header", "to", "application", "/", "xml", "." ]
train
https://github.com/PawelAdamski/HttpClientMock/blob/0205498434bbc0c78c187a51181cac9b266a28fb/src/main/java/com/github/paweladamski/httpclientmock/HttpClientResponseBuilder.java#L175-L177
jeremylong/DependencyCheck
utils/src/main/java/org/owasp/dependencycheck/utils/Downloader.java
Downloader.fetchFile
public void fetchFile(URL url, File outputPath) throws DownloadFailedException { """ Retrieves a file from a given URL and saves it to the outputPath. @param url the URL of the file to download @param outputPath the path to the save the file to @throws org.owasp.dependencycheck.utils.DownloadFailedException i...
java
public void fetchFile(URL url, File outputPath) throws DownloadFailedException { fetchFile(url, outputPath, true); }
[ "public", "void", "fetchFile", "(", "URL", "url", ",", "File", "outputPath", ")", "throws", "DownloadFailedException", "{", "fetchFile", "(", "url", ",", "outputPath", ",", "true", ")", ";", "}" ]
Retrieves a file from a given URL and saves it to the outputPath. @param url the URL of the file to download @param outputPath the path to the save the file to @throws org.owasp.dependencycheck.utils.DownloadFailedException is thrown if there is an error downloading the file
[ "Retrieves", "a", "file", "from", "a", "given", "URL", "and", "saves", "it", "to", "the", "outputPath", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/utils/src/main/java/org/owasp/dependencycheck/utils/Downloader.java#L65-L67
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.getCertificateAsync
public Observable<AppServiceCertificateResourceInner> getCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { """ Get the certificate associated with a certificate order. Get the certificate associated with a certificate order. @param resourceGroupName Name of the resource gro...
java
public Observable<AppServiceCertificateResourceInner> getCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1<ServiceResponse<AppServiceCertificateResourceInner>, AppServi...
[ "public", "Observable", "<", "AppServiceCertificateResourceInner", ">", "getCertificateAsync", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ",", "String", "name", ")", "{", "return", "getCertificateWithServiceResponseAsync", "(", "resourceGroupNa...
Get the certificate associated with a certificate order. Get the certificate associated with a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @param name Name of the certificate. @throws IllegalArgumentExc...
[ "Get", "the", "certificate", "associated", "with", "a", "certificate", "order", ".", "Get", "the", "certificate", "associated", "with", "a", "certificate", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L1120-L1127
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-ui-parent/deeplearning4j-ui/src/main/java/org/deeplearning4j/ui/WebReporter.java
WebReporter.postReport
public void postReport(WebTarget target, Entity entity) { """ This method immediately sends UI report to specified target using POST request @param target @param entity """ Response resp = target.request(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).post(entity); log.debug(...
java
public void postReport(WebTarget target, Entity entity) { Response resp = target.request(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).post(entity); log.debug("{}", resp); }
[ "public", "void", "postReport", "(", "WebTarget", "target", ",", "Entity", "entity", ")", "{", "Response", "resp", "=", "target", ".", "request", "(", "MediaType", ".", "APPLICATION_JSON", ")", ".", "accept", "(", "MediaType", ".", "APPLICATION_JSON", ")", "...
This method immediately sends UI report to specified target using POST request @param target @param entity
[ "This", "method", "immediately", "sends", "UI", "report", "to", "specified", "target", "using", "POST", "request" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-ui-parent/deeplearning4j-ui/src/main/java/org/deeplearning4j/ui/WebReporter.java#L68-L71
lingochamp/okdownload
okdownload-filedownloader/src/main/java/com/liulishuo/filedownloader/notification/FileDownloadNotificationHelper.java
FileDownloadNotificationHelper.showProgress
public void showProgress(final int id, final int sofar, final int total) { """ Show the notification with the exact progress. @param id The download id. @param sofar The downloaded bytes so far. @param total The total bytes of this task. """ final T notification = get(id); if (notifica...
java
public void showProgress(final int id, final int sofar, final int total) { final T notification = get(id); if (notification == null) { return; } notification.updateStatus(FileDownloadStatus.progress); notification.update(sofar, total); }
[ "public", "void", "showProgress", "(", "final", "int", "id", ",", "final", "int", "sofar", ",", "final", "int", "total", ")", "{", "final", "T", "notification", "=", "get", "(", "id", ")", ";", "if", "(", "notification", "==", "null", ")", "{", "retu...
Show the notification with the exact progress. @param id The download id. @param sofar The downloaded bytes so far. @param total The total bytes of this task.
[ "Show", "the", "notification", "with", "the", "exact", "progress", "." ]
train
https://github.com/lingochamp/okdownload/blob/403e2c814556ef7f2fade1f5bee83a02a5eaecb2/okdownload-filedownloader/src/main/java/com/liulishuo/filedownloader/notification/FileDownloadNotificationHelper.java#L79-L88
google/truth
core/src/main/java/com/google/common/truth/IterableSubject.java
IterableSubject.isStrictlyOrdered
@SuppressWarnings( { """ Fails if the iterable is not strictly ordered, according to the given comparator. Strictly ordered means that each element in the iterable is <i>strictly</i> greater than the element that preceded it. @throws ClassCastException if any pair of elements is not mutually Comparable ""...
java
@SuppressWarnings({"unchecked"}) public final void isStrictlyOrdered(final Comparator<?> comparator) { checkNotNull(comparator); pairwiseCheck( "expected to be strictly ordered", new PairwiseChecker() { @Override public boolean check(Object prev, Object next) { ...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", "}", ")", "public", "final", "void", "isStrictlyOrdered", "(", "final", "Comparator", "<", "?", ">", "comparator", ")", "{", "checkNotNull", "(", "comparator", ")", ";", "pairwiseCheck", "(", "\"expected to be ...
Fails if the iterable is not strictly ordered, according to the given comparator. Strictly ordered means that each element in the iterable is <i>strictly</i> greater than the element that preceded it. @throws ClassCastException if any pair of elements is not mutually Comparable
[ "Fails", "if", "the", "iterable", "is", "not", "strictly", "ordered", "according", "to", "the", "given", "comparator", ".", "Strictly", "ordered", "means", "that", "each", "element", "in", "the", "iterable", "is", "<i", ">", "strictly<", "/", "i", ">", "gr...
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/IterableSubject.java#L800-L811
httl/httl
httl/src/main/java/httl/util/ConcurrentLinkedHashMap.java
ConcurrentLinkedHashMap.updateDrainedOrder
void updateDrainedOrder(Task[] tasks, int maxTaskIndex) { """ Updates the order to start the next drain from. @param tasks the ordered array of operations @param maxTaskIndex the maximum index of the array """ if (maxTaskIndex >= 0) { Task task = tasks[maxTaskIndex]; ...
java
void updateDrainedOrder(Task[] tasks, int maxTaskIndex) { if (maxTaskIndex >= 0) { Task task = tasks[maxTaskIndex]; drainedOrder = task.getOrder() + 1; } }
[ "void", "updateDrainedOrder", "(", "Task", "[", "]", "tasks", ",", "int", "maxTaskIndex", ")", "{", "if", "(", "maxTaskIndex", ">=", "0", ")", "{", "Task", "task", "=", "tasks", "[", "maxTaskIndex", "]", ";", "drainedOrder", "=", "task", ".", "getOrder",...
Updates the order to start the next drain from. @param tasks the ordered array of operations @param maxTaskIndex the maximum index of the array
[ "Updates", "the", "order", "to", "start", "the", "next", "drain", "from", "." ]
train
https://github.com/httl/httl/blob/e13e00f4ab41252a8f53d6dafd4a6610be9dcaad/httl/src/main/java/httl/util/ConcurrentLinkedHashMap.java#L549-L554
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJXYBarChartBuilder.java
DJXYBarChartBuilder.addSerie
public DJXYBarChartBuilder addSerie(AbstractColumn column, String label) { """ Adds the specified serie column to the dataset with custom label. @param column the serie column @param label column the custom label """ getDataset().addSerie(column, label); return this; }
java
public DJXYBarChartBuilder addSerie(AbstractColumn column, String label) { getDataset().addSerie(column, label); return this; }
[ "public", "DJXYBarChartBuilder", "addSerie", "(", "AbstractColumn", "column", ",", "String", "label", ")", "{", "getDataset", "(", ")", ".", "addSerie", "(", "column", ",", "label", ")", ";", "return", "this", ";", "}" ]
Adds the specified serie column to the dataset with custom label. @param column the serie column @param label column the custom label
[ "Adds", "the", "specified", "serie", "column", "to", "the", "dataset", "with", "custom", "label", "." ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/domain/chart/builder/DJXYBarChartBuilder.java#L374-L377
lucee/Lucee
core/src/main/java/lucee/transformer/library/function/FunctionLibFactory.java
FunctionLibFactory.startElement
@Override public void startElement(String uri, String name, String qName, Attributes atts) { """ Geerbte Methode von org.xml.sax.ContentHandler, wird bei durchparsen des XML, beim Auftreten eines Start-Tag aufgerufen. @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes) """ ...
java
@Override public void startElement(String uri, String name, String qName, Attributes atts) { // Start Function inside = qName; this.attributes = atts; if (qName.equals("function")) startFunction(); else if (qName.equals("argument")) startArg(); else if (qName.equals("return")) startReturn(); else if (qName....
[ "@", "Override", "public", "void", "startElement", "(", "String", "uri", ",", "String", "name", ",", "String", "qName", ",", "Attributes", "atts", ")", "{", "// Start Function", "inside", "=", "qName", ";", "this", ".", "attributes", "=", "atts", ";", "if"...
Geerbte Methode von org.xml.sax.ContentHandler, wird bei durchparsen des XML, beim Auftreten eines Start-Tag aufgerufen. @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
[ "Geerbte", "Methode", "von", "org", ".", "xml", ".", "sax", ".", "ContentHandler", "wird", "bei", "durchparsen", "des", "XML", "beim", "Auftreten", "eines", "Start", "-", "Tag", "aufgerufen", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/function/FunctionLibFactory.java#L164-L174
pryzach/midao
midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java
MappingUtils.objectInstanceOf
public static boolean objectInstanceOf(Object object, String className) { """ Checks if instance is of specified class @param object Instance which would be checked @param className Class name with which it would be checked @return true if Instance is of specified class """ AssertUtils.assertN...
java
public static boolean objectInstanceOf(Object object, String className) { AssertUtils.assertNotNull(object); boolean result = false; Class clazz = object.getClass(); if (clazz.getName().equals(className) == true) { result = true; } return result...
[ "public", "static", "boolean", "objectInstanceOf", "(", "Object", "object", ",", "String", "className", ")", "{", "AssertUtils", ".", "assertNotNull", "(", "object", ")", ";", "boolean", "result", "=", "false", ";", "Class", "clazz", "=", "object", ".", "get...
Checks if instance is of specified class @param object Instance which would be checked @param className Class name with which it would be checked @return true if Instance is of specified class
[ "Checks", "if", "instance", "is", "of", "specified", "class" ]
train
https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L378-L390
Azure/azure-sdk-for-java
recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultsInner.java
VaultsInner.getByResourceGroup
public VaultInner getByResourceGroup(String resourceGroupName, String vaultName) { """ Get the Vault details. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault. @throws IllegalArgumentException thrown ...
java
public VaultInner getByResourceGroup(String resourceGroupName, String vaultName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); }
[ "public", "VaultInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "vaultName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "vaultName", ")", ".", "toBlocking", "(", ")", ".", "single", ...
Get the Vault details. @param resourceGroupName The name of the resource group where the recovery services vault is present. @param vaultName The name of the recovery services vault. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by se...
[ "Get", "the", "Vault", "details", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultsInner.java#L335-L337
knowitall/common-java
src/main/java/edu/washington/cs/knowitall/commonlib/Range.java
Range.fromInterval
public static Range fromInterval(int start, int end) { """ * Returns a new range over the specified interval. @param start The first item in the range (inclusive). @param end The end of the range (exclusive). @return a new range over the interval. """ if (start < 0) { throw new IllegalA...
java
public static Range fromInterval(int start, int end) { if (start < 0) { throw new IllegalArgumentException("Range start must be >= 0: " + start); } if (end < 0) { throw new IllegalArgumentException("Range end must be >= 0: " + end); } if (end < start) { ...
[ "public", "static", "Range", "fromInterval", "(", "int", "start", ",", "int", "end", ")", "{", "if", "(", "start", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Range start must be >= 0: \"", "+", "start", ")", ";", "}", "if", "("...
* Returns a new range over the specified interval. @param start The first item in the range (inclusive). @param end The end of the range (exclusive). @return a new range over the interval.
[ "*", "Returns", "a", "new", "range", "over", "the", "specified", "interval", "." ]
train
https://github.com/knowitall/common-java/blob/6c3e7b2f13da5afb1306e87a6c322c55b65fddfc/src/main/java/edu/washington/cs/knowitall/commonlib/Range.java#L58-L69
rythmengine/rythmengine
src/main/java/org/rythmengine/toString/ToStringStyle.java
ToStringStyle.appendDetail
protected void appendDetail(StringBuilder buffer, String fieldName, Map<?, ?> map) { """ <p>Append to the <code>toString</code> a <code>Map<code>.</p> @param buffer the <code>StringBuilder</code> to populate @param fieldName the field name, typically not used as already appended @param map the <code>...
java
protected void appendDetail(StringBuilder buffer, String fieldName, Map<?, ?> map) { buffer.append(map); }
[ "protected", "void", "appendDetail", "(", "StringBuilder", "buffer", ",", "String", "fieldName", ",", "Map", "<", "?", ",", "?", ">", "map", ")", "{", "buffer", ".", "append", "(", "map", ")", ";", "}" ]
<p>Append to the <code>toString</code> a <code>Map<code>.</p> @param buffer the <code>StringBuilder</code> to populate @param fieldName the field name, typically not used as already appended @param map the <code>Map</code> to add to the <code>toString</code>, not <code>null</code>
[ "<p", ">", "Append", "to", "the", "<code", ">", "toString<", "/", "code", ">", "a", "<code", ">", "Map<code", ">", ".", "<", "/", "p", ">" ]
train
https://github.com/rythmengine/rythmengine/blob/064b565f08d9da07378bf77a9dd856ea5831cc92/src/main/java/org/rythmengine/toString/ToStringStyle.java#L615-L617
lucee/Lucee
core/src/main/java/lucee/commons/io/compress/CompressUtil.java
CompressUtil.compressGZip
private static void compressGZip(Resource source, Resource target) throws IOException { """ compress a source file to a gzip file @param source @param target @throws IOException @throws IOException """ if (source.isDirectory()) { throw new IOException("you can only create a GZIP File from a single ...
java
private static void compressGZip(Resource source, Resource target) throws IOException { if (source.isDirectory()) { throw new IOException("you can only create a GZIP File from a single source file, use TGZ (TAR-GZIP) to first TAR multiple files"); } InputStream is = null; OutputStream os = null; try { is...
[ "private", "static", "void", "compressGZip", "(", "Resource", "source", ",", "Resource", "target", ")", "throws", "IOException", "{", "if", "(", "source", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "IOException", "(", "\"you can only create a GZIP F...
compress a source file to a gzip file @param source @param target @throws IOException @throws IOException
[ "compress", "a", "source", "file", "to", "a", "gzip", "file" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/compress/CompressUtil.java#L412-L428
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/lang/ExcelDateUtils.java
ExcelDateUtils.convertExcelNumber
public static double convertExcelNumber(final Date value, final boolean startDate1904) { """ Javaの{@link Date}型をExcelの内部表現の数値に変換する。 <p>小数の桁数に関する注意事項。</p> <ul> <li>このメソッドは少数は第16位まで保証し、小数第17位は四捨五入して計算します。</li> <li>Excelの1秒は、UTC上では1/(60x60x24x1000)=0.0000000115741=1.15741e-008であるので、小数13位までの精度が必要。</li> <li>Excelは...
java
public static double convertExcelNumber(final Date value, final boolean startDate1904) { ArgUtils.notNull(value, "value"); /* * Excelの時間の表現に直す。 * ・Excelの日付の形式の場合小数部が時間を示すため、24時間分のミリ秒を考慮する。 */ long utcDay = value.getTime(); BigDecimal ...
[ "public", "static", "double", "convertExcelNumber", "(", "final", "Date", "value", ",", "final", "boolean", "startDate1904", ")", "{", "ArgUtils", ".", "notNull", "(", "value", ",", "\"value\"", ")", ";", "/*\r\n * Excelの時間の表現に直す。\r\n * ・Excelの日付の形式の場合小数...
Javaの{@link Date}型をExcelの内部表現の数値に変換する。 <p>小数の桁数に関する注意事項。</p> <ul> <li>このメソッドは少数は第16位まで保証し、小数第17位は四捨五入して計算します。</li> <li>Excelの1秒は、UTC上では1/(60x60x24x1000)=0.0000000115741=1.15741e-008であるので、小数13位までの精度が必要。</li> <li>Excelは秒までだが、Javaはミリ秒まで存在するので、さらに3桁多い、16桁までの精度が必要になる。</li> </ul> <p>1900年始まりの場合は以下の注意が必要。</p> <ul> <li>UTC上は1...
[ "Javaの", "{", "@link", "Date", "}", "型をExcelの内部表現の数値に変換する。", "<p", ">", "小数の桁数に関する注意事項。<", "/", "p", ">", "<ul", ">", "<li", ">", "このメソッドは少数は第16位まで保証し、小数第17位は四捨五入して計算します。<", "/", "li", ">", "<li", ">", "Excelの1秒は、UTC上では1", "/", "(", "60x60x24x1000", ")", "=", ...
train
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/lang/ExcelDateUtils.java#L141-L169
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/GrPropertyContainer.java
GrPropertyContainer.addProperty
public GrProperty addProperty(String name, Object value) { """ add a new property, throw a RuntimeException if the property already exists @param name of the property @param value of the property @return the added property """ GrProperty prop = GrAccess.createProperty(name); prop.setValue(value); r...
java
public GrProperty addProperty(String name, Object value) { GrProperty prop = GrAccess.createProperty(name); prop.setValue(value); return getPropertiesContainer().addElement(prop); }
[ "public", "GrProperty", "addProperty", "(", "String", "name", ",", "Object", "value", ")", "{", "GrProperty", "prop", "=", "GrAccess", ".", "createProperty", "(", "name", ")", ";", "prop", ".", "setValue", "(", "value", ")", ";", "return", "getPropertiesCont...
add a new property, throw a RuntimeException if the property already exists @param name of the property @param value of the property @return the added property
[ "add", "a", "new", "property", "throw", "a", "RuntimeException", "if", "the", "property", "already", "exists" ]
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/GrPropertyContainer.java#L73-L77
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java
DefaultFeatureForm.getValue
@Api public void getValue(String name, IntegerAttribute attribute) { """ Get a integer value from the form, and place it in <code>attribute</code>. @param name attribute name @param attribute attribute to put value @since 1.11.1 """ attribute.setValue(toInteger(formWidget.getValue(name))); }
java
@Api public void getValue(String name, IntegerAttribute attribute) { attribute.setValue(toInteger(formWidget.getValue(name))); }
[ "@", "Api", "public", "void", "getValue", "(", "String", "name", ",", "IntegerAttribute", "attribute", ")", "{", "attribute", ".", "setValue", "(", "toInteger", "(", "formWidget", ".", "getValue", "(", "name", ")", ")", ")", ";", "}" ]
Get a integer value from the form, and place it in <code>attribute</code>. @param name attribute name @param attribute attribute to put value @since 1.11.1
[ "Get", "a", "integer", "value", "from", "the", "form", "and", "place", "it", "in", "<code", ">", "attribute<", "/", "code", ">", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java#L671-L674
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.isAncestorFile
public static boolean isAncestorFile( File potentialAncestor, File file ) throws IOException { """ Determines whether a file is a parent of another file. <p> This method handles intermediate '.' and '..' segments. </p> @param potentialAncestor a file that may contain the other one @param file a file @retur...
java
public static boolean isAncestorFile( File potentialAncestor, File file ) throws IOException { String ancestorPath = potentialAncestor.getCanonicalPath(); String path = file.getCanonicalPath(); boolean result = false; if( path.startsWith( ancestorPath )) { String s = path.substring( ancestorPath.length());...
[ "public", "static", "boolean", "isAncestorFile", "(", "File", "potentialAncestor", ",", "File", "file", ")", "throws", "IOException", "{", "String", "ancestorPath", "=", "potentialAncestor", ".", "getCanonicalPath", "(", ")", ";", "String", "path", "=", "file", ...
Determines whether a file is a parent of another file. <p> This method handles intermediate '.' and '..' segments. </p> @param potentialAncestor a file that may contain the other one @param file a file @return true if the path of 'file' starts with the path of 'potentialAncestor', false otherwise @throws IOException i...
[ "Determines", "whether", "a", "file", "is", "a", "parent", "of", "another", "file", ".", "<p", ">", "This", "method", "handles", "intermediate", ".", "and", "..", "segments", ".", "<", "/", "p", ">" ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1224-L1236
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java
ST_Split.splitMultiLineStringWithPoint
private static MultiLineString splitMultiLineStringWithPoint(MultiLineString multiLineString, Point pointToSplit, double tolerance) { """ Splits a MultilineString using a point. @param multiLineString @param pointToSplit @param tolerance @return """ ArrayList<LineString> linestrings = new ArrayLi...
java
private static MultiLineString splitMultiLineStringWithPoint(MultiLineString multiLineString, Point pointToSplit, double tolerance) { ArrayList<LineString> linestrings = new ArrayList<LineString>(); boolean notChanged = true; int nb = multiLineString.getNumGeometries(); for (int i = 0; i...
[ "private", "static", "MultiLineString", "splitMultiLineStringWithPoint", "(", "MultiLineString", "multiLineString", ",", "Point", "pointToSplit", ",", "double", "tolerance", ")", "{", "ArrayList", "<", "LineString", ">", "linestrings", "=", "new", "ArrayList", "<", "L...
Splits a MultilineString using a point. @param multiLineString @param pointToSplit @param tolerance @return
[ "Splits", "a", "MultilineString", "using", "a", "point", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/split/ST_Split.java#L197-L215
Syncleus/aparapi
src/main/java/com/aparapi/internal/instruction/ExpressionList.java
ExpressionList.replaceInclusive
public void replaceInclusive(Instruction _head, Instruction _tail, Instruction _newOne) { """ Inclusive replace between _head and _tail with _newOne. <pre> | | --> | | ---> ... ---> | | ---> | | | prev | | _head | | _tail | | next | | | <-- | | <--- ......
java
public void replaceInclusive(Instruction _head, Instruction _tail, Instruction _newOne) { _newOne.setNextExpr(null); _newOne.setPrevExpr(null); final Instruction prevHead = _head.getPrevExpr(); if (_tail == null) { // this is the new tail _newOne.setPrevExpr(prevHead); ...
[ "public", "void", "replaceInclusive", "(", "Instruction", "_head", ",", "Instruction", "_tail", ",", "Instruction", "_newOne", ")", "{", "_newOne", ".", "setNextExpr", "(", "null", ")", ";", "_newOne", ".", "setPrevExpr", "(", "null", ")", ";", "final", "Ins...
Inclusive replace between _head and _tail with _newOne. <pre> | | --> | | ---> ... ---> | | ---> | | | prev | | _head | | _tail | | next | | | <-- | | <--- ... <----| | <--- | | </pre> To <pre> | | --> | | ---> | | | prev | | _new...
[ "Inclusive", "replace", "between", "_head", "and", "_tail", "with", "_newOne", "." ]
train
https://github.com/Syncleus/aparapi/blob/6d5892c8e69854b3968c541023de37cf4762bd24/src/main/java/com/aparapi/internal/instruction/ExpressionList.java#L271-L307
alkacon/opencms-core
src/org/opencms/db/CmsLoginManager.java
CmsLoginManager.isPasswordReset
public boolean isPasswordReset(CmsObject cms, CmsUser user) { """ Checks if password has to be reset.<p> @param cms CmsObject @param user CmsUser @return true if password should be reset """ if (user.isManaged() || user.isWebuser() || OpenCms.getDefaultUsers().isDefaultUser(user.getName())) { ...
java
public boolean isPasswordReset(CmsObject cms, CmsUser user) { if (user.isManaged() || user.isWebuser() || OpenCms.getDefaultUsers().isDefaultUser(user.getName())) { return false; } if (user.getAdditionalInfo().get(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET) != null) { ...
[ "public", "boolean", "isPasswordReset", "(", "CmsObject", "cms", ",", "CmsUser", "user", ")", "{", "if", "(", "user", ".", "isManaged", "(", ")", "||", "user", ".", "isWebuser", "(", ")", "||", "OpenCms", ".", "getDefaultUsers", "(", ")", ".", "isDefault...
Checks if password has to be reset.<p> @param cms CmsObject @param user CmsUser @return true if password should be reset
[ "Checks", "if", "password", "has", "to", "be", "reset", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsLoginManager.java#L502-L511
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/h/AdjustHomographyMatrix.java
AdjustHomographyMatrix.adjustHomographSign
protected void adjustHomographSign( PairLineNorm p , DMatrixRMaj H ) { """ Since the sign of the homography is ambiguous a point is required to make sure the correct one was selected. @param p test point, used to determine the sign of the matrix. """ CommonOps_DDRM.transpose(H,H_t); double val = Geom...
java
protected void adjustHomographSign( PairLineNorm p , DMatrixRMaj H ) { CommonOps_DDRM.transpose(H,H_t); double val = GeometryMath_F64.innerProd(p.l1, H_t, p.l2); if( val < 0 ) CommonOps_DDRM.scale(-1, H); }
[ "protected", "void", "adjustHomographSign", "(", "PairLineNorm", "p", ",", "DMatrixRMaj", "H", ")", "{", "CommonOps_DDRM", ".", "transpose", "(", "H", ",", "H_t", ")", ";", "double", "val", "=", "GeometryMath_F64", ".", "innerProd", "(", "p", ".", "l1", ",...
Since the sign of the homography is ambiguous a point is required to make sure the correct one was selected. @param p test point, used to determine the sign of the matrix.
[ "Since", "the", "sign", "of", "the", "homography", "is", "ambiguous", "a", "point", "is", "required", "to", "make", "sure", "the", "correct", "one", "was", "selected", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/h/AdjustHomographyMatrix.java#L97-L105
mgormley/pacaya
src/main/java/edu/jhu/pacaya/sch/graph/WeightedIntDiGraph.java
WeightedIntDiGraph.setWeight
public void setWeight(int s, int t, double w) { """ Sets the weight of the edge s->t to be w if the edge is present, otherwise, an IndexOutOfBoundsException is thrown """ DiEdge e = edge(s, t); assertEdge(e); weights.put(e, w); }
java
public void setWeight(int s, int t, double w) { DiEdge e = edge(s, t); assertEdge(e); weights.put(e, w); }
[ "public", "void", "setWeight", "(", "int", "s", ",", "int", "t", ",", "double", "w", ")", "{", "DiEdge", "e", "=", "edge", "(", "s", ",", "t", ")", ";", "assertEdge", "(", "e", ")", ";", "weights", ".", "put", "(", "e", ",", "w", ")", ";", ...
Sets the weight of the edge s->t to be w if the edge is present, otherwise, an IndexOutOfBoundsException is thrown
[ "Sets", "the", "weight", "of", "the", "edge", "s", "-", ">", "t", "to", "be", "w", "if", "the", "edge", "is", "present", "otherwise", "an", "IndexOutOfBoundsException", "is", "thrown" ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/sch/graph/WeightedIntDiGraph.java#L112-L116
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java
Stanza.addCommonAttributes
protected XmlEnvironment addCommonAttributes(XmlStringBuilder xml, XmlEnvironment enclosingXmlEnvironment) { """ Add to, from, id and 'xml:lang' attributes @param xml the {@link XmlStringBuilder}. @param enclosingXmlEnvironment the enclosing XML namespace. @return the XML environment for this stanza. """ ...
java
protected XmlEnvironment addCommonAttributes(XmlStringBuilder xml, XmlEnvironment enclosingXmlEnvironment) { String language = getLanguage(); String namespace = StreamOpen.CLIENT_NAMESPACE; if (enclosingXmlEnvironment != null) { String effectiveEnclosingNamespace = enclosingXmlEnviro...
[ "protected", "XmlEnvironment", "addCommonAttributes", "(", "XmlStringBuilder", "xml", ",", "XmlEnvironment", "enclosingXmlEnvironment", ")", "{", "String", "language", "=", "getLanguage", "(", ")", ";", "String", "namespace", "=", "StreamOpen", ".", "CLIENT_NAMESPACE", ...
Add to, from, id and 'xml:lang' attributes @param xml the {@link XmlStringBuilder}. @param enclosingXmlEnvironment the enclosing XML namespace. @return the XML environment for this stanza.
[ "Add", "to", "from", "id", "and", "xml", ":", "lang", "attributes" ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java#L509-L530
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java
SignalUtil.formatMessage
static String formatMessage(String fmt, Object[] args) { """ Formats the specified string using the specified arguments. If the argument array contains more elements than the format string can accommodate, then the additional arguments are appended to the end of the formatted string. @param fmt the format st...
java
static String formatMessage(String fmt, Object[] args) { MessageFormat formatter = new MessageFormat(fmt); Format[] formats = formatter.getFormatsByArgumentIndex(); StringBuffer msg = new StringBuffer(); formatter.format(args, msg, null); if (args.length > formats.length) { // We have extra arguement...
[ "static", "String", "formatMessage", "(", "String", "fmt", ",", "Object", "[", "]", "args", ")", "{", "MessageFormat", "formatter", "=", "new", "MessageFormat", "(", "fmt", ")", ";", "Format", "[", "]", "formats", "=", "formatter", ".", "getFormatsByArgument...
Formats the specified string using the specified arguments. If the argument array contains more elements than the format string can accommodate, then the additional arguments are appended to the end of the formatted string. @param fmt the format string @param args the argument array for the replaceable parameters in t...
[ "Formats", "the", "specified", "string", "using", "the", "specified", "arguments", ".", "If", "the", "argument", "array", "contains", "more", "elements", "than", "the", "format", "string", "can", "accommodate", "then", "the", "additional", "arguments", "are", "a...
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java#L61-L75
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/configurator/ConfiguratorPanel.java
ConfiguratorPanel.addParameter
public void addParameter(Object owner, Parameter<?> param, TrackParameters track) { """ Add parameter to this panel. @param param Parameter to add @param track Parameter tracking object """ this.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED)); ParameterConfigurator cfg = null; { // Find...
java
public void addParameter(Object owner, Parameter<?> param, TrackParameters track) { this.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED)); ParameterConfigurator cfg = null; { // Find Object cur = owner; while(cur != null) { cfg = childconfig.get(cur); if(cfg != null) { ...
[ "public", "void", "addParameter", "(", "Object", "owner", ",", "Parameter", "<", "?", ">", "param", ",", "TrackParameters", "track", ")", "{", "this", ".", "setBorder", "(", "new", "SoftBevelBorder", "(", "SoftBevelBorder", ".", "LOWERED", ")", ")", ";", "...
Add parameter to this panel. @param param Parameter to add @param track Parameter tracking object
[ "Add", "parameter", "to", "this", "panel", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/configurator/ConfiguratorPanel.java#L87-L109
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/ContextAwareTreeAppendable.java
ContextAwareTreeAppendable.defineContextualValue
@SuppressWarnings("unchecked") public <T> T defineContextualValue(String key, Object value) { """ Define a contextual value. @param <T> the type of the value. @param key the name of the value. @param value the value itself. @return the previous value associated to the key, or {@code null} if none. """ ...
java
@SuppressWarnings("unchecked") public <T> T defineContextualValue(String key, Object value) { return (T) this.values.put(key, value); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "defineContextualValue", "(", "String", "key", ",", "Object", "value", ")", "{", "return", "(", "T", ")", "this", ".", "values", ".", "put", "(", "key", ",", "value", ")"...
Define a contextual value. @param <T> the type of the value. @param key the name of the value. @param value the value itself. @return the previous value associated to the key, or {@code null} if none.
[ "Define", "a", "contextual", "value", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/util/ContextAwareTreeAppendable.java#L73-L76
spring-projects/spring-ldap
core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java
AbstractContextSource.setBaseEnvironmentProperties
public void setBaseEnvironmentProperties(Map<String, Object> baseEnvironmentProperties) { """ If any custom environment properties are needed, these can be set using this method. @param baseEnvironmentProperties the base environment properties that should always be used when creating new Context instances. ...
java
public void setBaseEnvironmentProperties(Map<String, Object> baseEnvironmentProperties) { this.baseEnv = new Hashtable<String, Object>(baseEnvironmentProperties); }
[ "public", "void", "setBaseEnvironmentProperties", "(", "Map", "<", "String", ",", "Object", ">", "baseEnvironmentProperties", ")", "{", "this", ".", "baseEnv", "=", "new", "Hashtable", "<", "String", ",", "Object", ">", "(", "baseEnvironmentProperties", ")", ";"...
If any custom environment properties are needed, these can be set using this method. @param baseEnvironmentProperties the base environment properties that should always be used when creating new Context instances.
[ "If", "any", "custom", "environment", "properties", "are", "needed", "these", "can", "be", "set", "using", "this", "method", "." ]
train
https://github.com/spring-projects/spring-ldap/blob/15142d4ae18a9dc6b363a1ebf085e2bda9d9a4c0/core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java#L567-L569
alkacon/opencms-core
src/org/opencms/file/wrapper/CmsObjectWrapper.java
CmsObjectWrapper.readResource
public CmsResource readResource(String resourcename, CmsResourceFilter filter) throws CmsException { """ Reads a resource from the VFS, using the <code>{@link CmsResourceFilter#DEFAULT}</code> filter.<p> Iterates through all configured resource wrappers till the first returns not <code>null</code>.<p> @see ...
java
public CmsResource readResource(String resourcename, CmsResourceFilter filter) throws CmsException { CmsResource res = null; // iterate through all wrappers and call "readResource" till one does not return null List<I_CmsResourceWrapper> wrappers = getWrappers(); Iterator<I_CmsResource...
[ "public", "CmsResource", "readResource", "(", "String", "resourcename", ",", "CmsResourceFilter", "filter", ")", "throws", "CmsException", "{", "CmsResource", "res", "=", "null", ";", "// iterate through all wrappers and call \"readResource\" till one does not return null", "Li...
Reads a resource from the VFS, using the <code>{@link CmsResourceFilter#DEFAULT}</code> filter.<p> Iterates through all configured resource wrappers till the first returns not <code>null</code>.<p> @see I_CmsResourceWrapper#readResource(CmsObject, String, CmsResourceFilter) @see CmsObject#readResource(String, CmsReso...
[ "Reads", "a", "resource", "from", "the", "VFS", "using", "the", "<code", ">", "{", "@link", "CmsResourceFilter#DEFAULT", "}", "<", "/", "code", ">", "filter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/wrapper/CmsObjectWrapper.java#L635-L664
beders/Resty
src/main/java/us/monoid/web/Resty.java
Resty.bytes
public BinaryResource bytes(String anUri, AbstractContent someContent) throws IOException { """ POST to the URI and get the resource as binary resource. @param anUri the uri to follow @return @throws IOException """ return bytes(URI.create(anUri), someContent); }
java
public BinaryResource bytes(String anUri, AbstractContent someContent) throws IOException { return bytes(URI.create(anUri), someContent); }
[ "public", "BinaryResource", "bytes", "(", "String", "anUri", ",", "AbstractContent", "someContent", ")", "throws", "IOException", "{", "return", "bytes", "(", "URI", ".", "create", "(", "anUri", ")", ",", "someContent", ")", ";", "}" ]
POST to the URI and get the resource as binary resource. @param anUri the uri to follow @return @throws IOException
[ "POST", "to", "the", "URI", "and", "get", "the", "resource", "as", "binary", "resource", "." ]
train
https://github.com/beders/Resty/blob/4493603e9689c942cc3e53b9c5018010e414a364/src/main/java/us/monoid/web/Resty.java#L367-L369
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java
Bytes.incrementBytes
public static byte [] incrementBytes(byte[] value, long amount) { """ Bytewise binary increment/deincrement of long contained in byte array on given amount. @param value - array of bytes containing long (length <= SIZEOF_LONG) @param amount value will be incremented on (deincremented if negative) @return arr...
java
public static byte [] incrementBytes(byte[] value, long amount) { byte[] val = value; if (val.length < SIZEOF_LONG) { // Hopefully this doesn't happen too often. byte [] newvalue; if (val[0] < 0) { newvalue = new byte[]{-1, -1, -1, -1, -1, -1, -1, -1}; } else { newvalue =...
[ "public", "static", "byte", "[", "]", "incrementBytes", "(", "byte", "[", "]", "value", ",", "long", "amount", ")", "{", "byte", "[", "]", "val", "=", "value", ";", "if", "(", "val", ".", "length", "<", "SIZEOF_LONG", ")", "{", "// Hopefully this doesn...
Bytewise binary increment/deincrement of long contained in byte array on given amount. @param value - array of bytes containing long (length <= SIZEOF_LONG) @param amount value will be incremented on (deincremented if negative) @return array of bytes containing incremented long (length == SIZEOF_LONG)
[ "Bytewise", "binary", "increment", "/", "deincrement", "of", "long", "contained", "in", "byte", "array", "on", "given", "amount", "." ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/api/common/Bytes.java#L1273-L1297
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/XPathHelper.java
XPathHelper.getXPath
public String getXPath(NamespaceContext context, String xml, String xPathExpr) { """ Evaluates xPathExpr against xml, returning single match. @param xml xml document to apply XPath to. @param xPathExpr XPath expression to evaluate. @return result of evaluation, null if xml is null. """ return (Strin...
java
public String getXPath(NamespaceContext context, String xml, String xPathExpr) { return (String) evaluateXpath(context, xml, xPathExpr, null); }
[ "public", "String", "getXPath", "(", "NamespaceContext", "context", ",", "String", "xml", ",", "String", "xPathExpr", ")", "{", "return", "(", "String", ")", "evaluateXpath", "(", "context", ",", "xml", ",", "xPathExpr", ",", "null", ")", ";", "}" ]
Evaluates xPathExpr against xml, returning single match. @param xml xml document to apply XPath to. @param xPathExpr XPath expression to evaluate. @return result of evaluation, null if xml is null.
[ "Evaluates", "xPathExpr", "against", "xml", "returning", "single", "match", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/XPathHelper.java#L28-L30
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClient.java
MarkLogicClient.sendAdd
public void sendAdd(InputStream in, String baseURI, RDFFormat dataFormat, Resource... contexts) throws RDFParseException, MarkLogicSesameException { """ add triples from InputStream @param in @param baseURI @param dataFormat @param contexts """ getClient().performAdd(in, baseURI, dataFormat, this.tx, c...
java
public void sendAdd(InputStream in, String baseURI, RDFFormat dataFormat, Resource... contexts) throws RDFParseException, MarkLogicSesameException { getClient().performAdd(in, baseURI, dataFormat, this.tx, contexts); }
[ "public", "void", "sendAdd", "(", "InputStream", "in", ",", "String", "baseURI", ",", "RDFFormat", "dataFormat", ",", "Resource", "...", "contexts", ")", "throws", "RDFParseException", ",", "MarkLogicSesameException", "{", "getClient", "(", ")", ".", "performAdd",...
add triples from InputStream @param in @param baseURI @param dataFormat @param contexts
[ "add", "triples", "from", "InputStream" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClient.java#L314-L316
lastaflute/lasta-di
src/main/java/org/lastaflute/di/util/LdiSrl.java
LdiSrl.substringLastRearIgnoreCase
public static String substringLastRearIgnoreCase(String str, String... delimiters) { """ Extract rear sub-string from last-found delimiter ignoring case. <pre> substringLastRear("foo.bar/baz.qux", "A", "U") returns "x" </pre> @param str The target string. (NotNull) @param delimiters The array of delimiters. ...
java
public static String substringLastRearIgnoreCase(String str, String... delimiters) { assertStringNotNull(str); return doSubstringFirstRear(true, true, true, str, delimiters); }
[ "public", "static", "String", "substringLastRearIgnoreCase", "(", "String", "str", ",", "String", "...", "delimiters", ")", "{", "assertStringNotNull", "(", "str", ")", ";", "return", "doSubstringFirstRear", "(", "true", ",", "true", ",", "true", ",", "str", "...
Extract rear sub-string from last-found delimiter ignoring case. <pre> substringLastRear("foo.bar/baz.qux", "A", "U") returns "x" </pre> @param str The target string. (NotNull) @param delimiters The array of delimiters. (NotNull) @return The part of string. (NotNull: if delimiter not found, returns argument-plain strin...
[ "Extract", "rear", "sub", "-", "string", "from", "last", "-", "found", "delimiter", "ignoring", "case", ".", "<pre", ">", "substringLastRear", "(", "foo", ".", "bar", "/", "baz", ".", "qux", "A", "U", ")", "returns", "x", "<", "/", "pre", ">" ]
train
https://github.com/lastaflute/lasta-di/blob/c4e123610c53a04cc836c5e456660e32d613447b/src/main/java/org/lastaflute/di/util/LdiSrl.java#L732-L735
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/ShardingDataSourceFactory.java
ShardingDataSourceFactory.createDataSource
public static DataSource createDataSource( final Map<String, DataSource> dataSourceMap, final ShardingRuleConfiguration shardingRuleConfig, final Properties props) throws SQLException { """ Create sharding data source. @param dataSourceMap data source map @param shardingRuleConfig rule configuratio...
java
public static DataSource createDataSource( final Map<String, DataSource> dataSourceMap, final ShardingRuleConfiguration shardingRuleConfig, final Properties props) throws SQLException { return new ShardingDataSource(dataSourceMap, new ShardingRule(shardingRuleConfig, dataSourceMap.keySet()), props);...
[ "public", "static", "DataSource", "createDataSource", "(", "final", "Map", "<", "String", ",", "DataSource", ">", "dataSourceMap", ",", "final", "ShardingRuleConfiguration", "shardingRuleConfig", ",", "final", "Properties", "props", ")", "throws", "SQLException", "{",...
Create sharding data source. @param dataSourceMap data source map @param shardingRuleConfig rule configuration for databases and tables sharding @param props properties for data source @return sharding data source @throws SQLException SQL exception
[ "Create", "sharding", "data", "source", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/ShardingDataSourceFactory.java#L48-L51
primefaces/primefaces
src/main/java/org/primefaces/component/inputmask/InputMaskRenderer.java
InputMaskRenderer.translateMaskIntoRegex
protected Pattern translateMaskIntoRegex(FacesContext context, String mask) { """ Translates the client side mask to to a {@link Pattern} base on: https://github.com/digitalBush/jquery.maskedinput a - Represents an alpha character (A-Z,a-z) 9 - Represents a numeric character (0-9) * - Represents an alphanumeri...
java
protected Pattern translateMaskIntoRegex(FacesContext context, String mask) { StringBuilder regex = SharedStringBuilder.get(context, SB_PATTERN); boolean optionalFound = false; for (char c : mask.toCharArray()) { if (c == '?') { optionalFound = true; } ...
[ "protected", "Pattern", "translateMaskIntoRegex", "(", "FacesContext", "context", ",", "String", "mask", ")", "{", "StringBuilder", "regex", "=", "SharedStringBuilder", ".", "get", "(", "context", ",", "SB_PATTERN", ")", ";", "boolean", "optionalFound", "=", "fals...
Translates the client side mask to to a {@link Pattern} base on: https://github.com/digitalBush/jquery.maskedinput a - Represents an alpha character (A-Z,a-z) 9 - Represents a numeric character (0-9) * - Represents an alphanumeric character (A-Z,a-z,0-9) ? - Makes the following input optional @param context The {@li...
[ "Translates", "the", "client", "side", "mask", "to", "to", "a", "{", "@link", "Pattern", "}", "base", "on", ":", "https", ":", "//", "github", ".", "com", "/", "digitalBush", "/", "jquery", ".", "maskedinput", "a", "-", "Represents", "an", "alpha", "ch...
train
https://github.com/primefaces/primefaces/blob/b8cdd5ed395d09826e40e3302d6b14901d3ef4e7/src/main/java/org/primefaces/component/inputmask/InputMaskRenderer.java#L81-L94
pac4j/pac4j
pac4j-oauth/src/main/java/org/pac4j/oauth/profile/creator/OAuthProfileCreator.java
OAuthProfileCreator.sendRequestForData
protected String sendRequestForData(final S service, final T accessToken, final String dataUrl, Verb verb) { """ Make a request to get the data of the authenticated user for the provider. @param service the OAuth service @param accessToken the access token @param dataUrl url of the data @param verb ...
java
protected String sendRequestForData(final S service, final T accessToken, final String dataUrl, Verb verb) { logger.debug("accessToken: {} / dataUrl: {}", accessToken, dataUrl); final long t0 = System.currentTimeMillis(); final OAuthRequest request = createOAuthRequest(dataUrl, verb); si...
[ "protected", "String", "sendRequestForData", "(", "final", "S", "service", ",", "final", "T", "accessToken", ",", "final", "String", "dataUrl", ",", "Verb", "verb", ")", "{", "logger", ".", "debug", "(", "\"accessToken: {} / dataUrl: {}\"", ",", "accessToken", "...
Make a request to get the data of the authenticated user for the provider. @param service the OAuth service @param accessToken the access token @param dataUrl url of the data @param verb method used to request data @return the user data response
[ "Make", "a", "request", "to", "get", "the", "data", "of", "the", "authenticated", "user", "for", "the", "provider", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-oauth/src/main/java/org/pac4j/oauth/profile/creator/OAuthProfileCreator.java#L106-L127
telly/groundy
library/src/main/java/com/telly/groundy/Groundy.java
Groundy.arg
public Groundy arg(String key, Parcelable[] value) { """ Inserts an array of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an array of Parcelable objects, or null """ mArgs....
java
public Groundy arg(String key, Parcelable[] value) { mArgs.putParcelableArray(key, value); return this; }
[ "public", "Groundy", "arg", "(", "String", "key", ",", "Parcelable", "[", "]", "value", ")", "{", "mArgs", ".", "putParcelableArray", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts an array of Parcelable values into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value an array of Parcelable objects, or null
[ "Inserts", "an", "array", "of", "Parcelable", "values", "into", "the", "mapping", "of", "this", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/telly/groundy/blob/e90baf9901a8be20b348bd1575d5ad782560cec8/library/src/main/java/com/telly/groundy/Groundy.java#L548-L551
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/Expression.java
Expression.greaterThan
@NonNull public Expression greaterThan(@NonNull Expression expression) { """ Create a greater than expression that evaluates whether or not the current expression is greater than the given expression. @param expression the expression to compare with the current expression. @return a greater than expressio...
java
@NonNull public Expression greaterThan(@NonNull Expression expression) { if (expression == null) { throw new IllegalArgumentException("expression is null"); } return new BinaryExpression(this, expression, BinaryExpression.OpType.GreaterThan); }
[ "@", "NonNull", "public", "Expression", "greaterThan", "(", "@", "NonNull", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"expression is null\"", ")", ";", "}", "return",...
Create a greater than expression that evaluates whether or not the current expression is greater than the given expression. @param expression the expression to compare with the current expression. @return a greater than expression.
[ "Create", "a", "greater", "than", "expression", "that", "evaluates", "whether", "or", "not", "the", "current", "expression", "is", "greater", "than", "the", "given", "expression", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Expression.java#L645-L651
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/datastyle/FloatStyle.java
FloatStyle.appendNumberTag
public void appendNumberTag(final XMLUtil util, final Appendable appendable) throws IOException { """ Append the number:number tag @param util an util @param appendable the destination @throws IOException if an I/O error occurs """ appendable.append("<number:number"); this.appendXMLAttributes(util, appe...
java
public void appendNumberTag(final XMLUtil util, final Appendable appendable) throws IOException { appendable.append("<number:number"); this.appendXMLAttributes(util, appendable); appendable.append("/>"); }
[ "public", "void", "appendNumberTag", "(", "final", "XMLUtil", "util", ",", "final", "Appendable", "appendable", ")", "throws", "IOException", "{", "appendable", ".", "append", "(", "\"<number:number\"", ")", ";", "this", ".", "appendXMLAttributes", "(", "util", ...
Append the number:number tag @param util an util @param appendable the destination @throws IOException if an I/O error occurs
[ "Append", "the", "number", ":", "number", "tag" ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/datastyle/FloatStyle.java#L78-L82
centic9/commons-test
src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java
SafeCloseSmtpServer.handleTransaction
private List<SmtpMessage> handleTransaction(PrintWriter out, BufferedReader input) throws IOException { """ Handle an SMTP transaction, i.e. all activity between initial connect and QUIT command. @param out output stream @param input input stream @return List of SmtpMessage """ // Initialize the state m...
java
private List<SmtpMessage> handleTransaction(PrintWriter out, BufferedReader input) throws IOException { // Initialize the state machine SmtpState smtpState = SmtpState.CONNECT; SmtpRequest smtpRequest = new SmtpRequest(SmtpActionType.CONNECT, "", smtpState); // Execute the connection request SmtpResponse smt...
[ "private", "List", "<", "SmtpMessage", ">", "handleTransaction", "(", "PrintWriter", "out", ",", "BufferedReader", "input", ")", "throws", "IOException", "{", "// Initialize the state machine", "SmtpState", "smtpState", "=", "SmtpState", ".", "CONNECT", ";", "SmtpRequ...
Handle an SMTP transaction, i.e. all activity between initial connect and QUIT command. @param out output stream @param input input stream @return List of SmtpMessage
[ "Handle", "an", "SMTP", "transaction", "i", ".", "e", ".", "all", "activity", "between", "initial", "connect", "and", "QUIT", "command", "." ]
train
https://github.com/centic9/commons-test/blob/562047c198133ecb116f2472e9aeb15e866579f5/src/main/java/org/dstadler/commons/email/SafeCloseSmtpServer.java#L200-L243
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
FSNamesystem.addStoredBlock
private boolean addStoredBlock(Block block, DatanodeDescriptor node, DatanodeDescriptor delNodeHint) throws IOException { """ Modify (block-->datanode) map. Remove block from set of needed replications if this takes care of the problem. @return whet...
java
private boolean addStoredBlock(Block block, DatanodeDescriptor node, DatanodeDescriptor delNodeHint) throws IOException { return addStoredBlockInternal(block, node, delNodeHint, false, null); }
[ "private", "boolean", "addStoredBlock", "(", "Block", "block", ",", "DatanodeDescriptor", "node", ",", "DatanodeDescriptor", "delNodeHint", ")", "throws", "IOException", "{", "return", "addStoredBlockInternal", "(", "block", ",", "node", ",", "delNodeHint", ",", "fa...
Modify (block-->datanode) map. Remove block from set of needed replications if this takes care of the problem. @return whether or not the block was stored. @throws IOException
[ "Modify", "(", "block", "--", ">", "datanode", ")", "map", ".", "Remove", "block", "from", "set", "of", "needed", "replications", "if", "this", "takes", "care", "of", "the", "problem", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L6217-L6221
netty/netty
codec/src/main/java/io/netty/handler/codec/compression/Snappy.java
Snappy.decodeCopyWith1ByteOffset
private static int decodeCopyWith1ByteOffset(byte tag, ByteBuf in, ByteBuf out, int writtenSoFar) { """ Reads a compressed reference offset and length from the supplied input buffer, seeks back to the appropriate place in the input buffer and writes the found data to the supplied output stream. @param tag The...
java
private static int decodeCopyWith1ByteOffset(byte tag, ByteBuf in, ByteBuf out, int writtenSoFar) { if (!in.isReadable()) { return NOT_ENOUGH_INPUT; } int initialIndex = out.writerIndex(); int length = 4 + ((tag & 0x01c) >> 2); int offset = (tag & 0x0e0) << 8 >> 5 | ...
[ "private", "static", "int", "decodeCopyWith1ByteOffset", "(", "byte", "tag", ",", "ByteBuf", "in", ",", "ByteBuf", "out", ",", "int", "writtenSoFar", ")", "{", "if", "(", "!", "in", ".", "isReadable", "(", ")", ")", "{", "return", "NOT_ENOUGH_INPUT", ";", ...
Reads a compressed reference offset and length from the supplied input buffer, seeks back to the appropriate place in the input buffer and writes the found data to the supplied output stream. @param tag The tag used to identify this as a copy is also used to encode the length and part of the offset @param in The input...
[ "Reads", "a", "compressed", "reference", "offset", "and", "length", "from", "the", "supplied", "input", "buffer", "seeks", "back", "to", "the", "appropriate", "place", "in", "the", "input", "buffer", "and", "writes", "the", "found", "data", "to", "the", "sup...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec/src/main/java/io/netty/handler/codec/compression/Snappy.java#L447-L476
languagetool-org/languagetool
languagetool-office-extension/src/main/java/org/languagetool/openoffice/ResultCache.java
ResultCache.removeAndShift
void removeAndShift(int firstPara, int lastPara, int shift) { """ Remove all cache entries between firstPara (included) and lastPara (included) shift all numberOfParagraph by 'shift' """ for(int i = 0; i < entries.size(); i++) { if(entries.get(i).numberOfParagraph >= firstPara && entries.get(i).numb...
java
void removeAndShift(int firstPara, int lastPara, int shift) { for(int i = 0; i < entries.size(); i++) { if(entries.get(i).numberOfParagraph >= firstPara && entries.get(i).numberOfParagraph <= lastPara) { entries.remove(i); i--; } } for (CacheEntry anEntry : entries) { if (...
[ "void", "removeAndShift", "(", "int", "firstPara", ",", "int", "lastPara", ",", "int", "shift", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "entries", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "entries", ".", "g...
Remove all cache entries between firstPara (included) and lastPara (included) shift all numberOfParagraph by 'shift'
[ "Remove", "all", "cache", "entries", "between", "firstPara", "(", "included", ")", "and", "lastPara", "(", "included", ")", "shift", "all", "numberOfParagraph", "by", "shift" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-office-extension/src/main/java/org/languagetool/openoffice/ResultCache.java#L80-L92
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java
BpmnParse.parseAsynchronousContinuation
protected void parseAsynchronousContinuation(Element element, ActivityImpl activity) { """ Parse async continuation of the given element and create async jobs for the activity. @param element with async characteristics @param activity """ boolean isAsyncBefore = isAsyncBefore(element); boolean isA...
java
protected void parseAsynchronousContinuation(Element element, ActivityImpl activity) { boolean isAsyncBefore = isAsyncBefore(element); boolean isAsyncAfter = isAsyncAfter(element); boolean exclusive = isExclusive(element); // set properties on activity activity.setAsyncBefore(isAsyncBefore, exclus...
[ "protected", "void", "parseAsynchronousContinuation", "(", "Element", "element", ",", "ActivityImpl", "activity", ")", "{", "boolean", "isAsyncBefore", "=", "isAsyncBefore", "(", "element", ")", ";", "boolean", "isAsyncAfter", "=", "isAsyncAfter", "(", "element", ")...
Parse async continuation of the given element and create async jobs for the activity. @param element with async characteristics @param activity
[ "Parse", "async", "continuation", "of", "the", "given", "element", "and", "create", "async", "jobs", "for", "the", "activity", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L2253-L2262
Alluxio/alluxio
core/base/src/main/java/alluxio/util/URIUtils.java
URIUtils.generateQueryString
@Nullable public static String generateQueryString(Map<String, String> queryMap) { """ Generates a query string from a {@link Map <String, String>} of key/value pairs. @param queryMap the map of query key/value pairs @return the generated query string, null if the input map is null or empty """ if (q...
java
@Nullable public static String generateQueryString(Map<String, String> queryMap) { if (queryMap == null || queryMap.isEmpty()) { return null; } ArrayList<String> pairs = new ArrayList<>(queryMap.size()); try { for (Map.Entry<String, String> entry : queryMap.entrySet()) { pairs.add(...
[ "@", "Nullable", "public", "static", "String", "generateQueryString", "(", "Map", "<", "String", ",", "String", ">", "queryMap", ")", "{", "if", "(", "queryMap", "==", "null", "||", "queryMap", ".", "isEmpty", "(", ")", ")", "{", "return", "null", ";", ...
Generates a query string from a {@link Map <String, String>} of key/value pairs. @param queryMap the map of query key/value pairs @return the generated query string, null if the input map is null or empty
[ "Generates", "a", "query", "string", "from", "a", "{", "@link", "Map", "<String", "String", ">", "}", "of", "key", "/", "value", "pairs", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/base/src/main/java/alluxio/util/URIUtils.java#L77-L95
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.listPrebuiltsAsync
public Observable<List<PrebuiltEntityExtractor>> listPrebuiltsAsync(UUID appId, String versionId, ListPrebuiltsOptionalParameter listPrebuiltsOptionalParameter) { """ Gets information about the prebuilt entity models. @param appId The application ID. @param versionId The version ID. @param listPrebuiltsOption...
java
public Observable<List<PrebuiltEntityExtractor>> listPrebuiltsAsync(UUID appId, String versionId, ListPrebuiltsOptionalParameter listPrebuiltsOptionalParameter) { return listPrebuiltsWithServiceResponseAsync(appId, versionId, listPrebuiltsOptionalParameter).map(new Func1<ServiceResponse<List<PrebuiltEntityExtra...
[ "public", "Observable", "<", "List", "<", "PrebuiltEntityExtractor", ">", ">", "listPrebuiltsAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListPrebuiltsOptionalParameter", "listPrebuiltsOptionalParameter", ")", "{", "return", "listPrebuiltsWithServiceRespo...
Gets information about the prebuilt entity models. @param appId The application ID. @param versionId The version ID. @param listPrebuiltsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return ...
[ "Gets", "information", "about", "the", "prebuilt", "entity", "models", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L2210-L2217
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/meta/common/utils/IOUtils.java
IOUtils.unpackData
@Nonnull @Weight(Weight.Unit.VARIABLE) public static byte[] unpackData(@Nonnull final byte[] data) { """ Unpack binary data packed by the packData method. @param data packed data array @return unpacked byte array @throws IllegalArgumentException it will be thrown if the data has wrong format, global error...
java
@Nonnull @Weight(Weight.Unit.VARIABLE) public static byte[] unpackData(@Nonnull final byte[] data) { final Inflater decompressor = new Inflater(); decompressor.setInput(Assertions.assertNotNull(data)); final ByteArrayOutputStream outStream = new ByteArrayOutputStream(data.length * 2); final byte[] b...
[ "@", "Nonnull", "@", "Weight", "(", "Weight", ".", "Unit", ".", "VARIABLE", ")", "public", "static", "byte", "[", "]", "unpackData", "(", "@", "Nonnull", "final", "byte", "[", "]", "data", ")", "{", "final", "Inflater", "decompressor", "=", "new", "Inf...
Unpack binary data packed by the packData method. @param data packed data array @return unpacked byte array @throws IllegalArgumentException it will be thrown if the data has wrong format, global error listeners will be also notified @see #packData(byte[]) @since 1.0
[ "Unpack", "binary", "data", "packed", "by", "the", "packData", "method", "." ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/meta/common/utils/IOUtils.java#L79-L95
netty/netty
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshakerFactory.java
WebSocketClientHandshakerFactory.newHandshaker
public static WebSocketClientHandshaker newHandshaker( URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders) { """ Creates a new handshaker. @param webSocketURL URL for web socket communications. e.g "ws://myhost.com/mypath"....
java
public static WebSocketClientHandshaker newHandshaker( URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders) { return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders, 65536); }
[ "public", "static", "WebSocketClientHandshaker", "newHandshaker", "(", "URI", "webSocketURL", ",", "WebSocketVersion", "version", ",", "String", "subprotocol", ",", "boolean", "allowExtensions", ",", "HttpHeaders", "customHeaders", ")", "{", "return", "newHandshaker", "...
Creates a new handshaker. @param webSocketURL URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL. @param version Version of web socket specification to use to connect to the server @param subprotocol Sub protocol request sent to the server. Null if no...
[ "Creates", "a", "new", "handshaker", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshakerFactory.java#L50-L54
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlSelectBuilder.java
SqlSelectBuilder.generateSelect
public static void generateSelect(Builder builder, SQLiteModelMethod method) throws ClassNotFoundException { """ Generate select. @param builder the builder @param method the method @throws ClassNotFoundException the class not found exception """ SelectType selectResultType = SelectBuilderUtility.det...
java
public static void generateSelect(Builder builder, SQLiteModelMethod method) throws ClassNotFoundException { SelectType selectResultType = SelectBuilderUtility.detectSelectType(method); // generate select method selectResultType.generate(builder, method); if (method.hasLiveData()) { // generate selectRe...
[ "public", "static", "void", "generateSelect", "(", "Builder", "builder", ",", "SQLiteModelMethod", "method", ")", "throws", "ClassNotFoundException", "{", "SelectType", "selectResultType", "=", "SelectBuilderUtility", ".", "detectSelectType", "(", "method", ")", ";", ...
Generate select. @param builder the builder @param method the method @throws ClassNotFoundException the class not found exception
[ "Generate", "select", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlSelectBuilder.java#L89-L104