repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
groupby/api-java
src/main/java/com/groupbyinc/api/Query.java
Query.getBridgeRefinementsJson
public String getBridgeRefinementsJson(String clientKey, String navigationName) { """ <code> Used internally by the bridge object to generate the JSON that is sent to the search service. </code> @param clientKey The client key used to authenticate this request. @return A JSON representation of this query ...
java
public String getBridgeRefinementsJson(String clientKey, String navigationName) { RefinementsRequest request = new RefinementsRequest(); request.setOriginalQuery(populateRequest(clientKey)); request.setNavigationName(navigationName); return requestToJson(request); }
[ "public", "String", "getBridgeRefinementsJson", "(", "String", "clientKey", ",", "String", "navigationName", ")", "{", "RefinementsRequest", "request", "=", "new", "RefinementsRequest", "(", ")", ";", "request", ".", "setOriginalQuery", "(", "populateRequest", "(", ...
<code> Used internally by the bridge object to generate the JSON that is sent to the search service. </code> @param clientKey The client key used to authenticate this request. @return A JSON representation of this query object.
[ "<code", ">", "Used", "internally", "by", "the", "bridge", "object", "to", "generate", "the", "JSON", "that", "is", "sent", "to", "the", "search", "service", ".", "<", "/", "code", ">" ]
train
https://github.com/groupby/api-java/blob/257c4ed0777221e5e4ade3b29b9921300fac4e2e/src/main/java/com/groupbyinc/api/Query.java#L319-L324
google/closure-compiler
src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java
JsDocInfoParser.parseAndRecordTypeNode
Node parseAndRecordTypeNode(JsDocToken token) { """ Looks for a type expression at the current token and if found, returns it. Note that this method consumes input. @param token The current token. @return The type expression found or null if none. """ return parseAndRecordTypeNode(token, stream.getLin...
java
Node parseAndRecordTypeNode(JsDocToken token) { return parseAndRecordTypeNode(token, stream.getLineno(), stream.getCharno(), token == JsDocToken.LEFT_CURLY, false); }
[ "Node", "parseAndRecordTypeNode", "(", "JsDocToken", "token", ")", "{", "return", "parseAndRecordTypeNode", "(", "token", ",", "stream", ".", "getLineno", "(", ")", ",", "stream", ".", "getCharno", "(", ")", ",", "token", "==", "JsDocToken", ".", "LEFT_CURLY",...
Looks for a type expression at the current token and if found, returns it. Note that this method consumes input. @param token The current token. @return The type expression found or null if none.
[ "Looks", "for", "a", "type", "expression", "at", "the", "current", "token", "and", "if", "found", "returns", "it", ".", "Note", "that", "this", "method", "consumes", "input", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java#L1496-L1499
alkacon/opencms-core
src/org/opencms/widgets/CmsCategoryWidget.java
CmsCategoryWidget.getDefaultLocale
protected Locale getDefaultLocale(CmsObject cms, String resource) { """ Returns the default locale in the content of the given resource.<p> @param cms the cms context @param resource the resource path to get the default locale for @return the default locale of the resource """ Locale locale = O...
java
protected Locale getDefaultLocale(CmsObject cms, String resource) { Locale locale = OpenCms.getLocaleManager().getDefaultLocale(cms, resource); if (locale == null) { List<Locale> locales = OpenCms.getLocaleManager().getAvailableLocales(); if (locales.size() > 0) { ...
[ "protected", "Locale", "getDefaultLocale", "(", "CmsObject", "cms", ",", "String", "resource", ")", "{", "Locale", "locale", "=", "OpenCms", ".", "getLocaleManager", "(", ")", ".", "getDefaultLocale", "(", "cms", ",", "resource", ")", ";", "if", "(", "locale...
Returns the default locale in the content of the given resource.<p> @param cms the cms context @param resource the resource path to get the default locale for @return the default locale of the resource
[ "Returns", "the", "default", "locale", "in", "the", "content", "of", "the", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/CmsCategoryWidget.java#L581-L593
eclipse/xtext-extras
org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/conformance/RawTypeConformanceComputer.java
RawTypeConformanceComputer.doIsConformantTypeArguments
protected int doIsConformantTypeArguments(LightweightTypeReference left, LightweightTypeReference right, int flags) { """ This is a hook for the {@link TypeConformanceComputer} to implement the type argument check. """ if (left.isRawType() != right.isRawType()) { return flags | SUCCESS | RAW_TYPE_CONVERSI...
java
protected int doIsConformantTypeArguments(LightweightTypeReference left, LightweightTypeReference right, int flags) { if (left.isRawType() != right.isRawType()) { return flags | SUCCESS | RAW_TYPE_CONVERSION; } return flags | SUCCESS; }
[ "protected", "int", "doIsConformantTypeArguments", "(", "LightweightTypeReference", "left", ",", "LightweightTypeReference", "right", ",", "int", "flags", ")", "{", "if", "(", "left", ".", "isRawType", "(", ")", "!=", "right", ".", "isRawType", "(", ")", ")", ...
This is a hook for the {@link TypeConformanceComputer} to implement the type argument check.
[ "This", "is", "a", "hook", "for", "the", "{" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/typesystem/conformance/RawTypeConformanceComputer.java#L1172-L1177
grails/grails-core
grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java
GrailsASTUtils.implementsZeroArgMethod
public static boolean implementsZeroArgMethod(ClassNode classNode, String methodName) { """ Tests whether the ClasNode implements the specified method name. @param classNode The ClassNode @param methodName The method name @return true if it does implement the method """ MethodNode method = classN...
java
public static boolean implementsZeroArgMethod(ClassNode classNode, String methodName) { MethodNode method = classNode.getDeclaredMethod(methodName, Parameter.EMPTY_ARRAY); return method != null && (method.isPublic() || method.isProtected()) && !method.isAbstract(); }
[ "public", "static", "boolean", "implementsZeroArgMethod", "(", "ClassNode", "classNode", ",", "String", "methodName", ")", "{", "MethodNode", "method", "=", "classNode", ".", "getDeclaredMethod", "(", "methodName", ",", "Parameter", ".", "EMPTY_ARRAY", ")", ";", "...
Tests whether the ClasNode implements the specified method name. @param classNode The ClassNode @param methodName The method name @return true if it does implement the method
[ "Tests", "whether", "the", "ClasNode", "implements", "the", "specified", "method", "name", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L163-L166
aalmiray/Json-lib
src/main/java/net/sf/json/JSONObject.java
JSONObject.elementOpt
public JSONObject elementOpt( String key, Object value, JsonConfig jsonConfig ) { """ Put a key/value pair in the JSONObject, but only if the key and the value are both non-null. @param key A key string. @param value An object which is the value. It should be of one of these types: Boolean, Double, Integer, ...
java
public JSONObject elementOpt( String key, Object value, JsonConfig jsonConfig ) { verifyIsNull(); if( key != null && value != null ){ element( key, value, jsonConfig ); } return this; }
[ "public", "JSONObject", "elementOpt", "(", "String", "key", ",", "Object", "value", ",", "JsonConfig", "jsonConfig", ")", "{", "verifyIsNull", "(", ")", ";", "if", "(", "key", "!=", "null", "&&", "value", "!=", "null", ")", "{", "element", "(", "key", ...
Put a key/value pair in the JSONObject, but only if the key and the value are both non-null. @param key A key string. @param value An object which is the value. It should be of one of these types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String, or the JSONNull object. @return this. @throws JSONException...
[ "Put", "a", "key", "/", "value", "pair", "in", "the", "JSONObject", "but", "only", "if", "the", "key", "and", "the", "value", "are", "both", "non", "-", "null", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JSONObject.java#L1746-L1752
adamfisk/littleshoot-commons-id
src/main/java/org/apache/commons/id/uuid/Bytes.java
Bytes.areEqual
public static boolean areEqual(byte[] a, byte[] b) { """ Compares two byte arrays for equality. @param a A byte[]. @param b A byte[]. @return True if the arrays have identical contents. """ int aLength = a.length; if (aLength != b.length) { return false; } for ...
java
public static boolean areEqual(byte[] a, byte[] b) { int aLength = a.length; if (aLength != b.length) { return false; } for (int i = 0; i < aLength; i++) { if (a[i] != b[i]) { return false; } } return true; }
[ "public", "static", "boolean", "areEqual", "(", "byte", "[", "]", "a", ",", "byte", "[", "]", "b", ")", "{", "int", "aLength", "=", "a", ".", "length", ";", "if", "(", "aLength", "!=", "b", ".", "length", ")", "{", "return", "false", ";", "}", ...
Compares two byte arrays for equality. @param a A byte[]. @param b A byte[]. @return True if the arrays have identical contents.
[ "Compares", "two", "byte", "arrays", "for", "equality", "." ]
train
https://github.com/adamfisk/littleshoot-commons-id/blob/49a8f5f2b10831c509876ca463bf1a87e1e49ae9/src/main/java/org/apache/commons/id/uuid/Bytes.java#L110-L122
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/CellConstraints.java
CellConstraints.setAlignments
private void setAlignments(String encodedAlignments, boolean horizontalThenVertical) { """ Decodes a string description for the horizontal and vertical alignment and sets this CellConstraints' alignment values. If the boolean is {@code true} the horizontal alignment is the first token, and the vertical alignment...
java
private void setAlignments(String encodedAlignments, boolean horizontalThenVertical) { StringTokenizer tokenizer = new StringTokenizer(encodedAlignments, " ,"); Alignment first = decodeAlignment(tokenizer.nextToken()); Alignment second = decodeAlignment(tokenizer.nextToken()); hAlign = h...
[ "private", "void", "setAlignments", "(", "String", "encodedAlignments", ",", "boolean", "horizontalThenVertical", ")", "{", "StringTokenizer", "tokenizer", "=", "new", "StringTokenizer", "(", "encodedAlignments", ",", "\" ,\"", ")", ";", "Alignment", "first", "=", "...
Decodes a string description for the horizontal and vertical alignment and sets this CellConstraints' alignment values. If the boolean is {@code true} the horizontal alignment is the first token, and the vertical alignment is the second token. if the boolean is {@code false} the vertical alignment comes first. <p> Val...
[ "Decodes", "a", "string", "description", "for", "the", "horizontal", "and", "vertical", "alignment", "and", "sets", "this", "CellConstraints", "alignment", "values", ".", "If", "the", "boolean", "is", "{", "@code", "true", "}", "the", "horizontal", "alignment", ...
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/CellConstraints.java#L833-L840
evernote/android-state
library/src/main/java/com/evernote/android/state/StateSaver.java
StateSaver.saveInstanceState
public static <T> void saveInstanceState(@NonNull T target, @NonNull Bundle state) { """ Save the given {@code target} in the passed in {@link Bundle}. @param target The object containing fields annotated with {@link State}. @param state The object is saved into this bundle. """ IMPL.saveInstanceS...
java
public static <T> void saveInstanceState(@NonNull T target, @NonNull Bundle state) { IMPL.saveInstanceState(target, state); }
[ "public", "static", "<", "T", ">", "void", "saveInstanceState", "(", "@", "NonNull", "T", "target", ",", "@", "NonNull", "Bundle", "state", ")", "{", "IMPL", ".", "saveInstanceState", "(", "target", ",", "state", ")", ";", "}" ]
Save the given {@code target} in the passed in {@link Bundle}. @param target The object containing fields annotated with {@link State}. @param state The object is saved into this bundle.
[ "Save", "the", "given", "{", "@code", "target", "}", "in", "the", "passed", "in", "{", "@link", "Bundle", "}", "." ]
train
https://github.com/evernote/android-state/blob/6d56c0c5709f330324ec23d39c3f70c9d59bf6d3/library/src/main/java/com/evernote/android/state/StateSaver.java#L41-L43
lessthanoptimal/ddogleg
examples/src/org/ddogleg/example/DistanceFromLine.java
DistanceFromLine.computeDistance
@Override public void computeDistance(List<Point2D> obs, double[] distance) { """ There are some situations where processing everything as a list can speed things up a lot. This is not one of them. """ for( int i = 0; i < obs.size(); i++ ) { distance[i] = computeDistance(obs.get(i)); } }
java
@Override public void computeDistance(List<Point2D> obs, double[] distance) { for( int i = 0; i < obs.size(); i++ ) { distance[i] = computeDistance(obs.get(i)); } }
[ "@", "Override", "public", "void", "computeDistance", "(", "List", "<", "Point2D", ">", "obs", ",", "double", "[", "]", "distance", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "obs", ".", "size", "(", ")", ";", "i", "++", ")", "{...
There are some situations where processing everything as a list can speed things up a lot. This is not one of them.
[ "There", "are", "some", "situations", "where", "processing", "everything", "as", "a", "list", "can", "speed", "things", "up", "a", "lot", ".", "This", "is", "not", "one", "of", "them", "." ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/examples/src/org/ddogleg/example/DistanceFromLine.java#L67-L72
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/utils/FastDateFormat.java
FastDateFormat.getDateTimeInstance
public static synchronized FastDateFormat getDateTimeInstance(int dateStyle, int timeStyle, TimeZone timeZone, Locale locale) { """ <p>Gets a date/time formatter instance using the specified style, time zone and locale.</p> @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT @param timeSty...
java
public static synchronized FastDateFormat getDateTimeInstance(int dateStyle, int timeStyle, TimeZone timeZone, Locale locale) { Object key = new Pair(new Integer(dateStyle), new Integer(timeStyle)); if (timeZone != null) { key = new Pair(key, timeZone); } ...
[ "public", "static", "synchronized", "FastDateFormat", "getDateTimeInstance", "(", "int", "dateStyle", ",", "int", "timeStyle", ",", "TimeZone", "timeZone", ",", "Locale", "locale", ")", "{", "Object", "key", "=", "new", "Pair", "(", "new", "Integer", "(", "dat...
<p>Gets a date/time formatter instance using the specified style, time zone and locale.</p> @param dateStyle date style: FULL, LONG, MEDIUM, or SHORT @param timeStyle time style: FULL, LONG, MEDIUM, or SHORT @param timeZone optional time zone, overrides time zone of formatted date @param locale optional locale, ov...
[ "<p", ">", "Gets", "a", "date", "/", "time", "formatter", "instance", "using", "the", "specified", "style", "time", "zone", "and", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/utils/FastDateFormat.java#L458-L484
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/eig/watched/WatchedDoubleStepQREigen_DDRM.java
WatchedDoubleStepQREigen_DDRM.performImplicitDoubleStep
public void performImplicitDoubleStep(int x1, int x2 , double real , double img ) { """ Performs an implicit double step given the set of two imaginary eigenvalues provided. Since one eigenvalue is the complex conjugate of the other only one set of real and imaginary numbers is needed. @param x1 upper index ...
java
public void performImplicitDoubleStep(int x1, int x2 , double real , double img ) { double a11 = A.get(x1,x1); double a21 = A.get(x1+1,x1); double a12 = A.get(x1,x1+1); double a22 = A.get(x1+1,x1+1); double a32 = A.get(x1+2,x1+1); double p_plus_t = 2.0*real; dou...
[ "public", "void", "performImplicitDoubleStep", "(", "int", "x1", ",", "int", "x2", ",", "double", "real", ",", "double", "img", ")", "{", "double", "a11", "=", "A", ".", "get", "(", "x1", ",", "x1", ")", ";", "double", "a21", "=", "A", ".", "get", ...
Performs an implicit double step given the set of two imaginary eigenvalues provided. Since one eigenvalue is the complex conjugate of the other only one set of real and imaginary numbers is needed. @param x1 upper index of submatrix. @param x2 lower index of submatrix. @param real Real component of each of the eigenv...
[ "Performs", "an", "implicit", "double", "step", "given", "the", "set", "of", "two", "imaginary", "eigenvalues", "provided", ".", "Since", "one", "eigenvalue", "is", "the", "complex", "conjugate", "of", "the", "other", "only", "one", "set", "of", "real", "and...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/eig/watched/WatchedDoubleStepQREigen_DDRM.java#L252-L276
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/RedisStorage.java
RedisStorage.getTriggerState
@Override public Trigger.TriggerState getTriggerState(TriggerKey triggerKey, Jedis jedis) { """ Get the current state of the identified <code>{@link org.quartz.Trigger}</code>. @param triggerKey the key of the desired trigger @param jedis a thread-safe Redis connection @return the state of the trigger "...
java
@Override public Trigger.TriggerState getTriggerState(TriggerKey triggerKey, Jedis jedis){ final String triggerHashKey = redisSchema.triggerHashKey(triggerKey); Pipeline pipe = jedis.pipelined(); Map<RedisTriggerState, Response<Double>> scores = new HashMap<>(RedisTriggerState.values().lengt...
[ "@", "Override", "public", "Trigger", ".", "TriggerState", "getTriggerState", "(", "TriggerKey", "triggerKey", ",", "Jedis", "jedis", ")", "{", "final", "String", "triggerHashKey", "=", "redisSchema", ".", "triggerHashKey", "(", "triggerKey", ")", ";", "Pipeline",...
Get the current state of the identified <code>{@link org.quartz.Trigger}</code>. @param triggerKey the key of the desired trigger @param jedis a thread-safe Redis connection @return the state of the trigger
[ "Get", "the", "current", "state", "of", "the", "identified", "<code", ">", "{" ]
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisStorage.java#L421-L436
EdwardRaff/JSAT
JSAT/src/jsat/SimpleDataSet.java
SimpleDataSet.asRegressionDataSet
public RegressionDataSet asRegressionDataSet(int index) { """ Converts this dataset into one meant for regression problems. The given numeric feature index is removed from the data and made the target variable for the regression problem. @param index the regression variable index, should be in the range [0, ...
java
public RegressionDataSet asRegressionDataSet(int index) { if(index < 0) throw new IllegalArgumentException("Index must be a non-negative value"); else if(getNumNumericalVars()== 0) throw new IllegalArgumentException("Dataset has no numeric variables, can not create regre...
[ "public", "RegressionDataSet", "asRegressionDataSet", "(", "int", "index", ")", "{", "if", "(", "index", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"Index must be a non-negative value\"", ")", ";", "else", "if", "(", "getNumNumericalVars", "("...
Converts this dataset into one meant for regression problems. The given numeric feature index is removed from the data and made the target variable for the regression problem. @param index the regression variable index, should be in the range [0, {@link #getNumNumericalVars() }) @return a new dataset where one numeric...
[ "Converts", "this", "dataset", "into", "one", "meant", "for", "regression", "problems", ".", "The", "given", "numeric", "feature", "index", "is", "removed", "from", "the", "data", "and", "made", "the", "target", "variable", "for", "the", "regression", "problem...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/SimpleDataSet.java#L109-L122
vigna/Sux4J
src/it/unimi/dsi/sux4j/mph/HypergraphSorter.java
HypergraphSorter.generateAndSort
public boolean generateAndSort(final Iterator<long[]> iterator, final long seed) { """ Generates a random 3-hypergraph and tries to sort its edges. @param iterator an iterator returning {@link #numEdges} triples of longs. @param seed a 64-bit random seed. @return true if the sorting procedure succeeded. "...
java
public boolean generateAndSort(final Iterator<long[]> iterator, final long seed) { // We cache all variables for faster access final int[] d = this.d; final int[] e = new int[3]; cleanUpIfNecessary(); /* We build the XOR'd edge list and compute the degree of each vertex. */ for(int k = 0; k < numEdges; k++...
[ "public", "boolean", "generateAndSort", "(", "final", "Iterator", "<", "long", "[", "]", ">", "iterator", ",", "final", "long", "seed", ")", "{", "// We cache all variables for faster access", "final", "int", "[", "]", "d", "=", "this", ".", "d", ";", "final...
Generates a random 3-hypergraph and tries to sort its edges. @param iterator an iterator returning {@link #numEdges} triples of longs. @param seed a 64-bit random seed. @return true if the sorting procedure succeeded.
[ "Generates", "a", "random", "3", "-", "hypergraph", "and", "tries", "to", "sort", "its", "edges", "." ]
train
https://github.com/vigna/Sux4J/blob/d57de8fa897c7d273e0e6dae7a3274174f175a5f/src/it/unimi/dsi/sux4j/mph/HypergraphSorter.java#L339-L357
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassTableUI.java
SeaGlassTableUI.paintCell
private void paintCell(SeaGlassContext context, Graphics g, Rectangle cellRect, int row, int column) { """ DOCUMENT ME! @param context DOCUMENT ME! @param g DOCUMENT ME! @param cellRect DOCUMENT ME! @param row DOCUMENT ME! @param column DOCUMENT ME! """ if (table.isEditing() && ta...
java
private void paintCell(SeaGlassContext context, Graphics g, Rectangle cellRect, int row, int column) { if (table.isEditing() && table.getEditingRow() == row && table.getEditingColumn() == column) { Component component = table.getEditorComponent(); component.setBounds(cellRect); ...
[ "private", "void", "paintCell", "(", "SeaGlassContext", "context", ",", "Graphics", "g", ",", "Rectangle", "cellRect", ",", "int", "row", ",", "int", "column", ")", "{", "if", "(", "table", ".", "isEditing", "(", ")", "&&", "table", ".", "getEditingRow", ...
DOCUMENT ME! @param context DOCUMENT ME! @param g DOCUMENT ME! @param cellRect DOCUMENT ME! @param row DOCUMENT ME! @param column DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassTableUI.java#L949-L961
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/WaveformDetailComponent.java
WaveformDetailComponent.setPlaybackState
public synchronized void setPlaybackState(int player, long position, boolean playing) { """ Set the current playback state for a player. Will cause part of the component to be redrawn if the player state has changed (and we have the {@link TrackMetadata} we need to translate the time into a position in the co...
java
public synchronized void setPlaybackState(int player, long position, boolean playing) { if (getMonitoredPlayer() != 0 && player != getMonitoredPlayer()) { throw new IllegalStateException("Cannot setPlaybackState for another player when monitoring player " + getMonitoredPlayer()); } i...
[ "public", "synchronized", "void", "setPlaybackState", "(", "int", "player", ",", "long", "position", ",", "boolean", "playing", ")", "{", "if", "(", "getMonitoredPlayer", "(", ")", "!=", "0", "&&", "player", "!=", "getMonitoredPlayer", "(", ")", ")", "{", ...
Set the current playback state for a player. Will cause part of the component to be redrawn if the player state has changed (and we have the {@link TrackMetadata} we need to translate the time into a position in the component). This will be quickly overruled if a player is being monitored, but can be used in other con...
[ "Set", "the", "current", "playback", "state", "for", "a", "player", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/WaveformDetailComponent.java#L206-L219
rototor/pdfbox-graphics2d
src/main/java/de/rototor/pdfbox/graphics2d/PdfBoxGraphics2DFontTextDrawer.java
PdfBoxGraphics2DFontTextDrawer.registerFont
@SuppressWarnings("WeakerAccess") public void registerFont(String name, PDFont font) { """ Register a font which is already associated with the PDDocument @param name the name of the font as returned by {@link java.awt.Font#getFontName()}. This name is used for the mapping the java.awt.Font to this PDFont. ...
java
@SuppressWarnings("WeakerAccess") public void registerFont(String name, PDFont font) { fontMap.put(name, font); }
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "public", "void", "registerFont", "(", "String", "name", ",", "PDFont", "font", ")", "{", "fontMap", ".", "put", "(", "name", ",", "font", ")", ";", "}" ]
Register a font which is already associated with the PDDocument @param name the name of the font as returned by {@link java.awt.Font#getFontName()}. This name is used for the mapping the java.awt.Font to this PDFont. @param font the PDFont to use. This font must be loaded in the current document.
[ "Register", "a", "font", "which", "is", "already", "associated", "with", "the", "PDDocument" ]
train
https://github.com/rototor/pdfbox-graphics2d/blob/86d53942cf2c137edca59d45766927c077f49230/src/main/java/de/rototor/pdfbox/graphics2d/PdfBoxGraphics2DFontTextDrawer.java#L152-L155
codegist/crest
core/src/main/java/org/codegist/crest/util/MultiParts.java
MultiParts.putMetaDatas
public static void putMetaDatas(Map<String, Object> metadatas, String contentType, String fileName) { """ Puts multipart metadata informations into the given metadata map @param metadatas map to put the metadata into @param contentType multipart content-type. can be null or empty @param fileName multipart file ...
java
public static void putMetaDatas(Map<String, Object> metadatas, String contentType, String fileName){ metadatas.put(MULTIPART_FLAG, true); if(isNotBlank(contentType)) { metadatas.put(CONTENT_TYPE, contentType); } if(isNotBlank(fileName)) { metadatas.put(FILENAME, f...
[ "public", "static", "void", "putMetaDatas", "(", "Map", "<", "String", ",", "Object", ">", "metadatas", ",", "String", "contentType", ",", "String", "fileName", ")", "{", "metadatas", ".", "put", "(", "MULTIPART_FLAG", ",", "true", ")", ";", "if", "(", "...
Puts multipart metadata informations into the given metadata map @param metadatas map to put the metadata into @param contentType multipart content-type. can be null or empty @param fileName multipart file name. can be null or empty
[ "Puts", "multipart", "metadata", "informations", "into", "the", "given", "metadata", "map" ]
train
https://github.com/codegist/crest/blob/e99ba7728b27d2ddb2c247261350f1b6fa7a6698/core/src/main/java/org/codegist/crest/util/MultiParts.java#L119-L127
cycorp/api-suite
core-api/src/main/java/com/cyc/CycServicesLoader.java
CycServicesLoader.getApiEntryPoint
protected synchronized <T extends CycApiEntryPoint> T getApiEntryPoint( Class<T> clazz, boolean allowMissingServices) { """ ====| Protected |=======================================================================// """ if (!entryPointServices.containsKey(clazz)) { entryPointServices.p...
java
protected synchronized <T extends CycApiEntryPoint> T getApiEntryPoint( Class<T> clazz, boolean allowMissingServices) { if (!entryPointServices.containsKey(clazz)) { entryPointServices.put(clazz, loadApiEntryPoint(clazz, allowMissingServices)); } return (T) entryPointServices.get(clazz); }
[ "protected", "synchronized", "<", "T", "extends", "CycApiEntryPoint", ">", "T", "getApiEntryPoint", "(", "Class", "<", "T", ">", "clazz", ",", "boolean", "allowMissingServices", ")", "{", "if", "(", "!", "entryPointServices", ".", "containsKey", "(", "clazz", ...
====| Protected |=======================================================================//
[ "====", "|", "Protected", "|", "=======================================================================", "//" ]
train
https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/CycServicesLoader.java#L59-L65
davidcarboni-archive/httpino
src/main/java/com/github/davidcarboni/httpino/Http.java
Http.getFile
public static Path getFile(HttpServletRequest request) throws IOException { """ Handles reading an uploaded file. @param request The http request. @return A temp file containing the file data. @throws IOException If an error occurs in processing the file. """ Path result = null; ...
java
public static Path getFile(HttpServletRequest request) throws IOException { Path result = null; // Set up the objects that do all the heavy lifting DiskFileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); tr...
[ "public", "static", "Path", "getFile", "(", "HttpServletRequest", "request", ")", "throws", "IOException", "{", "Path", "result", "=", "null", ";", "// Set up the objects that do all the heavy lifting", "DiskFileItemFactory", "factory", "=", "new", "DiskFileItemFactory", ...
Handles reading an uploaded file. @param request The http request. @return A temp file containing the file data. @throws IOException If an error occurs in processing the file.
[ "Handles", "reading", "an", "uploaded", "file", "." ]
train
https://github.com/davidcarboni-archive/httpino/blob/a78c91874e6d9b2e452cf3aa68d4fea804d977ca/src/main/java/com/github/davidcarboni/httpino/Http.java#L385-L407
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/cache/CacheUtil.java
CacheUtil.createLocalHash
public static File createLocalHash(File resource, String remoteLocation) throws ResourceDownloadError { """ Creates a hash of the contents of the {@link File} <tt>resource</tt> and writes it to a file alongside the real resource file. The hash file can be found by appending {@link ResourceType#SHA25...
java
public static File createLocalHash(File resource, String remoteLocation) throws ResourceDownloadError { File localHashFile; try { String contents = readFileToString(resource); String hashValue = hasher.hashValue(contents); String absPath = resource.getAbs...
[ "public", "static", "File", "createLocalHash", "(", "File", "resource", ",", "String", "remoteLocation", ")", "throws", "ResourceDownloadError", "{", "File", "localHashFile", ";", "try", "{", "String", "contents", "=", "readFileToString", "(", "resource", ")", ";"...
Creates a hash of the contents of the {@link File} <tt>resource</tt> and writes it to a file alongside the real resource file. The hash file can be found by appending {@link ResourceType#SHA256_EXTENSION} to the resource path. @param resource {@link File}, the local resource file @param remoteLocation {@link String},...
[ "Creates", "a", "hash", "of", "the", "contents", "of", "the", "{", "@link", "File", "}", "<tt", ">", "resource<", "/", "tt", ">", "and", "writes", "it", "to", "a", "file", "alongside", "the", "real", "resource", "file", ".", "The", "hash", "file", "c...
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/df/cache/CacheUtil.java#L237-L253
apache/incubator-gobblin
gobblin-salesforce/src/main/java/org/apache/gobblin/salesforce/SalesforceExtractor.java
SalesforceExtractor.fetchResultBatch
private void fetchResultBatch(RecordSetList<JsonElement> rs, int initialRecordCount) throws DataRecordException, IOException { """ Fetch records into a {@link RecordSetList} up to the configured batch size {@link #batchSize}. This batch is not the entire Salesforce result batch. It is an internal batch in t...
java
private void fetchResultBatch(RecordSetList<JsonElement> rs, int initialRecordCount) throws DataRecordException, IOException { int recordCount = initialRecordCount; // Stream the resultset through CSV reader to identify columns in each record InputStreamCSVReader reader = new InputStreamCSVReader(thi...
[ "private", "void", "fetchResultBatch", "(", "RecordSetList", "<", "JsonElement", ">", "rs", ",", "int", "initialRecordCount", ")", "throws", "DataRecordException", ",", "IOException", "{", "int", "recordCount", "=", "initialRecordCount", ";", "// Stream the resultset th...
Fetch records into a {@link RecordSetList} up to the configured batch size {@link #batchSize}. This batch is not the entire Salesforce result batch. It is an internal batch in the extractor for buffering a subset of the result stream that comes from a Salesforce batch for more efficient processing. @param rs the record...
[ "Fetch", "records", "into", "a", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-salesforce/src/main/java/org/apache/gobblin/salesforce/SalesforceExtractor.java#L842-L870
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/QueryRequest.java
QueryRequest.withKeyConditions
public QueryRequest withKeyConditions(java.util.Map<String, Condition> keyConditions) { """ <p> This is a legacy parameter. Use <code>KeyConditionExpression</code> instead. For more information, see <a href= "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.KeyConditio...
java
public QueryRequest withKeyConditions(java.util.Map<String, Condition> keyConditions) { setKeyConditions(keyConditions); return this; }
[ "public", "QueryRequest", "withKeyConditions", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "Condition", ">", "keyConditions", ")", "{", "setKeyConditions", "(", "keyConditions", ")", ";", "return", "this", ";", "}" ]
<p> This is a legacy parameter. Use <code>KeyConditionExpression</code> instead. For more information, see <a href= "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.KeyConditions.html" >KeyConditions</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p> @param keyConditio...
[ "<p", ">", "This", "is", "a", "legacy", "parameter", ".", "Use", "<code", ">", "KeyConditionExpression<", "/", "code", ">", "instead", ".", "For", "more", "information", "see", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/QueryRequest.java#L1471-L1474
playframework/play-ws
play-ahc-ws-standalone/src/main/java/play/libs/oauth/OAuth.java
OAuth.retrieveAccessToken
public RequestToken retrieveAccessToken(RequestToken token, String verifier) { """ Exchange a request token for an access token. @param token the token/secret pair obtained from a previous call @param verifier a string you got through your user, with redirection @return A Right(RequestToken) in case of suc...
java
public RequestToken retrieveAccessToken(RequestToken token, String verifier) { OAuthConsumer consumer = new DefaultOAuthConsumer(info.key.key, info.key.secret); consumer.setTokenWithSecret(token.token, token.secret); try { provider.retrieveAccessToken(consumer, verifier); ...
[ "public", "RequestToken", "retrieveAccessToken", "(", "RequestToken", "token", ",", "String", "verifier", ")", "{", "OAuthConsumer", "consumer", "=", "new", "DefaultOAuthConsumer", "(", "info", ".", "key", ".", "key", ",", "info", ".", "key", ".", "secret", ")...
Exchange a request token for an access token. @param token the token/secret pair obtained from a previous call @param verifier a string you got through your user, with redirection @return A Right(RequestToken) in case of success, Left(OAuthException) otherwise
[ "Exchange", "a", "request", "token", "for", "an", "access", "token", "." ]
train
https://github.com/playframework/play-ws/blob/fbc25196eb6295281e9b43810e45c252913fbfcf/play-ahc-ws-standalone/src/main/java/play/libs/oauth/OAuth.java#L61-L70
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCachedGenerator.java
AbstractCachedGenerator.retrieveFromCache
protected Reader retrieveFromCache(String path, GeneratorContext context, CacheMode cacheMode) { """ Retrieves the resource from cache if it exists @param path the resource path @param context the generator context @param cacheMode the cache mode @return the reader to the resource """ Reader rd = n...
java
protected Reader retrieveFromCache(String path, GeneratorContext context, CacheMode cacheMode) { Reader rd = null; String filePath = getTempFilePath(context, cacheMode); FileInputStream fis = null; File file = new File(filePath); if (file.exists()) { try { fis = new FileInputStream(file); } catc...
[ "protected", "Reader", "retrieveFromCache", "(", "String", "path", ",", "GeneratorContext", "context", ",", "CacheMode", "cacheMode", ")", "{", "Reader", "rd", "=", "null", ";", "String", "filePath", "=", "getTempFilePath", "(", "context", ",", "cacheMode", ")",...
Retrieves the resource from cache if it exists @param path the resource path @param context the generator context @param cacheMode the cache mode @return the reader to the resource
[ "Retrieves", "the", "resource", "from", "cache", "if", "it", "exists" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/AbstractCachedGenerator.java#L456-L478
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/EditText.java
EditText.getOffsetForPosition
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public final int getOffsetForPosition(final float x, final float y) { """ Get the character offset closest to the specified absolute position. A typical use case is to pass the result of {@link MotionEvent#getX()} and {@link MotionEvent#getY()} to this method...
java
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public final int getOffsetForPosition(final float x, final float y) { return getView().getOffsetForPosition(x, y); }
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "ICE_CREAM_SANDWICH", ")", "public", "final", "int", "getOffsetForPosition", "(", "final", "float", "x", ",", "final", "float", "y", ")", "{", "return", "getView", "(", ")", ".", "getOffsetForPosition"...
Get the character offset closest to the specified absolute position. A typical use case is to pass the result of {@link MotionEvent#getX()} and {@link MotionEvent#getY()} to this method. @param x The horizontal absolute position of a point on screen @param y The vertical absolute position of a point on screen @return ...
[ "Get", "the", "character", "offset", "closest", "to", "the", "specified", "absolute", "position", ".", "A", "typical", "use", "case", "is", "to", "pass", "the", "result", "of", "{", "@link", "MotionEvent#getX", "()", "}", "and", "{", "@link", "MotionEvent#ge...
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/EditText.java#L2257-L2260
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java
KeyVaultClientCustomImpl.getCertificateAsync
public ServiceFuture<CertificateBundle> getCertificateAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<CertificateBundle> serviceCallback) { """ Gets information about a specified certificate. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param c...
java
public ServiceFuture<CertificateBundle> getCertificateAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<CertificateBundle> serviceCallback) { return getCertificateAsync(vaultBaseUrl, certificateName, "", serviceCallback); }
[ "public", "ServiceFuture", "<", "CertificateBundle", ">", "getCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "final", "ServiceCallback", "<", "CertificateBundle", ">", "serviceCallback", ")", "{", "return", "getCertificateAsync", ...
Gets information about a specified certificate. @param vaultBaseUrl The vault name, e.g. https://myvault.vault.azure.net @param certificateName The name of the certificate in the given vault @param serviceCallback the async ServiceCallback to handle successful and failed responses. @return the {@link ServiceFuture} ob...
[ "Gets", "information", "about", "a", "specified", "certificate", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientCustomImpl.java#L1720-L1723
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/HopkinsStatisticClusteringTendency.java
HopkinsStatisticClusteringTendency.computeNNForUniformData
protected double computeNNForUniformData(final KNNQuery<NumberVector> knnQuery, final double[] min, final double[] extend) { """ Search nearest neighbors for <em>artificial, uniform</em> data. @param knnQuery KNN query @param min Data minima @param extend Data extend @return Aggregated 1NN distances """ ...
java
protected double computeNNForUniformData(final KNNQuery<NumberVector> knnQuery, final double[] min, final double[] extend) { final Random rand = random.getSingleThreadedRandom(); final int dim = min.length; double[] buf = new double[dim]; double u = 0.; for(int i = 0; i < sampleSize; i++) { ...
[ "protected", "double", "computeNNForUniformData", "(", "final", "KNNQuery", "<", "NumberVector", ">", "knnQuery", ",", "final", "double", "[", "]", "min", ",", "final", "double", "[", "]", "extend", ")", "{", "final", "Random", "rand", "=", "random", ".", ...
Search nearest neighbors for <em>artificial, uniform</em> data. @param knnQuery KNN query @param min Data minima @param extend Data extend @return Aggregated 1NN distances
[ "Search", "nearest", "neighbors", "for", "<em", ">", "artificial", "uniform<", "/", "em", ">", "data", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/statistics/HopkinsStatisticClusteringTendency.java#L222-L238
jenkinsci/jenkins
core/src/main/java/hudson/util/ArgumentListBuilder.java
ArgumentListBuilder.add
public ArgumentListBuilder add(String a, boolean mask) { """ Optionally hide this part of the command line from being printed to the log. @param a a command argument @param mask true to suppress in output, false to print normally @return this @see hudson.Launcher.ProcStarter#masks(boolean[]) @see Launcher#mas...
java
public ArgumentListBuilder add(String a, boolean mask) { if(a!=null) { if(mask) { this.mask.set(args.size()); } args.add(a); } return this; }
[ "public", "ArgumentListBuilder", "add", "(", "String", "a", ",", "boolean", "mask", ")", "{", "if", "(", "a", "!=", "null", ")", "{", "if", "(", "mask", ")", "{", "this", ".", "mask", ".", "set", "(", "args", ".", "size", "(", ")", ")", ";", "}...
Optionally hide this part of the command line from being printed to the log. @param a a command argument @param mask true to suppress in output, false to print normally @return this @see hudson.Launcher.ProcStarter#masks(boolean[]) @see Launcher#maskedPrintCommandLine(List, boolean[], FilePath) @since 1.378
[ "Optionally", "hide", "this", "part", "of", "the", "command", "line", "from", "being", "printed", "to", "the", "log", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/ArgumentListBuilder.java#L90-L98
Azure/azure-sdk-for-java
recoveryservices.backup/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_12_01/implementation/ProtectedItemsInner.java
ProtectedItemsInner.createOrUpdateAsync
public Observable<Void> createOrUpdateAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters) { """ Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asy...
java
public Observable<Void> createOrUpdateAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, ProtectedItemResourceInner parameters) { return createOrUpdateWithServiceResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItem...
[ "public", "Observable", "<", "Void", ">", "createOrUpdateAsync", "(", "String", "vaultName", ",", "String", "resourceGroupName", ",", "String", "fabricName", ",", "String", "containerName", ",", "String", "protectedItemName", ",", "ProtectedItemResourceInner", "paramete...
Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. @param vaultName The name of the recovery services vault. @param resourceGroupName The name of the resource g...
[ "Enables", "backup", "of", "an", "item", "or", "to", "modifies", "the", "backup", "policy", "information", "of", "an", "already", "backed", "up", "item", ".", "This", "is", "an", "asynchronous", "operation", ".", "To", "know", "the", "status", "of", "the",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/recoveryservices.backup/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/recoveryservices/backup/v2016_12_01/implementation/ProtectedItemsInner.java#L330-L337
AlmogBaku/IntlPhoneInput
intlphoneinput/src/main/java/net/rimoto/intlphoneinput/CountrySpinnerAdapter.java
CountrySpinnerAdapter.getView
@Override public View getView(int position, View convertView, ViewGroup parent) { """ Drop down selected view @param position position of selected item @param convertView View of selected item @param parent parent of selected view @return convertView """ Country country = getItem(posi...
java
@Override public View getView(int position, View convertView, ViewGroup parent) { Country country = getItem(position); if (convertView == null) { convertView = new ImageView(getContext()); } ((ImageView) convertView).setImageResource(getFlagResource(country)); ...
[ "@", "Override", "public", "View", "getView", "(", "int", "position", ",", "View", "convertView", ",", "ViewGroup", "parent", ")", "{", "Country", "country", "=", "getItem", "(", "position", ")", ";", "if", "(", "convertView", "==", "null", ")", "{", "co...
Drop down selected view @param position position of selected item @param convertView View of selected item @param parent parent of selected view @return convertView
[ "Drop", "down", "selected", "view" ]
train
https://github.com/AlmogBaku/IntlPhoneInput/blob/ac7313a2d1683feb4d535d5dbee6676b53879059/intlphoneinput/src/main/java/net/rimoto/intlphoneinput/CountrySpinnerAdapter.java#L61-L72
j256/simplecsv
src/main/java/com/j256/simplecsv/processor/CsvProcessor.java
CsvProcessor.writeAll
public void writeAll(Writer writer, Collection<T> entities, boolean writeHeader) throws IOException { """ Write a header and then the collection of entities to the writer. @param writer Where to write the header and entities. It will be closed before this method returns. @param entities Collection of entitie...
java
public void writeAll(Writer writer, Collection<T> entities, boolean writeHeader) throws IOException { checkEntityConfig(); BufferedWriter bufferedWriter = new BufferedWriter(writer); try { if (writeHeader) { writeHeader(bufferedWriter, true); } for (T entity : entities) { writeRow(bufferedWriter,...
[ "public", "void", "writeAll", "(", "Writer", "writer", ",", "Collection", "<", "T", ">", "entities", ",", "boolean", "writeHeader", ")", "throws", "IOException", "{", "checkEntityConfig", "(", ")", ";", "BufferedWriter", "bufferedWriter", "=", "new", "BufferedWr...
Write a header and then the collection of entities to the writer. @param writer Where to write the header and entities. It will be closed before this method returns. @param entities Collection of entities to write to the writer. @param writeHeader Set to true to write header at the start of the writer. @throws IOExcep...
[ "Write", "a", "header", "and", "then", "the", "collection", "of", "entities", "to", "the", "writer", "." ]
train
https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L426-L439
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/util/UrlUtilities.java
UrlUtilities.buildUrl
@Deprecated public static URL buildUrl(String host, int port, String path, Map<String, String> parameters) throws MalformedURLException { """ Build a request URL. @param host The host @param port The port @param path The path @param parameters The parameters @return The URL @throws MalformedURLExc...
java
@Deprecated public static URL buildUrl(String host, int port, String path, Map<String, String> parameters) throws MalformedURLException { return buildUrl("http", port, path, parameters); }
[ "@", "Deprecated", "public", "static", "URL", "buildUrl", "(", "String", "host", ",", "int", "port", ",", "String", "path", ",", "Map", "<", "String", ",", "String", ">", "parameters", ")", "throws", "MalformedURLException", "{", "return", "buildUrl", "(", ...
Build a request URL. @param host The host @param port The port @param path The path @param parameters The parameters @return The URL @throws MalformedURLException @deprecated use {@link #buildSecureUrl(java.lang.String, int, java.lang.String, java.util.Map) }
[ "Build", "a", "request", "URL", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/util/UrlUtilities.java#L34-L37
likethecolor/Alchemy-API
src/main/java/com/likethecolor/alchemy/api/parser/json/ImageParser.java
ImageParser.getImageKeyword
private JSONObject getImageKeyword(final JSONArray imageKeywords, final int index) { """ Return a json object from the provided array. Return an empty object if there is any problems fetching the concept data. @param imageKeywords array of image keyword data @param index of the object to fetch @return jso...
java
private JSONObject getImageKeyword(final JSONArray imageKeywords, final int index) { JSONObject object = new JSONObject(); try { object = (JSONObject) imageKeywords.get(index); } catch(JSONException e) { e.printStackTrace(); } return object; }
[ "private", "JSONObject", "getImageKeyword", "(", "final", "JSONArray", "imageKeywords", ",", "final", "int", "index", ")", "{", "JSONObject", "object", "=", "new", "JSONObject", "(", ")", ";", "try", "{", "object", "=", "(", "JSONObject", ")", "imageKeywords",...
Return a json object from the provided array. Return an empty object if there is any problems fetching the concept data. @param imageKeywords array of image keyword data @param index of the object to fetch @return json object from the provided array
[ "Return", "a", "json", "object", "from", "the", "provided", "array", ".", "Return", "an", "empty", "object", "if", "there", "is", "any", "problems", "fetching", "the", "concept", "data", "." ]
train
https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/parser/json/ImageParser.java#L63-L72
gosu-lang/gosu-lang
gosu-core/src/main/java/gw/internal/gosu/template/TemplateGenerator.java
TemplateGenerator.generateTemplate
public static void generateTemplate( Reader readerTemplate, Writer writerOut, ISymbolTable symTable) throws TemplateParseException { """ Generates a template of any format having embedded Gosu. @param readerTemplate The source of the template. @param writerOut Where the output should go. @param symTa...
java
public static void generateTemplate( Reader readerTemplate, Writer writerOut, ISymbolTable symTable) throws TemplateParseException { generateTemplate(readerTemplate, writerOut, symTable, false); }
[ "public", "static", "void", "generateTemplate", "(", "Reader", "readerTemplate", ",", "Writer", "writerOut", ",", "ISymbolTable", "symTable", ")", "throws", "TemplateParseException", "{", "generateTemplate", "(", "readerTemplate", ",", "writerOut", ",", "symTable", ",...
Generates a template of any format having embedded Gosu. @param readerTemplate The source of the template. @param writerOut Where the output should go. @param symTable The symbol table to use. @throws TemplateParseException on execution exception
[ "Generates", "a", "template", "of", "any", "format", "having", "embedded", "Gosu", "." ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core/src/main/java/gw/internal/gosu/template/TemplateGenerator.java#L163-L167
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java
SelectAlgorithmAndInputPanel.loadInputData
@Override public void loadInputData(String fileName) { """ Loads a standardized file for input references @param fileName path to config file """ Reader r = media.openFile(fileName); List<PathLabel> refs = new ArrayList<>(); try { BufferedReader reader = new BufferedReader(r); String line; ...
java
@Override public void loadInputData(String fileName) { Reader r = media.openFile(fileName); List<PathLabel> refs = new ArrayList<>(); try { BufferedReader reader = new BufferedReader(r); String line; while( (line = reader.readLine()) != null ) { String[]z = line.split(":"); String[] names = n...
[ "@", "Override", "public", "void", "loadInputData", "(", "String", "fileName", ")", "{", "Reader", "r", "=", "media", ".", "openFile", "(", "fileName", ")", ";", "List", "<", "PathLabel", ">", "refs", "=", "new", "ArrayList", "<>", "(", ")", ";", "try"...
Loads a standardized file for input references @param fileName path to config file
[ "Loads", "a", "standardized", "file", "for", "input", "references" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/SelectAlgorithmAndInputPanel.java#L108-L133
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
TypeQualifierApplications.getInheritedTypeQualifierAnnotation
public static TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod o, TypeQualifierValue<?> typeQualifierValue) { """ Get the effective inherited TypeQualifierAnnotation on given instance method. @param o an XMethod @param typeQualifierValue the kind of TypeQualifierValue we are looking for ...
java
public static TypeQualifierAnnotation getInheritedTypeQualifierAnnotation(XMethod o, TypeQualifierValue<?> typeQualifierValue) { assert !o.isStatic(); ReturnTypeAnnotationAccumulator accumulator = new ReturnTypeAnnotationAccumulator(typeQualifierValue, o); try { AnalysisContext.curr...
[ "public", "static", "TypeQualifierAnnotation", "getInheritedTypeQualifierAnnotation", "(", "XMethod", "o", ",", "TypeQualifierValue", "<", "?", ">", "typeQualifierValue", ")", "{", "assert", "!", "o", ".", "isStatic", "(", ")", ";", "ReturnTypeAnnotationAccumulator", ...
Get the effective inherited TypeQualifierAnnotation on given instance method. @param o an XMethod @param typeQualifierValue the kind of TypeQualifierValue we are looking for @return effective TypeQualifierAnnotation inherited from overridden supertype methods, or null if there is no inherited TypeQualifierAnnotation
[ "Get", "the", "effective", "inherited", "TypeQualifierAnnotation", "on", "given", "instance", "method", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java#L684-L699
twitter/cloudhopper-commons
ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java
SslContextFactory.contains
private static boolean contains(Object[] arr, Object obj) { """ Does an object array include an object. @param arr The array @param obj The object """ for (Object o : arr) { if (o.equals(obj)) return true; } return false; }
java
private static boolean contains(Object[] arr, Object obj) { for (Object o : arr) { if (o.equals(obj)) return true; } return false; }
[ "private", "static", "boolean", "contains", "(", "Object", "[", "]", "arr", ",", "Object", "obj", ")", "{", "for", "(", "Object", "o", ":", "arr", ")", "{", "if", "(", "o", ".", "equals", "(", "obj", ")", ")", "return", "true", ";", "}", "return"...
Does an object array include an object. @param arr The array @param obj The object
[ "Does", "an", "object", "array", "include", "an", "object", "." ]
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-ssl/src/main/java/com/cloudhopper/commons/ssl/SslContextFactory.java#L401-L406
nats-io/java-nats
src/main/java/io/nats/client/impl/FileAuthHandler.java
FileAuthHandler.getJWT
public char[] getJWT() { """ getJWT should return the user JWT associated with this connection. This can return null for challenge only authentication, but for account/user JWT-based authentication you need to return the JWT bytes here. @return the user JWT """ try { char[] jwtChars = ...
java
public char[] getJWT() { try { char[] jwtChars = null; String fileToUse = this.jwtFile; if (this.chainFile != null) { fileToUse = this.chainFile; } byte[] data = Files.readAllBytes(Paths.get(fileToUse)); ByteBuffer bb = By...
[ "public", "char", "[", "]", "getJWT", "(", ")", "{", "try", "{", "char", "[", "]", "jwtChars", "=", "null", ";", "String", "fileToUse", "=", "this", ".", "jwtFile", ";", "if", "(", "this", ".", "chainFile", "!=", "null", ")", "{", "fileToUse", "=",...
getJWT should return the user JWT associated with this connection. This can return null for challenge only authentication, but for account/user JWT-based authentication you need to return the JWT bytes here. @return the user JWT
[ "getJWT", "should", "return", "the", "user", "JWT", "associated", "with", "this", "connection", ".", "This", "can", "return", "null", "for", "challenge", "only", "authentication", "but", "for", "account", "/", "user", "JWT", "-", "based", "authentication", "yo...
train
https://github.com/nats-io/java-nats/blob/5f291048fd30192ba39b3fe2925ecd60aaad6b48/src/main/java/io/nats/client/impl/FileAuthHandler.java#L189-L216
querydsl/querydsl
querydsl-sql/src/main/java/com/querydsl/sql/oracle/AbstractOracleQuery.java
AbstractOracleQuery.startWith
@WithBridgeMethods(value = OracleQuery.class, castRequired = true) public <A> C startWith(Predicate cond) { """ START WITH specifies the root row(s) of the hierarchy. @param cond condition @return the current object """ return addFlag(Position.BEFORE_ORDER, START_WITH, cond); }
java
@WithBridgeMethods(value = OracleQuery.class, castRequired = true) public <A> C startWith(Predicate cond) { return addFlag(Position.BEFORE_ORDER, START_WITH, cond); }
[ "@", "WithBridgeMethods", "(", "value", "=", "OracleQuery", ".", "class", ",", "castRequired", "=", "true", ")", "public", "<", "A", ">", "C", "startWith", "(", "Predicate", "cond", ")", "{", "return", "addFlag", "(", "Position", ".", "BEFORE_ORDER", ",", ...
START WITH specifies the root row(s) of the hierarchy. @param cond condition @return the current object
[ "START", "WITH", "specifies", "the", "root", "row", "(", "s", ")", "of", "the", "hierarchy", "." ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-sql/src/main/java/com/querydsl/sql/oracle/AbstractOracleQuery.java#L94-L97
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.crossTrackDistanceRad
public static double crossTrackDistanceRad(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ, double dist1Q) { """ Compute the cross-track distance. @param lat1 Latitude of starting point. @param lon1 Longitude of starting point. @param lat2 Latitude of destination point. @param lo...
java
public static double crossTrackDistanceRad(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ, double dist1Q) { final double dlon12 = lon2 - lon1; final double dlon1Q = lonQ - lon1; // Compute trigonometric functions only once. final DoubleWrapper tmp = new DoubleWrapper(); //...
[ "public", "static", "double", "crossTrackDistanceRad", "(", "double", "lat1", ",", "double", "lon1", ",", "double", "lat2", ",", "double", "lon2", ",", "double", "latQ", ",", "double", "lonQ", ",", "double", "dist1Q", ")", "{", "final", "double", "dlon12", ...
Compute the cross-track distance. @param lat1 Latitude of starting point. @param lon1 Longitude of starting point. @param lat2 Latitude of destination point. @param lon2 Longitude of destination point. @param latQ Latitude of query point. @param lonQ Longitude of query point. @param dist1Q Distance from starting point...
[ "Compute", "the", "cross", "-", "track", "distance", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L436-L462
cdk/cdk
legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java
CDKRGraph.mustContinue
private boolean mustContinue(BitSet potentialNode) { """ Determine if there are potential solution remaining. @param potentialNode set of remaining potential nodes @return true if maxIterator is worse to continue the search """ boolean result = true; boolean cancel = false; ...
java
private boolean mustContinue(BitSet potentialNode) { boolean result = true; boolean cancel = false; BitSet projG1 = projectG1(potentialNode); BitSet projG2 = projectG2(potentialNode); // if we reached the maximum number of // search iterations than do not continue ...
[ "private", "boolean", "mustContinue", "(", "BitSet", "potentialNode", ")", "{", "boolean", "result", "=", "true", ";", "boolean", "cancel", "=", "false", ";", "BitSet", "projG1", "=", "projectG1", "(", "potentialNode", ")", ";", "BitSet", "projG2", "=", "pro...
Determine if there are potential solution remaining. @param potentialNode set of remaining potential nodes @return true if maxIterator is worse to continue the search
[ "Determine", "if", "there", "are", "potential", "solution", "remaining", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/smsd/algorithm/rgraph/CDKRGraph.java#L382-L415
dmerkushov/log-helper
src/main/java/ru/dmerkushov/loghelper/LoggerWrapper.java
LoggerWrapper.logDomNode
public void logDomNode (String msg, Node node) { """ Log a DOM node at the FINER level @param msg The message to show with the node, or null if no message needed @param node @see Node """ StackTraceElement caller = StackTraceUtils.getCallerStackTraceElement (); logDomNode (msg, node, Level.FINER, c...
java
public void logDomNode (String msg, Node node) { StackTraceElement caller = StackTraceUtils.getCallerStackTraceElement (); logDomNode (msg, node, Level.FINER, caller); }
[ "public", "void", "logDomNode", "(", "String", "msg", ",", "Node", "node", ")", "{", "StackTraceElement", "caller", "=", "StackTraceUtils", ".", "getCallerStackTraceElement", "(", ")", ";", "logDomNode", "(", "msg", ",", "node", ",", "Level", ".", "FINER", "...
Log a DOM node at the FINER level @param msg The message to show with the node, or null if no message needed @param node @see Node
[ "Log", "a", "DOM", "node", "at", "the", "FINER", "level" ]
train
https://github.com/dmerkushov/log-helper/blob/3b7d3d30faa7f1437b27cd07c10fa579a995de23/src/main/java/ru/dmerkushov/loghelper/LoggerWrapper.java#L440-L444
googleapis/google-api-java-client
google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java
GoogleCredential.fromStream
@Beta public static GoogleCredential fromStream(InputStream credentialStream, HttpTransport transport, JsonFactory jsonFactory) throws IOException { """ {@link Beta} <br/> Return a credential defined by a Json file. @param credentialStream the stream with the credential definition. @param transport th...
java
@Beta public static GoogleCredential fromStream(InputStream credentialStream, HttpTransport transport, JsonFactory jsonFactory) throws IOException { Preconditions.checkNotNull(credentialStream); Preconditions.checkNotNull(transport); Preconditions.checkNotNull(jsonFactory); JsonObjectParser par...
[ "@", "Beta", "public", "static", "GoogleCredential", "fromStream", "(", "InputStream", "credentialStream", ",", "HttpTransport", "transport", ",", "JsonFactory", "jsonFactory", ")", "throws", "IOException", "{", "Preconditions", ".", "checkNotNull", "(", "credentialStre...
{@link Beta} <br/> Return a credential defined by a Json file. @param credentialStream the stream with the credential definition. @param transport the transport for Http calls. @param jsonFactory the factory for Json parsing and formatting. @return the credential defined by the credentialStream. @throws IOException if...
[ "{", "@link", "Beta", "}", "<br", "/", ">", "Return", "a", "credential", "defined", "by", "a", "Json", "file", "." ]
train
https://github.com/googleapis/google-api-java-client/blob/88decfd14fc40cae6eb6729a45c7d56a1132e450/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java#L242-L266
astrapi69/jaulp-wicket
jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java
PageParametersExtensions.copyToWicketSession
public static void copyToWicketSession(final PageParameters source, final Session session) { """ Copies all given source {@link org.apache.wicket.request.mapper.parameter.PageParameters} to the given session {@link org.apache.wicket.Session}. @param source The source {@link org.apache.wicket.request.mapper.pa...
java
public static void copyToWicketSession(final PageParameters source, final Session session) { final List<INamedParameters.NamedPair> namedPairs = source.getAllNamed(); for (final INamedParameters.NamedPair namedPair : namedPairs) { session.setAttribute(namedPair.getKey(), namedPair.getValue()); } }
[ "public", "static", "void", "copyToWicketSession", "(", "final", "PageParameters", "source", ",", "final", "Session", "session", ")", "{", "final", "List", "<", "INamedParameters", ".", "NamedPair", ">", "namedPairs", "=", "source", ".", "getAllNamed", "(", ")",...
Copies all given source {@link org.apache.wicket.request.mapper.parameter.PageParameters} to the given session {@link org.apache.wicket.Session}. @param source The source {@link org.apache.wicket.request.mapper.parameter.PageParameters}. @param session The session where the {@link org.apache.wicket.request.mapper.para...
[ "Copies", "all", "given", "source", "{", "@link", "org", ".", "apache", ".", "wicket", ".", "request", ".", "mapper", ".", "parameter", ".", "PageParameters", "}", "to", "the", "given", "session", "{", "@link", "org", ".", "apache", ".", "wicket", ".", ...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/util/parameter/PageParametersExtensions.java#L129-L136
aws/aws-sdk-java
aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/model/GetFunctionResult.java
GetFunctionResult.withTags
public GetFunctionResult withTags(java.util.Map<String, String> tags) { """ <p> The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a>. </p> @param tags The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a>. @return Returns a referen...
java
public GetFunctionResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "GetFunctionResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a>. </p> @param tags The function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/tagging.html">tags</a>. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "function", "s", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com", "/", "lambda", "/", "latest", "/", "dg", "/", "tagging", ".", "html", ">", "tags<", "/", "a", ">", ".", "<", "/", "p", ">...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/model/GetFunctionResult.java#L170-L173
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java
StyleUtils.createPolylineOptions
public static PolylineOptions createPolylineOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) { """ Create new polyline options populated with the feature row style @param featureStyleExtension feature style extension @param featureRow feature row @param den...
java
public static PolylineOptions createPolylineOptions(FeatureStyleExtension featureStyleExtension, FeatureRow featureRow, float density) { PolylineOptions polylineOptions = new PolylineOptions(); setFeatureStyle(polylineOptions, featureStyleExtension, featureRow, density); return polylineOptions...
[ "public", "static", "PolylineOptions", "createPolylineOptions", "(", "FeatureStyleExtension", "featureStyleExtension", ",", "FeatureRow", "featureRow", ",", "float", "density", ")", "{", "PolylineOptions", "polylineOptions", "=", "new", "PolylineOptions", "(", ")", ";", ...
Create new polyline options populated with the feature row style @param featureStyleExtension feature style extension @param featureRow feature row @param density display density: {@link android.util.DisplayMetrics#density} @return polyline options populated with the feature style
[ "Create", "new", "polyline", "options", "populated", "with", "the", "feature", "row", "style" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L382-L388
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/classify/Dataset.java
Dataset.readSVMLightFormat
public static Dataset<String, String> readSVMLightFormat(String filename, List<String> lines) { """ Constructs a Dataset by reading in a file in SVM light format. The lines parameter is filled with the lines of the file for further processing (if lines is null, it is assumed no line information is desired) "...
java
public static Dataset<String, String> readSVMLightFormat(String filename, List<String> lines) { return readSVMLightFormat(filename, new HashIndex<String>(), new HashIndex<String>(), lines); }
[ "public", "static", "Dataset", "<", "String", ",", "String", ">", "readSVMLightFormat", "(", "String", "filename", ",", "List", "<", "String", ">", "lines", ")", "{", "return", "readSVMLightFormat", "(", "filename", ",", "new", "HashIndex", "<", "String", ">...
Constructs a Dataset by reading in a file in SVM light format. The lines parameter is filled with the lines of the file for further processing (if lines is null, it is assumed no line information is desired)
[ "Constructs", "a", "Dataset", "by", "reading", "in", "a", "file", "in", "SVM", "light", "format", ".", "The", "lines", "parameter", "is", "filled", "with", "the", "lines", "of", "the", "file", "for", "further", "processing", "(", "if", "lines", "is", "nu...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/classify/Dataset.java#L206-L208
alipay/sofa-rpc
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java
AbstractCluster.selectByProvider
protected ClientTransport selectByProvider(SofaRequest message, ProviderInfo providerInfo) { """ 得到provider得到连接 @param message 调用对象 @param providerInfo 指定Provider @return 一个可用的transport或者null """ ClientTransport transport = connectionHolder.getAvailableClientTransport(providerInfo); i...
java
protected ClientTransport selectByProvider(SofaRequest message, ProviderInfo providerInfo) { ClientTransport transport = connectionHolder.getAvailableClientTransport(providerInfo); if (transport != null) { if (transport.isAvailable()) { lastProviderInfo = providerInfo; ...
[ "protected", "ClientTransport", "selectByProvider", "(", "SofaRequest", "message", ",", "ProviderInfo", "providerInfo", ")", "{", "ClientTransport", "transport", "=", "connectionHolder", ".", "getAvailableClientTransport", "(", "providerInfo", ")", ";", "if", "(", "tran...
得到provider得到连接 @param message 调用对象 @param providerInfo 指定Provider @return 一个可用的transport或者null
[ "得到provider得到连接" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AbstractCluster.java#L443-L455
tempodb/tempodb-java
src/main/java/com/tempodb/Client.java
Client.findDataPoints
public Cursor<DataPointFound> findDataPoints(Series series, Interval interval, Predicate predicate) { """ Returns a cursor of intervals/datapoints matching a predicate specified by series. <p>The system default timezone is used for the returned DateTimes. @param series The series @param interval An interval o...
java
public Cursor<DataPointFound> findDataPoints(Series series, Interval interval, Predicate predicate) { return findDataPoints(series, interval, predicate, DateTimeZone.getDefault()); }
[ "public", "Cursor", "<", "DataPointFound", ">", "findDataPoints", "(", "Series", "series", ",", "Interval", "interval", ",", "Predicate", "predicate", ")", "{", "return", "findDataPoints", "(", "series", ",", "interval", ",", "predicate", ",", "DateTimeZone", "....
Returns a cursor of intervals/datapoints matching a predicate specified by series. <p>The system default timezone is used for the returned DateTimes. @param series The series @param interval An interval of time for the query (start/end datetimes) @param predicate The predicate for the query. @return A Cursor of DataPo...
[ "Returns", "a", "cursor", "of", "intervals", "/", "datapoints", "matching", "a", "predicate", "specified", "by", "series", ".", "<p", ">", "The", "system", "default", "timezone", "is", "used", "for", "the", "returned", "DateTimes", "." ]
train
https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Client.java#L300-L302
bbottema/outlook-message-parser
src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java
OutlookMessageParser.checkRecipientDocumentEntry
private void checkRecipientDocumentEntry(final DocumentEntry de, final OutlookRecipient recipient) throws IOException { """ Parses a recipient document entry which can either be a simple entry or a stream that has to be split up into multiple document entries again. The parsed information is put into the {@li...
java
private void checkRecipientDocumentEntry(final DocumentEntry de, final OutlookRecipient recipient) throws IOException { if (de.getName().startsWith(PROPS_KEY)) { //TODO: parse properties stream final List<DocumentEntry> deList = getDocumentEntriesFromPropertiesStream(de); for (final DocumentEntry deFromPr...
[ "private", "void", "checkRecipientDocumentEntry", "(", "final", "DocumentEntry", "de", ",", "final", "OutlookRecipient", "recipient", ")", "throws", "IOException", "{", "if", "(", "de", ".", "getName", "(", ")", ".", "startsWith", "(", "PROPS_KEY", ")", ")", "...
Parses a recipient document entry which can either be a simple entry or a stream that has to be split up into multiple document entries again. The parsed information is put into the {@link OutlookRecipient} object. @param de The current node in the .msg file. @param recipient The resulting {@link OutlookRecipie...
[ "Parses", "a", "recipient", "document", "entry", "which", "can", "either", "be", "a", "simple", "entry", "or", "a", "stream", "that", "has", "to", "be", "split", "up", "into", "multiple", "document", "entries", "again", ".", "The", "parsed", "information", ...
train
https://github.com/bbottema/outlook-message-parser/blob/ea7d59da33c8a62dfc2e0aa64d2f8f7c903ccb0e/src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java#L233-L245
apache/groovy
subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java
SwingGroovyMethods.leftShift
public static JPopupMenu leftShift(JPopupMenu self, String str) { """ Overloads the left shift operator to provide an easy way to add components to a popupMenu.<p> @param self a JPopupMenu @param str a String to be added to the popupMenu. @return same popupMenu, after the value was added to it. @since 1.6....
java
public static JPopupMenu leftShift(JPopupMenu self, String str) { self.add(str); return self; }
[ "public", "static", "JPopupMenu", "leftShift", "(", "JPopupMenu", "self", ",", "String", "str", ")", "{", "self", ".", "add", "(", "str", ")", ";", "return", "self", ";", "}" ]
Overloads the left shift operator to provide an easy way to add components to a popupMenu.<p> @param self a JPopupMenu @param str a String to be added to the popupMenu. @return same popupMenu, after the value was added to it. @since 1.6.4
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "add", "components", "to", "a", "popupMenu", ".", "<p", ">" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-swing/src/main/java/org/codehaus/groovy/runtime/SwingGroovyMethods.java#L938-L941
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/las/utils/LasUtils.java
LasUtils.distance3D
public static double distance3D( LasRecord r1, LasRecord r2 ) { """ Distance between two points. @param r1 the first point. @param r2 the second point. @return the 3D distance. """ double deltaElev = Math.abs(r1.z - r2.z); double projectedDistance = NumericsUtilities.pythagoras(r1.x - r2.x...
java
public static double distance3D( LasRecord r1, LasRecord r2 ) { double deltaElev = Math.abs(r1.z - r2.z); double projectedDistance = NumericsUtilities.pythagoras(r1.x - r2.x, r1.y - r2.y); double distance = NumericsUtilities.pythagoras(projectedDistance, deltaElev); return distance; ...
[ "public", "static", "double", "distance3D", "(", "LasRecord", "r1", ",", "LasRecord", "r2", ")", "{", "double", "deltaElev", "=", "Math", ".", "abs", "(", "r1", ".", "z", "-", "r2", ".", "z", ")", ";", "double", "projectedDistance", "=", "NumericsUtiliti...
Distance between two points. @param r1 the first point. @param r2 the second point. @return the 3D distance.
[ "Distance", "between", "two", "points", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/las/utils/LasUtils.java#L309-L314
Jasig/uPortal
uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java
ReferenceIndividualGroupService.getEntity
@Override public IEntity getEntity(String key, Class type) throws GroupsException { """ Returns an <code>IEntity</code> representing a portal entity. This does not guarantee that the underlying entity actually exists. """ IEntity ent = primGetEntity(key, type); if (cacheInUse()) { ...
java
@Override public IEntity getEntity(String key, Class type) throws GroupsException { IEntity ent = primGetEntity(key, type); if (cacheInUse()) { try { IEntity cachedEnt = getEntityFromCache(ent.getEntityIdentifier().getKey()); if (cachedEnt == null) { ...
[ "@", "Override", "public", "IEntity", "getEntity", "(", "String", "key", ",", "Class", "type", ")", "throws", "GroupsException", "{", "IEntity", "ent", "=", "primGetEntity", "(", "key", ",", "type", ")", ";", "if", "(", "cacheInUse", "(", ")", ")", "{", ...
Returns an <code>IEntity</code> representing a portal entity. This does not guarantee that the underlying entity actually exists.
[ "Returns", "an", "<code", ">", "IEntity<", "/", "code", ">", "representing", "a", "portal", "entity", ".", "This", "does", "not", "guarantee", "that", "the", "underlying", "entity", "actually", "exists", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java#L350-L368
googleapis/google-cloud-java
google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java
DataLabelingServiceClient.formatDataItemName
@Deprecated public static final String formatDataItemName(String project, String dataset, String dataItem) { """ Formats a string containing the fully-qualified path to represent a data_item resource. @deprecated Use the {@link DataItemName} class instead. """ return DATA_ITEM_PATH_TEMPLATE.instantiat...
java
@Deprecated public static final String formatDataItemName(String project, String dataset, String dataItem) { return DATA_ITEM_PATH_TEMPLATE.instantiate( "project", project, "dataset", dataset, "data_item", dataItem); }
[ "@", "Deprecated", "public", "static", "final", "String", "formatDataItemName", "(", "String", "project", ",", "String", "dataset", ",", "String", "dataItem", ")", "{", "return", "DATA_ITEM_PATH_TEMPLATE", ".", "instantiate", "(", "\"project\"", ",", "project", ",...
Formats a string containing the fully-qualified path to represent a data_item resource. @deprecated Use the {@link DataItemName} class instead.
[ "Formats", "a", "string", "containing", "the", "fully", "-", "qualified", "path", "to", "represent", "a", "data_item", "resource", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java#L174-L180
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/raw/DataDecoder.java
DataDecoder.decodeLong
public static long decodeLong(byte[] src, int srcOffset) throws CorruptEncodingException { """ Decodes a signed long from exactly 8 bytes. @param src source of encoded bytes @param srcOffset offset into source array @return signed long value """ try { return ...
java
public static long decodeLong(byte[] src, int srcOffset) throws CorruptEncodingException { try { return (((long)(((src[srcOffset ] ) << 24) | ((src[srcOffset + 1] & 0xff) << 16) | ((src[srcOffset + 2] & 0xf...
[ "public", "static", "long", "decodeLong", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ")", "throws", "CorruptEncodingException", "{", "try", "{", "return", "(", "(", "(", "long", ")", "(", "(", "(", "src", "[", "srcOffset", "]", ")", "<<", ...
Decodes a signed long from exactly 8 bytes. @param src source of encoded bytes @param srcOffset offset into source array @return signed long value
[ "Decodes", "a", "signed", "long", "from", "exactly", "8", "bytes", "." ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/raw/DataDecoder.java#L88-L104
rhuss/jolokia
agent/core/src/main/java/org/jolokia/request/JmxVersionRequest.java
JmxVersionRequest.newCreator
static RequestCreator<JmxVersionRequest> newCreator() { """ Creator for {@link JmxVersionRequest}s @return the creator implementation """ return new RequestCreator<JmxVersionRequest>() { /** {@inheritDoc} */ public JmxVersionRequest create(Stack<String> pStack, ProcessingPara...
java
static RequestCreator<JmxVersionRequest> newCreator() { return new RequestCreator<JmxVersionRequest>() { /** {@inheritDoc} */ public JmxVersionRequest create(Stack<String> pStack, ProcessingParameters pParams) throws MalformedObjectNameException { return new JmxVersionReq...
[ "static", "RequestCreator", "<", "JmxVersionRequest", ">", "newCreator", "(", ")", "{", "return", "new", "RequestCreator", "<", "JmxVersionRequest", ">", "(", ")", "{", "/** {@inheritDoc} */", "public", "JmxVersionRequest", "create", "(", "Stack", "<", "String", "...
Creator for {@link JmxVersionRequest}s @return the creator implementation
[ "Creator", "for", "{", "@link", "JmxVersionRequest", "}", "s" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/request/JmxVersionRequest.java#L66-L79
apereo/cas
support/cas-server-support-reports-core/src/main/java/org/apereo/cas/web/report/CasReleaseAttributesReportEndpoint.java
CasReleaseAttributesReportEndpoint.releasePrincipalAttributes
@ReadOperation public Map<String, Object> releasePrincipalAttributes(final String username, final String password, final String service) { """ Release principal attributes map. @param username...
java
@ReadOperation public Map<String, Object> releasePrincipalAttributes(final String username, final String password, final String service) { val selectedService = this.serviceFactory.createSer...
[ "@", "ReadOperation", "public", "Map", "<", "String", ",", "Object", ">", "releasePrincipalAttributes", "(", "final", "String", "username", ",", "final", "String", "password", ",", "final", "String", "service", ")", "{", "val", "selectedService", "=", "this", ...
Release principal attributes map. @param username the username @param password the password @param service the service @return the map
[ "Release", "principal", "attributes", "map", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-reports-core/src/main/java/org/apereo/cas/web/report/CasReleaseAttributesReportEndpoint.java#L56-L91
MenoData/Time4J
base/src/main/java/net/time4j/range/MomentInterval.java
MomentInterval.toZonalInterval
public TimestampInterval toZonalInterval(TZID tzid) { """ /*[deutsch] <p>Wandelt diese Instanz in ein zonales Zeitstempelintervall um. </p> @param tzid timezone id @return zonal timestamp interval in given timezone (leap seconds will always be lost) @throws IllegalArgumentException if given timezone ...
java
public TimestampInterval toZonalInterval(TZID tzid) { Boundary<PlainTimestamp> b1; Boundary<PlainTimestamp> b2; if (this.getStart().isInfinite()) { b1 = Boundary.infinitePast(); } else { PlainTimestamp t1 = this.getStart().getTemporal().toZonalTi...
[ "public", "TimestampInterval", "toZonalInterval", "(", "TZID", "tzid", ")", "{", "Boundary", "<", "PlainTimestamp", ">", "b1", ";", "Boundary", "<", "PlainTimestamp", ">", "b2", ";", "if", "(", "this", ".", "getStart", "(", ")", ".", "isInfinite", "(", ")"...
/*[deutsch] <p>Wandelt diese Instanz in ein zonales Zeitstempelintervall um. </p> @param tzid timezone id @return zonal timestamp interval in given timezone (leap seconds will always be lost) @throws IllegalArgumentException if given timezone cannot be loaded @since 2.0 @see #toLocalInterval()
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Wandelt", "diese", "Instanz", "in", "ein", "zonales", "Zeitstempelintervall", "um", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/MomentInterval.java#L618-L641
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.addStorageAccountAsync
public Observable<Void> addStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { """ Updates the specified Data Lake Analytics account to add an Azure Storage account. @param resourceGroupName The name of the Azure resource group t...
java
public Observable<Void> addStorageAccountAsync(String resourceGroupName, String accountName, String storageAccountName, AddStorageAccountParameters parameters) { return addStorageAccountWithServiceResponseAsync(resourceGroupName, accountName, storageAccountName, parameters).map(new Func1<ServiceResponse<Void>, ...
[ "public", "Observable", "<", "Void", ">", "addStorageAccountAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "storageAccountName", ",", "AddStorageAccountParameters", "parameters", ")", "{", "return", "addStorageAccountWithServiceResp...
Updates the specified Data Lake Analytics account to add an Azure Storage account. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake Analytics account to which to add the Azure Storage account. @param storageAccount...
[ "Updates", "the", "specified", "Data", "Lake", "Analytics", "account", "to", "add", "an", "Azure", "Storage", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L506-L513
TestFX/Monocle
src/main/java/com/sun/glass/ui/monocle/TouchState.java
TouchState.getWindow
MonocleWindow getWindow(boolean recalculateCache, MonocleWindow fallback) { """ Returns the Glass window on which this event state is located. assignPrimaryID() should be called before this method. @param recalculateCache true if the cached value should be discarded and recomputed @param fallback the window ...
java
MonocleWindow getWindow(boolean recalculateCache, MonocleWindow fallback) { if (window == null) { window = fallback; } if (recalculateCache) { window = fallback; if (primaryID >= 0) { Point p = getPointForID(primaryID); if (p !=...
[ "MonocleWindow", "getWindow", "(", "boolean", "recalculateCache", ",", "MonocleWindow", "fallback", ")", "{", "if", "(", "window", "==", "null", ")", "{", "window", "=", "fallback", ";", "}", "if", "(", "recalculateCache", ")", "{", "window", "=", "fallback"...
Returns the Glass window on which this event state is located. assignPrimaryID() should be called before this method. @param recalculateCache true if the cached value should be discarded and recomputed @param fallback the window to use if no primary ID is available
[ "Returns", "the", "Glass", "window", "on", "which", "this", "event", "state", "is", "located", ".", "assignPrimaryID", "()", "should", "be", "called", "before", "this", "method", "." ]
train
https://github.com/TestFX/Monocle/blob/267ccba8889cab244bf8c562dbaa0345a612874c/src/main/java/com/sun/glass/ui/monocle/TouchState.java#L80-L96
czyzby/gdx-lml
kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/collection/GdxMaps.java
GdxMaps.putIfAbsent
public static <Key, Value> Value putIfAbsent(final ObjectMap<Key, Value> map, final Key key, final Value value) { """ Puts a value with the given key in the passed map, provided that the passed key isn't already present in the map. @param map may contain a value associated with the key. @param key map key. @...
java
public static <Key, Value> Value putIfAbsent(final ObjectMap<Key, Value> map, final Key key, final Value value) { if (!map.containsKey(key)) { map.put(key, value); return value; } return map.get(key); }
[ "public", "static", "<", "Key", ",", "Value", ">", "Value", "putIfAbsent", "(", "final", "ObjectMap", "<", "Key", ",", "Value", ">", "map", ",", "final", "Key", "key", ",", "final", "Value", "value", ")", "{", "if", "(", "!", "map", ".", "containsKey...
Puts a value with the given key in the passed map, provided that the passed key isn't already present in the map. @param map may contain a value associated with the key. @param key map key. @param value map value to add. @return value associated with the key in the map (recently added or the previous one). @param <Key...
[ "Puts", "a", "value", "with", "the", "given", "key", "in", "the", "passed", "map", "provided", "that", "the", "passed", "key", "isn", "t", "already", "present", "in", "the", "map", "." ]
train
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/collection/GdxMaps.java#L250-L256
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Maybe.java
Maybe.observeOn
@CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe<T> observeOn(final Scheduler scheduler) { """ Wraps a Maybe to emit its item (or notify of its error) on a specified {@link Scheduler}, asynchronously. <p> <img width="640" height="182" src="https://raw.github.com/wiki/React...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Maybe<T> observeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); return RxJavaPlugins.onAssembly(new MaybeObserveOn<T>(this, scheduler)); }
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "CUSTOM", ")", "public", "final", "Maybe", "<", "T", ">", "observeOn", "(", "final", "Scheduler", "scheduler", ")", "{", "ObjectHelper", ".", "requireNonNull", "(", "scheduler", ",",...
Wraps a Maybe to emit its item (or notify of its error) on a specified {@link Scheduler}, asynchronously. <p> <img width="640" height="182" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Maybe.observeOn.png" alt=""> <dl> <dt><b>Scheduler:</b></dt> <dd>you specify which {@link Scheduler} this oper...
[ "Wraps", "a", "Maybe", "to", "emit", "its", "item", "(", "or", "notify", "of", "its", "error", ")", "on", "a", "specified", "{", "@link", "Scheduler", "}", "asynchronously", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "182", "src", "=...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Maybe.java#L3425-L3430
Alluxio/alluxio
core/common/src/main/java/alluxio/util/CommonUtils.java
CommonUtils.unwrapResponseFrom
public static void unwrapResponseFrom(Protocol.Response response, Channel channel) throws AlluxioStatusException { """ Unwraps a {@link alluxio.proto.dataserver.Protocol.Response} associated with a channel. @param response the response @param channel the channel that receives this response """ St...
java
public static void unwrapResponseFrom(Protocol.Response response, Channel channel) throws AlluxioStatusException { Status status = ProtoUtils.fromProto(response.getStatus()); if (status != Status.OK) { throw AlluxioStatusException.from(status.withDescription( String.format("Channel to %s: ...
[ "public", "static", "void", "unwrapResponseFrom", "(", "Protocol", ".", "Response", "response", ",", "Channel", "channel", ")", "throws", "AlluxioStatusException", "{", "Status", "status", "=", "ProtoUtils", ".", "fromProto", "(", "response", ".", "getStatus", "("...
Unwraps a {@link alluxio.proto.dataserver.Protocol.Response} associated with a channel. @param response the response @param channel the channel that receives this response
[ "Unwraps", "a", "{", "@link", "alluxio", ".", "proto", ".", "dataserver", ".", "Protocol", ".", "Response", "}", "associated", "with", "a", "channel", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/CommonUtils.java#L581-L588
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java
DerInputBuffer.getGeneralizedTime
public Date getGeneralizedTime(int len) throws IOException { """ Returns the Generalized Time value that takes up the specified number of bytes in this buffer. @param len the number of bytes to use """ if (len > available()) throw new IOException("short read of DER Generalized Time"); ...
java
public Date getGeneralizedTime(int len) throws IOException { if (len > available()) throw new IOException("short read of DER Generalized Time"); if (len < 13 || len > 23) throw new IOException("DER Generalized Time length error"); return getTime(len, true); }
[ "public", "Date", "getGeneralizedTime", "(", "int", "len", ")", "throws", "IOException", "{", "if", "(", "len", ">", "available", "(", ")", ")", "throw", "new", "IOException", "(", "\"short read of DER Generalized Time\"", ")", ";", "if", "(", "len", "<", "1...
Returns the Generalized Time value that takes up the specified number of bytes in this buffer. @param len the number of bytes to use
[ "Returns", "the", "Generalized", "Time", "value", "that", "takes", "up", "the", "specified", "number", "of", "bytes", "in", "this", "buffer", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java#L276-L285
phax/ph-oton
ph-oton-core/src/main/java/com/helger/photon/core/html/AbstractSWECHTMLProvider.java
AbstractSWECHTMLProvider.fillHeadAndBody
@Override @OverrideOnDemand protected void fillHeadAndBody (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final HCHtml aHtml, @Nonnull final Locale aDisplayLocale) { """ Overridable method to fill head and body. The de...
java
@Override @OverrideOnDemand protected void fillHeadAndBody (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final HCHtml aHtml, @Nonnull final Locale aDisplayLocale) { final IMenuTree aMenuTree = RequestSettings.getMenu...
[ "@", "Override", "@", "OverrideOnDemand", "protected", "void", "fillHeadAndBody", "(", "@", "Nonnull", "final", "IRequestWebScopeWithoutResponse", "aRequestScope", ",", "@", "Nonnull", "final", "HCHtml", "aHtml", ",", "@", "Nonnull", "final", "Locale", "aDisplayLocale...
Overridable method to fill head and body. The default implementation uses an {@link SimpleWebExecutionContext} which in turn requires a menu tree to be present. If you have an application without a menu tree, override this method. @param aRequestScope Current request scope @param aHtml Created (empty) HTML node @param...
[ "Overridable", "method", "to", "fill", "head", "and", "body", ".", "The", "default", "implementation", "uses", "an", "{", "@link", "SimpleWebExecutionContext", "}", "which", "in", "turn", "requires", "a", "menu", "tree", "to", "be", "present", ".", "If", "yo...
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-core/src/main/java/com/helger/photon/core/html/AbstractSWECHTMLProvider.java#L91-L111
aol/cyclops
cyclops/src/main/java/com/oath/cyclops/async/adapters/Queue.java
Queue.jdkStream
public Stream<T> jdkStream(int closeScalingFactor) { """ Return a standard (unextended) JDK Stream connected to this Queue To disconnect cleanly close the queue <pre> {@code use queue.stream().parallel() to convert to a parallel Stream } </pre> @param closeScalingFactor Scaling factor for Queue closed m...
java
public Stream<T> jdkStream(int closeScalingFactor){ int cores = Runtime.getRuntime().availableProcessors(); String par = System.getProperty("java.util.concurrent.ForkJoinPool.common.parallelism"); int connected = par !=null ? Integer.valueOf(par) : cores; int update = 0; do{ ...
[ "public", "Stream", "<", "T", ">", "jdkStream", "(", "int", "closeScalingFactor", ")", "{", "int", "cores", "=", "Runtime", ".", "getRuntime", "(", ")", ".", "availableProcessors", "(", ")", ";", "String", "par", "=", "System", ".", "getProperty", "(", "...
Return a standard (unextended) JDK Stream connected to this Queue To disconnect cleanly close the queue <pre> {@code use queue.stream().parallel() to convert to a parallel Stream } </pre> @param closeScalingFactor Scaling factor for Queue closed messages to propagate to connected parallel Streams. Scaling Factor may ...
[ "Return", "a", "standard", "(", "unextended", ")", "JDK", "Stream", "connected", "to", "this", "Queue", "To", "disconnect", "cleanly", "close", "the", "queue" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/com/oath/cyclops/async/adapters/Queue.java#L200-L210
logic-ng/LogicNG
src/main/java/org/logicng/solvers/SATSolver.java
SATSolver.addClauseSet
void addClauseSet(final Formula formula, final Proposition proposition) { """ Adds a formula which is already in CNF to the solver. @param proposition a proposition (if required for proof tracing) @param formula the formula in CNF """ switch (formula.type()) { case TRUE: ...
java
void addClauseSet(final Formula formula, final Proposition proposition) { switch (formula.type()) { case TRUE: break; case FALSE: case LITERAL: case OR: this.addClause(formula, proposition); break; case A...
[ "void", "addClauseSet", "(", "final", "Formula", "formula", ",", "final", "Proposition", "proposition", ")", "{", "switch", "(", "formula", ".", "type", "(", ")", ")", "{", "case", "TRUE", ":", "break", ";", "case", "FALSE", ":", "case", "LITERAL", ":", ...
Adds a formula which is already in CNF to the solver. @param proposition a proposition (if required for proof tracing) @param formula the formula in CNF
[ "Adds", "a", "formula", "which", "is", "already", "in", "CNF", "to", "the", "solver", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/SATSolver.java#L183-L198
Jasig/uPortal
uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/character/stream/BasePlaceholderEventSource.java
BasePlaceholderEventSource.readToEndElement
protected final void readToEndElement(XMLEventReader eventReader, StartElement event) throws XMLStreamException { """ Read {@link XMLEvent}s off the {@link XMLEventReader} until the corresponding {@link EndElement} is found. """ final Deque<QName> elementStack = new LinkedList<QName>(); ...
java
protected final void readToEndElement(XMLEventReader eventReader, StartElement event) throws XMLStreamException { final Deque<QName> elementStack = new LinkedList<QName>(); elementStack.push(event.getName()); while (!elementStack.isEmpty()) { final XMLEvent nextEvent = e...
[ "protected", "final", "void", "readToEndElement", "(", "XMLEventReader", "eventReader", ",", "StartElement", "event", ")", "throws", "XMLStreamException", "{", "final", "Deque", "<", "QName", ">", "elementStack", "=", "new", "LinkedList", "<", "QName", ">", "(", ...
Read {@link XMLEvent}s off the {@link XMLEventReader} until the corresponding {@link EndElement} is found.
[ "Read", "{" ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-utils/uPortal-utils-core/src/main/java/org/apereo/portal/character/stream/BasePlaceholderEventSource.java#L66-L88
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/context/flash/FlashImpl.java
FlashImpl._saveMessages
private void _saveMessages(FacesContext facesContext) { """ Saves the current FacesMessages as a List on the render FlashMap for the next request if isKeepMessages() is true. Otherwise it removes any existing FacesMessages-List from the renderFlashMap. @param facesContext """ if (isKeepMessages()) ...
java
private void _saveMessages(FacesContext facesContext) { if (isKeepMessages()) { // get all messages from the FacesContext and store // them on the renderMap List<MessageEntry> messageList = null; Iterator<String> iterClientIds = faces...
[ "private", "void", "_saveMessages", "(", "FacesContext", "facesContext", ")", "{", "if", "(", "isKeepMessages", "(", ")", ")", "{", "// get all messages from the FacesContext and store", "// them on the renderMap", "List", "<", "MessageEntry", ">", "messageList", "=", "...
Saves the current FacesMessages as a List on the render FlashMap for the next request if isKeepMessages() is true. Otherwise it removes any existing FacesMessages-List from the renderFlashMap. @param facesContext
[ "Saves", "the", "current", "FacesMessages", "as", "a", "List", "on", "the", "render", "FlashMap", "for", "the", "next", "request", "if", "isKeepMessages", "()", "is", "true", ".", "Otherwise", "it", "removes", "any", "existing", "FacesMessages", "-", "List", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/context/flash/FlashImpl.java#L684-L717
UrielCh/ovh-java-sdk
ovh-java-sdk-sslGateway/src/main/java/net/minidev/ovh/api/ApiOvhSslGateway.java
ApiOvhSslGateway.serviceName_server_id_PUT
public void serviceName_server_id_PUT(String serviceName, Long id, OvhServer body) throws IOException { """ Alter this object properties REST: PUT /sslGateway/{serviceName}/server/{id} @param body [required] New object properties @param serviceName [required] The internal name of your SSL Gateway @param id [...
java
public void serviceName_server_id_PUT(String serviceName, Long id, OvhServer body) throws IOException { String qPath = "/sslGateway/{serviceName}/server/{id}"; StringBuilder sb = path(qPath, serviceName, id); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "serviceName_server_id_PUT", "(", "String", "serviceName", ",", "Long", "id", ",", "OvhServer", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sslGateway/{serviceName}/server/{id}\"", ";", "StringBuilder", "sb", "=", "path", ...
Alter this object properties REST: PUT /sslGateway/{serviceName}/server/{id} @param body [required] New object properties @param serviceName [required] The internal name of your SSL Gateway @param id [required] Id of your server API beta
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sslGateway/src/main/java/net/minidev/ovh/api/ApiOvhSslGateway.java#L315-L319
drewnoakes/metadata-extractor
Source/com/drew/metadata/exif/ExifSubIFDDirectory.java
ExifSubIFDDirectory.getDateDigitized
@Nullable public Date getDateDigitized(@Nullable TimeZone timeZone) { """ Parses the date/time tag, the subsecond tag and the time offset tag to obtain a single Date object with milliseconds representing the date and time when this image was digitized. If the time offset tag does not exist, attempts will be...
java
@Nullable public Date getDateDigitized(@Nullable TimeZone timeZone) { TimeZone timeZoneDigitized = getTimeZone(TAG_OFFSET_TIME_DIGITIZED); return getDate(TAG_DATETIME_DIGITIZED, getString(TAG_SUBSECOND_TIME_DIGITIZED), (timeZoneDigitized != null) ? timeZoneDigitized : timeZone); ...
[ "@", "Nullable", "public", "Date", "getDateDigitized", "(", "@", "Nullable", "TimeZone", "timeZone", ")", "{", "TimeZone", "timeZoneDigitized", "=", "getTimeZone", "(", "TAG_OFFSET_TIME_DIGITIZED", ")", ";", "return", "getDate", "(", "TAG_DATETIME_DIGITIZED", ",", "...
Parses the date/time tag, the subsecond tag and the time offset tag to obtain a single Date object with milliseconds representing the date and time when this image was digitized. If the time offset tag does not exist, attempts will be made to parse the values as though it is in the {@link TimeZone} represented by the ...
[ "Parses", "the", "date", "/", "time", "tag", "the", "subsecond", "tag", "and", "the", "time", "offset", "tag", "to", "obtain", "a", "single", "Date", "object", "with", "milliseconds", "representing", "the", "date", "and", "time", "when", "this", "image", "...
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/exif/ExifSubIFDDirectory.java#L159-L165
LGoodDatePicker/LGoodDatePicker
Project/src/main/java/com/privatejgoodies/forms/layout/CellConstraints.java
CellConstraints.ensureValidOrientations
private static void ensureValidOrientations(Alignment horizontalAlignment, Alignment verticalAlignment) { """ Checks and verifies that the horizontal alignment is a horizontal and the vertical alignment is vertical. @param horizontalAlignment the horizontal alignment @param verticalAlignment the vertical alig...
java
private static void ensureValidOrientations(Alignment horizontalAlignment, Alignment verticalAlignment) { if (!horizontalAlignment.isHorizontal()) { throw new IllegalArgumentException("The horizontal alignment must be one of: left, center, right, fill, default."); } if (!verticalAlig...
[ "private", "static", "void", "ensureValidOrientations", "(", "Alignment", "horizontalAlignment", ",", "Alignment", "verticalAlignment", ")", "{", "if", "(", "!", "horizontalAlignment", ".", "isHorizontal", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException"...
Checks and verifies that the horizontal alignment is a horizontal and the vertical alignment is vertical. @param horizontalAlignment the horizontal alignment @param verticalAlignment the vertical alignment @throws IllegalArgumentException if an alignment is invalid
[ "Checks", "and", "verifies", "that", "the", "horizontal", "alignment", "is", "a", "horizontal", "and", "the", "vertical", "alignment", "is", "vertical", "." ]
train
https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/CellConstraints.java#L915-L922
hawkular/hawkular-apm
server/elasticsearch/src/main/java/org/hawkular/apm/server/elasticsearch/ElasticsearchClient.java
ElasticsearchClient.prepareMapping
@SuppressWarnings("unchecked") private boolean prepareMapping(String index, Map<String, Object> defaultMappings) { """ This method applies the supplied mapping to the index. @param index The name of the index @param defaultMappings The default mappings @return true if the mapping was successful """ ...
java
@SuppressWarnings("unchecked") private boolean prepareMapping(String index, Map<String, Object> defaultMappings) { boolean success = true; for (Map.Entry<String, Object> stringObjectEntry : defaultMappings.entrySet()) { Map<String, Object> mapping = (Map<String, Object>) stringObjectEnt...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "boolean", "prepareMapping", "(", "String", "index", ",", "Map", "<", "String", ",", "Object", ">", "defaultMappings", ")", "{", "boolean", "success", "=", "true", ";", "for", "(", "Map", ".", ...
This method applies the supplied mapping to the index. @param index The name of the index @param defaultMappings The default mappings @return true if the mapping was successful
[ "This", "method", "applies", "the", "supplied", "mapping", "to", "the", "index", "." ]
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/server/elasticsearch/src/main/java/org/hawkular/apm/server/elasticsearch/ElasticsearchClient.java#L273-L307
aalmiray/Json-lib
src/main/java/net/sf/json/AbstractJSON.java
AbstractJSON.fireElementAddedEvent
protected static void fireElementAddedEvent( int index, Object element, JsonConfig jsonConfig ) { """ Fires an element added event. @param index the index where the element was added @param element the added element """ if( jsonConfig.isEventTriggeringEnabled() ){ for( Iterator listeners = j...
java
protected static void fireElementAddedEvent( int index, Object element, JsonConfig jsonConfig ) { if( jsonConfig.isEventTriggeringEnabled() ){ for( Iterator listeners = jsonConfig.getJsonEventListeners() .iterator(); listeners.hasNext(); ){ JsonEventListener listener = (JsonEve...
[ "protected", "static", "void", "fireElementAddedEvent", "(", "int", "index", ",", "Object", "element", ",", "JsonConfig", "jsonConfig", ")", "{", "if", "(", "jsonConfig", ".", "isEventTriggeringEnabled", "(", ")", ")", "{", "for", "(", "Iterator", "listeners", ...
Fires an element added event. @param index the index where the element was added @param element the added element
[ "Fires", "an", "element", "added", "event", "." ]
train
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/AbstractJSON.java#L110-L122
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getMasteryInfo
public void getMasteryInfo(int[] ids, Callback<List<Mastery>> callback) throws GuildWars2Exception, NullPointerException { """ or more info on masteries API go <a href="https://wiki.guildwars2.com/wiki/API:2/masteries">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Ca...
java
public void getMasteryInfo(int[] ids, Callback<List<Mastery>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getMasteryInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getMasteryInfo", "(", "int", "[", "]", "ids", ",", "Callback", "<", "List", "<", "Mastery", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids",...
or more info on masteries API go <a href="https://wiki.guildwars2.com/wiki/API:2/masteries">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of mastery id @param callback callback that ...
[ "or", "more", "info", "on", "masteries", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "masteries", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user",...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L1834-L1837
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java
CertificateUtil.generateKeyPair
public static KeyPair generateKeyPair(String algorithm, int bits) throws GeneralSecurityException { """ Generates a key pair of given algorithm and strength. @param algorithm the algorithm of the key pair. @param bits the strength @return <code>KeyPair</code> the generated key pair. @exception Genera...
java
public static KeyPair generateKeyPair(String algorithm, int bits) throws GeneralSecurityException { KeyPairGenerator generator = null; if (provider == null) { generator = KeyPairGenerator.getInstance(algorithm); } else { generator = KeyPairGenerator.getInstance(al...
[ "public", "static", "KeyPair", "generateKeyPair", "(", "String", "algorithm", ",", "int", "bits", ")", "throws", "GeneralSecurityException", "{", "KeyPairGenerator", "generator", "=", "null", ";", "if", "(", "provider", "==", "null", ")", "{", "generator", "=", ...
Generates a key pair of given algorithm and strength. @param algorithm the algorithm of the key pair. @param bits the strength @return <code>KeyPair</code> the generated key pair. @exception GeneralSecurityException if something goes wrong.
[ "Generates", "a", "key", "pair", "of", "given", "algorithm", "and", "strength", "." ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateUtil.java#L215-L225
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.supportedVpnDevicesAsync
public Observable<String> supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { """ Gets a xml format representation for supported vpn devices. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @t...
java
public Observable<String> supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1<ServiceResponse<String>, String>() { @Override public String cal...
[ "public", "Observable", "<", "String", ">", "supportedVpnDevicesAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ")", "{", "return", "supportedVpnDevicesWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkGatewayName",...
Gets a xml format representation for supported vpn devices. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the String object
[ "Gets", "a", "xml", "format", "representation", "for", "supported", "vpn", "devices", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L2281-L2288
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JmxUtils.java
JmxUtils.getJawrConfigMBeanObjectName
public static ObjectName getJawrConfigMBeanObjectName(final String contextPath, final String resourceType, final String mBeanPrefix) { """ Returns the object name for the Jawr configuration Manager MBean @param contextPath the context path @param resourceType the resource type @param mBeanPrefix the MBe...
java
public static ObjectName getJawrConfigMBeanObjectName(final String contextPath, final String resourceType, final String mBeanPrefix) { return getMBeanObjectName(contextPath, JAWR_CONFIG_MANAGER_TYPE, mBeanPrefix, resourceType); }
[ "public", "static", "ObjectName", "getJawrConfigMBeanObjectName", "(", "final", "String", "contextPath", ",", "final", "String", "resourceType", ",", "final", "String", "mBeanPrefix", ")", "{", "return", "getMBeanObjectName", "(", "contextPath", ",", "JAWR_CONFIG_MANAGE...
Returns the object name for the Jawr configuration Manager MBean @param contextPath the context path @param resourceType the resource type @param mBeanPrefix the MBean prefix @return the object name for the Jawr configuration Manager MBean
[ "Returns", "the", "object", "name", "for", "the", "Jawr", "configuration", "Manager", "MBean" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/config/jmx/JmxUtils.java#L185-L189
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java
ASMUtil.hasSisterTagAfter
public static boolean hasSisterTagAfter(Tag tag, String nameToFind) { """ Prueft ob das das angegebene Tag in der gleichen Ebene nach dem angegebenen Tag vorkommt. @param tag Ausgangspunkt, nach diesem tag darf das angegebene nicht vorkommen. @param nameToFind Tag Name der nicht vorkommen darf @return kommt d...
java
public static boolean hasSisterTagAfter(Tag tag, String nameToFind) { Body body = (Body) tag.getParent(); List<Statement> stats = body.getStatements(); Iterator<Statement> it = stats.iterator(); Statement other; boolean isAfter = false; while (it.hasNext()) { other = it.next(); if (other instanceof Ta...
[ "public", "static", "boolean", "hasSisterTagAfter", "(", "Tag", "tag", ",", "String", "nameToFind", ")", "{", "Body", "body", "=", "(", "Body", ")", "tag", ".", "getParent", "(", ")", ";", "List", "<", "Statement", ">", "stats", "=", "body", ".", "getS...
Prueft ob das das angegebene Tag in der gleichen Ebene nach dem angegebenen Tag vorkommt. @param tag Ausgangspunkt, nach diesem tag darf das angegebene nicht vorkommen. @param nameToFind Tag Name der nicht vorkommen darf @return kommt das Tag vor.
[ "Prueft", "ob", "das", "das", "angegebene", "Tag", "in", "der", "gleichen", "Ebene", "nach", "dem", "angegebenen", "Tag", "vorkommt", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java#L398-L416
podio/podio-java
src/main/java/com/podio/calendar/CalendarAPI.java
CalendarAPI.getGlobal
public List<Event> getGlobal(LocalDate dateFrom, LocalDate dateTo, List<Integer> spaceIds, ReferenceType... types) { """ Returns all items that the user have access to and all tasks that are assigned to the user. The items and tasks can be filtered by a list of space ids, but tasks without a reference will al...
java
public List<Event> getGlobal(LocalDate dateFrom, LocalDate dateTo, List<Integer> spaceIds, ReferenceType... types) { return getCalendar("", dateFrom, dateTo, spaceIds, types); }
[ "public", "List", "<", "Event", ">", "getGlobal", "(", "LocalDate", "dateFrom", ",", "LocalDate", "dateTo", ",", "List", "<", "Integer", ">", "spaceIds", ",", "ReferenceType", "...", "types", ")", "{", "return", "getCalendar", "(", "\"\"", ",", "dateFrom", ...
Returns all items that the user have access to and all tasks that are assigned to the user. The items and tasks can be filtered by a list of space ids, but tasks without a reference will always be returned. @param dateFrom The from date @param dateTo The to date @param types The types of events that should be returned...
[ "Returns", "all", "items", "that", "the", "user", "have", "access", "to", "and", "all", "tasks", "that", "are", "assigned", "to", "the", "user", ".", "The", "items", "and", "tasks", "can", "be", "filtered", "by", "a", "list", "of", "space", "ids", "but...
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/calendar/CalendarAPI.java#L103-L106
apache/reef
lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/remote/transport/netty/NettyChannelHandler.java
NettyChannelHandler.exceptionCaught
@Override public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) { """ Handles the exception event. @param ctx the context object for this handler @param cause the cause @throws Exception """ final Channel channel = ctx.channel(); LOG.log(Level.INFO, "Unexpected e...
java
@Override public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) { final Channel channel = ctx.channel(); LOG.log(Level.INFO, "Unexpected exception from downstream. channel: {0} local: {1} remote: {2}", new Object[]{channel, channel.localAddress(), channel.remoteAddress()...
[ "@", "Override", "public", "void", "exceptionCaught", "(", "final", "ChannelHandlerContext", "ctx", ",", "final", "Throwable", "cause", ")", "{", "final", "Channel", "channel", "=", "ctx", ".", "channel", "(", ")", ";", "LOG", ".", "log", "(", "Level", "."...
Handles the exception event. @param ctx the context object for this handler @param cause the cause @throws Exception
[ "Handles", "the", "exception", "event", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/remote/transport/netty/NettyChannelHandler.java#L104-L113
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentUrl.java
DocumentUrl.updateDocumentUrl
public static MozuUrl updateDocumentUrl(String documentId, String documentListName, String responseFields) { """ Get Resource Url for UpdateDocument @param documentId Unique identifier for a document, used by content and document calls. Document IDs are associated with document types, document type lists, sites, ...
java
public static MozuUrl updateDocumentUrl(String documentId, String documentListName, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}/documents/{documentId}?responseFields={responseFields}"); formatter.formatUrl("documentId", documentId); format...
[ "public", "static", "MozuUrl", "updateDocumentUrl", "(", "String", "documentId", ",", "String", "documentListName", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/content/documentlists/{documentListName}/docu...
Get Resource Url for UpdateDocument @param documentId Unique identifier for a document, used by content and document calls. Document IDs are associated with document types, document type lists, sites, and tenants. @param documentListName Name of content documentListName to delete @param responseFields Filtering syntax ...
[ "Get", "Resource", "Url", "for", "UpdateDocument" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/DocumentUrl.java#L135-L142
CloudSlang/cs-actions
cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java
NumberUtilities.isValidDouble
public static boolean isValidDouble(@Nullable final String doubleStr, double lowerBound, double upperBound, final boolean includeLowerBound, final boolean includeUpperBound) { """ Given an double string, it checks if it's a valid double (base on apaches NumberUtils.createDouble) and if it's between the lowerBound...
java
public static boolean isValidDouble(@Nullable final String doubleStr, double lowerBound, double upperBound, final boolean includeLowerBound, final boolean includeUpperBound) { if (lowerBound > upperBound) { throw new IllegalArgumentException(ExceptionValues.INVALID_BOUNDS); } else if (!isVal...
[ "public", "static", "boolean", "isValidDouble", "(", "@", "Nullable", "final", "String", "doubleStr", ",", "double", "lowerBound", ",", "double", "upperBound", ",", "final", "boolean", "includeLowerBound", ",", "final", "boolean", "includeUpperBound", ")", "{", "i...
Given an double string, it checks if it's a valid double (base on apaches NumberUtils.createDouble) and if it's between the lowerBound and upperBound. @param doubleStr the integer string to check @param lowerBound the lower bound of the interval @param upperBound the upper bound of the interval @...
[ "Given", "an", "double", "string", "it", "checks", "if", "it", "s", "a", "valid", "double", "(", "base", "on", "apaches", "NumberUtils", ".", "createDouble", ")", "and", "if", "it", "s", "between", "the", "lowerBound", "and", "upperBound", "." ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-commons/src/main/java/io/cloudslang/content/utils/NumberUtilities.java#L215-L225
ops4j/org.ops4j.base
ops4j-base-lang/src/main/java/org/ops4j/lang/PreConditionException.java
PreConditionException.validateLesserThan
public static void validateLesserThan( long value, long limit, String identifier ) throws PreConditionException { """ Validates that the value is lesser than a limit. <p/> This method ensures that <code>value < limit</code>. @param identifier The name of the object. @param limit The limit that t...
java
public static void validateLesserThan( long value, long limit, String identifier ) throws PreConditionException { if( value < limit ) { return; } throw new PreConditionException( identifier + " was not lesser than " + limit + ". Was: " + value ); }
[ "public", "static", "void", "validateLesserThan", "(", "long", "value", ",", "long", "limit", ",", "String", "identifier", ")", "throws", "PreConditionException", "{", "if", "(", "value", "<", "limit", ")", "{", "return", ";", "}", "throw", "new", "PreCondit...
Validates that the value is lesser than a limit. <p/> This method ensures that <code>value < limit</code>. @param identifier The name of the object. @param limit The limit that the value must be smaller than. @param value The value to be tested. @throws PreConditionException if the condition is not met.
[ "Validates", "that", "the", "value", "is", "lesser", "than", "a", "limit", ".", "<p", "/", ">", "This", "method", "ensures", "that", "<code", ">", "value", "<", "limit<", "/", "code", ">", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-lang/src/main/java/org/ops4j/lang/PreConditionException.java#L148-L156
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java
VirtualNetworksInner.beginCreateOrUpdateAsync
public Observable<VirtualNetworkInner> beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { """ Creates or updates a virtual network in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkName The...
java
public Observable<VirtualNetworkInner> beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).map(new Func1<ServiceResponse<VirtualNetworkInner>, Virtual...
[ "public", "Observable", "<", "VirtualNetworkInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkName", ",", "VirtualNetworkInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "res...
Creates or updates a virtual network in the specified resource group. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @param parameters Parameters supplied to the create or update virtual network operation @throws IllegalArgumentException thrown if pa...
[ "Creates", "or", "updates", "a", "virtual", "network", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworksInner.java#L558-L565
davidcarboni/cryptolite-java
src/main/java/com/github/davidcarboni/cryptolite/HashMac.java
HashMac.digest
public String digest(String message) { """ Computes an HMAC for the given message, using the key passed to the constructor. @param message The message. @return The HMAC value for the message and key. """ try { Mac mac = Mac.getInstance(algorithm); SecretKeySpec macKey =...
java
public String digest(String message) { try { Mac mac = Mac.getInstance(algorithm); SecretKeySpec macKey = new SecretKeySpec(key, algorithm); mac.init(macKey); byte[] digest = mac.doFinal(ByteArray.fromString(message)); return ByteArray.toHex(di...
[ "public", "String", "digest", "(", "String", "message", ")", "{", "try", "{", "Mac", "mac", "=", "Mac", ".", "getInstance", "(", "algorithm", ")", ";", "SecretKeySpec", "macKey", "=", "new", "SecretKeySpec", "(", "key", ",", "algorithm", ")", ";", "mac",...
Computes an HMAC for the given message, using the key passed to the constructor. @param message The message. @return The HMAC value for the message and key.
[ "Computes", "an", "HMAC", "for", "the", "given", "message", "using", "the", "key", "passed", "to", "the", "constructor", "." ]
train
https://github.com/davidcarboni/cryptolite-java/blob/e67954181a04ffc9beb1d9abca1421195fcf9764/src/main/java/com/github/davidcarboni/cryptolite/HashMac.java#L66-L80
Whiley/WhileyCompiler
src/main/java/wyil/check/FlowTypeCheck.java
FlowTypeCheck.checkVariable
private SemanticType checkVariable(Expr.VariableAccess expr, Environment environment) { """ Check the type of a given variable access. This is straightforward since the determine is fully determined by the declared type for the variable in question. @param expr @return """ Decl.Variable var = expr.getV...
java
private SemanticType checkVariable(Expr.VariableAccess expr, Environment environment) { Decl.Variable var = expr.getVariableDeclaration(); return environment.getType(var); }
[ "private", "SemanticType", "checkVariable", "(", "Expr", ".", "VariableAccess", "expr", ",", "Environment", "environment", ")", "{", "Decl", ".", "Variable", "var", "=", "expr", ".", "getVariableDeclaration", "(", ")", ";", "return", "environment", ".", "getType...
Check the type of a given variable access. This is straightforward since the determine is fully determined by the declared type for the variable in question. @param expr @return
[ "Check", "the", "type", "of", "a", "given", "variable", "access", ".", "This", "is", "straightforward", "since", "the", "determine", "is", "fully", "determined", "by", "the", "declared", "type", "for", "the", "variable", "in", "question", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/check/FlowTypeCheck.java#L1480-L1483
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/ResourceGeneratorReaderProxyFactory.java
ResourceGeneratorReaderProxyFactory.addInterfaces
private static void addInterfaces(Object obj, Set<Class<?>> interfaces) { """ Adds all the interfaces of the object passed in parameter in the set of interfaces. @param obj the object @param interfaces the set of interfaces to update """ Class<?>[] generatorInterfaces = null; Class<?> superClass = ...
java
private static void addInterfaces(Object obj, Set<Class<?>> interfaces) { Class<?>[] generatorInterfaces = null; Class<?> superClass = null; if (obj instanceof Class) { generatorInterfaces = ((Class<?>) obj).getInterfaces(); superClass = ((Class<?>) obj).getSuperclass(); } else { generatorInterfaces =...
[ "private", "static", "void", "addInterfaces", "(", "Object", "obj", ",", "Set", "<", "Class", "<", "?", ">", ">", "interfaces", ")", "{", "Class", "<", "?", ">", "[", "]", "generatorInterfaces", "=", "null", ";", "Class", "<", "?", ">", "superClass", ...
Adds all the interfaces of the object passed in parameter in the set of interfaces. @param obj the object @param interfaces the set of interfaces to update
[ "Adds", "all", "the", "interfaces", "of", "the", "object", "passed", "in", "parameter", "in", "the", "set", "of", "interfaces", "." ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/generator/ResourceGeneratorReaderProxyFactory.java#L105-L124
line/centraldogma
server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java
MetadataService.createToken
public CompletableFuture<Revision> createToken(Author author, String appId, boolean isAdmin) { """ Creates a new {@link Token} with the specified {@code appId}, {@code isAdmin} and an auto-generated secret. """ return createToken(author, appId, SECRET_PREFIX + UUID.randomUUID(), isAdmin); }
java
public CompletableFuture<Revision> createToken(Author author, String appId, boolean isAdmin) { return createToken(author, appId, SECRET_PREFIX + UUID.randomUUID(), isAdmin); }
[ "public", "CompletableFuture", "<", "Revision", ">", "createToken", "(", "Author", "author", ",", "String", "appId", ",", "boolean", "isAdmin", ")", "{", "return", "createToken", "(", "author", ",", "appId", ",", "SECRET_PREFIX", "+", "UUID", ".", "randomUUID"...
Creates a new {@link Token} with the specified {@code appId}, {@code isAdmin} and an auto-generated secret.
[ "Creates", "a", "new", "{" ]
train
https://github.com/line/centraldogma/blob/b9e46c67fbc26628c2186ce2f46e7fb303c831e9/server/src/main/java/com/linecorp/centraldogma/server/internal/metadata/MetadataService.java#L704-L706
cdk/cdk
legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java
GeometryTools.scaleMolecule
public static void scaleMolecule(IAtomContainer atomCon, Dimension areaDim, double fillFactor) { """ Scales a molecule such that it fills a given percentage of a given dimension. See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets @par...
java
public static void scaleMolecule(IAtomContainer atomCon, Dimension areaDim, double fillFactor) { Dimension molDim = get2DDimension(atomCon); double widthFactor = (double) areaDim.width / (double) molDim.width; double heightFactor = (double) areaDim.height / (double) molDim.height; double...
[ "public", "static", "void", "scaleMolecule", "(", "IAtomContainer", "atomCon", ",", "Dimension", "areaDim", ",", "double", "fillFactor", ")", "{", "Dimension", "molDim", "=", "get2DDimension", "(", "atomCon", ")", ";", "double", "widthFactor", "=", "(", "double"...
Scales a molecule such that it fills a given percentage of a given dimension. See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets @param atomCon The molecule to be scaled @param areaDim The dimension to be filled @param fillFactor T...
[ "Scales", "a", "molecule", "such", "that", "it", "fills", "a", "given", "percentage", "of", "a", "given", "dimension", ".", "See", "comment", "for", "center", "(", "IAtomContainer", "atomCon", "Dimension", "areaDim", "HashMap", "renderingCoordinates", ")", "for"...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/legacy/src/main/java/org/openscience/cdk/geometry/GeometryTools.java#L151-L157
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/download/ImageDownloader.java
ImageDownloader.submitHadoopDownloadTask
public void submitHadoopDownloadTask(String URL, String id) { """ Submits a new hadoop image download task. @param URL The url of the image @param id The id of the image (used to name the image file after download) """ Callable<ImageDownloadResult> call = new HadoopImageDownload(URL, id, followR...
java
public void submitHadoopDownloadTask(String URL, String id) { Callable<ImageDownloadResult> call = new HadoopImageDownload(URL, id, followRedirects); pool.submit(call); numPendingTasks++; }
[ "public", "void", "submitHadoopDownloadTask", "(", "String", "URL", ",", "String", "id", ")", "{", "Callable", "<", "ImageDownloadResult", ">", "call", "=", "new", "HadoopImageDownload", "(", "URL", ",", "id", ",", "followRedirects", ")", ";", "pool", ".", "...
Submits a new hadoop image download task. @param URL The url of the image @param id The id of the image (used to name the image file after download)
[ "Submits", "a", "new", "hadoop", "image", "download", "task", "." ]
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/download/ImageDownloader.java#L100-L104
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/SearchFilter.java
SearchFilter.matchSet
public void matchSet(Hashtable elements, int combine_op, int compare_op) throws DBException { """ Change the search filter to one that specifies a set of elements and their values that must match, and the operator to use to combine the elements. Each key is compared for an equal match to the value, and all comp...
java
public void matchSet(Hashtable elements, int combine_op, int compare_op) throws DBException { // Delete the old search filter m_filter = null; // If combine_op is not a logical operator, throw an exception if ((combine_op & LOGICAL_OPER_MASK) == 0) { throw ...
[ "public", "void", "matchSet", "(", "Hashtable", "elements", ",", "int", "combine_op", ",", "int", "compare_op", ")", "throws", "DBException", "{", "// Delete the old search filter\r", "m_filter", "=", "null", ";", "// If combine_op is not a logical operator, throw an except...
Change the search filter to one that specifies a set of elements and their values that must match, and the operator to use to combine the elements. Each key is compared for an equal match to the value, and all comparisons are combined by the specified logical operator (OR or AND). The old search filter is deleted. @pa...
[ "Change", "the", "search", "filter", "to", "one", "that", "specifies", "a", "set", "of", "elements", "and", "their", "values", "that", "must", "match", "and", "the", "operator", "to", "use", "to", "combine", "the", "elements", ".", "Each", "key", "is", "...
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/SearchFilter.java#L221-L252
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectUnionOfImpl_CustomFieldSerializer.java
OWLObjectUnionOfImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectUnionOfImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gw...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectUnionOfImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLObjectUnionOfImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectUnionOfImpl_CustomFieldSerializer.java#L89-L92
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AtomCache.java
AtomCache.getStructureForDomain
public Structure getStructureForDomain(String scopId) throws IOException, StructureException { """ Returns the representation of a {@link ScopDomain} as a BioJava {@link Structure} object. @param scopId a SCOP Id @return a Structure object @throws IOException @throws StructureException """ return getS...
java
public Structure getStructureForDomain(String scopId) throws IOException, StructureException { return getStructureForDomain(scopId, ScopFactory.getSCOP()); }
[ "public", "Structure", "getStructureForDomain", "(", "String", "scopId", ")", "throws", "IOException", ",", "StructureException", "{", "return", "getStructureForDomain", "(", "scopId", ",", "ScopFactory", ".", "getSCOP", "(", ")", ")", ";", "}" ]
Returns the representation of a {@link ScopDomain} as a BioJava {@link Structure} object. @param scopId a SCOP Id @return a Structure object @throws IOException @throws StructureException
[ "Returns", "the", "representation", "of", "a", "{", "@link", "ScopDomain", "}", "as", "a", "BioJava", "{", "@link", "Structure", "}", "object", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/util/AtomCache.java#L644-L646
josueeduardo/snappy
snappy/src/main/java/io/joshworks/snappy/SnappyServer.java
SnappyServer.staticFiles
public static synchronized void staticFiles(String url, String docPath) { """ Serve static files from a given url. Path variables are not supported. @param url The relative URL to be map this endpoint. @param docPath The relative path to the classpath. """ checkStarted(); instance().end...
java
public static synchronized void staticFiles(String url, String docPath) { checkStarted(); instance().endpoints.add(HandlerUtil.staticFiles(url, docPath)); }
[ "public", "static", "synchronized", "void", "staticFiles", "(", "String", "url", ",", "String", "docPath", ")", "{", "checkStarted", "(", ")", ";", "instance", "(", ")", ".", "endpoints", ".", "add", "(", "HandlerUtil", ".", "staticFiles", "(", "url", ",",...
Serve static files from a given url. Path variables are not supported. @param url The relative URL to be map this endpoint. @param docPath The relative path to the classpath.
[ "Serve", "static", "files", "from", "a", "given", "url", ".", "Path", "variables", "are", "not", "supported", "." ]
train
https://github.com/josueeduardo/snappy/blob/d95a9e811eda3c24a5e53086369208819884fa49/snappy/src/main/java/io/joshworks/snappy/SnappyServer.java#L599-L602
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutMethodResponseResult.java
PutMethodResponseResult.withResponseModels
public PutMethodResponseResult withResponseModels(java.util.Map<String, String> responseModels) { """ <p> Specifies the <a>Model</a> resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a <a>Model</a> name as the value. </p> @p...
java
public PutMethodResponseResult withResponseModels(java.util.Map<String, String> responseModels) { setResponseModels(responseModels); return this; }
[ "public", "PutMethodResponseResult", "withResponseModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseModels", ")", "{", "setResponseModels", "(", "responseModels", ")", ";", "return", "this", ";", "}" ]
<p> Specifies the <a>Model</a> resources used for the response's content-type. Response models are represented as a key/value map, with a content-type as the key and a <a>Model</a> name as the value. </p> @param responseModels Specifies the <a>Model</a> resources used for the response's content-type. Response models a...
[ "<p", ">", "Specifies", "the", "<a", ">", "Model<", "/", "a", ">", "resources", "used", "for", "the", "response", "s", "content", "-", "type", ".", "Response", "models", "are", "represented", "as", "a", "key", "/", "value", "map", "with", "a", "content...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/PutMethodResponseResult.java#L278-L281
facebook/fresco
drawee/src/main/java/com/facebook/drawee/generic/WrappingUtils.java
WrappingUtils.applyRoundingParams
static void applyRoundingParams(Rounded rounded, RoundingParams roundingParams) { """ Applies the given rounding params on the specified rounded drawable. """ rounded.setCircle(roundingParams.getRoundAsCircle()); rounded.setRadii(roundingParams.getCornersRadii()); rounded.setBorder(roundingParams.g...
java
static void applyRoundingParams(Rounded rounded, RoundingParams roundingParams) { rounded.setCircle(roundingParams.getRoundAsCircle()); rounded.setRadii(roundingParams.getCornersRadii()); rounded.setBorder(roundingParams.getBorderColor(), roundingParams.getBorderWidth()); rounded.setPadding(roundingPara...
[ "static", "void", "applyRoundingParams", "(", "Rounded", "rounded", ",", "RoundingParams", "roundingParams", ")", "{", "rounded", ".", "setCircle", "(", "roundingParams", ".", "getRoundAsCircle", "(", ")", ")", ";", "rounded", ".", "setRadii", "(", "roundingParams...
Applies the given rounding params on the specified rounded drawable.
[ "Applies", "the", "given", "rounding", "params", "on", "the", "specified", "rounded", "drawable", "." ]
train
https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/drawee/src/main/java/com/facebook/drawee/generic/WrappingUtils.java#L329-L336
glyptodon/guacamole-client
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java
AuthenticationProviderService.authenticateUser
public LDAPAuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException { """ Returns an AuthenticatedUser representing the user authenticated by the given credentials. Also adds custom LDAP attributes to the AuthenticatedUser. @param credentials The credentials to use fo...
java
public LDAPAuthenticatedUser authenticateUser(Credentials credentials) throws GuacamoleException { // Attempt bind LDAPConnection ldapConnection; try { ldapConnection = bindAs(credentials); } catch (GuacamoleException e) { logger.error("Cannot...
[ "public", "LDAPAuthenticatedUser", "authenticateUser", "(", "Credentials", "credentials", ")", "throws", "GuacamoleException", "{", "// Attempt bind", "LDAPConnection", "ldapConnection", ";", "try", "{", "ldapConnection", "=", "bindAs", "(", "credentials", ")", ";", "}"...
Returns an AuthenticatedUser representing the user authenticated by the given credentials. Also adds custom LDAP attributes to the AuthenticatedUser. @param credentials The credentials to use for authentication. @return An AuthenticatedUser representing the user authenticated by the given credentials. @throws Guacam...
[ "Returns", "an", "AuthenticatedUser", "representing", "the", "user", "authenticated", "by", "the", "given", "credentials", ".", "Also", "adds", "custom", "LDAP", "attributes", "to", "the", "AuthenticatedUser", "." ]
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/AuthenticationProviderService.java#L223-L259