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
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageMiscOps.java
ImageMiscOps.fillUniform
public static void fillUniform(GrayS64 img, Random rand , long min , long max) { """ Sets each value in the image to a value drawn from an uniform distribution that has a range of min ≤ X < max. @param img Image which is to be filled. Modified, @param rand Random number generator @param min Minimum val...
java
public static void fillUniform(GrayS64 img, Random rand , long min , long max) { long range = max-min; long[] data = img.data; for (int y = 0; y < img.height; y++) { int index = img.getStartIndex() + y * img.getStride(); for (int x = 0; x < img.width; x++) { data[index++] = rand.nextInt((int)range)+mi...
[ "public", "static", "void", "fillUniform", "(", "GrayS64", "img", ",", "Random", "rand", ",", "long", "min", ",", "long", "max", ")", "{", "long", "range", "=", "max", "-", "min", ";", "long", "[", "]", "data", "=", "img", ".", "data", ";", "for", ...
Sets each value in the image to a value drawn from an uniform distribution that has a range of min &le; X &lt; max. @param img Image which is to be filled. Modified, @param rand Random number generator @param min Minimum value of the distribution, inclusive @param max Maximum value of the distribution, exclusive
[ "Sets", "each", "value", "in", "the", "image", "to", "a", "value", "drawn", "from", "an", "uniform", "distribution", "that", "has", "a", "range", "of", "min", "&le", ";", "X", "&lt", ";", "max", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageMiscOps.java#L1916-L1927
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/bolt/AmBaseBolt.java
AmBaseBolt.prepare
@SuppressWarnings("rawtypes") @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { """ Initialize method called after extracted for worker processes.<br> <br> Initialize task id. @param stormConf Storm configuration @param context Topology context @param...
java
@SuppressWarnings("rawtypes") @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { super.prepare(stormConf, context, collector); this.taskId = context.getThisComponentId() + "_" + context.getThisTaskId(); if (this.reloadConfig) ...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "@", "Override", "public", "void", "prepare", "(", "Map", "stormConf", ",", "TopologyContext", "context", ",", "OutputCollector", "collector", ")", "{", "super", ".", "prepare", "(", "stormConf", ",", "context",...
Initialize method called after extracted for worker processes.<br> <br> Initialize task id. @param stormConf Storm configuration @param context Topology context @param collector SpoutOutputCollector
[ "Initialize", "method", "called", "after", "extracted", "for", "worker", "processes", ".", "<br", ">", "<br", ">", "Initialize", "task", "id", "." ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/bolt/AmBaseBolt.java#L97-L119
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/jni/SerialInterrupt.java
SerialInterrupt.onDataReceiveCallback
private static void onDataReceiveCallback(int fileDescriptor, byte[] data) { """ <p> This method is provided as the callback handler for the Pi4J native library to invoke when a GPIO interrupt is detected. This method should not be called from any Java consumers. (Thus is is marked as a private method.) </p> ...
java
private static void onDataReceiveCallback(int fileDescriptor, byte[] data) { // notify event listeners if(listeners.containsKey(fileDescriptor)){ SerialInterruptListener listener = listeners.get(fileDescriptor); if(listener != null) { SerialInterruptEvent event =...
[ "private", "static", "void", "onDataReceiveCallback", "(", "int", "fileDescriptor", ",", "byte", "[", "]", "data", ")", "{", "// notify event listeners", "if", "(", "listeners", ".", "containsKey", "(", "fileDescriptor", ")", ")", "{", "SerialInterruptListener", "...
<p> This method is provided as the callback handler for the Pi4J native library to invoke when a GPIO interrupt is detected. This method should not be called from any Java consumers. (Thus is is marked as a private method.) </p> @param fileDescriptor the serial file descriptor/handle //@param data byte array of data r...
[ "<p", ">", "This", "method", "is", "provided", "as", "the", "callback", "handler", "for", "the", "Pi4J", "native", "library", "to", "invoke", "when", "a", "GPIO", "interrupt", "is", "detected", ".", "This", "method", "should", "not", "be", "called", "from"...
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/jni/SerialInterrupt.java#L102-L114
Alluxio/alluxio
minicluster/src/main/java/alluxio/multi/process/MultiProcessCluster.java
MultiProcessCluster.updateMasterConf
public synchronized void updateMasterConf(PropertyKey key, @Nullable String value) { """ Updates master configuration for all masters. This will take effect on a master the next time the master is started. @param key the key to update @param value the value to set, or null to unset the key """ mMaster...
java
public synchronized void updateMasterConf(PropertyKey key, @Nullable String value) { mMasters.forEach(master -> master.updateConf(key, value)); }
[ "public", "synchronized", "void", "updateMasterConf", "(", "PropertyKey", "key", ",", "@", "Nullable", "String", "value", ")", "{", "mMasters", ".", "forEach", "(", "master", "->", "master", ".", "updateConf", "(", "key", ",", "value", ")", ")", ";", "}" ]
Updates master configuration for all masters. This will take effect on a master the next time the master is started. @param key the key to update @param value the value to set, or null to unset the key
[ "Updates", "master", "configuration", "for", "all", "masters", ".", "This", "will", "take", "effect", "on", "a", "master", "the", "next", "time", "the", "master", "is", "started", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/minicluster/src/main/java/alluxio/multi/process/MultiProcessCluster.java#L478-L480
aNNiMON/Lightweight-Stream-API
stream/src/main/java/com/annimon/stream/ComparatorCompat.java
ComparatorCompat.thenComparing
@NotNull public static <T> Comparator<T> thenComparing( @NotNull final Comparator<? super T> c1, @NotNull final Comparator<? super T> c2) { """ Returns a comparator that uses {@code c2} comparator if {@code c1} comparator considers two elements equal. @param <T> the type of the obje...
java
@NotNull public static <T> Comparator<T> thenComparing( @NotNull final Comparator<? super T> c1, @NotNull final Comparator<? super T> c2) { Objects.requireNonNull(c1); Objects.requireNonNull(c2); return new Comparator<T>() { @Override public i...
[ "@", "NotNull", "public", "static", "<", "T", ">", "Comparator", "<", "T", ">", "thenComparing", "(", "@", "NotNull", "final", "Comparator", "<", "?", "super", "T", ">", "c1", ",", "@", "NotNull", "final", "Comparator", "<", "?", "super", "T", ">", "...
Returns a comparator that uses {@code c2} comparator if {@code c1} comparator considers two elements equal. @param <T> the type of the objects compared by the comparators @param c1 a first comparator @param c2 a second comparator @return a comparator @throws NullPointerException if {@code c1} or {@code c2} is null
[ "Returns", "a", "comparator", "that", "uses", "{", "@code", "c2", "}", "comparator", "if", "{", "@code", "c1", "}", "comparator", "considers", "two", "elements", "equal", "." ]
train
https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/ComparatorCompat.java#L84-L98
radkovo/Pdf2Dom
src/main/java/org/fit/pdfdom/PDFDomTree.java
PDFDomTree.createLineElement
protected Element createLineElement(float x1, float y1, float x2, float y2) { """ Create an element that represents a horizntal or vertical line. @param x1 @param y1 @param x2 @param y2 @return the created DOM element """ HtmlDivLine line = new HtmlDivLine(x1, y1, x2, y2); String color = c...
java
protected Element createLineElement(float x1, float y1, float x2, float y2) { HtmlDivLine line = new HtmlDivLine(x1, y1, x2, y2); String color = colorString(getGraphicsState().getStrokingColor()); StringBuilder pstyle = new StringBuilder(50); pstyle.append("left:").append(style.form...
[ "protected", "Element", "createLineElement", "(", "float", "x1", ",", "float", "y1", ",", "float", "x2", ",", "float", "y2", ")", "{", "HtmlDivLine", "line", "=", "new", "HtmlDivLine", "(", "x1", ",", "y1", ",", "x2", ",", "y2", ")", ";", "String", "...
Create an element that represents a horizntal or vertical line. @param x1 @param y1 @param x2 @param y2 @return the created DOM element
[ "Create", "an", "element", "that", "represents", "a", "horizntal", "or", "vertical", "line", "." ]
train
https://github.com/radkovo/Pdf2Dom/blob/12e52b80eca7f57fc41e6ed895bf1db72c38da53/src/main/java/org/fit/pdfdom/PDFDomTree.java#L379-L398
percolate/caffeine
caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java
ViewUtils.setText
public static void setText(View parentView, int field, String text) { """ Method used to set text for a TextView. @param parentView The View used to call findViewId() on. @param field R.id.xxxx value for the text field. @param text Text to place in the text field. """ View view = parent...
java
public static void setText(View parentView, int field, String text) { View view = parentView.findViewById(field); if (view instanceof TextView) { ((TextView) view).setText(text); } else { Log.e("Caffeine", "ViewUtils.setText() given a field that is not a TextView"); ...
[ "public", "static", "void", "setText", "(", "View", "parentView", ",", "int", "field", ",", "String", "text", ")", "{", "View", "view", "=", "parentView", ".", "findViewById", "(", "field", ")", ";", "if", "(", "view", "instanceof", "TextView", ")", "{",...
Method used to set text for a TextView. @param parentView The View used to call findViewId() on. @param field R.id.xxxx value for the text field. @param text Text to place in the text field.
[ "Method", "used", "to", "set", "text", "for", "a", "TextView", "." ]
train
https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/ViewUtils.java#L217-L224
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectCalendarWeek.java
ProjectCalendarWeek.setWorkingDay
public void setWorkingDay(Day day, boolean working) { """ convenience method for setting working or non-working days. @param day required day @param working flag indicating if the day is a working day """ setWorkingDay(day, (working ? DayType.WORKING : DayType.NON_WORKING)); }
java
public void setWorkingDay(Day day, boolean working) { setWorkingDay(day, (working ? DayType.WORKING : DayType.NON_WORKING)); }
[ "public", "void", "setWorkingDay", "(", "Day", "day", ",", "boolean", "working", ")", "{", "setWorkingDay", "(", "day", ",", "(", "working", "?", "DayType", ".", "WORKING", ":", "DayType", ".", "NON_WORKING", ")", ")", ";", "}" ]
convenience method for setting working or non-working days. @param day required day @param working flag indicating if the day is a working day
[ "convenience", "method", "for", "setting", "working", "or", "non", "-", "working", "days", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendarWeek.java#L294-L297
motown-io/motown
chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java
DomainService.deleteConnector
public void deleteConnector(Long chargingStationTypeId, Long evseId, Long id) { """ Delete a connector. @param id the id of the entity to delete. """ ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); Evse evse = getEvseById(chargingStatio...
java
public void deleteConnector(Long chargingStationTypeId, Long evseId, Long id) { ChargingStationType chargingStationType = chargingStationTypeRepository.findOne(chargingStationTypeId); Evse evse = getEvseById(chargingStationType, evseId); Connector connector = getConnectorById(evse, id); ...
[ "public", "void", "deleteConnector", "(", "Long", "chargingStationTypeId", ",", "Long", "evseId", ",", "Long", "id", ")", "{", "ChargingStationType", "chargingStationType", "=", "chargingStationTypeRepository", ".", "findOne", "(", "chargingStationTypeId", ")", ";", "...
Delete a connector. @param id the id of the entity to delete.
[ "Delete", "a", "connector", "." ]
train
https://github.com/motown-io/motown/blob/783ccda7c28b273a529ddd47defe8673b1ea365b/chargingstation-configuration/view-model/src/main/java/io/motown/chargingstationconfiguration/viewmodel/domain/DomainService.java#L256-L264
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.sqltimestampdiff
public static void sqltimestampdiff(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { """ time stamp diff @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens """ if (parsedArgs.size() != 3) { throw new P...
java
public static void sqltimestampdiff(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { if (parsedArgs.size() != 3) { throw new PSQLException( GT.tr("{0} function takes three and only three arguments.", "timestampdiff"), PSQLState.SYNTAX_ERROR); } buf....
[ "public", "static", "void", "sqltimestampdiff", "(", "StringBuilder", "buf", ",", "List", "<", "?", "extends", "CharSequence", ">", "parsedArgs", ")", "throws", "SQLException", "{", "if", "(", "parsedArgs", ".", "size", "(", ")", "!=", "3", ")", "{", "thro...
time stamp diff @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens
[ "time", "stamp", "diff" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L567-L580
alexvasilkov/GestureViews
library/src/main/java/com/alexvasilkov/gestures/GestureControllerForPager.java
GestureControllerForPager.scrollBy
private float scrollBy(@NonNull MotionEvent event, float dx) { """ /* Scrolls ViewPager if view reached bounds. Returns distance at which view can be actually scrolled. Here we will split given distance (dX) into movement of ViewPager and movement of view itself. """ if (isSkipViewPager || isViewPag...
java
private float scrollBy(@NonNull MotionEvent event, float dx) { if (isSkipViewPager || isViewPagerDisabled) { return dx; } final State state = getState(); getStateController().getMovementArea(state, tmpRectF); float pagerDx = splitPagerScroll(dx, state, tmpRectF); ...
[ "private", "float", "scrollBy", "(", "@", "NonNull", "MotionEvent", "event", ",", "float", "dx", ")", "{", "if", "(", "isSkipViewPager", "||", "isViewPagerDisabled", ")", "{", "return", "dx", ";", "}", "final", "State", "state", "=", "getState", "(", ")", ...
/* Scrolls ViewPager if view reached bounds. Returns distance at which view can be actually scrolled. Here we will split given distance (dX) into movement of ViewPager and movement of view itself.
[ "/", "*", "Scrolls", "ViewPager", "if", "view", "reached", "bounds", ".", "Returns", "distance", "at", "which", "view", "can", "be", "actually", "scrolled", ".", "Here", "we", "will", "split", "given", "distance", "(", "dX", ")", "into", "movement", "of", ...
train
https://github.com/alexvasilkov/GestureViews/blob/f0a4c266e31dcad23bd0d9013531bc1c501b9c9f/library/src/main/java/com/alexvasilkov/gestures/GestureControllerForPager.java#L220-L242
UrielCh/ovh-java-sdk
ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java
ApiOvhSms.serviceName_templatesControl_name_relaunchValidation_POST
public void serviceName_templatesControl_name_relaunchValidation_POST(String serviceName, String name, String description, String message) throws IOException { """ Attempt a new validation after moderation refusal REST: POST /sms/{serviceName}/templatesControl/{name}/relaunchValidation @param description [requ...
java
public void serviceName_templatesControl_name_relaunchValidation_POST(String serviceName, String name, String description, String message) throws IOException { String qPath = "/sms/{serviceName}/templatesControl/{name}/relaunchValidation"; StringBuilder sb = path(qPath, serviceName, name); HashMap<String, Object>...
[ "public", "void", "serviceName_templatesControl_name_relaunchValidation_POST", "(", "String", "serviceName", ",", "String", "name", ",", "String", "description", ",", "String", "message", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/sms/{serviceName}/tem...
Attempt a new validation after moderation refusal REST: POST /sms/{serviceName}/templatesControl/{name}/relaunchValidation @param description [required] Template description @param message [required] Message pattern to be moderated. Use "#VALUE#" format for dynamic text area @param serviceName [required] The internal ...
[ "Attempt", "a", "new", "validation", "after", "moderation", "refusal" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-sms/src/main/java/net/minidev/ovh/api/ApiOvhSms.java#L1649-L1656
liyiorg/weixin-popular
src/main/java/weixin/popular/api/MediaAPI.java
MediaAPI.mediaUpload
public static Media mediaUpload(String access_token,MediaType mediaType,File media) { """ 新增临时素材 媒体文件在后台保存时间为3天,即3天后media_id失效。 @param access_token access_token @param mediaType mediaType @param media 多媒体文件有格式和大小限制,如下: 图片(image): 2M,支持bmp/png/jpeg/jpg/gif格式 语音(voice):2M,播放长度不超过60s,支持AMR\MP3格式 视频(video):10...
java
public static Media mediaUpload(String access_token,MediaType mediaType,File media){ HttpPost httpPost = new HttpPost(BASE_URI+"/cgi-bin/media/upload"); FileBody bin = new FileBody(media); HttpEntity reqEntity = MultipartEntityBuilder.create() .addPart("media", bin) .addTextBody(...
[ "public", "static", "Media", "mediaUpload", "(", "String", "access_token", ",", "MediaType", "mediaType", ",", "File", "media", ")", "{", "HttpPost", "httpPost", "=", "new", "HttpPost", "(", "BASE_URI", "+", "\"/cgi-bin/media/upload\"", ")", ";", "FileBody", "bi...
新增临时素材 媒体文件在后台保存时间为3天,即3天后media_id失效。 @param access_token access_token @param mediaType mediaType @param media 多媒体文件有格式和大小限制,如下: 图片(image): 2M,支持bmp/png/jpeg/jpg/gif格式 语音(voice):2M,播放长度不超过60s,支持AMR\MP3格式 视频(video):10MB,支持MP4格式 缩略图(thumb):64KB,支持JPG格式 @return Media
[ "新增临时素材", "媒体文件在后台保存时间为3天,即3天后media_id失效。" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/MediaAPI.java#L60-L70
wisdom-framework/wisdom
core/content-manager/src/main/java/org/wisdom/content/bodyparsers/BodyParserJson.java
BodyParserJson.invoke
public <T> T invoke(Context context, Class<T> classOfT, Type genericType) { """ Builds an instance of {@literal T} from the request payload. @param context The context @param classOfT The class we expect @param <T> the type of the object @return the build object, {@literal null} if the object cannot be...
java
public <T> T invoke(Context context, Class<T> classOfT, Type genericType) { T t = null; try { final String content = context.body(); if (content == null || content.length() == 0) { return null; } if (genericType != null) { t...
[ "public", "<", "T", ">", "T", "invoke", "(", "Context", "context", ",", "Class", "<", "T", ">", "classOfT", ",", "Type", "genericType", ")", "{", "T", "t", "=", "null", ";", "try", "{", "final", "String", "content", "=", "context", ".", "body", "("...
Builds an instance of {@literal T} from the request payload. @param context The context @param classOfT The class we expect @param <T> the type of the object @return the build object, {@literal null} if the object cannot be built.
[ "Builds", "an", "instance", "of", "{", "@literal", "T", "}", "from", "the", "request", "payload", "." ]
train
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/core/content-manager/src/main/java/org/wisdom/content/bodyparsers/BodyParserJson.java#L73-L91
sundrio/sundrio
maven-plugin/src/main/java/io/sundr/maven/GenerateBomMojo.java
GenerateBomMojo.toGenerate
private static MavenProject toGenerate(MavenProject project, BomConfig config, Collection<Dependency> dependencies, Set<Artifact> plugins) { """ Returns the model of the {@link org.apache.maven.project.MavenProject} to generate. This is a trimmed down version and contains just the stuff that need to go into the b...
java
private static MavenProject toGenerate(MavenProject project, BomConfig config, Collection<Dependency> dependencies, Set<Artifact> plugins) { MavenProject toGenerate = project.clone(); toGenerate.setGroupId(project.getGroupId()); toGenerate.setArtifactId(config.getArtifactId()); toGenerat...
[ "private", "static", "MavenProject", "toGenerate", "(", "MavenProject", "project", ",", "BomConfig", "config", ",", "Collection", "<", "Dependency", ">", "dependencies", ",", "Set", "<", "Artifact", ">", "plugins", ")", "{", "MavenProject", "toGenerate", "=", "p...
Returns the model of the {@link org.apache.maven.project.MavenProject} to generate. This is a trimmed down version and contains just the stuff that need to go into the bom. @param project The source {@link org.apache.maven.project.MavenProject}. @param config The {@link io.sundr.maven.BomConfig}. @return The build {@...
[ "Returns", "the", "model", "of", "the", "{", "@link", "org", ".", "apache", ".", "maven", ".", "project", ".", "MavenProject", "}", "to", "generate", ".", "This", "is", "a", "trimmed", "down", "version", "and", "contains", "just", "the", "stuff", "that",...
train
https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/maven-plugin/src/main/java/io/sundr/maven/GenerateBomMojo.java#L301-L333
openbase/jul
processing/xml/src/main/java/org/openbase/jul/processing/xml/processing/XMLProcessor.java
XMLProcessor.xorCheck
public static void xorCheck(final Nodes nodes1, final Nodes nodes2, final String nodeTypeForDebugging) throws XMLParsingException { """ Does nothing if only one of nodes1 or nodes2 contains more than zero nodes. Throws InvalidCfgDocException otherwise. @param nodes1 @param nodes2 @param nodeTypeForDebugging ...
java
public static void xorCheck(final Nodes nodes1, final Nodes nodes2, final String nodeTypeForDebugging) throws XMLParsingException { if (nodes1.size() > 0 && nodes2.size() > 0) { throw new XMLParsingException("Message contains more than one " + nodeTypeForDebugging + " node. Only one permitted."); ...
[ "public", "static", "void", "xorCheck", "(", "final", "Nodes", "nodes1", ",", "final", "Nodes", "nodes2", ",", "final", "String", "nodeTypeForDebugging", ")", "throws", "XMLParsingException", "{", "if", "(", "nodes1", ".", "size", "(", ")", ">", "0", "&&", ...
Does nothing if only one of nodes1 or nodes2 contains more than zero nodes. Throws InvalidCfgDocException otherwise. @param nodes1 @param nodes2 @param nodeTypeForDebugging @throws XMLParsingException
[ "Does", "nothing", "if", "only", "one", "of", "nodes1", "or", "nodes2", "contains", "more", "than", "zero", "nodes", ".", "Throws", "InvalidCfgDocException", "otherwise", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/processing/xml/src/main/java/org/openbase/jul/processing/xml/processing/XMLProcessor.java#L340-L344
igniterealtime/Smack
smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java
EnhancedDebugger.addReadPacketToTable
private void addReadPacketToTable(final SimpleDateFormat dateFormatter, final TopLevelStreamElement packet) { """ Adds the received stanza detail to the messages table. @param dateFormatter the SimpleDateFormat to use to format Dates @param packet the read stanza to add to the table """ Swin...
java
private void addReadPacketToTable(final SimpleDateFormat dateFormatter, final TopLevelStreamElement packet) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { String messageType; Jid from; String stanzaId; ...
[ "private", "void", "addReadPacketToTable", "(", "final", "SimpleDateFormat", "dateFormatter", ",", "final", "TopLevelStreamElement", "packet", ")", "{", "SwingUtilities", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", ...
Adds the received stanza detail to the messages table. @param dateFormatter the SimpleDateFormat to use to format Dates @param packet the read stanza to add to the table
[ "Adds", "the", "received", "stanza", "detail", "to", "the", "messages", "table", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java#L764-L827
Javacord/Javacord
javacord-core/src/main/java/org/javacord/core/entity/server/ServerImpl.java
ServerImpl.getOrCreateRole
public Role getOrCreateRole(JsonNode data) { """ Gets or create a new role. @param data The json data of the role. @return The role. """ long id = Long.parseLong(data.get("id").asText()); synchronized (this) { return getRoleById(id).orElseGet(() -> { Role role = ...
java
public Role getOrCreateRole(JsonNode data) { long id = Long.parseLong(data.get("id").asText()); synchronized (this) { return getRoleById(id).orElseGet(() -> { Role role = new RoleImpl(api, this, data); this.roles.put(role.getId(), role); return...
[ "public", "Role", "getOrCreateRole", "(", "JsonNode", "data", ")", "{", "long", "id", "=", "Long", ".", "parseLong", "(", "data", ".", "get", "(", "\"id\"", ")", ".", "asText", "(", ")", ")", ";", "synchronized", "(", "this", ")", "{", "return", "get...
Gets or create a new role. @param data The json data of the role. @return The role.
[ "Gets", "or", "create", "a", "new", "role", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-core/src/main/java/org/javacord/core/entity/server/ServerImpl.java#L583-L592
languagetool-org/languagetool
languagetool-language-modules/en/src/main/java/org/languagetool/chunking/EnglishChunker.java
EnglishChunker.getAnalyzedTokenReadingsFor
@Nullable private AnalyzedTokenReadings getAnalyzedTokenReadingsFor(int startPos, int endPos, List<AnalyzedTokenReadings> tokenReadings) { """ the tokens of "I'll" ([I] ['ll] vs [I]['][ll) cannot be mapped with this. """ int pos = 0; for (AnalyzedTokenReadings tokenReading : tokenReadings) { St...
java
@Nullable private AnalyzedTokenReadings getAnalyzedTokenReadingsFor(int startPos, int endPos, List<AnalyzedTokenReadings> tokenReadings) { int pos = 0; for (AnalyzedTokenReadings tokenReading : tokenReadings) { String token = tokenReading.getToken(); if (token.trim().isEmpty()) { continue;...
[ "@", "Nullable", "private", "AnalyzedTokenReadings", "getAnalyzedTokenReadingsFor", "(", "int", "startPos", ",", "int", "endPos", ",", "List", "<", "AnalyzedTokenReadings", ">", "tokenReadings", ")", "{", "int", "pos", "=", "0", ";", "for", "(", "AnalyzedTokenRead...
the tokens of "I'll" ([I] ['ll] vs [I]['][ll) cannot be mapped with this.
[ "the", "tokens", "of", "I", "ll", "(", "[", "I", "]", "[", "ll", "]", "vs", "[", "I", "]", "[", "]", "[", "ll", ")", "cannot", "be", "mapped", "with", "this", "." ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-language-modules/en/src/main/java/org/languagetool/chunking/EnglishChunker.java#L147-L164
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.listApp
public ListAppResponse listApp(ListAppRequest request) { """ list all your apps @param request The request object containing all parameters for list all apps. @return the response """ checkNotNull(request, "The parameter request should NOT be null."); InternalRequest internalRequest = creat...
java
public ListAppResponse listApp(ListAppRequest request) { checkNotNull(request, "The parameter request should NOT be null."); InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_APP); return invokeHttpClient(internalRequest, ListAppResponse.class); }
[ "public", "ListAppResponse", "listApp", "(", "ListAppRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "InternalRequest", "internalRequest", "=", "createRequest", "(", "HttpMethodName", ".", "GET...
list all your apps @param request The request object containing all parameters for list all apps. @return the response
[ "list", "all", "your", "apps" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L821-L825
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/blockdata/BlockDataHandler.java
BlockDataHandler.getData
public static <T> T getData(String identifier, IBlockAccess world, BlockPos pos) { """ Gets the custom data stored at the {@link BlockPos} for the specified identifier. @param <T> the generic type @param identifier the identifier @param world the world @param pos the pos @return the data """ ChunkData...
java
public static <T> T getData(String identifier, IBlockAccess world, BlockPos pos) { ChunkData<T> chunkData = instance.<T> chunkData(identifier, instance.world(world), pos); return chunkData != null ? chunkData.getData(pos) : null; }
[ "public", "static", "<", "T", ">", "T", "getData", "(", "String", "identifier", ",", "IBlockAccess", "world", ",", "BlockPos", "pos", ")", "{", "ChunkData", "<", "T", ">", "chunkData", "=", "instance", ".", "<", "T", ">", "chunkData", "(", "identifier", ...
Gets the custom data stored at the {@link BlockPos} for the specified identifier. @param <T> the generic type @param identifier the identifier @param world the world @param pos the pos @return the data
[ "Gets", "the", "custom", "data", "stored", "at", "the", "{", "@link", "BlockPos", "}", "for", "the", "specified", "identifier", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/blockdata/BlockDataHandler.java#L290-L294
atomix/atomix
utils/src/main/java/io/atomix/utils/config/ConfigMapper.java
ConfigMapper.map
protected <T> T map(Config config, Class<T> clazz) { """ Applies the given configuration to the given type. @param config the configuration to apply @param clazz the class to which to apply the configuration """ return map(config, null, null, clazz); }
java
protected <T> T map(Config config, Class<T> clazz) { return map(config, null, null, clazz); }
[ "protected", "<", "T", ">", "T", "map", "(", "Config", "config", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "map", "(", "config", ",", "null", ",", "null", ",", "clazz", ")", ";", "}" ]
Applies the given configuration to the given type. @param config the configuration to apply @param clazz the class to which to apply the configuration
[ "Applies", "the", "given", "configuration", "to", "the", "given", "type", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/utils/src/main/java/io/atomix/utils/config/ConfigMapper.java#L133-L135
lettuce-io/lettuce-core
src/main/java/io/lettuce/core/Operators.java
Operators.request
public static <T> boolean request(AtomicLongFieldUpdater<T> updater, T instance, long toAdd) { """ Concurrent addition bound to Long.MAX_VALUE. Any concurrent write will "happen before" this operation. @param <T> the parent instance type @param updater current field updater @param instance current instance to...
java
public static <T> boolean request(AtomicLongFieldUpdater<T> updater, T instance, long toAdd) { if (validate(toAdd)) { addCap(updater, instance, toAdd); return true; } return false; }
[ "public", "static", "<", "T", ">", "boolean", "request", "(", "AtomicLongFieldUpdater", "<", "T", ">", "updater", ",", "T", "instance", ",", "long", "toAdd", ")", "{", "if", "(", "validate", "(", "toAdd", ")", ")", "{", "addCap", "(", "updater", ",", ...
Concurrent addition bound to Long.MAX_VALUE. Any concurrent write will "happen before" this operation. @param <T> the parent instance type @param updater current field updater @param instance current instance to update @param toAdd delta to add @return {@literal true} if the operation succeeded. @since 5.0.1
[ "Concurrent", "addition", "bound", "to", "Long", ".", "MAX_VALUE", ".", "Any", "concurrent", "write", "will", "happen", "before", "this", "operation", "." ]
train
https://github.com/lettuce-io/lettuce-core/blob/b6de74e384dea112e3656684ca3f50cdfd6c8e0d/src/main/java/io/lettuce/core/Operators.java#L120-L129
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java
XsdAsmInterfaces.generateHierarchyAttributeInterfaces
private void generateHierarchyAttributeInterfaces(Map<String, List<XsdAttribute>> createdAttributes, ElementHierarchyItem hierarchyInterface, String apiName) { """ Generates all the hierarchy interfaces. @param createdAttributes Information about the attributes that are already created. @param hierarchyInterface...
java
private void generateHierarchyAttributeInterfaces(Map<String, List<XsdAttribute>> createdAttributes, ElementHierarchyItem hierarchyInterface, String apiName) { String interfaceName = hierarchyInterface.getInterfaceName(); List<String> extendedInterfaceList = hierarchyInterface.getInterfaces(); S...
[ "private", "void", "generateHierarchyAttributeInterfaces", "(", "Map", "<", "String", ",", "List", "<", "XsdAttribute", ">", ">", "createdAttributes", ",", "ElementHierarchyItem", "hierarchyInterface", ",", "String", "apiName", ")", "{", "String", "interfaceName", "="...
Generates all the hierarchy interfaces. @param createdAttributes Information about the attributes that are already created. @param hierarchyInterface Information about the hierarchy interface to create. @param apiName The name of the generated fluent interface.
[ "Generates", "all", "the", "hierarchy", "interfaces", "." ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L106-L118
apache/incubator-heron
heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java
SchedulerStateManagerAdaptor.setExecutionState
public Boolean setExecutionState( ExecutionEnvironment.ExecutionState executionState, String topologyName) { """ Set the execution state for the given topology @return Boolean - Success or Failure """ return awaitResult(delegate.setExecutionState(executionState, topologyName)); }
java
public Boolean setExecutionState( ExecutionEnvironment.ExecutionState executionState, String topologyName) { return awaitResult(delegate.setExecutionState(executionState, topologyName)); }
[ "public", "Boolean", "setExecutionState", "(", "ExecutionEnvironment", ".", "ExecutionState", "executionState", ",", "String", "topologyName", ")", "{", "return", "awaitResult", "(", "delegate", ".", "setExecutionState", "(", "executionState", ",", "topologyName", ")", ...
Set the execution state for the given topology @return Boolean - Success or Failure
[ "Set", "the", "execution", "state", "for", "the", "given", "topology" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/spi/src/java/org/apache/heron/spi/statemgr/SchedulerStateManagerAdaptor.java#L107-L110
tvesalainen/util
rpm/src/main/java/org/vesalainen/pm/rpm/RPMBuilder.java
RPMBuilder.addProvide
@Override public RPMBuilder addProvide(String name, String version, Condition... dependency) { """ Add RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION and RPMTAG_PROVIDEFLAGS @param name @param version @param dependency @return """ addString(RPMTAG_PROVIDENAME, name); addString(RPMTAG_PROVIDE...
java
@Override public RPMBuilder addProvide(String name, String version, Condition... dependency) { addString(RPMTAG_PROVIDENAME, name); addString(RPMTAG_PROVIDEVERSION, version); addInt32(RPMTAG_PROVIDEFLAGS, Dependency.or(dependency)); ensureVersionReq(version); return this;...
[ "@", "Override", "public", "RPMBuilder", "addProvide", "(", "String", "name", ",", "String", "version", ",", "Condition", "...", "dependency", ")", "{", "addString", "(", "RPMTAG_PROVIDENAME", ",", "name", ")", ";", "addString", "(", "RPMTAG_PROVIDEVERSION", ","...
Add RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION and RPMTAG_PROVIDEFLAGS @param name @param version @param dependency @return
[ "Add", "RPMTAG_PROVIDENAME", "RPMTAG_PROVIDEVERSION", "and", "RPMTAG_PROVIDEFLAGS" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/rpm/src/main/java/org/vesalainen/pm/rpm/RPMBuilder.java#L254-L262
defei/codelogger-utils
src/main/java/org/codelogger/utils/DateUtils.java
DateUtils.getDateOfMonthsBack
public static Date getDateOfMonthsBack(final int monthsBack, final Date date) { """ Get specify months back from given date. @param monthsBack how many months want to be back. @param date date to be handled. @return a new Date object. """ return dateBack(Calendar.MONTH, monthsBack, date); }
java
public static Date getDateOfMonthsBack(final int monthsBack, final Date date) { return dateBack(Calendar.MONTH, monthsBack, date); }
[ "public", "static", "Date", "getDateOfMonthsBack", "(", "final", "int", "monthsBack", ",", "final", "Date", "date", ")", "{", "return", "dateBack", "(", "Calendar", ".", "MONTH", ",", "monthsBack", ",", "date", ")", ";", "}" ]
Get specify months back from given date. @param monthsBack how many months want to be back. @param date date to be handled. @return a new Date object.
[ "Get", "specify", "months", "back", "from", "given", "date", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/DateUtils.java#L209-L212
CenturyLinkCloud/clc-java-sdk
sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/domain/ip/SubnetUtils.java
SubnetUtils.toCidrNotation
private String toCidrNotation(String addr, String mask) { """ /* Convert two dotted decimal addresses to a single xxx.xxx.xxx.xxx/yy format by counting the 1-bit population in the mask address. (It may be better to count NBITS-#trailing zeroes for this case) """ return addr + "/" + pop(toInteger(mask...
java
private String toCidrNotation(String addr, String mask) { return addr + "/" + pop(toInteger(mask)); }
[ "private", "String", "toCidrNotation", "(", "String", "addr", ",", "String", "mask", ")", "{", "return", "addr", "+", "\"/\"", "+", "pop", "(", "toInteger", "(", "mask", ")", ")", ";", "}" ]
/* Convert two dotted decimal addresses to a single xxx.xxx.xxx.xxx/yy format by counting the 1-bit population in the mask address. (It may be better to count NBITS-#trailing zeroes for this case)
[ "/", "*", "Convert", "two", "dotted", "decimal", "addresses", "to", "a", "single", "xxx", ".", "xxx", ".", "xxx", ".", "xxx", "/", "yy", "format", "by", "counting", "the", "1", "-", "bit", "population", "in", "the", "mask", "address", ".", "(", "It",...
train
https://github.com/CenturyLinkCloud/clc-java-sdk/blob/c026322f077dea71b1acf9f2d665253d79d9bf85/sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/domain/ip/SubnetUtils.java#L158-L160
landawn/AbacusUtil
src/com/landawn/abacus/util/JdbcUtil.java
JdbcUtil.importData
@SuppressWarnings("rawtypes") public static int importData(final DataSet dataset, final int offset, final int count, final Connection conn, final String insertSQL, final int batchSize, final int batchInterval, final Map<String, ? extends Type> columnTypeMap) throws UncheckedSQLException { """ Imp...
java
@SuppressWarnings("rawtypes") public static int importData(final DataSet dataset, final int offset, final int count, final Connection conn, final String insertSQL, final int batchSize, final int batchInterval, final Map<String, ? extends Type> columnTypeMap) throws UncheckedSQLException { ret...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "int", "importData", "(", "final", "DataSet", "dataset", ",", "final", "int", "offset", ",", "final", "int", "count", ",", "final", "Connection", "conn", ",", "final", "String", "insertSQL"...
Imports the data from <code>DataSet</code> to database. @param dataset @param offset @param count @param conn @param insertSQL the column order in the sql must be consistent with the column order in the DataSet. Here is sample about how to create the sql: <pre><code> List<String> columnNameList = new ArrayList<>(datas...
[ "Imports", "the", "data", "from", "<code", ">", "DataSet<", "/", "code", ">", "to", "database", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/JdbcUtil.java#L2023-L2027
googleapis/google-cloud-java
google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/GrafeasV1Beta1Client.java
GrafeasV1Beta1Client.updateNote
public final Note updateNote(String name, Note note, FieldMask updateMask) { """ Updates the specified note. <p>Sample code: <pre><code> try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); Note note = Note.newBuilder().build...
java
public final Note updateNote(String name, Note note, FieldMask updateMask) { UpdateNoteRequest request = UpdateNoteRequest.newBuilder() .setName(name) .setNote(note) .setUpdateMask(updateMask) .build(); return updateNote(request); }
[ "public", "final", "Note", "updateNote", "(", "String", "name", ",", "Note", "note", ",", "FieldMask", "updateMask", ")", "{", "UpdateNoteRequest", "request", "=", "UpdateNoteRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", ")", ".", "setN...
Updates the specified note. <p>Sample code: <pre><code> try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) { NoteName name = NoteName.of("[PROJECT]", "[NOTE]"); Note note = Note.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Note response = grafeasV1Beta1Clie...
[ "Updates", "the", "specified", "note", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/GrafeasV1Beta1Client.java#L1536-L1545
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java
CQLTranslator.appendColumnValue
private boolean appendColumnValue(StringBuilder builder, Object valueObj, Field column) { """ Appends column value with parametrised builder object. Returns true if value is present. @param builder the builder @param valueObj the value obj @param column the column @return true if value is not null,else f...
java
private boolean appendColumnValue(StringBuilder builder, Object valueObj, Field column) { Object value = PropertyAccessorHelper.getObject(valueObj, column); boolean isPresent = false; isPresent = appendValue(builder, column.getType(), value, isPresent, false); return isPresent; }
[ "private", "boolean", "appendColumnValue", "(", "StringBuilder", "builder", ",", "Object", "valueObj", ",", "Field", "column", ")", "{", "Object", "value", "=", "PropertyAccessorHelper", ".", "getObject", "(", "valueObj", ",", "column", ")", ";", "boolean", "isP...
Appends column value with parametrised builder object. Returns true if value is present. @param builder the builder @param valueObj the value obj @param column the column @return true if value is not null,else false.
[ "Appends", "column", "value", "with", "parametrised", "builder", "object", ".", "Returns", "true", "if", "value", "is", "present", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java#L1080-L1086
EdwardRaff/JSAT
JSAT/src/jsat/datatransform/AutoDeskewTransform.java
AutoDeskewTransform.updateStats
private void updateStats(final List<Double> lambdas, OnLineStatistics[][] stats, int indx, double val, double[] mins, double weight) { """ Updates the online stats for each value of lambda @param lambdas the list of lambda values @param stats the array of statistics trackers @param indx the feature index to a...
java
private void updateStats(final List<Double> lambdas, OnLineStatistics[][] stats, int indx, double val, double[] mins, double weight) { for (int k = 0; k < lambdas.size(); k++) stats[k][indx].add(transform(val, lambdas.get(k), mins[indx]), weight); }
[ "private", "void", "updateStats", "(", "final", "List", "<", "Double", ">", "lambdas", ",", "OnLineStatistics", "[", "]", "[", "]", "stats", ",", "int", "indx", ",", "double", "val", ",", "double", "[", "]", "mins", ",", "double", "weight", ")", "{", ...
Updates the online stats for each value of lambda @param lambdas the list of lambda values @param stats the array of statistics trackers @param indx the feature index to add to @param val the value at the given feature index @param mins the minimum value array @param weight the weight to the given update
[ "Updates", "the", "online", "stats", "for", "each", "value", "of", "lambda" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/datatransform/AutoDeskewTransform.java#L312-L316
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/AbstractPlanNode.java
AbstractPlanNode.setAndLinkChild
public void setAndLinkChild(int index, AbstractPlanNode child) { """ Used to re-link the child without changing the order. This is called by PushDownLimit and RemoveUnnecessaryProjectNodes. @param index @param child """ assert(child != null); m_children.set(index, child); child.m_p...
java
public void setAndLinkChild(int index, AbstractPlanNode child) { assert(child != null); m_children.set(index, child); child.m_parents.add(this); }
[ "public", "void", "setAndLinkChild", "(", "int", "index", ",", "AbstractPlanNode", "child", ")", "{", "assert", "(", "child", "!=", "null", ")", ";", "m_children", ".", "set", "(", "index", ",", "child", ")", ";", "child", ".", "m_parents", ".", "add", ...
Used to re-link the child without changing the order. This is called by PushDownLimit and RemoveUnnecessaryProjectNodes. @param index @param child
[ "Used", "to", "re", "-", "link", "the", "child", "without", "changing", "the", "order", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/AbstractPlanNode.java#L639-L643
akarnokd/akarnokd-xml
src/main/java/hu/akarnokd/xml/XSerializables.java
XSerializables.createUpdate
public static XElement createUpdate(String function, XSerializable object) { """ Create an update request and store the contents of the object into it. @param function the remote function name @param object the object to store. @return the request XML """ XElement result = new XElement(function); ...
java
public static XElement createUpdate(String function, XSerializable object) { XElement result = new XElement(function); object.save(result); return result; }
[ "public", "static", "XElement", "createUpdate", "(", "String", "function", ",", "XSerializable", "object", ")", "{", "XElement", "result", "=", "new", "XElement", "(", "function", ")", ";", "object", ".", "save", "(", "result", ")", ";", "return", "result", ...
Create an update request and store the contents of the object into it. @param function the remote function name @param object the object to store. @return the request XML
[ "Create", "an", "update", "request", "and", "store", "the", "contents", "of", "the", "object", "into", "it", "." ]
train
https://github.com/akarnokd/akarnokd-xml/blob/57466a5a9cb455a13d7121557c165287b31ee870/src/main/java/hu/akarnokd/xml/XSerializables.java#L48-L52
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java
CommerceOrderPersistenceImpl.findByUserId
@Override public List<CommerceOrder> findByUserId(long userId, int start, int end, OrderByComparator<CommerceOrder> orderByComparator) { """ Returns an ordered range of all the commerce orders where userId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. ...
java
@Override public List<CommerceOrder> findByUserId(long userId, int start, int end, OrderByComparator<CommerceOrder> orderByComparator) { return findByUserId(userId, start, end, orderByComparator, true); }
[ "@", "Override", "public", "List", "<", "CommerceOrder", ">", "findByUserId", "(", "long", "userId", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CommerceOrder", ">", "orderByComparator", ")", "{", "return", "findByUserId", "(", "use...
Returns an ordered range of all the commerce orders where userId = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the...
[ "Returns", "an", "ordered", "range", "of", "all", "the", "commerce", "orders", "where", "userId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java#L2050-L2054
reactor/reactor-netty
src/main/java/reactor/netty/ByteBufMono.java
ByteBufMono.asInputStream
public Mono<InputStream> asInputStream() { """ Convert to an {@link InputStream} inbound {@link Mono} @return a {@link InputStream} inbound {@link Mono} """ return handle((bb, sink) -> { try { sink.next(new ReleasingInputStream(bb)); } catch (IllegalReferenceCountException e) { sink.compl...
java
public Mono<InputStream> asInputStream() { return handle((bb, sink) -> { try { sink.next(new ReleasingInputStream(bb)); } catch (IllegalReferenceCountException e) { sink.complete(); } }); }
[ "public", "Mono", "<", "InputStream", ">", "asInputStream", "(", ")", "{", "return", "handle", "(", "(", "bb", ",", "sink", ")", "->", "{", "try", "{", "sink", ".", "next", "(", "new", "ReleasingInputStream", "(", "bb", ")", ")", ";", "}", "catch", ...
Convert to an {@link InputStream} inbound {@link Mono} @return a {@link InputStream} inbound {@link Mono}
[ "Convert", "to", "an", "{", "@link", "InputStream", "}", "inbound", "{", "@link", "Mono", "}" ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/ByteBufMono.java#L106-L115
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/security/csiv2/config/css/CommonClientCfg.java
CommonClientCfg.populateSecMechList
private void populateSecMechList(CSSCompoundSecMechListConfig mechListConfig, List<LayersData> layersList) throws Exception { """ /* Iterate through each of the "layers" elements to add compound sec mechs to the compound sec mech list. """ for (LayersData mech : layersList) { for (CSSCompo...
java
private void populateSecMechList(CSSCompoundSecMechListConfig mechListConfig, List<LayersData> layersList) throws Exception { for (LayersData mech : layersList) { for (CSSCompoundSecMechConfig cssCompoundSecMechConfig : extractCompoundSecMech(mech)) { mechListConfig.add(cssCompoundSe...
[ "private", "void", "populateSecMechList", "(", "CSSCompoundSecMechListConfig", "mechListConfig", ",", "List", "<", "LayersData", ">", "layersList", ")", "throws", "Exception", "{", "for", "(", "LayersData", "mech", ":", "layersList", ")", "{", "for", "(", "CSSComp...
/* Iterate through each of the "layers" elements to add compound sec mechs to the compound sec mech list.
[ "/", "*", "Iterate", "through", "each", "of", "the", "layers", "elements", "to", "add", "compound", "sec", "mechs", "to", "the", "compound", "sec", "mech", "list", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2.common/src/com/ibm/ws/security/csiv2/config/css/CommonClientCfg.java#L87-L93
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PrivateKeyReader.java
PrivateKeyReader.readPrivateKey
public static PrivateKey readPrivateKey(final File root, final String directory, final String fileName) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException, IOException { """ Constructs from the given root, parent directory and file name the file and reads the private key. @pa...
java
public static PrivateKey readPrivateKey(final File root, final String directory, final String fileName) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException, IOException { final File privatekeyDir = new File(root, directory); final File privatekeyFile = new File(privatekeyDir, fil...
[ "public", "static", "PrivateKey", "readPrivateKey", "(", "final", "File", "root", ",", "final", "String", "directory", ",", "final", "String", "fileName", ")", "throws", "NoSuchAlgorithmException", ",", "InvalidKeySpecException", ",", "NoSuchProviderException", ",", "...
Constructs from the given root, parent directory and file name the file and reads the private key. @param root the root directory of the parent directory @param directory the parent directory of the private key file @param fileName the file name of the file that contains the private key @return the private key @throws...
[ "Constructs", "from", "the", "given", "root", "parent", "directory", "and", "file", "name", "the", "file", "and", "reads", "the", "private", "key", "." ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/key/reader/PrivateKeyReader.java#L365-L375
opencb/java-common-libs
commons-lib/src/main/java/org/opencb/commons/utils/FileUtils.java
FileUtils.newBufferedReader
public static BufferedReader newBufferedReader(Path path, Charset charset) throws IOException { """ This method is able to determine whether a file is GZipped and return a {@link BufferedReader} in any case. @param path to be read @param charset to be read @return BufferedReader object @throws java.io.IOExce...
java
public static BufferedReader newBufferedReader(Path path, Charset charset) throws IOException { return new BufferedReader(new InputStreamReader(newInputStream(path), charset)); }
[ "public", "static", "BufferedReader", "newBufferedReader", "(", "Path", "path", ",", "Charset", "charset", ")", "throws", "IOException", "{", "return", "new", "BufferedReader", "(", "new", "InputStreamReader", "(", "newInputStream", "(", "path", ")", ",", "charset...
This method is able to determine whether a file is GZipped and return a {@link BufferedReader} in any case. @param path to be read @param charset to be read @return BufferedReader object @throws java.io.IOException IOException
[ "This", "method", "is", "able", "to", "determine", "whether", "a", "file", "is", "GZipped", "and", "return", "a", "{", "@link", "BufferedReader", "}", "in", "any", "case", "." ]
train
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-lib/src/main/java/org/opencb/commons/utils/FileUtils.java#L102-L104
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageBandMath.java
ImageBandMath.stdDev
public static void stdDev(Planar<GrayF64> input, GrayF64 output, @Nullable GrayF64 avg) { """ Computes the standard deviation for each pixel across all bands in the {@link Planar} image. @param input Planar image - not modified @param output Gray scale image containing average pixel values - modified @p...
java
public static void stdDev(Planar<GrayF64> input, GrayF64 output, @Nullable GrayF64 avg) { stdDev(input,output,avg,0,input.getNumBands() - 1); }
[ "public", "static", "void", "stdDev", "(", "Planar", "<", "GrayF64", ">", "input", ",", "GrayF64", "output", ",", "@", "Nullable", "GrayF64", "avg", ")", "{", "stdDev", "(", "input", ",", "output", ",", "avg", ",", "0", ",", "input", ".", "getNumBands"...
Computes the standard deviation for each pixel across all bands in the {@link Planar} image. @param input Planar image - not modified @param output Gray scale image containing average pixel values - modified @param avg Input Gray scale image containing average image. Can be null
[ "Computes", "the", "standard", "deviation", "for", "each", "pixel", "across", "all", "bands", "in", "the", "{" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageBandMath.java#L1191-L1193
UrielCh/ovh-java-sdk
ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java
ApiOvhPackxdsl.packName_siteBuilderStart_options_domains_GET
public ArrayList<OvhSiteBuilderDomain> packName_siteBuilderStart_options_domains_GET(String packName) throws IOException { """ Get the available domains REST: GET /pack/xdsl/{packName}/siteBuilderStart/options/domains @param packName [required] The internal name of your pack """ String qPath = "/pack/xds...
java
public ArrayList<OvhSiteBuilderDomain> packName_siteBuilderStart_options_domains_GET(String packName) throws IOException { String qPath = "/pack/xdsl/{packName}/siteBuilderStart/options/domains"; StringBuilder sb = path(qPath, packName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(re...
[ "public", "ArrayList", "<", "OvhSiteBuilderDomain", ">", "packName_siteBuilderStart_options_domains_GET", "(", "String", "packName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/pack/xdsl/{packName}/siteBuilderStart/options/domains\"", ";", "StringBuilder", "s...
Get the available domains REST: GET /pack/xdsl/{packName}/siteBuilderStart/options/domains @param packName [required] The internal name of your pack
[ "Get", "the", "available", "domains" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L432-L437
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/internal/lang/Fields.java
Fields.findField
public static Field findField(TypeToken<?> classType, String fieldName) throws NoSuchFieldException { """ Find a {@link java.lang.reflect.Field} in the class hierarchy of the given type. @param classType The leaf class to start with. @param fieldName Name of the field. @return A {@link java.lang.reflect.Field} ...
java
public static Field findField(TypeToken<?> classType, String fieldName) throws NoSuchFieldException { return findField(classType, fieldName, Predicates.<Field>alwaysTrue()); }
[ "public", "static", "Field", "findField", "(", "TypeToken", "<", "?", ">", "classType", ",", "String", "fieldName", ")", "throws", "NoSuchFieldException", "{", "return", "findField", "(", "classType", ",", "fieldName", ",", "Predicates", ".", "<", "Field", ">"...
Find a {@link java.lang.reflect.Field} in the class hierarchy of the given type. @param classType The leaf class to start with. @param fieldName Name of the field. @return A {@link java.lang.reflect.Field} if found. @throws NoSuchFieldException If the field is not found.
[ "Find", "a", "{" ]
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/internal/lang/Fields.java#L37-L39
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/logging/Redwood.java
Redwood.captureSystemStreams
protected static void captureSystemStreams(boolean captureOut, boolean captureErr) { """ Captures System.out and System.err and redirects them to Redwood logging. @param captureOut True is System.out should be captured @param captureErr True if System.err should be captured """ if(captureOut){ S...
java
protected static void captureSystemStreams(boolean captureOut, boolean captureErr){ if(captureOut){ System.setOut(new RedwoodPrintStream(STDOUT, realSysOut)); } if(captureErr){ System.setErr(new RedwoodPrintStream(STDERR, realSysErr)); } }
[ "protected", "static", "void", "captureSystemStreams", "(", "boolean", "captureOut", ",", "boolean", "captureErr", ")", "{", "if", "(", "captureOut", ")", "{", "System", ".", "setOut", "(", "new", "RedwoodPrintStream", "(", "STDOUT", ",", "realSysOut", ")", ")...
Captures System.out and System.err and redirects them to Redwood logging. @param captureOut True is System.out should be captured @param captureErr True if System.err should be captured
[ "Captures", "System", ".", "out", "and", "System", ".", "err", "and", "redirects", "them", "to", "Redwood", "logging", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/logging/Redwood.java#L381-L388
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/print/OneSelect.java
OneSelect.addAttributeSetSelectPart
public void addAttributeSetSelectPart(final String _attributeSet, final String _where) throws EFapsException { """ Adds the attribute set select part. @param _attributeSet the attribute set @param _where the where @throws EFapsException on error """ ...
java
public void addAttributeSetSelectPart(final String _attributeSet, final String _where) throws EFapsException { final Type type; // if a previous select exists it is based on the previous select, // else it is based on the basic table ...
[ "public", "void", "addAttributeSetSelectPart", "(", "final", "String", "_attributeSet", ",", "final", "String", "_where", ")", "throws", "EFapsException", "{", "final", "Type", "type", ";", "// if a previous select exists it is based on the previous select,", "// else it is b...
Adds the attribute set select part. @param _attributeSet the attribute set @param _where the where @throws EFapsException on error
[ "Adds", "the", "attribute", "set", "select", "part", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L359-L381
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.buildDescription
public static Description buildDescription(final Object object, final DescriptionBuilder builder) { """ @return Create a Description using a builder by analyzing the annotations on a plugin object, and including annotations on fields as DescriptionProperties. @param object the object @param builder builder ...
java
public static Description buildDescription(final Object object, final DescriptionBuilder builder) { return buildDescription(object, builder, true); }
[ "public", "static", "Description", "buildDescription", "(", "final", "Object", "object", ",", "final", "DescriptionBuilder", "builder", ")", "{", "return", "buildDescription", "(", "object", ",", "builder", ",", "true", ")", ";", "}" ]
@return Create a Description using a builder by analyzing the annotations on a plugin object, and including annotations on fields as DescriptionProperties. @param object the object @param builder builder
[ "@return", "Create", "a", "Description", "using", "a", "builder", "by", "analyzing", "the", "annotations", "on", "a", "plugin", "object", "and", "including", "annotations", "on", "fields", "as", "DescriptionProperties", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L62-L64
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowVersionsInner.java
WorkflowVersionsInner.listAsync
public Observable<Page<WorkflowVersionInner>> listAsync(final String resourceGroupName, final String workflowName, final Integer top) { """ Gets a list of workflow versions. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param top The number of items to be included i...
java
public Observable<Page<WorkflowVersionInner>> listAsync(final String resourceGroupName, final String workflowName, final Integer top) { return listWithServiceResponseAsync(resourceGroupName, workflowName, top) .map(new Func1<ServiceResponse<Page<WorkflowVersionInner>>, Page<WorkflowVersionInner>>() ...
[ "public", "Observable", "<", "Page", "<", "WorkflowVersionInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "workflowName", ",", "final", "Integer", "top", ")", "{", "return", "listWithServiceResponseAsync", "(", "...
Gets a list of workflow versions. @param resourceGroupName The resource group name. @param workflowName The workflow name. @param top The number of items to be included in the result. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;WorkflowVersionInn...
[ "Gets", "a", "list", "of", "workflow", "versions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/WorkflowVersionsInner.java#L251-L259
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/web/util/UriUtils.java
UriUtils.encodeUri
@Deprecated public static String encodeUri(String uri, String encoding) throws UnsupportedEncodingException { """ Encodes the given source URI into an encoded String. All various URI components are encoded according to their respective valid character sets. <p><strong>Note</strong> that this method does not att...
java
@Deprecated public static String encodeUri(String uri, String encoding) throws UnsupportedEncodingException { Assert.notNull(uri, "URI must not be null"); Assert.hasLength(encoding, "Encoding must not be empty"); Matcher matcher = URI_PATTERN.matcher(uri); if (matcher.matches()) { String scheme = matcher.gr...
[ "@", "Deprecated", "public", "static", "String", "encodeUri", "(", "String", "uri", ",", "String", "encoding", ")", "throws", "UnsupportedEncodingException", "{", "Assert", ".", "notNull", "(", "uri", ",", "\"URI must not be null\"", ")", ";", "Assert", ".", "ha...
Encodes the given source URI into an encoded String. All various URI components are encoded according to their respective valid character sets. <p><strong>Note</strong> that this method does not attempt to encode "=" and "&" characters in query parameter names and query parameter values because they cannot be parsed in...
[ "Encodes", "the", "given", "source", "URI", "into", "an", "encoded", "String", ".", "All", "various", "URI", "components", "are", "encoded", "according", "to", "their", "respective", "valid", "character", "sets", ".", "<p", ">", "<strong", ">", "Note<", "/",...
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/web/util/UriUtils.java#L89-L108
infinispan/infinispan
counter/src/main/java/org/infinispan/counter/impl/listener/CounterManagerNotificationManager.java
CounterManagerNotificationManager.registerCounter
public void registerCounter(ByteString counterName, CounterEventGenerator generator, TopologyChangeListener topologyChangeListener) { """ It registers a new counter created locally. @param counterName The counter's name. @param generator The counter's {@link CounterEvent} gener...
java
public void registerCounter(ByteString counterName, CounterEventGenerator generator, TopologyChangeListener topologyChangeListener) { if (counters.putIfAbsent(counterName, new Holder(generator, topologyChangeListener)) != null) { throw new IllegalStateException(); } }
[ "public", "void", "registerCounter", "(", "ByteString", "counterName", ",", "CounterEventGenerator", "generator", ",", "TopologyChangeListener", "topologyChangeListener", ")", "{", "if", "(", "counters", ".", "putIfAbsent", "(", "counterName", ",", "new", "Holder", "(...
It registers a new counter created locally. @param counterName The counter's name. @param generator The counter's {@link CounterEvent} generator. @param topologyChangeListener The counter's listener to topology change. It can be {@code null}. @throws IllegalStateException If the counter with th...
[ "It", "registers", "a", "new", "counter", "created", "locally", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/impl/listener/CounterManagerNotificationManager.java#L89-L94
VoltDB/voltdb
src/frontend/org/voltdb/utils/SQLConsoleReader.java
SQLConsoleReader.searchBackwards
@Override public int searchBackwards(String searchTerm, int startIndex, boolean startsWith) { """ /* (non-Javadoc) @see jline.console.ConsoleReader#searchBackwards(java.lang.String, int, boolean) Overrides and replaces search logic to make it case-insensitive. """ ListIterator<jline.console.histo...
java
@Override public int searchBackwards(String searchTerm, int startIndex, boolean startsWith) { ListIterator<jline.console.history.History.Entry> it = this.getHistory().entries(startIndex); while (it.hasPrevious()) { jline.console.history.History.Entry e = it.previous(); St...
[ "@", "Override", "public", "int", "searchBackwards", "(", "String", "searchTerm", ",", "int", "startIndex", ",", "boolean", "startsWith", ")", "{", "ListIterator", "<", "jline", ".", "console", ".", "history", ".", "History", ".", "Entry", ">", "it", "=", ...
/* (non-Javadoc) @see jline.console.ConsoleReader#searchBackwards(java.lang.String, int, boolean) Overrides and replaces search logic to make it case-insensitive.
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SQLConsoleReader.java#L61-L81
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/model/IndexForVc.java
IndexForVc.getConfigIter
public static IndexForVc getConfigIter(VarSet indexVars, VarConfig config) { """ Iterates over all the configurations of indexVars where the subset of variables in config have been clamped to their given values. The iterator returns the configuration index of variables in indexVars. @param indexVars Variable ...
java
public static IndexForVc getConfigIter(VarSet indexVars, VarConfig config) { int fixedConfigContrib = getConfigIndex(indexVars, config); VarSet forVars = new VarSet(indexVars); forVars.removeAll(config.getVars()); return new IndexForVc(indexVars, forVars, fixedConfigContrib); }
[ "public", "static", "IndexForVc", "getConfigIter", "(", "VarSet", "indexVars", ",", "VarConfig", "config", ")", "{", "int", "fixedConfigContrib", "=", "getConfigIndex", "(", "indexVars", ",", "config", ")", ";", "VarSet", "forVars", "=", "new", "VarSet", "(", ...
Iterates over all the configurations of indexVars where the subset of variables in config have been clamped to their given values. The iterator returns the configuration index of variables in indexVars. @param indexVars Variable set over which to iterate. @param config Clamped assignment. @return Iterator.
[ "Iterates", "over", "all", "the", "configurations", "of", "indexVars", "where", "the", "subset", "of", "variables", "in", "config", "have", "been", "clamped", "to", "their", "given", "values", ".", "The", "iterator", "returns", "the", "configuration", "index", ...
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/model/IndexForVc.java#L46-L51
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/map/MapView.java
MapView.getWorldToPanTransformation
public Matrix getWorldToPanTransformation() { """ Return the world-to-pan space translation matrix. @return transformation matrix """ if (viewState.getScale() > 0) { double dX = -(viewState.getPanX() * viewState.getScale()); double dY = viewState.getPanY() * viewState.getScale(); return new Matri...
java
public Matrix getWorldToPanTransformation() { if (viewState.getScale() > 0) { double dX = -(viewState.getPanX() * viewState.getScale()); double dY = viewState.getPanY() * viewState.getScale(); return new Matrix(viewState.getScale(), 0, 0, -viewState.getScale(), dX, dY); } return new Matrix(1, 0, 0, 1, 0,...
[ "public", "Matrix", "getWorldToPanTransformation", "(", ")", "{", "if", "(", "viewState", ".", "getScale", "(", ")", ">", "0", ")", "{", "double", "dX", "=", "-", "(", "viewState", ".", "getPanX", "(", ")", "*", "viewState", ".", "getScale", "(", ")", ...
Return the world-to-pan space translation matrix. @return transformation matrix
[ "Return", "the", "world", "-", "to", "-", "pan", "space", "translation", "matrix", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/map/MapView.java#L169-L176
xvik/guice-persist-orient
src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/service/result/converter/Optionals.java
Optionals.jdk8
private static Object jdk8(final Class<?> type, final Object object) { """ Only this will cause optional class loading and fail for earlier jdk. @param object object for conversion @return optional instance """ try { // a bit faster than resolving it each time if (jdk8Option...
java
private static Object jdk8(final Class<?> type, final Object object) { try { // a bit faster than resolving it each time if (jdk8OptionalFactory == null) { lookupOptionalFactoryMethod(type); } return jdk8OptionalFactory.invoke(null, object); ...
[ "private", "static", "Object", "jdk8", "(", "final", "Class", "<", "?", ">", "type", ",", "final", "Object", "object", ")", "{", "try", "{", "// a bit faster than resolving it each time", "if", "(", "jdk8OptionalFactory", "==", "null", ")", "{", "lookupOptionalF...
Only this will cause optional class loading and fail for earlier jdk. @param object object for conversion @return optional instance
[ "Only", "this", "will", "cause", "optional", "class", "loading", "and", "fail", "for", "earlier", "jdk", "." ]
train
https://github.com/xvik/guice-persist-orient/blob/5ef06fb4f734360512e9824a3b875c4906c56b5b/src/main/java/ru/vyarus/guice/persist/orient/repository/core/ext/service/result/converter/Optionals.java#L49-L59
maxschuster/DataUrl
src/main/java/eu/maxschuster/dataurl/DataUrlBuilder.java
DataUrlBuilder.build
public DataUrl build() throws NullPointerException { """ Creates a new {@link DataUrl} instance @return New {@link DataUrl} instance @throws NullPointerException if data or encoding is {@code null} """ if (data == null) { throw new NullPointerException("data is null!"); } else if ...
java
public DataUrl build() throws NullPointerException { if (data == null) { throw new NullPointerException("data is null!"); } else if (encoding == null) { throw new NullPointerException("encoding is null!"); } return new DataUrl(data, encoding, mimeType, headers); ...
[ "public", "DataUrl", "build", "(", ")", "throws", "NullPointerException", "{", "if", "(", "data", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"data is null!\"", ")", ";", "}", "else", "if", "(", "encoding", "==", "null", ")", "{"...
Creates a new {@link DataUrl} instance @return New {@link DataUrl} instance @throws NullPointerException if data or encoding is {@code null}
[ "Creates", "a", "new", "{" ]
train
https://github.com/maxschuster/DataUrl/blob/6b2e2c54e50bb8ee5a7d8b30c8c2b3b24ddcb628/src/main/java/eu/maxschuster/dataurl/DataUrlBuilder.java#L55-L62
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/LongHashPartition.java
LongHashPartition.get
public MatchIterator get(long key, int hashCode) { """ Returns an iterator for all the values for the given key, or null if no value found. """ int bucket = hashCode & numBucketsMask; int bucketOffset = bucket << 4; MemorySegment segment = buckets[bucketOffset >>> segmentSizeBits]; int segOffset = buc...
java
public MatchIterator get(long key, int hashCode) { int bucket = hashCode & numBucketsMask; int bucketOffset = bucket << 4; MemorySegment segment = buckets[bucketOffset >>> segmentSizeBits]; int segOffset = bucketOffset & segmentSizeMask; while (true) { long address = segment.getLong(segOffset + 8); if...
[ "public", "MatchIterator", "get", "(", "long", "key", ",", "int", "hashCode", ")", "{", "int", "bucket", "=", "hashCode", "&", "numBucketsMask", ";", "int", "bucketOffset", "=", "bucket", "<<", "4", ";", "MemorySegment", "segment", "=", "buckets", "[", "bu...
Returns an iterator for all the values for the given key, or null if no value found.
[ "Returns", "an", "iterator", "for", "all", "the", "values", "for", "the", "given", "key", "or", "null", "if", "no", "value", "found", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/LongHashPartition.java#L255-L281
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/ParallelRunner.java
ParallelRunner.renamePath
public void renamePath(final Path src, final Path dst, final Optional<String> group) { """ Rename a {@link Path}. <p> This method submits a task to rename a {@link Path} and returns immediately after the task is submitted. </p> @param src path to be renamed @param dst new path after rename @param group ...
java
public void renamePath(final Path src, final Path dst, final Optional<String> group) { this.futures.add(new NamedFuture(this.executor.submit(new Callable<Void>() { @Override public Void call() throws Exception { Lock lock = ParallelRunner.this.locks.get(src.toString()); lock.lock(); ...
[ "public", "void", "renamePath", "(", "final", "Path", "src", ",", "final", "Path", "dst", ",", "final", "Optional", "<", "String", ">", "group", ")", "{", "this", ".", "futures", ".", "add", "(", "new", "NamedFuture", "(", "this", ".", "executor", ".",...
Rename a {@link Path}. <p> This method submits a task to rename a {@link Path} and returns immediately after the task is submitted. </p> @param src path to be renamed @param dst new path after rename @param group an optional group name for the destination path
[ "Rename", "a", "{", "@link", "Path", "}", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/ParallelRunner.java#L259-L281
openengsb/openengsb
components/ekb/graphdb-orient/src/main/java/org/openengsb/core/ekb/graph/orient/internal/OrientModelGraph.java
OrientModelGraph.getEdgeWithPossibleId
private ODocument getEdgeWithPossibleId(String start, String end, List<String> ids) { """ Returns an edge between the start and the end model. If there is an edge which has an id which is contained in the given id list, then this transformation is returned. If not, then the first found is returned. """ ...
java
private ODocument getEdgeWithPossibleId(String start, String end, List<String> ids) { List<ODocument> edges = getEdgesBetweenModels(start, end); for (ODocument edge : edges) { if (ids.contains(OrientModelGraphUtils.getIdFieldValue(edge))) { return edge; } ...
[ "private", "ODocument", "getEdgeWithPossibleId", "(", "String", "start", ",", "String", "end", ",", "List", "<", "String", ">", "ids", ")", "{", "List", "<", "ODocument", ">", "edges", "=", "getEdgesBetweenModels", "(", "start", ",", "end", ")", ";", "for"...
Returns an edge between the start and the end model. If there is an edge which has an id which is contained in the given id list, then this transformation is returned. If not, then the first found is returned.
[ "Returns", "an", "edge", "between", "the", "start", "and", "the", "end", "model", ".", "If", "there", "is", "an", "edge", "which", "has", "an", "id", "which", "is", "contained", "in", "the", "given", "id", "list", "then", "this", "transformation", "is", ...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/ekb/graphdb-orient/src/main/java/org/openengsb/core/ekb/graph/orient/internal/OrientModelGraph.java#L349-L357
mgormley/prim
src/main/java/edu/jhu/prim/tuple/ComparablePair.java
ComparablePair.naturalOrder
public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>> Comparator<Pair<T1, T2>> naturalOrder() { """ creates a natural order for pairs of comparable things @return """ return new Comparator<Pair<T1,T2>>() { @Override public int compare(Pair<T1, T2> lhs, Pair<T1, ...
java
public static <T1 extends Comparable<T1>, T2 extends Comparable<T2>> Comparator<Pair<T1, T2>> naturalOrder() { return new Comparator<Pair<T1,T2>>() { @Override public int compare(Pair<T1, T2> lhs, Pair<T1, T2> rhs) { return compareTo(lhs, rhs); } }; ...
[ "public", "static", "<", "T1", "extends", "Comparable", "<", "T1", ">", ",", "T2", "extends", "Comparable", "<", "T2", ">", ">", "Comparator", "<", "Pair", "<", "T1", ",", "T2", ">", ">", "naturalOrder", "(", ")", "{", "return", "new", "Comparator", ...
creates a natural order for pairs of comparable things @return
[ "creates", "a", "natural", "order", "for", "pairs", "of", "comparable", "things" ]
train
https://github.com/mgormley/prim/blob/5dce5e1ae94a9ae558a6262fc246e1a24f56686c/src/main/java/edu/jhu/prim/tuple/ComparablePair.java#L33-L42
alkacon/opencms-core
src/org/opencms/ade/publish/A_CmsPublishGroupHelper.java
A_CmsPublishGroupHelper.getDayDifference
public int getDayDifference(long first, long second) { """ Gets the difference in days between to dates given as longs.<p> The first date must be later than the second date. @param first the first date @param second the second date @return the difference between the two dates in days """ Cal...
java
public int getDayDifference(long first, long second) { Calendar firstDay = getStartOfDay(first); Calendar secondDay = getStartOfDay(second); int result = 0; if (first >= second) { while (firstDay.after(secondDay)) { firstDay.add(Calendar.DAY_OF_MONTH, -1); ...
[ "public", "int", "getDayDifference", "(", "long", "first", ",", "long", "second", ")", "{", "Calendar", "firstDay", "=", "getStartOfDay", "(", "first", ")", ";", "Calendar", "secondDay", "=", "getStartOfDay", "(", "second", ")", ";", "int", "result", "=", ...
Gets the difference in days between to dates given as longs.<p> The first date must be later than the second date. @param first the first date @param second the second date @return the difference between the two dates in days
[ "Gets", "the", "difference", "in", "days", "between", "to", "dates", "given", "as", "longs", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/publish/A_CmsPublishGroupHelper.java#L161-L178
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java
ActiveRuleKey.parse
public static ActiveRuleKey parse(String s) { """ Create a key from a string representation (see {@link #toString()}. An {@link IllegalArgumentException} is raised if the format is not valid. """ Preconditions.checkArgument(s.split(":").length >= 3, "Bad format of activeRule key: " + s); int semiColon...
java
public static ActiveRuleKey parse(String s) { Preconditions.checkArgument(s.split(":").length >= 3, "Bad format of activeRule key: " + s); int semiColonPos = s.indexOf(':'); String ruleProfileUuid = s.substring(0, semiColonPos); String ruleKey = s.substring(semiColonPos + 1); return new ActiveRuleKe...
[ "public", "static", "ActiveRuleKey", "parse", "(", "String", "s", ")", "{", "Preconditions", ".", "checkArgument", "(", "s", ".", "split", "(", "\":\"", ")", ".", "length", ">=", "3", ",", "\"Bad format of activeRule key: \"", "+", "s", ")", ";", "int", "s...
Create a key from a string representation (see {@link #toString()}. An {@link IllegalArgumentException} is raised if the format is not valid.
[ "Create", "a", "key", "from", "a", "string", "representation", "(", "see", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/qualityprofile/ActiveRuleKey.java#L55-L61
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/MatrixFeatures_DDRM.java
MatrixFeatures_DDRM.isIdentical
public static boolean isIdentical(DMatrixD1 a, DMatrixD1 b , double tol ) { """ <p> Checks to see if each corresponding element in the two matrices are within tolerance of each other or have the some symbolic meaning. This can handle NaN and Infinite numbers. <p> <p> If both elements are countable then th...
java
public static boolean isIdentical(DMatrixD1 a, DMatrixD1 b , double tol ) { if( a.numRows != b.numRows || a.numCols != b.numCols ) { return false; } if( tol < 0 ) throw new IllegalArgumentException("Tolerance must be greater than or equal to zero."); final int le...
[ "public", "static", "boolean", "isIdentical", "(", "DMatrixD1", "a", ",", "DMatrixD1", "b", ",", "double", "tol", ")", "{", "if", "(", "a", ".", "numRows", "!=", "b", ".", "numRows", "||", "a", ".", "numCols", "!=", "b", ".", "numCols", ")", "{", "...
<p> Checks to see if each corresponding element in the two matrices are within tolerance of each other or have the some symbolic meaning. This can handle NaN and Infinite numbers. <p> <p> If both elements are countable then the following equality test is used:<br> |a<sub>ij</sub> - b<sub>ij</sub>| &le; tol.<br> Other...
[ "<p", ">", "Checks", "to", "see", "if", "each", "corresponding", "element", "in", "the", "two", "matrices", "are", "within", "tolerance", "of", "each", "other", "or", "have", "the", "some", "symbolic", "meaning", ".", "This", "can", "handle", "NaN", "and",...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/MatrixFeatures_DDRM.java#L451-L465
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/BaseNoSqlDao.java
BaseNoSqlDao.invalidateCacheEntry
protected void invalidateCacheEntry(String spaceId, String key, Object data) { """ Invalidate a cache entry due to updated content. @param spaceId @param key @param data """ if (isCacheEnabled()) { putToCache(getCacheName(), calcCacheKey(spaceId, key), data); } }
java
protected void invalidateCacheEntry(String spaceId, String key, Object data) { if (isCacheEnabled()) { putToCache(getCacheName(), calcCacheKey(spaceId, key), data); } }
[ "protected", "void", "invalidateCacheEntry", "(", "String", "spaceId", ",", "String", "key", ",", "Object", "data", ")", "{", "if", "(", "isCacheEnabled", "(", ")", ")", "{", "putToCache", "(", "getCacheName", "(", ")", ",", "calcCacheKey", "(", "spaceId", ...
Invalidate a cache entry due to updated content. @param spaceId @param key @param data
[ "Invalidate", "a", "cache", "entry", "due", "to", "updated", "content", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/nosql/BaseNoSqlDao.java#L64-L68
rey5137/material
material/src/main/java/com/rey/material/widget/EditText.java
EditText.getOffsetForPosition
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public int getOffsetForPosition (float x, float y) { """ Get the character offset closest to the specified absolute position. A typical use case is to pass the result of {@link android.view.MotionEvent#getX()} and {@link android.view.MotionEvent#getY()} to this ...
java
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public int getOffsetForPosition (float x, float y){ if (getLayout() == null) return -1; final int line = getLineAtCoordinate(y); final int offset = getOffsetAtCoordinate(line, x); return offset; }
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "ICE_CREAM_SANDWICH", ")", "public", "int", "getOffsetForPosition", "(", "float", "x", ",", "float", "y", ")", "{", "if", "(", "getLayout", "(", ")", "==", "null", ")", "return", "-", "1", ";", ...
Get the character offset closest to the specified absolute position. A typical use case is to pass the result of {@link android.view.MotionEvent#getX()} and {@link android.view.MotionEvent#getY()} to this method. @param x The horizontal absolute position of a point on screen @param y The vertical absolute position of ...
[ "Get", "the", "character", "offset", "closest", "to", "the", "specified", "absolute", "position", ".", "A", "typical", "use", "case", "is", "to", "pass", "the", "result", "of", "{", "@link", "android", ".", "view", ".", "MotionEvent#getX", "()", "}", "and"...
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/EditText.java#L2099-L2105
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.getStream
public GetStreamResponse getStream(String domain, String app, String stream) { """ Get detail of stream in the live stream service. @param domain The requested domain @param app The requested app @param stream The requested stream @return the response """ GetStreamRequest request = new GetStreamR...
java
public GetStreamResponse getStream(String domain, String app, String stream) { GetStreamRequest request = new GetStreamRequest(); request.withPlayDomain(domain).withApp(app).withStream(stream); return getStream(request); }
[ "public", "GetStreamResponse", "getStream", "(", "String", "domain", ",", "String", "app", ",", "String", "stream", ")", "{", "GetStreamRequest", "request", "=", "new", "GetStreamRequest", "(", ")", ";", "request", ".", "withPlayDomain", "(", "domain", ")", "....
Get detail of stream in the live stream service. @param domain The requested domain @param app The requested app @param stream The requested stream @return the response
[ "Get", "detail", "of", "stream", "in", "the", "live", "stream", "service", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1485-L1489
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java
JenkinsServer.createFolder
public JenkinsServer createFolder(String folderName, Boolean crumbFlag) throws IOException { """ Create a folder on the server (in the root) @param folderName name of the folder. @param crumbFlag <code>true</code> to add <b>crumbIssuer</b> <code>false</code> otherwise. @throws IOException in case of an error...
java
public JenkinsServer createFolder(String folderName, Boolean crumbFlag) throws IOException { return createFolder(null, folderName, crumbFlag); }
[ "public", "JenkinsServer", "createFolder", "(", "String", "folderName", ",", "Boolean", "crumbFlag", ")", "throws", "IOException", "{", "return", "createFolder", "(", "null", ",", "folderName", ",", "crumbFlag", ")", ";", "}" ]
Create a folder on the server (in the root) @param folderName name of the folder. @param crumbFlag <code>true</code> to add <b>crumbIssuer</b> <code>false</code> otherwise. @throws IOException in case of an error.
[ "Create", "a", "folder", "on", "the", "server", "(", "in", "the", "root", ")" ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L467-L469
aws/aws-sdk-java
aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/TagResourceRequest.java
TagResourceRequest.withTagsToAdd
public TagResourceRequest withTagsToAdd(java.util.Map<String, String> tagsToAdd) { """ <p> Tags to add to this resource. </p> @param tagsToAdd Tags to add to this resource. @return Returns a reference to this object so that method calls can be chained together. """ setTagsToAdd(tagsToAdd); ...
java
public TagResourceRequest withTagsToAdd(java.util.Map<String, String> tagsToAdd) { setTagsToAdd(tagsToAdd); return this; }
[ "public", "TagResourceRequest", "withTagsToAdd", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tagsToAdd", ")", "{", "setTagsToAdd", "(", "tagsToAdd", ")", ";", "return", "this", ";", "}" ]
<p> Tags to add to this resource. </p> @param tagsToAdd Tags to add to this resource. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Tags", "to", "add", "to", "this", "resource", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/TagResourceRequest.java#L137-L140
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-graph/src/main/java/org/deeplearning4j/graph/data/GraphLoader.java
GraphLoader.loadUndirectedGraphEdgeListFile
public static Graph<String, String> loadUndirectedGraphEdgeListFile(String path, int numVertices, String delim, boolean allowMultipleEdges) throws IOException { """ Simple method for loading an undirected graph, where the graph is represented by a edge list with one edge per line with a delimi...
java
public static Graph<String, String> loadUndirectedGraphEdgeListFile(String path, int numVertices, String delim, boolean allowMultipleEdges) throws IOException { Graph<String, String> graph = new Graph<>(numVertices, allowMultipleEdges, new StringVertexFactory()); EdgeLineProcessor<St...
[ "public", "static", "Graph", "<", "String", ",", "String", ">", "loadUndirectedGraphEdgeListFile", "(", "String", "path", ",", "int", "numVertices", ",", "String", "delim", ",", "boolean", "allowMultipleEdges", ")", "throws", "IOException", "{", "Graph", "<", "S...
Simple method for loading an undirected graph, where the graph is represented by a edge list with one edge per line with a delimiter in between<br> This method assumes that all lines in the file are of the form {@code i<delim>j} where i and j are integers in range 0 to numVertices inclusive, and "<delim>" is the user-p...
[ "Simple", "method", "for", "loading", "an", "undirected", "graph", "where", "the", "graph", "is", "represented", "by", "a", "edge", "list", "with", "one", "edge", "per", "line", "with", "a", "delimiter", "in", "between<br", ">", "This", "method", "assumes", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-graph/src/main/java/org/deeplearning4j/graph/data/GraphLoader.java#L67-L82
VoltDB/voltdb
src/frontend/org/voltdb/parser/SQLLexer.java
SQLLexer.matchTokenFast
private static boolean matchTokenFast(char[] buffer, int position, String lowercaseToken) { """ Quickly determine if the characters in a char array match the given token. Token must be specified in lower case, and must be all ASCII letters. Will return false if the token is preceded by alphanumeric characters---...
java
private static boolean matchTokenFast(char[] buffer, int position, String lowercaseToken) { if (position != 0 && isIdentifierPartFast(buffer[position - 1])) { // character at position is preceded by a letter or digit return false; } int tokenLength = lowercaseToken.lengt...
[ "private", "static", "boolean", "matchTokenFast", "(", "char", "[", "]", "buffer", ",", "int", "position", ",", "String", "lowercaseToken", ")", "{", "if", "(", "position", "!=", "0", "&&", "isIdentifierPartFast", "(", "buffer", "[", "position", "-", "1", ...
Quickly determine if the characters in a char array match the given token. Token must be specified in lower case, and must be all ASCII letters. Will return false if the token is preceded by alphanumeric characters--- it may be embedded in an indentifier in this case. Similar to the method matchesToken, but makes some ...
[ "Quickly", "determine", "if", "the", "characters", "in", "a", "char", "array", "match", "the", "given", "token", ".", "Token", "must", "be", "specified", "in", "lower", "case", "and", "must", "be", "all", "ASCII", "letters", ".", "Will", "return", "false",...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/parser/SQLLexer.java#L360-L385
apache/flink
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
AbstractYarnClusterDescriptor.uploadAndRegisterFiles
static List<String> uploadAndRegisterFiles( Collection<File> shipFiles, FileSystem fs, Path targetHomeDir, ApplicationId appId, List<Path> remotePaths, Map<String, LocalResource> localResources, StringBuilder envShipFileList) throws IOException, URISyntaxException { """ Recursively uploads (an...
java
static List<String> uploadAndRegisterFiles( Collection<File> shipFiles, FileSystem fs, Path targetHomeDir, ApplicationId appId, List<Path> remotePaths, Map<String, LocalResource> localResources, StringBuilder envShipFileList) throws IOException, URISyntaxException { final List<String> classPaths...
[ "static", "List", "<", "String", ">", "uploadAndRegisterFiles", "(", "Collection", "<", "File", ">", "shipFiles", ",", "FileSystem", "fs", ",", "Path", "targetHomeDir", ",", "ApplicationId", "appId", ",", "List", "<", "Path", ">", "remotePaths", ",", "Map", ...
Recursively uploads (and registers) any (user and system) files in <tt>shipFiles</tt> except for files matching "<tt>flink-dist*.jar</tt>" which should be uploaded separately. @param shipFiles files to upload @param fs file system to upload to @param targetHomeDir remote home directory to upload to @param appId applic...
[ "Recursively", "uploads", "(", "and", "registers", ")", "any", "(", "user", "and", "system", ")", "files", "in", "<tt", ">", "shipFiles<", "/", "tt", ">", "except", "for", "files", "matching", "<tt", ">", "flink", "-", "dist", "*", ".", "jar<", "/", ...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java#L1123-L1189
elki-project/elki
elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDKNNHeap.java
DoubleIntegerDBIDKNNHeap.updateHeap
private void updateHeap(final double distance, final int iid) { """ Do a full update for the heap. @param distance Distance @param iid Object id """ final double prevdist = kdist; final int previd = heap.peekValue(); heap.replaceTopElement(distance, iid); kdist = heap.peekKey(); // If...
java
private void updateHeap(final double distance, final int iid) { final double prevdist = kdist; final int previd = heap.peekValue(); heap.replaceTopElement(distance, iid); kdist = heap.peekKey(); // If the kdist improved, zap ties. if(kdist < prevdist) { numties = 0; } else { ...
[ "private", "void", "updateHeap", "(", "final", "double", "distance", ",", "final", "int", "iid", ")", "{", "final", "double", "prevdist", "=", "kdist", ";", "final", "int", "previd", "=", "heap", ".", "peekValue", "(", ")", ";", "heap", ".", "replaceTopE...
Do a full update for the heap. @param distance Distance @param iid Object id
[ "Do", "a", "full", "update", "for", "the", "heap", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-dbids-int/src/main/java/de/lmu/ifi/dbs/elki/database/ids/integer/DoubleIntegerDBIDKNNHeap.java#L145-L157
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java
JobsImpl.getTaskCountsAsync
public Observable<TaskCounts> getTaskCountsAsync(String jobId, JobGetTaskCountsOptions jobGetTaskCountsOptions) { """ Gets the task counts for the specified job. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the prepar...
java
public Observable<TaskCounts> getTaskCountsAsync(String jobId, JobGetTaskCountsOptions jobGetTaskCountsOptions) { return getTaskCountsWithServiceResponseAsync(jobId, jobGetTaskCountsOptions).map(new Func1<ServiceResponseWithHeaders<TaskCounts, JobGetTaskCountsHeaders>, TaskCounts>() { @Override ...
[ "public", "Observable", "<", "TaskCounts", ">", "getTaskCountsAsync", "(", "String", "jobId", ",", "JobGetTaskCountsOptions", "jobGetTaskCountsOptions", ")", "{", "return", "getTaskCountsWithServiceResponseAsync", "(", "jobId", ",", "jobGetTaskCountsOptions", ")", ".", "m...
Gets the task counts for the specified job. Task counts provide a count of the tasks by active, running or completed task state, and a count of tasks which succeeded or failed. Tasks in the preparing state are counted as running. @param jobId The ID of the job. @param jobGetTaskCountsOptions Additional parameters for ...
[ "Gets", "the", "task", "counts", "for", "the", "specified", "job", ".", "Task", "counts", "provide", "a", "count", "of", "the", "tasks", "by", "active", "running", "or", "completed", "task", "state", "and", "a", "count", "of", "tasks", "which", "succeeded"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L3234-L3241
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/AliasChainValidator.java
AliasChainValidator.validate
public void validate(String destName, String busName) throws SINotPossibleInCurrentConfigurationException { """ Check that the given destination, busname combination has not been seen before when resolving an alias. If it has not been seen, we add it to the map for checking next time. @param destName @param...
java
public void validate(String destName, String busName) throws SINotPossibleInCurrentConfigurationException { if (tc.isEntryEnabled()) SibTr.entry(tc, "validate", new Object[] { destName, busName }); if (collector.contains(destName, busName)) { // Throw out exception detailing loop ...
[ "public", "void", "validate", "(", "String", "destName", ",", "String", "busName", ")", "throws", "SINotPossibleInCurrentConfigurationException", "{", "if", "(", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"validate\"", ...
Check that the given destination, busname combination has not been seen before when resolving an alias. If it has not been seen, we add it to the map for checking next time. @param destName @param busName @throws SINotPossibleInCurrentConfigurationException Thrown if a loop has been detected.
[ "Check", "that", "the", "given", "destination", "busname", "combination", "has", "not", "been", "seen", "before", "when", "resolving", "an", "alias", ".", "If", "it", "has", "not", "been", "seen", "we", "add", "it", "to", "the", "map", "for", "checking", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/AliasChainValidator.java#L76-L110
biojava/biojava
biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/FeatureList.java
FeatureList.selectByUserData
public FeatureList selectByUserData(String key, Object value) { """ Create a list of all features that include the specified key/value pair in their userMap(). @param key The key to consider. @param value The value to consider. @return A list of features that include the key/value pair. """ FeatureList ...
java
public FeatureList selectByUserData(String key, Object value) { FeatureList list = new FeatureList(); for (FeatureI f : this) { Object o = f.userData().get(key); if (o != null && o.equals(value)) { list.add(f); } } return list; }
[ "public", "FeatureList", "selectByUserData", "(", "String", "key", ",", "Object", "value", ")", "{", "FeatureList", "list", "=", "new", "FeatureList", "(", ")", ";", "for", "(", "FeatureI", "f", ":", "this", ")", "{", "Object", "o", "=", "f", ".", "use...
Create a list of all features that include the specified key/value pair in their userMap(). @param key The key to consider. @param value The value to consider. @return A list of features that include the key/value pair.
[ "Create", "a", "list", "of", "all", "features", "that", "include", "the", "specified", "key", "/", "value", "pair", "in", "their", "userMap", "()", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-genome/src/main/java/org/biojava/nbio/genome/parsers/gff/FeatureList.java#L319-L328
eclipse/xtext-lib
org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/MapExtensions.java
MapExtensions.forEach
public static <K, V> void forEach(Map<K, V> map, Procedure2<? super K, ? super V> procedure) { """ Applies the given {@code procedure} for each {@link java.util.Map.Entry key value pair} of the given {@code map}. @param map the map. May not be <code>null</code>. @param procedure the procedure. May not be <co...
java
public static <K, V> void forEach(Map<K, V> map, Procedure2<? super K, ? super V> procedure) { if (procedure == null) throw new NullPointerException("procedure"); for (Map.Entry<K, V> entry : map.entrySet()) { procedure.apply(entry.getKey(), entry.getValue()); } }
[ "public", "static", "<", "K", ",", "V", ">", "void", "forEach", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "Procedure2", "<", "?", "super", "K", ",", "?", "super", "V", ">", "procedure", ")", "{", "if", "(", "procedure", "==", "null", ")"...
Applies the given {@code procedure} for each {@link java.util.Map.Entry key value pair} of the given {@code map}. @param map the map. May not be <code>null</code>. @param procedure the procedure. May not be <code>null</code>.
[ "Applies", "the", "given", "{", "@code", "procedure", "}", "for", "each", "{", "@link", "java", ".", "util", ".", "Map", ".", "Entry", "key", "value", "pair", "}", "of", "the", "given", "{", "@code", "map", "}", "." ]
train
https://github.com/eclipse/xtext-lib/blob/7063572e1f1bd713a3aa53bdf3a8dc60e25c169a/org.eclipse.xtext.xbase.lib/src/org/eclipse/xtext/xbase/lib/MapExtensions.java#L44-L50
logic-ng/LogicNG
src/main/java/org/logicng/io/readers/DimacsReader.java
DimacsReader.readCNF
public static List<Formula> readCNF(final File file, final FormulaFactory f) throws IOException { """ Reads a given DIMACS CNF file and returns the contained clauses as a list of formulas. @param file the file @param f the formula factory @return the list of formulas (clauses) @throws IOException if there w...
java
public static List<Formula> readCNF(final File file, final FormulaFactory f) throws IOException { return readCNF(file, f, "v"); }
[ "public", "static", "List", "<", "Formula", ">", "readCNF", "(", "final", "File", "file", ",", "final", "FormulaFactory", "f", ")", "throws", "IOException", "{", "return", "readCNF", "(", "file", ",", "f", ",", "\"v\"", ")", ";", "}" ]
Reads a given DIMACS CNF file and returns the contained clauses as a list of formulas. @param file the file @param f the formula factory @return the list of formulas (clauses) @throws IOException if there was a problem reading the file
[ "Reads", "a", "given", "DIMACS", "CNF", "file", "and", "returns", "the", "contained", "clauses", "as", "a", "list", "of", "formulas", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/io/readers/DimacsReader.java#L68-L70
SonarSource/sonarqube
server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java
IssueDao.selectByKeys
public List<IssueDto> selectByKeys(DbSession session, Collection<String> keys) { """ Gets a list issues by their keys. The result does NOT contain {@code null} values for issues not found, so the size of result may be less than the number of keys. A single issue is returned if input keys contain multiple occurre...
java
public List<IssueDto> selectByKeys(DbSession session, Collection<String> keys) { return executeLargeInputs(keys, mapper(session)::selectByKeys); }
[ "public", "List", "<", "IssueDto", ">", "selectByKeys", "(", "DbSession", "session", ",", "Collection", "<", "String", ">", "keys", ")", "{", "return", "executeLargeInputs", "(", "keys", ",", "mapper", "(", "session", ")", "::", "selectByKeys", ")", ";", "...
Gets a list issues by their keys. The result does NOT contain {@code null} values for issues not found, so the size of result may be less than the number of keys. A single issue is returned if input keys contain multiple occurrences of a key. <p>Results may be in a different order as input keys.</p>
[ "Gets", "a", "list", "issues", "by", "their", "keys", ".", "The", "result", "does", "NOT", "contain", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java#L56-L58
alkacon/opencms-core
src-modules/org/opencms/workplace/CmsTabDialog.java
CmsTabDialog.dialogTabContentStart
public String dialogTabContentStart(String title, String attributes) { """ Returns the start html for the tab content area of the dialog window.<p> @param title the title for the dialog @param attributes additional attributes for the content &lt;div&gt; area of the tab dialog @return the start html for the ta...
java
public String dialogTabContentStart(String title, String attributes) { return dialogTabContent(HTML_START, title, attributes); }
[ "public", "String", "dialogTabContentStart", "(", "String", "title", ",", "String", "attributes", ")", "{", "return", "dialogTabContent", "(", "HTML_START", ",", "title", ",", "attributes", ")", ";", "}" ]
Returns the start html for the tab content area of the dialog window.<p> @param title the title for the dialog @param attributes additional attributes for the content &lt;div&gt; area of the tab dialog @return the start html for the tab content area of the dialog window
[ "Returns", "the", "start", "html", "for", "the", "tab", "content", "area", "of", "the", "dialog", "window", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/CmsTabDialog.java#L164-L167
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/graph/WeightedLinkClustering.java
WeightedLinkClustering.getVertexWeightVector
private <E extends WeightedEdge> SparseDoubleVector getVertexWeightVector( WeightedGraph<E> g, int vertex) { """ Returns the normalized weight vector for the specified row, to be used in edge comparisons. The weight vector is normalized by the number of edges from the row with positive weights and i...
java
private <E extends WeightedEdge> SparseDoubleVector getVertexWeightVector( WeightedGraph<E> g, int vertex) { if (keepWeightVectors) { SparseDoubleVector weightVec = vertexToWeightVector.get(vertex); if (weightVec == null) { synchronized(this) { ...
[ "private", "<", "E", "extends", "WeightedEdge", ">", "SparseDoubleVector", "getVertexWeightVector", "(", "WeightedGraph", "<", "E", ">", "g", ",", "int", "vertex", ")", "{", "if", "(", "keepWeightVectors", ")", "{", "SparseDoubleVector", "weightVec", "=", "verte...
Returns the normalized weight vector for the specified row, to be used in edge comparisons. The weight vector is normalized by the number of edges from the row with positive weights and includes a weight for the row to itself, which reflects the similarity of the keystone nod.
[ "Returns", "the", "normalized", "weight", "vector", "for", "the", "specified", "row", "to", "be", "used", "in", "edge", "comparisons", ".", "The", "weight", "vector", "is", "normalized", "by", "the", "number", "of", "edges", "from", "the", "row", "with", "...
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/graph/WeightedLinkClustering.java#L107-L124
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbsite_stats.java
gslbsite_stats.get
public static gslbsite_stats get(nitro_service service, String sitename) throws Exception { """ Use this API to fetch statistics of gslbsite_stats resource of given name . """ gslbsite_stats obj = new gslbsite_stats(); obj.set_sitename(sitename); gslbsite_stats response = (gslbsite_stats) obj.stat_resour...
java
public static gslbsite_stats get(nitro_service service, String sitename) throws Exception{ gslbsite_stats obj = new gslbsite_stats(); obj.set_sitename(sitename); gslbsite_stats response = (gslbsite_stats) obj.stat_resource(service); return response; }
[ "public", "static", "gslbsite_stats", "get", "(", "nitro_service", "service", ",", "String", "sitename", ")", "throws", "Exception", "{", "gslbsite_stats", "obj", "=", "new", "gslbsite_stats", "(", ")", ";", "obj", ".", "set_sitename", "(", "sitename", ")", ";...
Use this API to fetch statistics of gslbsite_stats resource of given name .
[ "Use", "this", "API", "to", "fetch", "statistics", "of", "gslbsite_stats", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/gslb/gslbsite_stats.java#L339-L344
BotMill/fb-botmill
src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/AttachmentMessageBuilder.java
AttachmentMessageBuilder.addQuickReply
public AttachmentMessageBuilder addQuickReply(String title, String payload) { """ Adds a {@link QuickReply} to the current object. @param title the quick reply button label. It can't be empty. @param payload the payload sent back when the button is pressed. It can't be empty. @return this builder. @see <a...
java
public AttachmentMessageBuilder addQuickReply(String title, String payload) { if (this.quickReplies == null) { this.quickReplies = new ArrayList<QuickReply>(); } this.quickReplies.add(new QuickReply(title, payload)); return this; }
[ "public", "AttachmentMessageBuilder", "addQuickReply", "(", "String", "title", ",", "String", "payload", ")", "{", "if", "(", "this", ".", "quickReplies", "==", "null", ")", "{", "this", ".", "quickReplies", "=", "new", "ArrayList", "<", "QuickReply", ">", "...
Adds a {@link QuickReply} to the current object. @param title the quick reply button label. It can't be empty. @param payload the payload sent back when the button is pressed. It can't be empty. @return this builder. @see <a href= "https://developers.facebook.com/docs/messenger-platform/send-api-reference/quick-replie...
[ "Adds", "a", "{", "@link", "QuickReply", "}", "to", "the", "current", "object", "." ]
train
https://github.com/BotMill/fb-botmill/blob/d94da3615a7339822c137ef75c92a03d791ee969/src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/AttachmentMessageBuilder.java#L95-L101
looly/hutool
hutool-core/src/main/java/cn/hutool/core/lang/Console.java
Console.log
public static void log(Throwable t, String template, Object... values) { """ 同 System.out.println()方法,打印控制台日志 @param t 异常对象 @param template 文本模板,被替换的部分用 {} 表示 @param values 值 """ out.println(StrUtil.format(template, values)); if (null != t) { t.printStackTrace(); out.flush(); } }
java
public static void log(Throwable t, String template, Object... values) { out.println(StrUtil.format(template, values)); if (null != t) { t.printStackTrace(); out.flush(); } }
[ "public", "static", "void", "log", "(", "Throwable", "t", ",", "String", "template", ",", "Object", "...", "values", ")", "{", "out", ".", "println", "(", "StrUtil", ".", "format", "(", "template", ",", "values", ")", ")", ";", "if", "(", "null", "!=...
同 System.out.println()方法,打印控制台日志 @param t 异常对象 @param template 文本模板,被替换的部分用 {} 表示 @param values 值
[ "同", "System", ".", "out", ".", "println", "()", "方法,打印控制台日志" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/lang/Console.java#L107-L113
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/SegmentMetadataUpdateTransaction.java
SegmentMetadataUpdateTransaction.preProcessAsTargetSegment
void preProcessAsTargetSegment(MergeSegmentOperation operation, SegmentMetadataUpdateTransaction sourceMetadata) throws StreamSegmentSealedException, StreamSegmentNotSealedException, MetadataUpdateException { """ Pre-processes the given MergeSegmentOperation as a Target Segment (where it will be merged...
java
void preProcessAsTargetSegment(MergeSegmentOperation operation, SegmentMetadataUpdateTransaction sourceMetadata) throws StreamSegmentSealedException, StreamSegmentNotSealedException, MetadataUpdateException { ensureSegmentId(operation); if (this.sealed) { // We do not allow merg...
[ "void", "preProcessAsTargetSegment", "(", "MergeSegmentOperation", "operation", ",", "SegmentMetadataUpdateTransaction", "sourceMetadata", ")", "throws", "StreamSegmentSealedException", ",", "StreamSegmentNotSealedException", ",", "MetadataUpdateException", "{", "ensureSegmentId", ...
Pre-processes the given MergeSegmentOperation as a Target Segment (where it will be merged into). After this method returns, the operation will have its TargetSegmentOffset set to the length of the Target Segment. @param operation The operation to pre-process. @param sourceMetadata The metadata for the Stream Seg...
[ "Pre", "-", "processes", "the", "given", "MergeSegmentOperation", "as", "a", "Target", "Segment", "(", "where", "it", "will", "be", "merged", "into", ")", ".", "After", "this", "method", "returns", "the", "operation", "will", "have", "its", "TargetSegmentOffse...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/SegmentMetadataUpdateTransaction.java#L366-L390
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/Env.java
Env.collectVariables
public void collectVariables(EnvVars env, Run build, TaskListener listener) { """ Collect environment variables and system properties under with filter constrains """ EnvVars buildParameters = Utils.extractBuildParameters(build, listener); if (buildParameters != null) { env.putAll(b...
java
public void collectVariables(EnvVars env, Run build, TaskListener listener) { EnvVars buildParameters = Utils.extractBuildParameters(build, listener); if (buildParameters != null) { env.putAll(buildParameters); } addAllWithFilter(envVars, env, filter.getPatternFilter()); ...
[ "public", "void", "collectVariables", "(", "EnvVars", "env", ",", "Run", "build", ",", "TaskListener", "listener", ")", "{", "EnvVars", "buildParameters", "=", "Utils", ".", "extractBuildParameters", "(", "build", ",", "listener", ")", ";", "if", "(", "buildPa...
Collect environment variables and system properties under with filter constrains
[ "Collect", "environment", "variables", "and", "system", "properties", "under", "with", "filter", "constrains" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/Env.java#L36-L50
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathFinderImpl.java
PathFinderImpl.getHeuristicCost
public double getHeuristicCost(int stx, int sty, int dtx, int dty) { """ Get the heuristic cost for the given location. This determines in which order the locations are processed. @param stx The x coordinate of the tile whose cost is being determined @param sty The y coordinate of the tile whose cost is being ...
java
public double getHeuristicCost(int stx, int sty, int dtx, int dty) { return heuristic.getCost(stx, sty, dtx, dty); }
[ "public", "double", "getHeuristicCost", "(", "int", "stx", ",", "int", "sty", ",", "int", "dtx", ",", "int", "dty", ")", "{", "return", "heuristic", ".", "getCost", "(", "stx", ",", "sty", ",", "dtx", ",", "dty", ")", ";", "}" ]
Get the heuristic cost for the given location. This determines in which order the locations are processed. @param stx The x coordinate of the tile whose cost is being determined @param sty The y coordinate of the tile whose cost is being determined @param dtx The x coordinate of the target location @param dty The y co...
[ "Get", "the", "heuristic", "cost", "for", "the", "given", "location", ".", "This", "determines", "in", "which", "order", "the", "locations", "are", "processed", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathFinderImpl.java#L97-L100
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/internal/Utils.java
Utils.checkIndex
public static void checkIndex(int index, int size) { """ Validates an index in an array or other container. This method throws an {@link IllegalArgumentException} if the size is negative and throws an {@link IndexOutOfBoundsException} if the index is negative or greater than or equal to the size. This method is...
java
public static void checkIndex(int index, int size) { if (size < 0) { throw new IllegalArgumentException("Negative size: " + size); } if (index < 0 || index >= size) { throw new IndexOutOfBoundsException("Index out of bounds: size=" + size + ", index=" + index); } }
[ "public", "static", "void", "checkIndex", "(", "int", "index", ",", "int", "size", ")", "{", "if", "(", "size", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Negative size: \"", "+", "size", ")", ";", "}", "if", "(", "index", ...
Validates an index in an array or other container. This method throws an {@link IllegalArgumentException} if the size is negative and throws an {@link IndexOutOfBoundsException} if the index is negative or greater than or equal to the size. This method is similar to {@code Preconditions.checkElementIndex(int, int)} fro...
[ "Validates", "an", "index", "in", "an", "array", "or", "other", "container", ".", "This", "method", "throws", "an", "{", "@link", "IllegalArgumentException", "}", "if", "the", "size", "is", "negative", "and", "throws", "an", "{", "@link", "IndexOutOfBoundsExce...
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/internal/Utils.java#L94-L101
Netflix/netflix-commons
netflix-eventbus/src/main/java/com/netflix/eventbus/utils/EventBusUtils.java
EventBusUtils.getSubscriberConfig
public static SubscriberConfigProvider.SubscriberConfig getSubscriberConfig(Method subMethod, Object subscriber) { """ Returns configuration for the passed subscriber method. This configuration can be obtained from the {@link Subscribe} annotation on the method or from {@link SubscriberConfigProvider} if the subs...
java
public static SubscriberConfigProvider.SubscriberConfig getSubscriberConfig(Method subMethod, Object subscriber) { Preconditions.checkNotNull(subscriber); Preconditions.checkNotNull(subMethod); Subscribe annotation = subMethod.getAnnotation(Subscribe.class); if (null == annotation) { ...
[ "public", "static", "SubscriberConfigProvider", ".", "SubscriberConfig", "getSubscriberConfig", "(", "Method", "subMethod", ",", "Object", "subscriber", ")", "{", "Preconditions", ".", "checkNotNull", "(", "subscriber", ")", ";", "Preconditions", ".", "checkNotNull", ...
Returns configuration for the passed subscriber method. This configuration can be obtained from the {@link Subscribe} annotation on the method or from {@link SubscriberConfigProvider} if the subscriber implements that interface. @param subscriber The instance of the subscriber that contains the subscriber method. @par...
[ "Returns", "configuration", "for", "the", "passed", "subscriber", "method", ".", "This", "configuration", "can", "be", "obtained", "from", "the", "{", "@link", "Subscribe", "}", "annotation", "on", "the", "method", "or", "from", "{", "@link", "SubscriberConfigPr...
train
https://github.com/Netflix/netflix-commons/blob/7a158af76906d4a9b753e9344ce3e7abeb91dc01/netflix-eventbus/src/main/java/com/netflix/eventbus/utils/EventBusUtils.java#L62-L80
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/tileprovider/cachemanager/CacheManager.java
CacheManager.downloadAreaAsync
public CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback) { """ Download in background all tiles covered by the GePoints list in osmdroid cache. @param ctx @param geoPoints @param zoomMin @param zoomMax ...
java
public CacheManagerTask downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, final int zoomMin, final int zoomMax, final CacheManagerCallback callback) { final CacheManagerTask task = new CacheManagerTask(this, getDownloadingAction(), geoPoints, zoomMin, zoomMax); task.addCallback(callback); ...
[ "public", "CacheManagerTask", "downloadAreaAsync", "(", "Context", "ctx", ",", "ArrayList", "<", "GeoPoint", ">", "geoPoints", ",", "final", "int", "zoomMin", ",", "final", "int", "zoomMax", ",", "final", "CacheManagerCallback", "callback", ")", "{", "final", "C...
Download in background all tiles covered by the GePoints list in osmdroid cache. @param ctx @param geoPoints @param zoomMin @param zoomMax
[ "Download", "in", "background", "all", "tiles", "covered", "by", "the", "GePoints", "list", "in", "osmdroid", "cache", "." ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/tileprovider/cachemanager/CacheManager.java#L436-L441
skuzzle/semantic-version
src/main/java/de/skuzzle/semantic/Version.java
Version.max
public static Version max(Version v1, Version v2) { """ Returns the greater of the two given versions by comparing them using their natural ordering. If both versions are equal, then the first argument is returned. @param v1 The first version. @param v2 The second version. @return The greater version. @thro...
java
public static Version max(Version v1, Version v2) { require(v1 != null, "v1 is null"); require(v2 != null, "v2 is null"); return compare(v1, v2, false) < 0 ? v2 : v1; }
[ "public", "static", "Version", "max", "(", "Version", "v1", ",", "Version", "v2", ")", "{", "require", "(", "v1", "!=", "null", ",", "\"v1 is null\"", ")", ";", "require", "(", "v2", "!=", "null", ",", "\"v2 is null\"", ")", ";", "return", "compare", "...
Returns the greater of the two given versions by comparing them using their natural ordering. If both versions are equal, then the first argument is returned. @param v1 The first version. @param v2 The second version. @return The greater version. @throws IllegalArgumentException If either argument is <code>null</code>...
[ "Returns", "the", "greater", "of", "the", "two", "given", "versions", "by", "comparing", "them", "using", "their", "natural", "ordering", ".", "If", "both", "versions", "are", "equal", "then", "the", "first", "argument", "is", "returned", "." ]
train
https://github.com/skuzzle/semantic-version/blob/2ddb66fb80244cd7f67c77ed5f8072d1132ad933/src/main/java/de/skuzzle/semantic/Version.java#L1048-L1054
tminglei/form-binder-java
src/main/java/com/github/tminglei/bind/Mappings.java
Mappings.bigDecimal
public static Mapping<BigDecimal> bigDecimal(Constraint... constraints) { """ (convert to BigDecimal) mapping @param constraints constraints @return new created mapping """ return new FieldMapping( InputMode.SINGLE, mkSimpleConverter(s -> isEmptyStr...
java
public static Mapping<BigDecimal> bigDecimal(Constraint... constraints) { return new FieldMapping( InputMode.SINGLE, mkSimpleConverter(s -> isEmptyStr(s) ? BigDecimal.ZERO : new BigDecimal(s) ), new MappingMeta(MAPPING_BIG_DECIMAL, BigDecimal.c...
[ "public", "static", "Mapping", "<", "BigDecimal", ">", "bigDecimal", "(", "Constraint", "...", "constraints", ")", "{", "return", "new", "FieldMapping", "(", "InputMode", ".", "SINGLE", ",", "mkSimpleConverter", "(", "s", "->", "isEmptyStr", "(", "s", ")", "...
(convert to BigDecimal) mapping @param constraints constraints @return new created mapping
[ "(", "convert", "to", "BigDecimal", ")", "mapping" ]
train
https://github.com/tminglei/form-binder-java/blob/4c0bd1e8f81ae56b21142bb525ee6b4deb7f92ab/src/main/java/com/github/tminglei/bind/Mappings.java#L122-L130
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java
FlowController.addActionError
protected void addActionError( String propertyName, String messageKey, Object[] messageArgs ) { """ Add a property-related message that will be shown with the Errors and Error tags. @param propertyName the name of the property with which to associate this error. @param messageKey the message-resources key for ...
java
protected void addActionError( String propertyName, String messageKey, Object[] messageArgs ) { InternalUtils.addActionError( propertyName, new ActionMessage( messageKey, messageArgs ), getRequest() ); }
[ "protected", "void", "addActionError", "(", "String", "propertyName", ",", "String", "messageKey", ",", "Object", "[", "]", "messageArgs", ")", "{", "InternalUtils", ".", "addActionError", "(", "propertyName", ",", "new", "ActionMessage", "(", "messageKey", ",", ...
Add a property-related message that will be shown with the Errors and Error tags. @param propertyName the name of the property with which to associate this error. @param messageKey the message-resources key for the message. @param messageArgs zero or more arguments to the message.
[ "Add", "a", "property", "-", "related", "message", "that", "will", "be", "shown", "with", "the", "Errors", "and", "Error", "tags", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java#L1471-L1474
gs2io/gs2-java-sdk-core
src/main/java/io/gs2/AbstractGs2Client.java
AbstractGs2Client.createHttpPost
protected HttpPost createHttpPost(String url, IGs2Credential credential, String service, String module, String function, String body) { """ POSTリクエストを生成 @param url アクセス先URL @param credential 認証情報 @param service アクセス先サービス @param module アクセス先モジュール @param function アクセス先ファンクション @param body リクエストボディ @return リク...
java
protected HttpPost createHttpPost(String url, IGs2Credential credential, String service, String module, String function, String body) { Long timestamp = System.currentTimeMillis()/1000; url = StringUtils.replace(url, "{service}", service); url = StringUtils.replace(url, "{region}", region.getName()); HttpPost p...
[ "protected", "HttpPost", "createHttpPost", "(", "String", "url", ",", "IGs2Credential", "credential", ",", "String", "service", ",", "String", "module", ",", "String", "function", ",", "String", "body", ")", "{", "Long", "timestamp", "=", "System", ".", "curre...
POSTリクエストを生成 @param url アクセス先URL @param credential 認証情報 @param service アクセス先サービス @param module アクセス先モジュール @param function アクセス先ファンクション @param body リクエストボディ @return リクエストオブジェクト
[ "POSTリクエストを生成" ]
train
https://github.com/gs2io/gs2-java-sdk-core/blob/fe66ee4e374664b101b07c41221a3b32c844127d/src/main/java/io/gs2/AbstractGs2Client.java#L115-L124
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/animation/transformation/Scale.java
Scale.from
protected Scale from(float x, float y, float z) { """ Sets the starting scale. @param x the x @param y the y @param z the z @return the scale """ fromX = x; fromY = y; fromZ = z; return this; }
java
protected Scale from(float x, float y, float z) { fromX = x; fromY = y; fromZ = z; return this; }
[ "protected", "Scale", "from", "(", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "fromX", "=", "x", ";", "fromY", "=", "y", ";", "fromZ", "=", "z", ";", "return", "this", ";", "}" ]
Sets the starting scale. @param x the x @param y the y @param z the z @return the scale
[ "Sets", "the", "starting", "scale", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/animation/transformation/Scale.java#L89-L95
JM-Lab/utils-elasticsearch
src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java
JMElasticsearchSearchAndCount.searchAll
public SearchResponse searchAll(String index, String type, QueryBuilder filterQueryBuilder) { """ Search all search response. @param index the index @param type the type @param filterQueryBuilder the filter query builder @return the search response """ retur...
java
public SearchResponse searchAll(String index, String type, QueryBuilder filterQueryBuilder) { return searchAll(index, type, filterQueryBuilder, null); }
[ "public", "SearchResponse", "searchAll", "(", "String", "index", ",", "String", "type", ",", "QueryBuilder", "filterQueryBuilder", ")", "{", "return", "searchAll", "(", "index", ",", "type", ",", "filterQueryBuilder", ",", "null", ")", ";", "}" ]
Search all search response. @param index the index @param type the type @param filterQueryBuilder the filter query builder @return the search response
[ "Search", "all", "search", "response", "." ]
train
https://github.com/JM-Lab/utils-elasticsearch/blob/6ccec90e1e51d65d2af5efbb6d7b9f9bad90e638/src/main/java/kr/jm/utils/elasticsearch/JMElasticsearchSearchAndCount.java#L470-L473
shinesolutions/swagger-aem
java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java
SlingApi.postQueryAsync
public com.squareup.okhttp.Call postQueryAsync(String path, BigDecimal pLimit, String _1Property, String _1PropertyValue, final ApiCallback<String> callback) throws ApiException { """ (asynchronously) @param path (required) @param pLimit (required) @param _1Property (required) @param _1PropertyValue (req...
java
public com.squareup.okhttp.Call postQueryAsync(String path, BigDecimal pLimit, String _1Property, String _1PropertyValue, final ApiCallback<String> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestL...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "postQueryAsync", "(", "String", "path", ",", "BigDecimal", "pLimit", ",", "String", "_1Property", ",", "String", "_1PropertyValue", ",", "final", "ApiCallback", "<", "String", ">", "callback", ")",...
(asynchronously) @param path (required) @param pLimit (required) @param _1Property (required) @param _1PropertyValue (required) @param callback The callback to be executed when the API call finishes @return The request call @throws ApiException If fail to process the API call, e.g. serializing the request body obj...
[ "(", "asynchronously", ")" ]
train
https://github.com/shinesolutions/swagger-aem/blob/ae7da4df93e817dc2bad843779b2069d9c4e7c6b/java/generated/src/main/java/com/shinesolutions/swaggeraem4j/api/SlingApi.java#L4196-L4221
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java
AttributeDefinition.validateAndSet
public final void validateAndSet(ModelNode operationObject, final ModelNode model) throws OperationFailedException { """ Finds a value in the given {@code operationObject} whose key matches this attribute's {@link #getName() name}, validates it using this attribute's {@link #getValidator() validator}, and, stores...
java
public final void validateAndSet(ModelNode operationObject, final ModelNode model) throws OperationFailedException { if (operationObject.hasDefined(name) && deprecationData != null && deprecationData.isNotificationUseful()) { ControllerLogger.DEPRECATED_LOGGER.attributeDeprecated(getName(), ...
[ "public", "final", "void", "validateAndSet", "(", "ModelNode", "operationObject", ",", "final", "ModelNode", "model", ")", "throws", "OperationFailedException", "{", "if", "(", "operationObject", ".", "hasDefined", "(", "name", ")", "&&", "deprecationData", "!=", ...
Finds a value in the given {@code operationObject} whose key matches this attribute's {@link #getName() name}, validates it using this attribute's {@link #getValidator() validator}, and, stores it under this attribute's name in the given {@code model}. @param operationObject model node of type {@link ModelType#OBJECT}...
[ "Finds", "a", "value", "in", "the", "given", "{", "@code", "operationObject", "}", "whose", "key", "matches", "this", "attribute", "s", "{", "@link", "#getName", "()", "name", "}", "validates", "it", "using", "this", "attribute", "s", "{", "@link", "#getVa...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java#L503-L521
michel-kraemer/bson4jackson
src/main/java/de/undercouch/bson4jackson/io/DynamicOutputBuffer.java
DynamicOutputBuffer.putInt
public void putInt(int pos, int i) { """ Puts a 32-bit integer into the buffer at the given position. Does not increase the write position. @param pos the position where to put the integer @param i the integer to put """ adaptSize(pos + 4); ByteBuffer bb = getBuffer(pos); int index = pos % _bufferSize...
java
public void putInt(int pos, int i) { adaptSize(pos + 4); ByteBuffer bb = getBuffer(pos); int index = pos % _bufferSize; if (bb.limit() - index >= 4) { bb.putInt(index, i); } else { byte b0 = (byte)i; byte b1 = (byte)(i >> 8); byte b2 = (byte)(i >> 16); byte b3 = (byte)(i >> 24); if (_ord...
[ "public", "void", "putInt", "(", "int", "pos", ",", "int", "i", ")", "{", "adaptSize", "(", "pos", "+", "4", ")", ";", "ByteBuffer", "bb", "=", "getBuffer", "(", "pos", ")", ";", "int", "index", "=", "pos", "%", "_bufferSize", ";", "if", "(", "bb...
Puts a 32-bit integer into the buffer at the given position. Does not increase the write position. @param pos the position where to put the integer @param i the integer to put
[ "Puts", "a", "32", "-", "bit", "integer", "into", "the", "buffer", "at", "the", "given", "position", ".", "Does", "not", "increase", "the", "write", "position", "." ]
train
https://github.com/michel-kraemer/bson4jackson/blob/32d2ab3c516b3c07490fdfcf0c5e4ed0a2ee3979/src/main/java/de/undercouch/bson4jackson/io/DynamicOutputBuffer.java#L393-L411
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/io/Files.java
Files.equal
public static boolean equal(File file1, File file2) throws IOException { """ Returns true if the files contains the same bytes. @throws IOException if an I/O error occurs """ checkNotNull(file1); checkNotNull(file2); if (file1 == file2 || file1.equals(file2)) { return true; } /* ...
java
public static boolean equal(File file1, File file2) throws IOException { checkNotNull(file1); checkNotNull(file2); if (file1 == file2 || file1.equals(file2)) { return true; } /* * Some operating systems may return zero as the length for files denoting system-dependent * entities suc...
[ "public", "static", "boolean", "equal", "(", "File", "file1", ",", "File", "file2", ")", "throws", "IOException", "{", "checkNotNull", "(", "file1", ")", ";", "checkNotNull", "(", "file2", ")", ";", "if", "(", "file1", "==", "file2", "||", "file1", ".", ...
Returns true if the files contains the same bytes. @throws IOException if an I/O error occurs
[ "Returns", "true", "if", "the", "files", "contains", "the", "same", "bytes", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/io/Files.java#L366-L384
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.toUnique
public static <T> Collection<T> toUnique(Iterable<T> self) { """ Returns a Collection containing the items from the Iterable but with duplicates removed using the natural ordering of the items to determine uniqueness. <p> <pre class="groovyTestCase"> String[] letters = ['c', 'a', 't', 's', 'a', 't', 'h', 'a', ...
java
public static <T> Collection<T> toUnique(Iterable<T> self) { return toUnique(self, (Comparator<T>) null); }
[ "public", "static", "<", "T", ">", "Collection", "<", "T", ">", "toUnique", "(", "Iterable", "<", "T", ">", "self", ")", "{", "return", "toUnique", "(", "self", ",", "(", "Comparator", "<", "T", ">", ")", "null", ")", ";", "}" ]
Returns a Collection containing the items from the Iterable but with duplicates removed using the natural ordering of the items to determine uniqueness. <p> <pre class="groovyTestCase"> String[] letters = ['c', 'a', 't', 's', 'a', 't', 'h', 'a', 't'] String[] expected = ['c', 'a', 't', 's', 'h'] assert letters.toUnique...
[ "Returns", "a", "Collection", "containing", "the", "items", "from", "the", "Iterable", "but", "with", "duplicates", "removed", "using", "the", "natural", "ordering", "of", "the", "items", "to", "determine", "uniqueness", ".", "<p", ">", "<pre", "class", "=", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L1924-L1926
glyptodon/guacamole-client
guacamole/src/main/java/org/apache/guacamole/extension/Extension.java
Extension.getAuthenticationProviderClass
@SuppressWarnings("unchecked") // We check this ourselves with isAssignableFrom() private Class<AuthenticationProvider> getAuthenticationProviderClass(String name) throws GuacamoleException { """ Retrieve the AuthenticationProvider subclass having the given name. If the class having the given name...
java
@SuppressWarnings("unchecked") // We check this ourselves with isAssignableFrom() private Class<AuthenticationProvider> getAuthenticationProviderClass(String name) throws GuacamoleException { try { // Get authentication provider class Class<?> authenticationProviderClas...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// We check this ourselves with isAssignableFrom()", "private", "Class", "<", "AuthenticationProvider", ">", "getAuthenticationProviderClass", "(", "String", "name", ")", "throws", "GuacamoleException", "{", "try", "{", "...
Retrieve the AuthenticationProvider subclass having the given name. If the class having the given name does not exist or isn't actually a subclass of AuthenticationProvider, an exception will be thrown. @param name The name of the AuthenticationProvider class to retrieve. @return The subclass of AuthenticationProvide...
[ "Retrieve", "the", "AuthenticationProvider", "subclass", "having", "the", "given", "name", ".", "If", "the", "class", "having", "the", "given", "name", "does", "not", "exist", "or", "isn", "t", "actually", "a", "subclass", "of", "AuthenticationProvider", "an", ...
train
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole/src/main/java/org/apache/guacamole/extension/Extension.java#L208-L232
xmlunit/xmlunit
xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/Diff.java
Diff.getDifferenceEngine
private DifferenceEngineContract getDifferenceEngine() { """ Lazily initializes the difference engine if it hasn't been set via a constructor. """ if (differenceEngine == null) { if ( XMLUnit.getIgnoreAttributeOrder() && (!usesUnknownElementQ...
java
private DifferenceEngineContract getDifferenceEngine() { if (differenceEngine == null) { if ( XMLUnit.getIgnoreAttributeOrder() && (!usesUnknownElementQualifier() || XMLUnit.getCompareUnmatched()) ) { re...
[ "private", "DifferenceEngineContract", "getDifferenceEngine", "(", ")", "{", "if", "(", "differenceEngine", "==", "null", ")", "{", "if", "(", "XMLUnit", ".", "getIgnoreAttributeOrder", "(", ")", "&&", "(", "!", "usesUnknownElementQualifier", "(", ")", "||", "XM...
Lazily initializes the difference engine if it hasn't been set via a constructor.
[ "Lazily", "initializes", "the", "difference", "engine", "if", "it", "hasn", "t", "been", "set", "via", "a", "constructor", "." ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/Diff.java#L420-L433
Stratio/stratio-cassandra
src/java/org/apache/cassandra/io/util/RandomAccessReader.java
RandomAccessReader.reBuffer
protected void reBuffer() { """ Read data from file starting from current currentOffset to populate buffer. """ resetBuffer(); try { int read = buffer.length; if (bufferOffset + read > fileLength) { if (bufferOffset >= fileLength) ...
java
protected void reBuffer() { resetBuffer(); try { int read = buffer.length; if (bufferOffset + read > fileLength) { if (bufferOffset >= fileLength) return; read = (int) (fileLength - bufferOffset); ...
[ "protected", "void", "reBuffer", "(", ")", "{", "resetBuffer", "(", ")", ";", "try", "{", "int", "read", "=", "buffer", ".", "length", ";", "if", "(", "bufferOffset", "+", "read", ">", "fileLength", ")", "{", "if", "(", "bufferOffset", ">=", "fileLengt...
Read data from file starting from current currentOffset to populate buffer.
[ "Read", "data", "from", "file", "starting", "from", "current", "currentOffset", "to", "populate", "buffer", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/io/util/RandomAccessReader.java#L137-L169