repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
204
func_name
stringlengths
5
103
whole_func_string
stringlengths
87
3.44k
language
stringclasses
1 value
func_code_string
stringlengths
87
3.44k
func_code_tokens
listlengths
21
714
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
482
split_name
stringclasses
1 value
func_code_url
stringlengths
102
309
zaproxy/zaproxy
src/org/parosproxy/paros/view/WorkbenchPanel.java
WorkbenchPanel.addPanel
private static void addPanel(TabbedPanel2 tabbedPanel, AbstractPanel panel, boolean visible) { if (visible) { tabbedPanel.addTab(panel); } else { tabbedPanel.addTabHidden(panel); } }
java
private static void addPanel(TabbedPanel2 tabbedPanel, AbstractPanel panel, boolean visible) { if (visible) { tabbedPanel.addTab(panel); } else { tabbedPanel.addTabHidden(panel); } }
[ "private", "static", "void", "addPanel", "(", "TabbedPanel2", "tabbedPanel", ",", "AbstractPanel", "panel", ",", "boolean", "visible", ")", "{", "if", "(", "visible", ")", "{", "tabbedPanel", ".", "addTab", "(", "panel", ")", ";", "}", "else", "{", "tabbed...
Adds the given {@code panel} to the given {@code tabbedPanel}. @param tabbedPanel the tabbed panel to add the panel @param panel the panel to add @param visible {@code true} if the panel should be visible, {@code false} otherwise. @see #addPanels(TabbedPanel2, List, boolean)
[ "Adds", "the", "given", "{", "@code", "panel", "}", "to", "the", "given", "{", "@code", "tabbedPanel", "}", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/WorkbenchPanel.java#L893-L899
Berico-Technologies/CLAVIN
src/main/java/com/bericotech/clavin/resolver/LuceneLocationResolver.java
LuceneLocationResolver.resolveLocations
@Override @Deprecated public List<ResolvedLocation> resolveLocations(List<LocationOccurrence> locations, boolean fuzzy) throws IOException, ParseException { logger.warn("LuceneLocationResolver is deprecated. Use ClavinLocationResolver."); try { return delegate.resolveLocations(locat...
java
@Override @Deprecated public List<ResolvedLocation> resolveLocations(List<LocationOccurrence> locations, boolean fuzzy) throws IOException, ParseException { logger.warn("LuceneLocationResolver is deprecated. Use ClavinLocationResolver."); try { return delegate.resolveLocations(locat...
[ "@", "Override", "@", "Deprecated", "public", "List", "<", "ResolvedLocation", ">", "resolveLocations", "(", "List", "<", "LocationOccurrence", ">", "locations", ",", "boolean", "fuzzy", ")", "throws", "IOException", ",", "ParseException", "{", "logger", ".", "w...
Resolves the supplied list of location names into {@link ResolvedLocation}s containing {@link com.bericotech.clavin.gazetteer.GeoName} objects. Calls {@link com.bericotech.clavin.gazetteer.query.Gazetteer#getClosestLocations} on each location name to find all possible matches, then uses heuristics to select the best m...
[ "Resolves", "the", "supplied", "list", "of", "location", "names", "into", "{", "@link", "ResolvedLocation", "}", "s", "containing", "{", "@link", "com", ".", "bericotech", ".", "clavin", ".", "gazetteer", ".", "GeoName", "}", "objects", "." ]
train
https://github.com/Berico-Technologies/CLAVIN/blob/f73c741f33a01b91aa5b06e71860bc354ef3010d/src/main/java/com/bericotech/clavin/resolver/LuceneLocationResolver.java#L113-L129
geomajas/geomajas-project-client-gwt2
common-gwt/command/src/main/java/org/geomajas/gwt/client/command/GwtCommandDispatcher.java
GwtCommandDispatcher.isEqual
private boolean isEqual(Object o1, Object o2) { return o1 == null ? o2 == null : o1.equals(o2); }
java
private boolean isEqual(Object o1, Object o2) { return o1 == null ? o2 == null : o1.equals(o2); }
[ "private", "boolean", "isEqual", "(", "Object", "o1", ",", "Object", "o2", ")", "{", "return", "o1", "==", "null", "?", "o2", "==", "null", ":", "o1", ".", "equals", "(", "o2", ")", ";", "}" ]
Checks whether 2 objects are equal. Null-safe, 2 null objects are considered equal. @param o1 first object to compare @param o2 second object to compare @return true if object are equal, false otherwise
[ "Checks", "whether", "2", "objects", "are", "equal", ".", "Null", "-", "safe", "2", "null", "objects", "are", "considered", "equal", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/common-gwt/command/src/main/java/org/geomajas/gwt/client/command/GwtCommandDispatcher.java#L686-L688
cdk/cdk
base/valencycheck/src/main/java/org/openscience/cdk/tools/SaturationChecker.java
SaturationChecker.isSaturated
@Override public boolean isSaturated(IAtom atom, IAtomContainer ac) throws CDKException { IAtomType[] atomTypes = getAtomTypeFactory(atom.getBuilder()).getAtomTypes(atom.getSymbol()); if (atomTypes.length == 0) return true; double bondOrderSum = ac.getBondOrderSum(atom); IBond.Order ...
java
@Override public boolean isSaturated(IAtom atom, IAtomContainer ac) throws CDKException { IAtomType[] atomTypes = getAtomTypeFactory(atom.getBuilder()).getAtomTypes(atom.getSymbol()); if (atomTypes.length == 0) return true; double bondOrderSum = ac.getBondOrderSum(atom); IBond.Order ...
[ "@", "Override", "public", "boolean", "isSaturated", "(", "IAtom", "atom", ",", "IAtomContainer", "ac", ")", "throws", "CDKException", "{", "IAtomType", "[", "]", "atomTypes", "=", "getAtomTypeFactory", "(", "atom", ".", "getBuilder", "(", ")", ")", ".", "ge...
Checks whether an Atom is saturated by comparing it with known AtomTypes.
[ "Checks", "whether", "an", "Atom", "is", "saturated", "by", "comparing", "it", "with", "known", "AtomTypes", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/valencycheck/src/main/java/org/openscience/cdk/tools/SaturationChecker.java#L161-L186
Appendium/objectlabkit
datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java
AbstractDateCalculator.moveByTenor
@Override public DateCalculator<E> moveByTenor(final Tenor tenor, final int spotLag) { if (tenor == null) { throw new IllegalArgumentException("Tenor cannot be null"); } TenorCode tenorCode = tenor.getCode(); if (tenorCode != TenorCode.OVERNIGHT && tenorCode != Te...
java
@Override public DateCalculator<E> moveByTenor(final Tenor tenor, final int spotLag) { if (tenor == null) { throw new IllegalArgumentException("Tenor cannot be null"); } TenorCode tenorCode = tenor.getCode(); if (tenorCode != TenorCode.OVERNIGHT && tenorCode != Te...
[ "@", "Override", "public", "DateCalculator", "<", "E", ">", "moveByTenor", "(", "final", "Tenor", "tenor", ",", "final", "int", "spotLag", ")", "{", "if", "(", "tenor", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Tenor cannot ...
move the current date by a given tenor, this means that if a date is either a 'weekend' or holiday, it will be skipped acording to the holiday handler and not count towards the number of days to move. @param tenor the tenor. @param spotLag number of days to "spot" days, this can vary from one market to the other. @ret...
[ "move", "the", "current", "date", "by", "a", "given", "tenor", "this", "means", "that", "if", "a", "date", "is", "either", "a", "weekend", "or", "holiday", "it", "will", "be", "skipped", "acording", "to", "the", "holiday", "handler", "and", "not", "count...
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/AbstractDateCalculator.java#L145-L168
davetcc/tcMenu
tcMenuCodePluginApi/src/main/java/com/thecoderscorner/menu/pluginapi/AbstractCodeCreator.java
AbstractCodeCreator.findPropertyValueAsIntWithDefault
public int findPropertyValueAsIntWithDefault(String name, int defVal) { return properties().stream() .filter(p->name.equals(p.getName())) .map(CreatorProperty::getLatestValueAsInt) .findFirst().orElse(defVal); }
java
public int findPropertyValueAsIntWithDefault(String name, int defVal) { return properties().stream() .filter(p->name.equals(p.getName())) .map(CreatorProperty::getLatestValueAsInt) .findFirst().orElse(defVal); }
[ "public", "int", "findPropertyValueAsIntWithDefault", "(", "String", "name", ",", "int", "defVal", ")", "{", "return", "properties", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "p", "->", "name", ".", "equals", "(", "p", ".", "getName", "(", ...
Find the integer value of a property or a default if it is not set @param name the property name @param defVal the default value @return the properties integer value or the default
[ "Find", "the", "integer", "value", "of", "a", "property", "or", "a", "default", "if", "it", "is", "not", "set" ]
train
https://github.com/davetcc/tcMenu/blob/61546e4b982b25ceaff384073fe9ec1fff55e64a/tcMenuCodePluginApi/src/main/java/com/thecoderscorner/menu/pluginapi/AbstractCodeCreator.java#L177-L182
reactiverse/reactive-pg-client
src/main/java/io/reactiverse/pgclient/impl/PgConnectionUriParser.java
PgConnectionUriParser.doParse
private static void doParse(String connectionUri, JsonObject configuration) { Pattern pattern = Pattern.compile(FULL_URI_REGEX); Matcher matcher = pattern.matcher(connectionUri); if (matcher.matches()) { // parse the user and password parseUserandPassword(matcher.group(USER_INFO_GROUP), configu...
java
private static void doParse(String connectionUri, JsonObject configuration) { Pattern pattern = Pattern.compile(FULL_URI_REGEX); Matcher matcher = pattern.matcher(connectionUri); if (matcher.matches()) { // parse the user and password parseUserandPassword(matcher.group(USER_INFO_GROUP), configu...
[ "private", "static", "void", "doParse", "(", "String", "connectionUri", ",", "JsonObject", "configuration", ")", "{", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "FULL_URI_REGEX", ")", ";", "Matcher", "matcher", "=", "pattern", ".", "matcher", "...
execute the parsing process and store options in the configuration
[ "execute", "the", "parsing", "process", "and", "store", "options", "in", "the", "configuration" ]
train
https://github.com/reactiverse/reactive-pg-client/blob/be75cc5462f0945f81d325f58db5f297403067bf/src/main/java/io/reactiverse/pgclient/impl/PgConnectionUriParser.java#L57-L80
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java
JsonUtil.getString
public static String getString(JsonObject object, String field, String defaultValue) { final JsonValue value = object.get(field); if (value == null || value.isNull()) { return defaultValue; } else { return value.asString(); } }
java
public static String getString(JsonObject object, String field, String defaultValue) { final JsonValue value = object.get(field); if (value == null || value.isNull()) { return defaultValue; } else { return value.asString(); } }
[ "public", "static", "String", "getString", "(", "JsonObject", "object", ",", "String", "field", ",", "String", "defaultValue", ")", "{", "final", "JsonValue", "value", "=", "object", ".", "get", "(", "field", ")", ";", "if", "(", "value", "==", "null", "...
Returns a field in a Json object as a string. @param object the Json Object @param field the field in the Json object to return @param defaultValue a default value for the field if the field value is null @return the Json field value as a string
[ "Returns", "a", "field", "in", "a", "Json", "object", "as", "a", "string", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L182-L189
ronmamo/reflections
src/main/java/org/reflections/Reflections.java
Reflections.collect
public Reflections collect(final File file) { FileInputStream inputStream = null; try { inputStream = new FileInputStream(file); return collect(inputStream); } catch (FileNotFoundException e) { throw new ReflectionsException("could not obtain input stream from...
java
public Reflections collect(final File file) { FileInputStream inputStream = null; try { inputStream = new FileInputStream(file); return collect(inputStream); } catch (FileNotFoundException e) { throw new ReflectionsException("could not obtain input stream from...
[ "public", "Reflections", "collect", "(", "final", "File", "file", ")", "{", "FileInputStream", "inputStream", "=", "null", ";", "try", "{", "inputStream", "=", "new", "FileInputStream", "(", "file", ")", ";", "return", "collect", "(", "inputStream", ")", ";"...
merges saved Reflections resources from the given file, using the serializer configured in this instance's Configuration <p> useful if you know the serialized resource location and prefer not to look it up the classpath
[ "merges", "saved", "Reflections", "resources", "from", "the", "given", "file", "using", "the", "serializer", "configured", "in", "this", "instance", "s", "Configuration", "<p", ">", "useful", "if", "you", "know", "the", "serialized", "resource", "location", "and...
train
https://github.com/ronmamo/reflections/blob/084cf4a759a06d88e88753ac00397478c2e0ed52/src/main/java/org/reflections/Reflections.java#L341-L351
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/xpath/XPathFactoryFinder.java
XPathFactoryFinder.which
private static String which(String classname, ClassLoader loader) { String classnameAsResource = classname.replace('.', '/') + ".class"; if (loader==null) loader = ClassLoader.getSystemClassLoader(); URL it = loader.getResource(classnameAsResource); return it != null ? it.toString() : n...
java
private static String which(String classname, ClassLoader loader) { String classnameAsResource = classname.replace('.', '/') + ".class"; if (loader==null) loader = ClassLoader.getSystemClassLoader(); URL it = loader.getResource(classnameAsResource); return it != null ? it.toString() : n...
[ "private", "static", "String", "which", "(", "String", "classname", ",", "ClassLoader", "loader", ")", "{", "String", "classnameAsResource", "=", "classname", ".", "replace", "(", "'", "'", ",", "'", "'", ")", "+", "\".class\"", ";", "if", "(", "loader", ...
<p>Search the specified classloader for the given classname.</p> @param classname the fully qualified name of the class to search for @param loader the classloader to search @return the source location of the resource, or null if it wasn't found
[ "<p", ">", "Search", "the", "specified", "classloader", "for", "the", "given", "classname", ".", "<", "/", "p", ">" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/xpath/XPathFactoryFinder.java#L363-L369
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java
BaseFileManager.handleOptions
public boolean handleOptions(Map<Option, String> map) { boolean ok = true; for (Map.Entry<Option, String> e: map.entrySet()) { try { ok = ok & handleOption(e.getKey(), e.getValue()); } catch (IllegalArgumentException ex) { log.error(Errors.IllegalA...
java
public boolean handleOptions(Map<Option, String> map) { boolean ok = true; for (Map.Entry<Option, String> e: map.entrySet()) { try { ok = ok & handleOption(e.getKey(), e.getValue()); } catch (IllegalArgumentException ex) { log.error(Errors.IllegalA...
[ "public", "boolean", "handleOptions", "(", "Map", "<", "Option", ",", "String", ">", "map", ")", "{", "boolean", "ok", "=", "true", ";", "for", "(", "Map", ".", "Entry", "<", "Option", ",", "String", ">", "e", ":", "map", ".", "entrySet", "(", ")",...
Call handleOption for collection of options and corresponding values. @param map a collection of options and corresponding values @return true if all the calls are successful
[ "Call", "handleOption", "for", "collection", "of", "options", "and", "corresponding", "values", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java#L278-L289
jbundle/jbundle
thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java
JAltGridScreen.addDetailComponent
public Component addDetailComponent(TableModel model, Object aValue, int iRowIndex, int iColumnIndex, GridBagConstraints c) { JComponent component = null; String string = ""; if (aValue instanceof ImageIcon) { component = new JLabel((ImageIcon)aValue); } i...
java
public Component addDetailComponent(TableModel model, Object aValue, int iRowIndex, int iColumnIndex, GridBagConstraints c) { JComponent component = null; String string = ""; if (aValue instanceof ImageIcon) { component = new JLabel((ImageIcon)aValue); } i...
[ "public", "Component", "addDetailComponent", "(", "TableModel", "model", ",", "Object", "aValue", ",", "int", "iRowIndex", ",", "int", "iColumnIndex", ",", "GridBagConstraints", "c", ")", "{", "JComponent", "component", "=", "null", ";", "String", "string", "=",...
Create the appropriate component and add it to the grid detail at this location. @param model The table model to read through. @param iRowIndex The row to add this item. @param iColumnIndex The column index of this component. @param c The constraint to use.
[ "Create", "the", "appropriate", "component", "and", "add", "it", "to", "the", "grid", "detail", "at", "this", "location", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L255-L281
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/linalg/util/SerializationUtils.java
SerializationUtils.writeObject
public static void writeObject(Serializable toSave, OutputStream writeTo) { try { ObjectOutputStream os = new ObjectOutputStream(writeTo); os.writeObject(toSave); } catch (Exception e) { throw new RuntimeException(e); } }
java
public static void writeObject(Serializable toSave, OutputStream writeTo) { try { ObjectOutputStream os = new ObjectOutputStream(writeTo); os.writeObject(toSave); } catch (Exception e) { throw new RuntimeException(e); } }
[ "public", "static", "void", "writeObject", "(", "Serializable", "toSave", ",", "OutputStream", "writeTo", ")", "{", "try", "{", "ObjectOutputStream", "os", "=", "new", "ObjectOutputStream", "(", "writeTo", ")", ";", "os", ".", "writeObject", "(", "toSave", ")"...
Writes the object to the output stream THIS DOES NOT FLUSH THE STREAM @param toSave the object to save @param writeTo the output stream to write to
[ "Writes", "the", "object", "to", "the", "output", "stream", "THIS", "DOES", "NOT", "FLUSH", "THE", "STREAM" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/linalg/util/SerializationUtils.java#L119-L126
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/operators/OperatorForEachFuture.java
OperatorForEachFuture.forEachFuture
public static <T> FutureTask<Void> forEachFuture( Observable<? extends T> source, Action1<? super T> onNext) { return forEachFuture(source, onNext, Functionals.emptyThrowable(), Functionals.empty()); }
java
public static <T> FutureTask<Void> forEachFuture( Observable<? extends T> source, Action1<? super T> onNext) { return forEachFuture(source, onNext, Functionals.emptyThrowable(), Functionals.empty()); }
[ "public", "static", "<", "T", ">", "FutureTask", "<", "Void", ">", "forEachFuture", "(", "Observable", "<", "?", "extends", "T", ">", "source", ",", "Action1", "<", "?", "super", "T", ">", "onNext", ")", "{", "return", "forEachFuture", "(", "source", "...
Subscribes to the given source and calls the callback for each emitted item, and surfaces the completion or error through a Future. @param <T> the element type of the Observable @param source the source Observable @param onNext the action to call with each emitted element @return the Future representing the entire for-...
[ "Subscribes", "to", "the", "given", "source", "and", "calls", "the", "callback", "for", "each", "emitted", "item", "and", "surfaces", "the", "completion", "or", "error", "through", "a", "Future", "." ]
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/operators/OperatorForEachFuture.java#L44-L48
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/linalg/collection/MultiDimensionalSet.java
MultiDimensionalSet.addAll
@Override public boolean addAll(Collection<? extends Pair<K, V>> c) { return backedSet.addAll(c); }
java
@Override public boolean addAll(Collection<? extends Pair<K, V>> c) { return backedSet.addAll(c); }
[ "@", "Override", "public", "boolean", "addAll", "(", "Collection", "<", "?", "extends", "Pair", "<", "K", ",", "V", ">", ">", "c", ")", "{", "return", "backedSet", ".", "addAll", "(", "c", ")", ";", "}" ]
Adds all of the elements in the specified collection to this applyTransformToDestination if they're not already present (optional operation). If the specified collection is also a applyTransformToDestination, the <tt>addAll</tt> operation effectively modifies this applyTransformToDestination so that its value is the <...
[ "Adds", "all", "of", "the", "elements", "in", "the", "specified", "collection", "to", "this", "applyTransformToDestination", "if", "they", "re", "not", "already", "present", "(", "optional", "operation", ")", ".", "If", "the", "specified", "collection", "is", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/linalg/collection/MultiDimensionalSet.java#L279-L282
Impetus/Kundera
src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java
MongoDBClient.handleUpdateFunctions
public int handleUpdateFunctions(BasicDBObject query, BasicDBObject update, String collName) { DBCollection collection = mongoDb.getCollection(collName); KunderaCoreUtils.printQuery("Update collection:" + query, showQuery); WriteResult result = null; try { result ...
java
public int handleUpdateFunctions(BasicDBObject query, BasicDBObject update, String collName) { DBCollection collection = mongoDb.getCollection(collName); KunderaCoreUtils.printQuery("Update collection:" + query, showQuery); WriteResult result = null; try { result ...
[ "public", "int", "handleUpdateFunctions", "(", "BasicDBObject", "query", ",", "BasicDBObject", "update", ",", "String", "collName", ")", "{", "DBCollection", "collection", "=", "mongoDb", ".", "getCollection", "(", "collName", ")", ";", "KunderaCoreUtils", ".", "p...
Handle update functions. @param query the query @param update the update @param collName the coll name @return the int
[ "Handle", "update", "functions", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java#L1932-L1948
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/primitives/DoubleUtils.java
DoubleUtils.shiftTowardsZeroWithClippingRecklessly
public static double shiftTowardsZeroWithClippingRecklessly(double val, double shift) { if (val > shift) { return val - shift; } else if (val < -shift) { return val + shift; } else { return 0.0; } }
java
public static double shiftTowardsZeroWithClippingRecklessly(double val, double shift) { if (val > shift) { return val - shift; } else if (val < -shift) { return val + shift; } else { return 0.0; } }
[ "public", "static", "double", "shiftTowardsZeroWithClippingRecklessly", "(", "double", "val", ",", "double", "shift", ")", "{", "if", "(", "val", ">", "shift", ")", "{", "return", "val", "-", "shift", ";", "}", "else", "if", "(", "val", "<", "-", "shift"...
Shifts the provided {@code val} towards but not past zero. If the absolute value of {@code val} is less than or equal to shift, zero will be returned. Otherwise, negative {@code val}s will have {@code shift} added and positive vals will have {@code shift} subtracted. If {@code shift} is negative, the result is undefi...
[ "Shifts", "the", "provided", "{", "@code", "val", "}", "towards", "but", "not", "past", "zero", ".", "If", "the", "absolute", "value", "of", "{", "@code", "val", "}", "is", "less", "than", "or", "equal", "to", "shift", "zero", "will", "be", "returned",...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/primitives/DoubleUtils.java#L268-L276
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listWebWorkerUsagesWithServiceResponseAsync
public Observable<ServiceResponse<Page<UsageInner>>> listWebWorkerUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { return listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName) .concatMap(new Func1<ServiceResponse<P...
java
public Observable<ServiceResponse<Page<UsageInner>>> listWebWorkerUsagesWithServiceResponseAsync(final String resourceGroupName, final String name, final String workerPoolName) { return listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName) .concatMap(new Func1<ServiceResponse<P...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "UsageInner", ">", ">", ">", "listWebWorkerUsagesWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ",", "final", "String", "workerPoolName", ")", ...
Get usage metrics for a worker pool of an App Service Environment. Get usage metrics for a worker pool of an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @param workerPoolName Name of the worker pool. @throw...
[ "Get", "usage", "metrics", "for", "a", "worker", "pool", "of", "an", "App", "Service", "Environment", ".", "Get", "usage", "metrics", "for", "a", "worker", "pool", "of", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L6544-L6556
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/http/HttpInputStream.java
HttpInputStream.setContentLength
public void setContentLength(long len) { if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"setContentLength", "setContentLength --> "+len); } if ( len < 0 ) { logger.logp(Level.SEVERE,...
java
public void setContentLength(long len) { if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"setContentLength", "setContentLength --> "+len); } if ( len < 0 ) { logger.logp(Level.SEVERE,...
[ "public", "void", "setContentLength", "(", "long", "len", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "logger", ".", "isLoggable", "(", "Level", ".", "FINE", ")", ")", "{", "//306998.15", "logger", ".", "logp", "(", ...
Sets the content length for this input stream. This should be called once the headers have been read from the input stream. @param len the content length
[ "Sets", "the", "content", "length", "for", "this", "input", "stream", ".", "This", "should", "be", "called", "once", "the", "headers", "have", "been", "read", "from", "the", "input", "stream", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/srt/http/HttpInputStream.java#L190-L205
landawn/AbacusUtil
src/com/landawn/abacus/util/Primitives.java
Primitives.box
@SafeVarargs public static Byte[] box(final byte... a) { if (a == null) { return null; } return box(a, 0, a.length); }
java
@SafeVarargs public static Byte[] box(final byte... a) { if (a == null) { return null; } return box(a, 0, a.length); }
[ "@", "SafeVarargs", "public", "static", "Byte", "[", "]", "box", "(", "final", "byte", "...", "a", ")", "{", "if", "(", "a", "==", "null", ")", "{", "return", "null", ";", "}", "return", "box", "(", "a", ",", "0", ",", "a", ".", "length", ")", ...
<p> Converts an array of primitive bytes to objects. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a a {@code byte} array @return a {@code Byte} array, {@code null} if null array input
[ "<p", ">", "Converts", "an", "array", "of", "primitive", "bytes", "to", "objects", ".", "<", "/", "p", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Primitives.java#L199-L206
knowm/XChange
xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerAdapters.java
BitflyerAdapters.adaptTicker
public static Ticker adaptTicker(BitflyerTicker ticker, CurrencyPair currencyPair) { BigDecimal bid = ticker.getBestBid(); BigDecimal ask = ticker.getBestAsk(); BigDecimal volume = ticker.getVolume(); BigDecimal last = ticker.getLtp(); Date timestamp = ticker.getTimestamp() != null ? Bitfly...
java
public static Ticker adaptTicker(BitflyerTicker ticker, CurrencyPair currencyPair) { BigDecimal bid = ticker.getBestBid(); BigDecimal ask = ticker.getBestAsk(); BigDecimal volume = ticker.getVolume(); BigDecimal last = ticker.getLtp(); Date timestamp = ticker.getTimestamp() != null ? Bitfly...
[ "public", "static", "Ticker", "adaptTicker", "(", "BitflyerTicker", "ticker", ",", "CurrencyPair", "currencyPair", ")", "{", "BigDecimal", "bid", "=", "ticker", ".", "getBestBid", "(", ")", ";", "BigDecimal", "ask", "=", "ticker", ".", "getBestAsk", "(", ")", ...
Adapts a BitflyerTicker to a Ticker Object @param ticker The exchange specific ticker @param currencyPair (e.g. BTC/USD) @return The ticker
[ "Adapts", "a", "BitflyerTicker", "to", "a", "Ticker", "Object" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-bitflyer/src/main/java/org/knowm/xchange/bitflyer/BitflyerAdapters.java#L85-L102
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java
GVRPicker.setPickRay
public void setPickRay(float ox, float oy, float oz, float dx, float dy, float dz) { synchronized (this) { mRayOrigin.x = ox; mRayOrigin.y = oy; mRayOrigin.z = oz; mRayDirection.x = dx; mRayDirection.y = dy; mRayDirection.z = dz...
java
public void setPickRay(float ox, float oy, float oz, float dx, float dy, float dz) { synchronized (this) { mRayOrigin.x = ox; mRayOrigin.y = oy; mRayOrigin.z = oz; mRayDirection.x = dx; mRayDirection.y = dy; mRayDirection.z = dz...
[ "public", "void", "setPickRay", "(", "float", "ox", ",", "float", "oy", ",", "float", "oz", ",", "float", "dx", ",", "float", "dy", ",", "float", "dz", ")", "{", "synchronized", "(", "this", ")", "{", "mRayOrigin", ".", "x", "=", "ox", ";", "mRayOr...
Sets the origin and direction of the pick ray. @param ox X coordinate of origin. @param oy Y coordinate of origin. @param oz Z coordinate of origin. @param dx X coordinate of ray direction. @param dy Y coordinate of ray direction. @param dz Z coordinate of ray direction. The coordinate system of the...
[ "Sets", "the", "origin", "and", "direction", "of", "the", "pick", "ray", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRPicker.java#L418-L429
Inbot/inbot-utils
src/main/java/io/inbot/utils/Math.java
Math.normalize
public static double normalize(double i, double factor) { Validate.isTrue(i >= 0, "should be positive value"); return (1 / (1 + java.lang.Math.exp(-1 * (factor * i))) - 0.5) * 2; }
java
public static double normalize(double i, double factor) { Validate.isTrue(i >= 0, "should be positive value"); return (1 / (1 + java.lang.Math.exp(-1 * (factor * i))) - 0.5) * 2; }
[ "public", "static", "double", "normalize", "(", "double", "i", ",", "double", "factor", ")", "{", "Validate", ".", "isTrue", "(", "i", ">=", "0", ",", "\"should be positive value\"", ")", ";", "return", "(", "1", "/", "(", "1", "+", "java", ".", "lang"...
Useful for normalizing integer or double values to a number between 0 and 1. This uses a simple logistic function: https://en.wikipedia.org/wiki/Logistic_function with some small adaptations: <pre> (1 / (1 + java.lang.Math.exp(-1 * (factor * i))) - 0.5) * 2 </pre> @param i any positive long @param factor allows you to...
[ "Useful", "for", "normalizing", "integer", "or", "double", "values", "to", "a", "number", "between", "0", "and", "1", ".", "This", "uses", "a", "simple", "logistic", "function", ":", "https", ":", "//", "en", ".", "wikipedia", ".", "org", "/", "wiki", ...
train
https://github.com/Inbot/inbot-utils/blob/3112bc08d4237e95fe0f8a219a5bbceb390d0505/src/main/java/io/inbot/utils/Math.java#L75-L78
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/data/cpe/CpeMemoryIndex.java
CpeMemoryIndex.parseQuery
public synchronized Query parseQuery(String searchString) throws ParseException, IndexException { if (searchString == null || searchString.trim().isEmpty()) { throw new ParseException("Query is null or empty"); } LOGGER.debug(searchString); final Query query = queryParser.pa...
java
public synchronized Query parseQuery(String searchString) throws ParseException, IndexException { if (searchString == null || searchString.trim().isEmpty()) { throw new ParseException("Query is null or empty"); } LOGGER.debug(searchString); final Query query = queryParser.pa...
[ "public", "synchronized", "Query", "parseQuery", "(", "String", "searchString", ")", "throws", "ParseException", ",", "IndexException", "{", "if", "(", "searchString", "==", "null", "||", "searchString", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", ...
Parses the given string into a Lucene Query. @param searchString the search text @return the Query object @throws ParseException thrown if the search text cannot be parsed @throws IndexException thrown if there is an error resetting the analyzers
[ "Parses", "the", "given", "string", "into", "a", "Lucene", "Query", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/data/cpe/CpeMemoryIndex.java#L280-L293
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/AnimatedDialog.java
AnimatedDialog.slideOpen
private void slideOpen() { TranslateAnimation slideUp = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0f); slideUp.setDuration(500); slideUp.setInterpolator(new AccelerateInterpolator()); ...
java
private void slideOpen() { TranslateAnimation slideUp = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0f); slideUp.setDuration(500); slideUp.setInterpolator(new AccelerateInterpolator()); ...
[ "private", "void", "slideOpen", "(", ")", "{", "TranslateAnimation", "slideUp", "=", "new", "TranslateAnimation", "(", "Animation", ".", "RELATIVE_TO_SELF", ",", "0", ",", "Animation", ".", "RELATIVE_TO_SELF", ",", "0", ",", "Animation", ".", "RELATIVE_TO_SELF", ...
</p> Opens the dialog with a translation animation to the content view </p>
[ "<", "/", "p", ">", "Opens", "the", "dialog", "with", "a", "translation", "animation", "to", "the", "content", "view", "<", "/", "p", ">" ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/AnimatedDialog.java#L111-L117
Stratio/stratio-cassandra
src/java/org/apache/cassandra/service/pager/QueryPagers.java
QueryPagers.countPaged
public static int countPaged(String keyspace, String columnFamily, ByteBuffer key, SliceQueryFilter filter, ConsistencyLevel consistencyLevel, ClientState ...
java
public static int countPaged(String keyspace, String columnFamily, ByteBuffer key, SliceQueryFilter filter, ConsistencyLevel consistencyLevel, ClientState ...
[ "public", "static", "int", "countPaged", "(", "String", "keyspace", ",", "String", "columnFamily", ",", "ByteBuffer", "key", ",", "SliceQueryFilter", "filter", ",", "ConsistencyLevel", "consistencyLevel", ",", "ClientState", "cState", ",", "final", "int", "pageSize"...
Convenience method that count (live) cells/rows for a given slice of a row, but page underneath.
[ "Convenience", "method", "that", "count", "(", "live", ")", "cells", "/", "rows", "for", "a", "given", "slice", "of", "a", "row", "but", "page", "underneath", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/service/pager/QueryPagers.java#L175-L195
pravega/pravega
common/src/main/java/io/pravega/common/util/BitConverter.java
BitConverter.writeUnsignedLong
public static int writeUnsignedLong(byte[] target, int offset, long value) { return writeLong(target, offset, value ^ Long.MIN_VALUE); }
java
public static int writeUnsignedLong(byte[] target, int offset, long value) { return writeLong(target, offset, value ^ Long.MIN_VALUE); }
[ "public", "static", "int", "writeUnsignedLong", "(", "byte", "[", "]", "target", ",", "int", "offset", ",", "long", "value", ")", "{", "return", "writeLong", "(", "target", ",", "offset", ",", "value", "^", "Long", ".", "MIN_VALUE", ")", ";", "}" ]
Writes the given 64-bit Unsigned Long to the given byte array at the given offset. This value can then be deserialized using {@link #readUnsignedLong}. This method is not interoperable with {@link #readLong}. The advantage of serializing as Unsigned Long (vs. a normal Signed Long) is that the serialization will have t...
[ "Writes", "the", "given", "64", "-", "bit", "Unsigned", "Long", "to", "the", "given", "byte", "array", "at", "the", "given", "offset", ".", "This", "value", "can", "then", "be", "deserialized", "using", "{", "@link", "#readUnsignedLong", "}", ".", "This", ...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/BitConverter.java#L316-L318
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.order_GET
public ArrayList<Long> order_GET(Date date_from, Date date_to) throws IOException { String qPath = "/me/order"; StringBuilder sb = path(qPath); query(sb, "date.from", date_from); query(sb, "date.to", date_to); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t2); }
java
public ArrayList<Long> order_GET(Date date_from, Date date_to) throws IOException { String qPath = "/me/order"; StringBuilder sb = path(qPath); query(sb, "date.from", date_from); query(sb, "date.to", date_to); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t2); }
[ "public", "ArrayList", "<", "Long", ">", "order_GET", "(", "Date", "date_from", ",", "Date", "date_to", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/order\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ")", ";", "query", "(...
List of all the orders the logged account has REST: GET /me/order @param date_to [required] Filter the value of date property (<=) @param date_from [required] Filter the value of date property (>=)
[ "List", "of", "all", "the", "orders", "the", "logged", "account", "has" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L2112-L2119
OpenLiberty/open-liberty
dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/stat/RangeStatisticImpl.java
RangeStatisticImpl.setWaterMark
public void setWaterMark(long curTime, long val) { lastSampleTime = curTime; if (!initWaterMark) { lowWaterMark = highWaterMark = val; initWaterMark = true; } else { if (val < lowWaterMark) lowWaterMark = val; if (val > highWaterM...
java
public void setWaterMark(long curTime, long val) { lastSampleTime = curTime; if (!initWaterMark) { lowWaterMark = highWaterMark = val; initWaterMark = true; } else { if (val < lowWaterMark) lowWaterMark = val; if (val > highWaterM...
[ "public", "void", "setWaterMark", "(", "long", "curTime", ",", "long", "val", ")", "{", "lastSampleTime", "=", "curTime", ";", "if", "(", "!", "initWaterMark", ")", "{", "lowWaterMark", "=", "highWaterMark", "=", "val", ";", "initWaterMark", "=", "true", "...
/* Non-Synchronizable: counter is "replaced" with the input value. Caller should synchronize.
[ "/", "*", "Non", "-", "Synchronizable", ":", "counter", "is", "replaced", "with", "the", "input", "value", ".", "Caller", "should", "synchronize", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.monitor/src/com/ibm/ws/pmi/stat/RangeStatisticImpl.java#L117-L138
Whiley/WhileyCompiler
src/main/java/wyil/transform/VerificationConditionGenerator.java
VerificationConditionGenerator.translateConstantDeclaration
private void translateConstantDeclaration(WyilFile.Decl.StaticVariable decl) { if (decl.hasInitialiser()) { // The environments are needed to prevent clashes between variable // versions across verification conditions, and also to type variables // used in verification conditions. GlobalEnvironment global...
java
private void translateConstantDeclaration(WyilFile.Decl.StaticVariable decl) { if (decl.hasInitialiser()) { // The environments are needed to prevent clashes between variable // versions across verification conditions, and also to type variables // used in verification conditions. GlobalEnvironment global...
[ "private", "void", "translateConstantDeclaration", "(", "WyilFile", ".", "Decl", ".", "StaticVariable", "decl", ")", "{", "if", "(", "decl", ".", "hasInitialiser", "(", ")", ")", "{", "// The environments are needed to prevent clashes between variable", "// versions acros...
Translate a constant declaration into WyAL. At the moment, this does nothing because constant declarations are not supported in WyAL files. @param declaration The type declaration being translated. @param wyalFile The WyAL file being constructed
[ "Translate", "a", "constant", "declaration", "into", "WyAL", ".", "At", "the", "moment", "this", "does", "nothing", "because", "constant", "declarations", "are", "not", "supported", "in", "WyAL", "files", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/transform/VerificationConditionGenerator.java#L164-L180
hltcoe/annotated-nyt
src/main/java/com/nytlabs/corpus/NYTCorpusDocumentParser.java
NYTCorpusDocumentParser.parseStringToDOM
private Document parseStringToDOM(String s, String encoding) { try { DocumentBuilderFactory factory = DocumentBuilderFactory .newInstance(); factory.setValidating(false); InputStream is = new ByteArrayInputStream(s.getBytes(encoding)); Document doc = factory.newDocumentBuilder().pa...
java
private Document parseStringToDOM(String s, String encoding) { try { DocumentBuilderFactory factory = DocumentBuilderFactory .newInstance(); factory.setValidating(false); InputStream is = new ByteArrayInputStream(s.getBytes(encoding)); Document doc = factory.newDocumentBuilder().pa...
[ "private", "Document", "parseStringToDOM", "(", "String", "s", ",", "String", "encoding", ")", "{", "try", "{", "DocumentBuilderFactory", "factory", "=", "DocumentBuilderFactory", ".", "newInstance", "(", ")", ";", "factory", ".", "setValidating", "(", "false", ...
Parse a string to a DOM document. @param s A string containing an XML document. @return The DOM document if it can be parsed, or null otherwise.
[ "Parse", "a", "string", "to", "a", "DOM", "document", "." ]
train
https://github.com/hltcoe/annotated-nyt/blob/0a4daa97705591cefea9de61614770ae2665a48e/src/main/java/com/nytlabs/corpus/NYTCorpusDocumentParser.java#L430-L449
wmdietl/jsr308-langtools
src/share/classes/javax/tools/ToolProvider.java
ToolProvider.trace
static <T> T trace(Level level, Object reason) { // NOTE: do not make this method private as it affects stack traces try { if (System.getProperty(propertyName) != null) { StackTraceElement[] st = Thread.currentThread().getStackTrace(); String method = "???"; ...
java
static <T> T trace(Level level, Object reason) { // NOTE: do not make this method private as it affects stack traces try { if (System.getProperty(propertyName) != null) { StackTraceElement[] st = Thread.currentThread().getStackTrace(); String method = "???"; ...
[ "static", "<", "T", ">", "T", "trace", "(", "Level", "level", ",", "Object", "reason", ")", "{", "// NOTE: do not make this method private as it affects stack traces", "try", "{", "if", "(", "System", ".", "getProperty", "(", "propertyName", ")", "!=", "null", "...
/* Define the system property "sun.tools.ToolProvider" to enable debugging: java ... -Dsun.tools.ToolProvider ...
[ "/", "*", "Define", "the", "system", "property", "sun", ".", "tools", ".", "ToolProvider", "to", "enable", "debugging", ":" ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/javax/tools/ToolProvider.java#L60-L90
uber/AutoDispose
static-analysis/autodispose-error-prone/src/main/java/com/uber/autodispose/errorprone/AbstractReturnValueIgnored.java
AbstractReturnValueIgnored.describe
private Description describe(MethodInvocationTree methodInvocationTree, VisitorState state) { // Find the root of the field access chain, i.e. a.intern().trim() ==> a. ExpressionTree identifierExpr = ASTHelpers.getRootAssignable(methodInvocationTree); String identifierStr = null; Type identifierType = n...
java
private Description describe(MethodInvocationTree methodInvocationTree, VisitorState state) { // Find the root of the field access chain, i.e. a.intern().trim() ==> a. ExpressionTree identifierExpr = ASTHelpers.getRootAssignable(methodInvocationTree); String identifierStr = null; Type identifierType = n...
[ "private", "Description", "describe", "(", "MethodInvocationTree", "methodInvocationTree", ",", "VisitorState", "state", ")", "{", "// Find the root of the field access chain, i.e. a.intern().trim() ==> a.", "ExpressionTree", "identifierExpr", "=", "ASTHelpers", ".", "getRootAssign...
Fixes the error by assigning the result of the call to the receiver reference, or deleting the method call.
[ "Fixes", "the", "error", "by", "assigning", "the", "result", "of", "the", "call", "to", "the", "receiver", "reference", "or", "deleting", "the", "method", "call", "." ]
train
https://github.com/uber/AutoDispose/blob/1115b0274f7960354289bb3ae7ba75b0c5a47457/static-analysis/autodispose-error-prone/src/main/java/com/uber/autodispose/errorprone/AbstractReturnValueIgnored.java#L262-L293
openengsb/openengsb
components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/performer/TransformationPerformer.java
TransformationPerformer.getObjectValue
private Object getObjectValue(String fieldname, boolean fromSource) throws Exception { Object sourceObject = fromSource ? source : target; Object result = null; for (String part : StringUtils.split(fieldname, ".")) { if (isTemporaryField(part)) { result = loadObjectFr...
java
private Object getObjectValue(String fieldname, boolean fromSource) throws Exception { Object sourceObject = fromSource ? source : target; Object result = null; for (String part : StringUtils.split(fieldname, ".")) { if (isTemporaryField(part)) { result = loadObjectFr...
[ "private", "Object", "getObjectValue", "(", "String", "fieldname", ",", "boolean", "fromSource", ")", "throws", "Exception", "{", "Object", "sourceObject", "=", "fromSource", "?", "source", ":", "target", ";", "Object", "result", "=", "null", ";", "for", "(", ...
Gets the value of the field with the field name either from the source object or the target object, depending on the parameters. Is also aware of temporary fields.
[ "Gets", "the", "value", "of", "the", "field", "with", "the", "field", "name", "either", "from", "the", "source", "object", "or", "the", "target", "object", "depending", "on", "the", "parameters", ".", "Is", "also", "aware", "of", "temporary", "fields", "."...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/transformation-wonderland/src/main/java/org/openengsb/core/ekb/transformation/wonderland/internal/performer/TransformationPerformer.java#L166-L177
alkacon/opencms-core
src/org/opencms/ui/apps/modules/CmsModuleInfoDialog.java
CmsModuleInfoDialog.formatResourceType
@SuppressWarnings("deprecation") CmsResourceInfo formatResourceType(I_CmsResourceType type) { CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(type.getTypeName()); Resource icon; String title; String subtitle; if (settings != null) { ...
java
@SuppressWarnings("deprecation") CmsResourceInfo formatResourceType(I_CmsResourceType type) { CmsExplorerTypeSettings settings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(type.getTypeName()); Resource icon; String title; String subtitle; if (settings != null) { ...
[ "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "CmsResourceInfo", "formatResourceType", "(", "I_CmsResourceType", "type", ")", "{", "CmsExplorerTypeSettings", "settings", "=", "OpenCms", ".", "getWorkplaceManager", "(", ")", ".", "getExplorerTypeSetting", "(", "t...
Creates the resource info box for a resource type.<p> @param type the resource type @return the resource info box
[ "Creates", "the", "resource", "info", "box", "for", "a", "resource", "type", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/modules/CmsModuleInfoDialog.java#L172-L199
phax/ph-pdf-layout
src/main/java/com/helger/pdflayout4/pdfbox/PDPageContentStreamExt.java
PDPageContentStreamExt.setLineDashPattern
public void setLineDashPattern (final float [] pattern, final float phase) throws IOException { if (inTextMode) { throw new IllegalStateException ("Error: setLineDashPattern is not allowed within a text block."); } write ((byte) '['); for (final float value : pattern) { writeOperan...
java
public void setLineDashPattern (final float [] pattern, final float phase) throws IOException { if (inTextMode) { throw new IllegalStateException ("Error: setLineDashPattern is not allowed within a text block."); } write ((byte) '['); for (final float value : pattern) { writeOperan...
[ "public", "void", "setLineDashPattern", "(", "final", "float", "[", "]", "pattern", ",", "final", "float", "phase", ")", "throws", "IOException", "{", "if", "(", "inTextMode", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Error: setLineDashPattern is ...
Set the line dash pattern. @param pattern The pattern array @param phase The phase of the pattern @throws IOException If the content stream could not be written. @throws IllegalStateException If the method was called within a text block.
[ "Set", "the", "line", "dash", "pattern", "." ]
train
https://github.com/phax/ph-pdf-layout/blob/777d9f3a131cbe8f592c0de1cf554084e541bb54/src/main/java/com/helger/pdflayout4/pdfbox/PDPageContentStreamExt.java#L1494-L1508
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/slider/SliderRenderer.java
SliderRenderer.decode
@Override public void decode(FacesContext context, UIComponent component) { Slider slider = (Slider) component; if (slider.isDisabled() || slider.isReadonly()) { return; } decodeBehaviors(context, slider); String clientId = slider.getClientId(context); String submittedValue = (String) context.getExte...
java
@Override public void decode(FacesContext context, UIComponent component) { Slider slider = (Slider) component; if (slider.isDisabled() || slider.isReadonly()) { return; } decodeBehaviors(context, slider); String clientId = slider.getClientId(context); String submittedValue = (String) context.getExte...
[ "@", "Override", "public", "void", "decode", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "{", "Slider", "slider", "=", "(", "Slider", ")", "component", ";", "if", "(", "slider", ".", "isDisabled", "(", ")", "||", "slider", ".", ...
This methods receives and processes input made by the user. More specifically, it ckecks whether the user has interacted with the current b:slider. The default implementation simply stores the input value in the list of submitted values. If the validation checks are passed, the values in the <code>submittedValues</code...
[ "This", "methods", "receives", "and", "processes", "input", "made", "by", "the", "user", ".", "More", "specifically", "it", "ckecks", "whether", "the", "user", "has", "interacted", "with", "the", "current", "b", ":", "slider", ".", "The", "default", "impleme...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/slider/SliderRenderer.java#L52-L69
citrusframework/citrus
modules/citrus-jms/src/main/java/com/consol/citrus/jms/actions/PurgeJmsQueuesAction.java
PurgeJmsQueuesAction.getDestination
private Destination getDestination(Session session, String queueName) throws JMSException { return new DynamicDestinationResolver().resolveDestinationName(session, queueName, false); }
java
private Destination getDestination(Session session, String queueName) throws JMSException { return new DynamicDestinationResolver().resolveDestinationName(session, queueName, false); }
[ "private", "Destination", "getDestination", "(", "Session", "session", ",", "String", "queueName", ")", "throws", "JMSException", "{", "return", "new", "DynamicDestinationResolver", "(", ")", ".", "resolveDestinationName", "(", "session", ",", "queueName", ",", "fal...
Resolves destination by given name. @param session @param queueName @return @throws JMSException
[ "Resolves", "destination", "by", "given", "name", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/actions/PurgeJmsQueuesAction.java#L167-L169
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.relativeCubicTo
public SVGPath relativeCubicTo(double[] c1xy, double[] c2xy, double[] xy) { return append(PATH_CUBIC_TO_RELATIVE).append(c1xy[0]).append(c1xy[1]).append(c2xy[0]).append(c2xy[1]).append(xy[0]).append(xy[1]); }
java
public SVGPath relativeCubicTo(double[] c1xy, double[] c2xy, double[] xy) { return append(PATH_CUBIC_TO_RELATIVE).append(c1xy[0]).append(c1xy[1]).append(c2xy[0]).append(c2xy[1]).append(xy[0]).append(xy[1]); }
[ "public", "SVGPath", "relativeCubicTo", "(", "double", "[", "]", "c1xy", ",", "double", "[", "]", "c2xy", ",", "double", "[", "]", "xy", ")", "{", "return", "append", "(", "PATH_CUBIC_TO_RELATIVE", ")", ".", "append", "(", "c1xy", "[", "0", "]", ")", ...
Cubic Bezier line to the given relative coordinates. @param c1xy first control point @param c2xy second control point @param xy new coordinates @return path object, for compact syntax.
[ "Cubic", "Bezier", "line", "to", "the", "given", "relative", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L396-L398
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/query/dsl/functions/ConditionalFunctions.java
ConditionalFunctions.nullIf
public static Expression nullIf(Expression expression1, Expression expression2) { return x("NULLIF(" + expression1.toString() + ", " + expression2.toString() + ")"); }
java
public static Expression nullIf(Expression expression1, Expression expression2) { return x("NULLIF(" + expression1.toString() + ", " + expression2.toString() + ")"); }
[ "public", "static", "Expression", "nullIf", "(", "Expression", "expression1", ",", "Expression", "expression2", ")", "{", "return", "x", "(", "\"NULLIF(\"", "+", "expression1", ".", "toString", "(", ")", "+", "\", \"", "+", "expression2", ".", "toString", "(",...
Returned expression results in NULL if expression1 = expression2, otherwise returns expression1. Returns MISSING or NULL if either input is MISSING or NULL..
[ "Returned", "expression", "results", "in", "NULL", "if", "expression1", "=", "expression2", "otherwise", "returns", "expression1", ".", "Returns", "MISSING", "or", "NULL", "if", "either", "input", "is", "MISSING", "or", "NULL", ".." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/query/dsl/functions/ConditionalFunctions.java#L91-L93
netty/netty
transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java
AbstractEpollStreamChannel.doWriteSingle
protected int doWriteSingle(ChannelOutboundBuffer in) throws Exception { // The outbound buffer contains only one message or it contains a file region. Object msg = in.current(); if (msg instanceof ByteBuf) { return writeBytes(in, (ByteBuf) msg); } else if (msg instanceof Def...
java
protected int doWriteSingle(ChannelOutboundBuffer in) throws Exception { // The outbound buffer contains only one message or it contains a file region. Object msg = in.current(); if (msg instanceof ByteBuf) { return writeBytes(in, (ByteBuf) msg); } else if (msg instanceof Def...
[ "protected", "int", "doWriteSingle", "(", "ChannelOutboundBuffer", "in", ")", "throws", "Exception", "{", "// The outbound buffer contains only one message or it contains a file region.", "Object", "msg", "=", "in", ".", "current", "(", ")", ";", "if", "(", "msg", "inst...
Attempt to write a single object. @param in the collection which contains objects to write. @return The value that should be decremented from the write quantum which starts at {@link ChannelConfig#getWriteSpinCount()}. The typical use cases are as follows: <ul> <li>0 - if no write was attempted. This is appropriate if ...
[ "Attempt", "to", "write", "a", "single", "object", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java#L476-L495
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ObjectGraphDump.java
ObjectGraphDump.readField
private Object readField(final Field field, final Object obj) { try { return field.get(obj); } catch (IllegalAccessException e) { // Should not happen as we've called Field.setAccessible(true). LOG.error("Failed to read " + field.getName() + " of " + obj.getClass().getName(), e); } return null; }
java
private Object readField(final Field field, final Object obj) { try { return field.get(obj); } catch (IllegalAccessException e) { // Should not happen as we've called Field.setAccessible(true). LOG.error("Failed to read " + field.getName() + " of " + obj.getClass().getName(), e); } return null; }
[ "private", "Object", "readField", "(", "final", "Field", "field", ",", "final", "Object", "obj", ")", "{", "try", "{", "return", "field", ".", "get", "(", "obj", ")", ";", "}", "catch", "(", "IllegalAccessException", "e", ")", "{", "// Should not happen as...
Reads the contents of a field. @param field the field definition. @param obj the object to read the value from. @return the value of the field in the given object.
[ "Reads", "the", "contents", "of", "a", "field", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/ObjectGraphDump.java#L189-L198
google/closure-compiler
src/com/google/javascript/jscomp/TypeCheck.java
TypeCheck.visitAssign
private void visitAssign(NodeTraversal t, Node assign) { JSDocInfo info = assign.getJSDocInfo(); Node lvalue = assign.getFirstChild(); Node rvalue = assign.getLastChild(); JSType rightType = getJSType(rvalue); checkCanAssignToWithScope(t, assign, lvalue, rightType, info, "assignment"); ensureTy...
java
private void visitAssign(NodeTraversal t, Node assign) { JSDocInfo info = assign.getJSDocInfo(); Node lvalue = assign.getFirstChild(); Node rvalue = assign.getLastChild(); JSType rightType = getJSType(rvalue); checkCanAssignToWithScope(t, assign, lvalue, rightType, info, "assignment"); ensureTy...
[ "private", "void", "visitAssign", "(", "NodeTraversal", "t", ",", "Node", "assign", ")", "{", "JSDocInfo", "info", "=", "assign", ".", "getJSDocInfo", "(", ")", ";", "Node", "lvalue", "=", "assign", ".", "getFirstChild", "(", ")", ";", "Node", "rvalue", ...
Visits an assignment <code>lvalue = rvalue</code>. If the <code>lvalue</code> is a prototype modification, we change the schema of the object type it is referring to. @param t the traversal @param assign the assign node (<code>assign.isAssign()</code> is an implicit invariant)
[ "Visits", "an", "assignment", "<code", ">", "lvalue", "=", "rvalue<", "/", "code", ">", ".", "If", "the", "<code", ">", "lvalue<", "/", "code", ">", "is", "a", "prototype", "modification", "we", "change", "the", "schema", "of", "the", "object", "type", ...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeCheck.java#L1095-L1103
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.getEntityRolesAsync
public Observable<List<EntityRole>> getEntityRolesAsync(UUID appId, String versionId, UUID entityId) { return getEntityRolesWithServiceResponseAsync(appId, versionId, entityId).map(new Func1<ServiceResponse<List<EntityRole>>, List<EntityRole>>() { @Override public List<EntityRole> call(S...
java
public Observable<List<EntityRole>> getEntityRolesAsync(UUID appId, String versionId, UUID entityId) { return getEntityRolesWithServiceResponseAsync(appId, versionId, entityId).map(new Func1<ServiceResponse<List<EntityRole>>, List<EntityRole>>() { @Override public List<EntityRole> call(S...
[ "public", "Observable", "<", "List", "<", "EntityRole", ">", ">", "getEntityRolesAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ")", "{", "return", "getEntityRolesWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", ...
Get All Entity Roles for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId entity Id @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;EntityRole&gt; object
[ "Get", "All", "Entity", "Roles", "for", "a", "given", "entity", "." ]
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#L7686-L7693
damianszczepanik/cucumber-reporting
src/main/java/net/masterthought/cucumber/ReportBuilder.java
ReportBuilder.generateReports
public Reportable generateReports() { Trends trends = null; try { // first copy static resources so ErrorPage is displayed properly copyStaticResources(); // create directory for embeddings before files are generated createEmbeddingsDirectory(); ...
java
public Reportable generateReports() { Trends trends = null; try { // first copy static resources so ErrorPage is displayed properly copyStaticResources(); // create directory for embeddings before files are generated createEmbeddingsDirectory(); ...
[ "public", "Reportable", "generateReports", "(", ")", "{", "Trends", "trends", "=", "null", ";", "try", "{", "// first copy static resources so ErrorPage is displayed properly", "copyStaticResources", "(", ")", ";", "// create directory for embeddings before files are generated", ...
Parses provided files and generates the report. When generating process fails report with information about error is provided. @return stats for the generated report
[ "Parses", "provided", "files", "and", "generates", "the", "report", ".", "When", "generating", "process", "fails", "report", "with", "information", "about", "error", "is", "provided", "." ]
train
https://github.com/damianszczepanik/cucumber-reporting/blob/9ffe0d4a9c0aec161b0988a930a8312ba36dc742/src/main/java/net/masterthought/cucumber/ReportBuilder.java#L74-L117
openbase/jul
communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java
AbstractRemoteClient.addHandler
public void addHandler(final Handler handler, final boolean wait) throws InterruptedException, CouldNotPerformException { try { listener.addHandler(handler, wait); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not register Handler!", ex); ...
java
public void addHandler(final Handler handler, final boolean wait) throws InterruptedException, CouldNotPerformException { try { listener.addHandler(handler, wait); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not register Handler!", ex); ...
[ "public", "void", "addHandler", "(", "final", "Handler", "handler", ",", "final", "boolean", "wait", ")", "throws", "InterruptedException", ",", "CouldNotPerformException", "{", "try", "{", "listener", ".", "addHandler", "(", "handler", ",", "wait", ")", ";", ...
Method adds an handler to the internal rsb listener. @param handler @param wait @throws InterruptedException @throws CouldNotPerformException
[ "Method", "adds", "an", "handler", "to", "the", "internal", "rsb", "listener", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/communication/controller/src/main/java/org/openbase/jul/communication/controller/AbstractRemoteClient.java#L358-L364
wuman/orientdb-android
core/src/main/java/com/orientechnologies/orient/core/security/OSecurityManager.java
OSecurityManager.digest2String
public String digest2String(final String iInput, final boolean iIncludeAlgorithm) { final StringBuilder buffer = new StringBuilder(); if (iIncludeAlgorithm) buffer.append(ALGORITHM_PREFIX); buffer.append(OSecurityManager.instance().digest2String(iInput)); return buffer.toString(); }
java
public String digest2String(final String iInput, final boolean iIncludeAlgorithm) { final StringBuilder buffer = new StringBuilder(); if (iIncludeAlgorithm) buffer.append(ALGORITHM_PREFIX); buffer.append(OSecurityManager.instance().digest2String(iInput)); return buffer.toString(); }
[ "public", "String", "digest2String", "(", "final", "String", "iInput", ",", "final", "boolean", "iIncludeAlgorithm", ")", "{", "final", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "iIncludeAlgorithm", ")", "buffer", ".", "...
Hashes the input string. @param iInput String to hash @param iIncludeAlgorithm Include the algorithm used or not @return
[ "Hashes", "the", "input", "string", "." ]
train
https://github.com/wuman/orientdb-android/blob/ff9b17e4349f26168b2d0c4facb1a18cbfbe8cf0/core/src/main/java/com/orientechnologies/orient/core/security/OSecurityManager.java#L77-L85
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/resourceIndex/ResourceIndexImpl.java
ResourceIndexImpl.updateTriples
private void updateTriples(Set<Triple> set, boolean delete) throws ResourceIndexException { try { if (delete) { _writer.delete(getTripleIterator(set), _syncUpdates); } else { _writer.add(getTripleIterator(set), _syncUpdates); } ...
java
private void updateTriples(Set<Triple> set, boolean delete) throws ResourceIndexException { try { if (delete) { _writer.delete(getTripleIterator(set), _syncUpdates); } else { _writer.add(getTripleIterator(set), _syncUpdates); } ...
[ "private", "void", "updateTriples", "(", "Set", "<", "Triple", ">", "set", ",", "boolean", "delete", ")", "throws", "ResourceIndexException", "{", "try", "{", "if", "(", "delete", ")", "{", "_writer", ".", "delete", "(", "getTripleIterator", "(", "set", ")...
Applies the given adds or deletes to the triplestore. If _syncUpdates is true, changes will be flushed before returning.
[ "Applies", "the", "given", "adds", "or", "deletes", "to", "the", "triplestore", ".", "If", "_syncUpdates", "is", "true", "changes", "will", "be", "flushed", "before", "returning", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/resourceIndex/ResourceIndexImpl.java#L159-L170
netty/netty
common/src/main/java/io/netty/util/concurrent/DefaultPromise.java
DefaultPromise.notifyProgressiveListeners
@SuppressWarnings("unchecked") void notifyProgressiveListeners(final long progress, final long total) { final Object listeners = progressiveListeners(); if (listeners == null) { return; } final ProgressiveFuture<V> self = (ProgressiveFuture<V>) this; EventExecut...
java
@SuppressWarnings("unchecked") void notifyProgressiveListeners(final long progress, final long total) { final Object listeners = progressiveListeners(); if (listeners == null) { return; } final ProgressiveFuture<V> self = (ProgressiveFuture<V>) this; EventExecut...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "void", "notifyProgressiveListeners", "(", "final", "long", "progress", ",", "final", "long", "total", ")", "{", "final", "Object", "listeners", "=", "progressiveListeners", "(", ")", ";", "if", "(", "listeners...
Notify all progressive listeners. <p> No attempt is made to ensure notification order if multiple calls are made to this method before the original invocation completes. <p> This will do an iteration over all listeners to get all of type {@link GenericProgressiveFutureListener}s. @param progress the new progress. @para...
[ "Notify", "all", "progressive", "listeners", ".", "<p", ">", "No", "attempt", "is", "made", "to", "ensure", "notification", "order", "if", "multiple", "calls", "are", "made", "to", "this", "method", "before", "the", "original", "invocation", "completes", ".", ...
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/concurrent/DefaultPromise.java#L641-L680
huangp/entityunit
src/main/java/com/github/huangp/entityunit/maker/PreferredValueMakersRegistry.java
PreferredValueMakersRegistry.addConstructorParameterMaker
public PreferredValueMakersRegistry addConstructorParameterMaker(Class ownerType, int argIndex, Maker<?> maker) { Preconditions.checkNotNull(ownerType); Preconditions.checkArgument(argIndex >= 0); makers.put(Matchers.equalTo(String.format(Settable.FULL_NAME_FORMAT, ownerType.getName(), "arg" + a...
java
public PreferredValueMakersRegistry addConstructorParameterMaker(Class ownerType, int argIndex, Maker<?> maker) { Preconditions.checkNotNull(ownerType); Preconditions.checkArgument(argIndex >= 0); makers.put(Matchers.equalTo(String.format(Settable.FULL_NAME_FORMAT, ownerType.getName(), "arg" + a...
[ "public", "PreferredValueMakersRegistry", "addConstructorParameterMaker", "(", "Class", "ownerType", ",", "int", "argIndex", ",", "Maker", "<", "?", ">", "maker", ")", "{", "Preconditions", ".", "checkNotNull", "(", "ownerType", ")", ";", "Preconditions", ".", "ch...
Add a constructor parameter maker to a class type. i.e. with: <pre> {@code Class Person { Person(String name, int age) } } </pre> You could define a custom maker for name as (Person.class, 0, myNameMaker) @param ownerType the class that owns the field. @param argIndex constructor parameter index (0 based) @param make...
[ "Add", "a", "constructor", "parameter", "maker", "to", "a", "class", "type", ".", "i", ".", "e", ".", "with", ":", "<pre", ">", "{", "@code" ]
train
https://github.com/huangp/entityunit/blob/1a09b530149d707dbff7ff46f5428d9db709a4b4/src/main/java/com/github/huangp/entityunit/maker/PreferredValueMakersRegistry.java#L102-L107
jtrfp/javamod
src/main/java/de/quippy/mp3/decoder/Bitstream.java
Bitstream.readFully
private int readFully(byte[] b, int offs, int len) throws BitstreamException { int nRead = 0; try { while (len > 0) { int bytesread = source.read(b, offs, len); if (bytesread == -1) { while (len-->0) { b[offs++] = 0; } break; //throw newBitstreamException(UNEX...
java
private int readFully(byte[] b, int offs, int len) throws BitstreamException { int nRead = 0; try { while (len > 0) { int bytesread = source.read(b, offs, len); if (bytesread == -1) { while (len-->0) { b[offs++] = 0; } break; //throw newBitstreamException(UNEX...
[ "private", "int", "readFully", "(", "byte", "[", "]", "b", ",", "int", "offs", ",", "int", "len", ")", "throws", "BitstreamException", "{", "int", "nRead", "=", "0", ";", "try", "{", "while", "(", "len", ">", "0", ")", "{", "int", "bytesread", "=",...
Reads the exact number of bytes from the source input stream into a byte array. @param b The byte array to read the specified number of bytes into. @param offs The index in the array where the first byte read should be stored. @param len the number of bytes to read. @exception BitstreamException is thrown if the spe...
[ "Reads", "the", "exact", "number", "of", "bytes", "from", "the", "source", "input", "stream", "into", "a", "byte", "array", "." ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/mp3/decoder/Bitstream.java#L604-L632
tommyettinger/RegExodus
src/main/java/regexodus/Replacer.java
Replacer.makeTable
public static Replacer makeTable(Map<String, String> dict) { if(dict == null || dict.isEmpty()) return new Replacer(Pattern.compile("$"), new DummySubstitution("")); TableSubstitution tab = new TableSubstitution(new LinkedHashMap<String, String>(dict)); StringBuilder sb = new Str...
java
public static Replacer makeTable(Map<String, String> dict) { if(dict == null || dict.isEmpty()) return new Replacer(Pattern.compile("$"), new DummySubstitution("")); TableSubstitution tab = new TableSubstitution(new LinkedHashMap<String, String>(dict)); StringBuilder sb = new Str...
[ "public", "static", "Replacer", "makeTable", "(", "Map", "<", "String", ",", "String", ">", "dict", ")", "{", "if", "(", "dict", "==", "null", "||", "dict", ".", "isEmpty", "(", ")", ")", "return", "new", "Replacer", "(", "Pattern", ".", "compile", "...
Makes a Replacer that replaces a literal String key in dict with the corresponding String value in dict. Doesn't need escapes in the Strings it searches for (at index 0, 2, 4, etc.), but cannot search for the exact two characters in immediate succession, backslash then capital E, because it finds literal Strings using ...
[ "Makes", "a", "Replacer", "that", "replaces", "a", "literal", "String", "key", "in", "dict", "with", "the", "corresponding", "String", "value", "in", "dict", ".", "Doesn", "t", "need", "escapes", "in", "the", "Strings", "it", "searches", "for", "(", "at", ...
train
https://github.com/tommyettinger/RegExodus/blob/d4af9bb7c132c5f9d29f45b76121f93b2f89de16/src/main/java/regexodus/Replacer.java#L433-L449
lamarios/sherdog-parser
src/main/java/com/ftpix/sherdogparser/parsers/ParserUtils.java
ParserUtils.getDateFromStringToZoneId
static ZonedDateTime getDateFromStringToZoneId(String date, ZoneId zoneId) throws DateTimeParseException { ZonedDateTime usDate = ZonedDateTime.parse(date).withZoneSameInstant(ZoneId.of(Constants.SHERDOG_TIME_ZONE)); return usDate.withZoneSameInstant(zoneId); }
java
static ZonedDateTime getDateFromStringToZoneId(String date, ZoneId zoneId) throws DateTimeParseException { ZonedDateTime usDate = ZonedDateTime.parse(date).withZoneSameInstant(ZoneId.of(Constants.SHERDOG_TIME_ZONE)); return usDate.withZoneSameInstant(zoneId); }
[ "static", "ZonedDateTime", "getDateFromStringToZoneId", "(", "String", "date", ",", "ZoneId", "zoneId", ")", "throws", "DateTimeParseException", "{", "ZonedDateTime", "usDate", "=", "ZonedDateTime", ".", "parse", "(", "date", ")", ".", "withZoneSameInstant", "(", "Z...
Converts a String to the given timezone. @param date Date to format @param zoneId Zone id to convert from sherdog's time @return the converted zonedatetime
[ "Converts", "a", "String", "to", "the", "given", "timezone", "." ]
train
https://github.com/lamarios/sherdog-parser/blob/7cdb36280317caeaaa54db77c04dc4b4e1db053e/src/main/java/com/ftpix/sherdogparser/parsers/ParserUtils.java#L77-L80
alkacon/opencms-core
src/org/opencms/ui/components/CmsErrorDialog.java
CmsErrorDialog.showErrorDialog
public static void showErrorDialog(String message, Throwable t, Runnable onClose) { Window window = prepareWindow(DialogWidth.wide); window.setCaption(Messages.get().getBundle(A_CmsUI.get().getLocale()).key(Messages.GUI_ERROR_0)); window.setContent(new CmsErrorDialog(message, t, onClose, window...
java
public static void showErrorDialog(String message, Throwable t, Runnable onClose) { Window window = prepareWindow(DialogWidth.wide); window.setCaption(Messages.get().getBundle(A_CmsUI.get().getLocale()).key(Messages.GUI_ERROR_0)); window.setContent(new CmsErrorDialog(message, t, onClose, window...
[ "public", "static", "void", "showErrorDialog", "(", "String", "message", ",", "Throwable", "t", ",", "Runnable", "onClose", ")", "{", "Window", "window", "=", "prepareWindow", "(", "DialogWidth", ".", "wide", ")", ";", "window", ".", "setCaption", "(", "Mess...
Shows the error dialog.<p> @param message the error message @param t the error to be displayed @param onClose executed on close
[ "Shows", "the", "error", "dialog", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/components/CmsErrorDialog.java#L167-L173
jenetics/jenetics
jenetics/src/main/java/io/jenetics/internal/util/require.java
require.nonNegative
public static double nonNegative(final double value, final String message) { if (value < 0) { throw new IllegalArgumentException(format( "%s must not be negative: %f.", message, value )); } return value; }
java
public static double nonNegative(final double value, final String message) { if (value < 0) { throw new IllegalArgumentException(format( "%s must not be negative: %f.", message, value )); } return value; }
[ "public", "static", "double", "nonNegative", "(", "final", "double", "value", ",", "final", "String", "message", ")", "{", "if", "(", "value", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "format", "(", "\"%s must not be negative: %f.\"",...
Check if the specified value is not negative. @param value the value to check. @param message the exception message. @return the given value. @throws IllegalArgumentException if {@code value < 0}.
[ "Check", "if", "the", "specified", "value", "is", "not", "negative", "." ]
train
https://github.com/jenetics/jenetics/blob/ee516770c65ef529b27deb283f071c85f344eff4/jenetics/src/main/java/io/jenetics/internal/util/require.java#L42-L49
Bandwidth/java-bandwidth
src/main/java/com/bandwidth/sdk/BandwidthClient.java
BandwidthClient.generatePostRequest
protected HttpPost generatePostRequest(final String path, final String param) { final HttpPost post = new HttpPost(buildUri(path)); post.setEntity(new StringEntity(param, ContentType.APPLICATION_JSON)); return post; }
java
protected HttpPost generatePostRequest(final String path, final String param) { final HttpPost post = new HttpPost(buildUri(path)); post.setEntity(new StringEntity(param, ContentType.APPLICATION_JSON)); return post; }
[ "protected", "HttpPost", "generatePostRequest", "(", "final", "String", "path", ",", "final", "String", "param", ")", "{", "final", "HttpPost", "post", "=", "new", "HttpPost", "(", "buildUri", "(", "path", ")", ")", ";", "post", ".", "setEntity", "(", "new...
Helper method to build the POST request for the server. @param path the path. @param param json string. @return the post object.
[ "Helper", "method", "to", "build", "the", "POST", "request", "for", "the", "server", "." ]
train
https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/BandwidthClient.java#L639-L643
grpc/grpc-java
netty/src/main/java/io/grpc/netty/NettyServerBuilder.java
NettyServerBuilder.permitKeepAliveTime
public NettyServerBuilder permitKeepAliveTime(long keepAliveTime, TimeUnit timeUnit) { checkArgument(keepAliveTime >= 0, "permit keepalive time must be non-negative"); permitKeepAliveTimeInNanos = timeUnit.toNanos(keepAliveTime); return this; }
java
public NettyServerBuilder permitKeepAliveTime(long keepAliveTime, TimeUnit timeUnit) { checkArgument(keepAliveTime >= 0, "permit keepalive time must be non-negative"); permitKeepAliveTimeInNanos = timeUnit.toNanos(keepAliveTime); return this; }
[ "public", "NettyServerBuilder", "permitKeepAliveTime", "(", "long", "keepAliveTime", ",", "TimeUnit", "timeUnit", ")", "{", "checkArgument", "(", "keepAliveTime", ">=", "0", ",", "\"permit keepalive time must be non-negative\"", ")", ";", "permitKeepAliveTimeInNanos", "=", ...
Specify the most aggressive keep-alive time clients are permitted to configure. The server will try to detect clients exceeding this rate and when detected will forcefully close the connection. The default is 5 minutes. <p>Even though a default is defined that allows some keep-alives, clients must not use keep-alive w...
[ "Specify", "the", "most", "aggressive", "keep", "-", "alive", "time", "clients", "are", "permitted", "to", "configure", ".", "The", "server", "will", "try", "to", "detect", "clients", "exceeding", "this", "rate", "and", "when", "detected", "will", "forcefully"...
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/netty/src/main/java/io/grpc/netty/NettyServerBuilder.java#L477-L481
shinesolutions/swagger-aem
java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java
SlingApi.postTruststoreAsync
public com.squareup.okhttp.Call postTruststoreAsync(String operation, String newPassword, String rePassword, String keyStoreType, String removeAlias, File certificate, final ApiCallback<String> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressReques...
java
public com.squareup.okhttp.Call postTruststoreAsync(String operation, String newPassword, String rePassword, String keyStoreType, String removeAlias, File certificate, final ApiCallback<String> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressReques...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "postTruststoreAsync", "(", "String", "operation", ",", "String", "newPassword", ",", "String", "rePassword", ",", "String", "keyStoreType", ",", "String", "removeAlias", ",", "File", "certificate", "...
(asynchronously) @param operation (optional) @param newPassword (optional) @param rePassword (optional) @param keyStoreType (optional) @param removeAlias (optional) @param certificate (optional) @param callback The callback to be executed when the API call finishes @return The request call @throws ApiException I...
[ "(", "asynchronously", ")" ]
train
https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java#L4495-L4520
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java
BDBRepositoryBuilder.setDatabasePageSize
public void setDatabasePageSize(Integer bytes, Class<? extends Storable> type) { if (mDatabasePageSizes == null) { mDatabasePageSizes = new HashMap<Class<?>, Integer>(); } mDatabasePageSizes.put(type, bytes); }
java
public void setDatabasePageSize(Integer bytes, Class<? extends Storable> type) { if (mDatabasePageSizes == null) { mDatabasePageSizes = new HashMap<Class<?>, Integer>(); } mDatabasePageSizes.put(type, bytes); }
[ "public", "void", "setDatabasePageSize", "(", "Integer", "bytes", ",", "Class", "<", "?", "extends", "Storable", ">", "type", ")", "{", "if", "(", "mDatabasePageSizes", "==", "null", ")", "{", "mDatabasePageSizes", "=", "new", "HashMap", "<", "Class", "<", ...
Sets the desired page size for a given type. If not specified, the page size applies to all types.
[ "Sets", "the", "desired", "page", "size", "for", "a", "given", "type", ".", "If", "not", "specified", "the", "page", "size", "applies", "to", "all", "types", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java#L713-L718
Hygieia/Hygieia
collectors/audit/nfrr/src/main/java/com/capitalone/dashboard/collector/AuditCollectorUtil.java
AuditCollectorUtil.doBasicAuditCheck
private static Audit doBasicAuditCheck(JSONArray jsonArray, JSONArray global, AuditType auditType) { Audit audit = new Audit(); audit.setType(auditType); if (!isConfigured(auditType, global)) { audit.setDataStatus(DataStatus.NOT_CONFIGURED); audit.setAuditStatus(AuditStat...
java
private static Audit doBasicAuditCheck(JSONArray jsonArray, JSONArray global, AuditType auditType) { Audit audit = new Audit(); audit.setType(auditType); if (!isConfigured(auditType, global)) { audit.setDataStatus(DataStatus.NOT_CONFIGURED); audit.setAuditStatus(AuditStat...
[ "private", "static", "Audit", "doBasicAuditCheck", "(", "JSONArray", "jsonArray", ",", "JSONArray", "global", ",", "AuditType", "auditType", ")", "{", "Audit", "audit", "=", "new", "Audit", "(", ")", ";", "audit", ".", "setType", "(", "auditType", ")", ";", ...
Do basic audit check - configuration, collector error, no data
[ "Do", "basic", "audit", "check", "-", "configuration", "collector", "error", "no", "data" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/audit/nfrr/src/main/java/com/capitalone/dashboard/collector/AuditCollectorUtil.java#L138-L157
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuEventElapsedTime
public static int cuEventElapsedTime(float pMilliseconds[], CUevent hStart, CUevent hEnd) { return checkResult(cuEventElapsedTimeNative(pMilliseconds, hStart, hEnd)); }
java
public static int cuEventElapsedTime(float pMilliseconds[], CUevent hStart, CUevent hEnd) { return checkResult(cuEventElapsedTimeNative(pMilliseconds, hStart, hEnd)); }
[ "public", "static", "int", "cuEventElapsedTime", "(", "float", "pMilliseconds", "[", "]", ",", "CUevent", "hStart", ",", "CUevent", "hEnd", ")", "{", "return", "checkResult", "(", "cuEventElapsedTimeNative", "(", "pMilliseconds", ",", "hStart", ",", "hEnd", ")",...
Computes the elapsed time between two events. <pre> CUresult cuEventElapsedTime ( float* pMilliseconds, CUevent hStart, CUevent hEnd ) </pre> <div> <p>Computes the elapsed time between two events. Computes the elapsed time between two events (in milliseconds with a resolution of around 0.5 microseconds). </p> <p>If e...
[ "Computes", "the", "elapsed", "time", "between", "two", "events", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L13657-L13660
Red5/red5-io
src/main/java/org/red5/io/matroska/VINT.java
VINT.fromValue
public static VINT fromValue(long value) { BitSet bs = BitSet.valueOf(new long[] { value }); byte length = (byte) (1 + bs.length() / BIT_IN_BYTE); if (bs.length() == length * BIT_IN_BYTE) { length++; } bs.set(length * BIT_IN_BYTE - length); long binary = bs.to...
java
public static VINT fromValue(long value) { BitSet bs = BitSet.valueOf(new long[] { value }); byte length = (byte) (1 + bs.length() / BIT_IN_BYTE); if (bs.length() == length * BIT_IN_BYTE) { length++; } bs.set(length * BIT_IN_BYTE - length); long binary = bs.to...
[ "public", "static", "VINT", "fromValue", "(", "long", "value", ")", "{", "BitSet", "bs", "=", "BitSet", ".", "valueOf", "(", "new", "long", "[", "]", "{", "value", "}", ")", ";", "byte", "length", "=", "(", "byte", ")", "(", "1", "+", "bs", ".", ...
method to construct {@link VINT} based on its value @param value - value of {@link VINT} @return {@link VINT} corresponding to this value
[ "method", "to", "construct", "{", "@link", "VINT", "}", "based", "on", "its", "value" ]
train
https://github.com/Red5/red5-io/blob/9bbbc506423c5a8f18169d46d400df56c0072a33/src/main/java/org/red5/io/matroska/VINT.java#L144-L153
lightbend/config
config/src/main/java/com/typesafe/config/ConfigRenderOptions.java
ConfigRenderOptions.setJson
public ConfigRenderOptions setJson(boolean value) { if (value == json) return this; else return new ConfigRenderOptions(originComments, comments, formatted, value); }
java
public ConfigRenderOptions setJson(boolean value) { if (value == json) return this; else return new ConfigRenderOptions(originComments, comments, formatted, value); }
[ "public", "ConfigRenderOptions", "setJson", "(", "boolean", "value", ")", "{", "if", "(", "value", "==", "json", ")", "return", "this", ";", "else", "return", "new", "ConfigRenderOptions", "(", "originComments", ",", "comments", ",", "formatted", ",", "value",...
Returns options with JSON toggled. JSON means that HOCON extensions (omitting commas, quotes for example) won't be used. However, whether to use comments is controlled by the separate {@link #setComments(boolean)} and {@link #setOriginComments(boolean)} options. So if you enable comments you will get invalid JSON despi...
[ "Returns", "options", "with", "JSON", "toggled", ".", "JSON", "means", "that", "HOCON", "extensions", "(", "omitting", "commas", "quotes", "for", "example", ")", "won", "t", "be", "used", ".", "However", "whether", "to", "use", "comments", "is", "controlled"...
train
https://github.com/lightbend/config/blob/68cebfde5e861e9a5fdc75ceff366ed95e17d475/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L149-L154
Nexmo/nexmo-java
src/main/java/com/nexmo/client/sms/SmsClient.java
SmsClient.searchRejectedMessages
public SearchRejectedMessagesResponse searchRejectedMessages(Date date, String to) throws IOException, NexmoClientException { return this.searchRejectedMessages(new SearchRejectedMessagesRequest(date, to)); }
java
public SearchRejectedMessagesResponse searchRejectedMessages(Date date, String to) throws IOException, NexmoClientException { return this.searchRejectedMessages(new SearchRejectedMessagesRequest(date, to)); }
[ "public", "SearchRejectedMessagesResponse", "searchRejectedMessages", "(", "Date", "date", ",", "String", "to", ")", "throws", "IOException", ",", "NexmoClientException", "{", "return", "this", ".", "searchRejectedMessages", "(", "new", "SearchRejectedMessagesRequest", "(...
Search for rejected SMS transactions by date and recipient MSISDN. @param date the date of the rejected SMS message to be looked up @param to the MSISDN number of the SMS recipient @return rejection data matching the provided criteria
[ "Search", "for", "rejected", "SMS", "transactions", "by", "date", "and", "recipient", "MSISDN", "." ]
train
https://github.com/Nexmo/nexmo-java/blob/7427eff6d6baa5a5bd9197fa096bcf2564191cf5/src/main/java/com/nexmo/client/sms/SmsClient.java#L137-L139
vdmeer/skb-java-base
src/main/java/de/vandermeer/skb/base/shell/SkbShellFactory.java
SkbShellFactory.newCommand
public static SkbShellCommand newCommand(String command, SkbShellCommandCategory category, String description, String addedHelp){ return new AbstractShellCommand(command, null, category, description, addedHelp); }
java
public static SkbShellCommand newCommand(String command, SkbShellCommandCategory category, String description, String addedHelp){ return new AbstractShellCommand(command, null, category, description, addedHelp); }
[ "public", "static", "SkbShellCommand", "newCommand", "(", "String", "command", ",", "SkbShellCommandCategory", "category", ",", "String", "description", ",", "String", "addedHelp", ")", "{", "return", "new", "AbstractShellCommand", "(", "command", ",", "null", ",", ...
Returns a new shell command without formal arguments, use the factory to create one. @param command the actual command @param category the command's category, can be null @param description the command's description @param addedHelp additional help, can be null @return new shell command @throws IllegalArgumentException...
[ "Returns", "a", "new", "shell", "command", "without", "formal", "arguments", "use", "the", "factory", "to", "create", "one", "." ]
train
https://github.com/vdmeer/skb-java-base/blob/6d845bcc482aa9344d016e80c0c3455aeae13a13/src/main/java/de/vandermeer/skb/base/shell/SkbShellFactory.java#L140-L142
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java
WorkflowsInner.updateAsync
public Observable<WorkflowInner> updateAsync(String resourceGroupName, String workflowName, WorkflowInner workflow) { return updateWithServiceResponseAsync(resourceGroupName, workflowName, workflow).map(new Func1<ServiceResponse<WorkflowInner>, WorkflowInner>() { @Override public Workflo...
java
public Observable<WorkflowInner> updateAsync(String resourceGroupName, String workflowName, WorkflowInner workflow) { return updateWithServiceResponseAsync(resourceGroupName, workflowName, workflow).map(new Func1<ServiceResponse<WorkflowInner>, WorkflowInner>() { @Override public Workflo...
[ "public", "Observable", "<", "WorkflowInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "workflowName", ",", "WorkflowInner", "workflow", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "workflowName", ",...
Updates a workflow. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param workflow The workflow. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the WorkflowInner object
[ "Updates", "a", "workflow", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowsInner.java#L816-L823
kiegroup/drools
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DecisionServiceCompiler.java
DecisionServiceCompiler.inputQualifiedNamePrefix
private static String inputQualifiedNamePrefix(DMNNode input, DMNModelImpl model) { if (input.getModelNamespace().equals(model.getNamespace())) { return null; } else { Optional<String> importAlias = model.getImportAliasFor(input.getModelNamespace(), input.getModelName()); ...
java
private static String inputQualifiedNamePrefix(DMNNode input, DMNModelImpl model) { if (input.getModelNamespace().equals(model.getNamespace())) { return null; } else { Optional<String> importAlias = model.getImportAliasFor(input.getModelNamespace(), input.getModelName()); ...
[ "private", "static", "String", "inputQualifiedNamePrefix", "(", "DMNNode", "input", ",", "DMNModelImpl", "model", ")", "{", "if", "(", "input", ".", "getModelNamespace", "(", ")", ".", "equals", "(", "model", ".", "getNamespace", "(", ")", ")", ")", "{", "...
DMN v1.2 specification, chapter "10.4 Execution Semantics of Decision Services" The qualified name of an element named E that is defined in the same decision model as S is simply E. Otherwise, the qualified name is I.E, where I is the name of the import element that refers to the model where E is defined.
[ "DMN", "v1", ".", "2", "specification", "chapter", "10", ".", "4", "Execution", "Semantics", "of", "Decision", "Services", "The", "qualified", "name", "of", "an", "element", "named", "E", "that", "is", "defined", "in", "the", "same", "decision", "model", "...
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DecisionServiceCompiler.java#L88-L107
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/StringUtils.java
StringUtils.indexOfAny
public static int indexOfAny(final CharSequence cs, final String searchChars) { if (isEmpty(cs) || isEmpty(searchChars)) { return INDEX_NOT_FOUND; } return indexOfAny(cs, searchChars.toCharArray()); }
java
public static int indexOfAny(final CharSequence cs, final String searchChars) { if (isEmpty(cs) || isEmpty(searchChars)) { return INDEX_NOT_FOUND; } return indexOfAny(cs, searchChars.toCharArray()); }
[ "public", "static", "int", "indexOfAny", "(", "final", "CharSequence", "cs", ",", "final", "String", "searchChars", ")", "{", "if", "(", "isEmpty", "(", "cs", ")", "||", "isEmpty", "(", "searchChars", ")", ")", "{", "return", "INDEX_NOT_FOUND", ";", "}", ...
<p>Search a CharSequence to find the first index of any character in the given set of characters.</p> <p>A {@code null} String will return {@code -1}. A {@code null} search string will return {@code -1}.</p> <pre> StringUtils.indexOfAny(null, *) = -1 StringUtils.indexOfAny("", *) = -1 StringUt...
[ "<p", ">", "Search", "a", "CharSequence", "to", "find", "the", "first", "index", "of", "any", "character", "in", "the", "given", "set", "of", "characters", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/StringUtils.java#L2122-L2127
ganglia/jmxetric
src/main/java/info/ganglia/jmxetric/MBeanSampler.java
MBeanSampler.addMBeanAttribute
public void addMBeanAttribute(String mbean, MBeanAttribute attr) throws Exception { MBeanHolder mbeanHolder = mbeanMap.get(mbean); if (mbeanHolder == null) { mbeanHolder = new MBeanHolder(this, process, mbean); mbeanMap.put(mbean, mbeanHolder); } mbeanHolder.addAttribute(attr); log.info("Added attrib...
java
public void addMBeanAttribute(String mbean, MBeanAttribute attr) throws Exception { MBeanHolder mbeanHolder = mbeanMap.get(mbean); if (mbeanHolder == null) { mbeanHolder = new MBeanHolder(this, process, mbean); mbeanMap.put(mbean, mbeanHolder); } mbeanHolder.addAttribute(attr); log.info("Added attrib...
[ "public", "void", "addMBeanAttribute", "(", "String", "mbean", ",", "MBeanAttribute", "attr", ")", "throws", "Exception", "{", "MBeanHolder", "mbeanHolder", "=", "mbeanMap", ".", "get", "(", "mbean", ")", ";", "if", "(", "mbeanHolder", "==", "null", ")", "{"...
Adds an {@link info.ganglia.jmxetric.MBeanAttribute} to be sampled. @param mbean name of the mbean @param attr attribute to be sample @throws Exception
[ "Adds", "an", "{", "@link", "info", ".", "ganglia", ".", "jmxetric", ".", "MBeanAttribute", "}", "to", "be", "sampled", "." ]
train
https://github.com/ganglia/jmxetric/blob/0b21edb9bd75e0b2df8370ad1c77a1ea47f502ca/src/main/java/info/ganglia/jmxetric/MBeanSampler.java#L108-L117
jbundle/jbundle
thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JScreen.java
JScreen.getGBConstraints
public GridBagConstraints getGBConstraints() { if (m_gbconstraints == null) { m_gbconstraints = new GridBagConstraints(); m_gbconstraints.insets = new Insets(2, 2, 2, 2); m_gbconstraints.ipadx = 2; m_gbconstraints.ipady = 2; } return m_...
java
public GridBagConstraints getGBConstraints() { if (m_gbconstraints == null) { m_gbconstraints = new GridBagConstraints(); m_gbconstraints.insets = new Insets(2, 2, 2, 2); m_gbconstraints.ipadx = 2; m_gbconstraints.ipady = 2; } return m_...
[ "public", "GridBagConstraints", "getGBConstraints", "(", ")", "{", "if", "(", "m_gbconstraints", "==", "null", ")", "{", "m_gbconstraints", "=", "new", "GridBagConstraints", "(", ")", ";", "m_gbconstraints", ".", "insets", "=", "new", "Insets", "(", "2", ",", ...
Get the GridBagConstraints. @return The gridbag constraints object.
[ "Get", "the", "GridBagConstraints", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JScreen.java#L182-L192
apptik/JustJson
json-core/src/main/java/io/apptik/json/JsonObject.java
JsonObject.put
public JsonObject put(String name, boolean value) throws JsonException { return put(name, new JsonBoolean(value)); }
java
public JsonObject put(String name, boolean value) throws JsonException { return put(name, new JsonBoolean(value)); }
[ "public", "JsonObject", "put", "(", "String", "name", ",", "boolean", "value", ")", "throws", "JsonException", "{", "return", "put", "(", "name", ",", "new", "JsonBoolean", "(", "value", ")", ")", ";", "}" ]
Maps {@code name} to {@code value}, clobbering any existing name/value mapping with the same name. @return this object.
[ "Maps", "{", "@code", "name", "}", "to", "{", "@code", "value", "}", "clobbering", "any", "existing", "name", "/", "value", "mapping", "with", "the", "same", "name", "." ]
train
https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/JsonObject.java#L143-L145
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetDateTime.java
OffsetDateTime.now
public static OffsetDateTime now(Clock clock) { Objects.requireNonNull(clock, "clock"); final Instant now = clock.instant(); // called once return ofInstant(now, clock.getZone().getRules().getOffset(now)); }
java
public static OffsetDateTime now(Clock clock) { Objects.requireNonNull(clock, "clock"); final Instant now = clock.instant(); // called once return ofInstant(now, clock.getZone().getRules().getOffset(now)); }
[ "public", "static", "OffsetDateTime", "now", "(", "Clock", "clock", ")", "{", "Objects", ".", "requireNonNull", "(", "clock", ",", "\"clock\"", ")", ";", "final", "Instant", "now", "=", "clock", ".", "instant", "(", ")", ";", "// called once", "return", "o...
Obtains the current date-time from the specified clock. <p> This will query the specified clock to obtain the current date-time. The offset will be calculated from the time-zone in the clock. <p> Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using {@link Clock...
[ "Obtains", "the", "current", "date", "-", "time", "from", "the", "specified", "clock", ".", "<p", ">", "This", "will", "query", "the", "specified", "clock", "to", "obtain", "the", "current", "date", "-", "time", ".", "The", "offset", "will", "be", "calcu...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetDateTime.java#L238-L242
eclipse/xtext-extras
org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java
IndexedJvmTypeAccess.getAccessibleType
protected EObject getAccessibleType(IEObjectDescription description, String fragment, ResourceSet resourceSet) throws UnknownNestedTypeException { EObject typeProxy = description.getEObjectOrProxy(); if (typeProxy.eIsProxy()) { typeProxy = EcoreUtil.resolve(typeProxy, resourceSet); } if (!typeProxy.eIsProxy(...
java
protected EObject getAccessibleType(IEObjectDescription description, String fragment, ResourceSet resourceSet) throws UnknownNestedTypeException { EObject typeProxy = description.getEObjectOrProxy(); if (typeProxy.eIsProxy()) { typeProxy = EcoreUtil.resolve(typeProxy, resourceSet); } if (!typeProxy.eIsProxy(...
[ "protected", "EObject", "getAccessibleType", "(", "IEObjectDescription", "description", ",", "String", "fragment", ",", "ResourceSet", "resourceSet", ")", "throws", "UnknownNestedTypeException", "{", "EObject", "typeProxy", "=", "description", ".", "getEObjectOrProxy", "(...
Read and resolve the EObject from the given description and navigate to its children according to the given fragment. @since 2.8
[ "Read", "and", "resolve", "the", "EObject", "from", "the", "given", "description", "and", "navigate", "to", "its", "children", "according", "to", "the", "given", "fragment", "." ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.common.types/src/org/eclipse/xtext/common/types/access/impl/IndexedJvmTypeAccess.java#L139-L153
tvesalainen/util
util/src/main/java/org/vesalainen/math/CircleFitter.java
CircleFitter.limitDistance
public static void limitDistance(DenseMatrix64F p0, DenseMatrix64F pr, double min, double max) { double x0 = p0.data[0]; double y0 = p0.data[1]; double xr = pr.data[0]; double yr = pr.data[1]; double dx = xr-x0; double dy = yr-y0; double r = Math.sqrt(...
java
public static void limitDistance(DenseMatrix64F p0, DenseMatrix64F pr, double min, double max) { double x0 = p0.data[0]; double y0 = p0.data[1]; double xr = pr.data[0]; double yr = pr.data[1]; double dx = xr-x0; double dy = yr-y0; double r = Math.sqrt(...
[ "public", "static", "void", "limitDistance", "(", "DenseMatrix64F", "p0", ",", "DenseMatrix64F", "pr", ",", "double", "min", ",", "double", "max", ")", "{", "double", "x0", "=", "p0", ".", "data", "[", "0", "]", ";", "double", "y0", "=", "p0", ".", "...
Changes pr so that distance from p0 is in range min - max. Slope of (p0,pr) remains the same. @param p0 @param pr @param min @param max
[ "Changes", "pr", "so", "that", "distance", "from", "p0", "is", "in", "range", "min", "-", "max", ".", "Slope", "of", "(", "p0", "pr", ")", "remains", "the", "same", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/CircleFitter.java#L147-L186
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/StrictMath.java
StrictMath.copySign
public static double copySign(double magnitude, double sign) { return Math.copySign(magnitude, (Double.isNaN(sign)?1.0d:sign)); }
java
public static double copySign(double magnitude, double sign) { return Math.copySign(magnitude, (Double.isNaN(sign)?1.0d:sign)); }
[ "public", "static", "double", "copySign", "(", "double", "magnitude", ",", "double", "sign", ")", "{", "return", "Math", ".", "copySign", "(", "magnitude", ",", "(", "Double", ".", "isNaN", "(", "sign", ")", "?", "1.0d", ":", "sign", ")", ")", ";", "...
Returns the first floating-point argument with the sign of the second floating-point argument. For this method, a NaN {@code sign} argument is always treated as if it were positive. @param magnitude the parameter providing the magnitude of the result @param sign the parameter providing the sign of the result @retu...
[ "Returns", "the", "first", "floating", "-", "point", "argument", "with", "the", "sign", "of", "the", "second", "floating", "-", "point", "argument", ".", "For", "this", "method", "a", "NaN", "{", "@code", "sign", "}", "argument", "is", "always", "treated",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/StrictMath.java#L1387-L1389
UrielCh/ovh-java-sdk
ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java
ApiOvhVps.serviceName_automatedBackup_restore_POST
public OvhTask serviceName_automatedBackup_restore_POST(String serviceName, Boolean changePassword, Date restorePoint, OvhRestoreTypeEnum type) throws IOException { String qPath = "/vps/{serviceName}/automatedBackup/restore"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<Stri...
java
public OvhTask serviceName_automatedBackup_restore_POST(String serviceName, Boolean changePassword, Date restorePoint, OvhRestoreTypeEnum type) throws IOException { String qPath = "/vps/{serviceName}/automatedBackup/restore"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<Stri...
[ "public", "OvhTask", "serviceName_automatedBackup_restore_POST", "(", "String", "serviceName", ",", "Boolean", "changePassword", ",", "Date", "restorePoint", ",", "OvhRestoreTypeEnum", "type", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/vps/{serviceName...
Creates a VPS.Task that will restore the given restorePoint REST: POST /vps/{serviceName}/automatedBackup/restore @param changePassword [required] [default=0] Only with restore full on VPS Cloud 2014 @param type [required] [default=file] file: Attach/export restored disk to your current VPS - full: Replace your curren...
[ "Creates", "a", "VPS", ".", "Task", "that", "will", "restore", "the", "given", "restorePoint" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-vps/src/main/java/net/minidev/ovh/api/ApiOvhVps.java#L122-L131
fullcontact/hadoop-sstable
sstable-core/src/main/java/com/fullcontact/cassandra/io/util/RandomAccessReader.java
RandomAccessReader.reBuffer
protected void reBuffer() { resetBuffer(); try { if (bufferOffset >= fs.getFileStatus(inputPath).getLen()) // TODO: is this equivalent? return; input.seek(bufferOffset); int read = 0; while (read < buffer.length) { int n...
java
protected void reBuffer() { resetBuffer(); try { if (bufferOffset >= fs.getFileStatus(inputPath).getLen()) // TODO: is this equivalent? return; input.seek(bufferOffset); int read = 0; while (read < buffer.length) { int n...
[ "protected", "void", "reBuffer", "(", ")", "{", "resetBuffer", "(", ")", ";", "try", "{", "if", "(", "bufferOffset", ">=", "fs", ".", "getFileStatus", "(", "inputPath", ")", ".", "getLen", "(", ")", ")", "// TODO: is this equivalent?", "return", ";", "inpu...
Read data from file starting from current currentOffset to populate buffer.
[ "Read", "data", "from", "file", "starting", "from", "current", "currentOffset", "to", "populate", "buffer", "." ]
train
https://github.com/fullcontact/hadoop-sstable/blob/1189c2cb3a2cbbe03b75fda1cf02698e6283dfb2/sstable-core/src/main/java/com/fullcontact/cassandra/io/util/RandomAccessReader.java#L138-L161
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/Util.java
Util.isValidSnapshot
public static boolean isValidSnapshot(File f) throws IOException { if (f==null || Util.getZxidFromName(f.getName(), "snapshot") == -1) return false; // Check for a valid snapshot RandomAccessFile raf = new RandomAccessFile(f, "r"); // including the header and the last / byte...
java
public static boolean isValidSnapshot(File f) throws IOException { if (f==null || Util.getZxidFromName(f.getName(), "snapshot") == -1) return false; // Check for a valid snapshot RandomAccessFile raf = new RandomAccessFile(f, "r"); // including the header and the last / byte...
[ "public", "static", "boolean", "isValidSnapshot", "(", "File", "f", ")", "throws", "IOException", "{", "if", "(", "f", "==", "null", "||", "Util", ".", "getZxidFromName", "(", "f", ".", "getName", "(", ")", ",", "\"snapshot\"", ")", "==", "-", "1", ")"...
Verifies that the file is a valid snapshot. Snapshot may be invalid if it's incomplete as in a situation when the server dies while in the process of storing a snapshot. Any file that is not a snapshot is also an invalid snapshot. @param f file to verify @return true if the snapshot is valid @throws IOException
[ "Verifies", "that", "the", "file", "is", "a", "valid", "snapshot", ".", "Snapshot", "may", "be", "invalid", "if", "it", "s", "incomplete", "as", "in", "a", "situation", "when", "the", "server", "dies", "while", "in", "the", "process", "of", "storing", "a...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/persistence/Util.java#L161-L199
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java
TmdbEpisodes.getEpisodeChanges
public ResultList<ChangeKeyItem> getEpisodeChanges(int episodeID, String startDate, String endDate) throws MovieDbException { return getMediaChanges(episodeID, startDate, endDate); }
java
public ResultList<ChangeKeyItem> getEpisodeChanges(int episodeID, String startDate, String endDate) throws MovieDbException { return getMediaChanges(episodeID, startDate, endDate); }
[ "public", "ResultList", "<", "ChangeKeyItem", ">", "getEpisodeChanges", "(", "int", "episodeID", ",", "String", "startDate", ",", "String", "endDate", ")", "throws", "MovieDbException", "{", "return", "getMediaChanges", "(", "episodeID", ",", "startDate", ",", "en...
Look up a TV episode's changes by episode ID @param episodeID @param startDate @param endDate @return @throws MovieDbException
[ "Look", "up", "a", "TV", "episode", "s", "changes", "by", "episode", "ID" ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbEpisodes.java#L105-L107
phax/ph-oton
ph-oton-jscode/src/main/java/com/helger/html/jscode/AbstractJSBlock.java
AbstractJSBlock._if
@Nonnull public JSConditional _if (@Nonnull final IJSExpression aTest, @Nullable final IHasJSCode aThen) { return addStatement (new JSConditional (aTest, aThen)); }
java
@Nonnull public JSConditional _if (@Nonnull final IJSExpression aTest, @Nullable final IHasJSCode aThen) { return addStatement (new JSConditional (aTest, aThen)); }
[ "@", "Nonnull", "public", "JSConditional", "_if", "(", "@", "Nonnull", "final", "IJSExpression", "aTest", ",", "@", "Nullable", "final", "IHasJSCode", "aThen", ")", "{", "return", "addStatement", "(", "new", "JSConditional", "(", "aTest", ",", "aThen", ")", ...
Create an If statement and add it to this block @param aTest {@link IJSExpression} to be tested to determine branching @param aThen "then" block content. May be <code>null</code>. @return Newly generated conditional statement
[ "Create", "an", "If", "statement", "and", "add", "it", "to", "this", "block" ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-jscode/src/main/java/com/helger/html/jscode/AbstractJSBlock.java#L999-L1003
apache/groovy
src/main/java/org/codehaus/groovy/transform/stc/TypeCheckingExtension.java
TypeCheckingExtension.buildMapType
public ClassNode buildMapType(ClassNode keyType, ClassNode valueType) { return parameterizedType(ClassHelper.MAP_TYPE, keyType, valueType); }
java
public ClassNode buildMapType(ClassNode keyType, ClassNode valueType) { return parameterizedType(ClassHelper.MAP_TYPE, keyType, valueType); }
[ "public", "ClassNode", "buildMapType", "(", "ClassNode", "keyType", ",", "ClassNode", "valueType", ")", "{", "return", "parameterizedType", "(", "ClassHelper", ".", "MAP_TYPE", ",", "keyType", ",", "valueType", ")", ";", "}" ]
Builds a parametrized class node representing the Map&lt;keyType,valueType&gt; type. @param keyType the classnode type of the key @param valueType the classnode type of the value @return a class node for Map&lt;keyType,valueType&gt; @since 2.2.0
[ "Builds", "a", "parametrized", "class", "node", "representing", "the", "Map&lt", ";", "keyType", "valueType&gt", ";", "type", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/stc/TypeCheckingExtension.java#L361-L363
maguro/aunit
junit/src/main/java/com/toolazydogs/aunit/internal/Util.java
Util.validatePrimitiveArray
@SuppressWarnings({"ThrowableInstanceNeverThrown"}) public static void validatePrimitiveArray(Method method, Class type, List<Throwable> errors) { Class returnType = method.getReturnType(); if (!returnType.isArray() || !returnType.getComponentType().equals(type)) { errors.add...
java
@SuppressWarnings({"ThrowableInstanceNeverThrown"}) public static void validatePrimitiveArray(Method method, Class type, List<Throwable> errors) { Class returnType = method.getReturnType(); if (!returnType.isArray() || !returnType.getComponentType().equals(type)) { errors.add...
[ "@", "SuppressWarnings", "(", "{", "\"ThrowableInstanceNeverThrown\"", "}", ")", "public", "static", "void", "validatePrimitiveArray", "(", "Method", "method", ",", "Class", "type", ",", "List", "<", "Throwable", ">", "errors", ")", "{", "Class", "returnType", "...
Validate that a method returns primitive array of specific type. @param method the method to be tested @param errors a list to place the errors
[ "Validate", "that", "a", "method", "returns", "primitive", "array", "of", "specific", "type", "." ]
train
https://github.com/maguro/aunit/blob/1f972e35b28327e5e2e7881befc928df0546d74c/junit/src/main/java/com/toolazydogs/aunit/internal/Util.java#L69-L77
Stratio/deep-spark
deep-cassandra/src/main/java/com/stratio/deep/cassandra/config/CassandraDeepJobConfig.java
CassandraDeepJobConfig.createOutputTableIfNeeded
public void createOutputTableIfNeeded(Tuple2<Cells, Cells> first) { TableMetadata metadata = getSession() .getCluster() .getMetadata() .getKeyspace(this.catalog) .getTable(quote(this.table)); if (metadata == null && !createTableOnWrite) {...
java
public void createOutputTableIfNeeded(Tuple2<Cells, Cells> first) { TableMetadata metadata = getSession() .getCluster() .getMetadata() .getKeyspace(this.catalog) .getTable(quote(this.table)); if (metadata == null && !createTableOnWrite) {...
[ "public", "void", "createOutputTableIfNeeded", "(", "Tuple2", "<", "Cells", ",", "Cells", ">", "first", ")", "{", "TableMetadata", "metadata", "=", "getSession", "(", ")", ".", "getCluster", "(", ")", ".", "getMetadata", "(", ")", ".", "getKeyspace", "(", ...
Creates the output column family if not exists. <br/> We first check if the column family exists. <br/> If not, we get the first element from <i>tupleRDD</i> and we use it as a template to get columns metadata. <p> This is a very heavy operation since to obtain the schema we need to get at least one element of the outp...
[ "Creates", "the", "output", "column", "family", "if", "not", "exists", ".", "<br", "/", ">", "We", "first", "check", "if", "the", "column", "family", "exists", ".", "<br", "/", ">", "If", "not", "we", "get", "the", "first", "element", "from", "<i", "...
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/config/CassandraDeepJobConfig.java#L232-L256
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java
Validators.validTrustManagerFactory
public static Validator validTrustManagerFactory() { return (s, o) -> { if (!(o instanceof String)) { throw new ConfigException(s, o, "Must be a string."); } String keyStoreType = o.toString(); try { TrustManagerFactory.getInstance(keyStoreType); } catch (NoSuchAlgorit...
java
public static Validator validTrustManagerFactory() { return (s, o) -> { if (!(o instanceof String)) { throw new ConfigException(s, o, "Must be a string."); } String keyStoreType = o.toString(); try { TrustManagerFactory.getInstance(keyStoreType); } catch (NoSuchAlgorit...
[ "public", "static", "Validator", "validTrustManagerFactory", "(", ")", "{", "return", "(", "s", ",", "o", ")", "->", "{", "if", "(", "!", "(", "o", "instanceof", "String", ")", ")", "{", "throw", "new", "ConfigException", "(", "s", ",", "o", ",", "\"...
Validator is used to ensure that the TrustManagerFactory Algorithm specified is valid. @return
[ "Validator", "is", "used", "to", "ensure", "that", "the", "TrustManagerFactory", "Algorithm", "specified", "is", "valid", "." ]
train
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/validators/Validators.java#L232-L247
casbin/jcasbin
src/main/java/org/casbin/jcasbin/rbac/GroupRoleManager.java
GroupRoleManager.hasLink
@Override public boolean hasLink(String name1, String name2, String... domain) { if(super.hasLink(name1, name2, domain)) { return true; } // check name1's groups if (domain.length == 1) { try { List<String> groups = Optional.ofNullable(super.ge...
java
@Override public boolean hasLink(String name1, String name2, String... domain) { if(super.hasLink(name1, name2, domain)) { return true; } // check name1's groups if (domain.length == 1) { try { List<String> groups = Optional.ofNullable(super.ge...
[ "@", "Override", "public", "boolean", "hasLink", "(", "String", "name1", ",", "String", "name2", ",", "String", "...", "domain", ")", "{", "if", "(", "super", ".", "hasLink", "(", "name1", ",", "name2", ",", "domain", ")", ")", "{", "return", "true", ...
hasLink determines whether role: name1 inherits role: name2. domain is a prefix to the roles.
[ "hasLink", "determines", "whether", "role", ":", "name1", "inherits", "role", ":", "name2", ".", "domain", "is", "a", "prefix", "to", "the", "roles", "." ]
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/rbac/GroupRoleManager.java#L49-L68
google/j2objc
jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java
NodeImpl.setNameNS
static void setNameNS(NodeImpl node, String namespaceURI, String qualifiedName) { if (qualifiedName == null) { throw new DOMException(DOMException.NAMESPACE_ERR, qualifiedName); } String prefix = null; int p = qualifiedName.lastIndexOf(":"); if (p != -1) { ...
java
static void setNameNS(NodeImpl node, String namespaceURI, String qualifiedName) { if (qualifiedName == null) { throw new DOMException(DOMException.NAMESPACE_ERR, qualifiedName); } String prefix = null; int p = qualifiedName.lastIndexOf(":"); if (p != -1) { ...
[ "static", "void", "setNameNS", "(", "NodeImpl", "node", ",", "String", "namespaceURI", ",", "String", "qualifiedName", ")", "{", "if", "(", "qualifiedName", "==", "null", ")", "{", "throw", "new", "DOMException", "(", "DOMException", ".", "NAMESPACE_ERR", ",",...
Sets {@code node} to be namespace-aware and assigns its namespace URI and qualified name. @param node an element or attribute node. @param namespaceURI this node's namespace URI. May be null. @param qualifiedName a possibly-prefixed name like "img" or "html:img".
[ "Sets", "{", "@code", "node", "}", "to", "be", "namespace", "-", "aware", "and", "assigns", "its", "namespace", "URI", "and", "qualified", "name", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java#L230-L272
alkacon/opencms-core
src/org/opencms/search/CmsSearch.java
CmsSearch.addFieldQuery
public void addFieldQuery(String fieldName, String searchQuery, Occur occur) { addFieldQuery(new CmsSearchParameters.CmsSearchFieldQuery(fieldName, searchQuery, occur)); }
java
public void addFieldQuery(String fieldName, String searchQuery, Occur occur) { addFieldQuery(new CmsSearchParameters.CmsSearchFieldQuery(fieldName, searchQuery, occur)); }
[ "public", "void", "addFieldQuery", "(", "String", "fieldName", ",", "String", "searchQuery", ",", "Occur", "occur", ")", "{", "addFieldQuery", "(", "new", "CmsSearchParameters", ".", "CmsSearchFieldQuery", "(", "fieldName", ",", "searchQuery", ",", "occur", ")", ...
Adds an individual query for a search field.<p> If this is used, any setting made with {@link #setQuery(String)} and {@link #setField(String[])} will be ignored and only the individual field search settings will be used.<p> When combining occurrences of SHOULD, MUST and MUST_NOT, keep the following in mind: All SHOUL...
[ "Adds", "an", "individual", "query", "for", "a", "search", "field", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/CmsSearch.java#L165-L168
ppiastucki/recast4j
detourcrowd/src/main/java/org/recast4j/detour/crowd/PathCorridor.java
PathCorridor.isValid
boolean isValid(int maxLookAhead, NavMeshQuery navquery, QueryFilter filter) { // Check that all polygons still pass query filter. int n = Math.min(m_path.size(), maxLookAhead); for (int i = 0; i < n; ++i) { if (!navquery.isValidPolyRef(m_path.get(i), filter)) { retur...
java
boolean isValid(int maxLookAhead, NavMeshQuery navquery, QueryFilter filter) { // Check that all polygons still pass query filter. int n = Math.min(m_path.size(), maxLookAhead); for (int i = 0; i < n; ++i) { if (!navquery.isValidPolyRef(m_path.get(i), filter)) { retur...
[ "boolean", "isValid", "(", "int", "maxLookAhead", ",", "NavMeshQuery", "navquery", ",", "QueryFilter", "filter", ")", "{", "// Check that all polygons still pass query filter.", "int", "n", "=", "Math", ".", "min", "(", "m_path", ".", "size", "(", ")", ",", "max...
Checks the current corridor path to see if its polygon references remain valid. The path can be invalidated if there are structural changes to the underlying navigation mesh, or the state of a polygon within the path changes resulting in it being filtered out. (E.g. An exclusion or inclusion flag changes.) @param maxL...
[ "Checks", "the", "current", "corridor", "path", "to", "see", "if", "its", "polygon", "references", "remain", "valid", ".", "The", "path", "can", "be", "invalidated", "if", "there", "are", "structural", "changes", "to", "the", "underlying", "navigation", "mesh"...
train
https://github.com/ppiastucki/recast4j/blob/a414dc34f16b87c95fb4e0f46c28a7830d421788/detourcrowd/src/main/java/org/recast4j/detour/crowd/PathCorridor.java#L503-L513
Alluxio/alluxio
core/server/master/src/main/java/alluxio/master/file/activesync/ActiveSyncManager.java
ActiveSyncManager.launchPollingThread
public void launchPollingThread(long mountId, long txId) { LOG.debug("launch polling thread for mount id {}, txId {}", mountId, txId); if (!mPollerMap.containsKey(mountId)) { try (CloseableResource<UnderFileSystem> ufsClient = mMountTable.getUfsClient(mountId).acquireUfsResource()) { ...
java
public void launchPollingThread(long mountId, long txId) { LOG.debug("launch polling thread for mount id {}, txId {}", mountId, txId); if (!mPollerMap.containsKey(mountId)) { try (CloseableResource<UnderFileSystem> ufsClient = mMountTable.getUfsClient(mountId).acquireUfsResource()) { ...
[ "public", "void", "launchPollingThread", "(", "long", "mountId", ",", "long", "txId", ")", "{", "LOG", ".", "debug", "(", "\"launch polling thread for mount id {}, txId {}\"", ",", "mountId", ",", "txId", ")", ";", "if", "(", "!", "mPollerMap", ".", "containsKey...
Launches polling thread on a particular mount point with starting txId. @param mountId launch polling thread on a mount id @param txId specifies the transaction id to initialize the pollling thread
[ "Launches", "polling", "thread", "on", "a", "particular", "mount", "point", "with", "starting", "txId", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/server/master/src/main/java/alluxio/master/file/activesync/ActiveSyncManager.java#L209-L225
gocd/gocd
base/src/main/java/com/thoughtworks/go/util/DirectoryScanner.java
DirectoryScanner.scandir
protected void scandir(File dir, String vpath, boolean fast) { if (dir == null) { throw new RuntimeException("dir must not be null."); } String[] newfiles = dir.list(); if (newfiles == null) { if (!dir.exists()) { throw new RuntimeException(dir + "...
java
protected void scandir(File dir, String vpath, boolean fast) { if (dir == null) { throw new RuntimeException("dir must not be null."); } String[] newfiles = dir.list(); if (newfiles == null) { if (!dir.exists()) { throw new RuntimeException(dir + "...
[ "protected", "void", "scandir", "(", "File", "dir", ",", "String", "vpath", ",", "boolean", "fast", ")", "{", "if", "(", "dir", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"dir must not be null.\"", ")", ";", "}", "String", "[", "]...
Scan the given directory for files and directories. Found files and directories are placed in their respective collections, based on the matching of includes, excludes, and the selectors. When a directory is found, it is scanned recursively. @param dir The directory to scan. Must not be <code>null</code>. @param vp...
[ "Scan", "the", "given", "directory", "for", "files", "and", "directories", ".", "Found", "files", "and", "directories", "are", "placed", "in", "their", "respective", "collections", "based", "on", "the", "matching", "of", "includes", "excludes", "and", "the", "...
train
https://github.com/gocd/gocd/blob/59a8480e23d6c06de39127635108dff57603cb71/base/src/main/java/com/thoughtworks/go/util/DirectoryScanner.java#L1051-L1067
rundeck/rundeck
rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java
PathUtil.hasRoot
public static boolean hasRoot(String path, String root) { String p = cleanPath(path); String r = cleanPath(root); return p.equals(r) || r.equals(cleanPath(ROOT.getPath())) || p.startsWith(r + SEPARATOR); }
java
public static boolean hasRoot(String path, String root) { String p = cleanPath(path); String r = cleanPath(root); return p.equals(r) || r.equals(cleanPath(ROOT.getPath())) || p.startsWith(r + SEPARATOR); }
[ "public", "static", "boolean", "hasRoot", "(", "String", "path", ",", "String", "root", ")", "{", "String", "p", "=", "cleanPath", "(", "path", ")", ";", "String", "r", "=", "cleanPath", "(", "root", ")", ";", "return", "p", ".", "equals", "(", "r", ...
@return true if the given path starts with the given root @param path test path @param root root
[ "@return", "true", "if", "the", "given", "path", "starts", "with", "the", "given", "root" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java#L148-L154
bit3/jsass
src/main/java/io/bit3/jsass/Compiler.java
Compiler.compileString
public Output compileString(String string, Options options) throws CompilationException { return compileString(string, null, null, options); }
java
public Output compileString(String string, Options options) throws CompilationException { return compileString(string, null, null, options); }
[ "public", "Output", "compileString", "(", "String", "string", ",", "Options", "options", ")", "throws", "CompilationException", "{", "return", "compileString", "(", "string", ",", "null", ",", "null", ",", "options", ")", ";", "}" ]
Compile string. @param string The input string. @param options The compile options. @return The compilation output. @throws CompilationException If the compilation failed.
[ "Compile", "string", "." ]
train
https://github.com/bit3/jsass/blob/fba91d5cb1eb507c7cfde5a261e04b1d328cb1ef/src/main/java/io/bit3/jsass/Compiler.java#L46-L48
box/box-java-sdk
src/main/java/com/box/sdk/BoxRetentionPolicy.java
BoxRetentionPolicy.createFinitePolicy
public static BoxRetentionPolicy.Info createFinitePolicy(BoxAPIConnection api, String name, int length, String action, RetentionPolicyParams optionalParams) { return createRetentionPolicy(api, name, TYPE_FINITE, length, action, optionalParams); ...
java
public static BoxRetentionPolicy.Info createFinitePolicy(BoxAPIConnection api, String name, int length, String action, RetentionPolicyParams optionalParams) { return createRetentionPolicy(api, name, TYPE_FINITE, length, action, optionalParams); ...
[ "public", "static", "BoxRetentionPolicy", ".", "Info", "createFinitePolicy", "(", "BoxAPIConnection", "api", ",", "String", "name", ",", "int", "length", ",", "String", "action", ",", "RetentionPolicyParams", "optionalParams", ")", "{", "return", "createRetentionPolic...
Used to create a new finite retention policy with optional parameters. @param api the API connection to be used by the created user. @param name the name of the retention policy. @param length the duration in days that the retention policy will be active for after being assigned to content. @param action the dispositio...
[ "Used", "to", "create", "a", "new", "finite", "retention", "policy", "with", "optional", "parameters", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRetentionPolicy.java#L131-L134
alkacon/opencms-core
src/org/opencms/notification/CmsContentNotification.java
CmsContentNotification.buildNotificationListItem
private String buildNotificationListItem(CmsExtendedNotificationCause notificationCause, int row) { StringBuffer result = new StringBuffer("<tr class=\"trow"); result.append(row); result.append("\"><td width=\"100%\">"); String resourcePath = notificationCause.getResource().getRootPath(...
java
private String buildNotificationListItem(CmsExtendedNotificationCause notificationCause, int row) { StringBuffer result = new StringBuffer("<tr class=\"trow"); result.append(row); result.append("\"><td width=\"100%\">"); String resourcePath = notificationCause.getResource().getRootPath(...
[ "private", "String", "buildNotificationListItem", "(", "CmsExtendedNotificationCause", "notificationCause", ",", "int", "row", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", "\"<tr class=\\\"trow\"", ")", ";", "result", ".", "append", "(", "row",...
Returns a string representation of this resource info.<p> @param notificationCause the notification cause @param row the row number @return a string representation of this resource info
[ "Returns", "a", "string", "representation", "of", "this", "resource", "info", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/notification/CmsContentNotification.java#L371-L426
stevespringett/CPE-Parser
src/main/java/us/springett/parsers/cpe/CpeParser.java
CpeParser.parse23
protected static Cpe parse23(String cpeString, boolean lenient) throws CpeParsingException { if (cpeString == null || cpeString.isEmpty()) { throw new CpeParsingException("CPE String is null ir enpty - unable to parse"); } CpeBuilder cb = new CpeBuilder(); Cpe23PartIterator c...
java
protected static Cpe parse23(String cpeString, boolean lenient) throws CpeParsingException { if (cpeString == null || cpeString.isEmpty()) { throw new CpeParsingException("CPE String is null ir enpty - unable to parse"); } CpeBuilder cb = new CpeBuilder(); Cpe23PartIterator c...
[ "protected", "static", "Cpe", "parse23", "(", "String", "cpeString", ",", "boolean", "lenient", ")", "throws", "CpeParsingException", "{", "if", "(", "cpeString", "==", "null", "||", "cpeString", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "CpeParsin...
Parses a CPE 2.3 Formatted String. @param cpeString the CPE string to parse @param lenient when <code>true</code> the parser will put in lenient mode attempting to parse invalid CPE values. @return the CPE object represented by the cpeString @throws CpeParsingException thrown if the cpeString is invalid
[ "Parses", "a", "CPE", "2", ".", "3", "Formatted", "String", "." ]
train
https://github.com/stevespringett/CPE-Parser/blob/e6324ca020dc0790097d3d62bb98aabf60e56843/src/main/java/us/springett/parsers/cpe/CpeParser.java#L203-L232
alkacon/opencms-core
src/org/opencms/relations/CmsCategoryService.java
CmsCategoryService.internalCategoryRootPath
private String internalCategoryRootPath(String basePath, String categoryPath) { if (categoryPath.startsWith("/") && basePath.endsWith("/")) { // one slash too much return basePath + categoryPath.substring(1); } else if (!categoryPath.startsWith("/") && !basePath.endsWith("/")) {...
java
private String internalCategoryRootPath(String basePath, String categoryPath) { if (categoryPath.startsWith("/") && basePath.endsWith("/")) { // one slash too much return basePath + categoryPath.substring(1); } else if (!categoryPath.startsWith("/") && !basePath.endsWith("/")) {...
[ "private", "String", "internalCategoryRootPath", "(", "String", "basePath", ",", "String", "categoryPath", ")", "{", "if", "(", "categoryPath", ".", "startsWith", "(", "\"/\"", ")", "&&", "basePath", ".", "endsWith", "(", "\"/\"", ")", ")", "{", "// one slash ...
Composes the category root path by appending the category path to the given category repository path.<p> @param basePath the category repository path @param categoryPath the category path @return the category root path
[ "Composes", "the", "category", "root", "path", "by", "appending", "the", "category", "path", "to", "the", "given", "category", "repository", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/relations/CmsCategoryService.java#L761-L772
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/Modifiers.java
Modifiers.setPublic
public static int setPublic(int modifier, boolean b) { if (b) { return (modifier | PUBLIC) & (~PROTECTED & ~PRIVATE); } else { return modifier & ~PUBLIC; } }
java
public static int setPublic(int modifier, boolean b) { if (b) { return (modifier | PUBLIC) & (~PROTECTED & ~PRIVATE); } else { return modifier & ~PUBLIC; } }
[ "public", "static", "int", "setPublic", "(", "int", "modifier", ",", "boolean", "b", ")", "{", "if", "(", "b", ")", "{", "return", "(", "modifier", "|", "PUBLIC", ")", "&", "(", "~", "PROTECTED", "&", "~", "PRIVATE", ")", ";", "}", "else", "{", "...
When set public, the modifier is cleared from being private or protected.
[ "When", "set", "public", "the", "modifier", "is", "cleared", "from", "being", "private", "or", "protected", "." ]
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/Modifiers.java#L34-L41
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/RDN.java
AVAComparator.compare
@Override public int compare(AVA a1, AVA a2) { boolean a1Has2253 = a1.hasRFC2253Keyword(); boolean a2Has2253 = a2.hasRFC2253Keyword(); if (a1Has2253) { if (a2Has2253) { return a1.toRFC2253CanonicalString().compareTo (a2.toRFC2253CanonicalS...
java
@Override public int compare(AVA a1, AVA a2) { boolean a1Has2253 = a1.hasRFC2253Keyword(); boolean a2Has2253 = a2.hasRFC2253Keyword(); if (a1Has2253) { if (a2Has2253) { return a1.toRFC2253CanonicalString().compareTo (a2.toRFC2253CanonicalS...
[ "@", "Override", "public", "int", "compare", "(", "AVA", "a1", ",", "AVA", "a2", ")", "{", "boolean", "a1Has2253", "=", "a1", ".", "hasRFC2253Keyword", "(", ")", ";", "boolean", "a2Has2253", "=", "a2", ".", "hasRFC2253Keyword", "(", ")", ";", "if", "("...
AVA's containing a standard keyword are ordered alphabetically, followed by AVA's containing an OID keyword, ordered numerically
[ "AVA", "s", "containing", "a", "standard", "keyword", "are", "ordered", "alphabetically", "followed", "by", "AVA", "s", "containing", "an", "OID", "keyword", "ordered", "numerically" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/RDN.java#L491-L519
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/interceptor/Interceptors.java
Interceptors.doPostIntercept
public static void doPostIntercept( InterceptorContext context, List/*< Interceptor >*/ interceptors ) throws InterceptorException { if ( interceptors != null ) { PostInvokeInterceptorChain chain = new PostInvokeInterceptorChain( context, interceptors ); chain.continu...
java
public static void doPostIntercept( InterceptorContext context, List/*< Interceptor >*/ interceptors ) throws InterceptorException { if ( interceptors != null ) { PostInvokeInterceptorChain chain = new PostInvokeInterceptorChain( context, interceptors ); chain.continu...
[ "public", "static", "void", "doPostIntercept", "(", "InterceptorContext", "context", ",", "List", "/*< Interceptor >*/", "interceptors", ")", "throws", "InterceptorException", "{", "if", "(", "interceptors", "!=", "null", ")", "{", "PostInvokeInterceptorChain", "chain",...
Execute a "post" interceptor chain. This will execute the {@link Interceptor#postInvoke(InterceptorContext, InterceptorChain)} method to be invoked on each interceptor in a chain. @param context the context for a set of interceptors @param interceptors the list of interceptors @throws InterceptorException
[ "Execute", "a", "post", "interceptor", "chain", ".", "This", "will", "execute", "the", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/interceptor/Interceptors.java#L58-L66
UrielCh/ovh-java-sdk
ovh-java-sdk-msServices/src/main/java/net/minidev/ovh/api/ApiOvhMsServices.java
ApiOvhMsServices.serviceName_account_userPrincipalName_sync_POST
public OvhTask serviceName_account_userPrincipalName_sync_POST(String serviceName, String userPrincipalName, OvhSyncLicenseEnum license) throws IOException { String qPath = "/msServices/{serviceName}/account/{userPrincipalName}/sync"; StringBuilder sb = path(qPath, serviceName, userPrincipalName); HashMap<String,...
java
public OvhTask serviceName_account_userPrincipalName_sync_POST(String serviceName, String userPrincipalName, OvhSyncLicenseEnum license) throws IOException { String qPath = "/msServices/{serviceName}/account/{userPrincipalName}/sync"; StringBuilder sb = path(qPath, serviceName, userPrincipalName); HashMap<String,...
[ "public", "OvhTask", "serviceName_account_userPrincipalName_sync_POST", "(", "String", "serviceName", ",", "String", "userPrincipalName", ",", "OvhSyncLicenseEnum", "license", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/msServices/{serviceName}/account/{userP...
Create new sync account REST: POST /msServices/{serviceName}/account/{userPrincipalName}/sync @param license [required] Sync account license @param serviceName [required] The internal name of your Active Directory organization @param userPrincipalName [required] User Principal Name API beta
[ "Create", "new", "sync", "account" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-msServices/src/main/java/net/minidev/ovh/api/ApiOvhMsServices.java#L173-L180