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
inkstand-io/scribble
scribble-file/src/main/java/io/inkstand/scribble/rules/builder/TemporaryFileBuilder.java
TemporaryFileBuilder.asZip
public ZipFileBuilder asZip() { """ Indicates the content for the file should be zipped. If only one content reference is provided, the zip will only contain this file. @return the builder """ final ZipFileBuilder zfb = new ZipFileBuilder(folder, filename); if(this.content != null) { ...
java
public ZipFileBuilder asZip() { final ZipFileBuilder zfb = new ZipFileBuilder(folder, filename); if(this.content != null) { zfb.addResource(getContenFileName(), this.content); } return zfb; }
[ "public", "ZipFileBuilder", "asZip", "(", ")", "{", "final", "ZipFileBuilder", "zfb", "=", "new", "ZipFileBuilder", "(", "folder", ",", "filename", ")", ";", "if", "(", "this", ".", "content", "!=", "null", ")", "{", "zfb", ".", "addResource", "(", "getC...
Indicates the content for the file should be zipped. If only one content reference is provided, the zip will only contain this file. @return the builder
[ "Indicates", "the", "content", "for", "the", "file", "should", "be", "zipped", ".", "If", "only", "one", "content", "reference", "is", "provided", "the", "zip", "will", "only", "contain", "this", "file", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-file/src/main/java/io/inkstand/scribble/rules/builder/TemporaryFileBuilder.java#L100-L106
b3dgs/lionengine
lionengine-game/src/it/java/com/b3dgs/lionengine/game/it/background/Foreground.java
Foreground.setScreenSize
public final void setScreenSize(int width, int height) { """ Called when the resolution changed. @param width The new width. @param height The new height. """ screenWidth = width; screenHeight = height; final double scaleH = width / (double) Scene.NATIVE.getWidth(); final do...
java
public final void setScreenSize(int width, int height) { screenWidth = width; screenHeight = height; final double scaleH = width / (double) Scene.NATIVE.getWidth(); final double scaleV = height / (double) Scene.NATIVE.getHeight(); this.scaleH = scaleH; this.scaleV = s...
[ "public", "final", "void", "setScreenSize", "(", "int", "width", ",", "int", "height", ")", "{", "screenWidth", "=", "width", ";", "screenHeight", "=", "height", ";", "final", "double", "scaleH", "=", "width", "/", "(", "double", ")", "Scene", ".", "NATI...
Called when the resolution changed. @param width The new width. @param height The new height.
[ "Called", "when", "the", "resolution", "changed", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/it/java/com/b3dgs/lionengine/game/it/background/Foreground.java#L105-L115
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/StringUtil.java
StringUtil.wrapLine
private static String wrapLine(final String givenLine, final String newline, final int wrapColumn) { """ Wraps a single line of text. Called by wrapText(). I can't think of any good reason for exposing this to the public, since wrapText should always be used AFAIK. @param line A line which is in need of...
java
private static String wrapLine(final String givenLine, final String newline, final int wrapColumn) { final StringBuilder wrappedLine = new StringBuilder(); String line = givenLine; while (line.length() > wrapColumn) { int spaceToWrapAt = line.lastIndexOf(' ', wrapColumn); ...
[ "private", "static", "String", "wrapLine", "(", "final", "String", "givenLine", ",", "final", "String", "newline", ",", "final", "int", "wrapColumn", ")", "{", "final", "StringBuilder", "wrappedLine", "=", "new", "StringBuilder", "(", ")", ";", "String", "line...
Wraps a single line of text. Called by wrapText(). I can't think of any good reason for exposing this to the public, since wrapText should always be used AFAIK. @param line A line which is in need of word-wrapping. @param newline The characters that define a newline. @param wrapColumn The column to wrap the w...
[ "Wraps", "a", "single", "line", "of", "text", ".", "Called", "by", "wrapText", "()", ".", "I", "can", "t", "think", "of", "any", "good", "reason", "for", "exposing", "this", "to", "the", "public", "since", "wrapText", "should", "always", "be", "used", ...
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/StringUtil.java#L220-L255
greenrobot/essentials
java-essentials/src/main/java/org/greenrobot/essentials/io/IoUtils.java
IoUtils.copyAllBytes
public static int copyAllBytes(InputStream in, OutputStream out) throws IOException { """ Copies all available data from in to out without closing any stream. @return number of bytes copied """ int byteCount = 0; byte[] buffer = new byte[BUFFER_SIZE]; while (true) { int r...
java
public static int copyAllBytes(InputStream in, OutputStream out) throws IOException { int byteCount = 0; byte[] buffer = new byte[BUFFER_SIZE]; while (true) { int read = in.read(buffer); if (read == -1) { break; } out.write(buffer, ...
[ "public", "static", "int", "copyAllBytes", "(", "InputStream", "in", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "int", "byteCount", "=", "0", ";", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "BUFFER_SIZE", "]", ";", "while", ...
Copies all available data from in to out without closing any stream. @return number of bytes copied
[ "Copies", "all", "available", "data", "from", "in", "to", "out", "without", "closing", "any", "stream", "." ]
train
https://github.com/greenrobot/essentials/blob/31eaaeb410174004196c9ef9c9469e0d02afd94b/java-essentials/src/main/java/org/greenrobot/essentials/io/IoUtils.java#L130-L142
graphql-java/graphql-java
src/main/java/graphql/execution/FieldCollector.java
FieldCollector.collectFields
public MergedSelectionSet collectFields(FieldCollectorParameters parameters, SelectionSet selectionSet) { """ Given a selection set this will collect the sub-field selections and return it as a map @param parameters the parameters to this method @param selectionSet the selection set to collect on @return ...
java
public MergedSelectionSet collectFields(FieldCollectorParameters parameters, SelectionSet selectionSet) { Map<String, MergedField> subFields = new LinkedHashMap<>(); List<String> visitedFragments = new ArrayList<>(); this.collectFields(parameters, selectionSet, visitedFragments, subFields); ...
[ "public", "MergedSelectionSet", "collectFields", "(", "FieldCollectorParameters", "parameters", ",", "SelectionSet", "selectionSet", ")", "{", "Map", "<", "String", ",", "MergedField", ">", "subFields", "=", "new", "LinkedHashMap", "<>", "(", ")", ";", "List", "<"...
Given a selection set this will collect the sub-field selections and return it as a map @param parameters the parameters to this method @param selectionSet the selection set to collect on @return a map of the sub field selections
[ "Given", "a", "selection", "set", "this", "will", "collect", "the", "sub", "-", "field", "selections", "and", "return", "it", "as", "a", "map" ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/execution/FieldCollector.java#L53-L58
andkulikov/Transitions-Everywhere
library(1.x)/src/main/java/com/transitionseverywhere/Transition.java
Transition.excludeChildren
@NonNull public Transition excludeChildren(@Nullable View target, boolean exclude) { """ Whether to add the children of given target to the list of target children to exclude from this transition. The <code>exclude</code> parameter specifies whether the target should be added to or removed from the excluded ...
java
@NonNull public Transition excludeChildren(@Nullable View target, boolean exclude) { mTargetChildExcludes = excludeObject(mTargetChildExcludes, target, exclude); return this; }
[ "@", "NonNull", "public", "Transition", "excludeChildren", "(", "@", "Nullable", "View", "target", ",", "boolean", "exclude", ")", "{", "mTargetChildExcludes", "=", "excludeObject", "(", "mTargetChildExcludes", ",", "target", ",", "exclude", ")", ";", "return", ...
Whether to add the children of given target to the list of target children to exclude from this transition. The <code>exclude</code> parameter specifies whether the target should be added to or removed from the excluded list. <p/> <p>Excluding targets is a general mechanism for allowing transitions to run on a view hie...
[ "Whether", "to", "add", "the", "children", "of", "given", "target", "to", "the", "list", "of", "target", "children", "to", "exclude", "from", "this", "transition", ".", "The", "<code", ">", "exclude<", "/", "code", ">", "parameter", "specifies", "whether", ...
train
https://github.com/andkulikov/Transitions-Everywhere/blob/828efe5f152a2f05e2bfeee6254b74ad2269d4f1/library(1.x)/src/main/java/com/transitionseverywhere/Transition.java#L1251-L1255
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/util/FontUtils.java
FontUtils.drawLeft
public static void drawLeft(Font font, String s, int x, int y) { """ Draw text left justified @param font The font to draw with @param s The string to draw @param x The x location to draw at @param y The y location to draw at """ drawString(font, s, Alignment.LEFT, x, y, 0, Color.white); }
java
public static void drawLeft(Font font, String s, int x, int y) { drawString(font, s, Alignment.LEFT, x, y, 0, Color.white); }
[ "public", "static", "void", "drawLeft", "(", "Font", "font", ",", "String", "s", ",", "int", "x", ",", "int", "y", ")", "{", "drawString", "(", "font", ",", "s", ",", "Alignment", ".", "LEFT", ",", "x", ",", "y", ",", "0", ",", "Color", ".", "w...
Draw text left justified @param font The font to draw with @param s The string to draw @param x The x location to draw at @param y The y location to draw at
[ "Draw", "text", "left", "justified" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/util/FontUtils.java#L38-L40
trustathsh/ifmapj
src/main/java/de/hshannover/f4/trust/ifmapj/IfmapJHelper.java
IfmapJHelper.getKeyManagers
public static KeyManager[] getKeyManagers() throws InitializationException { """ Creates {@link KeyManager} instances based on the javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword environment variables. @return an array of {@link KeyManager} instances. @throws InitializationException """ String...
java
public static KeyManager[] getKeyManagers() throws InitializationException { String file = System.getProperty("javax.net.ssl.keyStore"); String pass = System.getProperty("javax.net.ssl.keyStorePassword"); if (file == null || pass == null) { throw new InitializationException("javax.net.ssl.keyStore / " + ...
[ "public", "static", "KeyManager", "[", "]", "getKeyManagers", "(", ")", "throws", "InitializationException", "{", "String", "file", "=", "System", ".", "getProperty", "(", "\"javax.net.ssl.keyStore\"", ")", ";", "String", "pass", "=", "System", ".", "getProperty",...
Creates {@link KeyManager} instances based on the javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword environment variables. @return an array of {@link KeyManager} instances. @throws InitializationException
[ "Creates", "{", "@link", "KeyManager", "}", "instances", "based", "on", "the", "javax", ".", "net", ".", "ssl", ".", "keyStore", "and", "javax", ".", "net", ".", "ssl", ".", "keyStorePassword", "environment", "variables", "." ]
train
https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/IfmapJHelper.java#L75-L85
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/ReadExcelUtils.java
ReadExcelUtils.getCellValue
public static Object getCellValue(int type, Cell cell) { """ 获取指定单元格的内容。只能是日期(返回java.util.Date),整数值(返回的均是String类型),小数值(返回的均是String类型,并 保留两位小数),字符串, 布尔类型。 其他类型返回null。 @param type 指定类型(Cell中定义的类型) @param cell 指定单元格 @return 返回Cell里的内容 """ switch (type) { case Cell.CELL_TYPE_BOOLEAN: ...
java
public static Object getCellValue(int type, Cell cell) { switch (type) { case Cell.CELL_TYPE_BOOLEAN: return cell.getBooleanCellValue(); case Cell.CELL_TYPE_NUMERIC: if (DateUtil.isCellDateFormatted(cell)) { return DateUtil.getJavaDate(...
[ "public", "static", "Object", "getCellValue", "(", "int", "type", ",", "Cell", "cell", ")", "{", "switch", "(", "type", ")", "{", "case", "Cell", ".", "CELL_TYPE_BOOLEAN", ":", "return", "cell", ".", "getBooleanCellValue", "(", ")", ";", "case", "Cell", ...
获取指定单元格的内容。只能是日期(返回java.util.Date),整数值(返回的均是String类型),小数值(返回的均是String类型,并 保留两位小数),字符串, 布尔类型。 其他类型返回null。 @param type 指定类型(Cell中定义的类型) @param cell 指定单元格 @return 返回Cell里的内容
[ "获取指定单元格的内容。只能是日期(返回java", ".", "util", ".", "Date),整数值(返回的均是String类型),小数值(返回的均是String类型,并", "保留两位小数),字符串,", "布尔类型。", "其他类型返回null。" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/ReadExcelUtils.java#L36-L63
FXMisc/RichTextFX
richtextfx/src/main/java/org/fxmisc/richtext/model/ReadOnlyStyledDocumentBuilder.java
ReadOnlyStyledDocumentBuilder.addParagraph
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraph(List<SEG> segments, StyleSpans<S> styles) { """ Adds to the list a paragraph that has multiple segments with multiple styles throughout those segments """ return addParagraph(segments, styles, null); }
java
public ReadOnlyStyledDocumentBuilder<PS, SEG, S> addParagraph(List<SEG> segments, StyleSpans<S> styles) { return addParagraph(segments, styles, null); }
[ "public", "ReadOnlyStyledDocumentBuilder", "<", "PS", ",", "SEG", ",", "S", ">", "addParagraph", "(", "List", "<", "SEG", ">", "segments", ",", "StyleSpans", "<", "S", ">", "styles", ")", "{", "return", "addParagraph", "(", "segments", ",", "styles", ",", ...
Adds to the list a paragraph that has multiple segments with multiple styles throughout those segments
[ "Adds", "to", "the", "list", "a", "paragraph", "that", "has", "multiple", "segments", "with", "multiple", "styles", "throughout", "those", "segments" ]
train
https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/model/ReadOnlyStyledDocumentBuilder.java#L134-L136
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java
PermissionUtil.canInteract
public static boolean canInteract(Member issuer, Member target) { """ Checks if one given Member can interact with a 2nd given Member - in a permission sense (kick/ban/modify perms). This only checks the Role-Position and does not check the actual permission (kick/ban/manage_role/...) @param issuer The membe...
java
public static boolean canInteract(Member issuer, Member target) { Checks.notNull(issuer, "Issuer Member"); Checks.notNull(target, "Target Member"); Guild guild = issuer.getGuild(); if (!guild.equals(target.getGuild())) throw new IllegalArgumentException("Provided members...
[ "public", "static", "boolean", "canInteract", "(", "Member", "issuer", ",", "Member", "target", ")", "{", "Checks", ".", "notNull", "(", "issuer", ",", "\"Issuer Member\"", ")", ";", "Checks", ".", "notNull", "(", "target", ",", "\"Target Member\"", ")", ";"...
Checks if one given Member can interact with a 2nd given Member - in a permission sense (kick/ban/modify perms). This only checks the Role-Position and does not check the actual permission (kick/ban/manage_role/...) @param issuer The member that tries to interact with 2nd member @param target The member that is the ...
[ "Checks", "if", "one", "given", "Member", "can", "interact", "with", "a", "2nd", "given", "Member", "-", "in", "a", "permission", "sense", "(", "kick", "/", "ban", "/", "modify", "perms", ")", ".", "This", "only", "checks", "the", "Role", "-", "Positio...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java#L43-L58
find-sec-bugs/find-sec-bugs
findsecbugs-plugin/src/main/java/com/h3xstream/findsecbugs/taintanalysis/Taint.java
Taint.addLocation
public void addLocation(TaintLocation location, boolean isKnownTaintSource) { """ Adds location for a taint source or path to remember for reporting @param location location to remember @param isKnownTaintSource true for tainted value, false if just not safe @throws NullPointerException if location is null ...
java
public void addLocation(TaintLocation location, boolean isKnownTaintSource) { Objects.requireNonNull(location, "location is null"); if (isKnownTaintSource) { taintLocations.add(location); } else { unknownLocations.add(location); } }
[ "public", "void", "addLocation", "(", "TaintLocation", "location", ",", "boolean", "isKnownTaintSource", ")", "{", "Objects", ".", "requireNonNull", "(", "location", ",", "\"location is null\"", ")", ";", "if", "(", "isKnownTaintSource", ")", "{", "taintLocations", ...
Adds location for a taint source or path to remember for reporting @param location location to remember @param isKnownTaintSource true for tainted value, false if just not safe @throws NullPointerException if location is null
[ "Adds", "location", "for", "a", "taint", "source", "or", "path", "to", "remember", "for", "reporting" ]
train
https://github.com/find-sec-bugs/find-sec-bugs/blob/362da013cef4925e6a1506dd3511fe5bdcc5fba3/findsecbugs-plugin/src/main/java/com/h3xstream/findsecbugs/taintanalysis/Taint.java#L239-L246
javamelody/javamelody
javamelody-swing/src/main/java/net/bull/javamelody/swing/table/MListTable.java
MListTable.setList
public void setList(final List<T> newList) { """ Définit la valeur de la propriété list. <BR> Cette méthode adaptent automatiquement les largeurs des colonnes selon les données. @param newList List @see #getList """ getListTableModel().setList(newList); adjustColumnWidths(); // Réinitialis...
java
public void setList(final List<T> newList) { getListTableModel().setList(newList); adjustColumnWidths(); // Réinitialise les hauteurs des lignes qui pourraient avoir été particularisées // avec setRowHeight(row, rowHeight). setRowHeight(getRowHeight()); // remarque perf: on pourrait parcourir le...
[ "public", "void", "setList", "(", "final", "List", "<", "T", ">", "newList", ")", "{", "getListTableModel", "(", ")", ".", "setList", "(", "newList", ")", ";", "adjustColumnWidths", "(", ")", ";", "// Réinitialise les hauteurs des lignes qui pourraient avoir été par...
Définit la valeur de la propriété list. <BR> Cette méthode adaptent automatiquement les largeurs des colonnes selon les données. @param newList List @see #getList
[ "Définit", "la", "valeur", "de", "la", "propriété", "list", ".", "<BR", ">" ]
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/table/MListTable.java#L86-L97
sarl/sarl
sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/Services.java
Services.stopServices
public static void stopServices(IServiceManager manager) { """ Stop the services associated to the given service manager. <p>This stopping function supports the {@link DependentService prioritized services}. @param manager the manager of the services to stop. """ final List<Service> otherServices = new...
java
public static void stopServices(IServiceManager manager) { final List<Service> otherServices = new ArrayList<>(); final List<Service> infraServices = new ArrayList<>(); final LinkedList<DependencyNode> serviceQueue = new LinkedList<>(); final Accessors accessors = new StoppingPhaseAccessors(); // Build the d...
[ "public", "static", "void", "stopServices", "(", "IServiceManager", "manager", ")", "{", "final", "List", "<", "Service", ">", "otherServices", "=", "new", "ArrayList", "<>", "(", ")", ";", "final", "List", "<", "Service", ">", "infraServices", "=", "new", ...
Stop the services associated to the given service manager. <p>This stopping function supports the {@link DependentService prioritized services}. @param manager the manager of the services to stop.
[ "Stop", "the", "services", "associated", "to", "the", "given", "service", "manager", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/services/Services.java#L108-L121
Javacord/Javacord
javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java
EmbedBuilder.setFooter
public EmbedBuilder setFooter(String text, Icon icon) { """ Sets the footer of the embed. @param text The text of the footer. @param icon The footer's icon. @return The current instance in order to chain call methods. """ delegate.setFooter(text, icon); return this; }
java
public EmbedBuilder setFooter(String text, Icon icon) { delegate.setFooter(text, icon); return this; }
[ "public", "EmbedBuilder", "setFooter", "(", "String", "text", ",", "Icon", "icon", ")", "{", "delegate", ".", "setFooter", "(", "text", ",", "icon", ")", ";", "return", "this", ";", "}" ]
Sets the footer of the embed. @param text The text of the footer. @param icon The footer's icon. @return The current instance in order to chain call methods.
[ "Sets", "the", "footer", "of", "the", "embed", "." ]
train
https://github.com/Javacord/Javacord/blob/915aad084dc5e863284267529d0dccd625fc6886/javacord-api/src/main/java/org/javacord/api/entity/message/embed/EmbedBuilder.java#L131-L134
HanSolo/SteelSeries-Swing
src/main/java/eu/hansolo/steelseries/extras/Poi.java
Poi.setLat
public void setLat(final int LAT_DEG, final double LAT_MIN) { """ Sets the latitude of the poi in the format 7° 20.123' @param LAT_DEG @param LAT_MIN """ this.lat = convert(LAT_DEG, LAT_MIN); this.LOCATION.setLocation(this.lat, this.lon); adjustDirection(); }
java
public void setLat(final int LAT_DEG, final double LAT_MIN) { this.lat = convert(LAT_DEG, LAT_MIN); this.LOCATION.setLocation(this.lat, this.lon); adjustDirection(); }
[ "public", "void", "setLat", "(", "final", "int", "LAT_DEG", ",", "final", "double", "LAT_MIN", ")", "{", "this", ".", "lat", "=", "convert", "(", "LAT_DEG", ",", "LAT_MIN", ")", ";", "this", ".", "LOCATION", ".", "setLocation", "(", "this", ".", "lat",...
Sets the latitude of the poi in the format 7° 20.123' @param LAT_DEG @param LAT_MIN
[ "Sets", "the", "latitude", "of", "the", "poi", "in", "the", "format", "7°", "20", ".", "123" ]
train
https://github.com/HanSolo/SteelSeries-Swing/blob/c2f7b45a477757ef21bbb6a1174ddedb2250ae57/src/main/java/eu/hansolo/steelseries/extras/Poi.java#L285-L289
beihaifeiwu/dolphin
dolphin-common/src/main/java/com/freetmp/common/annotation/OrderUtils.java
OrderUtils.getOrder
public static Integer getOrder(Class<?> type, Integer defaultOrder) { """ Return the order on the specified {@code type}, or the specified default value if none can be found. <p>Take care of {@link Order @Order} and {@code @javax.annotation.Priority}. @param type the type to handle @return the priority value, ...
java
public static Integer getOrder(Class<?> type, Integer defaultOrder) { Order order = AnnotationUtils.findAnnotation(type, Order.class); if (order != null) { return order.value(); } Integer priorityOrder = getPriority(type); if (priorityOrder != null) { return priorityOrder; } return defaultOrder; }
[ "public", "static", "Integer", "getOrder", "(", "Class", "<", "?", ">", "type", ",", "Integer", "defaultOrder", ")", "{", "Order", "order", "=", "AnnotationUtils", ".", "findAnnotation", "(", "type", ",", "Order", ".", "class", ")", ";", "if", "(", "orde...
Return the order on the specified {@code type}, or the specified default value if none can be found. <p>Take care of {@link Order @Order} and {@code @javax.annotation.Priority}. @param type the type to handle @return the priority value, or the specified default order if none can be found
[ "Return", "the", "order", "on", "the", "specified", "{" ]
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-common/src/main/java/com/freetmp/common/annotation/OrderUtils.java#L67-L77
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2015_10_01/src/main/java/com/microsoft/azure/management/mediaservices/v2015_10_01/implementation/MediaServicesInner.java
MediaServicesInner.syncStorageKeys
public void syncStorageKeys(String resourceGroupName, String mediaServiceName, String id) { """ Synchronizes storage account keys for a storage account associated with the Media Service account. @param resourceGroupName Name of the resource group within the Azure subscription. @param mediaServiceName Name of t...
java
public void syncStorageKeys(String resourceGroupName, String mediaServiceName, String id) { syncStorageKeysWithServiceResponseAsync(resourceGroupName, mediaServiceName, id).toBlocking().single().body(); }
[ "public", "void", "syncStorageKeys", "(", "String", "resourceGroupName", ",", "String", "mediaServiceName", ",", "String", "id", ")", "{", "syncStorageKeysWithServiceResponseAsync", "(", "resourceGroupName", ",", "mediaServiceName", ",", "id", ")", ".", "toBlocking", ...
Synchronizes storage account keys for a storage account associated with the Media Service account. @param resourceGroupName Name of the resource group within the Azure subscription. @param mediaServiceName Name of the Media Service. @param id The id of the storage account resource. @throws IllegalArgumentException thr...
[ "Synchronizes", "storage", "account", "keys", "for", "a", "storage", "account", "associated", "with", "the", "Media", "Service", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2015_10_01/src/main/java/com/microsoft/azure/management/mediaservices/v2015_10_01/implementation/MediaServicesInner.java#L827-L829
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.runOrFail
@SneakyThrows(Exception.class) public static <T, R> R runOrFail(Callable<R> callable, CompletableFuture<T> future) { """ Runs the provided Callable in the current thread (synchronously) if it throws any Exception or Throwable the exception is propagated, but the supplied future is also failed. @param <T> ...
java
@SneakyThrows(Exception.class) public static <T, R> R runOrFail(Callable<R> callable, CompletableFuture<T> future) { try { return callable.call(); } catch (Throwable t) { future.completeExceptionally(t); throw t; } }
[ "@", "SneakyThrows", "(", "Exception", ".", "class", ")", "public", "static", "<", "T", ",", "R", ">", "R", "runOrFail", "(", "Callable", "<", "R", ">", "callable", ",", "CompletableFuture", "<", "T", ">", "future", ")", "{", "try", "{", "return", "c...
Runs the provided Callable in the current thread (synchronously) if it throws any Exception or Throwable the exception is propagated, but the supplied future is also failed. @param <T> The type of the future. @param <R> The return type of the callable. @param callable The function to invoke. @param future ...
[ "Runs", "the", "provided", "Callable", "in", "the", "current", "thread", "(", "synchronously", ")", "if", "it", "throws", "any", "Exception", "or", "Throwable", "the", "exception", "is", "propagated", "but", "the", "supplied", "future", "is", "also", "failed",...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L569-L577
gosu-lang/gosu-lang
gosu-lab/src/main/java/editor/util/TextComponentUtil.java
TextComponentUtil.getDeepestWhiteSpaceLineStartAfter
public static int getDeepestWhiteSpaceLineStartAfter( String script, int offset ) { """ Eats whitespace lines after the given offset until it finds a non-whitespace line and returns the start of the last whitespace line found, or the initial value if none was. """ if( offset < 0 ) { return offse...
java
public static int getDeepestWhiteSpaceLineStartAfter( String script, int offset ) { if( offset < 0 ) { return offset; } int i = offset; while( true ) { int lineStartAfter = getWhiteSpaceLineStartAfter( script, i ); if( lineStartAfter == -1 ) { return i; ...
[ "public", "static", "int", "getDeepestWhiteSpaceLineStartAfter", "(", "String", "script", ",", "int", "offset", ")", "{", "if", "(", "offset", "<", "0", ")", "{", "return", "offset", ";", "}", "int", "i", "=", "offset", ";", "while", "(", "true", ")", ...
Eats whitespace lines after the given offset until it finds a non-whitespace line and returns the start of the last whitespace line found, or the initial value if none was.
[ "Eats", "whitespace", "lines", "after", "the", "given", "offset", "until", "it", "finds", "a", "non", "-", "whitespace", "line", "and", "returns", "the", "start", "of", "the", "last", "whitespace", "line", "found", "or", "the", "initial", "value", "if", "n...
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-lab/src/main/java/editor/util/TextComponentUtil.java#L858-L879
datumbox/lpsolve
src/main/java/lpsolve/LpSolve.java
LpSolve.putAbortfunc
public void putAbortfunc(AbortListener listener, Object userhandle) throws LpSolveException { """ Register an <code>AbortListener</code> for callback. @param listener the listener that should be called by lp_solve @param userhandle an arbitrary object that is passed to the listener on call """ abortList...
java
public void putAbortfunc(AbortListener listener, Object userhandle) throws LpSolveException { abortListener = listener; abortUserhandle = (listener != null) ? userhandle : null; addLp(this); registerAbortfunc(); }
[ "public", "void", "putAbortfunc", "(", "AbortListener", "listener", ",", "Object", "userhandle", ")", "throws", "LpSolveException", "{", "abortListener", "=", "listener", ";", "abortUserhandle", "=", "(", "listener", "!=", "null", ")", "?", "userhandle", ":", "n...
Register an <code>AbortListener</code> for callback. @param listener the listener that should be called by lp_solve @param userhandle an arbitrary object that is passed to the listener on call
[ "Register", "an", "<code", ">", "AbortListener<", "/", "code", ">", "for", "callback", "." ]
train
https://github.com/datumbox/lpsolve/blob/201b3e99153d907bb99c189e5647bc71a3a1add6/src/main/java/lpsolve/LpSolve.java#L1595-L1600
jurmous/etcd4j
src/main/java/mousio/etcd4j/transport/EtcdNettyClient.java
EtcdNettyClient.modifyPipeLine
private <R> void modifyPipeLine(final EtcdRequest<R> req, final ChannelPipeline pipeline) { """ Modify the pipeline for the request @param req to process @param pipeline to modify @param <R> Type of Response """ final EtcdResponseHandler<R> handler = new EtcdResponseHandler<>(this, req); ...
java
private <R> void modifyPipeLine(final EtcdRequest<R> req, final ChannelPipeline pipeline) { final EtcdResponseHandler<R> handler = new EtcdResponseHandler<>(this, req); if (req.hasTimeout()) { pipeline.addFirst(new ReadTimeoutHandler(req.getTimeout(), req.getTimeoutUnit())); } pipeline.addLast(h...
[ "private", "<", "R", ">", "void", "modifyPipeLine", "(", "final", "EtcdRequest", "<", "R", ">", "req", ",", "final", "ChannelPipeline", "pipeline", ")", "{", "final", "EtcdResponseHandler", "<", "R", ">", "handler", "=", "new", "EtcdResponseHandler", "<>", "...
Modify the pipeline for the request @param req to process @param pipeline to modify @param <R> Type of Response
[ "Modify", "the", "pipeline", "for", "the", "request" ]
train
https://github.com/jurmous/etcd4j/blob/ffb1d574cf85bbab025dd566ce250f1860bbcbc7/src/main/java/mousio/etcd4j/transport/EtcdNettyClient.java#L331-L346
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsADECache.java
CmsADECache.uncacheGroupContainer
public void uncacheGroupContainer(CmsUUID structureId, boolean online) { """ Removes the group container identified by its structure id from the cache.<p> @param structureId the group container's structure id @param online if online or offline """ try { m_lock.writeLock().lock(); ...
java
public void uncacheGroupContainer(CmsUUID structureId, boolean online) { try { m_lock.writeLock().lock(); if (online) { m_groupContainersOnline.remove(getCacheKey(structureId, true)); m_groupContainersOnline.remove(getCacheKey(structureId, false)); ...
[ "public", "void", "uncacheGroupContainer", "(", "CmsUUID", "structureId", ",", "boolean", "online", ")", "{", "try", "{", "m_lock", ".", "writeLock", "(", ")", ".", "lock", "(", ")", ";", "if", "(", "online", ")", "{", "m_groupContainersOnline", ".", "remo...
Removes the group container identified by its structure id from the cache.<p> @param structureId the group container's structure id @param online if online or offline
[ "Removes", "the", "group", "container", "identified", "by", "its", "structure", "id", "from", "the", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsADECache.java#L338-L352
jferard/fastods
fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsFileWriter.java
AnonymousOdsFileWriter.saveAs
public void saveAs(final String filename, final ZipUTF8WriterBuilder builder) throws IOException { """ Save the document to filename. @param filename the name of the destination file @param builder a builder for the ZipOutputStream and the Writer (buffers, level, ...) @throws IOException if the f...
java
public void saveAs(final String filename, final ZipUTF8WriterBuilder builder) throws IOException { try { final FileOutputStream out = new FileOutputStream(filename); final ZipUTF8Writer writer = builder.build(out); try { this.save(writer); ...
[ "public", "void", "saveAs", "(", "final", "String", "filename", ",", "final", "ZipUTF8WriterBuilder", "builder", ")", "throws", "IOException", "{", "try", "{", "final", "FileOutputStream", "out", "=", "new", "FileOutputStream", "(", "filename", ")", ";", "final"...
Save the document to filename. @param filename the name of the destination file @param builder a builder for the ZipOutputStream and the Writer (buffers, level, ...) @throws IOException if the file was not saved
[ "Save", "the", "document", "to", "filename", "." ]
train
https://github.com/jferard/fastods/blob/a034d173083ffa602dc525699b97f753082eaef9/fastods/src/main/java/com/github/jferard/fastods/AnonymousOdsFileWriter.java#L136-L150
hageldave/ImagingKit
ImagingKit_Core/src/main/java/hageldave/imagingkit/core/io/ImageSaver.java
ImageSaver.saveImage
public static void saveImage(Image image, String filename, String imgFileFormat) { """ Saves image using {@link #saveImage(Image, File, String)}. @param image to be saved @param filename path to file @param imgFileFormat image file format. Consult {@link #getSaveableImageFileFormats()} @throws ImageSaverExcept...
java
public static void saveImage(Image image, String filename, String imgFileFormat){ File f = new File(filename); if(!f.isDirectory()){ saveImage(image, f, imgFileFormat); } else { throw new ImageSaverException(new IOException(String.format("provided file name denotes a directory. %s", filename))); } }
[ "public", "static", "void", "saveImage", "(", "Image", "image", ",", "String", "filename", ",", "String", "imgFileFormat", ")", "{", "File", "f", "=", "new", "File", "(", "filename", ")", ";", "if", "(", "!", "f", ".", "isDirectory", "(", ")", ")", "...
Saves image using {@link #saveImage(Image, File, String)}. @param image to be saved @param filename path to file @param imgFileFormat image file format. Consult {@link #getSaveableImageFileFormats()} @throws ImageSaverException if an IOException occured during the process, the provided filename path does refer to a dir...
[ "Saves", "image", "using", "{" ]
train
https://github.com/hageldave/ImagingKit/blob/3837c7d550a12cf4dc5718b644ced94b97f52668/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/io/ImageSaver.java#L124-L131
jtmelton/appsensor
analysis-engines/appsensor-analysis-rules/src/main/java/org/owasp/appsensor/analysis/AggregateEventAnalysisEngine.java
AggregateEventAnalysisEngine.findMostRecentAttackTime
protected DateTime findMostRecentAttackTime(Event triggerEvent, Rule rule) { """ Finds the most recent {@link Attack} from the {@link Rule} being evaluated. @param triggerEvent the {@link Event} that triggered the {@link Rule} @param rule the {@link Rule} being evaluated @return a {@link DateTime} of the most...
java
protected DateTime findMostRecentAttackTime(Event triggerEvent, Rule rule) { DateTime newest = DateUtils.epoch(); SearchCriteria criteria = new SearchCriteria(). setUser(new User(triggerEvent.getUser().getUsername())). setRule(rule). setDetectionSystemIds(appSensorServer.getConfiguration().getRelatedDe...
[ "protected", "DateTime", "findMostRecentAttackTime", "(", "Event", "triggerEvent", ",", "Rule", "rule", ")", "{", "DateTime", "newest", "=", "DateUtils", ".", "epoch", "(", ")", ";", "SearchCriteria", "criteria", "=", "new", "SearchCriteria", "(", ")", ".", "s...
Finds the most recent {@link Attack} from the {@link Rule} being evaluated. @param triggerEvent the {@link Event} that triggered the {@link Rule} @param rule the {@link Rule} being evaluated @return a {@link DateTime} of the most recent attack related to the {@link Rule}
[ "Finds", "the", "most", "recent", "{", "@link", "Attack", "}", "from", "the", "{", "@link", "Rule", "}", "being", "evaluated", "." ]
train
https://github.com/jtmelton/appsensor/blob/c3b4e9ada50fdee974e0d618ec4bdfabc2163798/analysis-engines/appsensor-analysis-rules/src/main/java/org/owasp/appsensor/analysis/AggregateEventAnalysisEngine.java#L301-L320
lucee/Lucee
core/src/main/java/lucee/runtime/type/scope/session/SessionMemory.java
SessionMemory.getInstance
public static Session getInstance(PageContext pc, RefBoolean isNew, Log log) { """ load a new instance of the class @param pc @param isNew @return """ isNew.setValue(true); return new SessionMemory(pc, log); }
java
public static Session getInstance(PageContext pc, RefBoolean isNew, Log log) { isNew.setValue(true); return new SessionMemory(pc, log); }
[ "public", "static", "Session", "getInstance", "(", "PageContext", "pc", ",", "RefBoolean", "isNew", ",", "Log", "log", ")", "{", "isNew", ".", "setValue", "(", "true", ")", ";", "return", "new", "SessionMemory", "(", "pc", ",", "log", ")", ";", "}" ]
load a new instance of the class @param pc @param isNew @return
[ "load", "a", "new", "instance", "of", "the", "class" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/scope/session/SessionMemory.java#L62-L65
trustathsh/ifmapj
src/main/java/de/hshannover/f4/trust/ifmapj/extendedIdentifiers/ExtendedIdentifiers.java
ExtendedIdentifiers.createExtendedIdentifier
public static Identity createExtendedIdentifier(String namespaceUri, String namespacePrefix, String identifierName) { """ Creates an Extended Identifier; uses an empty string for the administrativeDomain attribute and does not add an attribute <i>name</i>. @param namespaceUri URI of the namespace of the inner...
java
public static Identity createExtendedIdentifier(String namespaceUri, String namespacePrefix, String identifierName) { return createExtendedIdentifier(namespaceUri, namespacePrefix, identifierName, null, ""); }
[ "public", "static", "Identity", "createExtendedIdentifier", "(", "String", "namespaceUri", ",", "String", "namespacePrefix", ",", "String", "identifierName", ")", "{", "return", "createExtendedIdentifier", "(", "namespaceUri", ",", "namespacePrefix", ",", "identifierName"...
Creates an Extended Identifier; uses an empty string for the administrativeDomain attribute and does not add an attribute <i>name</i>. @param namespaceUri URI of the namespace of the inner XML of the Extended Identifier @param namespacePrefix prefix of the namespace of the inner XML of the Extended Identifier @param i...
[ "Creates", "an", "Extended", "Identifier", ";", "uses", "an", "empty", "string", "for", "the", "administrativeDomain", "attribute", "and", "does", "not", "add", "an", "attribute", "<i", ">", "name<", "/", "i", ">", "." ]
train
https://github.com/trustathsh/ifmapj/blob/44ece9e95a3d2a1b7019573ba6178598a6cbdaa3/src/main/java/de/hshannover/f4/trust/ifmapj/extendedIdentifiers/ExtendedIdentifiers.java#L143-L145
Ordinastie/MalisisCore
src/main/java/net/malisis/core/inventory/MalisisInventoryContainer.java
MalisisInventoryContainer.handleHotbar
private ItemStack handleHotbar(MalisisInventory inventory, MalisisSlot hoveredSlot, int num) { """ Handles player pressing 1-9 key while hovering a slot. @param hoveredSlot hoveredSlot @param num the num @return the item stack """ MalisisSlot hotbarSlot = getPlayerInventory().getSlot(num); // slot fr...
java
private ItemStack handleHotbar(MalisisInventory inventory, MalisisSlot hoveredSlot, int num) { MalisisSlot hotbarSlot = getPlayerInventory().getSlot(num); // slot from player's inventory, swap itemStacks if (inventory == getPlayerInventory() || hoveredSlot.getItemStack().isEmpty()) { if (hoveredSlot.isStat...
[ "private", "ItemStack", "handleHotbar", "(", "MalisisInventory", "inventory", ",", "MalisisSlot", "hoveredSlot", ",", "int", "num", ")", "{", "MalisisSlot", "hotbarSlot", "=", "getPlayerInventory", "(", ")", ".", "getSlot", "(", "num", ")", ";", "// slot from play...
Handles player pressing 1-9 key while hovering a slot. @param hoveredSlot hoveredSlot @param num the num @return the item stack
[ "Handles", "player", "pressing", "1", "-", "9", "key", "while", "hovering", "a", "slot", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/inventory/MalisisInventoryContainer.java#L534-L570
LearnLib/automatalib
commons/util/src/main/java/net/automatalib/commons/util/ReflectUtil.java
ReflectUtil.findMethod
public static Method findMethod(Class<?> clazz, String name, Class<?>... params) { """ Tries to find a method of the given name that is able to accept parameters of the given types. First tries to find the method matching the exact parameter types. If such a method does not exist, tries to find any (the first ma...
java
public static Method findMethod(Class<?> clazz, String name, Class<?>... params) { try { return clazz.getMethod(name, params); } catch (NoSuchMethodException e) { Method[] methods = clazz.getMethods(); for (Method candidate : methods) { if (candidate....
[ "public", "static", "Method", "findMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "name", ",", "Class", "<", "?", ">", "...", "params", ")", "{", "try", "{", "return", "clazz", ".", "getMethod", "(", "name", ",", "params", ")", ";", ...
Tries to find a method of the given name that is able to accept parameters of the given types. First tries to find the method matching the exact parameter types. If such a method does not exist, tries to find any (the first match of arbitrary order) method that is able to accept the parameter types by means of auto-box...
[ "Tries", "to", "find", "a", "method", "of", "the", "given", "name", "that", "is", "able", "to", "accept", "parameters", "of", "the", "given", "types", ".", "First", "tries", "to", "find", "the", "method", "matching", "the", "exact", "parameter", "types", ...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/ReflectUtil.java#L87-L101
devcon5io/common
cli/src/main/java/io/devcon5/cli/OptionInjector.java
OptionInjector.injectParameters
private void injectParameters(Object target, Map<String, Option> options) { """ Inject parameter values from the map of options. @param target the target instance to parse cli parameters @param options the map of options, mapping short option names to {@link org.apache.commons.cli.Option} instances """ ...
java
private void injectParameters(Object target, Map<String, Option> options) { ClassStreams.selfAndSupertypes(target.getClass()).forEach(type -> { for (Field f : type.getDeclaredFields()) { Optional.ofNullable(f.getAnnotation(CliOption.class)) .ifPresent(opt -> p...
[ "private", "void", "injectParameters", "(", "Object", "target", ",", "Map", "<", "String", ",", "Option", ">", "options", ")", "{", "ClassStreams", ".", "selfAndSupertypes", "(", "target", ".", "getClass", "(", ")", ")", ".", "forEach", "(", "type", "->", ...
Inject parameter values from the map of options. @param target the target instance to parse cli parameters @param options the map of options, mapping short option names to {@link org.apache.commons.cli.Option} instances
[ "Inject", "parameter", "values", "from", "the", "map", "of", "options", "." ]
train
https://github.com/devcon5io/common/blob/363688e0dc904d559682bf796bd6c836b4e0efc7/cli/src/main/java/io/devcon5/cli/OptionInjector.java#L141-L150
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java
AiMaterial.getTextureMapModeU
public AiTextureMapMode getTextureMapModeU(AiTextureType type, int index) { """ Returns the texture mapping mode for the u axis.<p> If missing, defaults to {@link AiTextureMapMode#CLAMP} @param type the texture type @param index the index in the texture stack @return the texture mapping mode """ ...
java
public AiTextureMapMode getTextureMapModeU(AiTextureType type, int index) { checkTexRange(type, index); Property p = getProperty(PropertyKey.TEX_MAP_MODE_U.m_key); if (null == p || null == p.getData()) { return (AiTextureMapMode) m_defaults.get( ...
[ "public", "AiTextureMapMode", "getTextureMapModeU", "(", "AiTextureType", "type", ",", "int", "index", ")", "{", "checkTexRange", "(", "type", ",", "index", ")", ";", "Property", "p", "=", "getProperty", "(", "PropertyKey", ".", "TEX_MAP_MODE_U", ".", "m_key", ...
Returns the texture mapping mode for the u axis.<p> If missing, defaults to {@link AiTextureMapMode#CLAMP} @param type the texture type @param index the index in the texture stack @return the texture mapping mode
[ "Returns", "the", "texture", "mapping", "mode", "for", "the", "u", "axis", ".", "<p", ">" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L977-L988
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java
MacroCycleLayout.selectCoords
private int selectCoords(Collection<Point2d[]> ps, Point2d[] coords, IRing macrocycle, IRingSet ringset) { """ Select the best coordinates @param ps template points @param coords best coordinates (updated by this method) @param macrocycle the macrocycle @param ringset rest of the ring system @return offset ...
java
private int selectCoords(Collection<Point2d[]> ps, Point2d[] coords, IRing macrocycle, IRingSet ringset) { assert ps.size() != 0; final int[] winding = new int[coords.length]; MacroScore best = null; for (Point2d[] p : ps) { final int wind = winding(p, winding); ...
[ "private", "int", "selectCoords", "(", "Collection", "<", "Point2d", "[", "]", ">", "ps", ",", "Point2d", "[", "]", "coords", ",", "IRing", "macrocycle", ",", "IRingSet", "ringset", ")", "{", "assert", "ps", ".", "size", "(", ")", "!=", "0", ";", "fi...
Select the best coordinates @param ps template points @param coords best coordinates (updated by this method) @param macrocycle the macrocycle @param ringset rest of the ring system @return offset into the coordinates
[ "Select", "the", "best", "coordinates" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/MacroCycleLayout.java#L268-L284
aws/aws-sdk-java
aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/model/Player.java
Player.withPlayerAttributes
public Player withPlayerAttributes(java.util.Map<String, AttributeValue> playerAttributes) { """ <p> Collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the <i>playerAttributes</i> used in a matchmaking rule set. Example: <code>"PlayerAttributes":...
java
public Player withPlayerAttributes(java.util.Map<String, AttributeValue> playerAttributes) { setPlayerAttributes(playerAttributes); return this; }
[ "public", "Player", "withPlayerAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "AttributeValue", ">", "playerAttributes", ")", "{", "setPlayerAttributes", "(", "playerAttributes", ")", ";", "return", "this", ";", "}" ]
<p> Collection of key:value pairs containing player information for use in matchmaking. Player attribute keys must match the <i>playerAttributes</i> used in a matchmaking rule set. Example: <code>"PlayerAttributes": {"skill": {"N": "23"}, "gameMode": {"S": "deathmatch"}}</code>. </p> @param playerAttributes Collection...
[ "<p", ">", "Collection", "of", "key", ":", "value", "pairs", "containing", "player", "information", "for", "use", "in", "matchmaking", ".", "Player", "attribute", "keys", "must", "match", "the", "<i", ">", "playerAttributes<", "/", "i", ">", "used", "in", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-gamelift/src/main/java/com/amazonaws/services/gamelift/model/Player.java#L153-L156
google/closure-compiler
src/com/google/javascript/refactoring/ErrorToFixMapper.java
ErrorToFixMapper.getFixForJsError
public static SuggestedFix getFixForJsError(JSError error, AbstractCompiler compiler) { """ Creates a SuggestedFix for the given error. Note that some errors have multiple fixes so getFixesForJsError should often be used instead of this. """ switch (error.getType().key) { case "JSC_REDECLARED_VARIAB...
java
public static SuggestedFix getFixForJsError(JSError error, AbstractCompiler compiler) { switch (error.getType().key) { case "JSC_REDECLARED_VARIABLE": return getFixForRedeclaration(error, compiler); case "JSC_REFERENCE_BEFORE_DECLARE": return getFixForEarlyReference(error, compiler); ...
[ "public", "static", "SuggestedFix", "getFixForJsError", "(", "JSError", "error", ",", "AbstractCompiler", "compiler", ")", "{", "switch", "(", "error", ".", "getType", "(", ")", ".", "key", ")", "{", "case", "\"JSC_REDECLARED_VARIABLE\"", ":", "return", "getFixF...
Creates a SuggestedFix for the given error. Note that some errors have multiple fixes so getFixesForJsError should often be used instead of this.
[ "Creates", "a", "SuggestedFix", "for", "the", "given", "error", ".", "Note", "that", "some", "errors", "have", "multiple", "fixes", "so", "getFixesForJsError", "should", "often", "be", "used", "instead", "of", "this", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/refactoring/ErrorToFixMapper.java#L74-L111
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java
PAbstractObject.getObject
@Override public final PObject getObject(final String key) { """ Get a property as a object or throw exception. @param key the property name """ PObject result = optObject(key); if (result == null) { throw new ObjectMissingException(this, key); } return result...
java
@Override public final PObject getObject(final String key) { PObject result = optObject(key); if (result == null) { throw new ObjectMissingException(this, key); } return result; }
[ "@", "Override", "public", "final", "PObject", "getObject", "(", "final", "String", "key", ")", "{", "PObject", "result", "=", "optObject", "(", "key", ")", ";", "if", "(", "result", "==", "null", ")", "{", "throw", "new", "ObjectMissingException", "(", ...
Get a property as a object or throw exception. @param key the property name
[ "Get", "a", "property", "as", "a", "object", "or", "throw", "exception", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/wrapper/PAbstractObject.java#L180-L187
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java
ProcessEngineConfigurationImpl.ensurePrefixAndSchemaFitToegether
protected void ensurePrefixAndSchemaFitToegether(String prefix, String schema) { """ When providing a schema and a prefix the prefix has to be the schema ending with a dot. """ if (schema == null) { return; } else if (prefix == null || (prefix != null && !prefix.startsWith(schema + "."))) { ...
java
protected void ensurePrefixAndSchemaFitToegether(String prefix, String schema) { if (schema == null) { return; } else if (prefix == null || (prefix != null && !prefix.startsWith(schema + "."))) { throw new ProcessEngineException("When setting a schema the prefix has to be schema + '.'. Received sche...
[ "protected", "void", "ensurePrefixAndSchemaFitToegether", "(", "String", "prefix", ",", "String", "schema", ")", "{", "if", "(", "schema", "==", "null", ")", "{", "return", ";", "}", "else", "if", "(", "prefix", "==", "null", "||", "(", "prefix", "!=", "...
When providing a schema and a prefix the prefix has to be the schema ending with a dot.
[ "When", "providing", "a", "schema", "and", "a", "prefix", "the", "prefix", "has", "to", "be", "the", "schema", "ending", "with", "a", "dot", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java#L1677-L1683
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
JCudnn.cudnnSetLRNDescriptor
public static int cudnnSetLRNDescriptor( cudnnLRNDescriptor normDesc, int lrnN, double lrnAlpha, double lrnBeta, double lrnK) { """ <pre> Uses a window [center-lookBehind, center+lookAhead], where lookBehind = floor( (lrnN-1)/2 ), lookAhead = lrnN-lookBehind-1. Values...
java
public static int cudnnSetLRNDescriptor( cudnnLRNDescriptor normDesc, int lrnN, double lrnAlpha, double lrnBeta, double lrnK) { return checkResult(cudnnSetLRNDescriptorNative(normDesc, lrnN, lrnAlpha, lrnBeta, lrnK)); }
[ "public", "static", "int", "cudnnSetLRNDescriptor", "(", "cudnnLRNDescriptor", "normDesc", ",", "int", "lrnN", ",", "double", "lrnAlpha", ",", "double", "lrnBeta", ",", "double", "lrnK", ")", "{", "return", "checkResult", "(", "cudnnSetLRNDescriptorNative", "(", "...
<pre> Uses a window [center-lookBehind, center+lookAhead], where lookBehind = floor( (lrnN-1)/2 ), lookAhead = lrnN-lookBehind-1. Values of double parameters cast to tensor data type. </pre>
[ "<pre", ">", "Uses", "a", "window", "[", "center", "-", "lookBehind", "center", "+", "lookAhead", "]", "where", "lookBehind", "=", "floor", "(", "(", "lrnN", "-", "1", ")", "/", "2", ")", "lookAhead", "=", "lrnN", "-", "lookBehind", "-", "1", ".", ...
train
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java#L2002-L2010
drewwills/cernunnos
cernunnos-core/src/main/java/org/danann/cernunnos/runtime/web/Settings.java
Settings.locateContextConfig
public static URL locateContextConfig(String webappRootContext, String userSpecifiedContextLocation, URL defaultLocation) { """ Locate the configuration file, if present, for a Portlet or Servlet. @param webappRootContext Context URL (in String form) from which <code>userSpecifiedContextLocation</code> will be...
java
public static URL locateContextConfig(String webappRootContext, String userSpecifiedContextLocation, URL defaultLocation) { // Assertions. if (webappRootContext == null) { String msg = "Argument 'webappRootContext' cannot be null."; throw new IllegalArgumentException(msg); ...
[ "public", "static", "URL", "locateContextConfig", "(", "String", "webappRootContext", ",", "String", "userSpecifiedContextLocation", ",", "URL", "defaultLocation", ")", "{", "// Assertions.", "if", "(", "webappRootContext", "==", "null", ")", "{", "String", "msg", "...
Locate the configuration file, if present, for a Portlet or Servlet. @param webappRootContext Context URL (in String form) from which <code>userSpecifiedContextLocation</code> will be evaluated by <code>ResourceHelper</code>, if specified @param userSpecifiedContextLocation Optional location specified in the deploymen...
[ "Locate", "the", "configuration", "file", "if", "present", "for", "a", "Portlet", "or", "Servlet", "." ]
train
https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/runtime/web/Settings.java#L64-L95
tango-controls/JTango
server/src/main/java/org/tango/server/servant/ORBUtils.java
ORBUtils.registerDeviceForJacorb
private static void registerDeviceForJacorb(final String name) throws DevFailed { """ WARNING: The following code is JacORB specific. Add device name in HashTable used for JacORB objectKeyMap if _UseDb==false. @param name The device's name. @throws DevFailed """ // Get the 3 fields of device name...
java
private static void registerDeviceForJacorb(final String name) throws DevFailed { // Get the 3 fields of device name final StringTokenizer st = new StringTokenizer(name, "/"); final String[] field = new String[3]; for (int i = 0; i < 3 && st.countTokens() > 0; i++) { field[i]...
[ "private", "static", "void", "registerDeviceForJacorb", "(", "final", "String", "name", ")", "throws", "DevFailed", "{", "// Get the 3 fields of device name", "final", "StringTokenizer", "st", "=", "new", "StringTokenizer", "(", "name", ",", "\"/\"", ")", ";", "fina...
WARNING: The following code is JacORB specific. Add device name in HashTable used for JacORB objectKeyMap if _UseDb==false. @param name The device's name. @throws DevFailed
[ "WARNING", ":", "The", "following", "code", "is", "JacORB", "specific", ".", "Add", "device", "name", "in", "HashTable", "used", "for", "JacORB", "objectKeyMap", "if", "_UseDb", "==", "false", "." ]
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/server/src/main/java/org/tango/server/servant/ORBUtils.java#L157-L173
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/ModelMojoReader.java
ModelMojoReader.readFrom
public static MojoModel readFrom(MojoReaderBackend reader, final boolean readModelDescriptor) throws IOException { """ De-serializes a {@link MojoModel}, creating an instance of {@link MojoModel} useful for scoring and model evaluation. @param reader An instance of {@link MojoReaderBackend} to read from e...
java
public static MojoModel readFrom(MojoReaderBackend reader, final boolean readModelDescriptor) throws IOException { try { Map<String, Object> info = parseModelInfo(reader); if (! info.containsKey("algorithm")) throw new IllegalStateException("Unable to find information about the model's algorithm...
[ "public", "static", "MojoModel", "readFrom", "(", "MojoReaderBackend", "reader", ",", "final", "boolean", "readModelDescriptor", ")", "throws", "IOException", "{", "try", "{", "Map", "<", "String", ",", "Object", ">", "info", "=", "parseModelInfo", "(", "reader"...
De-serializes a {@link MojoModel}, creating an instance of {@link MojoModel} useful for scoring and model evaluation. @param reader An instance of {@link MojoReaderBackend} to read from existing MOJO @param readModelDescriptor If true, @return De-serialized {@link MojoModel} @throws IOException Whenever there is ...
[ "De", "-", "serializes", "a", "{", "@link", "MojoModel", "}", "creating", "an", "instance", "of", "{", "@link", "MojoModel", "}", "useful", "for", "scoring", "and", "model", "evaluation", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/ModelMojoReader.java#L50-L65
fuinorg/utils4j
src/main/java/org/fuin/utils4j/WaitHelper.java
WaitHelper.waitUntilResult
public <T> T waitUntilResult(final Callable<T> function, final List<T> expectedValues) throws Exception { """ Wait until one of the expected values was returned or the number of wait cycles has been exceeded. Throws {@link IllegalStateException} if the timeout is reached. @param function Function to read the ...
java
public <T> T waitUntilResult(final Callable<T> function, final List<T> expectedValues) throws Exception { final List<T> actualResults = new ArrayList<>(); int tries = 0; while (tries < maxTries) { final T result = function.call(); if (expectedValues.contains(result)) { ...
[ "public", "<", "T", ">", "T", "waitUntilResult", "(", "final", "Callable", "<", "T", ">", "function", ",", "final", "List", "<", "T", ">", "expectedValues", ")", "throws", "Exception", "{", "final", "List", "<", "T", ">", "actualResults", "=", "new", "...
Wait until one of the expected values was returned or the number of wait cycles has been exceeded. Throws {@link IllegalStateException} if the timeout is reached. @param function Function to read the value from. @param expectedValues List of values that are acceptable. @return Result. @throws Exception The function ...
[ "Wait", "until", "one", "of", "the", "expected", "values", "was", "returned", "or", "the", "number", "of", "wait", "cycles", "has", "been", "exceeded", ".", "Throws", "{", "@link", "IllegalStateException", "}", "if", "the", "timeout", "is", "reached", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/WaitHelper.java#L94-L110
census-instrumentation/opencensus-java
impl_core/src/main/java/io/opencensus/implcore/tags/propagation/CorrelationContextFormat.java
CorrelationContextFormat.decodeTag
private static void decodeTag(String stringTag, Map<TagKey, TagValueWithMetadata> tags) { """ The format of encoded string tag is name1=value1;properties1=p1;properties2=p2. """ String keyWithValue; int firstPropertyIndex = stringTag.indexOf(TAG_PROPERTIES_DELIMITER); if (firstPropertyIndex != -1) ...
java
private static void decodeTag(String stringTag, Map<TagKey, TagValueWithMetadata> tags) { String keyWithValue; int firstPropertyIndex = stringTag.indexOf(TAG_PROPERTIES_DELIMITER); if (firstPropertyIndex != -1) { // Tag with properties. keyWithValue = stringTag.substring(0, firstPropertyIndex); ...
[ "private", "static", "void", "decodeTag", "(", "String", "stringTag", ",", "Map", "<", "TagKey", ",", "TagValueWithMetadata", ">", "tags", ")", "{", "String", "keyWithValue", ";", "int", "firstPropertyIndex", "=", "stringTag", ".", "indexOf", "(", "TAG_PROPERTIE...
The format of encoded string tag is name1=value1;properties1=p1;properties2=p2.
[ "The", "format", "of", "encoded", "string", "tag", "is", "name1", "=", "value1", ";", "properties1", "=", "p1", ";", "properties2", "=", "p2", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/impl_core/src/main/java/io/opencensus/implcore/tags/propagation/CorrelationContextFormat.java#L171-L187
scravy/java-pair
src/main/java/de/scravy/pair/Pairs.java
Pairs.toMap
public static <K, V, M extends Map<K, V>> M toMap( final Iterable<Pair<K, V>> pairs, final Class<M> mapType) { """ Creates a {@link Map} of the given <code>mapType</code> from an {@link Iterable} of pairs <code>(k, v)</code>. @since 1.0.0 @param pairs The pairs. @param mapType The map type (must ha...
java
public static <K, V, M extends Map<K, V>> M toMap( final Iterable<Pair<K, V>> pairs, final Class<M> mapType) { try { final M map = mapType.newInstance(); return toMap(pairs, map); } catch (final Exception exc) { return null; } }
[ "public", "static", "<", "K", ",", "V", ",", "M", "extends", "Map", "<", "K", ",", "V", ">", ">", "M", "toMap", "(", "final", "Iterable", "<", "Pair", "<", "K", ",", "V", ">", ">", "pairs", ",", "final", "Class", "<", "M", ">", "mapType", ")"...
Creates a {@link Map} of the given <code>mapType</code> from an {@link Iterable} of pairs <code>(k, v)</code>. @since 1.0.0 @param pairs The pairs. @param mapType The map type (must have a public default constructor). @return The map populated with the values from <code>pairs</code> or <code>null</code>, if the Map c...
[ "Creates", "a", "{", "@link", "Map", "}", "of", "the", "given", "<code", ">", "mapType<", "/", "code", ">", "from", "an", "{", "@link", "Iterable", "}", "of", "pairs", "<code", ">", "(", "k", "v", ")", "<", "/", "code", ">", "." ]
train
https://github.com/scravy/java-pair/blob/d8792e86c4f8e977826a4ccb940e4416a1119ccb/src/main/java/de/scravy/pair/Pairs.java#L243-L251
liyiorg/weixin-popular
src/main/java/weixin/popular/api/WxaAPI.java
WxaAPI.get_auditstatus
public static GetAuditstatusResult get_auditstatus(String access_token,String auditid) { """ 代码管理<br> 获取第三方提交的审核版本的审核状态(仅供第三方代小程序调用) @since 2.8.9 @param access_token access_token @param auditid 审核ID @return result """ String json = String.format("{\"auditid\":\"%s\"}",auditid); HttpUriRequest httpUr...
java
public static GetAuditstatusResult get_auditstatus(String access_token,String auditid){ String json = String.format("{\"auditid\":\"%s\"}",auditid); HttpUriRequest httpUriRequest = RequestBuilder.post() .setHeader(jsonHeader) .setUri(BASE_URI + "/wxa/get_auditstatus") .addParameter(PARAM_ACCESS_TOK...
[ "public", "static", "GetAuditstatusResult", "get_auditstatus", "(", "String", "access_token", ",", "String", "auditid", ")", "{", "String", "json", "=", "String", ".", "format", "(", "\"{\\\"auditid\\\":\\\"%s\\\"}\"", ",", "auditid", ")", ";", "HttpUriRequest", "ht...
代码管理<br> 获取第三方提交的审核版本的审核状态(仅供第三方代小程序调用) @since 2.8.9 @param access_token access_token @param auditid 审核ID @return result
[ "代码管理<br", ">", "获取第三方提交的审核版本的审核状态(仅供第三方代小程序调用)" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/WxaAPI.java#L229-L238
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java
TransformerHandlerImpl.setResult
public void setResult(Result result) throws IllegalArgumentException { """ Enables the user of the TransformerHandler to set the to set the Result for the transformation. @param result A Result instance, should not be null. @throws IllegalArgumentException if result is invalid for some reason. """ ...
java
public void setResult(Result result) throws IllegalArgumentException { if (null == result) throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_RESULT_NULL, null)); //"result should not be null"); try { // ContentHandler handler = // m_transformer.createRe...
[ "public", "void", "setResult", "(", "Result", "result", ")", "throws", "IllegalArgumentException", "{", "if", "(", "null", "==", "result", ")", "throw", "new", "IllegalArgumentException", "(", "XSLMessages", ".", "createMessage", "(", "XSLTErrorResources", ".", "E...
Enables the user of the TransformerHandler to set the to set the Result for the transformation. @param result A Result instance, should not be null. @throws IllegalArgumentException if result is invalid for some reason.
[ "Enables", "the", "user", "of", "the", "TransformerHandler", "to", "set", "the", "to", "set", "the", "Result", "for", "the", "transformation", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java#L174-L195
xiancloud/xian
xian-zookeeper/xian-curator/xian-curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java
CuratorFrameworkFactory.newClient
public static CuratorFramework newClient(String connectString, RetryPolicy retryPolicy) { """ Create a new client with default session timeout and default connection timeout @param connectString list of servers to connect to @param retryPolicy retry policy to use @return client """ return newCli...
java
public static CuratorFramework newClient(String connectString, RetryPolicy retryPolicy) { return newClient(connectString, DEFAULT_SESSION_TIMEOUT_MS, DEFAULT_CONNECTION_TIMEOUT_MS, retryPolicy); }
[ "public", "static", "CuratorFramework", "newClient", "(", "String", "connectString", ",", "RetryPolicy", "retryPolicy", ")", "{", "return", "newClient", "(", "connectString", ",", "DEFAULT_SESSION_TIMEOUT_MS", ",", "DEFAULT_CONNECTION_TIMEOUT_MS", ",", "retryPolicy", ")",...
Create a new client with default session timeout and default connection timeout @param connectString list of servers to connect to @param retryPolicy retry policy to use @return client
[ "Create", "a", "new", "client", "with", "default", "session", "timeout", "and", "default", "connection", "timeout" ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-zookeeper/xian-curator/xian-curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java#L79-L82
Viascom/groundwork
foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/builder/FoxHttpRequestBuilder.java
FoxHttpRequestBuilder.addFoxHttpPlaceholderEntry
public FoxHttpRequestBuilder addFoxHttpPlaceholderEntry(String placeholder, String value) { """ Add a FoxHttpPlaceholderEntry to the FoxHttpPlaceholderStrategy @param placeholder name of the placeholder (without escape char) @param value value of the placeholder @return FoxHttpClientBuilder (this) "...
java
public FoxHttpRequestBuilder addFoxHttpPlaceholderEntry(String placeholder, String value) { foxHttpRequest.getFoxHttpClient().getFoxHttpPlaceholderStrategy().addPlaceholder(placeholder, value); return this; }
[ "public", "FoxHttpRequestBuilder", "addFoxHttpPlaceholderEntry", "(", "String", "placeholder", ",", "String", "value", ")", "{", "foxHttpRequest", ".", "getFoxHttpClient", "(", ")", ".", "getFoxHttpPlaceholderStrategy", "(", ")", ".", "addPlaceholder", "(", "placeholder...
Add a FoxHttpPlaceholderEntry to the FoxHttpPlaceholderStrategy @param placeholder name of the placeholder (without escape char) @param value value of the placeholder @return FoxHttpClientBuilder (this)
[ "Add", "a", "FoxHttpPlaceholderEntry", "to", "the", "FoxHttpPlaceholderStrategy" ]
train
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/builder/FoxHttpRequestBuilder.java#L251-L254
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/AnalyticsItemsInner.java
AnalyticsItemsInner.listAsync
public Observable<List<ApplicationInsightsComponentAnalyticsItemInner>> listAsync(String resourceGroupName, String resourceName, ItemScopePath scopePath) { """ Gets a list of Analytics Items defined within an Application Insights component. @param resourceGroupName The name of the resource group. @param resour...
java
public Observable<List<ApplicationInsightsComponentAnalyticsItemInner>> listAsync(String resourceGroupName, String resourceName, ItemScopePath scopePath) { return listWithServiceResponseAsync(resourceGroupName, resourceName, scopePath).map(new Func1<ServiceResponse<List<ApplicationInsightsComponentAnalyticsItem...
[ "public", "Observable", "<", "List", "<", "ApplicationInsightsComponentAnalyticsItemInner", ">", ">", "listAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "ItemScopePath", "scopePath", ")", "{", "return", "listWithServiceResponseAsync", "("...
Gets a list of Analytics Items defined within an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param scopePath Enum indicating if this item definition is owned by a specific user or is shared betwee...
[ "Gets", "a", "list", "of", "Analytics", "Items", "defined", "within", "an", "Application", "Insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/AnalyticsItemsInner.java#L118-L125
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java
DerInputStream.subStream
public DerInputStream subStream(int len, boolean do_skip) throws IOException { """ Creates a new DER input stream from part of this input stream. @param len how long a chunk of the current input stream to use, starting at the current position. @param do_skip true if the existing data in the input stream s...
java
public DerInputStream subStream(int len, boolean do_skip) throws IOException { DerInputBuffer newbuf = buffer.dup(); newbuf.truncate(len); if (do_skip) { buffer.skip(len); } return new DerInputStream(newbuf); }
[ "public", "DerInputStream", "subStream", "(", "int", "len", ",", "boolean", "do_skip", ")", "throws", "IOException", "{", "DerInputBuffer", "newbuf", "=", "buffer", ".", "dup", "(", ")", ";", "newbuf", ".", "truncate", "(", "len", ")", ";", "if", "(", "d...
Creates a new DER input stream from part of this input stream. @param len how long a chunk of the current input stream to use, starting at the current position. @param do_skip true if the existing data in the input stream should be skipped. If this value is false, the next data read on this stream and the newly creat...
[ "Creates", "a", "new", "DER", "input", "stream", "from", "part", "of", "this", "input", "stream", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L132-L141
alkacon/opencms-core
src/org/opencms/loader/CmsRedirectLoader.java
CmsRedirectLoader.getController
protected CmsFlexController getController( CmsObject cms, CmsResource resource, HttpServletRequest req, HttpServletResponse res, boolean streaming, boolean top) { """ Delivers a Flex controller, either by creating a new one, or by re-using an existing one.<p> @par...
java
protected CmsFlexController getController( CmsObject cms, CmsResource resource, HttpServletRequest req, HttpServletResponse res, boolean streaming, boolean top) { CmsFlexController controller = null; if (top) { // only check for existing contr...
[ "protected", "CmsFlexController", "getController", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ",", "boolean", "streaming", ",", "boolean", "top", ")", "{", "CmsFlexController", "control...
Delivers a Flex controller, either by creating a new one, or by re-using an existing one.<p> @param cms the initial CmsObject to wrap in the controller @param resource the resource requested @param req the current request @param res the current response @param streaming indicates if the response is streaming @param to...
[ "Delivers", "a", "Flex", "controller", "either", "by", "creating", "a", "new", "one", "or", "by", "re", "-", "using", "an", "existing", "one", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsRedirectLoader.java#L209-L235
tencentyun/cos-java-sdk
src/main/java/com/qcloud/cos/sign/Sign.java
Sign.getDownLoadSign
public static String getDownLoadSign(String bucketName, String cosPath, Credentials cred, long expired) throws AbstractCosException { """ 下载签名, 用于获取后拼接成下载链接,下载私有bucket的文件 @param bucketName bucket名称 @param cosPath 要签名的cos路径 @param cred 用户的身份信息, 包括appid, secret_id和secret_key @param expired 签名过期时间, UNIX时...
java
public static String getDownLoadSign(String bucketName, String cosPath, Credentials cred, long expired) throws AbstractCosException { return appSignatureBase(cred, bucketName, cosPath, expired, false); }
[ "public", "static", "String", "getDownLoadSign", "(", "String", "bucketName", ",", "String", "cosPath", ",", "Credentials", "cred", ",", "long", "expired", ")", "throws", "AbstractCosException", "{", "return", "appSignatureBase", "(", "cred", ",", "bucketName", ",...
下载签名, 用于获取后拼接成下载链接,下载私有bucket的文件 @param bucketName bucket名称 @param cosPath 要签名的cos路径 @param cred 用户的身份信息, 包括appid, secret_id和secret_key @param expired 签名过期时间, UNIX时间戳。如想让签名在30秒后过期, 即可将expired设成当前时间加上30秒 @return base64编码的字符串 @throws AbstractCosException
[ "下载签名", "用于获取后拼接成下载链接,下载私有bucket的文件" ]
train
https://github.com/tencentyun/cos-java-sdk/blob/6709a48f67c1ea7b82a7215f5037d6ccf218b630/src/main/java/com/qcloud/cos/sign/Sign.java#L111-L114
iipc/webarchive-commons
src/main/java/org/archive/util/DateUtils.java
DateUtils.padTo
public static String padTo(final int i, final int pad) { """ Convert an <code>int</code> to a <code>String</code>, and pad it to <code>pad</code> spaces. @param i the int @param pad the width to pad to. @return String w/ padding. """ String n = Integer.toString(i); return padTo(n, pad); ...
java
public static String padTo(final int i, final int pad) { String n = Integer.toString(i); return padTo(n, pad); }
[ "public", "static", "String", "padTo", "(", "final", "int", "i", ",", "final", "int", "pad", ")", "{", "String", "n", "=", "Integer", ".", "toString", "(", "i", ")", ";", "return", "padTo", "(", "n", ",", "pad", ")", ";", "}" ]
Convert an <code>int</code> to a <code>String</code>, and pad it to <code>pad</code> spaces. @param i the int @param pad the width to pad to. @return String w/ padding.
[ "Convert", "an", "<code", ">", "int<", "/", "code", ">", "to", "a", "<code", ">", "String<", "/", "code", ">", "and", "pad", "it", "to", "<code", ">", "pad<", "/", "code", ">", "spaces", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/DateUtils.java#L467-L470
Wadpam/guja
guja-core/src/main/java/com/wadpam/guja/i18n/dao/GeneratedDi18nDaoImpl.java
GeneratedDi18nDaoImpl.queryByCreatedDate
public Iterable<Di18n> queryByCreatedDate(java.util.Date createdDate) { """ query-by method for field createdDate @param createdDate the specified attribute @return an Iterable of Di18ns for the specified createdDate """ return queryByField(null, Di18nMapper.Field.CREATEDDATE.getFieldName(), createdDate)...
java
public Iterable<Di18n> queryByCreatedDate(java.util.Date createdDate) { return queryByField(null, Di18nMapper.Field.CREATEDDATE.getFieldName(), createdDate); }
[ "public", "Iterable", "<", "Di18n", ">", "queryByCreatedDate", "(", "java", ".", "util", ".", "Date", "createdDate", ")", "{", "return", "queryByField", "(", "null", ",", "Di18nMapper", ".", "Field", ".", "CREATEDDATE", ".", "getFieldName", "(", ")", ",", ...
query-by method for field createdDate @param createdDate the specified attribute @return an Iterable of Di18ns for the specified createdDate
[ "query", "-", "by", "method", "for", "field", "createdDate" ]
train
https://github.com/Wadpam/guja/blob/eb8ba8e6794a96ea0dd9744cada4f9ad9618f114/guja-core/src/main/java/com/wadpam/guja/i18n/dao/GeneratedDi18nDaoImpl.java#L61-L63
CODAIT/stocator
src/main/java/com/ibm/stocator/fs/common/Utils.java
Utils.extractReminder
public static String extractReminder(String publicURL, String accessURL) { """ Extracts container/object from http://hostname/v1/auth_id/container/object @param publicURL pubic url @param accessURL access url @return reminder of the URI """ return publicURL.substring(accessURL.length()); }
java
public static String extractReminder(String publicURL, String accessURL) { return publicURL.substring(accessURL.length()); }
[ "public", "static", "String", "extractReminder", "(", "String", "publicURL", ",", "String", "accessURL", ")", "{", "return", "publicURL", ".", "substring", "(", "accessURL", ".", "length", "(", ")", ")", ";", "}" ]
Extracts container/object from http://hostname/v1/auth_id/container/object @param publicURL pubic url @param accessURL access url @return reminder of the URI
[ "Extracts", "container", "/", "object", "from", "http", ":", "//", "hostname", "/", "v1", "/", "auth_id", "/", "container", "/", "object" ]
train
https://github.com/CODAIT/stocator/blob/35969cadd2e8faa6fdac45e8bec1799fdd3d8299/src/main/java/com/ibm/stocator/fs/common/Utils.java#L458-L460
Samsung/GearVRf
GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java
JSONHelpers.optJSONObject
public static <P extends Enum<P>> JSONObject optJSONObject(final JSONObject json, P e) { """ Returns the value mapped by enum if it exists and is a {@link JSONObject}. If the value does not exist returns {@code null}. @param json {@link JSONObject} to get data from @param e {@link Enum} labeling the data t...
java
public static <P extends Enum<P>> JSONObject optJSONObject(final JSONObject json, P e) { return json.optJSONObject(e.name()); }
[ "public", "static", "<", "P", "extends", "Enum", "<", "P", ">", ">", "JSONObject", "optJSONObject", "(", "final", "JSONObject", "json", ",", "P", "e", ")", "{", "return", "json", ".", "optJSONObject", "(", "e", ".", "name", "(", ")", ")", ";", "}" ]
Returns the value mapped by enum if it exists and is a {@link JSONObject}. If the value does not exist returns {@code null}. @param json {@link JSONObject} to get data from @param e {@link Enum} labeling the data to get @return A {@code JSONObject} if the mapping exists; {@code null} otherwise
[ "Returns", "the", "value", "mapped", "by", "enum", "if", "it", "exists", "and", "is", "a", "{", "@link", "JSONObject", "}", ".", "If", "the", "value", "does", "not", "exist", "returns", "{", "@code", "null", "}", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/properties/JSONHelpers.java#L399-L401
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.beginPause
public void beginPause(String resourceGroupName, String serverName, String databaseName) { """ Pauses a data warehouse. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of ...
java
public void beginPause(String resourceGroupName, String serverName, String databaseName) { beginPauseWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); }
[ "public", "void", "beginPause", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "beginPauseWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "databaseName", ")", ".", "toBlocking", "(...
Pauses a data warehouse. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the data warehouse to pause. @throws IllegalArgumentExcepti...
[ "Pauses", "a", "data", "warehouse", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L244-L246
aws/aws-sdk-java
aws-java-sdk-costexplorer/src/main/java/com/amazonaws/services/costexplorer/model/Group.java
Group.withMetrics
public Group withMetrics(java.util.Map<String, MetricValue> metrics) { """ <p> The metrics that are included in this group. </p> @param metrics The metrics that are included in this group. @return Returns a reference to this object so that method calls can be chained together. """ setMetrics(met...
java
public Group withMetrics(java.util.Map<String, MetricValue> metrics) { setMetrics(metrics); return this; }
[ "public", "Group", "withMetrics", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "MetricValue", ">", "metrics", ")", "{", "setMetrics", "(", "metrics", ")", ";", "return", "this", ";", "}" ]
<p> The metrics that are included in this group. </p> @param metrics The metrics that are included in this group. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "metrics", "that", "are", "included", "in", "this", "group", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-costexplorer/src/main/java/com/amazonaws/services/costexplorer/model/Group.java#L148-L151
RuedigerMoeller/kontraktor
src/main/java/org/nustaq/kontraktor/Promise.java
Promise.finallyDo
public void finallyDo(Callback resultCB) { """ same as then, but avoid creation of new promise @param resultCB """ // FIXME: this can be implemented more efficient while( !lock.compareAndSet(false,true) ) {} try { if (resultReceiver != null) throw new Runtim...
java
public void finallyDo(Callback resultCB) { // FIXME: this can be implemented more efficient while( !lock.compareAndSet(false,true) ) {} try { if (resultReceiver != null) throw new RuntimeException("Double register of future listener"); resultReceiver = res...
[ "public", "void", "finallyDo", "(", "Callback", "resultCB", ")", "{", "// FIXME: this can be implemented more efficient", "while", "(", "!", "lock", ".", "compareAndSet", "(", "false", ",", "true", ")", ")", "{", "}", "try", "{", "if", "(", "resultReceiver", "...
same as then, but avoid creation of new promise @param resultCB
[ "same", "as", "then", "but", "avoid", "creation", "of", "new", "promise" ]
train
https://github.com/RuedigerMoeller/kontraktor/blob/d5f3817f9476f3786187b8ef00400b7a4f25a404/src/main/java/org/nustaq/kontraktor/Promise.java#L320-L335
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClient.java
MarkLogicClient.sendUpdateQuery
public void sendUpdateQuery(String queryString, SPARQLQueryBindingSet bindings, boolean includeInferred, String baseURI) throws IOException, RepositoryException, MalformedQueryException,UpdateExecutionException { """ UpdateQuery @param queryString @param bindings @param includeInferred @param baseURI @throw...
java
public void sendUpdateQuery(String queryString, SPARQLQueryBindingSet bindings, boolean includeInferred, String baseURI) throws IOException, RepositoryException, MalformedQueryException,UpdateExecutionException { getClient().performUpdateQuery(queryString, bindings, this.tx, includeInferred, baseURI); }
[ "public", "void", "sendUpdateQuery", "(", "String", "queryString", ",", "SPARQLQueryBindingSet", "bindings", ",", "boolean", "includeInferred", ",", "String", "baseURI", ")", "throws", "IOException", ",", "RepositoryException", ",", "MalformedQueryException", ",", "Upda...
UpdateQuery @param queryString @param bindings @param includeInferred @param baseURI @throws IOException @throws RepositoryException @throws MalformedQueryException @throws UnauthorizedException @throws UpdateExecutionException
[ "UpdateQuery" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClient.java#L289-L291
JodaOrg/joda-money
src/main/java/org/joda/money/Money.java
Money.ofMajor
public static Money ofMajor(CurrencyUnit currency, long amountMajor) { """ Obtains an instance of {@code Money} from an amount in major units. <p> This allows you to create an instance with a specific currency and amount. The amount is a whole number only. Thus you can initialise the value 'USD 20', but not th...
java
public static Money ofMajor(CurrencyUnit currency, long amountMajor) { return Money.of(currency, BigDecimal.valueOf(amountMajor), RoundingMode.UNNECESSARY); }
[ "public", "static", "Money", "ofMajor", "(", "CurrencyUnit", "currency", ",", "long", "amountMajor", ")", "{", "return", "Money", ".", "of", "(", "currency", ",", "BigDecimal", ".", "valueOf", "(", "amountMajor", ")", ",", "RoundingMode", ".", "UNNECESSARY", ...
Obtains an instance of {@code Money} from an amount in major units. <p> This allows you to create an instance with a specific currency and amount. The amount is a whole number only. Thus you can initialise the value 'USD 20', but not the value 'USD 20.32'. For example, {@code ofMajor(USD, 25)} creates the instance {@co...
[ "Obtains", "an", "instance", "of", "{", "@code", "Money", "}", "from", "an", "amount", "in", "major", "units", ".", "<p", ">", "This", "allows", "you", "to", "create", "an", "instance", "with", "a", "specific", "currency", "and", "amount", ".", "The", ...
train
https://github.com/JodaOrg/joda-money/blob/e1f2de75aa36610a695358696c8a88a18ca66cde/src/main/java/org/joda/money/Money.java#L162-L164
ModeShape/modeshape
modeshape-common/src/main/java/org/modeshape/common/util/SecureHash.java
SecureHash.createHashingStream
public static HashingInputStream createHashingStream( String digestName, InputStream inputStream ) throws NoSuchAlgorithmException { """ Create an InputStream instance that wraps another stream and that computes the secure hash (using the algorithm with the...
java
public static HashingInputStream createHashingStream( String digestName, InputStream inputStream ) throws NoSuchAlgorithmException { MessageDigest digest = MessageDigest.getInstance(digestName); return new HashingInputStream(digest, inputStream);...
[ "public", "static", "HashingInputStream", "createHashingStream", "(", "String", "digestName", ",", "InputStream", "inputStream", ")", "throws", "NoSuchAlgorithmException", "{", "MessageDigest", "digest", "=", "MessageDigest", ".", "getInstance", "(", "digestName", ")", ...
Create an InputStream instance that wraps another stream and that computes the secure hash (using the algorithm with the supplied name) as the returned stream is used. This can be used to compute the hash of a stream while the stream is being processed by another reader, and saves from having to process the same stream...
[ "Create", "an", "InputStream", "instance", "that", "wraps", "another", "stream", "and", "that", "computes", "the", "secure", "hash", "(", "using", "the", "algorithm", "with", "the", "supplied", "name", ")", "as", "the", "returned", "stream", "is", "used", "....
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-common/src/main/java/org/modeshape/common/util/SecureHash.java#L280-L284
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressRestrictionPersistenceImpl.java
CommerceAddressRestrictionPersistenceImpl.removeByC_C
@Override public void removeByC_C(long classNameId, long classPK) { """ Removes all the commerce address restrictions where classNameId = &#63; and classPK = &#63; from the database. @param classNameId the class name ID @param classPK the class pk """ for (CommerceAddressRestriction commerceAddressRestr...
java
@Override public void removeByC_C(long classNameId, long classPK) { for (CommerceAddressRestriction commerceAddressRestriction : findByC_C( classNameId, classPK, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceAddressRestriction); } }
[ "@", "Override", "public", "void", "removeByC_C", "(", "long", "classNameId", ",", "long", "classPK", ")", "{", "for", "(", "CommerceAddressRestriction", "commerceAddressRestriction", ":", "findByC_C", "(", "classNameId", ",", "classPK", ",", "QueryUtil", ".", "AL...
Removes all the commerce address restrictions where classNameId = &#63; and classPK = &#63; from the database. @param classNameId the class name ID @param classPK the class pk
[ "Removes", "all", "the", "commerce", "address", "restrictions", "where", "classNameId", "=", "&#63", ";", "and", "classPK", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAddressRestrictionPersistenceImpl.java#L1113-L1119
spockframework/spock
spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java
GroovyRuntimeUtil.instantiateClosure
public static <T extends Closure<?>> T instantiateClosure(Class<T> closureType, Object owner, Object thisObject) { """ Note: This method may throw checked exceptions although it doesn't say so. """ try { Constructor<T> constructor = closureType.getConstructor(Object.class, Object.class); return...
java
public static <T extends Closure<?>> T instantiateClosure(Class<T> closureType, Object owner, Object thisObject) { try { Constructor<T> constructor = closureType.getConstructor(Object.class, Object.class); return constructor.newInstance(owner, thisObject); } catch (Exception e) { ExceptionUtil...
[ "public", "static", "<", "T", "extends", "Closure", "<", "?", ">", ">", "T", "instantiateClosure", "(", "Class", "<", "T", ">", "closureType", ",", "Object", "owner", ",", "Object", "thisObject", ")", "{", "try", "{", "Constructor", "<", "T", ">", "con...
Note: This method may throw checked exceptions although it doesn't say so.
[ "Note", ":", "This", "method", "may", "throw", "checked", "exceptions", "although", "it", "doesn", "t", "say", "so", "." ]
train
https://github.com/spockframework/spock/blob/d751a0abd8d5a2ec5338aa10bc2d19371b3b3ad9/spock-core/src/main/java/org/spockframework/runtime/GroovyRuntimeUtil.java#L211-L219
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java
BigDecimalUtil.sqrtNewtonRaphson
private static BigDecimal sqrtNewtonRaphson(final BigDecimal c, final BigDecimal xn, final BigDecimal precision) { """ Private utility method used to compute the square root of a BigDecimal. @author Luciano Culacciatti @see <a href="http://www.codeproject.com/Tips/257031/Implementing-SqrtRoot-in-BigDecimal">ht...
java
private static BigDecimal sqrtNewtonRaphson(final BigDecimal c, final BigDecimal xn, final BigDecimal precision) { BigDecimal fx = xn.pow(2).add(c.negate()); BigDecimal fpx = xn.multiply(new BigDecimal(2)); BigDecimal xn1 = fx.divide(fpx, 2 * SQRT_DIG.intValue(), RoundingMode.HALF_DOWN); ...
[ "private", "static", "BigDecimal", "sqrtNewtonRaphson", "(", "final", "BigDecimal", "c", ",", "final", "BigDecimal", "xn", ",", "final", "BigDecimal", "precision", ")", "{", "BigDecimal", "fx", "=", "xn", ".", "pow", "(", "2", ")", ".", "add", "(", "c", ...
Private utility method used to compute the square root of a BigDecimal. @author Luciano Culacciatti @see <a href="http://www.codeproject.com/Tips/257031/Implementing-SqrtRoot-in-BigDecimal">http://www.codeproject.com/Tips/257031/Implementing-SqrtRoot-in-BigDecimal</a>
[ "Private", "utility", "method", "used", "to", "compute", "the", "square", "root", "of", "a", "BigDecimal", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java#L782-L794
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/internal/ExtensionFactory.java
ExtensionFactory.getExtensionAuthor
public ExtensionAuthor getExtensionAuthor(String name, String url) { """ Store and return a weak reference equals to the passed {@link ExtensionAuthor}. @param name the name of the author @param url the url of the author public profile @return unique instance of {@link ExtensionAuthor} equals to the passed on...
java
public ExtensionAuthor getExtensionAuthor(String name, String url) { return getExtensionAuthor(new DefaultExtensionAuthor(name, url)); }
[ "public", "ExtensionAuthor", "getExtensionAuthor", "(", "String", "name", ",", "String", "url", ")", "{", "return", "getExtensionAuthor", "(", "new", "DefaultExtensionAuthor", "(", "name", ",", "url", ")", ")", ";", "}" ]
Store and return a weak reference equals to the passed {@link ExtensionAuthor}. @param name the name of the author @param url the url of the author public profile @return unique instance of {@link ExtensionAuthor} equals to the passed one
[ "Store", "and", "return", "a", "weak", "reference", "equals", "to", "the", "passed", "{", "@link", "ExtensionAuthor", "}", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-extension/xwiki-commons-extension-api/src/main/java/org/xwiki/extension/internal/ExtensionFactory.java#L110-L113
zsoltk/overpasser
library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java
OverpassFilterQuery.tagRegexNot
public OverpassFilterQuery tagRegexNot(String name, String value) { """ Adds a <i>["name"!~value]</i> filter tag to the current query. @param name the filter name @param value the filter value @return the current query object """ builder.regexDoesntMatch(name, value); return this; }
java
public OverpassFilterQuery tagRegexNot(String name, String value) { builder.regexDoesntMatch(name, value); return this; }
[ "public", "OverpassFilterQuery", "tagRegexNot", "(", "String", "name", ",", "String", "value", ")", "{", "builder", ".", "regexDoesntMatch", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a <i>["name"!~value]</i> filter tag to the current query. @param name the filter name @param value the filter value @return the current query object
[ "Adds", "a", "<i", ">", "[", "name", "!~value", "]", "<", "/", "i", ">", "filter", "tag", "to", "the", "current", "query", "." ]
train
https://github.com/zsoltk/overpasser/blob/0464d3844e75c5f9393d2458d3a3aedf3e40f30d/library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java#L205-L209
brutusin/commons
src/main/java/org/brutusin/commons/utils/Miscellaneous.java
Miscellaneous.countMatches
public static int countMatches(String str, String subStrRegExp) { """ <p> Counts how many times the substring appears in the larger String.</p> <p> A <code>null</code> or empty ("") String input returns <code>0</code>.</p> <pre> StringUtils.countMatches(null, *) = 0 StringUtils.countMatches("", *)...
java
public static int countMatches(String str, String subStrRegExp) { if (isEmpty(str) || isEmpty(subStrRegExp)) { return 0; } Pattern p = Pattern.compile(subStrRegExp); Matcher m = p.matcher(str); int count = 0; while (m.find()) { count += 1; ...
[ "public", "static", "int", "countMatches", "(", "String", "str", ",", "String", "subStrRegExp", ")", "{", "if", "(", "isEmpty", "(", "str", ")", "||", "isEmpty", "(", "subStrRegExp", ")", ")", "{", "return", "0", ";", "}", "Pattern", "p", "=", "Pattern...
<p> Counts how many times the substring appears in the larger String.</p> <p> A <code>null</code> or empty ("") String input returns <code>0</code>.</p> <pre> StringUtils.countMatches(null, *) = 0 StringUtils.countMatches("", *) = 0 StringUtils.countMatches("abba", null) = 0 StringUtils.countMatches("a...
[ "<p", ">", "Counts", "how", "many", "times", "the", "substring", "appears", "in", "the", "larger", "String", ".", "<", "/", "p", ">" ]
train
https://github.com/brutusin/commons/blob/70685df2b2456d0bf1e6a4754d72c87bba4949df/src/main/java/org/brutusin/commons/utils/Miscellaneous.java#L216-L227
josueeduardo/snappy
plugin-parent/snappy-loader/src/main/java/io/joshworks/snappy/loader/jar/JarEntryData.java
JarEntryData.fromInputStream
static JarEntryData fromInputStream(JarFile source, InputStream inputStream) throws IOException { """ Create a new {@link JarEntryData} instance from the specified input stream. @param source the source {@link JarFile} @param inputStream the input stream to load data from @return a {@link Jar...
java
static JarEntryData fromInputStream(JarFile source, InputStream inputStream) throws IOException { byte[] header = new byte[46]; if (!Bytes.fill(inputStream, header)) { return null; } return new JarEntryData(source, header, inputStream); }
[ "static", "JarEntryData", "fromInputStream", "(", "JarFile", "source", ",", "InputStream", "inputStream", ")", "throws", "IOException", "{", "byte", "[", "]", "header", "=", "new", "byte", "[", "46", "]", ";", "if", "(", "!", "Bytes", ".", "fill", "(", "...
Create a new {@link JarEntryData} instance from the specified input stream. @param source the source {@link JarFile} @param inputStream the input stream to load data from @return a {@link JarEntryData} or {@code null} @throws IOException in case of I/O errors
[ "Create", "a", "new", "{", "@link", "JarEntryData", "}", "instance", "from", "the", "specified", "input", "stream", "." ]
train
https://github.com/josueeduardo/snappy/blob/d95a9e811eda3c24a5e53086369208819884fa49/plugin-parent/snappy-loader/src/main/java/io/joshworks/snappy/loader/jar/JarEntryData.java#L83-L90
JodaOrg/joda-time
src/example/org/joda/example/time/DateTimeBrowser.java
DateTimeBrowser.dumpObjs
private void dumpObjs(Object[][] objs, PrintStream out ) { """ /* A private method to dump the arrays of Object[][] if desired by the developer @param objs The array of arrays to be dumped. """ for (int i = 0; i < objs.length; ++i) { for (int j = 0; j < objs[i].length; ++j) { ...
java
private void dumpObjs(Object[][] objs, PrintStream out ) { for (int i = 0; i < objs.length; ++i) { for (int j = 0; j < objs[i].length; ++j) { out.println(i + " " + j + " " + objs[i][j]); } // for j } // for i }
[ "private", "void", "dumpObjs", "(", "Object", "[", "]", "[", "]", "objs", ",", "PrintStream", "out", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "objs", ".", "length", ";", "++", "i", ")", "{", "for", "(", "int", "j", "=", "0",...
/* A private method to dump the arrays of Object[][] if desired by the developer @param objs The array of arrays to be dumped.
[ "/", "*", "A", "private", "method", "to", "dump", "the", "arrays", "of", "Object", "[]", "[]", "if", "desired", "by", "the", "developer" ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/example/org/joda/example/time/DateTimeBrowser.java#L337-L344
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/CertificatesInner.java
CertificatesInner.getAsync
public Observable<IntegrationAccountCertificateInner> getAsync(String resourceGroupName, String integrationAccountName, String certificateName) { """ Gets an integration account certificate. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param ce...
java
public Observable<IntegrationAccountCertificateInner> getAsync(String resourceGroupName, String integrationAccountName, String certificateName) { return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName).map(new Func1<ServiceResponse<IntegrationAccountCertificateInner>, Inte...
[ "public", "Observable", "<", "IntegrationAccountCertificateInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "String", "certificateName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",...
Gets an integration account certificate. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param certificateName The integration account certificate name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the...
[ "Gets", "an", "integration", "account", "certificate", "." ]
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/CertificatesInner.java#L369-L376
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_ovhPabx_serviceName_hunting_agent_agentId_bannerAccess_GET
public OvhBannerAccess billingAccount_ovhPabx_serviceName_hunting_agent_agentId_bannerAccess_GET(String billingAccount, String serviceName, Long agentId) throws IOException { """ Get this object properties REST: GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess @param b...
java
public OvhBannerAccess billingAccount_ovhPabx_serviceName_hunting_agent_agentId_bannerAccess_GET(String billingAccount, String serviceName, Long agentId) throws IOException { String qPath = "/telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess"; StringBuilder sb = path(qPath, billi...
[ "public", "OvhBannerAccess", "billingAccount_ovhPabx_serviceName_hunting_agent_agentId_bannerAccess_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "agentId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/{billingAcco...
Get this object properties REST: GET /telephony/{billingAccount}/ovhPabx/{serviceName}/hunting/agent/{agentId}/bannerAccess @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param agentId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L6163-L6168
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/TraceId.java
TraceId.fromBytes
public static TraceId fromBytes(byte[] src, int srcOffset) { """ Returns a {@code TraceId} whose representation is copied from the {@code src} beginning at the {@code srcOffset} offset. @param src the buffer where the representation of the {@code TraceId} is copied. @param srcOffset the offset in the buffer w...
java
public static TraceId fromBytes(byte[] src, int srcOffset) { Utils.checkNotNull(src, "src"); return new TraceId( BigendianEncoding.longFromByteArray(src, srcOffset), BigendianEncoding.longFromByteArray(src, srcOffset + BigendianEncoding.LONG_BYTES)); }
[ "public", "static", "TraceId", "fromBytes", "(", "byte", "[", "]", "src", ",", "int", "srcOffset", ")", "{", "Utils", ".", "checkNotNull", "(", "src", ",", "\"src\"", ")", ";", "return", "new", "TraceId", "(", "BigendianEncoding", ".", "longFromByteArray", ...
Returns a {@code TraceId} whose representation is copied from the {@code src} beginning at the {@code srcOffset} offset. @param src the buffer where the representation of the {@code TraceId} is copied. @param srcOffset the offset in the buffer where the representation of the {@code TraceId} begins. @return a {@code Tr...
[ "Returns", "a", "{", "@code", "TraceId", "}", "whose", "representation", "is", "copied", "from", "the", "{", "@code", "src", "}", "beginning", "at", "the", "{", "@code", "srcOffset", "}", "offset", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/TraceId.java#L87-L92
pip-services3-java/pip-services3-components-java
src/org/pipservices3/components/count/CompositeCounters.java
CompositeCounters.setReferences
public void setReferences(IReferences references) throws ReferenceException { """ Sets references to dependent components. @param references references to locate the component dependencies. @throws ReferenceException when no references found. """ List<Object> counters = references.getOptional(new Descrip...
java
public void setReferences(IReferences references) throws ReferenceException { List<Object> counters = references.getOptional(new Descriptor(null, "counters", null, null, null)); for (Object counter : counters) { if (counter instanceof ICounters && counter != this) _counters.add((ICounters) counter); } }
[ "public", "void", "setReferences", "(", "IReferences", "references", ")", "throws", "ReferenceException", "{", "List", "<", "Object", ">", "counters", "=", "references", ".", "getOptional", "(", "new", "Descriptor", "(", "null", ",", "\"counters\"", ",", "null",...
Sets references to dependent components. @param references references to locate the component dependencies. @throws ReferenceException when no references found.
[ "Sets", "references", "to", "dependent", "components", "." ]
train
https://github.com/pip-services3-java/pip-services3-components-java/blob/122352fbf9b208f6417376da7b8ad725bc85ee58/src/org/pipservices3/components/count/CompositeCounters.java#L58-L64
hawkular/hawkular-commons
hawkular-command-gateway/hawkular-command-gateway-api/src/main/java/org/hawkular/cmdgw/api/ApiDeserializer.java
ApiDeserializer.toHawkularFormat
public static BinaryData toHawkularFormat(BasicMessage msg, InputStream extraData) { """ Returns a BinaryData object (which is a stream) that encodes the given message just like {@link #toHawkularFormat(BasicMessage)} does but also packages the given input stream as extra data with the JSON message. The retur...
java
public static BinaryData toHawkularFormat(BasicMessage msg, InputStream extraData) { String msgJson = toHawkularFormat(msg); return new BinaryData(msgJson.getBytes(), extraData); }
[ "public", "static", "BinaryData", "toHawkularFormat", "(", "BasicMessage", "msg", ",", "InputStream", "extraData", ")", "{", "String", "msgJson", "=", "toHawkularFormat", "(", "msg", ")", ";", "return", "new", "BinaryData", "(", "msgJson", ".", "getBytes", "(", ...
Returns a BinaryData object (which is a stream) that encodes the given message just like {@link #toHawkularFormat(BasicMessage)} does but also packages the given input stream as extra data with the JSON message. The returned object can be used to deserialize the msg and extra data via {@link #deserialize(InputStream)}...
[ "Returns", "a", "BinaryData", "object", "(", "which", "is", "a", "stream", ")", "that", "encodes", "the", "given", "message", "just", "like", "{", "@link", "#toHawkularFormat", "(", "BasicMessage", ")", "}", "does", "but", "also", "packages", "the", "given",...
train
https://github.com/hawkular/hawkular-commons/blob/e4a832862b3446d7f4d629bb05790f2df578e035/hawkular-command-gateway/hawkular-command-gateway-api/src/main/java/org/hawkular/cmdgw/api/ApiDeserializer.java#L60-L63
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsRenameImages.java
CmsRenameImages.buildImageInformation
public String buildImageInformation() { """ Returns information about the image count of the selected gallery folder.<p> @return information about the image count of the selected gallery folder """ // count all image resources of the gallery folder int count = 0; try { i...
java
public String buildImageInformation() { // count all image resources of the gallery folder int count = 0; try { int imageId = OpenCms.getResourceManager().getResourceType( CmsResourceTypeImage.getStaticTypeName()).getTypeId(); CmsResourceFilter filter = C...
[ "public", "String", "buildImageInformation", "(", ")", "{", "// count all image resources of the gallery folder", "int", "count", "=", "0", ";", "try", "{", "int", "imageId", "=", "OpenCms", ".", "getResourceManager", "(", ")", ".", "getResourceType", "(", "CmsResou...
Returns information about the image count of the selected gallery folder.<p> @return information about the image count of the selected gallery folder
[ "Returns", "information", "about", "the", "image", "count", "of", "the", "selected", "gallery", "folder", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsRenameImages.java#L158-L174
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.newStatusUpdateRequest
public static Request newStatusUpdateRequest(Session session, String message, Callback callback) { """ Creates a new Request configured to post a status update to a user's feed. @param session the Session to use, or null; if non-null, the session must be in an opened state @param message the text of the stat...
java
public static Request newStatusUpdateRequest(Session session, String message, Callback callback) { return newStatusUpdateRequest(session, message, (String)null, null, callback); }
[ "public", "static", "Request", "newStatusUpdateRequest", "(", "Session", "session", ",", "String", "message", ",", "Callback", "callback", ")", "{", "return", "newStatusUpdateRequest", "(", "session", ",", "message", ",", "(", "String", ")", "null", ",", "null",...
Creates a new Request configured to post a status update to a user's feed. @param session the Session to use, or null; if non-null, the session must be in an opened state @param message the text of the status update @param callback a callback that will be called when the request is completed to handle success or error...
[ "Creates", "a", "new", "Request", "configured", "to", "post", "a", "status", "update", "to", "a", "user", "s", "feed", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L440-L442
apache/incubator-gobblin
gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopsFlowToJobSpecCompiler.java
MultiHopsFlowToJobSpecCompiler.buildJobSpec
private JobSpec buildJobSpec (ServiceNode sourceNode, ServiceNode targetNode, URI templateURI, FlowSpec flowSpec) { """ Generate JobSpec based on the #templateURI that user specified. """ JobSpec jobSpec; JobSpec.Builder jobSpecBuilder = JobSpec.builder(jobSpecURIGenerator(flowSpec, sourceNode, targetN...
java
private JobSpec buildJobSpec (ServiceNode sourceNode, ServiceNode targetNode, URI templateURI, FlowSpec flowSpec) { JobSpec jobSpec; JobSpec.Builder jobSpecBuilder = JobSpec.builder(jobSpecURIGenerator(flowSpec, sourceNode, targetNode)) .withConfig(flowSpec.getConfig()) .withDescription(flowSpec...
[ "private", "JobSpec", "buildJobSpec", "(", "ServiceNode", "sourceNode", ",", "ServiceNode", "targetNode", ",", "URI", "templateURI", ",", "FlowSpec", "flowSpec", ")", "{", "JobSpec", "jobSpec", ";", "JobSpec", ".", "Builder", "jobSpecBuilder", "=", "JobSpec", ".",...
Generate JobSpec based on the #templateURI that user specified.
[ "Generate", "JobSpec", "based", "on", "the", "#templateURI", "that", "user", "specified", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopsFlowToJobSpecCompiler.java#L277-L320
codeprimate-software/cp-elements
src/main/java/org/cp/elements/data/conversion/converters/URIConverter.java
URIConverter.canConvert
@Override public boolean canConvert(Class<?> fromType, Class<?> toType) { """ Determines whether this {@link Converter} can convert {@link Object Objects} {@link Class from type} {@link Class to type}. @param fromType {@link Class type} to convert from. @param toType {@link Class type} to convert to. @retu...
java
@Override public boolean canConvert(Class<?> fromType, Class<?> toType) { return fromType != null && isAssignableTo(fromType, URI.class, URL.class, String.class) && URI.class.equals(toType); }
[ "@", "Override", "public", "boolean", "canConvert", "(", "Class", "<", "?", ">", "fromType", ",", "Class", "<", "?", ">", "toType", ")", "{", "return", "fromType", "!=", "null", "&&", "isAssignableTo", "(", "fromType", ",", "URI", ".", "class", ",", "U...
Determines whether this {@link Converter} can convert {@link Object Objects} {@link Class from type} {@link Class to type}. @param fromType {@link Class type} to convert from. @param toType {@link Class type} to convert to. @return a boolean indicating whether this {@link Converter} can convert {@link Object Objects} ...
[ "Determines", "whether", "this", "{", "@link", "Converter", "}", "can", "convert", "{", "@link", "Object", "Objects", "}", "{", "@link", "Class", "from", "type", "}", "{", "@link", "Class", "to", "type", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/data/conversion/converters/URIConverter.java#L51-L55
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java
AbstractAggregatorImpl.initialize
public void initialize(IConfig config) throws Exception { """ This method does some initialization for the aggregator servlet. This method is called from platform dependent Aggregator implementation during its initialization. @param config The aggregator config @throws Exception """ // Check l...
java
public void initialize(IConfig config) throws Exception { // Check last-modified times of resources in the overrides folders. These resources // are considered to be dynamic in a production environment and we want to // detect new/changed resources in these folders on startup so that we can clear // c...
[ "public", "void", "initialize", "(", "IConfig", "config", ")", "throws", "Exception", "{", "// Check last-modified times of resources in the overrides folders. These resources\r", "// are considered to be dynamic in a production environment and we want to\r", "// detect new/changed resources...
This method does some initialization for the aggregator servlet. This method is called from platform dependent Aggregator implementation during its initialization. @param config The aggregator config @throws Exception
[ "This", "method", "does", "some", "initialization", "for", "the", "aggregator", "servlet", ".", "This", "method", "is", "called", "from", "platform", "dependent", "Aggregator", "implementation", "during", "its", "initialization", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L1541-L1557
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncMembersInner.java
SyncMembersInner.beginCreateOrUpdateAsync
public Observable<SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { """ Creates or updates a sync member. @param resourceGroupName The name of the resource group that contains the...
java
public Observable<SyncMemberInner> beginCreateOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, String syncGroupName, String syncMemberName, SyncMemberInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, syncGroupName, ...
[ "public", "Observable", "<", "SyncMemberInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "syncGroupName", ",", "String", "syncMemberName", ",", "SyncMemberInner", "par...
Creates or updates a sync member. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database on which the sync group is hosted. @p...
[ "Creates", "or", "updates", "a", "sync", "member", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/SyncMembersInner.java#L372-L379
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/DrizzlePreparedStatement.java
DrizzlePreparedStatement.setAsciiStream
public void setAsciiStream(final int parameterIndex, final InputStream x, final int length) throws SQLException { """ Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large ASCII value is input to a <code>LONGVARCHAR</code> parameter, it may be mo...
java
public void setAsciiStream(final int parameterIndex, final InputStream x, final int length) throws SQLException { if(x == null) { setNull(parameterIndex, Types.BLOB); return; } try { setParameter(parameterIndex, new StreamParameter(x, length)); } cat...
[ "public", "void", "setAsciiStream", "(", "final", "int", "parameterIndex", ",", "final", "InputStream", "x", ",", "final", "int", "length", ")", "throws", "SQLException", "{", "if", "(", "x", "==", "null", ")", "{", "setNull", "(", "parameterIndex", ",", "...
Sets the designated parameter to the given input stream, which will have the specified number of bytes. When a very large ASCII value is input to a <code>LONGVARCHAR</code> parameter, it may be more practical to send it via a <code>java.io.InputStream</code>. Data will be read from the stream as needed until end-of-fil...
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "input", "stream", "which", "will", "have", "the", "specified", "number", "of", "bytes", ".", "When", "a", "very", "large", "ASCII", "value", "is", "input", "to", "a", "<code", ">", "LONGVARCH...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzlePreparedStatement.java#L1200-L1212
samskivert/samskivert
src/main/java/com/samskivert/swing/util/MenuUtil.java
MenuUtil.addMenuItem
public static JMenuItem addMenuItem ( JMenu menu, String name, Object target, String callbackName) { """ Adds a new menu item to the menu with the specified name and attributes. The supplied method name will be called (it must have the same signature as {@link ActionListener#actionPerformed} but can be ...
java
public static JMenuItem addMenuItem ( JMenu menu, String name, Object target, String callbackName) { JMenuItem item = createItem(name, null, null); item.addActionListener(new ReflectedAction(target, callbackName)); menu.add(item); return item; }
[ "public", "static", "JMenuItem", "addMenuItem", "(", "JMenu", "menu", ",", "String", "name", ",", "Object", "target", ",", "String", "callbackName", ")", "{", "JMenuItem", "item", "=", "createItem", "(", "name", ",", "null", ",", "null", ")", ";", "item", ...
Adds a new menu item to the menu with the specified name and attributes. The supplied method name will be called (it must have the same signature as {@link ActionListener#actionPerformed} but can be named whatever you like) when the menu item is selected. @param menu the menu to add the item to. @param name the item n...
[ "Adds", "a", "new", "menu", "item", "to", "the", "menu", "with", "the", "specified", "name", "and", "attributes", ".", "The", "supplied", "method", "name", "will", "be", "called", "(", "it", "must", "have", "the", "same", "signature", "as", "{", "@link",...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/swing/util/MenuUtil.java#L142-L149
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java
QueryControllerTreeModel.getElementQuery
public QueryTreeElement getElementQuery(String element, String group) { """ Search a query node in a group and returns the object else returns null. """ QueryTreeElement node = null; Enumeration<TreeNode> elements = root.children(); while (elements.hasMoreElements()) { TreeElement currentNode = (TreeE...
java
public QueryTreeElement getElementQuery(String element, String group) { QueryTreeElement node = null; Enumeration<TreeNode> elements = root.children(); while (elements.hasMoreElements()) { TreeElement currentNode = (TreeElement) elements.nextElement(); if (currentNode instanceof QueryGroupTreeElement && cur...
[ "public", "QueryTreeElement", "getElementQuery", "(", "String", "element", ",", "String", "group", ")", "{", "QueryTreeElement", "node", "=", "null", ";", "Enumeration", "<", "TreeNode", ">", "elements", "=", "root", ".", "children", "(", ")", ";", "while", ...
Search a query node in a group and returns the object else returns null.
[ "Search", "a", "query", "node", "in", "a", "group", "and", "returns", "the", "object", "else", "returns", "null", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java#L262-L282
cdk/cdk
base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java
ReactionSchemeManipulator.extractPrecursorReaction
private static IReactionSet extractPrecursorReaction(IReaction reaction, IReactionSet reactionSet) { """ Extract reactions from a IReactionSet which at least one product is existing as reactant given a IReaction @param reaction The IReaction to analyze @param reactionSet The IReactionSet to inspect @retur...
java
private static IReactionSet extractPrecursorReaction(IReaction reaction, IReactionSet reactionSet) { IReactionSet reactConSet = reaction.getBuilder().newInstance(IReactionSet.class); for (IAtomContainer reactant : reaction.getReactants().atomContainers()) { for (IReaction reactionInt : react...
[ "private", "static", "IReactionSet", "extractPrecursorReaction", "(", "IReaction", "reaction", ",", "IReactionSet", "reactionSet", ")", "{", "IReactionSet", "reactConSet", "=", "reaction", ".", "getBuilder", "(", ")", ".", "newInstance", "(", "IReactionSet", ".", "c...
Extract reactions from a IReactionSet which at least one product is existing as reactant given a IReaction @param reaction The IReaction to analyze @param reactionSet The IReactionSet to inspect @return A IReactionSet containing the reactions
[ "Extract", "reactions", "from", "a", "IReactionSet", "which", "at", "least", "one", "product", "is", "existing", "as", "reactant", "given", "a", "IReaction" ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulator.java#L210-L222
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java
VirtualMachinesInner.getByResourceGroupAsync
public Observable<VirtualMachineInner> getByResourceGroupAsync(String resourceGroupName, String vmName) { """ Retrieves information about the model view or the instance view of a virtual machine. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws Il...
java
public Observable<VirtualMachineInner> getByResourceGroupAsync(String resourceGroupName, String vmName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<VirtualMachineInner>, VirtualMachineInner>() { @Override public VirtualMach...
[ "public", "Observable", "<", "VirtualMachineInner", ">", "getByResourceGroupAsync", "(", "String", "resourceGroupName", ",", "String", "vmName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmName", ")", ".", "map", "...
Retrieves information about the model view or the instance view of a virtual machine. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualMachineInner objec...
[ "Retrieves", "information", "about", "the", "model", "view", "or", "the", "instance", "view", "of", "a", "virtual", "machine", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachinesInner.java#L903-L910
WASdev/ci.ant
src/main/java/net/wasdev/wlp/ant/AbstractTask.java
AbstractTask.findStringInFile
protected String findStringInFile(String regexp, File fileToSearch) throws Exception { """ Searches the given file for the given regular expression. @param regexp a regular expression (or just a text snippet) to search for @param fileToSearch the file to search @return The first line which includes the patt...
java
protected String findStringInFile(String regexp, File fileToSearch) throws Exception { String foundString = null; List<String> matches = findStringsInFileCommon(regexp, true, -1, fileToSearch); if (matches != null && !matches.isEmpty()) { foundString = matches.get(0); } ...
[ "protected", "String", "findStringInFile", "(", "String", "regexp", ",", "File", "fileToSearch", ")", "throws", "Exception", "{", "String", "foundString", "=", "null", ";", "List", "<", "String", ">", "matches", "=", "findStringsInFileCommon", "(", "regexp", ","...
Searches the given file for the given regular expression. @param regexp a regular expression (or just a text snippet) to search for @param fileToSearch the file to search @return The first line which includes the pattern, or null if the pattern isn't found or if the file doesn't exist @throws Exception
[ "Searches", "the", "given", "file", "for", "the", "given", "regular", "expression", "." ]
train
https://github.com/WASdev/ci.ant/blob/13edd5c9111b98e12f74c0be83f9180285e6e40c/src/main/java/net/wasdev/wlp/ant/AbstractTask.java#L336-L346
jaydeepw/audio-wife
libAudioWife/app/src/main/java/nl/changer/audiowife/AudioWife.java
AudioWife.useDefaultUi
public AudioWife useDefaultUi(ViewGroup playerContainer, LayoutInflater inflater) { """ ** Sets the default audio player UI as a child of the parameter container view. <br/> This is the simplest way to get AudioWife working for you. If you are using the default player provided by this method, calling method ...
java
public AudioWife useDefaultUi(ViewGroup playerContainer, LayoutInflater inflater) { if (playerContainer == null) { throw new NullPointerException("Player container cannot be null"); } if (inflater == null) { throw new IllegalArgumentException("Inflater cannot be null"); } View playerUi = inflater.infl...
[ "public", "AudioWife", "useDefaultUi", "(", "ViewGroup", "playerContainer", ",", "LayoutInflater", "inflater", ")", "{", "if", "(", "playerContainer", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"Player container cannot be null\"", ")", ";",...
** Sets the default audio player UI as a child of the parameter container view. <br/> This is the simplest way to get AudioWife working for you. If you are using the default player provided by this method, calling method {@link nl.changer.audiowife.AudioWife#setPlayView(android.view.View)}, {@link nl.changer.audiowife...
[ "**", "Sets", "the", "default", "audio", "player", "UI", "as", "a", "child", "of", "the", "parameter", "container", "view", "." ]
train
https://github.com/jaydeepw/audio-wife/blob/e5cf4d1306ff742e9c7fc0e3d990792f0b4e56d9/libAudioWife/app/src/main/java/nl/changer/audiowife/AudioWife.java#L708-L739
mojohaus/jaxb2-maven-plugin
src/it/mjaxb-55/src/main/java/se/west/validation/XmlNormalizer.java
XmlNormalizer.getNormalizedXml
public String getNormalizedXml(String filePath) { """ Reads the XML file found at the provided filePath, returning a normalized XML form suitable for comparison. @param filePath The path to the XML file to read. @return A normalized, human-readable, version of the given XML document. """ // Rea...
java
public String getNormalizedXml(String filePath) { // Read the provided filename final StringWriter toReturn = new StringWriter(); final BufferedReader in; try { in = new BufferedReader(new FileReader(new File(filePath))); } catch (FileNotFoundException e) { ...
[ "public", "String", "getNormalizedXml", "(", "String", "filePath", ")", "{", "// Read the provided filename\r", "final", "StringWriter", "toReturn", "=", "new", "StringWriter", "(", ")", ";", "final", "BufferedReader", "in", ";", "try", "{", "in", "=", "new", "B...
Reads the XML file found at the provided filePath, returning a normalized XML form suitable for comparison. @param filePath The path to the XML file to read. @return A normalized, human-readable, version of the given XML document.
[ "Reads", "the", "XML", "file", "found", "at", "the", "provided", "filePath", "returning", "a", "normalized", "XML", "form", "suitable", "for", "comparison", "." ]
train
https://github.com/mojohaus/jaxb2-maven-plugin/blob/e3c4e47943b15282e5a6e850bbfb1588d8452a0a/src/it/mjaxb-55/src/main/java/se/west/validation/XmlNormalizer.java#L37-L66
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStreamManager.java
InternalOutputStreamManager.stampNotFlushed
public ControlNotFlushed stampNotFlushed(ControlNotFlushed msg, SIBUuid12 streamID) throws SIResourceException { """ Attach the appropriate completed and duplicate prefixes for the stream stored in this array to a ControlNotFlushed message. @param msg The ControlNotFlushed message to stamp. @throws SIResource...
java
public ControlNotFlushed stampNotFlushed(ControlNotFlushed msg, SIBUuid12 streamID) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "stampNotFlushed", new Object[] { msg }); int count = 0; //the maximum possible numb...
[ "public", "ControlNotFlushed", "stampNotFlushed", "(", "ControlNotFlushed", "msg", ",", "SIBUuid12", "streamID", ")", "throws", "SIResourceException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")"...
Attach the appropriate completed and duplicate prefixes for the stream stored in this array to a ControlNotFlushed message. @param msg The ControlNotFlushed message to stamp. @throws SIResourceException
[ "Attach", "the", "appropriate", "completed", "and", "duplicate", "prefixes", "for", "the", "stream", "stored", "in", "this", "array", "to", "a", "ControlNotFlushed", "message", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/InternalOutputStreamManager.java#L806-L860
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/RtfWriter2.java
RtfWriter2.importRtfDocument
public void importRtfDocument(InputStream documentSource, EventListener[] events ) throws IOException, DocumentException { """ Adds the complete RTF document to the current RTF document being generated. It will parse the font and color tables and correct the font and color references so that the imported RTF doc...
java
public void importRtfDocument(InputStream documentSource, EventListener[] events ) throws IOException, DocumentException { if(!this.open) { throw new DocumentException("The document must be open to import RTF documents."); } RtfParser rtfImport = new RtfParser(this.document); if(ev...
[ "public", "void", "importRtfDocument", "(", "InputStream", "documentSource", ",", "EventListener", "[", "]", "events", ")", "throws", "IOException", ",", "DocumentException", "{", "if", "(", "!", "this", ".", "open", ")", "{", "throw", "new", "DocumentException"...
Adds the complete RTF document to the current RTF document being generated. It will parse the font and color tables and correct the font and color references so that the imported RTF document retains its formattings. Uses new RtfParser object. (author: Howard Shank) @param documentSource The InputStream to read the R...
[ "Adds", "the", "complete", "RTF", "document", "to", "the", "current", "RTF", "document", "being", "generated", ".", "It", "will", "parse", "the", "font", "and", "color", "tables", "and", "correct", "the", "font", "and", "color", "references", "so", "that", ...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/RtfWriter2.java#L286-L297
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java
Validator.demapProperties
public static Map<String, String> demapProperties(final Map<String, String> input, final Description desc) { """ Reverses a set of properties mapped using the description's configuration to property mapping, or the same input if the description has no mapping @param input input map @param desc plugin descriptio...
java
public static Map<String, String> demapProperties(final Map<String, String> input, final Description desc) { final Map<String, String> mapping = desc.getPropertiesMapping(); return demapProperties(input, mapping, true); }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "demapProperties", "(", "final", "Map", "<", "String", ",", "String", ">", "input", ",", "final", "Description", "desc", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "mapping",...
Reverses a set of properties mapped using the description's configuration to property mapping, or the same input if the description has no mapping @param input input map @param desc plugin description @return mapped values
[ "Reverses", "a", "set", "of", "properties", "mapped", "using", "the", "description", "s", "configuration", "to", "property", "mapping", "or", "the", "same", "input", "if", "the", "description", "has", "no", "mapping" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java#L277-L280
vznet/mongo-jackson-mapper
src/main/java/net/vz/mongodb/jackson/DBQuery.java
DBQuery.lessThan
public static Query lessThan(String field, Object value) { """ The field is less than the given value @param field The field to compare @param value The value to compare to @return the query """ return new Query().lessThan(field, value); }
java
public static Query lessThan(String field, Object value) { return new Query().lessThan(field, value); }
[ "public", "static", "Query", "lessThan", "(", "String", "field", ",", "Object", "value", ")", "{", "return", "new", "Query", "(", ")", ".", "lessThan", "(", "field", ",", "value", ")", ";", "}" ]
The field is less than the given value @param field The field to compare @param value The value to compare to @return the query
[ "The", "field", "is", "less", "than", "the", "given", "value" ]
train
https://github.com/vznet/mongo-jackson-mapper/blob/ecd189aefa89636cddf70fb383f5d676be347976/src/main/java/net/vz/mongodb/jackson/DBQuery.java#L62-L64
hal/core
gui/src/main/java/org/jboss/as/console/client/v3/elemento/Elements.java
Elements.innerHtml
public static void innerHtml(Element element, SafeHtml html) { """ Convenience method to set the inner HTML of the given element. """ if (element != null) { element.setInnerHTML(html.asString()); } }
java
public static void innerHtml(Element element, SafeHtml html) { if (element != null) { element.setInnerHTML(html.asString()); } }
[ "public", "static", "void", "innerHtml", "(", "Element", "element", ",", "SafeHtml", "html", ")", "{", "if", "(", "element", "!=", "null", ")", "{", "element", ".", "setInnerHTML", "(", "html", ".", "asString", "(", ")", ")", ";", "}", "}" ]
Convenience method to set the inner HTML of the given element.
[ "Convenience", "method", "to", "set", "the", "inner", "HTML", "of", "the", "given", "element", "." ]
train
https://github.com/hal/core/blob/d6d03f0bb128dc0470f5dc75fdb1ea1014400602/gui/src/main/java/org/jboss/as/console/client/v3/elemento/Elements.java#L556-L560
hankcs/HanLP
src/main/java/com/hankcs/hanlp/tokenizer/lexical/AbstractLexicalAnalyzer.java
AbstractLexicalAnalyzer.pushPiece
private void pushPiece(String sentence, String normalized, int start, int end, byte preType, List<String> wordList) { """ CT_CHINESE区间交给统计分词,否则视作整个单位 @param sentence @param normalized @param start @param end @param preType @param wordList """ if (preType == CharType.CT_CHINESE) { ...
java
private void pushPiece(String sentence, String normalized, int start, int end, byte preType, List<String> wordList) { if (preType == CharType.CT_CHINESE) { segmenter.segment(sentence.substring(start, end), normalized.substring(start, end), wordList); } else { ...
[ "private", "void", "pushPiece", "(", "String", "sentence", ",", "String", "normalized", ",", "int", "start", ",", "int", "end", ",", "byte", "preType", ",", "List", "<", "String", ">", "wordList", ")", "{", "if", "(", "preType", "==", "CharType", ".", ...
CT_CHINESE区间交给统计分词,否则视作整个单位 @param sentence @param normalized @param start @param end @param preType @param wordList
[ "CT_CHINESE区间交给统计分词,否则视作整个单位" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/tokenizer/lexical/AbstractLexicalAnalyzer.java#L522-L532
netty/netty
common/src/main/java/io/netty/util/internal/SystemPropertyUtil.java
SystemPropertyUtil.getLong
public static long getLong(String key, long def) { """ Returns the value of the Java system property with the specified {@code key}, while falling back to the specified default value if the property access fails. @return the property value. {@code def} if there's no such property or if an access to the spec...
java
public static long getLong(String key, long def) { String value = get(key); if (value == null) { return def; } value = value.trim(); try { return Long.parseLong(value); } catch (Exception e) { // Ignore } logger.warn( ...
[ "public", "static", "long", "getLong", "(", "String", "key", ",", "long", "def", ")", "{", "String", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "def", ";", "}", "value", "=", "value", ".", "tr...
Returns the value of the Java system property with the specified {@code key}, while falling back to the specified default value if the property access fails. @return the property value. {@code def} if there's no such property or if an access to the specified property is not allowed.
[ "Returns", "the", "value", "of", "the", "Java", "system", "property", "with", "the", "specified", "{", "@code", "key", "}", "while", "falling", "back", "to", "the", "specified", "default", "value", "if", "the", "property", "access", "fails", "." ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/SystemPropertyUtil.java#L164-L183
citrusframework/citrus
modules/citrus-jms/src/main/java/com/consol/citrus/jms/actions/PurgeJmsQueuesAction.java
PurgeJmsQueuesAction.purgeDestination
private void purgeDestination(Destination destination, Session session, String destinationName) throws JMSException { """ Purge destination by receiving all available messages. @param destination @param session @param destinationName @throws JMSException """ if (log.isDebugEnabled()) { ...
java
private void purgeDestination(Destination destination, Session session, String destinationName) throws JMSException { if (log.isDebugEnabled()) { log.debug("Try to purge destination " + destinationName); } int messagesPurged = 0; MessageConsumer messageConsumer = session.cre...
[ "private", "void", "purgeDestination", "(", "Destination", "destination", ",", "Session", "session", ",", "String", "destinationName", ")", "throws", "JMSException", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", ...
Purge destination by receiving all available messages. @param destination @param session @param destinationName @throws JMSException
[ "Purge", "destination", "by", "receiving", "all", "available", "messages", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-jms/src/main/java/com/consol/citrus/jms/actions/PurgeJmsQueuesAction.java#L128-L158
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/PhoneNumberUtil.java
PhoneNumberUtil.formatE123
public final String formatE123(final String pphoneNumber, final String pcountryCode) { """ format phone number in E123 format. @param pphoneNumber phone number as String to format @param pcountryCode iso code of country @return formated phone number as String """ return this.formatE123(this.parsePhone...
java
public final String formatE123(final String pphoneNumber, final String pcountryCode) { return this.formatE123(this.parsePhoneNumber(pphoneNumber), CreatePhoneCountryConstantsClass .create().countryMap().get(StringUtils.defaultString(pcountryCode))); }
[ "public", "final", "String", "formatE123", "(", "final", "String", "pphoneNumber", ",", "final", "String", "pcountryCode", ")", "{", "return", "this", ".", "formatE123", "(", "this", ".", "parsePhoneNumber", "(", "pphoneNumber", ")", ",", "CreatePhoneCountryConsta...
format phone number in E123 format. @param pphoneNumber phone number as String to format @param pcountryCode iso code of country @return formated phone number as String
[ "format", "phone", "number", "in", "E123", "format", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/PhoneNumberUtil.java#L394-L397
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.beginPerformMaintenance
public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { """ Perform maintenance on one or more virtual machines in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM s...
java
public OperationStatusResponseInner beginPerformMaintenance(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginPerformMaintenanceWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
[ "public", "OperationStatusResponseInner", "beginPerformMaintenance", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "List", "<", "String", ">", "instanceIds", ")", "{", "return", "beginPerformMaintenanceWithServiceResponseAsync", "(", "resourceGroup...
Perform maintenance on one or more virtual machines in a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @param instanceIds The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the opera...
[ "Perform", "maintenance", "on", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java#L3426-L3428
dkpro/dkpro-statistics
dkpro-statistics-correlation/src/main/java/org/dkpro/statistics/correlation/SpearmansRankCorrelation.java
SpearmansRankCorrelation.computeCorrelation
public static double computeCorrelation(List<Double> list1, List<Double> list2) { """ Computes the correlation between two datasets. @param list1 The first dataset as a list. @param list2 The second dataset as a list. @return The correlation between the two datasets. """ double[] l1 = new double[lis...
java
public static double computeCorrelation(List<Double> list1, List<Double> list2) { double[] l1 = new double[list1.size()]; double[] l2 = new double[list2.size()]; for (int i=0; i<list1.size(); i++) { l1[i] = list1.get(i); } for (int i=0; i<list2.size(); i++) { ...
[ "public", "static", "double", "computeCorrelation", "(", "List", "<", "Double", ">", "list1", ",", "List", "<", "Double", ">", "list2", ")", "{", "double", "[", "]", "l1", "=", "new", "double", "[", "list1", ".", "size", "(", ")", "]", ";", "double",...
Computes the correlation between two datasets. @param list1 The first dataset as a list. @param list2 The second dataset as a list. @return The correlation between the two datasets.
[ "Computes", "the", "correlation", "between", "two", "datasets", "." ]
train
https://github.com/dkpro/dkpro-statistics/blob/0b0e93dc49223984964411cbc6df420ba796a8cb/dkpro-statistics-correlation/src/main/java/org/dkpro/statistics/correlation/SpearmansRankCorrelation.java#L34-L47