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
rhuss/jolokia
agent/core/src/main/java/org/jolokia/converter/object/StringToObjectConverter.java
StringToObjectConverter.prepareValue
public Object prepareValue(String pExpectedClassName, Object pValue) { """ Prepare a value from a either a given object or its string representation. If the value is already assignable to the given class name it is returned directly. @param pExpectedClassName type name of the expected type @param pValue value...
java
public Object prepareValue(String pExpectedClassName, Object pValue) { if (pValue == null) { return null; } else { Class expectedClass = ClassUtil.classForName(pExpectedClassName); Object param = null; if (expectedClass != null) { param = p...
[ "public", "Object", "prepareValue", "(", "String", "pExpectedClassName", ",", "Object", "pValue", ")", "{", "if", "(", "pValue", "==", "null", ")", "{", "return", "null", ";", "}", "else", "{", "Class", "expectedClass", "=", "ClassUtil", ".", "classForName",...
Prepare a value from a either a given object or its string representation. If the value is already assignable to the given class name it is returned directly. @param pExpectedClassName type name of the expected type @param pValue value to either take directly or to convert from its string representation. @return the p...
[ "Prepare", "a", "value", "from", "a", "either", "a", "given", "object", "or", "its", "string", "representation", ".", "If", "the", "value", "is", "already", "assignable", "to", "the", "given", "class", "name", "it", "is", "returned", "directly", "." ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/object/StringToObjectConverter.java#L98-L118
matthewhorridge/binaryowl
src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java
BinaryOWLMetadata.getLongAttribute
public Long getLongAttribute(String name, Long defaultValue) { """ Gets the long value of an attribute. @param name The name of the attribute. Not null. @param defaultValue The default value for the attribute. May be null. This value will be returned if this metadata object does not contain a long value for ...
java
public Long getLongAttribute(String name, Long defaultValue) { return getValue(longAttributes, name, defaultValue); }
[ "public", "Long", "getLongAttribute", "(", "String", "name", ",", "Long", "defaultValue", ")", "{", "return", "getValue", "(", "longAttributes", ",", "name", ",", "defaultValue", ")", ";", "}" ]
Gets the long value of an attribute. @param name The name of the attribute. Not null. @param defaultValue The default value for the attribute. May be null. This value will be returned if this metadata object does not contain a long value for the specified attribute name. @return Either the long value of the attribut...
[ "Gets", "the", "long", "value", "of", "an", "attribute", "." ]
train
https://github.com/matthewhorridge/binaryowl/blob/7fccfe804120f86b38ca855ddbb569a81a042257/src/main/java/org/semanticweb/binaryowl/BinaryOWLMetadata.java#L323-L325
diirt/util
src/main/java/org/epics/util/array/ListMath.java
ListMath.limit
public static ListLong limit(final ListLong data, final int start, final int end) { """ Returns a sublist of the given data. @param data a list @param start start point for the sublist @param end end point (exclusive) for the sublist @return the sublist """ return new ListLong() { ...
java
public static ListLong limit(final ListLong data, final int start, final int end) { return new ListLong() { @Override public long getLong(int index) { return data.getLong(index + start); } @Override public int size() { ...
[ "public", "static", "ListLong", "limit", "(", "final", "ListLong", "data", ",", "final", "int", "start", ",", "final", "int", "end", ")", "{", "return", "new", "ListLong", "(", ")", "{", "@", "Override", "public", "long", "getLong", "(", "int", "index", ...
Returns a sublist of the given data. @param data a list @param start start point for the sublist @param end end point (exclusive) for the sublist @return the sublist
[ "Returns", "a", "sublist", "of", "the", "given", "data", "." ]
train
https://github.com/diirt/util/blob/24aca0a173a635aaf0b78d213a3fee8d4f91c077/src/main/java/org/epics/util/array/ListMath.java#L77-L90
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaMemset2DAsync
public static int cudaMemset2DAsync(Pointer devPtr, long pitch, int value, long width, long height, cudaStream_t stream) { """ Initializes or sets device memory to a value. <pre> cudaError_t cudaMemset2DAsync ( void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream = 0 )...
java
public static int cudaMemset2DAsync(Pointer devPtr, long pitch, int value, long width, long height, cudaStream_t stream) { return checkResult(cudaMemset2DAsyncNative(devPtr, pitch, value, width, height, stream)); }
[ "public", "static", "int", "cudaMemset2DAsync", "(", "Pointer", "devPtr", ",", "long", "pitch", ",", "int", "value", ",", "long", "width", ",", "long", "height", ",", "cudaStream_t", "stream", ")", "{", "return", "checkResult", "(", "cudaMemset2DAsyncNative", ...
Initializes or sets device memory to a value. <pre> cudaError_t cudaMemset2DAsync ( void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream = 0 ) </pre> <div> <p>Initializes or sets device memory to a value. Sets to the specified value <tt>value</tt> a matrix (<tt>height</tt> rows of ...
[ "Initializes", "or", "sets", "device", "memory", "to", "a", "value", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L2981-L2984
paoding-code/paoding-rose
paoding-rose-web/src/main/java/net/paoding/rose/web/impl/mapping/EngineGroupImpl.java
EngineGroupImpl.addEngine
public void addEngine(ReqMethod method, LinkedEngine engine) { """ 添加一个 {@link Engine} ;如果所给的 method 是 {@link ReqMethod#ALL},则优先级最低。 @param method @param engine """ for (ReqMethod md : method.parse()) { LinkedEngine[] methodEngines = engines[md.ordinal()]; if (methodEngin...
java
public void addEngine(ReqMethod method, LinkedEngine engine) { for (ReqMethod md : method.parse()) { LinkedEngine[] methodEngines = engines[md.ordinal()]; if (methodEngines.length == 0) { methodEngines = new LinkedEngine[] { engine }; } else { ...
[ "public", "void", "addEngine", "(", "ReqMethod", "method", ",", "LinkedEngine", "engine", ")", "{", "for", "(", "ReqMethod", "md", ":", "method", ".", "parse", "(", ")", ")", "{", "LinkedEngine", "[", "]", "methodEngines", "=", "engines", "[", "md", ".",...
添加一个 {@link Engine} ;如果所给的 method 是 {@link ReqMethod#ALL},则优先级最低。 @param method @param engine
[ "添加一个", "{", "@link", "Engine", "}", ";如果所给的", "method", "是", "{", "@link", "ReqMethod#ALL", "}", ",则优先级最低。" ]
train
https://github.com/paoding-code/paoding-rose/blob/8b512704174dd6cba95e544c7d6ab66105cb8ec4/paoding-rose-web/src/main/java/net/paoding/rose/web/impl/mapping/EngineGroupImpl.java#L76-L89
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java
AbstractPlainDatagramSocketImpl.leaveGroup
protected void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException { """ Leave the multicast group. @param mcastaddr multicast address to leave. @param netIf specified the local interface to leave the group at @throws IllegalArgumentException if mcastaddr is null or is a Soc...
java
protected void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException { if (mcastaddr == null || !(mcastaddr instanceof InetSocketAddress)) throw new IllegalArgumentException("Unsupported address type"); leave(((InetSocketAddress)mcastaddr).getAddress(), netIf...
[ "protected", "void", "leaveGroup", "(", "SocketAddress", "mcastaddr", ",", "NetworkInterface", "netIf", ")", "throws", "IOException", "{", "if", "(", "mcastaddr", "==", "null", "||", "!", "(", "mcastaddr", "instanceof", "InetSocketAddress", ")", ")", "throw", "n...
Leave the multicast group. @param mcastaddr multicast address to leave. @param netIf specified the local interface to leave the group at @throws IllegalArgumentException if mcastaddr is null or is a SocketAddress subclass not supported by this socket @since 1.4
[ "Leave", "the", "multicast", "group", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java#L217-L222
steveohara/j2mod
src/main/java/com/ghgande/j2mod/modbus/facade/AbstractModbusMaster.java
AbstractModbusMaster.readCoils
public BitVector readCoils(int unitId, int ref, int count) throws ModbusException { """ Reads a given number of coil states from the slave. Note that the number of bits in the bit vector will be forced to the number originally requested. @param unitId the slave unit id. @param ref the offset of the coil...
java
public BitVector readCoils(int unitId, int ref, int count) throws ModbusException { checkTransaction(); if (readCoilsRequest == null) { readCoilsRequest = new ReadCoilsRequest(); } readCoilsRequest.setUnitID(unitId); readCoilsRequest.setReference(ref); readCoi...
[ "public", "BitVector", "readCoils", "(", "int", "unitId", ",", "int", "ref", ",", "int", "count", ")", "throws", "ModbusException", "{", "checkTransaction", "(", ")", ";", "if", "(", "readCoilsRequest", "==", "null", ")", "{", "readCoilsRequest", "=", "new",...
Reads a given number of coil states from the slave. Note that the number of bits in the bit vector will be forced to the number originally requested. @param unitId the slave unit id. @param ref the offset of the coil to start reading from. @param count the number of coil states to be read. @return a <tt>BitVecto...
[ "Reads", "a", "given", "number", "of", "coil", "states", "from", "the", "slave", "." ]
train
https://github.com/steveohara/j2mod/blob/67162c55d7c02564e50211a9df06b8314953b5f2/src/main/java/com/ghgande/j2mod/modbus/facade/AbstractModbusMaster.java#L89-L102
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java
CoreRemoteMongoCollectionImpl.findOne
public <ResultT> ResultT findOne(final Bson filter, final Class<ResultT> resultClass) { """ Finds a document in the collection. @param filter the query filter @param resultClass the class to decode each document into @param <ResultT> the target document type of the iterable. @return the resulting docu...
java
public <ResultT> ResultT findOne(final Bson filter, final Class<ResultT> resultClass) { return executeFindOne(filter, null, resultClass); }
[ "public", "<", "ResultT", ">", "ResultT", "findOne", "(", "final", "Bson", "filter", ",", "final", "Class", "<", "ResultT", ">", "resultClass", ")", "{", "return", "executeFindOne", "(", "filter", ",", "null", ",", "resultClass", ")", ";", "}" ]
Finds a document in the collection. @param filter the query filter @param resultClass the class to decode each document into @param <ResultT> the target document type of the iterable. @return the resulting document
[ "Finds", "a", "document", "in", "the", "collection", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java#L206-L208
WhereIsMyTransport/TransportApiSdk.Java
transportapisdk/src/main/java/transportapisdk/TransportApiClient.java
TransportApiClient.postJourney
public TransportApiResult<Journey> postJourney(JourneyBodyOptions options, double startLatitude, double startLongitude, double endLatitude, double endLongitude, String exclude) { """ Gets a list of agencies nearby ordered by distance from the point specified. @param options Options to limit the results by. ...
java
public TransportApiResult<Journey> postJourney(JourneyBodyOptions options, double startLatitude, double startLongitude, double endLatitude, double endLongitude, String exclude) { if (options == null) { options = JourneyBodyOptions.defaultQueryOptions(); } return TransportApiCl...
[ "public", "TransportApiResult", "<", "Journey", ">", "postJourney", "(", "JourneyBodyOptions", "options", ",", "double", "startLatitude", ",", "double", "startLongitude", ",", "double", "endLatitude", ",", "double", "endLongitude", ",", "String", "exclude", ")", "{"...
Gets a list of agencies nearby ordered by distance from the point specified. @param options Options to limit the results by. Default: JourneyBodyOptions.defaultQueryOptions() @param startLatitude Latitude in decimal degrees to depart from. @param startLongitude Longitude in decimal degrees to depart from. @param...
[ "Gets", "a", "list", "of", "agencies", "nearby", "ordered", "by", "distance", "from", "the", "point", "specified", "." ]
train
https://github.com/WhereIsMyTransport/TransportApiSdk.Java/blob/f4ade7046c8dadfcb2976ee354f85f67a6e930a2/transportapisdk/src/main/java/transportapisdk/TransportApiClient.java#L34-L42
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure/EstimateSceneCalibrated.java
EstimateSceneCalibrated.determineScale
static double determineScale(View base , Motion edge ) throws Exception { """ Determine scale factor difference between edge triangulation and world """ View viewA = edge.viewSrc; View viewB = edge.viewDst; boolean baseIsA = base == viewA; // determine the scale factor difference Point3D_F64 worl...
java
static double determineScale(View base , Motion edge ) throws Exception { View viewA = edge.viewSrc; View viewB = edge.viewDst; boolean baseIsA = base == viewA; // determine the scale factor difference Point3D_F64 worldInBase3D = new Point3D_F64(); Point3D_F64 localInBase3D = new Point3D_F64(); GrowQ...
[ "static", "double", "determineScale", "(", "View", "base", ",", "Motion", "edge", ")", "throws", "Exception", "{", "View", "viewA", "=", "edge", ".", "viewSrc", ";", "View", "viewB", "=", "edge", ".", "viewDst", ";", "boolean", "baseIsA", "=", "base", "=...
Determine scale factor difference between edge triangulation and world
[ "Determine", "scale", "factor", "difference", "between", "edge", "triangulation", "and", "world" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure/EstimateSceneCalibrated.java#L356-L397
jbundle/jbundle
base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java
HBasePanel.printReport
public void printReport(PrintWriter out, ResourceBundle reg) throws DBException { """ Output this screen using HTML. Display the html headers, etc. then: <ol> - Parse any parameters passed in and set the field values. - Process any command (such as move=Next). - Render this screen as Html (by calling ...
java
public void printReport(PrintWriter out, ResourceBundle reg) throws DBException { if (reg == null) reg = ((BaseApplication)this.getTask().getApplication()).getResources(HtmlConstants.HTML_RESOURCE, false); this.printHtmlHeader(out, reg); this.printHtmlMenuStart(out, reg); ...
[ "public", "void", "printReport", "(", "PrintWriter", "out", ",", "ResourceBundle", "reg", ")", "throws", "DBException", "{", "if", "(", "reg", "==", "null", ")", "reg", "=", "(", "(", "BaseApplication", ")", "this", ".", "getTask", "(", ")", ".", "getApp...
Output this screen using HTML. Display the html headers, etc. then: <ol> - Parse any parameters passed in and set the field values. - Process any command (such as move=Next). - Render this screen as Html (by calling printHtmlScreen()). </ol> @param out The html out stream. @exception DBException File exception.
[ "Output", "this", "screen", "using", "HTML", ".", "Display", "the", "html", "headers", "etc", ".", "then", ":", "<ol", ">", "-", "Parse", "any", "parameters", "passed", "in", "and", "set", "the", "field", "values", ".", "-", "Process", "any", "command", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java#L86-L100
structurizr/java
structurizr-core/src/com/structurizr/documentation/StructurizrDocumentationTemplate.java
StructurizrDocumentationTemplate.addComponentsSection
@Nonnull public Section addComponentsSection(@Nullable Container container, @Nonnull Format format, @Nonnull String content) { """ Adds a "Components" section relating to a {@link Container}. @param container the {@link Container} the documentation content relates to @param format the {@link For...
java
@Nonnull public Section addComponentsSection(@Nullable Container container, @Nonnull Format format, @Nonnull String content) { return addSection(container, "Components", format, content); }
[ "@", "Nonnull", "public", "Section", "addComponentsSection", "(", "@", "Nullable", "Container", "container", ",", "@", "Nonnull", "Format", "format", ",", "@", "Nonnull", "String", "content", ")", "{", "return", "addSection", "(", "container", ",", "\"Components...
Adds a "Components" section relating to a {@link Container}. @param container the {@link Container} the documentation content relates to @param format the {@link Format} of the documentation content @param content a String containing the documentation content @return a documentation {@lin...
[ "Adds", "a", "Components", "section", "relating", "to", "a", "{", "@link", "Container", "}", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/StructurizrDocumentationTemplate.java#L252-L255
apache/incubator-druid
indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java
TaskLockbox.createNewTaskLockPosse
private TaskLockPosse createNewTaskLockPosse( TaskLockType lockType, String groupId, String dataSource, Interval interval, @Nullable String preferredVersion, int priority, boolean revoked ) { """ Create a new {@link TaskLockPosse} for a new {@link TaskLock}. This method ...
java
private TaskLockPosse createNewTaskLockPosse( TaskLockType lockType, String groupId, String dataSource, Interval interval, @Nullable String preferredVersion, int priority, boolean revoked ) { giant.lock(); try { // Create new TaskLock and assign it a version. ...
[ "private", "TaskLockPosse", "createNewTaskLockPosse", "(", "TaskLockType", "lockType", ",", "String", "groupId", ",", "String", "dataSource", ",", "Interval", "interval", ",", "@", "Nullable", "String", "preferredVersion", ",", "int", "priority", ",", "boolean", "re...
Create a new {@link TaskLockPosse} for a new {@link TaskLock}. This method will attempt to assign version strings that obey the invariant that every version string is lexicographically greater than any other version string previously assigned to the same interval. This invariant is only mostly guaranteed, however; we a...
[ "Create", "a", "new", "{", "@link", "TaskLockPosse", "}", "for", "a", "new", "{", "@link", "TaskLock", "}", ".", "This", "method", "will", "attempt", "to", "assign", "version", "strings", "that", "obey", "the", "invariant", "that", "every", "version", "str...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/indexing-service/src/main/java/org/apache/druid/indexing/overlord/TaskLockbox.java#L567-L609
alkacon/opencms-core
src/org/opencms/xml/types/CmsXmlVfsImageValue.java
CmsXmlVfsImageValue.getParameterValue
private String getParameterValue(CmsObject cms, Map<String, String[]> parameterMap, String key) { """ Returns the value of the given parameter name from a parameter map.<p> @param cms the current users context @param parameterMap the map containing the parameters @param key the parameter name @return the val...
java
private String getParameterValue(CmsObject cms, Map<String, String[]> parameterMap, String key) { String result = null; String[] params = parameterMap.get(key); if ((params != null) && (params.length > 0)) { result = params[0]; } if (result == null) { ret...
[ "private", "String", "getParameterValue", "(", "CmsObject", "cms", ",", "Map", "<", "String", ",", "String", "[", "]", ">", "parameterMap", ",", "String", "key", ")", "{", "String", "result", "=", "null", ";", "String", "[", "]", "params", "=", "paramete...
Returns the value of the given parameter name from a parameter map.<p> @param cms the current users context @param parameterMap the map containing the parameters @param key the parameter name @return the value of the parameter or an empty String
[ "Returns", "the", "value", "of", "the", "given", "parameter", "name", "from", "a", "parameter", "map", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/types/CmsXmlVfsImageValue.java#L346-L357
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/DiscoveryResources.java
DiscoveryResources.getRecords
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/metrics/schemarecords") @Description("Discover metric schema records. If type is specified, then records of that particular type are returned.") public List<? extends Object> getRecords(@Context HttpServletRequest req, @DefaultValue("*") @QueryP...
java
@GET @Produces(MediaType.APPLICATION_JSON) @Path("/metrics/schemarecords") @Description("Discover metric schema records. If type is specified, then records of that particular type are returned.") public List<? extends Object> getRecords(@Context HttpServletRequest req, @DefaultValue("*") @QueryP...
[ "@", "GET", "@", "Produces", "(", "MediaType", ".", "APPLICATION_JSON", ")", "@", "Path", "(", "\"/metrics/schemarecords\"", ")", "@", "Description", "(", "\"Discover metric schema records. If type is specified, then records of that particular type are returned.\"", ")", "publi...
Discover metric schema records. If type is specified, then records of that particular type are returned. @param req The HTTP request. @param namespaceRegex The namespace filter. @param scopeRegex The scope filter. @param metricRegex The metric name filter. @param tagkRegex The tag...
[ "Discover", "metric", "schema", "records", ".", "If", "type", "is", "specified", "then", "records", "of", "that", "particular", "type", "are", "returned", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/DiscoveryResources.java#L89-L135
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/FormLayoutFormBuilder.java
FormLayoutFormBuilder.setLayout
public void setLayout(FormLayout layout, JPanel panel) { """ Set a panel with the provided layout layout. @param layout JGoodies FormLayout @param panel JPanel on which the builder will place the components. """ this.panel = panel; this.layout = layout; panel.setLayout(layout); ...
java
public void setLayout(FormLayout layout, JPanel panel) { this.panel = panel; this.layout = layout; panel.setLayout(layout); cc = new CellConstraints(); row = -1; }
[ "public", "void", "setLayout", "(", "FormLayout", "layout", ",", "JPanel", "panel", ")", "{", "this", ".", "panel", "=", "panel", ";", "this", ".", "layout", "=", "layout", ";", "panel", ".", "setLayout", "(", "layout", ")", ";", "cc", "=", "new", "C...
Set a panel with the provided layout layout. @param layout JGoodies FormLayout @param panel JPanel on which the builder will place the components.
[ "Set", "a", "panel", "with", "the", "provided", "layout", "layout", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/form/builder/FormLayoutFormBuilder.java#L208-L215
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java
JsonModelCoder.get
public T get(InputStream stream, OnJsonObjectAddListener listener) throws IOException, JsonFormatException { """ Attempts to parse the given data as an object.<br> Accepts {@link OnJsonObjectAddListener}; allows you to peek various intermittent instances as parsing goes. @param stream JSON-formatted data @...
java
public T get(InputStream stream, OnJsonObjectAddListener listener) throws IOException, JsonFormatException { JsonPullParser parser = JsonPullParser.newParser(stream); return get(parser, listener); }
[ "public", "T", "get", "(", "InputStream", "stream", ",", "OnJsonObjectAddListener", "listener", ")", "throws", "IOException", ",", "JsonFormatException", "{", "JsonPullParser", "parser", "=", "JsonPullParser", ".", "newParser", "(", "stream", ")", ";", "return", "...
Attempts to parse the given data as an object.<br> Accepts {@link OnJsonObjectAddListener}; allows you to peek various intermittent instances as parsing goes. @param stream JSON-formatted data @param listener {@link OnJsonObjectAddListener} to notify @return An object instance @throws IOException @throws JsonFormatExc...
[ "Attempts", "to", "parse", "the", "given", "data", "as", "an", "object", ".", "<br", ">", "Accepts", "{", "@link", "OnJsonObjectAddListener", "}", ";", "allows", "you", "to", "peek", "various", "intermittent", "instances", "as", "parsing", "goes", "." ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L201-L205
tvesalainen/util
util/src/main/java/org/vesalainen/management/SimpleNotificationEmitter.java
SimpleNotificationEmitter.sendNotification
public synchronized void sendNotification(Supplier<String> textSupplier, Supplier<U> userDataSupplier, LongSupplier timestampSupplier) { """ Send notification. supplier is called only if there are listeners @param textSupplier @param userDataSupplier @param timestampSupplier """ if (!map.isEmpty())...
java
public synchronized void sendNotification(Supplier<String> textSupplier, Supplier<U> userDataSupplier, LongSupplier timestampSupplier) { if (!map.isEmpty()) { sendNotification(textSupplier.get(), userDataSupplier.get(), timestampSupplier.getAsLong()); } }
[ "public", "synchronized", "void", "sendNotification", "(", "Supplier", "<", "String", ">", "textSupplier", ",", "Supplier", "<", "U", ">", "userDataSupplier", ",", "LongSupplier", "timestampSupplier", ")", "{", "if", "(", "!", "map", ".", "isEmpty", "(", ")", ...
Send notification. supplier is called only if there are listeners @param textSupplier @param userDataSupplier @param timestampSupplier
[ "Send", "notification", ".", "supplier", "is", "called", "only", "if", "there", "are", "listeners" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/management/SimpleNotificationEmitter.java#L77-L83
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTransitionExtractor.java
MapTransitionExtractor.addNeighborGroup
private void addNeighborGroup(Collection<String> neighborGroups, Tile tile, int ox, int oy) { """ Add the neighbor group if exists. @param neighborGroups The current neighbor groups. @param tile The current tile reference. @param ox The horizontal offset in tile. @param oy The vertical offset in tile. ""...
java
private void addNeighborGroup(Collection<String> neighborGroups, Tile tile, int ox, int oy) { final Tile neighbor = map.getTile(tile.getInTileX() + ox, tile.getInTileY() + oy); if (neighbor != null) { final String neighborGroup = getNeighborGroup(tile, neighbor); ...
[ "private", "void", "addNeighborGroup", "(", "Collection", "<", "String", ">", "neighborGroups", ",", "Tile", "tile", ",", "int", "ox", ",", "int", "oy", ")", "{", "final", "Tile", "neighbor", "=", "map", ".", "getTile", "(", "tile", ".", "getInTileX", "(...
Add the neighbor group if exists. @param neighborGroups The current neighbor groups. @param tile The current tile reference. @param ox The horizontal offset in tile. @param oy The vertical offset in tile.
[ "Add", "the", "neighbor", "group", "if", "exists", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/MapTransitionExtractor.java#L164-L175
Axway/Grapes
server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java
ArtifactHandler.addLicenseToArtifact
public void addLicenseToArtifact(final String gavc, final String licenseId) { """ Add a license to an artifact @param gavc String @param licenseId String """ final DbArtifact dbArtifact = getArtifact(gavc); // Don't need to access the DB if the job is already done if(dbArtifact.get...
java
public void addLicenseToArtifact(final String gavc, final String licenseId) { final DbArtifact dbArtifact = getArtifact(gavc); // Don't need to access the DB if the job is already done if(dbArtifact.getLicenses().contains(licenseId)){ return; } final DbLicense dbLic...
[ "public", "void", "addLicenseToArtifact", "(", "final", "String", "gavc", ",", "final", "String", "licenseId", ")", "{", "final", "DbArtifact", "dbArtifact", "=", "getArtifact", "(", "gavc", ")", ";", "// Don't need to access the DB if the job is already done", "if", ...
Add a license to an artifact @param gavc String @param licenseId String
[ "Add", "a", "license", "to", "an", "artifact" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/core/ArtifactHandler.java#L296-L311
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/geomorphology/slope/OmsSlope.java
OmsSlope.calculateSlope
public static double calculateSlope( GridNode node, double flowValue ) { """ Calculates the slope of a given flowdirection value in currentCol and currentRow. @param node the current {@link GridNode}. @param flowValue the value of the flowdirection. @return """ double value = doubleNovalue; ...
java
public static double calculateSlope( GridNode node, double flowValue ) { double value = doubleNovalue; if (!isNovalue(flowValue)) { int flowDir = (int) flowValue; if (flowDir != 10) { Direction direction = Direction.forFlow(flowDir); double distanc...
[ "public", "static", "double", "calculateSlope", "(", "GridNode", "node", ",", "double", "flowValue", ")", "{", "double", "value", "=", "doubleNovalue", ";", "if", "(", "!", "isNovalue", "(", "flowValue", ")", ")", "{", "int", "flowDir", "=", "(", "int", ...
Calculates the slope of a given flowdirection value in currentCol and currentRow. @param node the current {@link GridNode}. @param flowValue the value of the flowdirection. @return
[ "Calculates", "the", "slope", "of", "a", "given", "flowdirection", "value", "in", "currentCol", "and", "currentRow", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/geomorphology/slope/OmsSlope.java#L135-L148
google/error-prone
core/src/main/java/com/google/errorprone/bugpatterns/FunctionalInterfaceClash.java
FunctionalInterfaceClash.functionalInterfaceSignature
private static String functionalInterfaceSignature(VisitorState state, MethodSymbol msym) { """ A string representation of a method descriptor, where all parameters whose type is a functional interface are "erased" to the interface's function type. For example, `foo(Supplier<String>)` is represented as `foo(()->...
java
private static String functionalInterfaceSignature(VisitorState state, MethodSymbol msym) { return String.format( "%s(%s)", msym.getSimpleName(), msym.getParameters().stream() .map(p -> functionalInterfaceSignature(state, p.type)) .collect(joining(","))); }
[ "private", "static", "String", "functionalInterfaceSignature", "(", "VisitorState", "state", ",", "MethodSymbol", "msym", ")", "{", "return", "String", ".", "format", "(", "\"%s(%s)\"", ",", "msym", ".", "getSimpleName", "(", ")", ",", "msym", ".", "getParameter...
A string representation of a method descriptor, where all parameters whose type is a functional interface are "erased" to the interface's function type. For example, `foo(Supplier<String>)` is represented as `foo(()->Ljava/lang/String;)`.
[ "A", "string", "representation", "of", "a", "method", "descriptor", "where", "all", "parameters", "whose", "type", "is", "a", "functional", "interface", "are", "erased", "to", "the", "interface", "s", "function", "type", ".", "For", "example", "foo", "(", "S...
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/FunctionalInterfaceClash.java#L138-L145
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/doc/DocClient.java
DocClient.disableReadToken
public DisableReadTokenResponse disableReadToken(String documentId, String token) { """ Disable read token. @param documentId The document id. @param token The token need to disable @return A DisableReadTokenResponse object. """ DisableReadTokenRequest request = new DisableReadTokenRequest(); ...
java
public DisableReadTokenResponse disableReadToken(String documentId, String token) { DisableReadTokenRequest request = new DisableReadTokenRequest(); request.setDocumentId(documentId); request.setToken(token); return this.disableReadToken(request); }
[ "public", "DisableReadTokenResponse", "disableReadToken", "(", "String", "documentId", ",", "String", "token", ")", "{", "DisableReadTokenRequest", "request", "=", "new", "DisableReadTokenRequest", "(", ")", ";", "request", ".", "setDocumentId", "(", "documentId", ")"...
Disable read token. @param documentId The document id. @param token The token need to disable @return A DisableReadTokenResponse object.
[ "Disable", "read", "token", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/doc/DocClient.java#L776-L781
jhunters/jprotobuf
android/src/main/java/com/baidu/bjf/remoting/protobuf/utils/StringUtils.java
StringUtils.toLong
public static long toLong(String str, long defaultValue) { """ <p> Convert a <code>String</code> to an <code>long</code>, returning a default value if the conversion fails. </p> <p> If the string is <code>null</code>, the default value is returned. </p> <pre> NumberUtils.toLong(null, 1) = 1 NumberUtils...
java
public static long toLong(String str, long defaultValue) { if (str == null) { return defaultValue; } try { return Long.parseLong(str); } catch (NumberFormatException nfe) { return defaultValue; } }
[ "public", "static", "long", "toLong", "(", "String", "str", ",", "long", "defaultValue", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "try", "{", "return", "Long", ".", "parseLong", "(", "str", ")", ";", "}"...
<p> Convert a <code>String</code> to an <code>long</code>, returning a default value if the conversion fails. </p> <p> If the string is <code>null</code>, the default value is returned. </p> <pre> NumberUtils.toLong(null, 1) = 1 NumberUtils.toLong("", 1) = 1 NumberUtils.toLong("1", 0) = 1 </pre> @param str the st...
[ "<p", ">", "Convert", "a", "<code", ">", "String<", "/", "code", ">", "to", "an", "<code", ">", "long<", "/", "code", ">", "returning", "a", "default", "value", "if", "the", "conversion", "fails", ".", "<", "/", "p", ">" ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/android/src/main/java/com/baidu/bjf/remoting/protobuf/utils/StringUtils.java#L1529-L1538
inmite/android-validation-komensky
library/src/main/java/eu/inmite/android/lib/validations/form/FormValidator.java
FormValidator.startLiveValidation
public static void startLiveValidation(final Fragment fragment, final IValidationCallback callback) { """ Start live validation - whenever focus changes from view with validations upon itself, validators will run. <br/> Don't forget to call {@link #stopLiveValidation(Object)} once you are done. @param fragment f...
java
public static void startLiveValidation(final Fragment fragment, final IValidationCallback callback) { startLiveValidation(fragment, fragment.getView(), callback); }
[ "public", "static", "void", "startLiveValidation", "(", "final", "Fragment", "fragment", ",", "final", "IValidationCallback", "callback", ")", "{", "startLiveValidation", "(", "fragment", ",", "fragment", ".", "getView", "(", ")", ",", "callback", ")", ";", "}" ...
Start live validation - whenever focus changes from view with validations upon itself, validators will run. <br/> Don't forget to call {@link #stopLiveValidation(Object)} once you are done. @param fragment fragment with views to validate, there can be only one continuous validation per target object (fragment) @param c...
[ "Start", "live", "validation", "-", "whenever", "focus", "changes", "from", "view", "with", "validations", "upon", "itself", "validators", "will", "run", ".", "<br", "/", ">", "Don", "t", "forget", "to", "call", "{" ]
train
https://github.com/inmite/android-validation-komensky/blob/7c544f2d9f104a9800fcf4757eecb3caa8e76451/library/src/main/java/eu/inmite/android/lib/validations/form/FormValidator.java#L125-L127
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.insertFromScript
public void insertFromScript(PersistentStore store, Object[] data) { """ Not for general use. Used by ScriptReader to unconditionally insert a row into the table when the .script file is read. """ systemUpdateIdentityValue(data); insertData(store, data); }
java
public void insertFromScript(PersistentStore store, Object[] data) { systemUpdateIdentityValue(data); insertData(store, data); }
[ "public", "void", "insertFromScript", "(", "PersistentStore", "store", ",", "Object", "[", "]", "data", ")", "{", "systemUpdateIdentityValue", "(", "data", ")", ";", "insertData", "(", "store", ",", "data", ")", ";", "}" ]
Not for general use. Used by ScriptReader to unconditionally insert a row into the table when the .script file is read.
[ "Not", "for", "general", "use", ".", "Used", "by", "ScriptReader", "to", "unconditionally", "insert", "a", "row", "into", "the", "table", "when", "the", ".", "script", "file", "is", "read", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2347-L2350
google/error-prone
check_api/src/main/java/com/google/errorprone/matchers/JUnitMatchers.java
JUnitMatchers.hasJUnitAnnotation
public static boolean hasJUnitAnnotation(MethodTree tree, VisitorState state) { """ Checks if a method, or any overridden method, is annotated with any annotation from the org.junit package. """ MethodSymbol methodSym = getSymbol(tree); if (methodSym == null) { return false; } if (hasJUn...
java
public static boolean hasJUnitAnnotation(MethodTree tree, VisitorState state) { MethodSymbol methodSym = getSymbol(tree); if (methodSym == null) { return false; } if (hasJUnitAttr(methodSym)) { return true; } return findSuperMethods(methodSym, state.getTypes()).stream() .anyM...
[ "public", "static", "boolean", "hasJUnitAnnotation", "(", "MethodTree", "tree", ",", "VisitorState", "state", ")", "{", "MethodSymbol", "methodSym", "=", "getSymbol", "(", "tree", ")", ";", "if", "(", "methodSym", "==", "null", ")", "{", "return", "false", "...
Checks if a method, or any overridden method, is annotated with any annotation from the org.junit package.
[ "Checks", "if", "a", "method", "or", "any", "overridden", "method", "is", "annotated", "with", "any", "annotation", "from", "the", "org", ".", "junit", "package", "." ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/check_api/src/main/java/com/google/errorprone/matchers/JUnitMatchers.java#L81-L91
Azure/azure-sdk-for-java
dns/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/dns/v2017_10_01/implementation/RecordSetsInner.java
RecordSetsInner.listAllByDnsZoneAsync
public Observable<Page<RecordSetInner>> listAllByDnsZoneAsync(final String resourceGroupName, final String zoneName, final Integer top, final String recordSetNameSuffix) { """ Lists all record sets in a DNS zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone ...
java
public Observable<Page<RecordSetInner>> listAllByDnsZoneAsync(final String resourceGroupName, final String zoneName, final Integer top, final String recordSetNameSuffix) { return listAllByDnsZoneWithServiceResponseAsync(resourceGroupName, zoneName, top, recordSetNameSuffix) .map(new Func1<ServiceRes...
[ "public", "Observable", "<", "Page", "<", "RecordSetInner", ">", ">", "listAllByDnsZoneAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "zoneName", ",", "final", "Integer", "top", ",", "final", "String", "recordSetNameSuffix", ")", "{",...
Lists all record sets in a DNS zone. @param resourceGroupName The name of the resource group. @param zoneName The name of the DNS zone (without a terminating dot). @param top The maximum number of record sets to return. If not specified, returns up to 100 record sets. @param recordSetNameSuffix The suffix label of the...
[ "Lists", "all", "record", "sets", "in", "a", "DNS", "zone", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/dns/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/dns/v2017_10_01/implementation/RecordSetsInner.java#L1530-L1538
ios-driver/ios-driver
server/src/main/java/org/uiautomation/ios/utils/SimulatorSettings.java
SimulatorSettings.setAccessibilityOptions
public void setAccessibilityOptions() { """ Set the Accessibility preferences. Overrides the values in 'com.apple.Accessibility.plist' file. """ // Not enabling ApplicationAccessibility may cause intruments to fail with the error // ScriptAgent[1170:2f07] Failed to enable accessiblity, kAXErrorSe...
java
public void setAccessibilityOptions() { // Not enabling ApplicationAccessibility may cause intruments to fail with the error // ScriptAgent[1170:2f07] Failed to enable accessiblity, kAXErrorServerNotFound // The above error is more prominent in Xcode5.1.1 when tested under OSX 10.9.5 // Setting Ap...
[ "public", "void", "setAccessibilityOptions", "(", ")", "{", "// Not enabling ApplicationAccessibility may cause intruments to fail with the error ", "// ScriptAgent[1170:2f07] Failed to enable accessiblity, kAXErrorServerNotFound", "// The above error is more prominent in Xcode5.1.1 when tested unde...
Set the Accessibility preferences. Overrides the values in 'com.apple.Accessibility.plist' file.
[ "Set", "the", "Accessibility", "preferences", ".", "Overrides", "the", "values", "in", "com", ".", "apple", ".", "Accessibility", ".", "plist", "file", "." ]
train
https://github.com/ios-driver/ios-driver/blob/a9744419508d970fbb1ce18e4326cc624b237c8b/server/src/main/java/org/uiautomation/ios/utils/SimulatorSettings.java#L116-L140
openskynetwork/java-adsb
src/main/java/org/opensky/libadsb/PositionDecoder.java
PositionDecoder.withinThreshold
public static boolean withinThreshold (double timeDifference, double distance, boolean surface) { """ This function is used to induce some tolerance if messages were received shortly after (due to Internet jitter in timestmaps). This function is derived empirically @param timeDifference the time between the rec...
java
public static boolean withinThreshold (double timeDifference, double distance, boolean surface) { double x = abs(timeDifference); double d = abs(distance); // if (d/x >= (surface?51.44:514.4)*2.5) // System.err.format("%.2f/%.2f=%.2f\n", d, x, d/x); // may be due to Internet jitter; distance is realistic i...
[ "public", "static", "boolean", "withinThreshold", "(", "double", "timeDifference", ",", "double", "distance", ",", "boolean", "surface", ")", "{", "double", "x", "=", "abs", "(", "timeDifference", ")", ";", "double", "d", "=", "abs", "(", "distance", ")", ...
This function is used to induce some tolerance if messages were received shortly after (due to Internet jitter in timestmaps). This function is derived empirically @param timeDifference the time between the reception of both messages @param distance covered @param surface is the airplane e.g. taxiing? @return whether d...
[ "This", "function", "is", "used", "to", "induce", "some", "tolerance", "if", "messages", "were", "received", "shortly", "after", "(", "due", "to", "Internet", "jitter", "in", "timestmaps", ")", ".", "This", "function", "is", "derived", "empirically" ]
train
https://github.com/openskynetwork/java-adsb/blob/01d497d3e74ad10063ab443ab583e9c8653a8b8d/src/main/java/org/opensky/libadsb/PositionDecoder.java#L72-L82
dropbox/dropbox-sdk-java
src/main/java/com/dropbox/core/android/DbxOfficialAppConnector.java
DbxOfficialAppConnector.getPreviewFileIntent
public Intent getPreviewFileIntent(Context context, String path, String lastRev) { """ Display the DropboxApp's preview of file located at path This function should only be called if file was opened through DropboxAPI. If path refers to a directory (as defined by having a '/' at end, will show Dropbox file tree....
java
public Intent getPreviewFileIntent(Context context, String path, String lastRev) { // TODO(jiuyangzhao): Assert path is valid Intent previewIntent = new Intent(ACTION_SHOW_DROPBOX_PREVIEW); addExtrasToIntent(context, previewIntent); previewIntent.putExtra(EXTRA_DROPBOX_PATH, path); ...
[ "public", "Intent", "getPreviewFileIntent", "(", "Context", "context", ",", "String", "path", ",", "String", "lastRev", ")", "{", "// TODO(jiuyangzhao): Assert path is valid", "Intent", "previewIntent", "=", "new", "Intent", "(", "ACTION_SHOW_DROPBOX_PREVIEW", ")", ";",...
Display the DropboxApp's preview of file located at path This function should only be called if file was opened through DropboxAPI. If path refers to a directory (as defined by having a '/' at end, will show Dropbox file tree. <p>You won't need to use this unless you are our official partner in openwith.</p> @param p...
[ "Display", "the", "DropboxApp", "s", "preview", "of", "file", "located", "at", "path", "This", "function", "should", "only", "be", "called", "if", "file", "was", "opened", "through", "DropboxAPI", ".", "If", "path", "refers", "to", "a", "directory", "(", "...
train
https://github.com/dropbox/dropbox-sdk-java/blob/d86157005fad6233c18b4b0f10f00b8d9d56ae92/src/main/java/com/dropbox/core/android/DbxOfficialAppConnector.java#L312-L323
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/util/LightWeightHashSet.java
LightWeightHashSet.containsElem
protected boolean containsElem(int index, final T key, int hashCode) { """ Check if the set contains given element at given index. @return true if element present, false otherwise. """ for (LinkedElement<T> e = entries[index]; e != null; e = e.next) { // element found if (hashCode == e.hashC...
java
protected boolean containsElem(int index, final T key, int hashCode) { for (LinkedElement<T> e = entries[index]; e != null; e = e.next) { // element found if (hashCode == e.hashCode && e.element.equals(key)) { return true; } } // element not found return false; }
[ "protected", "boolean", "containsElem", "(", "int", "index", ",", "final", "T", "key", ",", "int", "hashCode", ")", "{", "for", "(", "LinkedElement", "<", "T", ">", "e", "=", "entries", "[", "index", "]", ";", "e", "!=", "null", ";", "e", "=", "e",...
Check if the set contains given element at given index. @return true if element present, false otherwise.
[ "Check", "if", "the", "set", "contains", "given", "element", "at", "given", "index", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/util/LightWeightHashSet.java#L193-L202
VoltDB/voltdb
src/frontend/org/voltdb/expressions/AbstractExpression.java
AbstractExpression.validateExprsForIndexesAndMVs
public static boolean validateExprsForIndexesAndMVs(List<AbstractExpression> checkList, StringBuffer msg, boolean isMV) { """ Return true if the all of the expressions in the list can be part of an index expression or in group by and where clause of MV. As with validateExprForIndexesAndMVs for individual expres...
java
public static boolean validateExprsForIndexesAndMVs(List<AbstractExpression> checkList, StringBuffer msg, boolean isMV) { for (AbstractExpression expr : checkList) { if (!expr.isValidExprForIndexesAndMVs(msg, isMV)) { return false; } } return true; }
[ "public", "static", "boolean", "validateExprsForIndexesAndMVs", "(", "List", "<", "AbstractExpression", ">", "checkList", ",", "StringBuffer", "msg", ",", "boolean", "isMV", ")", "{", "for", "(", "AbstractExpression", "expr", ":", "checkList", ")", "{", "if", "(...
Return true if the all of the expressions in the list can be part of an index expression or in group by and where clause of MV. As with validateExprForIndexesAndMVs for individual expression, the StringBuffer parameter, msg, contains the name of the index. Error messages should be appended to it. @param checkList @p...
[ "Return", "true", "if", "the", "all", "of", "the", "expressions", "in", "the", "list", "can", "be", "part", "of", "an", "index", "expression", "or", "in", "group", "by", "and", "where", "clause", "of", "MV", ".", "As", "with", "validateExprForIndexesAndMVs...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/expressions/AbstractExpression.java#L1390-L1397
redkale/redkale
src/org/redkale/net/http/HttpRequest.java
HttpRequest.getShortHeader
public short getShortHeader(int radix, String name, int defaultValue) { """ 获取指定的header的short值, 没有返回默认short值 @param radix 进制数 @param name header名 @param defaultValue 默认short值 @return header值 """ return header.getShortValue(radix, name, (short) defaultValue); }
java
public short getShortHeader(int radix, String name, int defaultValue) { return header.getShortValue(radix, name, (short) defaultValue); }
[ "public", "short", "getShortHeader", "(", "int", "radix", ",", "String", "name", ",", "int", "defaultValue", ")", "{", "return", "header", ".", "getShortValue", "(", "radix", ",", "name", ",", "(", "short", ")", "defaultValue", ")", ";", "}" ]
获取指定的header的short值, 没有返回默认short值 @param radix 进制数 @param name header名 @param defaultValue 默认short值 @return header值
[ "获取指定的header的short值", "没有返回默认short值" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/net/http/HttpRequest.java#L1107-L1109
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/string/Levenshtein.java
Levenshtein.weightedLevenshtein
@SuppressWarnings("unchecked") public static <T extends Levenshtein> T weightedLevenshtein( String baseTarget, String compareTarget, CharacterSubstitution characterSubstitution) { """ Returns a new Weighted Levenshtein edit distance instance with compare target string @see WeightedLevenshtein @param baseTa...
java
@SuppressWarnings("unchecked") public static <T extends Levenshtein> T weightedLevenshtein( String baseTarget, String compareTarget, CharacterSubstitution characterSubstitution) { return (T) new WeightedLevenshtein(baseTarget, characterSubstitution).update(compareTarget); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", "extends", "Levenshtein", ">", "T", "weightedLevenshtein", "(", "String", "baseTarget", ",", "String", "compareTarget", ",", "CharacterSubstitution", "characterSubstitution", ")", "{", ...
Returns a new Weighted Levenshtein edit distance instance with compare target string @see WeightedLevenshtein @param baseTarget @param compareTarget @param characterSubstitution @return
[ "Returns", "a", "new", "Weighted", "Levenshtein", "edit", "distance", "instance", "with", "compare", "target", "string" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/string/Levenshtein.java#L87-L91
apache/fluo
modules/cluster/src/main/java/org/apache/fluo/cluster/runner/YarnAppRunner.java
YarnAppRunner.getResourceReport
private ResourceReport getResourceReport(TwillController controller, int maxWaitMs) { """ Attempts to retrieves ResourceReport until maxWaitMs time is reached. Set maxWaitMs to -1 to retry forever. """ ResourceReport report = controller.getResourceReport(); int elapsed = 0; while (report == null) ...
java
private ResourceReport getResourceReport(TwillController controller, int maxWaitMs) { ResourceReport report = controller.getResourceReport(); int elapsed = 0; while (report == null) { report = controller.getResourceReport(); try { Thread.sleep(500); } catch (InterruptedException e)...
[ "private", "ResourceReport", "getResourceReport", "(", "TwillController", "controller", ",", "int", "maxWaitMs", ")", "{", "ResourceReport", "report", "=", "controller", ".", "getResourceReport", "(", ")", ";", "int", "elapsed", "=", "0", ";", "while", "(", "rep...
Attempts to retrieves ResourceReport until maxWaitMs time is reached. Set maxWaitMs to -1 to retry forever.
[ "Attempts", "to", "retrieves", "ResourceReport", "until", "maxWaitMs", "time", "is", "reached", ".", "Set", "maxWaitMs", "to", "-", "1", "to", "retry", "forever", "." ]
train
https://github.com/apache/fluo/blob/8e06204d4167651e2d3b5219b8c1397644e6ba6e/modules/cluster/src/main/java/org/apache/fluo/cluster/runner/YarnAppRunner.java#L290-L312
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/user/UserCoreDao.java
UserCoreDao.queryForLike
public TResult queryForLike(String fieldName, ColumnValue value) { """ Query for the row where the field is like the value @param fieldName field name @param value column value @return result @since 3.0.1 """ String where = buildWhereLike(fieldName, value); String[] whereArgs = buildWhereArgs(value...
java
public TResult queryForLike(String fieldName, ColumnValue value) { String where = buildWhereLike(fieldName, value); String[] whereArgs = buildWhereArgs(value); TResult result = userDb.query(getTableName(), table.getColumnNames(), where, whereArgs, null, null, null); prepareResult(result); return result; ...
[ "public", "TResult", "queryForLike", "(", "String", "fieldName", ",", "ColumnValue", "value", ")", "{", "String", "where", "=", "buildWhereLike", "(", "fieldName", ",", "value", ")", ";", "String", "[", "]", "whereArgs", "=", "buildWhereArgs", "(", "value", ...
Query for the row where the field is like the value @param fieldName field name @param value column value @return result @since 3.0.1
[ "Query", "for", "the", "row", "where", "the", "field", "is", "like", "the", "value" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/user/UserCoreDao.java#L338-L345
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/UpdateIntegrationRequest.java
UpdateIntegrationRequest.withRequestTemplates
public UpdateIntegrationRequest withRequestTemplates(java.util.Map<String, String> requestTemplates) { """ <p> Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the te...
java
public UpdateIntegrationRequest withRequestTemplates(java.util.Map<String, String> requestTemplates) { setRequestTemplates(requestTemplates); return this; }
[ "public", "UpdateIntegrationRequest", "withRequestTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestTemplates", ")", "{", "setRequestTemplates", "(", "requestTemplates", ")", ";", "return", "this", ";", "}" ]
<p> Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. </p> @param requestTemplates Represents a map of Velocity templates that are a...
[ "<p", ">", "Represents", "a", "map", "of", "Velocity", "templates", "that", "are", "applied", "on", "the", "request", "payload", "based", "on", "the", "value", "of", "the", "Content", "-", "Type", "header", "sent", "by", "the", "client", ".", "The", "con...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/UpdateIntegrationRequest.java#L1207-L1210
unbescape/unbescape
src/main/java/org/unbescape/html/HtmlEscape.java
HtmlEscape.escapeHtml5
public static void escapeHtml5(final String text, final Writer writer) throws IOException { """ <p> Perform an HTML5 level 2 (result is ASCII) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 2</em> means this method will escape...
java
public static void escapeHtml5(final String text, final Writer writer) throws IOException { escapeHtml(text, writer, HtmlEscapeType.HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL, HtmlEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_MARKUP_SIGNIFICANT); }
[ "public", "static", "void", "escapeHtml5", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapeHtml", "(", "text", ",", "writer", ",", "HtmlEscapeType", ".", "HTML5_NAMED_REFERENCES_DEFAULT_TO_DECIMAL", ",", ...
<p> Perform an HTML5 level 2 (result is ASCII) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The five markup-significant characters: <tt>&lt;</tt>, <tt>&gt;</tt>, <tt>&amp;</tt>, <tt>&quot;</tt> ...
[ "<p", ">", "Perform", "an", "HTML5", "level", "2", "(", "result", "is", "ASCII", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/html/HtmlEscape.java#L405-L409
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java
Util.getManifestMetadataString
public static String getManifestMetadataString(Context context, String key) { """ Helper method for resolving manifest metadata string value @return null if key is missing or exception is thrown """ if (context == null) { throw new IllegalArgumentException("Context is null"); } if (key == null) { ...
java
public static String getManifestMetadataString(Context context, String key) { if (context == null) { throw new IllegalArgumentException("Context is null"); } if (key == null) { throw new IllegalArgumentException("Key is null"); } try { String appPackageName = context.getPackageName(); PackageMan...
[ "public", "static", "String", "getManifestMetadataString", "(", "Context", "context", ",", "String", "key", ")", "{", "if", "(", "context", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Context is null\"", ")", ";", "}", "if", "("...
Helper method for resolving manifest metadata string value @return null if key is missing or exception is thrown
[ "Helper", "method", "for", "resolving", "manifest", "metadata", "string", "value" ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/util/Util.java#L1147-L1170
msteiger/jxmapviewer2
jxmapviewer2/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java
GraphicsUtilities.createCompatibleImage
public static BufferedImage createCompatibleImage(BufferedImage image, int width, int height) { """ <p>Returns a new compatible image of the specified width and height, and the same transparency setting as the image specified as a parameter. That is, the retu...
java
public static BufferedImage createCompatibleImage(BufferedImage image, int width, int height) { return isHeadless() ? new BufferedImage(width, height, image.getType()) : getGraphicsConfiguration().createCompatibleImage(width, ...
[ "public", "static", "BufferedImage", "createCompatibleImage", "(", "BufferedImage", "image", ",", "int", "width", ",", "int", "height", ")", "{", "return", "isHeadless", "(", ")", "?", "new", "BufferedImage", "(", "width", ",", "height", ",", "image", ".", "...
<p>Returns a new compatible image of the specified width and height, and the same transparency setting as the image specified as a parameter. That is, the returned <code>BufferedImage</code> is compatible with the graphics hardware. If the method is called in a headless environment, then the returned BufferedImage will...
[ "<p", ">", "Returns", "a", "new", "compatible", "image", "of", "the", "specified", "width", "and", "height", "and", "the", "same", "transparency", "setting", "as", "the", "image", "specified", "as", "a", "parameter", ".", "That", "is", "the", "returned", "...
train
https://github.com/msteiger/jxmapviewer2/blob/82639273b0aac983b6026fb90aa925c0cf596410/jxmapviewer2/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java#L193-L199
liferay/com-liferay-commerce
commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListItemPersistenceImpl.java
CommerceWishListItemPersistenceImpl.findByCProductId
@Override public List<CommerceWishListItem> findByCProductId(long CProductId, int start, int end, OrderByComparator<CommerceWishListItem> orderByComparator) { """ Returns an ordered range of all the commerce wish list items where CProductId = &#63;. <p> Useful when paginating results. Returns a maximum of...
java
@Override public List<CommerceWishListItem> findByCProductId(long CProductId, int start, int end, OrderByComparator<CommerceWishListItem> orderByComparator) { return findByCProductId(CProductId, start, end, orderByComparator, true); }
[ "@", "Override", "public", "List", "<", "CommerceWishListItem", ">", "findByCProductId", "(", "long", "CProductId", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CommerceWishListItem", ">", "orderByComparator", ")", "{", "return", "findBy...
Returns an ordered range of all the commerce wish list items where CProductId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first ...
[ "Returns", "an", "ordered", "range", "of", "all", "the", "commerce", "wish", "list", "items", "where", "CProductId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-wish-list-service/src/main/java/com/liferay/commerce/wish/list/service/persistence/impl/CommerceWishListItemPersistenceImpl.java#L1260-L1265
opsmatters/opsmatters-core
src/main/java/com/opsmatters/core/util/StringUtilities.java
StringUtilities.endsWith
public static boolean endsWith(StringBuffer buffer, String suffix) { """ Checks that a string buffer ends up with a given string. @param buffer The buffer to perform the check on @param suffix The suffix @return <code>true</code> if the character sequence represented by the argument is a suffix of the characte...
java
public static boolean endsWith(StringBuffer buffer, String suffix) { if (suffix.length() > buffer.length()) return false; int endIndex = suffix.length() - 1; int bufferIndex = buffer.length() - 1; while (endIndex >= 0) { if (buffer.charAt(bufferIndex)...
[ "public", "static", "boolean", "endsWith", "(", "StringBuffer", "buffer", ",", "String", "suffix", ")", "{", "if", "(", "suffix", ".", "length", "(", ")", ">", "buffer", ".", "length", "(", ")", ")", "return", "false", ";", "int", "endIndex", "=", "suf...
Checks that a string buffer ends up with a given string. @param buffer The buffer to perform the check on @param suffix The suffix @return <code>true</code> if the character sequence represented by the argument is a suffix of the character sequence represented by the StringBuffer object; <code>false</code> otherwise. N...
[ "Checks", "that", "a", "string", "buffer", "ends", "up", "with", "a", "given", "string", "." ]
train
https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/util/StringUtilities.java#L371-L385
hawkular/hawkular-inventory
hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java
TinkerpopBackend.checkProperties
static void checkProperties(Map<String, Object> properties, String[] disallowedProperties) { """ If the properties map contains a key from the disallowed properties, throw an exception. @param properties the properties to check @param disallowedProperties the list of property names that cannot appear...
java
static void checkProperties(Map<String, Object> properties, String[] disallowedProperties) { if (properties == null || properties.isEmpty()) { return; } HashSet<String> disallowed = new HashSet<>(properties.keySet()); disallowed.retainAll(Arrays.asList(disallowedProperties))...
[ "static", "void", "checkProperties", "(", "Map", "<", "String", ",", "Object", ">", "properties", ",", "String", "[", "]", "disallowedProperties", ")", "{", "if", "(", "properties", "==", "null", "||", "properties", ".", "isEmpty", "(", ")", ")", "{", "r...
If the properties map contains a key from the disallowed properties, throw an exception. @param properties the properties to check @param disallowedProperties the list of property names that cannot appear in the provided map @throws IllegalArgumentException if the map contains one or more disallowed keys
[ "If", "the", "properties", "map", "contains", "a", "key", "from", "the", "disallowed", "properties", "throw", "an", "exception", "." ]
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-impl-tinkerpop-parent/hawkular-inventory-impl-tinkerpop/src/main/java/org/hawkular/inventory/impl/tinkerpop/TinkerpopBackend.java#L1268-L1280
IBM/ibm-cos-sdk-java
ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/S3CryptoModuleBase.java
S3CryptoModuleBase.newContentCryptoMaterial
private ContentCryptoMaterial newContentCryptoMaterial( EncryptionMaterialsProvider kekMaterialProvider, Map<String, String> materialsDescription, Provider provider, AmazonWebServiceRequest req) { """ Returns the content encryption material generated with the given kek material...
java
private ContentCryptoMaterial newContentCryptoMaterial( EncryptionMaterialsProvider kekMaterialProvider, Map<String, String> materialsDescription, Provider provider, AmazonWebServiceRequest req) { EncryptionMaterials kekMaterials = kekMaterialProvider.getEncryptio...
[ "private", "ContentCryptoMaterial", "newContentCryptoMaterial", "(", "EncryptionMaterialsProvider", "kekMaterialProvider", ",", "Map", "<", "String", ",", "String", ">", "materialsDescription", ",", "Provider", "provider", ",", "AmazonWebServiceRequest", "req", ")", "{", ...
Returns the content encryption material generated with the given kek material, material description and security providers; or null if the encryption material cannot be found for the specified description.
[ "Returns", "the", "content", "encryption", "material", "generated", "with", "the", "given", "kek", "material", "material", "description", "and", "security", "providers", ";", "or", "null", "if", "the", "encryption", "material", "cannot", "be", "found", "for", "t...
train
https://github.com/IBM/ibm-cos-sdk-java/blob/d0bb2dd754c328a05e7dba8dc42e28b271b6daf2/ibm-cos-java-sdk-s3/src/main/java/com/ibm/cloud/objectstorage/services/s3/internal/crypto/S3CryptoModuleBase.java#L466-L476
gallandarakhneorg/afc
core/vmutils/src/main/java/org/arakhne/afc/vmutil/locale/Locale.java
Locale.getStringWithDefault
@Pure public static String getStringWithDefault(String key, String defaultValue, Object... params) { """ Replies the text that corresponds to the specified resource. @param key is the name of the resource into the specified file @param defaultValue is the default value to replies if the resource does not cont...
java
@Pure public static String getStringWithDefault(String key, String defaultValue, Object... params) { return getStringWithDefault(ClassLoaderFinder.findClassLoader(), detectResourceClass(null), key, defaultValue, params); }
[ "@", "Pure", "public", "static", "String", "getStringWithDefault", "(", "String", "key", ",", "String", "defaultValue", ",", "Object", "...", "params", ")", "{", "return", "getStringWithDefault", "(", "ClassLoaderFinder", ".", "findClassLoader", "(", ")", ",", "...
Replies the text that corresponds to the specified resource. @param key is the name of the resource into the specified file @param defaultValue is the default value to replies if the resource does not contain the specified key. @param params is the the list of parameters which will replaces the <code>#1</code>, <code>...
[ "Replies", "the", "text", "that", "corresponds", "to", "the", "specified", "resource", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/vmutils/src/main/java/org/arakhne/afc/vmutil/locale/Locale.java#L390-L393
hibernate/hibernate-ogm
infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/persistencestrategy/counter/ClusteredCounterHandler.java
ClusteredCounterHandler.getCounterOrCreateIt
protected StrongCounter getCounterOrCreateIt(String counterName, int initialValue) { """ Create a counter if one is not defined already, otherwise return the existing one. @param counterName unique name for the counter @param initialValue initial value for the counter @return a {@link StrongCounter} """ ...
java
protected StrongCounter getCounterOrCreateIt(String counterName, int initialValue) { CounterManager counterManager = EmbeddedCounterManagerFactory.asCounterManager( cacheManager ); if ( !counterManager.isDefined( counterName ) ) { LOG.tracef( "Counter %s is not defined, creating it", counterName ); // global...
[ "protected", "StrongCounter", "getCounterOrCreateIt", "(", "String", "counterName", ",", "int", "initialValue", ")", "{", "CounterManager", "counterManager", "=", "EmbeddedCounterManagerFactory", ".", "asCounterManager", "(", "cacheManager", ")", ";", "if", "(", "!", ...
Create a counter if one is not defined already, otherwise return the existing one. @param counterName unique name for the counter @param initialValue initial value for the counter @return a {@link StrongCounter}
[ "Create", "a", "counter", "if", "one", "is", "not", "defined", "already", "otherwise", "return", "the", "existing", "one", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/persistencestrategy/counter/ClusteredCounterHandler.java#L47-L66
allure-framework/allure1
allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/utils/AllureResultsUtils.java
AllureResultsUtils.writeAttachment
public static Attachment writeAttachment(byte[] attachment, String title) throws IOException { """ Write attachment without specified type. Using {@link org.apache.tika.mime.MimeTypes#detect} to autodetect attachment type from attachment content. @param attachment to write @param title attachment title ...
java
public static Attachment writeAttachment(byte[] attachment, String title) throws IOException { String type = getDefaultMimeTypes().detect(new ByteArrayInputStream(attachment), new Metadata()).toString(); return writeAttachment(attachment, title, type); }
[ "public", "static", "Attachment", "writeAttachment", "(", "byte", "[", "]", "attachment", ",", "String", "title", ")", "throws", "IOException", "{", "String", "type", "=", "getDefaultMimeTypes", "(", ")", ".", "detect", "(", "new", "ByteArrayInputStream", "(", ...
Write attachment without specified type. Using {@link org.apache.tika.mime.MimeTypes#detect} to autodetect attachment type from attachment content. @param attachment to write @param title attachment title @return Created {@link ru.yandex.qatools.allure.model.Attachment} @throws IOException if can't write attachme...
[ "Write", "attachment", "without", "specified", "type", ".", "Using", "{", "@link", "org", ".", "apache", ".", "tika", ".", "mime", ".", "MimeTypes#detect", "}", "to", "autodetect", "attachment", "type", "from", "attachment", "content", "." ]
train
https://github.com/allure-framework/allure1/blob/9a816fa05d8b894a917b7ebb7fd1a4056dee4693/allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/utils/AllureResultsUtils.java#L290-L293
jenkinsci/jenkins
core/src/main/java/hudson/util/spring/BeanBuilder.java
BeanBuilder.loadBeans
public void loadBeans(Resource[] resources) throws IOException { """ Loads a set of given beans @param resources The resources to load @throws IOException """ Closure beans = new Closure(this){ @Override public Object call(Object... args) { return beans((Closure)args[0]); } }; Binding b = ...
java
public void loadBeans(Resource[] resources) throws IOException { Closure beans = new Closure(this){ @Override public Object call(Object... args) { return beans((Closure)args[0]); } }; Binding b = new Binding(); b.setVariable("beans", beans); GroovyShell shell = classLoader != null ? new GroovySh...
[ "public", "void", "loadBeans", "(", "Resource", "[", "]", "resources", ")", "throws", "IOException", "{", "Closure", "beans", "=", "new", "Closure", "(", "this", ")", "{", "@", "Override", "public", "Object", "call", "(", "Object", "...", "args", ")", "{...
Loads a set of given beans @param resources The resources to load @throws IOException
[ "Loads", "a", "set", "of", "given", "beans" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/spring/BeanBuilder.java#L328-L342
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/reflect/ProxyService.java
ProxyService.canProxy
@SuppressWarnings("unchecked") public boolean canProxy(Object target, Class<?>... proxyInterfaces) { """ Determines whether any of the {@link ProxyFactory} service provider implementations managed by this {@link ProxyService} is able to proxy the given target {@link Object}, given the array of {@link Class inte...
java
@SuppressWarnings("unchecked") public boolean canProxy(Object target, Class<?>... proxyInterfaces) { return stream(this).anyMatch(proxyFactory -> proxyFactory.canProxy(target, proxyInterfaces)); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "boolean", "canProxy", "(", "Object", "target", ",", "Class", "<", "?", ">", "...", "proxyInterfaces", ")", "{", "return", "stream", "(", "this", ")", ".", "anyMatch", "(", "proxyFactory", "->", ...
Determines whether any of the {@link ProxyFactory} service provider implementations managed by this {@link ProxyService} is able to proxy the given target {@link Object}, given the array of {@link Class interfaces}. @param target {@link Object} to proxy. @param proxyInterfaces array of {@link Class interfaces} to be i...
[ "Determines", "whether", "any", "of", "the", "{", "@link", "ProxyFactory", "}", "service", "provider", "implementations", "managed", "by", "this", "{", "@link", "ProxyService", "}", "is", "able", "to", "proxy", "the", "given", "target", "{", "@link", "Object",...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/reflect/ProxyService.java#L86-L89
alipay/sofa-hessian
src/main/java/com/caucho/hessian/io/HessianOutput.java
HessianOutput.writeRemote
public void writeRemote(String type, String url) throws IOException { """ Writes a remote object reference to the stream. The type is the type of the remote interface. <code><pre> 'r' 't' b16 b8 type url </pre></code> """ os.write('r'); os.write('t'); printLenString(type)...
java
public void writeRemote(String type, String url) throws IOException { os.write('r'); os.write('t'); printLenString(type); os.write('S'); printLenString(url); }
[ "public", "void", "writeRemote", "(", "String", "type", ",", "String", "url", ")", "throws", "IOException", "{", "os", ".", "write", "(", "'", "'", ")", ";", "os", ".", "write", "(", "'", "'", ")", ";", "printLenString", "(", "type", ")", ";", "os"...
Writes a remote object reference to the stream. The type is the type of the remote interface. <code><pre> 'r' 't' b16 b8 type url </pre></code>
[ "Writes", "a", "remote", "object", "reference", "to", "the", "stream", ".", "The", "type", "is", "the", "type", "of", "the", "remote", "interface", "." ]
train
https://github.com/alipay/sofa-hessian/blob/89e4f5af28602101dab7b498995018871616357b/src/main/java/com/caucho/hessian/io/HessianOutput.java#L402-L410
wisdom-framework/wisdom
core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/RequestFromVertx.java
RequestFromVertx.parameterAsBoolean
@Override public Boolean parameterAsBoolean(String name, boolean defaultValue) { """ Same like {@link #parameter(String)}, but converts the parameter to Boolean if found. <p/> The parameter is decoded by default. @param name The name of the post or query parameter @param defaultValue A default v...
java
@Override public Boolean parameterAsBoolean(String name, boolean defaultValue) { // We have to check if the map contains the key, as the retrieval method returns false on missing key. if (!request.params().contains(name)) { return defaultValue; } Boolean parameter = param...
[ "@", "Override", "public", "Boolean", "parameterAsBoolean", "(", "String", "name", ",", "boolean", "defaultValue", ")", "{", "// We have to check if the map contains the key, as the retrieval method returns false on missing key.", "if", "(", "!", "request", ".", "params", "("...
Same like {@link #parameter(String)}, but converts the parameter to Boolean if found. <p/> The parameter is decoded by default. @param name The name of the post or query parameter @param defaultValue A default value if parameter not found. @return The value of the parameter or the defaultValue if not found.
[ "Same", "like", "{", "@link", "#parameter", "(", "String", ")", "}", "but", "converts", "the", "parameter", "to", "Boolean", "if", "found", ".", "<p", "/", ">", "The", "parameter", "is", "decoded", "by", "default", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/wisdom-vertx-engine/src/main/java/org/wisdom/framework/vertx/RequestFromVertx.java#L477-L488
filosganga/geogson
core/src/main/java/com/github/filosganga/geogson/model/Polygon.java
Polygon.of
public static Polygon of(LinearRing perimeter, LinearRing... holes) { """ Creates a Polygon from the given perimeter and holes. @param perimeter The perimeter {@link LinearRing}. @param holes The holes {@link LinearRing} sequence. @return Polygon """ return Polygon.of(perimeter, Arrays.asList(ho...
java
public static Polygon of(LinearRing perimeter, LinearRing... holes) { return Polygon.of(perimeter, Arrays.asList(holes)); }
[ "public", "static", "Polygon", "of", "(", "LinearRing", "perimeter", ",", "LinearRing", "...", "holes", ")", "{", "return", "Polygon", ".", "of", "(", "perimeter", ",", "Arrays", ".", "asList", "(", "holes", ")", ")", ";", "}" ]
Creates a Polygon from the given perimeter and holes. @param perimeter The perimeter {@link LinearRing}. @param holes The holes {@link LinearRing} sequence. @return Polygon
[ "Creates", "a", "Polygon", "from", "the", "given", "perimeter", "and", "holes", "." ]
train
https://github.com/filosganga/geogson/blob/f0c7b0adfecc174caa8a03a6c19d301c7a47d4a0/core/src/main/java/com/github/filosganga/geogson/model/Polygon.java#L52-L54
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.waitForView
public boolean waitForView(int id, int minimumNumberOfMatches, int timeout, boolean scroll) { """ Waits for a View matching the specified resource id. @param id the R.id of the {@link View} to wait for @param minimumNumberOfMatches the minimum number of matches that are expected to be found. {@code 0} means an...
java
public boolean waitForView(int id, int minimumNumberOfMatches, int timeout, boolean scroll){ if(config.commandLogging){ Log.d(config.commandLoggingTag, "waitForView("+id+", "+minimumNumberOfMatches+", "+timeout+", "+scroll+")"); } int index = minimumNumberOfMatches-1; if(index < 1) index = 0; retur...
[ "public", "boolean", "waitForView", "(", "int", "id", ",", "int", "minimumNumberOfMatches", ",", "int", "timeout", ",", "boolean", "scroll", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d", "(", "config", ".", "commandLoggin...
Waits for a View matching the specified resource id. @param id the R.id of the {@link View} to wait for @param minimumNumberOfMatches the minimum number of matches that are expected to be found. {@code 0} means any number of matches @param timeout the amount of time in milliseconds to wait @param scroll {@code true} i...
[ "Waits", "for", "a", "View", "matching", "the", "specified", "resource", "id", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L486-L497
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/accounts/A_CmsGroupUsersList.java
A_CmsGroupUsersList.setUserData
protected void setUserData(CmsUser user, CmsListItem item) { """ Sets all needed data of the user into the list item object.<p> @param user the user to set the data for @param item the list item object to set the data into """ item.set(LIST_COLUMN_LOGIN, user.getName()); item.set(LIST_COLU...
java
protected void setUserData(CmsUser user, CmsListItem item) { item.set(LIST_COLUMN_LOGIN, user.getName()); item.set(LIST_COLUMN_NAME, user.getSimpleName()); item.set(LIST_COLUMN_ORGUNIT, CmsOrganizationalUnit.SEPARATOR + user.getOuFqn()); item.set(LIST_COLUMN_FULLNAME, user.getFullName()...
[ "protected", "void", "setUserData", "(", "CmsUser", "user", ",", "CmsListItem", "item", ")", "{", "item", ".", "set", "(", "LIST_COLUMN_LOGIN", ",", "user", ".", "getName", "(", ")", ")", ";", "item", ".", "set", "(", "LIST_COLUMN_NAME", ",", "user", "."...
Sets all needed data of the user into the list item object.<p> @param user the user to set the data for @param item the list item object to set the data into
[ "Sets", "all", "needed", "data", "of", "the", "user", "into", "the", "list", "item", "object", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/accounts/A_CmsGroupUsersList.java#L344-L350
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
InternalUtils.findActionConfig
public static ActionConfig findActionConfig( String actionConfigPath, String modulePath, ServletContext context ) { """ Get the Struts ActionConfig for the given action config path and module path. """ ModuleConfig moduleConfig = getModuleConfig( modulePath, context ); assert moduleConfig != nu...
java
public static ActionConfig findActionConfig( String actionConfigPath, String modulePath, ServletContext context ) { ModuleConfig moduleConfig = getModuleConfig( modulePath, context ); assert moduleConfig != null; return moduleConfig.findActionConfig( actionConfigPath ); }
[ "public", "static", "ActionConfig", "findActionConfig", "(", "String", "actionConfigPath", ",", "String", "modulePath", ",", "ServletContext", "context", ")", "{", "ModuleConfig", "moduleConfig", "=", "getModuleConfig", "(", "modulePath", ",", "context", ")", ";", "...
Get the Struts ActionConfig for the given action config path and module path.
[ "Get", "the", "Struts", "ActionConfig", "for", "the", "given", "action", "config", "path", "and", "module", "path", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java#L984-L989
OpenLiberty/open-liberty
dev/com.ibm.ws.opentracing.1.2/src/com/ibm/ws/opentracing/OpentracingService.java
OpentracingService.process
public static boolean process(final URI uri, final String path, final SpanFilterType type) { """ Return true if a span for the specified URI and type should be included. @param uri The URI of the request. @param type The type of the request. @return true if a span for the specified URI and type should be inc...
java
public static boolean process(final URI uri, final String path, final SpanFilterType type) { final String methodName = "process"; String newExcludeFilterString = OpentracingConfiguration.getServerSkipPattern(); if (!compare(excludeFilterString, newExcludeFilterString)) { updateFilte...
[ "public", "static", "boolean", "process", "(", "final", "URI", "uri", ",", "final", "String", "path", ",", "final", "SpanFilterType", "type", ")", "{", "final", "String", "methodName", "=", "\"process\"", ";", "String", "newExcludeFilterString", "=", "Opentracin...
Return true if a span for the specified URI and type should be included. @param uri The URI of the request. @param type The type of the request. @return true if a span for the specified URI and type should be included.
[ "Return", "true", "if", "a", "span", "for", "the", "specified", "URI", "and", "type", "should", "be", "included", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.opentracing.1.2/src/com/ibm/ws/opentracing/OpentracingService.java#L158-L186
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.wrongParameterNumber
public static void wrongParameterNumber(String methodName, String className) { """ Thrown when the parameters number is incorrect. @param methodName method name @param className class name """ throw new ConversionParameterException(MSG.INSTANCE.message(conversionParameterException,methodName,className)); ...
java
public static void wrongParameterNumber(String methodName, String className){ throw new ConversionParameterException(MSG.INSTANCE.message(conversionParameterException,methodName,className)); }
[ "public", "static", "void", "wrongParameterNumber", "(", "String", "methodName", ",", "String", "className", ")", "{", "throw", "new", "ConversionParameterException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "conversionParameterException", ",", "methodName", ...
Thrown when the parameters number is incorrect. @param methodName method name @param className class name
[ "Thrown", "when", "the", "parameters", "number", "is", "incorrect", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L206-L208
grails/grails-core
grails-bootstrap/src/main/groovy/grails/util/GrailsNameUtils.java
GrailsNameUtils.getPropertyForGetter
public static String getPropertyForGetter(String getterName, Class returnType) { """ Returns a property name equivalent for the given getter name and return type or null if it is not a valid getter. If not null or empty the getter name is assumed to be a valid identifier. @param getterName The getter name @pa...
java
public static String getPropertyForGetter(String getterName, Class returnType) { return getPropertyForGetter(getterName, returnType.getName()); }
[ "public", "static", "String", "getPropertyForGetter", "(", "String", "getterName", ",", "Class", "returnType", ")", "{", "return", "getPropertyForGetter", "(", "getterName", ",", "returnType", ".", "getName", "(", ")", ")", ";", "}" ]
Returns a property name equivalent for the given getter name and return type or null if it is not a valid getter. If not null or empty the getter name is assumed to be a valid identifier. @param getterName The getter name @param returnType The type the method returns @return The property name equivalent
[ "Returns", "a", "property", "name", "equivalent", "for", "the", "given", "getter", "name", "and", "return", "type", "or", "null", "if", "it", "is", "not", "a", "valid", "getter", ".", "If", "not", "null", "or", "empty", "the", "getter", "name", "is", "...
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-bootstrap/src/main/groovy/grails/util/GrailsNameUtils.java#L564-L566
upwork/java-upwork
src/com/Upwork/api/Routers/Reports/Finance/Accounts.java
Accounts.getOwned
public JSONObject getOwned(String freelancerReference, HashMap<String, String> params) throws JSONException { """ Generate Financial Reports for an owned Account @param freelancerReference Freelancer's reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject} ...
java
public JSONObject getOwned(String freelancerReference, HashMap<String, String> params) throws JSONException { return oClient.get("/finreports/v2/financial_account_owner/" + freelancerReference, params); }
[ "public", "JSONObject", "getOwned", "(", "String", "freelancerReference", ",", "HashMap", "<", "String", ",", "String", ">", "params", ")", "throws", "JSONException", "{", "return", "oClient", ".", "get", "(", "\"/finreports/v2/financial_account_owner/\"", "+", "fre...
Generate Financial Reports for an owned Account @param freelancerReference Freelancer's reference @param params Parameters @throws JSONException If error occurred @return {@link JSONObject}
[ "Generate", "Financial", "Reports", "for", "an", "owned", "Account" ]
train
https://github.com/upwork/java-upwork/blob/342297161503a74e9e0bddbd381ab5eebf4dc454/src/com/Upwork/api/Routers/Reports/Finance/Accounts.java#L54-L56
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/TransferManagerUtils.java
TransferManagerUtils.calculateOptimalPartSize
public static long calculateOptimalPartSize(PutObjectRequest putObjectRequest, TransferManagerConfiguration configuration) { """ Returns the optimal part size, in bytes, for each individual part upload in a multipart upload. @param putObjectRequest The request containing all the details of the upload. @param...
java
public static long calculateOptimalPartSize(PutObjectRequest putObjectRequest, TransferManagerConfiguration configuration) { double contentLength = TransferManagerUtils.getContentLength(putObjectRequest); double optimalPartSize = (double)contentLength / (double)MAXIMUM_UPLOAD_PARTS; // round up ...
[ "public", "static", "long", "calculateOptimalPartSize", "(", "PutObjectRequest", "putObjectRequest", ",", "TransferManagerConfiguration", "configuration", ")", "{", "double", "contentLength", "=", "TransferManagerUtils", ".", "getContentLength", "(", "putObjectRequest", ")", ...
Returns the optimal part size, in bytes, for each individual part upload in a multipart upload. @param putObjectRequest The request containing all the details of the upload. @param configuration Configuration values to use when calculating size. @return The optimal part size, in bytes, for each individual part upload...
[ "Returns", "the", "optimal", "part", "size", "in", "bytes", "for", "each", "individual", "part", "upload", "in", "a", "multipart", "upload", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/transfer/internal/TransferManagerUtils.java#L118-L124
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/config/util/DirectedAcyclicGraphVerifier.java
DirectedAcyclicGraphVerifier.addDependencies
private static <T> void addDependencies(final Vertex<T> vertex, final List<Vertex<T>> vertices) { """ Recursively add a vertex and all of its dependencies to a list of vertices @param vertex Vertex to be added. @param vertices Existing list of vertices. """ if (!vertices.contains(vertex)) ...
java
private static <T> void addDependencies(final Vertex<T> vertex, final List<Vertex<T>> vertices) { if (!vertices.contains(vertex)) { vertices.add(vertex); for (Vertex<T> v : vertex.getDependencies()) { addDependencies(v, vertices); } ...
[ "private", "static", "<", "T", ">", "void", "addDependencies", "(", "final", "Vertex", "<", "T", ">", "vertex", ",", "final", "List", "<", "Vertex", "<", "T", ">", ">", "vertices", ")", "{", "if", "(", "!", "vertices", ".", "contains", "(", "vertex",...
Recursively add a vertex and all of its dependencies to a list of vertices @param vertex Vertex to be added. @param vertices Existing list of vertices.
[ "Recursively", "add", "a", "vertex", "and", "all", "of", "its", "dependencies", "to", "a", "list", "of", "vertices" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/config/util/DirectedAcyclicGraphVerifier.java#L62-L73
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/CheckArg.java
CheckArg.isNegative
public static void isNegative( int argument, String name ) { """ Check that the argument is negative (<0). @param argument The argument @param name The name of the argument @throws IllegalArgumentException If argument is non-negative (>=0) """ if (argument >= 0) ...
java
public static void isNegative( int argument, String name ) { if (argument >= 0) { throw new IllegalArgumentException(CommonI18n.argumentMustBeNegative.text(name, argument)); } }
[ "public", "static", "void", "isNegative", "(", "int", "argument", ",", "String", "name", ")", "{", "if", "(", "argument", ">=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "CommonI18n", ".", "argumentMustBeNegative", ".", "text", "(", "na...
Check that the argument is negative (<0). @param argument The argument @param name The name of the argument @throws IllegalArgumentException If argument is non-negative (>=0)
[ "Check", "that", "the", "argument", "is", "negative", "(", "<0", ")", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/CheckArg.java#L182-L187
amilcar-sr/JustifiedTextView
library/src/main/java/com/codesgood/views/JustifiedTextView.java
JustifiedTextView.addWord
private void addWord(String word, boolean containsNewLine) { """ Adds a word into sentence and starts a new one if "new line" is part of the string. @param word Word to be added @param containsNewLine Specifies if the string contains a new line """ currentSentence.add(word); if (...
java
private void addWord(String word, boolean containsNewLine) { currentSentence.add(word); if (containsNewLine) { sentences.add(getSentenceFromListCheckingNewLines(currentSentence)); currentSentence.clear(); } }
[ "private", "void", "addWord", "(", "String", "word", ",", "boolean", "containsNewLine", ")", "{", "currentSentence", ".", "add", "(", "word", ")", ";", "if", "(", "containsNewLine", ")", "{", "sentences", ".", "add", "(", "getSentenceFromListCheckingNewLines", ...
Adds a word into sentence and starts a new one if "new line" is part of the string. @param word Word to be added @param containsNewLine Specifies if the string contains a new line
[ "Adds", "a", "word", "into", "sentence", "and", "starts", "a", "new", "one", "if", "new", "line", "is", "part", "of", "the", "string", "." ]
train
https://github.com/amilcar-sr/JustifiedTextView/blob/8fd91b4cfb225f973096519eae8295c3d7e8d49f/library/src/main/java/com/codesgood/views/JustifiedTextView.java#L136-L142
hawkular/hawkular-commons
hawkular-command-gateway/hawkular-command-gateway-war/src/main/java/org/hawkular/cmdgw/command/bus/BusCommandContextFactory.java
BusCommandContextFactory.newCommandContext
public BusCommandContext newCommandContext(Endpoint endpoint) { """ Creates a new {@link BusCommandContext} with the given {@code endpoint}. @param endpoint the queue or topic the present request came from @return a new {@link BusCommandContext} """ return new BusCommandContext(endpoint, connection...
java
public BusCommandContext newCommandContext(Endpoint endpoint) { return new BusCommandContext(endpoint, connectionFactoryProvider.getConnectionFactory(), wsEndpoints.getUiClientSessions(), wsEndpoints.getFeedSessions()); }
[ "public", "BusCommandContext", "newCommandContext", "(", "Endpoint", "endpoint", ")", "{", "return", "new", "BusCommandContext", "(", "endpoint", ",", "connectionFactoryProvider", ".", "getConnectionFactory", "(", ")", ",", "wsEndpoints", ".", "getUiClientSessions", "("...
Creates a new {@link BusCommandContext} with the given {@code endpoint}. @param endpoint the queue or topic the present request came from @return a new {@link BusCommandContext}
[ "Creates", "a", "new", "{", "@link", "BusCommandContext", "}", "with", "the", "given", "{", "@code", "endpoint", "}", "." ]
train
https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-command-gateway/hawkular-command-gateway-war/src/main/java/org/hawkular/cmdgw/command/bus/BusCommandContextFactory.java#L51-L54
jsonld-java/jsonld-java
core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java
JsonLdProcessor.toRDF
public static Object toRDF(Object input, JsonLdOptions options) throws JsonLdError { """ Outputs the RDF dataset found in the given JSON-LD object. @param input the JSON-LD input. @param options the options to use: [base] the base IRI to use. [format] the format to use to output a string: 'application/nquad...
java
public static Object toRDF(Object input, JsonLdOptions options) throws JsonLdError { return toRDF(input, null, options); }
[ "public", "static", "Object", "toRDF", "(", "Object", "input", ",", "JsonLdOptions", "options", ")", "throws", "JsonLdError", "{", "return", "toRDF", "(", "input", ",", "null", ",", "options", ")", ";", "}" ]
Outputs the RDF dataset found in the given JSON-LD object. @param input the JSON-LD input. @param options the options to use: [base] the base IRI to use. [format] the format to use to output a string: 'application/nquads' for N-Quads (default). [loadContext(url, callback(err, url, result))] the context loader. @return...
[ "Outputs", "the", "RDF", "dataset", "found", "in", "the", "given", "JSON", "-", "LD", "object", "." ]
train
https://github.com/jsonld-java/jsonld-java/blob/efeef6ee96029a0011649633457035fa6be42da1/core/src/main/java/com/github/jsonldjava/core/JsonLdProcessor.java#L554-L556
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
HtmlDocletWriter.addAnnotationInfo
public boolean addAnnotationInfo(int indent, Doc doc, Parameter param, Content tree) { """ Add the annotatation types for the given doc and parameter. @param indent the number of spaces to indent the parameters. @param doc the doc to write annotations for. @param param the parameter to write annot...
java
public boolean addAnnotationInfo(int indent, Doc doc, Parameter param, Content tree) { return addAnnotationInfo(indent, doc, param.annotations(), false, tree); }
[ "public", "boolean", "addAnnotationInfo", "(", "int", "indent", ",", "Doc", "doc", ",", "Parameter", "param", ",", "Content", "tree", ")", "{", "return", "addAnnotationInfo", "(", "indent", ",", "doc", ",", "param", ".", "annotations", "(", ")", ",", "fals...
Add the annotatation types for the given doc and parameter. @param indent the number of spaces to indent the parameters. @param doc the doc to write annotations for. @param param the parameter to write annotations for. @param tree the content tree to which the annotation types will be added
[ "Add", "the", "annotatation", "types", "for", "the", "given", "doc", "and", "parameter", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java#L1873-L1876
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/Log.java
Log.logWarning
public void logWarning(String message, Exception exception) { """ Prints warning info to the current warningLog @param message The message to log @param exception An Exception """ if (!(logWarning || globalLog.logWarning)) return; if (warningLog != null) log(wa...
java
public void logWarning(String message, Exception exception) { if (!(logWarning || globalLog.logWarning)) return; if (warningLog != null) log(warningLog, "WARNING", owner, message, exception); else log(globalLog.warningLog, "WARNING", owner, message, e...
[ "public", "void", "logWarning", "(", "String", "message", ",", "Exception", "exception", ")", "{", "if", "(", "!", "(", "logWarning", "||", "globalLog", ".", "logWarning", ")", ")", "return", ";", "if", "(", "warningLog", "!=", "null", ")", "log", "(", ...
Prints warning info to the current warningLog @param message The message to log @param exception An Exception
[ "Prints", "warning", "info", "to", "the", "current", "warningLog" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/Log.java#L385-L393
msteiger/jxmapviewer2
jxmapviewer2/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java
GraphicsUtilities.createCompatibleImage
public static BufferedImage createCompatibleImage(BufferedImage image) { """ <p>Returns a new compatible image with the same width, height and transparency as the image specified as a parameter. That is, the returned BufferedImage will be compatible with the graphics hardware. If this method is called in a head...
java
public static BufferedImage createCompatibleImage(BufferedImage image) { return createCompatibleImage(image, image.getWidth(), image.getHeight()); }
[ "public", "static", "BufferedImage", "createCompatibleImage", "(", "BufferedImage", "image", ")", "{", "return", "createCompatibleImage", "(", "image", ",", "image", ".", "getWidth", "(", ")", ",", "image", ".", "getHeight", "(", ")", ")", ";", "}" ]
<p>Returns a new compatible image with the same width, height and transparency as the image specified as a parameter. That is, the returned BufferedImage will be compatible with the graphics hardware. If this method is called in a headless environment, then the returned BufferedImage will be compatible with the source ...
[ "<p", ">", "Returns", "a", "new", "compatible", "image", "with", "the", "same", "width", "height", "and", "transparency", "as", "the", "image", "specified", "as", "a", "parameter", ".", "That", "is", "the", "returned", "BufferedImage", "will", "be", "compati...
train
https://github.com/msteiger/jxmapviewer2/blob/82639273b0aac983b6026fb90aa925c0cf596410/jxmapviewer2/src/main/java/org/jxmapviewer/util/GraphicsUtilities.java#L168-L170
loldevs/riotapi
rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java
ThrottledApiHandler.getLeagues
public Future<Map<Long, List<LeagueList>>> getLeagues(long... summoners) { """ Get a listing of leagues for the specified summoners @param summoners The ids of the summoners @return A list of leagues @see <a href=https://developer.riotgames.com/api/methods#!/593/1862>Official API documentation</a> """ ...
java
public Future<Map<Long, List<LeagueList>>> getLeagues(long... summoners) { return new ApiFuture<>(() -> handler.getLeagues(summoners)); }
[ "public", "Future", "<", "Map", "<", "Long", ",", "List", "<", "LeagueList", ">", ">", ">", "getLeagues", "(", "long", "...", "summoners", ")", "{", "return", "new", "ApiFuture", "<>", "(", "(", ")", "->", "handler", ".", "getLeagues", "(", "summoners"...
Get a listing of leagues for the specified summoners @param summoners The ids of the summoners @return A list of leagues @see <a href=https://developer.riotgames.com/api/methods#!/593/1862>Official API documentation</a>
[ "Get", "a", "listing", "of", "leagues", "for", "the", "specified", "summoners" ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/rest/src/main/java/net/boreeas/riotapi/rest/ThrottledApiHandler.java#L235-L237
googleads/googleads-java-lib
modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/utils/v201805/StatementBuilder.java
StatementBuilder.withBindVariableValue
public StatementBuilder withBindVariableValue(String key, Object value) { """ Adds a bind variable value to the statement. The value will converted according to {@link Pql#createValue(Object)}. If the value is of type {@code Value}, no conversion will be done. @param key the value key @param value the bind v...
java
public StatementBuilder withBindVariableValue(String key, Object value) { return withBindVariableValue(key, Pql.createValue(value)); }
[ "public", "StatementBuilder", "withBindVariableValue", "(", "String", "key", ",", "Object", "value", ")", "{", "return", "withBindVariableValue", "(", "key", ",", "Pql", ".", "createValue", "(", "value", ")", ")", ";", "}" ]
Adds a bind variable value to the statement. The value will converted according to {@link Pql#createValue(Object)}. If the value is of type {@code Value}, no conversion will be done. @param key the value key @param value the bind variable value @return a reference to this object
[ "Adds", "a", "bind", "variable", "value", "to", "the", "statement", ".", "The", "value", "will", "converted", "according", "to", "{", "@link", "Pql#createValue", "(", "Object", ")", "}", ".", "If", "the", "value", "is", "of", "type", "{", "@code", "Value...
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/utils/v201805/StatementBuilder.java#L76-L78
rollbar/rollbar-java
rollbar-android/src/main/java/com/rollbar/android/Rollbar.java
Rollbar.reportMessage
@Deprecated public static void reportMessage(final String message, final String level, final Map<String, String> params) { """ Report a message to Rollbar, specifying the level, and including extra data. @param message the message to send. @param level the severity level. @param params the extra data. "...
java
@Deprecated public static void reportMessage(final String message, final String level, final Map<String, String> params) { ensureInit(new Runnable() { @Override public void run() { notifier.log(message, params != null ? Collections.<String, Object>unmodifiableMap(params) : null, Level.lookupBy...
[ "@", "Deprecated", "public", "static", "void", "reportMessage", "(", "final", "String", "message", ",", "final", "String", "level", ",", "final", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "ensureInit", "(", "new", "Runnable", "(", ")", ...
Report a message to Rollbar, specifying the level, and including extra data. @param message the message to send. @param level the severity level. @param params the extra data.
[ "Report", "a", "message", "to", "Rollbar", "specifying", "the", "level", "and", "including", "extra", "data", "." ]
train
https://github.com/rollbar/rollbar-java/blob/5eb4537d1363722b51cfcce55b427cbd8489f17b/rollbar-android/src/main/java/com/rollbar/android/Rollbar.java#L883-L891
CloudSlang/cs-actions
cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java
DBConnectionManager.getPropBooleanValue
protected boolean getPropBooleanValue(String aPropName, String aDefaultValue) { """ get boolean value based on the property name from property file the property file is databasePooling.properties @param aPropName a property name @param aDefaultValue a default value for that property, if the property is no...
java
protected boolean getPropBooleanValue(String aPropName, String aDefaultValue) { boolean retValue; String temp = dbPoolingProperties.getProperty(aPropName, aDefaultValue); retValue = Boolean.valueOf(temp); return retValue; }
[ "protected", "boolean", "getPropBooleanValue", "(", "String", "aPropName", ",", "String", "aDefaultValue", ")", "{", "boolean", "retValue", ";", "String", "temp", "=", "dbPoolingProperties", ".", "getProperty", "(", "aPropName", ",", "aDefaultValue", ")", ";", "re...
get boolean value based on the property name from property file the property file is databasePooling.properties @param aPropName a property name @param aDefaultValue a default value for that property, if the property is not there. @return boolean value of that property
[ "get", "boolean", "value", "based", "on", "the", "property", "name", "from", "property", "file", "the", "property", "file", "is", "databasePooling", ".", "properties" ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-database/src/main/java/io/cloudslang/content/database/services/dbconnection/DBConnectionManager.java#L341-L348
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.entryEquals
public static boolean entryEquals(File f1, File f2, String path) { """ Compares same entry in two ZIP files (byte-by-byte). @param f1 first ZIP file. @param f2 second ZIP file. @param path name of the entry. @return <code>true</code> if the contents of the entry was same in both ZIP files. """ re...
java
public static boolean entryEquals(File f1, File f2, String path) { return entryEquals(f1, f2, path, path); }
[ "public", "static", "boolean", "entryEquals", "(", "File", "f1", ",", "File", "f2", ",", "String", "path", ")", "{", "return", "entryEquals", "(", "f1", ",", "f2", ",", "path", ",", "path", ")", ";", "}" ]
Compares same entry in two ZIP files (byte-by-byte). @param f1 first ZIP file. @param f2 second ZIP file. @param path name of the entry. @return <code>true</code> if the contents of the entry was same in both ZIP files.
[ "Compares", "same", "entry", "in", "two", "ZIP", "files", "(", "byte", "-", "by", "-", "byte", ")", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L3214-L3216
jhunters/jprotobuf
src/main/java/com/baidu/bjf/remoting/protobuf/code/CodedConstant.java
CodedConstant.getEnumName
public static String getEnumName(Enum[] e, int value) { """ Gets the enum name. @param e the e @param value the value @return the enum name """ if (e != null) { int toCompareValue; for (Enum en : e) { if (en instanceof EnumReadable) { toC...
java
public static String getEnumName(Enum[] e, int value) { if (e != null) { int toCompareValue; for (Enum en : e) { if (en instanceof EnumReadable) { toCompareValue = ((EnumReadable) en).value(); } else { toCompareValue...
[ "public", "static", "String", "getEnumName", "(", "Enum", "[", "]", "e", ",", "int", "value", ")", "{", "if", "(", "e", "!=", "null", ")", "{", "int", "toCompareValue", ";", "for", "(", "Enum", "en", ":", "e", ")", "{", "if", "(", "en", "instance...
Gets the enum name. @param e the e @param value the value @return the enum name
[ "Gets", "the", "enum", "name", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/code/CodedConstant.java#L632-L647
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/date.java
date.parseDate
public static java.util.Date parseDate(String dateString, String dateFormat) { """ Parse a data string into a real Date <p/> Note: (e.g. "yyyy-MM-dd HH:mm:ss") @param dateString date in String format @param dateFormat desired format (e.g. "yyyy-MM-dd HH:mm:ss") @return """ java.util.Date newDat...
java
public static java.util.Date parseDate(String dateString, String dateFormat) { java.util.Date newDate = null; try { newDate = new SimpleDateFormat(dateFormat, Locale.ENGLISH) .parse(dateString); } catch (ParseException e) { QuickUtils.log.d("pa...
[ "public", "static", "java", ".", "util", ".", "Date", "parseDate", "(", "String", "dateString", ",", "String", "dateFormat", ")", "{", "java", ".", "util", ".", "Date", "newDate", "=", "null", ";", "try", "{", "newDate", "=", "new", "SimpleDateFormat", "...
Parse a data string into a real Date <p/> Note: (e.g. "yyyy-MM-dd HH:mm:ss") @param dateString date in String format @param dateFormat desired format (e.g. "yyyy-MM-dd HH:mm:ss") @return
[ "Parse", "a", "data", "string", "into", "a", "real", "Date", "<p", "/", ">", "Note", ":", "(", "e", ".", "g", ".", "yyyy", "-", "MM", "-", "dd", "HH", ":", "mm", ":", "ss", ")" ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/date.java#L149-L159
m-m-m/util
reflect/src/main/java/net/sf/mmm/util/reflect/base/ReflectionUtilImpl.java
ReflectionUtilImpl.visitResources
private static void visitResources(File packageDirectory, StringBuilder qualifiedNameBuilder, int qualifiedNamePrefixLength, ResourceVisitor visitor) { """ This method scans the given {@code packageDirectory} recursively for resources. @param packageDirectory is the directory representing the {@link Package}. ...
java
private static void visitResources(File packageDirectory, StringBuilder qualifiedNameBuilder, int qualifiedNamePrefixLength, ResourceVisitor visitor) { for (File childFile : packageDirectory.listFiles()) { String fileName = childFile.getName(); qualifiedNameBuilder.setLength(qualifiedNamePrefixLength);...
[ "private", "static", "void", "visitResources", "(", "File", "packageDirectory", ",", "StringBuilder", "qualifiedNameBuilder", ",", "int", "qualifiedNamePrefixLength", ",", "ResourceVisitor", "visitor", ")", "{", "for", "(", "File", "childFile", ":", "packageDirectory", ...
This method scans the given {@code packageDirectory} recursively for resources. @param packageDirectory is the directory representing the {@link Package}. @param qualifiedNameBuilder is a {@link StringBuilder} containing the qualified prefix (the {@link Package} with a trailing dot). @param qualifiedNamePrefixLength t...
[ "This", "method", "scans", "the", "given", "{", "@code", "packageDirectory", "}", "recursively", "for", "resources", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/reflect/src/main/java/net/sf/mmm/util/reflect/base/ReflectionUtilImpl.java#L636-L653
google/closure-compiler
src/com/google/javascript/jscomp/PeepholeFoldConstants.java
PeepholeFoldConstants.tryFoldLeftChildOp
private Node tryFoldLeftChildOp(Node n, Node left, Node right) { """ Expressions such as [foo() * 10 * 20] generate parse trees where no node has two const children ((foo() * 10) * 20), so performArithmeticOp() won't fold it -- tryFoldLeftChildOp() will. Specifically, it folds associative expressions where: - ...
java
private Node tryFoldLeftChildOp(Node n, Node left, Node right) { Token opType = n.getToken(); checkState((NodeUtil.isAssociative(opType) && NodeUtil.isCommutative(opType)) || n.isAdd()); checkState(!n.isAdd() || !NodeUtil.mayBeString(n, shouldUseTypes)); // Use getNumberValue to handle constants like ...
[ "private", "Node", "tryFoldLeftChildOp", "(", "Node", "n", ",", "Node", "left", ",", "Node", "right", ")", "{", "Token", "opType", "=", "n", ".", "getToken", "(", ")", ";", "checkState", "(", "(", "NodeUtil", ".", "isAssociative", "(", "opType", ")", "...
Expressions such as [foo() * 10 * 20] generate parse trees where no node has two const children ((foo() * 10) * 20), so performArithmeticOp() won't fold it -- tryFoldLeftChildOp() will. Specifically, it folds associative expressions where: - The left child is also an associative expression of the same time. - The right...
[ "Expressions", "such", "as", "[", "foo", "()", "*", "10", "*", "20", "]", "generate", "parse", "trees", "where", "no", "node", "has", "two", "const", "children", "((", "foo", "()", "*", "10", ")", "*", "20", ")", "so", "performArithmeticOp", "()", "w...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PeepholeFoldConstants.java#L881-L916
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/textfield/LabeledEmailTextFieldPanel.java
LabeledEmailTextFieldPanel.newEmailTextField
protected EmailTextField newEmailTextField(final String id, final IModel<M> model) { """ Factory method for create the new {@link EmailTextField}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link EmailTextField}. @p...
java
protected EmailTextField newEmailTextField(final String id, final IModel<M> model) { return ComponentFactory.newEmailTextField(id, new PropertyModel<String>(model.getObject(), getId())); }
[ "protected", "EmailTextField", "newEmailTextField", "(", "final", "String", "id", ",", "final", "IModel", "<", "M", ">", "model", ")", "{", "return", "ComponentFactory", ".", "newEmailTextField", "(", "id", ",", "new", "PropertyModel", "<", "String", ">", "(",...
Factory method for create the new {@link EmailTextField}. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a new {@link EmailTextField}. @param id the id @param model the model @return the new {@link EmailTextField}
[ "Factory", "method", "for", "create", "the", "new", "{", "@link", "EmailTextField", "}", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "users", "can", "provide...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/textfield/LabeledEmailTextFieldPanel.java#L102-L106
eclipse/xtext-extras
org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/parser/antlr/XtextAntlrGeneratorComparisonFragment.java
XtextAntlrGeneratorComparisonFragment.createOutlet
@Override protected Outlet createOutlet(final boolean append, final String encoding, final String name, final boolean overwrite, final String path) { """ Tweaks the generation of the {@link Generator#SRC_GEN Generator.SRC_GEN}, {@link Generator#SRC_GEN_IDE Generator.SRC_GEN_IDE}, and {@link Generator#SRC_GEN_U...
java
@Override protected Outlet createOutlet(final boolean append, final String encoding, final String name, final boolean overwrite, final String path) { Outlet _xifexpression = null; if (((Objects.equal(name, Generator.SRC_GEN) || Objects.equal(name, Generator.SRC_GEN_IDE)) || Objects.equal(name, Generator.SRC_G...
[ "@", "Override", "protected", "Outlet", "createOutlet", "(", "final", "boolean", "append", ",", "final", "String", "encoding", ",", "final", "String", "name", ",", "final", "boolean", "overwrite", ",", "final", "String", "path", ")", "{", "Outlet", "_xifexpres...
Tweaks the generation of the {@link Generator#SRC_GEN Generator.SRC_GEN}, {@link Generator#SRC_GEN_IDE Generator.SRC_GEN_IDE}, and {@link Generator#SRC_GEN_UI Generator.SRC_GEN_UI} outlets and injects the {@link #getTmpFolder()}.
[ "Tweaks", "the", "generation", "of", "the", "{" ]
train
https://github.com/eclipse/xtext-extras/blob/451359541295323a29f5855e633f770cec02069a/org.eclipse.xtext.generator/xtend-gen/org/eclipse/xtext/generator/parser/antlr/XtextAntlrGeneratorComparisonFragment.java#L219-L228
google/allocation-instrumenter
src/main/java/com/google/monitoring/runtime/instrumentation/AllocationMethodAdapter.java
AllocationMethodAdapter.visitTypeInsn
@Override public void visitTypeInsn(int opcode, String typeName) { """ new and anewarray bytecodes take a String operand for the type of the object or array element so we hook them here. Note that new doesn't actually result in any instrumentation here; we just do a bit of book-keeping and do the instrumentati...
java
@Override public void visitTypeInsn(int opcode, String typeName) { if (opcode == Opcodes.NEW) { // We can't actually tag this object right after allocation because it // must be initialized with a ctor before we can touch it (Verifier // enforces this). Instead, we just note it and tag followin...
[ "@", "Override", "public", "void", "visitTypeInsn", "(", "int", "opcode", ",", "String", "typeName", ")", "{", "if", "(", "opcode", "==", "Opcodes", ".", "NEW", ")", "{", "// We can't actually tag this object right after allocation because it", "// must be initialized w...
new and anewarray bytecodes take a String operand for the type of the object or array element so we hook them here. Note that new doesn't actually result in any instrumentation here; we just do a bit of book-keeping and do the instrumentation following the constructor call (because we're not allowed to touch the object...
[ "new", "and", "anewarray", "bytecodes", "take", "a", "String", "operand", "for", "the", "type", "of", "the", "object", "or", "array", "element", "so", "we", "hook", "them", "here", ".", "Note", "that", "new", "doesn", "t", "actually", "result", "in", "an...
train
https://github.com/google/allocation-instrumenter/blob/58d8473e8832e51f39ae7aa38328f61c4b747bff/src/main/java/com/google/monitoring/runtime/instrumentation/AllocationMethodAdapter.java#L444-L460
unbescape/unbescape
src/main/java/org/unbescape/properties/PropertiesEscape.java
PropertiesEscape.escapePropertiesValueMinimal
public static void escapePropertiesValueMinimal(final char[] text, final int offset, final int len, final Writer writer) throws IOException { """ <p> Perform a Java Properties Value level 1 (only basic set) <strong>escape</strong> operation on a <tt>char[]</tt>...
java
public static void escapePropertiesValueMinimal(final char[] text, final int offset, final int len, final Writer writer) throws IOException { escapePropertiesValue(text, offset, len, writer, PropertiesValueEscapeLevel.LEVEL_1_BASIC_ESCAPE_SET); }
[ "public", "static", "void", "escapePropertiesValueMinimal", "(", "final", "char", "[", "]", "text", ",", "final", "int", "offset", ",", "final", "int", "len", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapePropertiesValue", "(", "t...
<p> Perform a Java Properties Value level 1 (only basic set) <strong>escape</strong> operation on a <tt>char[]</tt> input. </p> <p> <em>Level 1</em> means this method will only escape the Java Properties basic escape set: </p> <ul> <li>The <em>Single Escape Characters</em>: <tt>&#92;t</tt> (<tt>U+0009</tt>), <tt>&#92;n...
[ "<p", ">", "Perform", "a", "Java", "Properties", "Value", "level", "1", "(", "only", "basic", "set", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "char", "[]", "<", "/", "tt", ">", "input", ".", "<", "/", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L630-L633
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
MolecularFormulaManipulator.getHTML
public static String getHTML(IMolecularFormula formula, boolean chargeB, boolean isotopeB) { """ Returns the string representation of the molecular formula based on Hill System with numbers wrapped in &lt;sub&gt;&lt;/sub&gt; tags and the isotope of each Element in &lt;sup&gt;&lt;/sup&gt; tags and the total char...
java
public static String getHTML(IMolecularFormula formula, boolean chargeB, boolean isotopeB) { String[] orderElements; if (containsElement(formula, formula.getBuilder().newInstance(IElement.class, "C"))) orderElements = generateOrderEle_Hill_WithCarbons(); else orderElement...
[ "public", "static", "String", "getHTML", "(", "IMolecularFormula", "formula", ",", "boolean", "chargeB", ",", "boolean", "isotopeB", ")", "{", "String", "[", "]", "orderElements", ";", "if", "(", "containsElement", "(", "formula", ",", "formula", ".", "getBuil...
Returns the string representation of the molecular formula based on Hill System with numbers wrapped in &lt;sub&gt;&lt;/sub&gt; tags and the isotope of each Element in &lt;sup&gt;&lt;/sup&gt; tags and the total charge of IMolecularFormula in &lt;sup&gt;&lt;/sup&gt; tags. Useful for displaying formulae in Swing componen...
[ "Returns", "the", "string", "representation", "of", "the", "molecular", "formula", "based", "on", "Hill", "System", "with", "numbers", "wrapped", "in", "&lt", ";", "sub&gt", ";", "&lt", ";", "/", "sub&gt", ";", "tags", "and", "the", "isotope", "of", "each"...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java#L496-L503
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java
JcrAccessControlList.defaultAcl
public static JcrAccessControlList defaultAcl( AccessControlManagerImpl acm ) { """ Creates default Access Control List. @param acm access control manager instance @return Access Control List with all permissions granted to everyone. """ JcrAccessControlList acl = new JcrAccessControlList("/"); ...
java
public static JcrAccessControlList defaultAcl( AccessControlManagerImpl acm ) { JcrAccessControlList acl = new JcrAccessControlList("/"); try { acl.principals.put(SimplePrincipal.EVERYONE, new AccessControlEntryImpl(SimplePrincipal.EVERYONE, acm.privileges())); } catch (AccessControl...
[ "public", "static", "JcrAccessControlList", "defaultAcl", "(", "AccessControlManagerImpl", "acm", ")", "{", "JcrAccessControlList", "acl", "=", "new", "JcrAccessControlList", "(", "\"/\"", ")", ";", "try", "{", "acl", ".", "principals", ".", "put", "(", "SimplePri...
Creates default Access Control List. @param acm access control manager instance @return Access Control List with all permissions granted to everyone.
[ "Creates", "default", "Access", "Control", "List", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/JcrAccessControlList.java#L60-L68
maven-nar/nar-maven-plugin
src/main/java/com/github/maven_nar/cpptasks/apple/PropertyListSerialization.java
PropertyListSerialization.serializeElement
private static void serializeElement(final String tag, final String content, final ContentHandler handler) throws SAXException { """ Creates an element with the specified tag name and character content. @param tag tag name. @param content character content. @param handler destination of serialization...
java
private static void serializeElement(final String tag, final String content, final ContentHandler handler) throws SAXException { final AttributesImpl attributes = new AttributesImpl(); handler.startElement(null, tag, tag, attributes); handler.characters(content.toCharArray(), 0, content.length()); ...
[ "private", "static", "void", "serializeElement", "(", "final", "String", "tag", ",", "final", "String", "content", ",", "final", "ContentHandler", "handler", ")", "throws", "SAXException", "{", "final", "AttributesImpl", "attributes", "=", "new", "AttributesImpl", ...
Creates an element with the specified tag name and character content. @param tag tag name. @param content character content. @param handler destination of serialization events. @throws SAXException if exception during serialization.
[ "Creates", "an", "element", "with", "the", "specified", "tag", "name", "and", "character", "content", "." ]
train
https://github.com/maven-nar/nar-maven-plugin/blob/3c622e2024296b4203431bbae3bde290a01dac00/src/main/java/com/github/maven_nar/cpptasks/apple/PropertyListSerialization.java#L113-L119
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.chompLast
public static String chompLast(String str, String sep) { """ <p>Remove a value if and only if the String ends with that value.</p> @param str the String to chomp from, must not be null @param sep the String to chomp, must not be null @return String without chomped ending @throws NullPointerException if str...
java
public static String chompLast(String str, String sep) { if (str.length() == 0) { return str; } String sub = str.substring(str.length() - sep.length()); if (sep.equals(sub)) { return str.substring(0, str.length() - sep.length()); } return str; }
[ "public", "static", "String", "chompLast", "(", "String", "str", ",", "String", "sep", ")", "{", "if", "(", "str", ".", "length", "(", ")", "==", "0", ")", "{", "return", "str", ";", "}", "String", "sub", "=", "str", ".", "substring", "(", "str", ...
<p>Remove a value if and only if the String ends with that value.</p> @param str the String to chomp from, must not be null @param sep the String to chomp, must not be null @return String without chomped ending @throws NullPointerException if str or sep is <code>null</code> @deprecated Use {@link #chomp(String,Strin...
[ "<p", ">", "Remove", "a", "value", "if", "and", "only", "if", "the", "String", "ends", "with", "that", "value", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L4025-L4034
Azure/azure-sdk-for-java
containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java
ContainerGroupsInner.createOrUpdateAsync
public Observable<ContainerGroupInner> createOrUpdateAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { """ Create or update container groups. Create or update container groups with specified configurations. @param resourceGroupName The name of the resource group. ...
java
public Observable<ContainerGroupInner> createOrUpdateAsync(String resourceGroupName, String containerGroupName, ContainerGroupInner containerGroup) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, containerGroupName, containerGroup).map(new Func1<ServiceResponse<ContainerGroupInner>, Container...
[ "public", "Observable", "<", "ContainerGroupInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "containerGroupName", ",", "ContainerGroupInner", "containerGroup", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceG...
Create or update container groups. Create or update container groups with specified configurations. @param resourceGroupName The name of the resource group. @param containerGroupName The name of the container group. @param containerGroup The properties of the container group to be created or updated. @throws IllegalAr...
[ "Create", "or", "update", "container", "groups", ".", "Create", "or", "update", "container", "groups", "with", "specified", "configurations", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerinstance/resource-manager/v2018_02_01_preview/src/main/java/com/microsoft/azure/management/containerinstance/v2018_02_01_preview/implementation/ContainerGroupsInner.java#L470-L477
geomajas/geomajas-project-server
impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java
DtoConverterServiceImpl.toDto
public VectorTile toDto(InternalTile tile, String crs, int featureIncludes) throws GeomajasException { """ Convert a server-side tile representations into a DTO tile. @param tile The server-side representation of a tile. @param crs crs to include in features (if any) @param featureIncludes Indicate which a...
java
public VectorTile toDto(InternalTile tile, String crs, int featureIncludes) throws GeomajasException { return toDto(tile); }
[ "public", "VectorTile", "toDto", "(", "InternalTile", "tile", ",", "String", "crs", ",", "int", "featureIncludes", ")", "throws", "GeomajasException", "{", "return", "toDto", "(", "tile", ")", ";", "}" ]
Convert a server-side tile representations into a DTO tile. @param tile The server-side representation of a tile. @param crs crs to include in features (if any) @param featureIncludes Indicate which aspects of the should be included see {@link org.geomajas.layer.VectorLayerService} @return Returns the DTO version that...
[ "Convert", "a", "server", "-", "side", "tile", "representations", "into", "a", "DTO", "tile", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/impl/src/main/java/org/geomajas/internal/service/DtoConverterServiceImpl.java#L419-L421
elibom/jogger
src/main/java/com/elibom/jogger/middleware/router/loader/AbstractFileRoutesLoader.java
AbstractFileRoutesLoader.buildRoute
private Route buildRoute(String httpMethod, String path, String controllerName, String methodName) throws RoutesException { """ Helper method. Builds a {@link Route} object from the received arguments instantiating the controller and the method. It uses the {@link #loadController(String)} method that has to be de...
java
private Route buildRoute(String httpMethod, String path, String controllerName, String methodName) throws RoutesException { Object controller = controllerLoader.load(controllerName); Method method = getMethod(controller, methodName); return new Route(HttpMethod.valueOf(httpMethod.toUpperCase()), path, controller...
[ "private", "Route", "buildRoute", "(", "String", "httpMethod", ",", "String", "path", ",", "String", "controllerName", ",", "String", "methodName", ")", "throws", "RoutesException", "{", "Object", "controller", "=", "controllerLoader", ".", "load", "(", "controlle...
Helper method. Builds a {@link Route} object from the received arguments instantiating the controller and the method. It uses the {@link #loadController(String)} method that has to be defined by concrete implementations. @param httpMethod the HTTP method to which the route will respond. @param path the HTTP path to wh...
[ "Helper", "method", ".", "Builds", "a", "{", "@link", "Route", "}", "object", "from", "the", "received", "arguments", "instantiating", "the", "controller", "and", "the", "method", ".", "It", "uses", "the", "{", "@link", "#loadController", "(", "String", ")",...
train
https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/middleware/router/loader/AbstractFileRoutesLoader.java#L250-L255
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/ArrowButtonPainter.java
ArrowButtonPainter.paintForegroundPressed
private void paintForegroundPressed(Graphics2D g, int width, int height) { """ Paint the arrow in pressed state. @param g the Graphics2D context to paint with. @param width the width. @param height the height. """ Shape s = decodeArrowPath(width, height); g.setPaint(pressedColor); ...
java
private void paintForegroundPressed(Graphics2D g, int width, int height) { Shape s = decodeArrowPath(width, height); g.setPaint(pressedColor); g.fill(s); }
[ "private", "void", "paintForegroundPressed", "(", "Graphics2D", "g", ",", "int", "width", ",", "int", "height", ")", "{", "Shape", "s", "=", "decodeArrowPath", "(", "width", ",", "height", ")", ";", "g", ".", "setPaint", "(", "pressedColor", ")", ";", "g...
Paint the arrow in pressed state. @param g the Graphics2D context to paint with. @param width the width. @param height the height.
[ "Paint", "the", "arrow", "in", "pressed", "state", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/ArrowButtonPainter.java#L124-L130
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.withInputStream
public static Object withInputStream(Path self, @ClosureParams(value = SimpleType.class, options = "java.io.InputStream") Closure closure) throws IOException { """ Create a new InputStream for this file and passes it into the closure. This method ensures the stream is closed after the closure returns. @param s...
java
public static Object withInputStream(Path self, @ClosureParams(value = SimpleType.class, options = "java.io.InputStream") Closure closure) throws IOException { return IOGroovyMethods.withStream(newInputStream(self), closure); }
[ "public", "static", "Object", "withInputStream", "(", "Path", "self", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.InputStream\"", ")", "Closure", "closure", ")", "throws", "IOException", "{", "return"...
Create a new InputStream for this file and passes it into the closure. This method ensures the stream is closed after the closure returns. @param self a Path @param closure a closure @return the value returned by the closure @throws java.io.IOException if an IOException occurs. @see org.codehaus.groovy.runtime.IOGr...
[ "Create", "a", "new", "InputStream", "for", "this", "file", "and", "passes", "it", "into", "the", "closure", ".", "This", "method", "ensures", "the", "stream", "is", "closed", "after", "the", "closure", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L1500-L1502
structr/structr
structr-ui/src/main/java/org/structr/web/common/FileHelper.java
FileHelper.createFile
public static <T extends File> T createFile(final SecurityContext securityContext, final InputStream fileStream, final Class<T> fileType, final PropertyMap props) throws FrameworkException, IOException { """ Create a new file node from the given input stream and sets the parentFolder @param <T> @param securi...
java
public static <T extends File> T createFile(final SecurityContext securityContext, final InputStream fileStream, final Class<T> fileType, final PropertyMap props) throws FrameworkException, IOException { T newFile = (T) StructrApp.getInstance(securityContext).create(fileType, props); setFileData(newFile, fileSt...
[ "public", "static", "<", "T", "extends", "File", ">", "T", "createFile", "(", "final", "SecurityContext", "securityContext", ",", "final", "InputStream", "fileStream", ",", "final", "Class", "<", "T", ">", "fileType", ",", "final", "PropertyMap", "props", ")",...
Create a new file node from the given input stream and sets the parentFolder @param <T> @param securityContext @param fileStream @param fileType defaults to File.class if null @param props @return file @throws FrameworkException @throws IOException
[ "Create", "a", "new", "file", "node", "from", "the", "given", "input", "stream", "and", "sets", "the", "parentFolder" ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/web/common/FileHelper.java#L182-L193
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ObjectUtils.java
ObjectUtils.returnValueOrDefaultIfNull
public static <T> T returnValueOrDefaultIfNull(T value, T defaultValue) { """ Returns the given {@code value} if not {@literal null} or returns the {@code defaultValue}. @param <T> {@link Class} type of the {@code value} and {@code defaultValue}. @param value {@link Object} to evaluate for {@literal null}. @p...
java
public static <T> T returnValueOrDefaultIfNull(T value, T defaultValue) { return returnValueOrDefaultIfNull(value, () -> defaultValue); }
[ "public", "static", "<", "T", ">", "T", "returnValueOrDefaultIfNull", "(", "T", "value", ",", "T", "defaultValue", ")", "{", "return", "returnValueOrDefaultIfNull", "(", "value", ",", "(", ")", "->", "defaultValue", ")", ";", "}" ]
Returns the given {@code value} if not {@literal null} or returns the {@code defaultValue}. @param <T> {@link Class} type of the {@code value} and {@code defaultValue}. @param value {@link Object} to evaluate for {@literal null}. @param defaultValue {@link Object} value to return if {@code value} is {@literal null}. @...
[ "Returns", "the", "given", "{", "@code", "value", "}", "if", "not", "{", "@literal", "null", "}", "or", "returns", "the", "{", "@code", "defaultValue", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ObjectUtils.java#L190-L192
lucee/Lucee
core/src/main/java/lucee/runtime/converter/JSConverter.java
JSConverter._serializeList
private void _serializeList(String name, List list, StringBuilder sb, Set<Object> done) throws ConverterException { """ serialize a List (as Array) @param name @param list List to serialize @param sb @param done @return serialized list @throws ConverterException """ if (useShortcuts) sb.append("[];")...
java
private void _serializeList(String name, List list, StringBuilder sb, Set<Object> done) throws ConverterException { if (useShortcuts) sb.append("[];"); else sb.append("new Array();"); ListIterator it = list.listIterator(); int index = -1; while (it.hasNext()) { // if(index!=-1)sb.append(","); index = i...
[ "private", "void", "_serializeList", "(", "String", "name", ",", "List", "list", ",", "StringBuilder", "sb", ",", "Set", "<", "Object", ">", "done", ")", "throws", "ConverterException", "{", "if", "(", "useShortcuts", ")", "sb", ".", "append", "(", "\"[];\...
serialize a List (as Array) @param name @param list List to serialize @param sb @param done @return serialized list @throws ConverterException
[ "serialize", "a", "List", "(", "as", "Array", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/converter/JSConverter.java#L192-L206
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLSubAnnotationPropertyOfAxiomImpl_CustomFieldSerializer.java
OWLSubAnnotationPropertyOfAxiomImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLSubAnnotationPropertyOfAxiomImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link co...
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLSubAnnotationPropertyOfAxiomImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLSubAnnotationPropertyOfAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}"...
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.clie...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamWriter", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLSubAnnotationPropertyOfAxiomImpl_CustomFieldSerializer.java#L75-L78
GoogleCloudPlatform/appengine-pipelines
java/src/main/java/com/google/appengine/tools/pipeline/impl/backend/AppEngineBackEnd.java
AppEngineBackEnd.queryBarrier
private Barrier queryBarrier(Key barrierKey, boolean inflate) throws NoSuchObjectException { """ {@code inflate = true} means that {@link Barrier#getWaitingOnInflated()} will not return {@code null}. """ Entity entity = getEntity("queryBarrier", barrierKey); Barrier barrier = new Barrier(entity); ...
java
private Barrier queryBarrier(Key barrierKey, boolean inflate) throws NoSuchObjectException { Entity entity = getEntity("queryBarrier", barrierKey); Barrier barrier = new Barrier(entity); if (inflate) { Collection<Barrier> barriers = new ArrayList<>(1); barriers.add(barrier); inflateBarrier...
[ "private", "Barrier", "queryBarrier", "(", "Key", "barrierKey", ",", "boolean", "inflate", ")", "throws", "NoSuchObjectException", "{", "Entity", "entity", "=", "getEntity", "(", "\"queryBarrier\"", ",", "barrierKey", ")", ";", "Barrier", "barrier", "=", "new", ...
{@code inflate = true} means that {@link Barrier#getWaitingOnInflated()} will not return {@code null}.
[ "{" ]
train
https://github.com/GoogleCloudPlatform/appengine-pipelines/blob/277394648dac3e8214677af898935d07399ac8e1/java/src/main/java/com/google/appengine/tools/pipeline/impl/backend/AppEngineBackEnd.java#L296-L306
javafxports/javafxmobile-plugin
src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java
ApkBuilder.checkInputFile
private static void checkInputFile(File file) throws FileNotFoundException, ApkCreationException { """ Checks an input {@link File} object. This checks the following: - the file is not an existing directory. - that the file exists (if <var>throwIfDoesntExist</var> is <code>false</code>) and can be read. @para...
java
private static void checkInputFile(File file) throws FileNotFoundException, ApkCreationException { if (file.isDirectory()) { throw new ApkCreationException("%s is a directory!", file); } if (file.exists()) { if (!file.canRead()) { throw new ApkCreationExc...
[ "private", "static", "void", "checkInputFile", "(", "File", "file", ")", "throws", "FileNotFoundException", ",", "ApkCreationException", "{", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "throw", "new", "ApkCreationException", "(", "\"%s is a directo...
Checks an input {@link File} object. This checks the following: - the file is not an existing directory. - that the file exists (if <var>throwIfDoesntExist</var> is <code>false</code>) and can be read. @param file the File to check @throws FileNotFoundException if the file is not here. @throws ApkCreationException If t...
[ "Checks", "an", "input", "{" ]
train
https://github.com/javafxports/javafxmobile-plugin/blob/a9bef513b7e1bfa85f9a668226e6943c6d9f847f/src/main/java/org/javafxports/jfxmobile/plugin/android/task/ApkBuilder.java#L981-L993
apache/incubator-gobblin
gobblin-api/src/main/java/org/apache/gobblin/source/workunit/WorkUnit.java
WorkUnit.getLowWatermark
public <T extends Watermark> T getLowWatermark(Class<T> watermarkClass) { """ Get the low {@link Watermark}. A default {@link Gson} object will be used to deserialize the watermark. @param watermarkClass the watermark class for this {@code WorkUnit}. @return the low watermark in this {@code WorkUnit}. """ ...
java
public <T extends Watermark> T getLowWatermark(Class<T> watermarkClass) { return getLowWatermark(watermarkClass, GSON); }
[ "public", "<", "T", "extends", "Watermark", ">", "T", "getLowWatermark", "(", "Class", "<", "T", ">", "watermarkClass", ")", "{", "return", "getLowWatermark", "(", "watermarkClass", ",", "GSON", ")", ";", "}" ]
Get the low {@link Watermark}. A default {@link Gson} object will be used to deserialize the watermark. @param watermarkClass the watermark class for this {@code WorkUnit}. @return the low watermark in this {@code WorkUnit}.
[ "Get", "the", "low", "{", "@link", "Watermark", "}", ".", "A", "default", "{", "@link", "Gson", "}", "object", "will", "be", "used", "to", "deserialize", "the", "watermark", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/source/workunit/WorkUnit.java#L228-L230
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/GV/parsers/AbstractSepaParser.java
AbstractSepaParser.put
void put(HashMap<String, String> props, Names name, String value) { """ Speichert den Wert in den Properties. @param props die Properties. @param name das Property. @param value der Wert. """ // BUGZILLA 1610 - "java.util.Properties" ist von Hashtable abgeleitet und unterstuetzt keine NULL-Werte ...
java
void put(HashMap<String, String> props, Names name, String value) { // BUGZILLA 1610 - "java.util.Properties" ist von Hashtable abgeleitet und unterstuetzt keine NULL-Werte if (value == null) return; props.put(name.getValue(), value); }
[ "void", "put", "(", "HashMap", "<", "String", ",", "String", ">", "props", ",", "Names", "name", ",", "String", "value", ")", "{", "// BUGZILLA 1610 - \"java.util.Properties\" ist von Hashtable abgeleitet und unterstuetzt keine NULL-Werte", "if", "(", "value", "==", "nu...
Speichert den Wert in den Properties. @param props die Properties. @param name das Property. @param value der Wert.
[ "Speichert", "den", "Wert", "in", "den", "Properties", "." ]
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/GV/parsers/AbstractSepaParser.java#L18-L24
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.deleteRegexEntityModelAsync
public Observable<OperationStatus> deleteRegexEntityModelAsync(UUID appId, String versionId, UUID regexEntityId) { """ Deletes a regex entity model from the application. @param appId The application ID. @param versionId The version ID. @param regexEntityId The regex entity extractor ID. @throws IllegalArgume...
java
public Observable<OperationStatus> deleteRegexEntityModelAsync(UUID appId, String versionId, UUID regexEntityId) { return deleteRegexEntityModelWithServiceResponseAsync(appId, versionId, regexEntityId).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { @Override public ...
[ "public", "Observable", "<", "OperationStatus", ">", "deleteRegexEntityModelAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "regexEntityId", ")", "{", "return", "deleteRegexEntityModelWithServiceResponseAsync", "(", "appId", ",", "versionId", ",",...
Deletes a regex entity model from the application. @param appId The application ID. @param versionId The version ID. @param regexEntityId The regex entity extractor ID. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the OperationStatus object
[ "Deletes", "a", "regex", "entity", "model", "from", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L10396-L10403