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
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.addQuery
public QueryControllerQuery addQuery(String queryStr, String queryId, String groupId) { """ Creates a new query into a group and adds it to the vector QueryControllerEntity """ int position = getElementPosition(queryId); QueryControllerQuery query = new QueryControllerQuery(queryId); query.setQuery(que...
java
public QueryControllerQuery addQuery(String queryStr, String queryId, String groupId) { int position = getElementPosition(queryId); QueryControllerQuery query = new QueryControllerQuery(queryId); query.setQuery(queryStr); QueryControllerGroup group = getGroup(groupId); if (group == null) { group = new ...
[ "public", "QueryControllerQuery", "addQuery", "(", "String", "queryStr", ",", "String", "queryId", ",", "String", "groupId", ")", "{", "int", "position", "=", "getElementPosition", "(", "queryId", ")", ";", "QueryControllerQuery", "query", "=", "new", "QueryContro...
Creates a new query into a group and adds it to the vector QueryControllerEntity
[ "Creates", "a", "new", "query", "into", "a", "group", "and", "adds", "it", "to", "the", "vector", "QueryControllerEntity" ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L150-L169
TDC-Netdesign/ManagedProperties
managedproperties-service/src/main/java/dk/netdesign/common/osgi/config/service/ManagedPropertiesFactory.java
ManagedPropertiesFactory.getInvocationHandler
protected static <E> ManagedPropertiesController getInvocationHandler(Class<? super E> type, E defaults, List<Class<? extends TypeFilter>> defaultFilters) throws InvalidTypeException, TypeFilterException, DoubleIDException, InvalidMethodException { """ Builds the ManagedProperties object for use as an invocation h...
java
protected static <E> ManagedPropertiesController getInvocationHandler(Class<? super E> type, E defaults, List<Class<? extends TypeFilter>> defaultFilters) throws InvalidTypeException, TypeFilterException, DoubleIDException, InvalidMethodException { return new ManagedPropertiesController(type, defaults, defaultFilters)...
[ "protected", "static", "<", "E", ">", "ManagedPropertiesController", "getInvocationHandler", "(", "Class", "<", "?", "super", "E", ">", "type", ",", "E", "defaults", ",", "List", "<", "Class", "<", "?", "extends", "TypeFilter", ">", ">", "defaultFilters", ")...
Builds the ManagedProperties object for use as an invocation handler in the {@link Proxy proxy}. @param <E> The return type of the invocation handler. @param type The interface used to create the ManagedProperties object. This Interface must at least be annotated with the {@link dk.netdesign.common.osgi.config.annotati...
[ "Builds", "the", "ManagedProperties", "object", "for", "use", "as", "an", "invocation", "handler", "in", "the", "{" ]
train
https://github.com/TDC-Netdesign/ManagedProperties/blob/35a43ab5ea943d595788e13f19fe5b3fa8ba45d8/managedproperties-service/src/main/java/dk/netdesign/common/osgi/config/service/ManagedPropertiesFactory.java#L149-L151
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java
StringUtils.string2Writer
public static void string2Writer(String source, Writer out) throws IOException { """ String 2 writer. @param source the source @param out the out @throws IOException Signals that an I/O exception has occurred. """ char[] buffer = source.toCharArray(); for (int i = 0; i < buffer.length; i++) { out....
java
public static void string2Writer(String source, Writer out) throws IOException { char[] buffer = source.toCharArray(); for (int i = 0; i < buffer.length; i++) { out.append(buffer[i]); } out.flush(); }
[ "public", "static", "void", "string2Writer", "(", "String", "source", ",", "Writer", "out", ")", "throws", "IOException", "{", "char", "[", "]", "buffer", "=", "source", ".", "toCharArray", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "...
String 2 writer. @param source the source @param out the out @throws IOException Signals that an I/O exception has occurred.
[ "String", "2", "writer", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/StringUtils.java#L211-L218
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/impl/ImplRectifyImageOps_F32.java
ImplRectifyImageOps_F32.adjustUncalibrated
private static void adjustUncalibrated(FMatrixRMaj rectifyLeft, FMatrixRMaj rectifyRight, RectangleLength2D_F32 bound, float scale) { """ Internal function which applies the rectification adjustment to an uncalibrated stereo pair """ // translation float deltaX = -bound.x0*scale; float delta...
java
private static void adjustUncalibrated(FMatrixRMaj rectifyLeft, FMatrixRMaj rectifyRight, RectangleLength2D_F32 bound, float scale) { // translation float deltaX = -bound.x0*scale; float deltaY = -bound.y0*scale; // adjustment matrix SimpleMatrix A = new SimpleMatrix(3,3,true,new float[]{scale,0...
[ "private", "static", "void", "adjustUncalibrated", "(", "FMatrixRMaj", "rectifyLeft", ",", "FMatrixRMaj", "rectifyRight", ",", "RectangleLength2D_F32", "bound", ",", "float", "scale", ")", "{", "// translation", "float", "deltaX", "=", "-", "bound", ".", "x0", "*"...
Internal function which applies the rectification adjustment to an uncalibrated stereo pair
[ "Internal", "function", "which", "applies", "the", "rectification", "adjustment", "to", "an", "uncalibrated", "stereo", "pair" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/impl/ImplRectifyImageOps_F32.java#L156-L169
MenoData/Time4J
base/src/main/java/net/time4j/format/internal/PropertyBundle.java
PropertyBundle.getCandidateLocales
public static List<Locale> getCandidateLocales(Locale locale) { """ /*[deutsch] <p>Erstellt eine Kandidatenliste. </p> @param locale requested locale @return list of candidates in roughly same order as in {@code java.util.ResourceBundle} """ String language = LanguageMatch.getAlias(locale); ...
java
public static List<Locale> getCandidateLocales(Locale locale) { String language = LanguageMatch.getAlias(locale); String country = FormatUtils.getRegion(locale); String variant = locale.getVariant(); if (language.equals("zh") && locale.getScript().equals("Hant")) { country ...
[ "public", "static", "List", "<", "Locale", ">", "getCandidateLocales", "(", "Locale", "locale", ")", "{", "String", "language", "=", "LanguageMatch", ".", "getAlias", "(", "locale", ")", ";", "String", "country", "=", "FormatUtils", ".", "getRegion", "(", "l...
/*[deutsch] <p>Erstellt eine Kandidatenliste. </p> @param locale requested locale @return list of candidates in roughly same order as in {@code java.util.ResourceBundle}
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Erstellt", "eine", "Kandidatenliste", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/format/internal/PropertyBundle.java#L351-L381
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/SyncProcessEvent.java
SyncProcessEvent.readWorkerHeartbeat
public WorkerHeartbeat readWorkerHeartbeat(Map conf, String workerId) throws Exception { """ get worker heartbeat by workerId @param conf conf @param workerId worker id @return WorkerHeartbeat """ try { LocalState ls = StormConfig.worker_state(conf, workerId); return (W...
java
public WorkerHeartbeat readWorkerHeartbeat(Map conf, String workerId) throws Exception { try { LocalState ls = StormConfig.worker_state(conf, workerId); return (WorkerHeartbeat) ls.get(Common.LS_WORKER_HEARTBEAT); } catch (Exception e) { LOG.error("Failed to get heart...
[ "public", "WorkerHeartbeat", "readWorkerHeartbeat", "(", "Map", "conf", ",", "String", "workerId", ")", "throws", "Exception", "{", "try", "{", "LocalState", "ls", "=", "StormConfig", ".", "worker_state", "(", "conf", ",", "workerId", ")", ";", "return", "(", ...
get worker heartbeat by workerId @param conf conf @param workerId worker id @return WorkerHeartbeat
[ "get", "worker", "heartbeat", "by", "workerId" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/daemon/supervisor/SyncProcessEvent.java#L489-L497
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Assert.java
Assert.notEmpty
public static <K, V> Map<K, V> notEmpty(Map<K, V> map, String errorMsgTemplate, Object... params) throws IllegalArgumentException { """ 断言给定Map非空 <pre class="code"> Assert.notEmpty(map, "Map must have entries"); </pre> @param <K> Key类型 @param <V> Value类型 @param map 被检查的Map @param errorMsgTemplate 异常时的...
java
public static <K, V> Map<K, V> notEmpty(Map<K, V> map, String errorMsgTemplate, Object... params) throws IllegalArgumentException { if (CollectionUtil.isEmpty(map)) { throw new IllegalArgumentException(StrUtil.format(errorMsgTemplate, params)); } return map; }
[ "public", "static", "<", "K", ",", "V", ">", "Map", "<", "K", ",", "V", ">", "notEmpty", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "String", "errorMsgTemplate", ",", "Object", "...", "params", ")", "throws", "IllegalArgumentException", "{", "i...
断言给定Map非空 <pre class="code"> Assert.notEmpty(map, "Map must have entries"); </pre> @param <K> Key类型 @param <V> Value类型 @param map 被检查的Map @param errorMsgTemplate 异常时的消息模板 @param params 参数列表 @return 被检查的Map @throws IllegalArgumentException if the map is {@code null} or has no entries
[ "断言给定Map非空" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Assert.java#L390-L395
groupon/odo
proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java
PathOverrideService.setCustomRequest
public void setCustomRequest(int pathId, String customRequest, String clientUUID) { """ Set the value for a custom request @param pathId ID of path @param customRequest value of custom request @param clientUUID UUID of client """ PreparedStatement statement = null; try (Connection sqlConn...
java
public void setCustomRequest(int pathId, String customRequest, String clientUUID) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { int profileId = EditService.getProfileIdFromPathID(pathId); statement = sqlConnection.prepareStat...
[ "public", "void", "setCustomRequest", "(", "int", "pathId", ",", "String", "customRequest", ",", "String", "clientUUID", ")", "{", "PreparedStatement", "statement", "=", "null", ";", "try", "(", "Connection", "sqlConnection", "=", "sqlService", ".", "getConnection...
Set the value for a custom request @param pathId ID of path @param customRequest value of custom request @param clientUUID UUID of client
[ "Set", "the", "value", "for", "a", "custom", "request" ]
train
https://github.com/groupon/odo/blob/3bae43d5eca8ace036775e5b2d3ed9af1a9ff9b1/proxylib/src/main/java/com/groupon/odo/proxylib/PathOverrideService.java#L1458-L1485
MenoData/Time4J
base/src/main/java/net/time4j/calendar/HebrewTime.java
HebrewTime.ofDigital
public static HebrewTime ofDigital( int hour23, int part ) { """ /*[deutsch] <p>Liefert eine Instanz der hebr&auml;ischen Uhrzeit zwischen zwei Sonnenunterg&auml;ngen. </p> @param hour23 hebrew hour in the digital range 0-23 @param part the part of hour (<em>helek</em>) in range 0-...
java
public static HebrewTime ofDigital( int hour23, int part ) { if (hour23 < 0 || hour23 > 23) { throw new IllegalArgumentException( "DIGITAL_HOUR out of range: " + hour23); } if (part < 0 || part >= PARTS_IN_HOUR) { throw new IllegalArg...
[ "public", "static", "HebrewTime", "ofDigital", "(", "int", "hour23", ",", "int", "part", ")", "{", "if", "(", "hour23", "<", "0", "||", "hour23", ">", "23", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"DIGITAL_HOUR out of range: \"", "+", "h...
/*[deutsch] <p>Liefert eine Instanz der hebr&auml;ischen Uhrzeit zwischen zwei Sonnenunterg&auml;ngen. </p> @param hour23 hebrew hour in the digital range 0-23 @param part the part of hour (<em>helek</em>) in range 0-1079 @return Hebrew time
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Liefert", "eine", "Instanz", "der", "hebr&auml", ";", "ischen", "Uhrzeit", "zwischen", "zwei", "Sonnenunterg&auml", ";", "ngen", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/calendar/HebrewTime.java#L325-L342
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/PROCLUS.java
PROCLUS.initialSet
private ArrayDBIDs initialSet(DBIDs sampleSet, int k, Random random) { """ Returns a set of k elements from the specified sample set. @param sampleSet the sample set @param k the number of samples to be returned @param random random number generator @return a set of k elements from the specified sample set ...
java
private ArrayDBIDs initialSet(DBIDs sampleSet, int k, Random random) { return DBIDUtil.ensureArray(DBIDUtil.randomSample(sampleSet, k, random)); }
[ "private", "ArrayDBIDs", "initialSet", "(", "DBIDs", "sampleSet", ",", "int", "k", ",", "Random", "random", ")", "{", "return", "DBIDUtil", ".", "ensureArray", "(", "DBIDUtil", ".", "randomSample", "(", "sampleSet", ",", "k", ",", "random", ")", ")", ";", ...
Returns a set of k elements from the specified sample set. @param sampleSet the sample set @param k the number of samples to be returned @param random random number generator @return a set of k elements from the specified sample set
[ "Returns", "a", "set", "of", "k", "elements", "from", "the", "specified", "sample", "set", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/PROCLUS.java#L298-L300
HsiangLeekwok/hlklib
hlklib/src/main/java/com/hlk/hlklib/lib/datetimepicker/DateTimeDialogFragment.java
DateTimeDialogFragment.onTimeChanged
@Override public void onTimeChanged(int hour, int minute) { """ <p>The callback used by the TimePicker to update {@code mCalendar} as the user changes the time. Each time this is called, we also update the text on the time tab to reflect the time the user has currenly selected.</p> <p> <p>Implements the {...
java
@Override public void onTimeChanged(int hour, int minute) { mCalendar.set(Calendar.HOUR_OF_DAY, hour); mCalendar.set(Calendar.MINUTE, minute); updateTimeTab(); }
[ "@", "Override", "public", "void", "onTimeChanged", "(", "int", "hour", ",", "int", "minute", ")", "{", "mCalendar", ".", "set", "(", "Calendar", ".", "HOUR_OF_DAY", ",", "hour", ")", ";", "mCalendar", ".", "set", "(", "Calendar", ".", "MINUTE", ",", "...
<p>The callback used by the TimePicker to update {@code mCalendar} as the user changes the time. Each time this is called, we also update the text on the time tab to reflect the time the user has currenly selected.</p> <p> <p>Implements the {@link TimeFragment.TimeChangedListener} interface.</p>
[ "<p", ">", "The", "callback", "used", "by", "the", "TimePicker", "to", "update", "{" ]
train
https://github.com/HsiangLeekwok/hlklib/blob/b122f6dcab7cec60c8e5455e0c31613d08bec6ad/hlklib/src/main/java/com/hlk/hlklib/lib/datetimepicker/DateTimeDialogFragment.java#L282-L288
salesforce/Argus
ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/AnnotationDto.java
AnnotationDto.transformToDto
public static List<AnnotationDto> transformToDto(List<Annotation> annotations) { """ Converts list of alert entity objects to list of alertDto objects. @param annotations List of alert entities. Cannot be null. @return List of alertDto objects. @throws WebApplicationException If an error occurs. ...
java
public static List<AnnotationDto> transformToDto(List<Annotation> annotations) { if (annotations == null) { throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR); } List<AnnotationDto> result = new ArrayList<>(); ...
[ "public", "static", "List", "<", "AnnotationDto", ">", "transformToDto", "(", "List", "<", "Annotation", ">", "annotations", ")", "{", "if", "(", "annotations", "==", "null", ")", "{", "throw", "new", "WebApplicationException", "(", "\"Null entity object cannot be...
Converts list of alert entity objects to list of alertDto objects. @param annotations List of alert entities. Cannot be null. @return List of alertDto objects. @throws WebApplicationException If an error occurs.
[ "Converts", "list", "of", "alert", "entity", "objects", "to", "list", "of", "alertDto", "objects", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/dto/AnnotationDto.java#L87-L98
mcxiaoke/Android-Next
core/src/main/java/com/mcxiaoke/next/utils/TrafficUtils.java
TrafficUtils.current
public static long current(Context context, String tag) { """ 计算当前流量 @param context Context @param tag traffic tag @return received bytes """ Long appRxValue = sReceivedBytes.get(tag); Long appTxValue = sSendBytes.get(tag); if (appRxValue == null || appTxValue == null) { ...
java
public static long current(Context context, String tag) { Long appRxValue = sReceivedBytes.get(tag); Long appTxValue = sSendBytes.get(tag); if (appRxValue == null || appTxValue == null) { if (DEBUG) { LogUtils.w(TAG, "current() appRxValue or appTxValue is null."); ...
[ "public", "static", "long", "current", "(", "Context", "context", ",", "String", "tag", ")", "{", "Long", "appRxValue", "=", "sReceivedBytes", ".", "get", "(", "tag", ")", ";", "Long", "appTxValue", "=", "sSendBytes", ".", "get", "(", "tag", ")", ";", ...
计算当前流量 @param context Context @param tag traffic tag @return received bytes
[ "计算当前流量" ]
train
https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/utils/TrafficUtils.java#L59-L78
joniles/mpxj
src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java
ConceptDrawProjectReader.readProject
private void readProject(Project project) { """ Read a project from a ConceptDraw PROJECT file. @param project ConceptDraw PROJECT project """ Task mpxjTask = m_projectFile.addTask(); //project.getAuthor() mpxjTask.setBaselineCost(project.getBaselineCost()); mpxjTask.setBaselineFinis...
java
private void readProject(Project project) { Task mpxjTask = m_projectFile.addTask(); //project.getAuthor() mpxjTask.setBaselineCost(project.getBaselineCost()); mpxjTask.setBaselineFinish(project.getBaselineFinishDate()); mpxjTask.setBaselineStart(project.getBaselineStartDate()); /...
[ "private", "void", "readProject", "(", "Project", "project", ")", "{", "Task", "mpxjTask", "=", "m_projectFile", ".", "addTask", "(", ")", ";", "//project.getAuthor()", "mpxjTask", ".", "setBaselineCost", "(", "project", ".", "getBaselineCost", "(", ")", ")", ...
Read a project from a ConceptDraw PROJECT file. @param project ConceptDraw PROJECT project
[ "Read", "a", "project", "from", "a", "ConceptDraw", "PROJECT", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/conceptdraw/ConceptDrawProjectReader.java#L350-L397
HeidelTime/heideltime
src/de/unihd/dbs/uima/annotator/heideltime/ProcessorManager.java
ProcessorManager.executeProcessors
public void executeProcessors(JCas jcas, ProcessorManager.Priority prio) { """ Based on reflection, this method instantiates and executes all of the registered Processors. @param jcas """ if(!this.initialized) { Logger.printError(component, "Unable to execute Processors; initialization was not concluded...
java
public void executeProcessors(JCas jcas, ProcessorManager.Priority prio) { if(!this.initialized) { Logger.printError(component, "Unable to execute Processors; initialization was not concluded successfully."); System.exit(-1); } LinkedList<GenericProcessor> myList = processors.get(prio); for(GenericProc...
[ "public", "void", "executeProcessors", "(", "JCas", "jcas", ",", "ProcessorManager", ".", "Priority", "prio", ")", "{", "if", "(", "!", "this", ".", "initialized", ")", "{", "Logger", ".", "printError", "(", "component", ",", "\"Unable to execute Processors; ini...
Based on reflection, this method instantiates and executes all of the registered Processors. @param jcas
[ "Based", "on", "reflection", "this", "method", "instantiates", "and", "executes", "all", "of", "the", "registered", "Processors", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/de/unihd/dbs/uima/annotator/heideltime/ProcessorManager.java#L92-L108
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/expressions/decorator/AFTagAttributes.java
AFTagAttributes.get
@Override public TagAttribute get(String ns, String localName) { """ Find a TagAttribute that matches the passed namespace and local name. @param ns namespace of the desired attribute @param localName local name of the attribute @return a TagAttribute found, otherwise null """ if (ns != null...
java
@Override public TagAttribute get(String ns, String localName) { if (ns != null && localName != null) for (TagAttribute a:attrs) if (localName.equals(a.getLocalName())) if (ns.equals(a.getNamespace())) return a; return null; }
[ "@", "Override", "public", "TagAttribute", "get", "(", "String", "ns", ",", "String", "localName", ")", "{", "if", "(", "ns", "!=", "null", "&&", "localName", "!=", "null", ")", "for", "(", "TagAttribute", "a", ":", "attrs", ")", "if", "(", "localName"...
Find a TagAttribute that matches the passed namespace and local name. @param ns namespace of the desired attribute @param localName local name of the attribute @return a TagAttribute found, otherwise null
[ "Find", "a", "TagAttribute", "that", "matches", "the", "passed", "namespace", "and", "local", "name", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/expressions/decorator/AFTagAttributes.java#L107-L115
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/NodeExtractor.java
NodeExtractor.extractNode
public Node extractNode(@Nullable Node parentNode, Iterable<String> xPath) { """ Extracts the node specified by the xpath list. @param parentNode the node to extract the child node from. @param xPath xpath elements for <em>local</em> names that make up the child node's xpath. @return the matching {@link Node}...
java
public Node extractNode(@Nullable Node parentNode, Iterable<String> xPath) { Preconditions.checkNotNull(xPath, "Null xpath list"); Node node = parentNode; boolean wasMatch = false; Iterator<String> xPathElementsIter = xPath.iterator(); while (xPathElementsIter.hasNext() && node != null) { wasM...
[ "public", "Node", "extractNode", "(", "@", "Nullable", "Node", "parentNode", ",", "Iterable", "<", "String", ">", "xPath", ")", "{", "Preconditions", ".", "checkNotNull", "(", "xPath", ",", "\"Null xpath list\"", ")", ";", "Node", "node", "=", "parentNode", ...
Extracts the node specified by the xpath list. @param parentNode the node to extract the child node from. @param xPath xpath elements for <em>local</em> names that make up the child node's xpath. @return the matching {@link Node}, or {@code null} if no such child node exists.
[ "Extracts", "the", "node", "specified", "by", "the", "xpath", "list", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/utils/NodeExtractor.java#L55-L78
gallandarakhneorg/afc
advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java
BusNetwork.getBusLine
@Pure public BusLine getBusLine(String name, Comparator<String> nameComparator) { """ Replies the bus line with the specified name. @param name is the desired name @param nameComparator is used to compare the names. @return BusLine or <code>null</code> """ if (name == null) { return null; } fina...
java
@Pure public BusLine getBusLine(String name, Comparator<String> nameComparator) { if (name == null) { return null; } final Comparator<String> cmp = nameComparator == null ? BusNetworkUtilities.NAME_COMPARATOR : nameComparator; for (final BusLine busLine : this.busLines) { if (cmp.compare(name, busLine.ge...
[ "@", "Pure", "public", "BusLine", "getBusLine", "(", "String", "name", ",", "Comparator", "<", "String", ">", "nameComparator", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "null", ";", "}", "final", "Comparator", "<", "String", ">", ...
Replies the bus line with the specified name. @param name is the desired name @param nameComparator is used to compare the names. @return BusLine or <code>null</code>
[ "Replies", "the", "bus", "line", "with", "the", "specified", "name", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L698-L710
aoindustries/semanticcms-core-model
src/main/java/com/semanticcms/core/model/Node.java
Node.setProperty
public boolean setProperty(String name, Object value) throws FrozenException { """ Sets a property on this node, if the property has not already been set. Setting a property to {@code null} still marks the property as used and associates it with {@code null}. @return {@code true} when the property was added o...
java
public boolean setProperty(String name, Object value) throws FrozenException { synchronized(lock) { checkNotFrozen(); if(properties == null) { properties = new LinkedHashMap<>(); } else if(properties.containsKey(name)) { return false; } properties.put(name, value); return true; } }
[ "public", "boolean", "setProperty", "(", "String", "name", ",", "Object", "value", ")", "throws", "FrozenException", "{", "synchronized", "(", "lock", ")", "{", "checkNotFrozen", "(", ")", ";", "if", "(", "properties", "==", "null", ")", "{", "properties", ...
Sets a property on this node, if the property has not already been set. Setting a property to {@code null} still marks the property as used and associates it with {@code null}. @return {@code true} when the property was added or {@code false} when the property already existed (including possibly with a {@code null} v...
[ "Sets", "a", "property", "on", "this", "node", "if", "the", "property", "has", "not", "already", "been", "set", ".", "Setting", "a", "property", "to", "{", "@code", "null", "}", "still", "marks", "the", "property", "as", "used", "and", "associates", "it"...
train
https://github.com/aoindustries/semanticcms-core-model/blob/14bdbe3f3d69b2b337129c5b1afcaa9e87cb5624/src/main/java/com/semanticcms/core/model/Node.java#L154-L165
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementLayout.java
ElementLayout.lockDescendants
private void lockDescendants(Iterable<ElementBase> children, boolean lock) { """ Sets the lock state for all descendants of this layout. @param children List of descendants. @param lock The lock state. """ for (ElementBase child : children) { child.setLocked(lock); lockDesce...
java
private void lockDescendants(Iterable<ElementBase> children, boolean lock) { for (ElementBase child : children) { child.setLocked(lock); lockDescendants(child.getChildren(), lock); } }
[ "private", "void", "lockDescendants", "(", "Iterable", "<", "ElementBase", ">", "children", ",", "boolean", "lock", ")", "{", "for", "(", "ElementBase", "child", ":", "children", ")", "{", "child", ".", "setLocked", "(", "lock", ")", ";", "lockDescendants", ...
Sets the lock state for all descendants of this layout. @param children List of descendants. @param lock The lock state.
[ "Sets", "the", "lock", "state", "for", "all", "descendants", "of", "this", "layout", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementLayout.java#L221-L226
google/truth
core/src/main/java/com/google/common/truth/IterableSubject.java
IterableSubject.containsAtLeast
@CanIgnoreReturnValue public final Ordered containsAtLeast( @NullableDecl Object firstExpected, @NullableDecl Object secondExpected, @NullableDecl Object... restOfExpected) { """ Checks that the actual iterable contains at least all of the expected elements or fails. If an element appears more...
java
@CanIgnoreReturnValue public final Ordered containsAtLeast( @NullableDecl Object firstExpected, @NullableDecl Object secondExpected, @NullableDecl Object... restOfExpected) { return containsAtLeastElementsIn(accumulate(firstExpected, secondExpected, restOfExpected)); }
[ "@", "CanIgnoreReturnValue", "public", "final", "Ordered", "containsAtLeast", "(", "@", "NullableDecl", "Object", "firstExpected", ",", "@", "NullableDecl", "Object", "secondExpected", ",", "@", "NullableDecl", "Object", "...", "restOfExpected", ")", "{", "return", ...
Checks that the actual iterable contains at least all of the expected elements or fails. If an element appears more than once in the expected elements to this call then it must appear at least that number of times in the actual elements. <p>To also test that the contents appear in the given order, make a call to {@cod...
[ "Checks", "that", "the", "actual", "iterable", "contains", "at", "least", "all", "of", "the", "expected", "elements", "or", "fails", ".", "If", "an", "element", "appears", "more", "than", "once", "in", "the", "expected", "elements", "to", "this", "call", "...
train
https://github.com/google/truth/blob/60eceffd2e8c3297655d33ed87d965cf5af51108/core/src/main/java/com/google/common/truth/IterableSubject.java#L282-L288
calimero-project/calimero-core
src/tuwien/auto/calimero/link/KNXNetworkLinkIP.java
KNXNetworkLinkIP.sendRequest
@Override public void sendRequest(final KNXAddress dst, final Priority p, final byte[] nsdu) throws KNXLinkClosedException, KNXTimeoutException { """ {@inheritDoc} When communicating with a KNX network which uses open medium, messages are broadcasted within domain (as opposite to system broadcast) by default. ...
java
@Override public void sendRequest(final KNXAddress dst, final Priority p, final byte[] nsdu) throws KNXLinkClosedException, KNXTimeoutException { final int mc = mode == TUNNELING ? CEMILData.MC_LDATA_REQ : CEMILData.MC_LDATA_IND; send(mc, dst, p, nsdu, false); }
[ "@", "Override", "public", "void", "sendRequest", "(", "final", "KNXAddress", "dst", ",", "final", "Priority", "p", ",", "final", "byte", "[", "]", "nsdu", ")", "throws", "KNXLinkClosedException", ",", "KNXTimeoutException", "{", "final", "int", "mc", "=", "...
{@inheritDoc} When communicating with a KNX network which uses open medium, messages are broadcasted within domain (as opposite to system broadcast) by default. Specify <code>dst = null</code> for system broadcast.
[ "{" ]
train
https://github.com/calimero-project/calimero-core/blob/7e6f547c6bd75fa985bfeb5b47ba671df2ea01e8/src/tuwien/auto/calimero/link/KNXNetworkLinkIP.java#L255-L261
stephenc/simple-java-mail
src/main/java/org/codemonkey/simplejavamail/Mailer.java
Mailer.logSession
private void logSession(Session session, TransportStrategy transportStrategy) { """ Simply logs host details, credentials used and whether authentication will take place and finally the transport protocol used. """ final String logmsg = "starting mail session (host: %s, port: %s, username: %s, authenticate:...
java
private void logSession(Session session, TransportStrategy transportStrategy) { final String logmsg = "starting mail session (host: %s, port: %s, username: %s, authenticate: %s, transport: %s)"; Properties properties = session.getProperties(); logger.debug(String.format(logmsg, properties.get(transportStrategy...
[ "private", "void", "logSession", "(", "Session", "session", ",", "TransportStrategy", "transportStrategy", ")", "{", "final", "String", "logmsg", "=", "\"starting mail session (host: %s, port: %s, username: %s, authenticate: %s, transport: %s)\"", ";", "Properties", "properties",...
Simply logs host details, credentials used and whether authentication will take place and finally the transport protocol used.
[ "Simply", "logs", "host", "details", "credentials", "used", "and", "whether", "authentication", "will", "take", "place", "and", "finally", "the", "transport", "protocol", "used", "." ]
train
https://github.com/stephenc/simple-java-mail/blob/8c5897e6bbc23c11e7c7eb5064f407625c653923/src/main/java/org/codemonkey/simplejavamail/Mailer.java#L240-L246
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/contextspace/SpaceRepository.java
SpaceRepository.createSpace
public <S extends io.sarl.lang.core.Space> S createSpace(SpaceID spaceID, Class<? extends SpaceSpecification<S>> spec, Object... creationParams) { """ Create a space. @param <S> - the type of the space to reply. @param spaceID ID of the space. @param spec specification of the space. @param creationParams ...
java
public <S extends io.sarl.lang.core.Space> S createSpace(SpaceID spaceID, Class<? extends SpaceSpecification<S>> spec, Object... creationParams) { synchronized (getSpaceRepositoryMutex()) { if (!this.spaces.containsKey(spaceID)) { return createSpaceInstance(spec, spaceID, true, creationParams); } } r...
[ "public", "<", "S", "extends", "io", ".", "sarl", ".", "lang", ".", "core", ".", "Space", ">", "S", "createSpace", "(", "SpaceID", "spaceID", ",", "Class", "<", "?", "extends", "SpaceSpecification", "<", "S", ">", ">", "spec", ",", "Object", "...", "...
Create a space. @param <S> - the type of the space to reply. @param spaceID ID of the space. @param spec specification of the space. @param creationParams creation parameters. @return the new space, or <code>null</code> if the space already exists.
[ "Create", "a", "space", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/services/jdk/contextspace/SpaceRepository.java#L276-L284
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_historyTollfreeConsumption_GET
public ArrayList<Date> billingAccount_historyTollfreeConsumption_GET(String billingAccount) throws IOException { """ Previous tollfree bill REST: GET /telephony/{billingAccount}/historyTollfreeConsumption @param billingAccount [required] The name of your billingAccount """ String qPath = "/telephony/{bil...
java
public ArrayList<Date> billingAccount_historyTollfreeConsumption_GET(String billingAccount) throws IOException { String qPath = "/telephony/{billingAccount}/historyTollfreeConsumption"; StringBuilder sb = path(qPath, billingAccount); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, ...
[ "public", "ArrayList", "<", "Date", ">", "billingAccount_historyTollfreeConsumption_GET", "(", "String", "billingAccount", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAccount}/historyTollfreeConsumption\"", ";", "StringBuilder", "sb", "=",...
Previous tollfree bill REST: GET /telephony/{billingAccount}/historyTollfreeConsumption @param billingAccount [required] The name of your billingAccount
[ "Previous", "tollfree", "bill" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L4620-L4625
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/epanet/core/EpanetWrapper.java
EpanetWrapper.ENopen
public void ENopen( String input, String report, String outputBin ) throws EpanetException { """ Opens the Toolkit to analyze a particular distribution system. @param input name of an EPANET Input file. @param report name of an output Report file. @param outputBin name of an optional binary Output file. @thr...
java
public void ENopen( String input, String report, String outputBin ) throws EpanetException { int errcode = epanet.ENopen(input, report, outputBin); checkError(errcode); }
[ "public", "void", "ENopen", "(", "String", "input", ",", "String", "report", ",", "String", "outputBin", ")", "throws", "EpanetException", "{", "int", "errcode", "=", "epanet", ".", "ENopen", "(", "input", ",", "report", ",", "outputBin", ")", ";", "checkE...
Opens the Toolkit to analyze a particular distribution system. @param input name of an EPANET Input file. @param report name of an output Report file. @param outputBin name of an optional binary Output file. @throws IOException
[ "Opens", "the", "Toolkit", "to", "analyze", "a", "particular", "distribution", "system", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/epanet/core/EpanetWrapper.java#L82-L85
apache/groovy
src/main/java/org/codehaus/groovy/runtime/ProcessGroovyMethods.java
ProcessGroovyMethods.leftShift
public static Writer leftShift(Process self, Object value) throws IOException { """ Overloads the left shift operator (&lt;&lt;) to provide an append mechanism to pipe data to a Process. @param self a Process instance @param value a value to append @return a Writer @throws java.io.IOException if an IOExcep...
java
public static Writer leftShift(Process self, Object value) throws IOException { return IOGroovyMethods.leftShift(self.getOutputStream(), value); }
[ "public", "static", "Writer", "leftShift", "(", "Process", "self", ",", "Object", "value", ")", "throws", "IOException", "{", "return", "IOGroovyMethods", ".", "leftShift", "(", "self", ".", "getOutputStream", "(", ")", ",", "value", ")", ";", "}" ]
Overloads the left shift operator (&lt;&lt;) to provide an append mechanism to pipe data to a Process. @param self a Process instance @param value a value to append @return a Writer @throws java.io.IOException if an IOException occurs. @since 1.0
[ "Overloads", "the", "left", "shift", "operator", "(", "&lt", ";", "&lt", ";", ")", "to", "provide", "an", "append", "mechanism", "to", "pipe", "data", "to", "a", "Process", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/ProcessGroovyMethods.java#L114-L116
jeffreyning/nh-micro
nh-micro-template/src/main/java/com/nh/micro/template/MicroServiceTemplateSupport.java
MicroServiceTemplateSupport.getModelEntryMap
public Map getModelEntryMap(Map requestParamMap,String tableName,String modelName,String dbName) throws Exception { """ ��ȡ���ģ�� @param requestParamMap �ύ������� @param tableName ����� @param modelName ģ����� @return @throws Exception """ return getModelEntryMap( requestParamMap, tableName, modelName,...
java
public Map getModelEntryMap(Map requestParamMap,String tableName,String modelName,String dbName) throws Exception{ return getModelEntryMap( requestParamMap, tableName, modelName, dbName,""); }
[ "public", "Map", "getModelEntryMap", "(", "Map", "requestParamMap", ",", "String", "tableName", ",", "String", "modelName", ",", "String", "dbName", ")", "throws", "Exception", "{", "return", "getModelEntryMap", "(", "requestParamMap", ",", "tableName", ",", "mode...
��ȡ���ģ�� @param requestParamMap �ύ������� @param tableName ����� @param modelName ģ����� @return @throws Exception
[ "��ȡ���ģ��" ]
train
https://github.com/jeffreyning/nh-micro/blob/f1cb420a092f8ba94317519ede739974decb5617/nh-micro-template/src/main/java/com/nh/micro/template/MicroServiceTemplateSupport.java#L295-L297
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XNSerializables.java
XNSerializables.createRequest
public static XNElement createRequest(String function, Object... nameValue) { """ Create a request with the given function and name-value pairs. @param function the remote function name @param nameValue the array of String name and Object attributes. @return the request XML """ XNElement result = ne...
java
public static XNElement createRequest(String function, Object... nameValue) { XNElement result = new XNElement(function); for (int i = 0; i < nameValue.length; i += 2) { result.set((String)nameValue[i], nameValue[i + 1]); } return result; }
[ "public", "static", "XNElement", "createRequest", "(", "String", "function", ",", "Object", "...", "nameValue", ")", "{", "XNElement", "result", "=", "new", "XNElement", "(", "function", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nameVal...
Create a request with the given function and name-value pairs. @param function the remote function name @param nameValue the array of String name and Object attributes. @return the request XML
[ "Create", "a", "request", "with", "the", "given", "function", "and", "name", "-", "value", "pairs", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XNSerializables.java#L35-L41
craterdog/java-smart-objects
src/main/java/craterdog/smart/SmartObject.java
SmartObject.fromString
static public <T> T fromString(Class<T> classType, String json) throws IOException { """ This function takes string containing Javascript Object Notation (JSON) and uses it to construct the corresponding smart object. This function can be used for any non-parameterized type for example: <pre> Customer custome...
java
static public <T> T fromString(Class<T> classType, String json) throws IOException { return safeMapper.readerFor(classType).readValue(json); }
[ "static", "public", "<", "T", ">", "T", "fromString", "(", "Class", "<", "T", ">", "classType", ",", "String", "json", ")", "throws", "IOException", "{", "return", "safeMapper", ".", "readerFor", "(", "classType", ")", ".", "readValue", "(", "json", ")",...
This function takes string containing Javascript Object Notation (JSON) and uses it to construct the corresponding smart object. This function can be used for any non-parameterized type for example: <pre> Customer customer = SmartObject.fromString(Customer.class, jsonString); </pre> @param <T> The type of object bein...
[ "This", "function", "takes", "string", "containing", "Javascript", "Object", "Notation", "(", "JSON", ")", "and", "uses", "it", "to", "construct", "the", "corresponding", "smart", "object", ".", "This", "function", "can", "be", "used", "for", "any", "non", "...
train
https://github.com/craterdog/java-smart-objects/blob/6d11e2f345e4d2836e3aca3990c8ed2db330d856/src/main/java/craterdog/smart/SmartObject.java#L172-L174
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java
ReUtil.findAll
public static List<String> findAll(Pattern pattern, CharSequence content, int group) { """ 取得内容中匹配的所有结果 @param pattern 编译后的正则模式 @param content 被查找的内容 @param group 正则的分组 @return 结果列表 @since 3.0.6 """ return findAll(pattern, content, group, new ArrayList<String>()); }
java
public static List<String> findAll(Pattern pattern, CharSequence content, int group) { return findAll(pattern, content, group, new ArrayList<String>()); }
[ "public", "static", "List", "<", "String", ">", "findAll", "(", "Pattern", "pattern", ",", "CharSequence", "content", ",", "int", "group", ")", "{", "return", "findAll", "(", "pattern", ",", "content", ",", "group", ",", "new", "ArrayList", "<", "String", ...
取得内容中匹配的所有结果 @param pattern 编译后的正则模式 @param content 被查找的内容 @param group 正则的分组 @return 结果列表 @since 3.0.6
[ "取得内容中匹配的所有结果" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java#L443-L445
realtime-framework/RealtimeMessaging-Android
library/src/main/java/ibt/ortc/api/Balancer.java
Balancer.getServerFromBalancer
public static String getServerFromBalancer(String balancerUrl,String applicationKey) throws IOException, InvalidBalancerServerException { """ Retrieves an Ortc Server url from the Ortc Balancer @param balancerUrl The Ortc Balancer url @return An Ortc Server url @throws java.io.IOException @throws InvalidBal...
java
public static String getServerFromBalancer(String balancerUrl,String applicationKey) throws IOException, InvalidBalancerServerException { Matcher protocolMatcher = urlProtocolPattern.matcher(balancerUrl); String protocol = protocolMatcher.matches() ? "" : protocolMatcher.group(1); String parsedUrl = String.form...
[ "public", "static", "String", "getServerFromBalancer", "(", "String", "balancerUrl", ",", "String", "applicationKey", ")", "throws", "IOException", ",", "InvalidBalancerServerException", "{", "Matcher", "protocolMatcher", "=", "urlProtocolPattern", ".", "matcher", "(", ...
Retrieves an Ortc Server url from the Ortc Balancer @param balancerUrl The Ortc Balancer url @return An Ortc Server url @throws java.io.IOException @throws InvalidBalancerServerException
[ "Retrieves", "an", "Ortc", "Server", "url", "from", "the", "Ortc", "Balancer" ]
train
https://github.com/realtime-framework/RealtimeMessaging-Android/blob/f0d87b92ed7c591bcfe2b9cf45b947865570e061/library/src/main/java/ibt/ortc/api/Balancer.java#L93-L113
stephanrauh/AngularFaces
AngularFaces_2.0/AngularFaces-core/src/main/java/de/beyondjava/angularFaces/core/transformation/AttributeUtilities.java
AttributeUtilities.getAttribute
public static Object getAttribute(UIComponent component, String attributeName) { """ Apache MyFaces make HMTL attributes of HTML elements pass-through-attributes. This method finds the attribute, no matter whether it is stored as an ordinary or as an pass-through-attribute. """ Object value = component.get...
java
public static Object getAttribute(UIComponent component, String attributeName) { Object value = component.getPassThroughAttributes().get(attributeName); if (null == value) { value = component.getAttributes().get(attributeName); } if (null == value) { if (!attributeName.equals(attributeName.toLowerCase()))...
[ "public", "static", "Object", "getAttribute", "(", "UIComponent", "component", ",", "String", "attributeName", ")", "{", "Object", "value", "=", "component", ".", "getPassThroughAttributes", "(", ")", ".", "get", "(", "attributeName", ")", ";", "if", "(", "nul...
Apache MyFaces make HMTL attributes of HTML elements pass-through-attributes. This method finds the attribute, no matter whether it is stored as an ordinary or as an pass-through-attribute.
[ "Apache", "MyFaces", "make", "HMTL", "attributes", "of", "HTML", "elements", "pass", "-", "through", "-", "attributes", ".", "This", "method", "finds", "the", "attribute", "no", "matter", "whether", "it", "is", "stored", "as", "an", "ordinary", "or", "as", ...
train
https://github.com/stephanrauh/AngularFaces/blob/43d915f004645b1bbbf2625214294dab0858ba01/AngularFaces_2.0/AngularFaces-core/src/main/java/de/beyondjava/angularFaces/core/transformation/AttributeUtilities.java#L37-L51
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectIpv4
public void expectIpv4(String name, String message) { """ Validates a field to be a valid IPv4 address @param name The field to check @param message A custom error message instead of the default one """ String value = Optional.ofNullable(get(name)).orElse(""); if (!InetAddressValidator.get...
java
public void expectIpv4(String name, String message) { String value = Optional.ofNullable(get(name)).orElse(""); if (!InetAddressValidator.getInstance().isValidInet4Address(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.IPV4_KEY.name(), name))); ...
[ "public", "void", "expectIpv4", "(", "String", "name", ",", "String", "message", ")", "{", "String", "value", "=", "Optional", ".", "ofNullable", "(", "get", "(", "name", ")", ")", ".", "orElse", "(", "\"\"", ")", ";", "if", "(", "!", "InetAddressValid...
Validates a field to be a valid IPv4 address @param name The field to check @param message A custom error message instead of the default one
[ "Validates", "a", "field", "to", "be", "a", "valid", "IPv4", "address" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L280-L286
JavaMoney/jsr354-api
src/main/java/javax/money/convert/ProviderContextBuilder.java
ProviderContextBuilder.of
public static ProviderContextBuilder of(String provider, Collection<RateType> rateTypes) { """ Create a new ProviderContextBuilder instance. @param provider the provider name, not {@code null}. @param rateTypes the rate types, not null and not empty. @return a new {@link javax.money.convert.ProviderContextBu...
java
public static ProviderContextBuilder of(String provider, Collection<RateType> rateTypes) { return new ProviderContextBuilder(provider, rateTypes); }
[ "public", "static", "ProviderContextBuilder", "of", "(", "String", "provider", ",", "Collection", "<", "RateType", ">", "rateTypes", ")", "{", "return", "new", "ProviderContextBuilder", "(", "provider", ",", "rateTypes", ")", ";", "}" ]
Create a new ProviderContextBuilder instance. @param provider the provider name, not {@code null}. @param rateTypes the rate types, not null and not empty. @return a new {@link javax.money.convert.ProviderContextBuilder} instance, never null.
[ "Create", "a", "new", "ProviderContextBuilder", "instance", "." ]
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/convert/ProviderContextBuilder.java#L144-L146
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java
CmsDomUtil.getRelativeX
public static int getRelativeX(int x, Element target) { """ Gets the horizontal position of the given x-coordinate relative to a given element.<p> @param x the coordinate to use @param target the element whose coordinate system is to be used @return the relative horizontal position @see com.google.gwt.ev...
java
public static int getRelativeX(int x, Element target) { return (x - target.getAbsoluteLeft()) + /* target.getScrollLeft() + */target.getOwnerDocument().getScrollLeft(); }
[ "public", "static", "int", "getRelativeX", "(", "int", "x", ",", "Element", "target", ")", "{", "return", "(", "x", "-", "target", ".", "getAbsoluteLeft", "(", ")", ")", "+", "/* target.getScrollLeft() + */", "target", ".", "getOwnerDocument", "(", ")", ".",...
Gets the horizontal position of the given x-coordinate relative to a given element.<p> @param x the coordinate to use @param target the element whose coordinate system is to be used @return the relative horizontal position @see com.google.gwt.event.dom.client.MouseEvent#getRelativeX(com.google.gwt.dom.client.Element...
[ "Gets", "the", "horizontal", "position", "of", "the", "given", "x", "-", "coordinate", "relative", "to", "a", "given", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/util/CmsDomUtil.java#L1479-L1482
RogerParkinson/madura-objects-parent
madura-objects/src/main/java/nz/co/senanque/validationengine/ValidationSession.java
ValidationSession.invokeListeners
public void invokeListeners(final ValidationObject object, final String fieldName, final Object newValue, final Object currentValue) { """ This is called after a successful setter call on one of the fields. If any listeners are attached to the field they are invoked from here. @param object @param fieldName ...
java
public void invokeListeners(final ValidationObject object, final String fieldName, final Object newValue, final Object currentValue) { m_validationEngine.invokeListeners(object, fieldName, newValue, currentValue, this); }
[ "public", "void", "invokeListeners", "(", "final", "ValidationObject", "object", ",", "final", "String", "fieldName", ",", "final", "Object", "newValue", ",", "final", "Object", "currentValue", ")", "{", "m_validationEngine", ".", "invokeListeners", "(", "object", ...
This is called after a successful setter call on one of the fields. If any listeners are attached to the field they are invoked from here. @param object @param fieldName @param newValue @param currentValue
[ "This", "is", "called", "after", "a", "successful", "setter", "call", "on", "one", "of", "the", "fields", ".", "If", "any", "listeners", "are", "attached", "to", "the", "field", "they", "are", "invoked", "from", "here", "." ]
train
https://github.com/RogerParkinson/madura-objects-parent/blob/9b5385dd0437611f0ce8506f63646e018d06fb8e/madura-objects/src/main/java/nz/co/senanque/validationengine/ValidationSession.java#L104-L106
Ordinastie/MalisisCore
src/main/java/net/malisis/core/client/gui/component/interaction/UITextField.java
UITextField.setColors
public UITextField setColors(int bgColor, int cursorColor, int selectColor) { """ Sets the options. @param bgColor the bg color @param cursorColor the cursor color @param selectColor the select color @return the UI text field """ setColor(bgColor); this.cursorColor = cursorColor; this.selectColor =...
java
public UITextField setColors(int bgColor, int cursorColor, int selectColor) { setColor(bgColor); this.cursorColor = cursorColor; this.selectColor = selectColor; return this; }
[ "public", "UITextField", "setColors", "(", "int", "bgColor", ",", "int", "cursorColor", ",", "int", "selectColor", ")", "{", "setColor", "(", "bgColor", ")", ";", "this", ".", "cursorColor", "=", "cursorColor", ";", "this", ".", "selectColor", "=", "selectCo...
Sets the options. @param bgColor the bg color @param cursorColor the cursor color @param selectColor the select color @return the UI text field
[ "Sets", "the", "options", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/client/gui/component/interaction/UITextField.java#L283-L290
buschmais/jqa-javaee6-plugin
src/main/java/com/buschmais/jqassistant/plugin/javaee6/impl/scanner/JsfFaceletScannerPlugin.java
JsfFaceletScannerPlugin.getJsfTemplateDescriptor
private JsfFaceletDescriptor getJsfTemplateDescriptor(String fullFilePath, ScannerContext context) { """ Tries to find a {@link JsfFaceletDescriptor} in the store with the given fullFilePath. Creates a new one if no descriptor could be found. @param fullFilePath the file path of the wanted file @param contex...
java
private JsfFaceletDescriptor getJsfTemplateDescriptor(String fullFilePath, ScannerContext context) { // can't handle EL-expressions if (isElExpression(fullFilePath)) { return null; } return context.peek(FileResolver.class).require(fullFilePath, JsfFaceletDescriptor.class, con...
[ "private", "JsfFaceletDescriptor", "getJsfTemplateDescriptor", "(", "String", "fullFilePath", ",", "ScannerContext", "context", ")", "{", "// can't handle EL-expressions", "if", "(", "isElExpression", "(", "fullFilePath", ")", ")", "{", "return", "null", ";", "}", "re...
Tries to find a {@link JsfFaceletDescriptor} in the store with the given fullFilePath. Creates a new one if no descriptor could be found. @param fullFilePath the file path of the wanted file @param context The scanner context. @return a {@link JsfFaceletDescriptor} representing the wanted file
[ "Tries", "to", "find", "a", "{", "@link", "JsfFaceletDescriptor", "}", "in", "the", "store", "with", "the", "given", "fullFilePath", ".", "Creates", "a", "new", "one", "if", "no", "descriptor", "could", "be", "found", "." ]
train
https://github.com/buschmais/jqa-javaee6-plugin/blob/f5776604d9255206807e5aca90b8767bde494e14/src/main/java/com/buschmais/jqassistant/plugin/javaee6/impl/scanner/JsfFaceletScannerPlugin.java#L262-L268
jhalterman/failsafe
src/main/java/net/jodah/failsafe/RetryPolicy.java
RetryPolicy.withBackoff
public RetryPolicy<R> withBackoff(long delay, long maxDelay, ChronoUnit chronoUnit) { """ Sets the {@code delay} between retries, exponentially backing off to the {@code maxDelay} and multiplying successive delays by a factor of 2. @throws NullPointerException if {@code chronoUnit} is null @throws IllegalArgu...
java
public RetryPolicy<R> withBackoff(long delay, long maxDelay, ChronoUnit chronoUnit) { return withBackoff(delay, maxDelay, chronoUnit, 2); }
[ "public", "RetryPolicy", "<", "R", ">", "withBackoff", "(", "long", "delay", ",", "long", "maxDelay", ",", "ChronoUnit", "chronoUnit", ")", "{", "return", "withBackoff", "(", "delay", ",", "maxDelay", ",", "chronoUnit", ",", "2", ")", ";", "}" ]
Sets the {@code delay} between retries, exponentially backing off to the {@code maxDelay} and multiplying successive delays by a factor of 2. @throws NullPointerException if {@code chronoUnit} is null @throws IllegalArgumentException if {@code delay} is <= 0 or {@code delay} is >= {@code maxDelay} @throws IllegalState...
[ "Sets", "the", "{", "@code", "delay", "}", "between", "retries", "exponentially", "backing", "off", "to", "the", "{", "@code", "maxDelay", "}", "and", "multiplying", "successive", "delays", "by", "a", "factor", "of", "2", "." ]
train
https://github.com/jhalterman/failsafe/blob/65fcd3a82f7b232d2ff59bc525a59d693dd8e223/src/main/java/net/jodah/failsafe/RetryPolicy.java#L424-L426
trellis-ldp/trellis
auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthUtils.java
OAuthUtils.buildAuthenticatorWithTruststore
public static Authenticator buildAuthenticatorWithTruststore(final String keystorePath, final char[] keystorePassword, final List<String> keyids) { """ Build an authenticator. @param keystorePath the path to a keystore @param keystorePassword the password for a keystore @param keyids the key ids @r...
java
public static Authenticator buildAuthenticatorWithTruststore(final String keystorePath, final char[] keystorePassword, final List<String> keyids) { if (keystorePath != null) { final File file = new File(keystorePath); if (file.exists()) { try (final FileInputS...
[ "public", "static", "Authenticator", "buildAuthenticatorWithTruststore", "(", "final", "String", "keystorePath", ",", "final", "char", "[", "]", "keystorePassword", ",", "final", "List", "<", "String", ">", "keyids", ")", "{", "if", "(", "keystorePath", "!=", "n...
Build an authenticator. @param keystorePath the path to a keystore @param keystorePassword the password for a keystore @param keyids the key ids @return an Authenticator, or null if there was an error
[ "Build", "an", "authenticator", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/auth/oauth/src/main/java/org/trellisldp/auth/oauth/OAuthUtils.java#L139-L164
alkacon/opencms-core
src/org/opencms/jsp/CmsJspTagContentLoad.java
CmsJspTagContentLoad.doLoadNextFile
protected void doLoadNextFile() throws CmsException { """ Load the next file name from the initialized list of file names.<p> @throws CmsException if something goes wrong """ super.doLoadNextResource(); if (m_resource == null) { return; } // upgrade the resource...
java
protected void doLoadNextFile() throws CmsException { super.doLoadNextResource(); if (m_resource == null) { return; } // upgrade the resource to a file CmsFile file = m_cms.readFile(m_resource); // unmarshal the XML content from the resource, don't use unma...
[ "protected", "void", "doLoadNextFile", "(", ")", "throws", "CmsException", "{", "super", ".", "doLoadNextResource", "(", ")", ";", "if", "(", "m_resource", "==", "null", ")", "{", "return", ";", "}", "// upgrade the resource to a file", "CmsFile", "file", "=", ...
Load the next file name from the initialized list of file names.<p> @throws CmsException if something goes wrong
[ "Load", "the", "next", "file", "name", "from", "the", "initialized", "list", "of", "file", "names", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagContentLoad.java#L458-L486
a-schild/jave2
jave-core/src/main/java/ws/schild/jave/DefaultFFMPEGLocator.java
DefaultFFMPEGLocator.copyFile
private void copyFile(String path, File dest) { """ Copies a file bundled in the package to the supplied destination. @param path The name of the bundled file. @param dest The destination. @throws RuntimeException If an unexpected error occurs. """ String resourceName= "native/" + path; ...
java
private void copyFile(String path, File dest) { String resourceName= "native/" + path; try { LOG.debug("Copy from resource <"+resourceName+"> to target <"+dest.getAbsolutePath()+">"); if (copy(getClass().getResourceAsStream(resourceName), dest.getAbsolutePath())) ...
[ "private", "void", "copyFile", "(", "String", "path", ",", "File", "dest", ")", "{", "String", "resourceName", "=", "\"native/\"", "+", "path", ";", "try", "{", "LOG", ".", "debug", "(", "\"Copy from resource <\"", "+", "resourceName", "+", "\"> to target <\""...
Copies a file bundled in the package to the supplied destination. @param path The name of the bundled file. @param dest The destination. @throws RuntimeException If an unexpected error occurs.
[ "Copies", "a", "file", "bundled", "in", "the", "package", "to", "the", "supplied", "destination", "." ]
train
https://github.com/a-schild/jave2/blob/1e7d6a1ca7c27cc63570f1aabb5c84ee124f3e26/jave-core/src/main/java/ws/schild/jave/DefaultFFMPEGLocator.java#L127-L153
eurekaclinical/javautil
src/main/java/org/arp/javautil/arrays/Arrays.java
Arrays.contains
public static boolean contains(Object[] arr, Object obj) { """ Returns where an object is in a given array. @param arr the <code>Object[]</code> to search. @param obj the <code>Object</code> to search for. @return <code>true</code> of <code>obj</code> is in <code>arr</code>, <code>false</code> otherwise. Ret...
java
public static boolean contains(Object[] arr, Object obj) { if (arr != null) { for (int i = 0; i < arr.length; i++) { Object arri = arr[i]; if (arri == obj || (arri != null && arri.equals(obj))) { return true; } } ...
[ "public", "static", "boolean", "contains", "(", "Object", "[", "]", "arr", ",", "Object", "obj", ")", "{", "if", "(", "arr", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "arr", ".", "length", ";", "i", "++", ")", "...
Returns where an object is in a given array. @param arr the <code>Object[]</code> to search. @param obj the <code>Object</code> to search for. @return <code>true</code> of <code>obj</code> is in <code>arr</code>, <code>false</code> otherwise. Returns <code>false</code> if <code>arr</code> is <code>null</code>.
[ "Returns", "where", "an", "object", "is", "in", "a", "given", "array", "." ]
train
https://github.com/eurekaclinical/javautil/blob/779bbc5bf096c75f8eed4f99ca45b99c1d44df43/src/main/java/org/arp/javautil/arrays/Arrays.java#L85-L95
Viascom/groundwork
foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/response/serviceresult/FoxHttpServiceResultResponse.java
FoxHttpServiceResultResponse.getContent
@SuppressWarnings("unchecked") public <T extends Serializable> T getContent(Class<T> contentClass, boolean checkHash) throws FoxHttpResponseException { """ Get the content of the service result @param contentClass class of the return object @param checkHash should the result be checked @return deserial...
java
@SuppressWarnings("unchecked") public <T extends Serializable> T getContent(Class<T> contentClass, boolean checkHash) throws FoxHttpResponseException { try { Type parameterizedType = new ServiceResultParameterizedType(contentClass); String body = getStringBody(); Servi...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "Serializable", ">", "T", "getContent", "(", "Class", "<", "T", ">", "contentClass", ",", "boolean", "checkHash", ")", "throws", "FoxHttpResponseException", "{", "try", "{", "Ty...
Get the content of the service result @param contentClass class of the return object @param checkHash should the result be checked @return deserialized content of the service result @throws FoxHttpResponseException Exception during the deserialization
[ "Get", "the", "content", "of", "the", "service", "result" ]
train
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/response/serviceresult/FoxHttpServiceResultResponse.java#L237-L256
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/bytebuffer/WsByteBufferUtils.java
WsByteBufferUtils.putStringValue
public static void putStringValue(WsByteBuffer[] buff, String value, boolean bFlipLast) { """ Store a String into a wsbb[]. This will fill out each wsbb until all of the bytes are written. It will throw an exception if there is not enough space. Users must pass in a boolean to determine whether or not to flip()...
java
public static void putStringValue(WsByteBuffer[] buff, String value, boolean bFlipLast) { if (null != value) { putByteArrayValue(buff, value.getBytes(), bFlipLast); } }
[ "public", "static", "void", "putStringValue", "(", "WsByteBuffer", "[", "]", "buff", ",", "String", "value", ",", "boolean", "bFlipLast", ")", "{", "if", "(", "null", "!=", "value", ")", "{", "putByteArrayValue", "(", "buff", ",", "value", ".", "getBytes",...
Store a String into a wsbb[]. This will fill out each wsbb until all of the bytes are written. It will throw an exception if there is not enough space. Users must pass in a boolean to determine whether or not to flip() the last buffer -- i.e. pass in true if this is the only put you're doing, otherwise pass in false. A...
[ "Store", "a", "String", "into", "a", "wsbb", "[]", ".", "This", "will", "fill", "out", "each", "wsbb", "until", "all", "of", "the", "bytes", "are", "written", ".", "It", "will", "throw", "an", "exception", "if", "there", "is", "not", "enough", "space",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/wsspi/bytebuffer/WsByteBufferUtils.java#L456-L460
AltBeacon/android-beacon-library
lib/src/main/java/org/altbeacon/beacon/BeaconParser.java
BeaconParser.fromScanData
public Beacon fromScanData(byte[] scanData, int rssi, BluetoothDevice device) { """ Construct a Beacon from a Bluetooth LE packet collected by Android's Bluetooth APIs, including the raw Bluetooth device info @param scanData The actual packet bytes @param rssi The measured signal strength of the packet @para...
java
public Beacon fromScanData(byte[] scanData, int rssi, BluetoothDevice device) { return fromScanData(scanData, rssi, device, new Beacon()); }
[ "public", "Beacon", "fromScanData", "(", "byte", "[", "]", "scanData", ",", "int", "rssi", ",", "BluetoothDevice", "device", ")", "{", "return", "fromScanData", "(", "scanData", ",", "rssi", ",", "device", ",", "new", "Beacon", "(", ")", ")", ";", "}" ]
Construct a Beacon from a Bluetooth LE packet collected by Android's Bluetooth APIs, including the raw Bluetooth device info @param scanData The actual packet bytes @param rssi The measured signal strength of the packet @param device The Bluetooth device that was detected @return An instance of a <code>Beacon</code>
[ "Construct", "a", "Beacon", "from", "a", "Bluetooth", "LE", "packet", "collected", "by", "Android", "s", "Bluetooth", "APIs", "including", "the", "raw", "Bluetooth", "device", "info" ]
train
https://github.com/AltBeacon/android-beacon-library/blob/f7f3a323ea7415d53e7bd695ff6a01f1501d5dc3/lib/src/main/java/org/altbeacon/beacon/BeaconParser.java#L417-L419
knowm/XChart
xchart/src/main/java/org/knowm/xchart/OHLCChart.java
OHLCChart.updateOHLCSeries
public OHLCSeries updateOHLCSeries( String seriesName, double[] newXData, double[] newOpenData, double[] newHighData, double[] newLowData, double[] newCloseData) { """ Update a series by updating the X-Axis and Y-Axis @param seriesName @param newXData - set null to be automa...
java
public OHLCSeries updateOHLCSeries( String seriesName, double[] newXData, double[] newOpenData, double[] newHighData, double[] newLowData, double[] newCloseData) { sanityCheck(seriesName, newOpenData, newHighData, newLowData, newCloseData); Map<String, OHLCSeries> seriesMap...
[ "public", "OHLCSeries", "updateOHLCSeries", "(", "String", "seriesName", ",", "double", "[", "]", "newXData", ",", "double", "[", "]", "newOpenData", ",", "double", "[", "]", "newHighData", ",", "double", "[", "]", "newLowData", ",", "double", "[", "]", "n...
Update a series by updating the X-Axis and Y-Axis @param seriesName @param newXData - set null to be automatically generated as a list of increasing Integers starting from 1 and ending at the size of the new Y-Axis data list. @param newOpenData @param newHighData @param newLowData @param newCloseData @return
[ "Update", "a", "series", "by", "updating", "the", "X", "-", "Axis", "and", "Y", "-", "Axis" ]
train
https://github.com/knowm/XChart/blob/677a105753a855edf24782fab1bf1f5aec3e642b/xchart/src/main/java/org/knowm/xchart/OHLCChart.java#L382-L409
tango-controls/JTango
common/src/main/java/fr/esrf/TangoApi/Group/Group.java
Group.get_group_i
private Group get_group_i(final String n, final boolean fwd) { """ Returns the group named <n> or null if no such group - internal impl """ final GroupElement e = find_i(n, fwd); return e != null && e instanceof Group ? (Group) e : null; }
java
private Group get_group_i(final String n, final boolean fwd) { final GroupElement e = find_i(n, fwd); return e != null && e instanceof Group ? (Group) e : null; }
[ "private", "Group", "get_group_i", "(", "final", "String", "n", ",", "final", "boolean", "fwd", ")", "{", "final", "GroupElement", "e", "=", "find_i", "(", "n", ",", "fwd", ")", ";", "return", "e", "!=", "null", "&&", "e", "instanceof", "Group", "?", ...
Returns the group named <n> or null if no such group - internal impl
[ "Returns", "the", "group", "named", "<n", ">", "or", "null", "if", "no", "such", "group", "-", "internal", "impl" ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/TangoApi/Group/Group.java#L453-L456
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java
HawkbitCommonUtil.getArtifactoryDetailsLabelId
public static String getArtifactoryDetailsLabelId(final String name, final VaadinMessageSource i18n) { """ Creates the caption of the Artifact Details table @param name name of the software module, if one is selected @param i18n VaadinMessageSource @return complete caption text of the table """ ...
java
public static String getArtifactoryDetailsLabelId(final String name, final VaadinMessageSource i18n) { String caption; if (StringUtils.hasText(name)) { caption = i18n.getMessage(UIMessageIdProvider.CAPTION_ARTIFACT_DETAILS_OF, HawkbitCommonUtil.getBoldHTMLText(name)); ...
[ "public", "static", "String", "getArtifactoryDetailsLabelId", "(", "final", "String", "name", ",", "final", "VaadinMessageSource", "i18n", ")", "{", "String", "caption", ";", "if", "(", "StringUtils", ".", "hasText", "(", "name", ")", ")", "{", "caption", "=",...
Creates the caption of the Artifact Details table @param name name of the software module, if one is selected @param i18n VaadinMessageSource @return complete caption text of the table
[ "Creates", "the", "caption", "of", "the", "Artifact", "Details", "table" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/utils/HawkbitCommonUtil.java#L554-L563
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.notifications_sendEmail
public String notifications_sendEmail(Collection<Integer> recipientIds, CharSequence subject, CharSequence fbml) throws FacebookException, IOException { """ Sends a notification email to the specified users, who must have added your application. You can send five (5) emails to a user per day. Requires a sessi...
java
public String notifications_sendEmail(Collection<Integer> recipientIds, CharSequence subject, CharSequence fbml) throws FacebookException, IOException { return notifications_sendEmail(recipientIds, subject, fbml, /*text*/null); }
[ "public", "String", "notifications_sendEmail", "(", "Collection", "<", "Integer", ">", "recipientIds", ",", "CharSequence", "subject", ",", "CharSequence", "fbml", ")", "throws", "FacebookException", ",", "IOException", "{", "return", "notifications_sendEmail", "(", "...
Sends a notification email to the specified users, who must have added your application. You can send five (5) emails to a user per day. Requires a session key for desktop applications, which may only send email to the person whose session it is. This method does not require a session for Web applications. @param reci...
[ "Sends", "a", "notification", "email", "to", "the", "specified", "users", "who", "must", "have", "added", "your", "application", ".", "You", "can", "send", "five", "(", "5", ")", "emails", "to", "a", "user", "per", "day", ".", "Requires", "a", "session",...
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1235-L1238
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLEquivalentDataPropertiesAxiomImpl_CustomFieldSerializer.java
OWLEquivalentDataPropertiesAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLEquivalentDataPropertiesAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@li...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLEquivalentDataPropertiesAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLEquivalentDataPropertiesAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", ...
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLEquivalentDataPropertiesAxiomImpl_CustomFieldSerializer.java#L95-L98
xwiki/xwiki-rendering
xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiPageUtil.java
WikiPageUtil.isValidXmlName
public static boolean isValidXmlName(String tagName, boolean colonEnabled) { """ This method checks the given string and returns <code>true</code> if it is a valid XML name <p> See http://www.w3.org/TR/xml/#NT-Name. </p> @param tagName the name to check @param colonEnabled if this flag is <code>true</code> ...
java
public static boolean isValidXmlName(String tagName, boolean colonEnabled) { boolean valid = false; int len = tagName != null ? tagName.length() : 0; for (int i = 0; i < len; i++) { char ch = tagName.charAt(i); if (i == 0) { valid = isValidXmlNameStart...
[ "public", "static", "boolean", "isValidXmlName", "(", "String", "tagName", ",", "boolean", "colonEnabled", ")", "{", "boolean", "valid", "=", "false", ";", "int", "len", "=", "tagName", "!=", "null", "?", "tagName", ".", "length", "(", ")", ":", "0", ";"...
This method checks the given string and returns <code>true</code> if it is a valid XML name <p> See http://www.w3.org/TR/xml/#NT-Name. </p> @param tagName the name to check @param colonEnabled if this flag is <code>true</code> then this method accepts the ':' symbol in the name @return <code>true</code> if the given s...
[ "This", "method", "checks", "the", "given", "string", "and", "returns", "<code", ">", "true<", "/", "code", ">", "if", "it", "is", "a", "valid", "XML", "name", "<p", ">", "See", "http", ":", "//", "www", ".", "w3", ".", "org", "/", "TR", "/", "xm...
train
https://github.com/xwiki/xwiki-rendering/blob/a21cdfcb64ef5b76872e3eedf78c530f26d7beb0/xwiki-rendering-wikimodel/src/main/java/org/xwiki/rendering/wikimodel/WikiPageUtil.java#L236-L252
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/Hdf5Archive.java
Hdf5Archive.hasAttribute
public boolean hasAttribute(String attributeName, String... groups) { """ Check whether group path contains string attribute. @param attributeName Name of attribute @param groups Array of zero or more ancestor groups from root to parent. @return Boolean indicating whether attribute exists in group path...
java
public boolean hasAttribute(String attributeName, String... groups) { synchronized (Hdf5Archive.LOCK_OBJECT) { if (groups.length == 0) return this.file.attrExists(attributeName); Group[] groupArray = openGroups(groups); boolean b = groupArray[groupArray.length...
[ "public", "boolean", "hasAttribute", "(", "String", "attributeName", ",", "String", "...", "groups", ")", "{", "synchronized", "(", "Hdf5Archive", ".", "LOCK_OBJECT", ")", "{", "if", "(", "groups", ".", "length", "==", "0", ")", "return", "this", ".", "fil...
Check whether group path contains string attribute. @param attributeName Name of attribute @param groups Array of zero or more ancestor groups from root to parent. @return Boolean indicating whether attribute exists in group path.
[ "Check", "whether", "group", "path", "contains", "string", "attribute", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/Hdf5Archive.java#L177-L186
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/selenium/by/LazyPatternBy.java
LazyPatternBy.fillPattern
private String fillPattern(String pattern, String[] parameters) { """ Fills in placeholders in pattern using the supplied parameters. @param pattern pattern to fill (in String.format style). @param parameters parameters to use. @return filled in pattern. """ boolean containsSingleQuote = false; ...
java
private String fillPattern(String pattern, String[] parameters) { boolean containsSingleQuote = false; boolean containsDoubleQuote = false; Object[] escapedParams = new Object[parameters.length]; for (int i = 0; i < parameters.length; i++) { String param = parameters[i]; ...
[ "private", "String", "fillPattern", "(", "String", "pattern", ",", "String", "[", "]", "parameters", ")", "{", "boolean", "containsSingleQuote", "=", "false", ";", "boolean", "containsDoubleQuote", "=", "false", ";", "Object", "[", "]", "escapedParams", "=", "...
Fills in placeholders in pattern using the supplied parameters. @param pattern pattern to fill (in String.format style). @param parameters parameters to use. @return filled in pattern.
[ "Fills", "in", "placeholders", "in", "pattern", "using", "the", "supplied", "parameters", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/selenium/by/LazyPatternBy.java#L86-L106
groovy/groovy-core
src/main/org/codehaus/groovy/classgen/asm/CompileStack.java
CompileStack.defineTemporaryVariable
public int defineTemporaryVariable(org.codehaus.groovy.ast.Variable var, boolean store) { """ creates a temporary variable. @param var defines type and name @param store defines if the toplevel argument of the stack should be stored @return the index used for this temporary variable """ return def...
java
public int defineTemporaryVariable(org.codehaus.groovy.ast.Variable var, boolean store) { return defineTemporaryVariable(var.getName(), var.getType(),store); }
[ "public", "int", "defineTemporaryVariable", "(", "org", ".", "codehaus", ".", "groovy", ".", "ast", ".", "Variable", "var", ",", "boolean", "store", ")", "{", "return", "defineTemporaryVariable", "(", "var", ".", "getName", "(", ")", ",", "var", ".", "getT...
creates a temporary variable. @param var defines type and name @param store defines if the toplevel argument of the stack should be stored @return the index used for this temporary variable
[ "creates", "a", "temporary", "variable", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/classgen/asm/CompileStack.java#L260-L262
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.createHash
public static String createHash(final File file, final String algorithm) { """ Creates a HEX encoded hash from a file. @param file File to create a hash for - Cannot be <code>null</code>. @param algorithm Hash algorithm like "MD5" or "SHA" - Cannot be <code>null</code>. @return HEX encoded hash. """ ...
java
public static String createHash(final File file, final String algorithm) { checkNotNull("file", file); checkNotNull("algorithm", algorithm); try { try (final FileInputStream in = new FileInputStream(file)) { return createHash(in, algorithm); } ...
[ "public", "static", "String", "createHash", "(", "final", "File", "file", ",", "final", "String", "algorithm", ")", "{", "checkNotNull", "(", "\"file\"", ",", "file", ")", ";", "checkNotNull", "(", "\"algorithm\"", ",", "algorithm", ")", ";", "try", "{", "...
Creates a HEX encoded hash from a file. @param file File to create a hash for - Cannot be <code>null</code>. @param algorithm Hash algorithm like "MD5" or "SHA" - Cannot be <code>null</code>. @return HEX encoded hash.
[ "Creates", "a", "HEX", "encoded", "hash", "from", "a", "file", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L324-L334
op4j/op4j
src/main/java/org/op4j/functions/FnFunc.java
FnFunc.ifNotNullThenElse
public static final <T,R> Function<T,R> ifNotNullThenElse( final Type<T> targetType, final IFunction<? super T,R> thenFunction, final IFunction<? super T,R> elseFunction) { """ <p> Builds a function that will execute the specified function <tt>thenFunction</tt> only if the target objec...
java
public static final <T,R> Function<T,R> ifNotNullThenElse( final Type<T> targetType, final IFunction<? super T,R> thenFunction, final IFunction<? super T,R> elseFunction) { return ifTrueThenElse(targetType, FnObject.isNotNull(), thenFunction, elseFunction); }
[ "public", "static", "final", "<", "T", ",", "R", ">", "Function", "<", "T", ",", "R", ">", "ifNotNullThenElse", "(", "final", "Type", "<", "T", ">", "targetType", ",", "final", "IFunction", "<", "?", "super", "T", ",", "R", ">", "thenFunction", ",", ...
<p> Builds a function that will execute the specified function <tt>thenFunction</tt> only if the target object is not null, and will execute the specified function <tt>elseFunction</tt> otherwise. </p> <p> The built function can effectively change the target type (receive <tt>T</tt> and return <tt>R</tt>) if both <tt>t...
[ "<p", ">", "Builds", "a", "function", "that", "will", "execute", "the", "specified", "function", "<tt", ">", "thenFunction<", "/", "tt", ">", "only", "if", "the", "target", "object", "is", "not", "null", "and", "will", "execute", "the", "specified", "funct...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnFunc.java#L243-L247
banq/jdonframework
src/main/java/com/jdon/util/task/TaskEngine.java
TaskEngine.scheduleTask
public static TimerTask scheduleTask(Runnable task, long delay, long period) { """ Schedules a task to periodically run. This is useful for tasks such as updating search indexes, deleting old data at periodic intervals, etc. @param task task to be scheduled. @param delay delay in milliseconds before task is...
java
public static TimerTask scheduleTask(Runnable task, long delay, long period) { TimerTask timerTask = new ScheduledTask(task); taskTimer.scheduleAtFixedRate(timerTask, delay, period); return timerTask; }
[ "public", "static", "TimerTask", "scheduleTask", "(", "Runnable", "task", ",", "long", "delay", ",", "long", "period", ")", "{", "TimerTask", "timerTask", "=", "new", "ScheduledTask", "(", "task", ")", ";", "taskTimer", ".", "scheduleAtFixedRate", "(", "timerT...
Schedules a task to periodically run. This is useful for tasks such as updating search indexes, deleting old data at periodic intervals, etc. @param task task to be scheduled. @param delay delay in milliseconds before task is to be executed. @param period time in milliseconds between successive task executions. @retur...
[ "Schedules", "a", "task", "to", "periodically", "run", ".", "This", "is", "useful", "for", "tasks", "such", "as", "updating", "search", "indexes", "deleting", "old", "data", "at", "periodic", "intervals", "etc", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/task/TaskEngine.java#L114-L118
awslabs/amazon-sqs-java-extended-client-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClientBase.java
AmazonSQSExtendedClientBase.removePermission
public RemovePermissionResult removePermission(String queueUrl, String label) throws AmazonServiceException, AmazonClientException { """ <p> Revokes any permissions in the queue policy that matches the specified <code>Label</code> parameter. Only the owner of the queue can remove permissions. </p> @param...
java
public RemovePermissionResult removePermission(String queueUrl, String label) throws AmazonServiceException, AmazonClientException { return amazonSqsToBeExtended.removePermission(queueUrl, label); }
[ "public", "RemovePermissionResult", "removePermission", "(", "String", "queueUrl", ",", "String", "label", ")", "throws", "AmazonServiceException", ",", "AmazonClientException", "{", "return", "amazonSqsToBeExtended", ".", "removePermission", "(", "queueUrl", ",", "label"...
<p> Revokes any permissions in the queue policy that matches the specified <code>Label</code> parameter. Only the owner of the queue can remove permissions. </p> @param queueUrl The URL of the Amazon SQS queue to take action on. @param label The identification of the permission to remove. This is the label added with ...
[ "<p", ">", "Revokes", "any", "permissions", "in", "the", "queue", "policy", "that", "matches", "the", "specified", "<code", ">", "Label<", "/", "code", ">", "parameter", ".", "Only", "the", "owner", "of", "the", "queue", "can", "remove", "permissions", "."...
train
https://github.com/awslabs/amazon-sqs-java-extended-client-lib/blob/df0c6251b99e682d6179938fe784590e662b84ea/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSExtendedClientBase.java#L1478-L1482
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/endpoint/AbstractGenericHandler.java
AbstractGenericHandler.onKeepAliveFired
protected void onKeepAliveFired(ChannelHandlerContext ctx, CouchbaseRequest keepAliveRequest) { """ Override to customize the behavior when a keep alive has been triggered and a keep alive request sent. The default behavior is to log the event at debug level. @param ctx the channel context. @param keepAlive...
java
protected void onKeepAliveFired(ChannelHandlerContext ctx, CouchbaseRequest keepAliveRequest) { if (env().continuousKeepAliveEnabled() && LOGGER.isTraceEnabled()) { LOGGER.trace(logIdent(ctx, endpoint) + "Continuous KeepAlive fired"); } else if (LOGGER.isDebugEnabled()) { LOGGER....
[ "protected", "void", "onKeepAliveFired", "(", "ChannelHandlerContext", "ctx", ",", "CouchbaseRequest", "keepAliveRequest", ")", "{", "if", "(", "env", "(", ")", ".", "continuousKeepAliveEnabled", "(", ")", "&&", "LOGGER", ".", "isTraceEnabled", "(", ")", ")", "{...
Override to customize the behavior when a keep alive has been triggered and a keep alive request sent. The default behavior is to log the event at debug level. @param ctx the channel context. @param keepAliveRequest the keep alive request that was sent when keep alive was triggered
[ "Override", "to", "customize", "the", "behavior", "when", "a", "keep", "alive", "has", "been", "triggered", "and", "a", "keep", "alive", "request", "sent", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/endpoint/AbstractGenericHandler.java#L788-L794
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java
Sample.getCubicInterpolated
private int getCubicInterpolated(final int currentSamplePos, final int currentTuningPos) { """ does cubic interpolation with the next sample @since 06.06.2006 @param currentTuningPos @return """ final int poslo = (currentTuningPos >> CubicSpline.SPLINE_FRACSHIFT) & CubicSpline.SPLINE_FRACMASK; final ...
java
private int getCubicInterpolated(final int currentSamplePos, final int currentTuningPos) { final int poslo = (currentTuningPos >> CubicSpline.SPLINE_FRACSHIFT) & CubicSpline.SPLINE_FRACMASK; final long v1 = (((currentSamplePos-1)<0)?0L: (long)CubicSpline.lut[poslo ]*(long)sample[currentSamplePos-1]) + ...
[ "private", "int", "getCubicInterpolated", "(", "final", "int", "currentSamplePos", ",", "final", "int", "currentTuningPos", ")", "{", "final", "int", "poslo", "=", "(", "currentTuningPos", ">>", "CubicSpline", ".", "SPLINE_FRACSHIFT", ")", "&", "CubicSpline", ".",...
does cubic interpolation with the next sample @since 06.06.2006 @param currentTuningPos @return
[ "does", "cubic", "interpolation", "with", "the", "next", "sample" ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mod/loader/instrument/Sample.java#L150-L160
zaproxy/zaproxy
src/org/zaproxy/zap/extension/pscan/ExtensionPassiveScan.java
ExtensionPassiveScan.setPluginPassiveScannerAlertThreshold
void setPluginPassiveScannerAlertThreshold(int pluginId, Plugin.AlertThreshold alertThreshold) { """ Sets the value of {@code alertThreshold} of the plug-in passive scanner with the given {@code pluginId}. <p> If the {@code alertThreshold} is {@code OFF} the scanner is also disabled. The call to this method has ...
java
void setPluginPassiveScannerAlertThreshold(int pluginId, Plugin.AlertThreshold alertThreshold) { PluginPassiveScanner scanner = getPluginPassiveScanner(pluginId); if (scanner != null) { scanner.setAlertThreshold(alertThreshold); scanner.setEnabled(!Plugin.AlertThreshold.OFF.equal...
[ "void", "setPluginPassiveScannerAlertThreshold", "(", "int", "pluginId", ",", "Plugin", ".", "AlertThreshold", "alertThreshold", ")", "{", "PluginPassiveScanner", "scanner", "=", "getPluginPassiveScanner", "(", "pluginId", ")", ";", "if", "(", "scanner", "!=", "null",...
Sets the value of {@code alertThreshold} of the plug-in passive scanner with the given {@code pluginId}. <p> If the {@code alertThreshold} is {@code OFF} the scanner is also disabled. The call to this method has no effect if no scanner with the given {@code pluginId} exist. @param pluginId the ID of the plug-in passiv...
[ "Sets", "the", "value", "of", "{", "@code", "alertThreshold", "}", "of", "the", "plug", "-", "in", "passive", "scanner", "with", "the", "given", "{", "@code", "pluginId", "}", ".", "<p", ">", "If", "the", "{", "@code", "alertThreshold", "}", "is", "{",...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/pscan/ExtensionPassiveScan.java#L386-L393
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java
StreamSegmentReadIndex.getSingleMemoryReadResultEntry
private CacheReadResultEntry getSingleMemoryReadResultEntry(long resultStartOffset, int maxLength) { """ Returns a CacheReadResultEntry that matches the specified search parameters, but only if the data is readily available in the cache and if there is an index entry that starts at that location.. As opposed from...
java
private CacheReadResultEntry getSingleMemoryReadResultEntry(long resultStartOffset, int maxLength) { Exceptions.checkNotClosed(this.closed, this); if (maxLength > 0 && checkReadAvailability(resultStartOffset, false) == ReadAvailability.Available) { // Look up an entry in the index that cont...
[ "private", "CacheReadResultEntry", "getSingleMemoryReadResultEntry", "(", "long", "resultStartOffset", ",", "int", "maxLength", ")", "{", "Exceptions", ".", "checkNotClosed", "(", "this", ".", "closed", ",", "this", ")", ";", "if", "(", "maxLength", ">", "0", "&...
Returns a CacheReadResultEntry that matches the specified search parameters, but only if the data is readily available in the cache and if there is an index entry that starts at that location.. As opposed from getSingleReadResultEntry(), this method will return null if the requested data is not available. @param resul...
[ "Returns", "a", "CacheReadResultEntry", "that", "matches", "the", "specified", "search", "parameters", "but", "only", "if", "the", "data", "is", "readily", "available", "in", "the", "cache", "and", "if", "there", "is", "an", "index", "entry", "that", "starts",...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java#L835-L851
LearnLib/automatalib
util/src/main/java/net/automatalib/util/automata/ads/ADSUtil.java
ADSUtil.computeMaximumSplittingWordLength
public static long computeMaximumSplittingWordLength(final int n, final int i, final int m) { """ Computes an upper bound for the length of a splitting word. Based on <p> I.V. Kogan. "Estimated Length of a Minimal Simple Conditional Diagnostic Experiment". In: Automation and Remote Control 34 (1973) @param n...
java
public static long computeMaximumSplittingWordLength(final int n, final int i, final int m) { if (m == 2) { return n; } return LongMath.binomial(n, i) - LongMath.binomial(m - 1, i - 1) - 1; }
[ "public", "static", "long", "computeMaximumSplittingWordLength", "(", "final", "int", "n", ",", "final", "int", "i", ",", "final", "int", "m", ")", "{", "if", "(", "m", "==", "2", ")", "{", "return", "n", ";", "}", "return", "LongMath", ".", "binomial"...
Computes an upper bound for the length of a splitting word. Based on <p> I.V. Kogan. "Estimated Length of a Minimal Simple Conditional Diagnostic Experiment". In: Automation and Remote Control 34 (1973) @param n the size of the automaton (number of states) @param i the number of states that should be distinguished by ...
[ "Computes", "an", "upper", "bound", "for", "the", "length", "of", "a", "splitting", "word", ".", "Based", "on", "<p", ">", "I", ".", "V", ".", "Kogan", ".", "Estimated", "Length", "of", "a", "Minimal", "Simple", "Conditional", "Diagnostic", "Experiment", ...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/automata/ads/ADSUtil.java#L150-L156
spring-projects/spring-boot
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONArray.java
JSONArray.optBoolean
public boolean optBoolean(int index, boolean fallback) { """ Returns the value at {@code index} if it exists and is a boolean or can be coerced to a boolean. Returns {@code fallback} otherwise. @param index the index to get the value from @param fallback the fallback value @return the value at {@code index} of...
java
public boolean optBoolean(int index, boolean fallback) { Object object = opt(index); Boolean result = JSON.toBoolean(object); return result != null ? result : fallback; }
[ "public", "boolean", "optBoolean", "(", "int", "index", ",", "boolean", "fallback", ")", "{", "Object", "object", "=", "opt", "(", "index", ")", ";", "Boolean", "result", "=", "JSON", ".", "toBoolean", "(", "object", ")", ";", "return", "result", "!=", ...
Returns the value at {@code index} if it exists and is a boolean or can be coerced to a boolean. Returns {@code fallback} otherwise. @param index the index to get the value from @param fallback the fallback value @return the value at {@code index} of {@code fallback}
[ "Returns", "the", "value", "at", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONArray.java#L356-L360
pugwoo/nimble-orm
src/main/java/com/pugwoo/dbhelper/DBHelperInterceptor.java
DBHelperInterceptor.beforeUpdate
public boolean beforeUpdate(List<Object> tList, String setSql, List<Object> setSqlArgs) { """ update前执行 @param tList 更新前的对象列表 @param setSql 如果使用了updateCustom方法,传入的setSql将传入。否则该值为null @param setSqlArgs 如果使用了updateCustom方法,传入的args将传入,否则该值为null。 注意,修改此值会修改实际被设置的值,谨慎! @return 返回true继续执行,返回false中断执行并抛出NotAllowQuer...
java
public boolean beforeUpdate(List<Object> tList, String setSql, List<Object> setSqlArgs) { return true; }
[ "public", "boolean", "beforeUpdate", "(", "List", "<", "Object", ">", "tList", ",", "String", "setSql", ",", "List", "<", "Object", ">", "setSqlArgs", ")", "{", "return", "true", ";", "}" ]
update前执行 @param tList 更新前的对象列表 @param setSql 如果使用了updateCustom方法,传入的setSql将传入。否则该值为null @param setSqlArgs 如果使用了updateCustom方法,传入的args将传入,否则该值为null。 注意,修改此值会修改实际被设置的值,谨慎! @return 返回true继续执行,返回false中断执行并抛出NotAllowQueryException
[ "update前执行" ]
train
https://github.com/pugwoo/nimble-orm/blob/dd496f3e57029e4f22f9a2f00d18a6513ef94d08/src/main/java/com/pugwoo/dbhelper/DBHelperInterceptor.java#L70-L72
camunda/camunda-commons
logging/src/main/java/org/camunda/commons/logging/BaseLogger.java
BaseLogger.exceptionMessage
protected String exceptionMessage(String id, String messageTemplate, Object... parameters) { """ Prepares an exception message @param id the id of the message @param messageTemplate the message template to use @param parameters the parameters for the message (optional) @return the prepared exception messag...
java
protected String exceptionMessage(String id, String messageTemplate, Object... parameters) { String formattedTemplate = formatMessageTemplate(id, messageTemplate); if(parameters == null || parameters.length == 0) { return formattedTemplate; } else { return MessageFormatter.arrayFormat(formatted...
[ "protected", "String", "exceptionMessage", "(", "String", "id", ",", "String", "messageTemplate", ",", "Object", "...", "parameters", ")", "{", "String", "formattedTemplate", "=", "formatMessageTemplate", "(", "id", ",", "messageTemplate", ")", ";", "if", "(", "...
Prepares an exception message @param id the id of the message @param messageTemplate the message template to use @param parameters the parameters for the message (optional) @return the prepared exception message
[ "Prepares", "an", "exception", "message" ]
train
https://github.com/camunda/camunda-commons/blob/bd3195db47c92c25717288fe9e6735f8e882f247/logging/src/main/java/org/camunda/commons/logging/BaseLogger.java#L213-L222
pierre/serialization
smile/src/main/java/com/ning/metrics/serialization/event/SmileEnvelopeEvent.java
SmileEnvelopeEvent.readExternal
@Override public void readExternal(final ObjectInput in) throws IOException { """ The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the...
java
@Override public void readExternal(final ObjectInput in) throws IOException { // Name of the event first final int smileEventNameBytesSize = in.readInt(); final byte[] eventNameBytes = new byte[smileEventNameBytesSize]; in.readFully(eventNameBytes); eventName = new String...
[ "@", "Override", "public", "void", "readExternal", "(", "final", "ObjectInput", "in", ")", "throws", "IOException", "{", "// Name of the event first", "final", "int", "smileEventNameBytesSize", "=", "in", ".", "readInt", "(", ")", ";", "final", "byte", "[", "]",...
The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal. @param in the stream...
[ "The", "object", "implements", "the", "readExternal", "method", "to", "restore", "its", "contents", "by", "calling", "the", "methods", "of", "DataInput", "for", "primitive", "types", "and", "readObject", "for", "objects", "strings", "and", "arrays", ".", "The", ...
train
https://github.com/pierre/serialization/blob/b15b7c749ba78bfe94dce8fc22f31b30b2e6830b/smile/src/main/java/com/ning/metrics/serialization/event/SmileEnvelopeEvent.java#L292-L309
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/VirtualCdj.java
VirtualCdj.sendSyncModeCommand
public void sendSyncModeCommand(int deviceNumber, boolean synced) throws IOException { """ Tell a device to turn sync on or off. @param deviceNumber the device whose sync state is to be set @param synced {@code} true if sync should be turned on, else it will be turned off @throws IOException if there is a p...
java
public void sendSyncModeCommand(int deviceNumber, boolean synced) throws IOException { final DeviceUpdate update = getLatestStatusFor(deviceNumber); if (update == null) { throw new IllegalArgumentException("Device " + deviceNumber + " not found on network."); } sendSyncModeCo...
[ "public", "void", "sendSyncModeCommand", "(", "int", "deviceNumber", ",", "boolean", "synced", ")", "throws", "IOException", "{", "final", "DeviceUpdate", "update", "=", "getLatestStatusFor", "(", "deviceNumber", ")", ";", "if", "(", "update", "==", "null", ")",...
Tell a device to turn sync on or off. @param deviceNumber the device whose sync state is to be set @param synced {@code} true if sync should be turned on, else it will be turned off @throws IOException if there is a problem sending the command to the device @throws IllegalStateException if the {@code VirtualCdj} is n...
[ "Tell", "a", "device", "to", "turn", "sync", "on", "or", "off", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/VirtualCdj.java#L1166-L1172
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java
MapComposedElement.setPointAt
public final boolean setPointAt(int index, Point2D<?, ?> point) { """ Set the specified point at the given index. <p>If the <var>index</var> is negative, it will corresponds to an index starting from the end of the list. @param index is the index of the desired point @param point is the new value of the po...
java
public final boolean setPointAt(int index, Point2D<?, ?> point) { return setPointAt(index, point.getX(), point.getY(), false); }
[ "public", "final", "boolean", "setPointAt", "(", "int", "index", ",", "Point2D", "<", "?", ",", "?", ">", "point", ")", "{", "return", "setPointAt", "(", "index", ",", "point", ".", "getX", "(", ")", ",", "point", ".", "getY", "(", ")", ",", "false...
Set the specified point at the given index. <p>If the <var>index</var> is negative, it will corresponds to an index starting from the end of the list. @param index is the index of the desired point @param point is the new value of the point @return <code>true</code> if the point was set, <code>false</code> if the spe...
[ "Set", "the", "specified", "point", "at", "the", "given", "index", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L978-L980
jcuda/jcuda
JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java
JCudaDriver.cuParamSetTexRef
@Deprecated public static int cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) { """ Adds a texture-reference to the function's argument list. <pre> CUresult cuParamSetTexRef ( CUfunction hfunc, int texunit, CUtexref hTexRef ) </pre> <div> <p>Adds a texture-reference to the functio...
java
@Deprecated public static int cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) { return checkResult(cuParamSetTexRefNative(hfunc, texunit, hTexRef)); }
[ "@", "Deprecated", "public", "static", "int", "cuParamSetTexRef", "(", "CUfunction", "hfunc", ",", "int", "texunit", ",", "CUtexref", "hTexRef", ")", "{", "return", "checkResult", "(", "cuParamSetTexRefNative", "(", "hfunc", ",", "texunit", ",", "hTexRef", ")", ...
Adds a texture-reference to the function's argument list. <pre> CUresult cuParamSetTexRef ( CUfunction hfunc, int texunit, CUtexref hTexRef ) </pre> <div> <p>Adds a texture-reference to the function's argument list. Deprecated Makes the CUDA array or linear memory bound to the texture reference <tt>hTexRef</tt> avail...
[ "Adds", "a", "texture", "-", "reference", "to", "the", "function", "s", "argument", "list", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/driver/JCudaDriver.java#L11944-L11948
kyoken74/gwt-angular
gwt-angular-user/src/main/java/com/asayama/gwt/angular/user/client/ui/directive/GwtWidget.java
GwtWidget.link
@Override public void link(NGScope scope, JQElement element, JSON attrs) { """ Replaces the element body with the GWT widget passed via gwt-widget attribute. GWT widget must implement IsWidget interface. """ IsWidget widget = scope.get(getName()); String id = "gwt-widget-" + counter++; ...
java
@Override public void link(NGScope scope, JQElement element, JSON attrs) { IsWidget widget = scope.get(getName()); String id = "gwt-widget-" + counter++; element.attr("id", id); RootPanel.get(id).add(widget); }
[ "@", "Override", "public", "void", "link", "(", "NGScope", "scope", ",", "JQElement", "element", ",", "JSON", "attrs", ")", "{", "IsWidget", "widget", "=", "scope", ".", "get", "(", "getName", "(", ")", ")", ";", "String", "id", "=", "\"gwt-widget-\"", ...
Replaces the element body with the GWT widget passed via gwt-widget attribute. GWT widget must implement IsWidget interface.
[ "Replaces", "the", "element", "body", "with", "the", "GWT", "widget", "passed", "via", "gwt", "-", "widget", "attribute", ".", "GWT", "widget", "must", "implement", "IsWidget", "interface", "." ]
train
https://github.com/kyoken74/gwt-angular/blob/99a6efa277dd4771d9cba976b25fdf0ac4fdeca2/gwt-angular-user/src/main/java/com/asayama/gwt/angular/user/client/ui/directive/GwtWidget.java#L36-L42
diffplug/durian
src/com/diffplug/common/base/FieldsAndGetters.java
FieldsAndGetters.dumpNonNull
public static void dumpNonNull(String name, Object obj) { """ Dumps all non-null fields and getters of {@code obj} to {@code System.out}. @see #dumpIf """ dumpNonNull(name, obj, StringPrinter.systemOut()); }
java
public static void dumpNonNull(String name, Object obj) { dumpNonNull(name, obj, StringPrinter.systemOut()); }
[ "public", "static", "void", "dumpNonNull", "(", "String", "name", ",", "Object", "obj", ")", "{", "dumpNonNull", "(", "name", ",", "obj", ",", "StringPrinter", ".", "systemOut", "(", ")", ")", ";", "}" ]
Dumps all non-null fields and getters of {@code obj} to {@code System.out}. @see #dumpIf
[ "Dumps", "all", "non", "-", "null", "fields", "and", "getters", "of", "{" ]
train
https://github.com/diffplug/durian/blob/10631a3480e5491eb6eb6ee06e752d8596914232/src/com/diffplug/common/base/FieldsAndGetters.java#L177-L179
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/photosets/PhotosetsInterface.java
PhotosetsInterface.removePhoto
public void removePhoto(String photosetId, String photoId) throws FlickrException { """ Remove a photo from the set. @param photosetId The photoset ID @param photoId The photo ID @throws FlickrException """ Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put(...
java
public void removePhoto(String photosetId, String photoId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_REMOVE_PHOTO); parameters.put("photoset_id", photosetId); parameters.put("photo_id", photoId); ...
[ "public", "void", "removePhoto", "(", "String", "photosetId", ",", "String", "photoId", ")", "throws", "FlickrException", "{", "Map", "<", "String", ",", "Object", ">", "parameters", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", ";", ...
Remove a photo from the set. @param photosetId The photoset ID @param photoId The photo ID @throws FlickrException
[ "Remove", "a", "photo", "from", "the", "set", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/photosets/PhotosetsInterface.java#L587-L598
artikcloud/artikcloud-java
src/main/java/cloud/artik/api/RulesApi.java
RulesApi.createRule
public RuleEnvelope createRule(RuleCreationInfo ruleInfo, String userId) throws ApiException { """ Create Rule Create a new Rule @param ruleInfo Rule object that needs to be added (required) @param userId User ID (required) @return RuleEnvelope @throws ApiException If fail to call the API, e.g. server error o...
java
public RuleEnvelope createRule(RuleCreationInfo ruleInfo, String userId) throws ApiException { ApiResponse<RuleEnvelope> resp = createRuleWithHttpInfo(ruleInfo, userId); return resp.getData(); }
[ "public", "RuleEnvelope", "createRule", "(", "RuleCreationInfo", "ruleInfo", ",", "String", "userId", ")", "throws", "ApiException", "{", "ApiResponse", "<", "RuleEnvelope", ">", "resp", "=", "createRuleWithHttpInfo", "(", "ruleInfo", ",", "userId", ")", ";", "ret...
Create Rule Create a new Rule @param ruleInfo Rule object that needs to be added (required) @param userId User ID (required) @return RuleEnvelope @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Create", "Rule", "Create", "a", "new", "Rule" ]
train
https://github.com/artikcloud/artikcloud-java/blob/412f447573e7796ab4f685c0bdd5eb76185a365c/src/main/java/cloud/artik/api/RulesApi.java#L133-L136
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java
AuthenticationApi.signOut
public ModelApiResponse signOut(String authorization, Boolean global) throws ApiException { """ Sign-out a logged in user Sign-out the current user and invalidate either the current token or all tokens associated with the user. @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oaut...
java
public ModelApiResponse signOut(String authorization, Boolean global) throws ApiException { ApiResponse<ModelApiResponse> resp = signOutWithHttpInfo(authorization, global); return resp.getData(); }
[ "public", "ModelApiResponse", "signOut", "(", "String", "authorization", ",", "Boolean", "global", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ModelApiResponse", ">", "resp", "=", "signOutWithHttpInfo", "(", "authorization", ",", "global", ")", ";", "...
Sign-out a logged in user Sign-out the current user and invalidate either the current token or all tokens associated with the user. @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/reference/authentication/Authentication/index.html#retrieveToken). For example: \&quot;Author...
[ "Sign", "-", "out", "a", "logged", "in", "user", "Sign", "-", "out", "the", "current", "user", "and", "invalidate", "either", "the", "current", "token", "or", "all", "tokens", "associated", "with", "the", "user", "." ]
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java#L1328-L1331
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java
CPOptionValuePersistenceImpl.findByUUID_G
@Override public CPOptionValue findByUUID_G(String uuid, long groupId) throws NoSuchCPOptionValueException { """ Returns the cp option value where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPOptionValueException} if it could not be found. @param uuid the uuid @param groupId the group ID @re...
java
@Override public CPOptionValue findByUUID_G(String uuid, long groupId) throws NoSuchCPOptionValueException { CPOptionValue cpOptionValue = fetchByUUID_G(uuid, groupId); if (cpOptionValue == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("uuid="); ...
[ "@", "Override", "public", "CPOptionValue", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPOptionValueException", "{", "CPOptionValue", "cpOptionValue", "=", "fetchByUUID_G", "(", "uuid", ",", "groupId", ")", ";", "if", "(",...
Returns the cp option value where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchCPOptionValueException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching cp option value @throws NoSuchCPOptionValueException if a matching cp option value could not be found
[ "Returns", "the", "cp", "option", "value", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPOptionValueException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java#L664-L690
apache/incubator-gobblin
gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java
MRCompactor.runCompactionForDataset
private void runCompactionForDataset(Dataset dataset, boolean proceed) { """ Run compaction job for a {@link Dataset}. @param dataset The input {@link Dataset} to run compaction for. @param proceed Whether the compaction job is permitted to publish data. If data completeness verification is enabled and the st...
java
private void runCompactionForDataset(Dataset dataset, boolean proceed) { LOG.info("Running compaction for dataset " + dataset); try { MRCompactorJobRunner jobRunner = getMRCompactorJobRunner(dataset); this.jobRunnables.put(dataset, jobRunner); if (proceed) { jobRunner.proceed(); ...
[ "private", "void", "runCompactionForDataset", "(", "Dataset", "dataset", ",", "boolean", "proceed", ")", "{", "LOG", ".", "info", "(", "\"Running compaction for dataset \"", "+", "dataset", ")", ";", "try", "{", "MRCompactorJobRunner", "jobRunner", "=", "getMRCompac...
Run compaction job for a {@link Dataset}. @param dataset The input {@link Dataset} to run compaction for. @param proceed Whether the compaction job is permitted to publish data. If data completeness verification is enabled and the status of the inputFolder is UNVERIFIED, 'proceed' should be set to false. Otherwise it ...
[ "Run", "compaction", "job", "for", "a", "{", "@link", "Dataset", "}", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java#L807-L820
wcm-io/wcm-io-tooling
maven/plugins/wcmio-content-package-maven-plugin/src/main/java/io/wcm/maven/plugins/contentpackage/DownloadMojo.java
DownloadMojo.deleteDirectoryWithRetries
private boolean deleteDirectoryWithRetries(File directory, int retryCount) { """ Delete fails sometimes or may be blocked by an editor - give it some time to try again (max. 1 sec). """ if (retryCount > 100) { return false; } if (FileUtils.deleteQuietly(directory)) { return true; } ...
java
private boolean deleteDirectoryWithRetries(File directory, int retryCount) { if (retryCount > 100) { return false; } if (FileUtils.deleteQuietly(directory)) { return true; } else { try { Thread.sleep(10); } catch (InterruptedException ex) { // ignore ...
[ "private", "boolean", "deleteDirectoryWithRetries", "(", "File", "directory", ",", "int", "retryCount", ")", "{", "if", "(", "retryCount", ">", "100", ")", "{", "return", "false", ";", "}", "if", "(", "FileUtils", ".", "deleteQuietly", "(", "directory", ")",...
Delete fails sometimes or may be blocked by an editor - give it some time to try again (max. 1 sec).
[ "Delete", "fails", "sometimes", "or", "may", "be", "blocked", "by", "an", "editor", "-", "give", "it", "some", "time", "to", "try", "again", "(", "max", ".", "1", "sec", ")", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/maven/plugins/wcmio-content-package-maven-plugin/src/main/java/io/wcm/maven/plugins/contentpackage/DownloadMojo.java#L158-L174
minio/minio-java
api/src/main/java/io/minio/MinioClient.java
MinioClient.setBucketPolicy
public void setBucketPolicy(String bucketName, String policy) throws InvalidBucketNameException, InvalidObjectPrefixException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalExc...
java
public void setBucketPolicy(String bucketName, String policy) throws InvalidBucketNameException, InvalidObjectPrefixException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalExc...
[ "public", "void", "setBucketPolicy", "(", "String", "bucketName", ",", "String", "policy", ")", "throws", "InvalidBucketNameException", ",", "InvalidObjectPrefixException", ",", "NoSuchAlgorithmException", ",", "InsufficientDataException", ",", "IOException", ",", "InvalidK...
Set JSON string of policy on given bucket. @param bucketName Bucket name. @param policy Bucket policy JSON string. </p><b>Example:</b><br> <pre>{@code StringBuilder builder = new StringBuilder(); builder.append("{\n"); builder.append(" \"Statement\": [\n"); builder.append(" {\n"); builder.append(" ...
[ "Set", "JSON", "string", "of", "policy", "on", "given", "bucket", "." ]
train
https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L4235-L4247
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectPropertyImpl_CustomFieldSerializer.java
OWLObjectPropertyImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectProperty instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.use...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLObjectProperty instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLObjectProperty", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLObjectPropertyImpl_CustomFieldSerializer.java#L84-L87
roboconf/roboconf-platform
core/roboconf-messaging-rabbitmq/src/main/java/net/roboconf/messaging/rabbitmq/internal/utils/RabbitMqUtils.java
RabbitMqUtils.configureFactory
public static void configureFactory( ConnectionFactory factory, Map<String,String> configuration ) throws IOException { """ Configures the connection factory with the right settings. @param factory the connection factory @param configuration the messaging configuration @throws IOException if something went wro...
java
public static void configureFactory( ConnectionFactory factory, Map<String,String> configuration ) throws IOException { final Logger logger = Logger.getLogger( RabbitMqUtils.class.getName()); logger.fine( "Configuring a connection factory for RabbitMQ." ); String messageServerIp = configuration.get( RABBITMQ_S...
[ "public", "static", "void", "configureFactory", "(", "ConnectionFactory", "factory", ",", "Map", "<", "String", ",", "String", ">", "configuration", ")", "throws", "IOException", "{", "final", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "RabbitMqUt...
Configures the connection factory with the right settings. @param factory the connection factory @param configuration the messaging configuration @throws IOException if something went wrong @see RabbitMqConstants
[ "Configures", "the", "connection", "factory", "with", "the", "right", "settings", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-rabbitmq/src/main/java/net/roboconf/messaging/rabbitmq/internal/utils/RabbitMqUtils.java#L87-L154
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.packEntry
public static void packEntry(File fileToPack, File destZipFile) { """ Compresses the given file into a ZIP file. <p> The ZIP file must not be a directory and its parent directory must exist. @param fileToPack file that needs to be zipped. @param destZipFile ZIP file that will be created or overwritten. ...
java
public static void packEntry(File fileToPack, File destZipFile) { packEntry(fileToPack, destZipFile, IdentityNameMapper.INSTANCE); }
[ "public", "static", "void", "packEntry", "(", "File", "fileToPack", ",", "File", "destZipFile", ")", "{", "packEntry", "(", "fileToPack", ",", "destZipFile", ",", "IdentityNameMapper", ".", "INSTANCE", ")", ";", "}" ]
Compresses the given file into a ZIP file. <p> The ZIP file must not be a directory and its parent directory must exist. @param fileToPack file that needs to be zipped. @param destZipFile ZIP file that will be created or overwritten.
[ "Compresses", "the", "given", "file", "into", "a", "ZIP", "file", ".", "<p", ">", "The", "ZIP", "file", "must", "not", "be", "a", "directory", "and", "its", "parent", "directory", "must", "exist", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L1443-L1445
Erudika/para
para-core/src/main/java/com/erudika/para/utils/RegistryUtils.java
RegistryUtils.getValue
public static Object getValue(String registryName, String key) { """ Retrieve one specific value from a registry. @param registryName the name of the registry. @param key the unique key corresponding to the value to retrieve (typically an appid). @return the value corresponding to the registry key, null if no v...
java
public static Object getValue(String registryName, String key) { Map<String, Object> registry = getRegistry(registryName); if (registry == null || StringUtils.isBlank(key)) { return null; } return registry.get(key); }
[ "public", "static", "Object", "getValue", "(", "String", "registryName", ",", "String", "key", ")", "{", "Map", "<", "String", ",", "Object", ">", "registry", "=", "getRegistry", "(", "registryName", ")", ";", "if", "(", "registry", "==", "null", "||", "...
Retrieve one specific value from a registry. @param registryName the name of the registry. @param key the unique key corresponding to the value to retrieve (typically an appid). @return the value corresponding to the registry key, null if no value is found for the specified key.
[ "Retrieve", "one", "specific", "value", "from", "a", "registry", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-core/src/main/java/com/erudika/para/utils/RegistryUtils.java#L65-L71
sundrio/sundrio
maven-plugin/src/main/java/io/sundr/maven/GenerateBomMojo.java
GenerateBomMojo.toBuild
private static MavenProject toBuild(MavenProject project, BomConfig config) { """ Returns the generated {@link org.apache.maven.project.MavenProject} to build. This version of the project contains all the stuff needed for building (parents, profiles, properties etc). @param project The source {@link org.apache...
java
private static MavenProject toBuild(MavenProject project, BomConfig config) { File outputDir = new File(project.getBuild().getOutputDirectory()); File bomDir = new File(outputDir, config.getArtifactId()); File generatedBom = new File(bomDir, BOM_NAME); MavenProject toBuild = project.clo...
[ "private", "static", "MavenProject", "toBuild", "(", "MavenProject", "project", ",", "BomConfig", "config", ")", "{", "File", "outputDir", "=", "new", "File", "(", "project", ".", "getBuild", "(", ")", ".", "getOutputDirectory", "(", ")", ")", ";", "File", ...
Returns the generated {@link org.apache.maven.project.MavenProject} to build. This version of the project contains all the stuff needed for building (parents, profiles, properties etc). @param project The source {@link org.apache.maven.project.MavenProject}. @param config The {@link io.sundr.maven.BomConfig}. @return...
[ "Returns", "the", "generated", "{", "@link", "org", ".", "apache", ".", "maven", ".", "project", ".", "MavenProject", "}", "to", "build", ".", "This", "version", "of", "the", "project", "contains", "all", "the", "stuff", "needed", "for", "building", "(", ...
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/maven-plugin/src/main/java/io/sundr/maven/GenerateBomMojo.java#L343-L386
alkacon/opencms-core
src/org/opencms/ugc/CmsUgcSession.java
CmsUgcSession.checkNotFinished
private void checkNotFinished() throws CmsUgcException { """ Checks that the session is not finished, and throws an exception otherwise.<p> @throws CmsUgcException if the session is finished """ if (m_finished) { String message = Messages.get().container(Messages.ERR_FORM_SESSION_ALREAD...
java
private void checkNotFinished() throws CmsUgcException { if (m_finished) { String message = Messages.get().container(Messages.ERR_FORM_SESSION_ALREADY_FINISHED_0).key( getCmsObject().getRequestContext().getLocale()); throw new CmsUgcException(CmsUgcConstants.ErrorCode.er...
[ "private", "void", "checkNotFinished", "(", ")", "throws", "CmsUgcException", "{", "if", "(", "m_finished", ")", "{", "String", "message", "=", "Messages", ".", "get", "(", ")", ".", "container", "(", "Messages", ".", "ERR_FORM_SESSION_ALREADY_FINISHED_0", ")", ...
Checks that the session is not finished, and throws an exception otherwise.<p> @throws CmsUgcException if the session is finished
[ "Checks", "that", "the", "session", "is", "not", "finished", "and", "throws", "an", "exception", "otherwise", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ugc/CmsUgcSession.java#L688-L695
jmrozanec/cron-utils
src/main/java/com/cronutils/descriptor/CronDescriptor.java
CronDescriptor.describeHHmmss
public String describeHHmmss(final Map<CronFieldName, CronField> fields) { """ Provide description for hours, minutes and seconds. @param fields - fields to describe; @return description - String """ return DescriptionStrategyFactory.hhMMssInstance( resourceBundle, f...
java
public String describeHHmmss(final Map<CronFieldName, CronField> fields) { return DescriptionStrategyFactory.hhMMssInstance( resourceBundle, fields.containsKey(CronFieldName.HOUR) ? fields.get(CronFieldName.HOUR).getExpression() : null, fields.containsKey(CronFiel...
[ "public", "String", "describeHHmmss", "(", "final", "Map", "<", "CronFieldName", ",", "CronField", ">", "fields", ")", "{", "return", "DescriptionStrategyFactory", ".", "hhMMssInstance", "(", "resourceBundle", ",", "fields", ".", "containsKey", "(", "CronFieldName",...
Provide description for hours, minutes and seconds. @param fields - fields to describe; @return description - String
[ "Provide", "description", "for", "hours", "minutes", "and", "seconds", "." ]
train
https://github.com/jmrozanec/cron-utils/blob/adac5ec8fd9160b082f9762a6eedea0715731170/src/main/java/com/cronutils/descriptor/CronDescriptor.java#L79-L86
dlemmermann/CalendarFX
CalendarFXView/src/main/java/com/calendarfx/view/DateControl.java
DateControl.setEntryDetailsCallback
public final void setEntryDetailsCallback(Callback<EntryDetailsParameter, Boolean> callback) { """ Sets the value of {@link #entryDetailsCallbackProperty()}. @param callback the entry details callback """ requireNonNull(callback); entryDetailsCallbackProperty().set(callback); }
java
public final void setEntryDetailsCallback(Callback<EntryDetailsParameter, Boolean> callback) { requireNonNull(callback); entryDetailsCallbackProperty().set(callback); }
[ "public", "final", "void", "setEntryDetailsCallback", "(", "Callback", "<", "EntryDetailsParameter", ",", "Boolean", ">", "callback", ")", "{", "requireNonNull", "(", "callback", ")", ";", "entryDetailsCallbackProperty", "(", ")", ".", "set", "(", "callback", ")",...
Sets the value of {@link #entryDetailsCallbackProperty()}. @param callback the entry details callback
[ "Sets", "the", "value", "of", "{", "@link", "#entryDetailsCallbackProperty", "()", "}", "." ]
train
https://github.com/dlemmermann/CalendarFX/blob/f2b91c2622c3f29d004485b6426b23b86c331f96/CalendarFXView/src/main/java/com/calendarfx/view/DateControl.java#L1652-L1655
aws/aws-sdk-java
aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/model/GetPlatformApplicationAttributesResult.java
GetPlatformApplicationAttributesResult.withAttributes
public GetPlatformApplicationAttributesResult withAttributes(java.util.Map<String, String> attributes) { """ <p> Attributes include the following: </p> <ul> <li> <p> <code>EventEndpointCreated</code> – Topic ARN to which EndpointCreated event notifications should be sent. </p> </li> <li> <p> <code>Event...
java
public GetPlatformApplicationAttributesResult withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
[ "public", "GetPlatformApplicationAttributesResult", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
<p> Attributes include the following: </p> <ul> <li> <p> <code>EventEndpointCreated</code> – Topic ARN to which EndpointCreated event notifications should be sent. </p> </li> <li> <p> <code>EventEndpointDeleted</code> – Topic ARN to which EndpointDeleted event notifications should be sent. </p> </li> <li> <p> <code>Eve...
[ "<p", ">", "Attributes", "include", "the", "following", ":", "<", "/", "p", ">", "<ul", ">", "<li", ">", "<p", ">", "<code", ">", "EventEndpointCreated<", "/", "code", ">", "–", "Topic", "ARN", "to", "which", "EndpointCreated", "event", "notifications", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-sns/src/main/java/com/amazonaws/services/sns/model/GetPlatformApplicationAttributesResult.java#L235-L238
wcm-io-caravan/caravan-hal
resource/src/main/java/io/wcm/caravan/hal/resource/HalResource.java
HalResource.collectEmbedded
public List<HalResource> collectEmbedded(String rel) { """ recursively collects embedded resources of a specific rel @param rel the relation your interested in @return a list of all embedded resources """ return collectResources(HalResource.class, HalResourceType.EMBEDDED, rel); }
java
public List<HalResource> collectEmbedded(String rel) { return collectResources(HalResource.class, HalResourceType.EMBEDDED, rel); }
[ "public", "List", "<", "HalResource", ">", "collectEmbedded", "(", "String", "rel", ")", "{", "return", "collectResources", "(", "HalResource", ".", "class", ",", "HalResourceType", ".", "EMBEDDED", ",", "rel", ")", ";", "}" ]
recursively collects embedded resources of a specific rel @param rel the relation your interested in @return a list of all embedded resources
[ "recursively", "collects", "embedded", "resources", "of", "a", "specific", "rel" ]
train
https://github.com/wcm-io-caravan/caravan-hal/blob/25d58756b58c70c8c48a17fe781e673dd93d5085/resource/src/main/java/io/wcm/caravan/hal/resource/HalResource.java#L251-L253
amplexus/java-flac-encoder
src/main/java/net/sourceforge/javaflacencoder/EncodedElement.java
EncodedElement.addLong
public EncodedElement addLong(long input, int bitCount) { """ Add a number of bits from a long to the end of this list's data. Will add a new element if necessary. The bits stored are taken from the lower- order of input. @param input Long containing bits to append to end. @param bitCount Number of bits to a...
java
public EncodedElement addLong(long input, int bitCount) { if(next != null) { EncodedElement end = EncodedElement.getEnd_S(next); return end.addLong(input, bitCount); } else if(data.length*8 <= usableBits+bitCount) { //create child and attach to next. //Set child's offset appropriatel...
[ "public", "EncodedElement", "addLong", "(", "long", "input", ",", "int", "bitCount", ")", "{", "if", "(", "next", "!=", "null", ")", "{", "EncodedElement", "end", "=", "EncodedElement", ".", "getEnd_S", "(", "next", ")", ";", "return", "end", ".", "addLo...
Add a number of bits from a long to the end of this list's data. Will add a new element if necessary. The bits stored are taken from the lower- order of input. @param input Long containing bits to append to end. @param bitCount Number of bits to append. @return EncodedElement which actually contains the appended value...
[ "Add", "a", "number", "of", "bits", "from", "a", "long", "to", "the", "end", "of", "this", "list", "s", "data", ".", "Will", "add", "a", "new", "element", "if", "necessary", ".", "The", "bits", "stored", "are", "taken", "from", "the", "lower", "-", ...
train
https://github.com/amplexus/java-flac-encoder/blob/3d536b877dee2a3fd4ab2e0d9569e292cae93bc9/src/main/java/net/sourceforge/javaflacencoder/EncodedElement.java#L293-L315
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Env.java
Env.openDbi
public Dbi<T> openDbi(final String name, final DbiFlags... flags) { """ Convenience method that opens a {@link Dbi} with a UTF-8 database name. @param name name of the database (or null if no name is required) @param flags to open the database with @return a database that is ready to use """ final by...
java
public Dbi<T> openDbi(final String name, final DbiFlags... flags) { final byte[] nameBytes = name == null ? null : name.getBytes(UTF_8); return openDbi(nameBytes, flags); }
[ "public", "Dbi", "<", "T", ">", "openDbi", "(", "final", "String", "name", ",", "final", "DbiFlags", "...", "flags", ")", "{", "final", "byte", "[", "]", "nameBytes", "=", "name", "==", "null", "?", "null", ":", "name", ".", "getBytes", "(", "UTF_8",...
Convenience method that opens a {@link Dbi} with a UTF-8 database name. @param name name of the database (or null if no name is required) @param flags to open the database with @return a database that is ready to use
[ "Convenience", "method", "that", "opens", "a", "{", "@link", "Dbi", "}", "with", "a", "UTF", "-", "8", "database", "name", "." ]
train
https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/Env.java#L262-L265
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java
CPOptionValuePersistenceImpl.findAll
@Override public List<CPOptionValue> findAll(int start, int end) { """ Returns a range of all the cp option values. <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. Thu...
java
@Override public List<CPOptionValue> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CPOptionValue", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the cp option values. <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 result in the set. Setting both <code>star...
[ "Returns", "a", "range", "of", "all", "the", "cp", "option", "values", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java#L4268-L4271
scribejava/scribejava
scribejava-apis/src/main/java/com/github/scribejava/apis/facebook/FacebookAccessTokenJsonExtractor.java
FacebookAccessTokenJsonExtractor.generateError
@Override public void generateError(String response) { """ non standard. examples:<br> '{"error":{"message":"This authorization code has been used.","type":"OAuthException","code":100,"fbtrace_id":"DtxvtGRaxbB"}}'<br> '{"error":{"message":"Error validating application. Invalid application ID.","type":"...
java
@Override public void generateError(String response) { extractParameter(response, MESSAGE_REGEX_PATTERN, false); throw new FacebookAccessTokenErrorResponse(extractParameter(response, MESSAGE_REGEX_PATTERN, false), extractParameter(response, TYPE_REGEX_PATTERN, false), ...
[ "@", "Override", "public", "void", "generateError", "(", "String", "response", ")", "{", "extractParameter", "(", "response", ",", "MESSAGE_REGEX_PATTERN", ",", "false", ")", ";", "throw", "new", "FacebookAccessTokenErrorResponse", "(", "extractParameter", "(", "res...
non standard. examples:<br> '{"error":{"message":"This authorization code has been used.","type":"OAuthException","code":100,"fbtrace_id":"DtxvtGRaxbB"}}'<br> '{"error":{"message":"Error validating application. Invalid application ID.","type":"OAuthException","code":101,"fbtrace_id":"CvDR+X4WWIx"}}'
[ "non", "standard", ".", "examples", ":", "<br", ">" ]
train
https://github.com/scribejava/scribejava/blob/030d76872fe371a84b5d05c6c3c33c34e8f611f1/scribejava-apis/src/main/java/com/github/scribejava/apis/facebook/FacebookAccessTokenJsonExtractor.java#L37-L45
microfocus-idol/java-configuration-impl
src/main/java/com/hp/autonomy/frontend/configuration/server/HostAndPort.java
HostAndPort.basicValidate
@Override public void basicValidate(final String section) throws ConfigException { """ Returns the validation state of the config @throws ConfigException if the hostname is empty or the port is not between 0 and 65536 """ if (StringUtils.isEmpty(host) || port == null || port <= 0 || port > MAX_P...
java
@Override public void basicValidate(final String section) throws ConfigException { if (StringUtils.isEmpty(host) || port == null || port <= 0 || port > MAX_PORT) { throw new ConfigException(section, "Invalid host and port"); } }
[ "@", "Override", "public", "void", "basicValidate", "(", "final", "String", "section", ")", "throws", "ConfigException", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "host", ")", "||", "port", "==", "null", "||", "port", "<=", "0", "||", "port", "...
Returns the validation state of the config @throws ConfigException if the hostname is empty or the port is not between 0 and 65536
[ "Returns", "the", "validation", "state", "of", "the", "config" ]
train
https://github.com/microfocus-idol/java-configuration-impl/blob/cd9d744cacfaaae3c76cacc211e65742bbc7b00a/src/main/java/com/hp/autonomy/frontend/configuration/server/HostAndPort.java#L35-L40
saxsys/SynchronizeFX
synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/CommandListCreator.java
CommandListCreator.commandsForDomainModel
public void commandsForDomainModel(final Object root, final CommandsForDomainModelCallback callback) { """ @see MetaModel#commandsForDomainModel() @param root The root object of the domain model. @param callback The callback that takes the commands necessary to rebuild the domain model at it's current state....
java
public void commandsForDomainModel(final Object root, final CommandsForDomainModelCallback callback) { final State state = createCommandList(new WithCommandType() { @Override public void invoke(final State state) { createObservableObject(root, state); } ...
[ "public", "void", "commandsForDomainModel", "(", "final", "Object", "root", ",", "final", "CommandsForDomainModelCallback", "callback", ")", "{", "final", "State", "state", "=", "createCommandList", "(", "new", "WithCommandType", "(", ")", "{", "@", "Override", "p...
@see MetaModel#commandsForDomainModel() @param root The root object of the domain model. @param callback The callback that takes the commands necessary to rebuild the domain model at it's current state.
[ "@see", "MetaModel#commandsForDomainModel", "()" ]
train
https://github.com/saxsys/SynchronizeFX/blob/f3683020e4749110b38514eb5bc73a247998b579/synchronizefx-core/src/main/java/de/saxsys/synchronizefx/core/metamodel/CommandListCreator.java#L98-L112
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/WriteExcelUtils.java
WriteExcelUtils.writeWorkBookToExcel
public static void writeWorkBookToExcel(Workbook workbook, OutputStream os) throws WriteExcelException { """ 将指定WorkBook写入指定文件中 @param workbook 指定工作簿 @param os 指定输出流,需要手动关闭 @throws WriteExcelException 出现I/O异常抛出 """ try { workbook.write(os); } catch (IOException e) { ...
java
public static void writeWorkBookToExcel(Workbook workbook, OutputStream os) throws WriteExcelException { try { workbook.write(os); } catch (IOException e) { throw new WriteExcelException(e.getMessage()); } }
[ "public", "static", "void", "writeWorkBookToExcel", "(", "Workbook", "workbook", ",", "OutputStream", "os", ")", "throws", "WriteExcelException", "{", "try", "{", "workbook", ".", "write", "(", "os", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{",...
将指定WorkBook写入指定文件中 @param workbook 指定工作簿 @param os 指定输出流,需要手动关闭 @throws WriteExcelException 出现I/O异常抛出
[ "将指定WorkBook写入指定文件中" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/WriteExcelUtils.java#L364-L370
ysc/word
src/main/java/org/apdplat/word/util/AutoDetector.java
AutoDetector.loadClasspathResource
private static List<String> loadClasspathResource(String resource, ResourceLoader resourceLoader, String resourcePaths) throws IOException { """ 加载类路径资源 @param resource 资源名称 @param resourceLoader 资源自定义加载逻辑 @param resourcePaths 资源的所有路径,用于资源监控 @return 资源内容 @throws IOException """ List<String> result...
java
private static List<String> loadClasspathResource(String resource, ResourceLoader resourceLoader, String resourcePaths) throws IOException{ List<String> result = new ArrayList<>(); LOGGER.info("类路径资源:"+resource); Enumeration<URL> ps = AutoDetector.class.getClassLoader().getResources(resource); ...
[ "private", "static", "List", "<", "String", ">", "loadClasspathResource", "(", "String", "resource", ",", "ResourceLoader", "resourceLoader", ",", "String", "resourcePaths", ")", "throws", "IOException", "{", "List", "<", "String", ">", "result", "=", "new", "Ar...
加载类路径资源 @param resource 资源名称 @param resourceLoader 资源自定义加载逻辑 @param resourcePaths 资源的所有路径,用于资源监控 @return 资源内容 @throws IOException
[ "加载类路径资源" ]
train
https://github.com/ysc/word/blob/5e45607f4e97207f55d1e3bc561abda6b34f7c54/src/main/java/org/apdplat/word/util/AutoDetector.java#L112-L137
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/util/ExtractorUtils.java
ExtractorUtils.daysBetween
private static long daysBetween(Date date1, Date date2) { """ Naive implementation of the difference in days between two dates """ long diff; if (date2.after(date1)) { diff = date2.getTime() - date1.getTime(); } else { diff = date1.getTime() - date2.getTime(); ...
java
private static long daysBetween(Date date1, Date date2) { long diff; if (date2.after(date1)) { diff = date2.getTime() - date1.getTime(); } else { diff = date1.getTime() - date2.getTime(); } return diff / (24 * 60 * 60 * 1000); }
[ "private", "static", "long", "daysBetween", "(", "Date", "date1", ",", "Date", "date2", ")", "{", "long", "diff", ";", "if", "(", "date2", ".", "after", "(", "date1", ")", ")", "{", "diff", "=", "date2", ".", "getTime", "(", ")", "-", "date1", ".",...
Naive implementation of the difference in days between two dates
[ "Naive", "implementation", "of", "the", "difference", "in", "days", "between", "two", "dates" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L394-L402