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
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DefaultErrorHandler.java
DefaultErrorHandler.getErrorWriter
public PrintWriter getErrorWriter() { """ Retrieve <code>java.io.PrintWriter</code> to which errors are being directed. @return The <code>PrintWriter</code> installed via the constructor or the default <code>PrintWriter</code> """ // Defer creating the java.io.PrintWriter until an error needs to be ...
java
public PrintWriter getErrorWriter() { // Defer creating the java.io.PrintWriter until an error needs to be // reported. if (m_pw == null) { m_pw = new PrintWriter(System.err, true); } return m_pw; }
[ "public", "PrintWriter", "getErrorWriter", "(", ")", "{", "// Defer creating the java.io.PrintWriter until an error needs to be", "// reported.", "if", "(", "m_pw", "==", "null", ")", "{", "m_pw", "=", "new", "PrintWriter", "(", "System", ".", "err", ",", "true", ")...
Retrieve <code>java.io.PrintWriter</code> to which errors are being directed. @return The <code>PrintWriter</code> installed via the constructor or the default <code>PrintWriter</code>
[ "Retrieve", "<code", ">", "java", ".", "io", ".", "PrintWriter<", "/", "code", ">", "to", "which", "errors", "are", "being", "directed", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DefaultErrorHandler.java#L92-L99
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java
JDBC4DatabaseMetaData.getTables
@Override public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { """ Retrieves a description of the tables available in the given catalog. """ checkClosed(); this.sysCatalog.setString(1, "TABLES"); JDBC4ResultS...
java
@Override public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { checkClosed(); this.sysCatalog.setString(1, "TABLES"); JDBC4ResultSet res = (JDBC4ResultSet) this.sysCatalog.executeQuery(); VoltTable vtable ...
[ "@", "Override", "public", "ResultSet", "getTables", "(", "String", "catalog", ",", "String", "schemaPattern", ",", "String", "tableNamePattern", ",", "String", "[", "]", "types", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "this", ".", ...
Retrieves a description of the tables available in the given catalog.
[ "Retrieves", "a", "description", "of", "the", "tables", "available", "in", "the", "given", "catalog", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4DatabaseMetaData.java#L832-L865
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/QueryRecord.java
QueryRecord.addRelationship
public void addRelationship(int iLinkType, Record recLeft, Record recRight, String ifldLeft1, String ifldRight1) { """ Add this table link to this query. Creates a new tablelink and adds it to the link list. """ new TableLink(this, iLinkType, recLeft, recRight, ifldLeft1, ifldRight1, null, null, null,...
java
public void addRelationship(int iLinkType, Record recLeft, Record recRight, String ifldLeft1, String ifldRight1) { new TableLink(this, iLinkType, recLeft, recRight, ifldLeft1, ifldRight1, null, null, null, null); }
[ "public", "void", "addRelationship", "(", "int", "iLinkType", ",", "Record", "recLeft", ",", "Record", "recRight", ",", "String", "ifldLeft1", ",", "String", "ifldRight1", ")", "{", "new", "TableLink", "(", "this", ",", "iLinkType", ",", "recLeft", ",", "rec...
Add this table link to this query. Creates a new tablelink and adds it to the link list.
[ "Add", "this", "table", "link", "to", "this", "query", ".", "Creates", "a", "new", "tablelink", "and", "adds", "it", "to", "the", "link", "list", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L154-L157
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/ServiceUtils.java
ServiceUtils.getLastByteInPart
public static long getLastByteInPart(AmazonS3 s3, GetObjectRequest getObjectRequest, Integer partNumber) { """ Returns the last byte number in a part of an object. @param s3 The Amazon s3 client. @param getObjectRequest The request to check. @param partNumber The part in which we need the last byte number....
java
public static long getLastByteInPart(AmazonS3 s3, GetObjectRequest getObjectRequest, Integer partNumber) { ValidationUtils.assertNotNull(s3, "S3 client"); ValidationUtils.assertNotNull(getObjectRequest, "GetObjectRequest"); ValidationUtils.assertNotNull(partNumber, "partNumber"); GetObj...
[ "public", "static", "long", "getLastByteInPart", "(", "AmazonS3", "s3", ",", "GetObjectRequest", "getObjectRequest", ",", "Integer", "partNumber", ")", "{", "ValidationUtils", ".", "assertNotNull", "(", "s3", ",", "\"S3 client\"", ")", ";", "ValidationUtils", ".", ...
Returns the last byte number in a part of an object. @param s3 The Amazon s3 client. @param getObjectRequest The request to check. @param partNumber The part in which we need the last byte number. @return The last byte number in the part.
[ "Returns", "the", "last", "byte", "number", "in", "a", "part", "of", "an", "object", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/ServiceUtils.java#L555-L564
phax/ph-web
ph-web/src/main/java/com/helger/web/fileupload/parse/ParameterParser.java
ParameterParser._parseToken
@Nullable private String _parseToken (final char cTerminator1, final char cTerminator2) { """ Parses out a token until any of the given terminators is encountered. @param cTerminator1 the first terminating character. Any when encountered signify the end of the token @param cTerminator2 the second terminat...
java
@Nullable private String _parseToken (final char cTerminator1, final char cTerminator2) { char ch; m_nIndex1 = m_nPos; m_nIndex2 = m_nPos; while (_hasChar ()) { ch = m_aChars[m_nPos]; if (ch == cTerminator1 || ch == cTerminator2) break; m_nIndex2++; m_nPos++; ...
[ "@", "Nullable", "private", "String", "_parseToken", "(", "final", "char", "cTerminator1", ",", "final", "char", "cTerminator2", ")", "{", "char", "ch", ";", "m_nIndex1", "=", "m_nPos", ";", "m_nIndex2", "=", "m_nPos", ";", "while", "(", "_hasChar", "(", "...
Parses out a token until any of the given terminators is encountered. @param cTerminator1 the first terminating character. Any when encountered signify the end of the token @param cTerminator2 the second terminating character. Any when encountered signify the end of the token @return the token
[ "Parses", "out", "a", "token", "until", "any", "of", "the", "given", "terminators", "is", "encountered", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-web/src/main/java/com/helger/web/fileupload/parse/ParameterParser.java#L143-L158
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.rotateTranslation
public Matrix4f rotateTranslation(Quaternionfc quat, Matrix4f dest) { """ Apply the rotation transformation of the given {@link Quaternionfc} to this matrix, which is assumed to only contain a translation, and store the result in <code>dest</code>. <p> This method assumes <code>this</code> to only contain a tra...
java
public Matrix4f rotateTranslation(Quaternionfc quat, Matrix4f dest) { float w2 = quat.w() * quat.w(), x2 = quat.x() * quat.x(); float y2 = quat.y() * quat.y(), z2 = quat.z() * quat.z(); float zw = quat.z() * quat.w(), dzw = zw + zw, xy = quat.x() * quat.y(), dxy = xy + xy; float xz = qua...
[ "public", "Matrix4f", "rotateTranslation", "(", "Quaternionfc", "quat", ",", "Matrix4f", "dest", ")", "{", "float", "w2", "=", "quat", ".", "w", "(", ")", "*", "quat", ".", "w", "(", ")", ",", "x2", "=", "quat", ".", "x", "(", ")", "*", "quat", "...
Apply the rotation transformation of the given {@link Quaternionfc} to this matrix, which is assumed to only contain a translation, and store the result in <code>dest</code>. <p> This method assumes <code>this</code> to only contain a translation. <p> When used with a right-handed coordinate system, the produced rotati...
[ "Apply", "the", "rotation", "transformation", "of", "the", "given", "{", "@link", "Quaternionfc", "}", "to", "this", "matrix", "which", "is", "assumed", "to", "only", "contain", "a", "translation", "and", "store", "the", "result", "in", "<code", ">", "dest<"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L11161-L11195
youngmonkeys/ezyfox-sfs2x
src/main/java/com/tvd12/ezyfox/sfs2x/serializer/ParameterSerializer.java
ParameterSerializer.parseCollection
@SuppressWarnings( { """ Parse collection of values and get the value mapped to smartfox value @param method structure of getter method @param collection collection of value @return the value after parsed """ "rawtypes", "unchecked" }) protected Object parseCollection(GetterMethodCover method, ...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) protected Object parseCollection(GetterMethodCover method, Collection collection) { if(method.isArrayObjectCollection()) { return parseArrayObjectCollection(method, collection); } else if(method.isObjectCollection()) { ...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "protected", "Object", "parseCollection", "(", "GetterMethodCover", "method", ",", "Collection", "collection", ")", "{", "if", "(", "method", ".", "isArrayObjectCollection", "(", ")...
Parse collection of values and get the value mapped to smartfox value @param method structure of getter method @param collection collection of value @return the value after parsed
[ "Parse", "collection", "of", "values", "and", "get", "the", "value", "mapped", "to", "smartfox", "value" ]
train
https://github.com/youngmonkeys/ezyfox-sfs2x/blob/7e004033a3b551c3ae970a0c8f45db7b1ec144de/src/main/java/com/tvd12/ezyfox/sfs2x/serializer/ParameterSerializer.java#L261-L280
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/TextBox.java
TextBox.drawAttributedString
private void drawAttributedString(Graphics2D g, int x, int y, String text) { """ Draws a single string with eventual attributes based on the current visual context. """ if (!ctx.getTextDecoration().isEmpty()) { AttributedString as = new AttributedString(text); as.addAtt...
java
private void drawAttributedString(Graphics2D g, int x, int y, String text) { if (!ctx.getTextDecoration().isEmpty()) { AttributedString as = new AttributedString(text); as.addAttribute(TextAttribute.FONT, ctx.getFont()); if (ctx.getTextDecoration().contains(CSSPr...
[ "private", "void", "drawAttributedString", "(", "Graphics2D", "g", ",", "int", "x", ",", "int", "y", ",", "String", "text", ")", "{", "if", "(", "!", "ctx", ".", "getTextDecoration", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "AttributedString", "as...
Draws a single string with eventual attributes based on the current visual context.
[ "Draws", "a", "single", "string", "with", "eventual", "attributes", "based", "on", "the", "current", "visual", "context", "." ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/TextBox.java#L1082-L1096
pedrovgs/DraggablePanel
draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java
DraggableView.isViewHit
private boolean isViewHit(View view, int x, int y) { """ Calculate if one position is above any view. @param view to analyze. @param x position. @param y position. @return true if x and y positions are below the view. """ int[] viewLocation = new int[2]; view.getLocationOnScreen(viewLocation); ...
java
private boolean isViewHit(View view, int x, int y) { int[] viewLocation = new int[2]; view.getLocationOnScreen(viewLocation); int[] parentLocation = new int[2]; this.getLocationOnScreen(parentLocation); int screenX = parentLocation[0] + x; int screenY = parentLocation[1] + y; return screenX ...
[ "private", "boolean", "isViewHit", "(", "View", "view", ",", "int", "x", ",", "int", "y", ")", "{", "int", "[", "]", "viewLocation", "=", "new", "int", "[", "2", "]", ";", "view", ".", "getLocationOnScreen", "(", "viewLocation", ")", ";", "int", "[",...
Calculate if one position is above any view. @param view to analyze. @param x position. @param y position. @return true if x and y positions are below the view.
[ "Calculate", "if", "one", "position", "is", "above", "any", "view", "." ]
train
https://github.com/pedrovgs/DraggablePanel/blob/6b6d1806fa4140113f31307a2571bf02435aa53a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableView.java#L611-L622
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java
StringIterate.countChar
public static int countChar(String string, CharPredicate predicate) { """ Count the number of elements that return true for the specified {@code predicate}. @since 7.0 """ int count = 0; int size = string.length(); for (int i = 0; i < size; i++) { if (predicate.ac...
java
public static int countChar(String string, CharPredicate predicate) { int count = 0; int size = string.length(); for (int i = 0; i < size; i++) { if (predicate.accept(string.charAt(i))) { count++; } } return count; ...
[ "public", "static", "int", "countChar", "(", "String", "string", ",", "CharPredicate", "predicate", ")", "{", "int", "count", "=", "0", ";", "int", "size", "=", "string", ".", "length", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<"...
Count the number of elements that return true for the specified {@code predicate}. @since 7.0
[ "Count", "the", "number", "of", "elements", "that", "return", "true", "for", "the", "specified", "{", "@code", "predicate", "}", "." ]
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L511-L523
JodaOrg/joda-time
src/main/java/org/joda/time/Period.java
Period.plusHours
public Period plusHours(int hours) { """ Returns a new period plus the specified number of hours added. <p> This period instance is immutable and unaffected by this method call. @param hours the amount of hours to add, may be negative @return the new period plus the increased hours @throws UnsupportedOpera...
java
public Period plusHours(int hours) { if (hours == 0) { return this; } int[] values = getValues(); // cloned getPeriodType().addIndexedField(this, PeriodType.HOUR_INDEX, values, hours); return new Period(values, getPeriodType()); }
[ "public", "Period", "plusHours", "(", "int", "hours", ")", "{", "if", "(", "hours", "==", "0", ")", "{", "return", "this", ";", "}", "int", "[", "]", "values", "=", "getValues", "(", ")", ";", "// cloned", "getPeriodType", "(", ")", ".", "addIndexedF...
Returns a new period plus the specified number of hours added. <p> This period instance is immutable and unaffected by this method call. @param hours the amount of hours to add, may be negative @return the new period plus the increased hours @throws UnsupportedOperationException if the field is not supported
[ "Returns", "a", "new", "period", "plus", "the", "specified", "number", "of", "hours", "added", ".", "<p", ">", "This", "period", "instance", "is", "immutable", "and", "unaffected", "by", "this", "method", "call", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Period.java#L1141-L1148
liyiorg/weixin-popular
src/main/java/weixin/popular/api/SnsAPI.java
SnsAPI.connectOauth2Authorize
public static String connectOauth2Authorize(String appid,String redirect_uri,boolean snsapi_userinfo,String state) { """ 生成网页授权 URL @param appid appid @param redirect_uri 自动URLEncoder @param snsapi_userinfo snsapi_userinfo @param state 可以为空 @return url """ return connectOauth2Authorize(appid, redirect_u...
java
public static String connectOauth2Authorize(String appid,String redirect_uri,boolean snsapi_userinfo,String state){ return connectOauth2Authorize(appid, redirect_uri, snsapi_userinfo, state, null); }
[ "public", "static", "String", "connectOauth2Authorize", "(", "String", "appid", ",", "String", "redirect_uri", ",", "boolean", "snsapi_userinfo", ",", "String", "state", ")", "{", "return", "connectOauth2Authorize", "(", "appid", ",", "redirect_uri", ",", "snsapi_us...
生成网页授权 URL @param appid appid @param redirect_uri 自动URLEncoder @param snsapi_userinfo snsapi_userinfo @param state 可以为空 @return url
[ "生成网页授权", "URL" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/SnsAPI.java#L168-L170
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/FourPointSyntheticStability.java
FourPointSyntheticStability.setShape
public void setShape(double width , double height ) { """ Specifes how big the fiducial is along two axises @param width Length along x-axis @param height Length along y-axis """ points2D3D.get(0).location.set(-width/2,-height/2,0); points2D3D.get(1).location.set(-width/2, height/2,0); points2D3D.get(2...
java
public void setShape(double width , double height ) { points2D3D.get(0).location.set(-width/2,-height/2,0); points2D3D.get(1).location.set(-width/2, height/2,0); points2D3D.get(2).location.set( width/2, height/2,0); points2D3D.get(3).location.set( width/2,-height/2,0); }
[ "public", "void", "setShape", "(", "double", "width", ",", "double", "height", ")", "{", "points2D3D", ".", "get", "(", "0", ")", ".", "location", ".", "set", "(", "-", "width", "/", "2", ",", "-", "height", "/", "2", ",", "0", ")", ";", "points2...
Specifes how big the fiducial is along two axises @param width Length along x-axis @param height Length along y-axis
[ "Specifes", "how", "big", "the", "fiducial", "is", "along", "two", "axises" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/abst/fiducial/FourPointSyntheticStability.java#L95-L100
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/LSDBC.java
LSDBC.expandCluster
protected int expandCluster(final int clusterid, final WritableIntegerDataStore clusterids, final KNNQuery<O> knnq, final DBIDs neighbors, final double maxkdist, final FiniteProgress progress) { """ Set-based expand cluster implementation. @param clusterid ID of the current cluster. @param clusterids Current o...
java
protected int expandCluster(final int clusterid, final WritableIntegerDataStore clusterids, final KNNQuery<O> knnq, final DBIDs neighbors, final double maxkdist, final FiniteProgress progress) { int clustersize = 1; // initial seed! final ArrayModifiableDBIDs activeSet = DBIDUtil.newArray(); activeSet.addDB...
[ "protected", "int", "expandCluster", "(", "final", "int", "clusterid", ",", "final", "WritableIntegerDataStore", "clusterids", ",", "final", "KNNQuery", "<", "O", ">", "knnq", ",", "final", "DBIDs", "neighbors", ",", "final", "double", "maxkdist", ",", "final", ...
Set-based expand cluster implementation. @param clusterid ID of the current cluster. @param clusterids Current object to cluster mapping. @param knnq kNNQuery @param neighbors Neighbors acquired by initial getNeighbors call. @param maxkdist Maximum k-distance @param progress Progress logging @return cluster size
[ "Set", "-", "based", "expand", "cluster", "implementation", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/LSDBC.java#L243-L273
dhanji/sitebricks
sitebricks/src/main/java/com/google/sitebricks/routing/WidgetRoutingDispatcher.java
WidgetRoutingDispatcher.fireEvent
@SuppressWarnings("unchecked") private Object fireEvent(Request request, PageBook.Page page, Object instance) throws IOException { """ We're sure the request parameter map is a Map<String, String[]> """ final String method = request.method(); final String pathInfo = request.path(); return ...
java
@SuppressWarnings("unchecked") private Object fireEvent(Request request, PageBook.Page page, Object instance) throws IOException { final String method = request.method(); final String pathInfo = request.path(); return page.doMethod(method.toLowerCase(), instance, pathInfo, request); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "Object", "fireEvent", "(", "Request", "request", ",", "PageBook", ".", "Page", "page", ",", "Object", "instance", ")", "throws", "IOException", "{", "final", "String", "method", "=", "request", "....
We're sure the request parameter map is a Map<String, String[]>
[ "We", "re", "sure", "the", "request", "parameter", "map", "is", "a", "Map<String", "String", "[]", ">" ]
train
https://github.com/dhanji/sitebricks/blob/8682029a78bd48fb8566173d970800499e9e5d97/sitebricks/src/main/java/com/google/sitebricks/routing/WidgetRoutingDispatcher.java#L165-L172
albfernandez/itext2
src/main/java/com/lowagie/text/Chunk.java
Chunk.setRemoteGoto
public Chunk setRemoteGoto(String filename, String name) { """ Sets a goto for a remote destination for this <CODE>Chunk</CODE>. @param filename the file name of the destination document @param name the name of the destination to go to @return this <CODE>Chunk</CODE> """ return setAttribute(REMOTEGOTO...
java
public Chunk setRemoteGoto(String filename, String name) { return setAttribute(REMOTEGOTO, new Object[] { filename, name }); }
[ "public", "Chunk", "setRemoteGoto", "(", "String", "filename", ",", "String", "name", ")", "{", "return", "setAttribute", "(", "REMOTEGOTO", ",", "new", "Object", "[", "]", "{", "filename", ",", "name", "}", ")", ";", "}" ]
Sets a goto for a remote destination for this <CODE>Chunk</CODE>. @param filename the file name of the destination document @param name the name of the destination to go to @return this <CODE>Chunk</CODE>
[ "Sets", "a", "goto", "for", "a", "remote", "destination", "for", "this", "<CODE", ">", "Chunk<", "/", "CODE", ">", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/Chunk.java#L692-L694
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobgraph/JobGraph.java
JobGraph.writeRequiredJarFiles
private void writeRequiredJarFiles(final DataOutput out, final AbstractJobVertex[] jobVertices) throws IOException { """ Writes the JAR files of all vertices in array <code>jobVertices</code> to the specified output stream. @param out the output stream to write the JAR files to @param jobVertices array of jo...
java
private void writeRequiredJarFiles(final DataOutput out, final AbstractJobVertex[] jobVertices) throws IOException { // Now check if all the collected jar files really exist final FileSystem fs = FileSystem.getLocalFileSystem(); for (int i = 0; i < this.userJars.size(); i++) { if (!fs.exists(this.userJars.ge...
[ "private", "void", "writeRequiredJarFiles", "(", "final", "DataOutput", "out", ",", "final", "AbstractJobVertex", "[", "]", "jobVertices", ")", "throws", "IOException", "{", "// Now check if all the collected jar files really exist", "final", "FileSystem", "fs", "=", "Fil...
Writes the JAR files of all vertices in array <code>jobVertices</code> to the specified output stream. @param out the output stream to write the JAR files to @param jobVertices array of job vertices whose required JAR file are to be written to the output stream @throws IOException thrown if an error occurs while writi...
[ "Writes", "the", "JAR", "files", "of", "all", "vertices", "in", "array", "<code", ">", "jobVertices<", "/", "code", ">", "to", "the", "specified", "output", "stream", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/jobgraph/JobGraph.java#L676-L710
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java
GuiStandardUtils.equalizeSizes
public static void equalizeSizes(JComponent[] components) { """ Sets the items in <code>aComponents</code> to the same size. Sets each component's preferred and maximum sizes. The actual size is determined by the layout manager, which adjusts for locale-specific strings and customized fonts. (See this <a hre...
java
public static void equalizeSizes(JComponent[] components) { Dimension targetSize = new Dimension(0, 0); for (int i = 0; i < components.length; i++) { JComponent comp = components[i]; Dimension compSize = comp.getPreferredSize(); double width = Math.max(targetSize.getW...
[ "public", "static", "void", "equalizeSizes", "(", "JComponent", "[", "]", "components", ")", "{", "Dimension", "targetSize", "=", "new", "Dimension", "(", "0", ",", "0", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "components", ".", "l...
Sets the items in <code>aComponents</code> to the same size. Sets each component's preferred and maximum sizes. The actual size is determined by the layout manager, which adjusts for locale-specific strings and customized fonts. (See this <a href="http://java.sun.com/products/jlf/ed2/samcode/prefere.html">Sun doc </a>...
[ "Sets", "the", "items", "in", "<code", ">", "aComponents<", "/", "code", ">", "to", "the", "same", "size", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/util/GuiStandardUtils.java#L162-L172
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.cart_cartId_summary_GET
public OvhOrder cart_cartId_summary_GET(String cartId) throws IOException { """ Get a summary of your current order REST: GET /order/cart/{cartId}/summary @param cartId [required] Cart identifier """ String qPath = "/order/cart/{cartId}/summary"; StringBuilder sb = path(qPath, cartId); String resp = ...
java
public OvhOrder cart_cartId_summary_GET(String cartId) throws IOException { String qPath = "/order/cart/{cartId}/summary"; StringBuilder sb = path(qPath, cartId); String resp = execN(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhOrder.class); }
[ "public", "OvhOrder", "cart_cartId_summary_GET", "(", "String", "cartId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/cart/{cartId}/summary\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "cartId", ")", ";", "String", "resp...
Get a summary of your current order REST: GET /order/cart/{cartId}/summary @param cartId [required] Cart identifier
[ "Get", "a", "summary", "of", "your", "current", "order" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L11396-L11401
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/std/XCostExtension.java
XCostExtension.assignTypes
public void assignTypes(XTrace trace, Map<List<String>, String> types) { """ Assigns (to the given trace) multiple cost types given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. @see #assignAmounts(XTrace, Map) @param trace T...
java
public void assignTypes(XTrace trace, Map<List<String>, String> types) { XCostType.instance().assignNestedValues(trace, types); }
[ "public", "void", "assignTypes", "(", "XTrace", "trace", ",", "Map", "<", "List", "<", "String", ">", ",", "String", ">", "types", ")", "{", "XCostType", ".", "instance", "(", ")", ".", "assignNestedValues", "(", "trace", ",", "types", ")", ";", "}" ]
Assigns (to the given trace) multiple cost types given their keys. Note that as a side effect this method creates attributes when it does not find an attribute with the proper key. @see #assignAmounts(XTrace, Map) @param trace Trace to assign the cost types to. @param types Mapping from keys to cost types which are t...
[ "Assigns", "(", "to", "the", "given", "trace", ")", "multiple", "cost", "types", "given", "their", "keys", ".", "Note", "that", "as", "a", "side", "effect", "this", "method", "creates", "attributes", "when", "it", "does", "not", "find", "an", "attribute", ...
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XCostExtension.java#L969-L971
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java
Whitebox.getInternalState
public static <T> T getInternalState(Object object, String fieldName) { """ Get the value of a field using reflection. This method will iterate through the entire class hierarchy and return the value of the first field named <tt>fieldName</tt>. If you want to get a specific field value at specific place in the ...
java
public static <T> T getInternalState(Object object, String fieldName) { return WhiteboxImpl.getInternalState(object, fieldName); }
[ "public", "static", "<", "T", ">", "T", "getInternalState", "(", "Object", "object", ",", "String", "fieldName", ")", "{", "return", "WhiteboxImpl", ".", "getInternalState", "(", "object", ",", "fieldName", ")", ";", "}" ]
Get the value of a field using reflection. This method will iterate through the entire class hierarchy and return the value of the first field named <tt>fieldName</tt>. If you want to get a specific field value at specific place in the class hierarchy please refer to {@link #getInternalState(Object, String, Class)}. @...
[ "Get", "the", "value", "of", "a", "field", "using", "reflection", ".", "This", "method", "will", "iterate", "through", "the", "entire", "class", "hierarchy", "and", "return", "the", "value", "of", "the", "first", "field", "named", "<tt", ">", "fieldName<", ...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java#L291-L293
davidmoten/rxjava-extras
src/main/java/com/github/davidmoten/rx/Serialized.java
Serialized.read
public static <T extends Serializable> Observable<T> read(final File file) { """ Returns the deserialized objects from the given {@link File} as an {@link Observable} stream. A buffer size of 8192 bytes is used by default. @param file the input file containing serialized java objects @param <T> the generic...
java
public static <T extends Serializable> Observable<T> read(final File file) { return read(file, DEFAULT_BUFFER_SIZE); }
[ "public", "static", "<", "T", "extends", "Serializable", ">", "Observable", "<", "T", ">", "read", "(", "final", "File", "file", ")", "{", "return", "read", "(", "file", ",", "DEFAULT_BUFFER_SIZE", ")", ";", "}" ]
Returns the deserialized objects from the given {@link File} as an {@link Observable} stream. A buffer size of 8192 bytes is used by default. @param file the input file containing serialized java objects @param <T> the generic type of the deserialized objects returned in the stream @return the stream of deserialized o...
[ "Returns", "the", "deserialized", "objects", "from", "the", "given", "{", "@link", "File", "}", "as", "an", "{", "@link", "Observable", "}", "stream", ".", "A", "buffer", "size", "of", "8192", "bytes", "is", "used", "by", "default", "." ]
train
https://github.com/davidmoten/rxjava-extras/blob/a91d2ba7d454843250e0b0fce36084f9fb02a551/src/main/java/com/github/davidmoten/rx/Serialized.java#L136-L138
Impetus/Kundera
src/kundera-rdbms/src/main/java/com/impetus/client/rdbms/HibernateClient.java
HibernateClient.updateForeignKeys
private void updateForeignKeys(EntityMetadata metadata, Object id, List<RelationHolder> relationHolders) { """ Updates foreign keys into master table. @param metadata the metadata @param id the id @param relationHolders the relation holders """ for (RelationHolder rh : relationHolders) ...
java
private void updateForeignKeys(EntityMetadata metadata, Object id, List<RelationHolder> relationHolders) { for (RelationHolder rh : relationHolders) { String linkName = rh.getRelationName(); Object linkValue = rh.getRelationValue(); if (linkName != null && linkVal...
[ "private", "void", "updateForeignKeys", "(", "EntityMetadata", "metadata", ",", "Object", "id", ",", "List", "<", "RelationHolder", ">", "relationHolders", ")", "{", "for", "(", "RelationHolder", "rh", ":", "relationHolders", ")", "{", "String", "linkName", "=",...
Updates foreign keys into master table. @param metadata the metadata @param id the id @param relationHolders the relation holders
[ "Updates", "foreign", "keys", "into", "master", "table", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-rdbms/src/main/java/com/impetus/client/rdbms/HibernateClient.java#L811-L835
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/DatabaseCommunicationEngineFactory.java
DatabaseCommunicationEngineFactory.newTextProtocolInstance
public DatabaseCommunicationEngine newTextProtocolInstance(final LogicSchema logicSchema, final String sql, final BackendConnection backendConnection) { """ Create new instance of text protocol backend handler. @param logicSchema logic schema @param sql SQL to be executed @param backendConnection backend conn...
java
public DatabaseCommunicationEngine newTextProtocolInstance(final LogicSchema logicSchema, final String sql, final BackendConnection backendConnection) { return new JDBCDatabaseCommunicationEngine(logicSchema, sql, new JDBCExecuteEngine(backendConnection, new StatementExecutorWrapper(logicSchema))); }
[ "public", "DatabaseCommunicationEngine", "newTextProtocolInstance", "(", "final", "LogicSchema", "logicSchema", ",", "final", "String", "sql", ",", "final", "BackendConnection", "backendConnection", ")", "{", "return", "new", "JDBCDatabaseCommunicationEngine", "(", "logicSc...
Create new instance of text protocol backend handler. @param logicSchema logic schema @param sql SQL to be executed @param backendConnection backend connection @return instance of text protocol backend handler
[ "Create", "new", "instance", "of", "text", "protocol", "backend", "handler", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/DatabaseCommunicationEngineFactory.java#L60-L62
termsuite/termsuite-core
src/main/java/fr/univnantes/termsuite/utils/TermOccurrenceUtils.java
TermOccurrenceUtils.areOffsetsOverlapping
public static boolean areOffsetsOverlapping(TermOccurrence a, TermOccurrence b) { """ True if two {@link TermOccurrence} offsets overlap strictly. Sharing exactly one offset (e.g. <code>a.end == b.begin</code>) is not considered as overlap. @param a @param b @return """ if(a.getBegin() <= b.getBegin())...
java
public static boolean areOffsetsOverlapping(TermOccurrence a, TermOccurrence b) { if(a.getBegin() <= b.getBegin()) return !(a.getBegin() <= b.getEnd() && a.getEnd() <= b.getBegin()); else return !(b.getBegin() <= a.getEnd() && b.getEnd() <= a.getBegin()); }
[ "public", "static", "boolean", "areOffsetsOverlapping", "(", "TermOccurrence", "a", ",", "TermOccurrence", "b", ")", "{", "if", "(", "a", ".", "getBegin", "(", ")", "<=", "b", ".", "getBegin", "(", ")", ")", "return", "!", "(", "a", ".", "getBegin", "(...
True if two {@link TermOccurrence} offsets overlap strictly. Sharing exactly one offset (e.g. <code>a.end == b.begin</code>) is not considered as overlap. @param a @param b @return
[ "True", "if", "two", "{", "@link", "TermOccurrence", "}", "offsets", "overlap", "strictly", ".", "Sharing", "exactly", "one", "offset", "(", "e", ".", "g", ".", "<code", ">", "a", ".", "end", "==", "b", ".", "begin<", "/", "code", ">", ")", "is", "...
train
https://github.com/termsuite/termsuite-core/blob/731e5d0bc7c14180713c01a9c7dffe1925f26130/src/main/java/fr/univnantes/termsuite/utils/TermOccurrenceUtils.java#L150-L156
Trilarion/java-vorbis-support
src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java
VorbisAudioFileReader.getAudioInputStream
public AudioInputStream getAudioInputStream(InputStream inputStream, int medialength, int totalms) throws UnsupportedAudioFileException, IOException { """ Return the AudioInputStream from the given InputStream. @param inputStream @param totalms @param medialength @return @throws javax.sound.sampled.Unsuppor...
java
public AudioInputStream getAudioInputStream(InputStream inputStream, int medialength, int totalms) throws UnsupportedAudioFileException, IOException { LOG.log(Level.FINE, "getAudioInputStream(InputStream inputStreamint medialength, int totalms)"); try { if (!inputStream.markSupported()) { ...
[ "public", "AudioInputStream", "getAudioInputStream", "(", "InputStream", "inputStream", ",", "int", "medialength", ",", "int", "totalms", ")", "throws", "UnsupportedAudioFileException", ",", "IOException", "{", "LOG", ".", "log", "(", "Level", ".", "FINE", ",", "\...
Return the AudioInputStream from the given InputStream. @param inputStream @param totalms @param medialength @return @throws javax.sound.sampled.UnsupportedAudioFileException @throws java.io.IOException
[ "Return", "the", "AudioInputStream", "from", "the", "given", "InputStream", "." ]
train
https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/sampled/spi/VorbisAudioFileReader.java#L290-L304
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java
CommerceOrderPersistenceImpl.countByU_LtC_O
@Override public int countByU_LtC_O(long userId, Date createDate, int orderStatus) { """ Returns the number of commerce orders where userId = &#63; and createDate &lt; &#63; and orderStatus = &#63;. @param userId the user ID @param createDate the create date @param orderStatus the order status @return the n...
java
@Override public int countByU_LtC_O(long userId, Date createDate, int orderStatus) { FinderPath finderPath = FINDER_PATH_WITH_PAGINATION_COUNT_BY_U_LTC_O; Object[] finderArgs = new Object[] { userId, _getTime(createDate), orderStatus }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, th...
[ "@", "Override", "public", "int", "countByU_LtC_O", "(", "long", "userId", ",", "Date", "createDate", ",", "int", "orderStatus", ")", "{", "FinderPath", "finderPath", "=", "FINDER_PATH_WITH_PAGINATION_COUNT_BY_U_LTC_O", ";", "Object", "[", "]", "finderArgs", "=", ...
Returns the number of commerce orders where userId = &#63; and createDate &lt; &#63; and orderStatus = &#63;. @param userId the user ID @param createDate the create date @param orderStatus the order status @return the number of matching commerce orders
[ "Returns", "the", "number", "of", "commerce", "orders", "where", "userId", "=", "&#63", ";", "and", "createDate", "&lt", ";", "&#63", ";", "and", "orderStatus", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPersistenceImpl.java#L5787-L5851
loadimpact/loadimpact-sdk-java
src/main/java/com/loadimpact/util/ListUtils.java
ListUtils.join
public static String join(Collection<? extends Object> lst, String separator) { """ Concatenates a list of objects using the given separator. @param lst list of text strings @param separator separator @return string """ StringBuilder buf = new StringBuilder(lst.size() * 64); bo...
java
public static String join(Collection<? extends Object> lst, String separator) { StringBuilder buf = new StringBuilder(lst.size() * 64); boolean first = true; for (Object value : lst) { if (first) first = false; else buf.append(separator); buf.append(value.toString()); ...
[ "public", "static", "String", "join", "(", "Collection", "<", "?", "extends", "Object", ">", "lst", ",", "String", "separator", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", "lst", ".", "size", "(", ")", "*", "64", ")", ";", "bool...
Concatenates a list of objects using the given separator. @param lst list of text strings @param separator separator @return string
[ "Concatenates", "a", "list", "of", "objects", "using", "the", "given", "separator", "." ]
train
https://github.com/loadimpact/loadimpact-sdk-java/blob/49af80b768c5453266414108b0d30a0fc01b8cef/src/main/java/com/loadimpact/util/ListUtils.java#L56-L64
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/pipeline/GenerationBatch.java
GenerationBatch.addSource
@VisibleForTesting public void addSource(InputFile file) { """ Adds the given InputFile to this GenerationBatch, creating GenerationUnits and inferring unit names/output paths as necessary. """ if (globalCombinedUnit != null) { inputs.add(new ProcessingContext(file, globalCombinedUnit)); } els...
java
@VisibleForTesting public void addSource(InputFile file) { if (globalCombinedUnit != null) { inputs.add(new ProcessingContext(file, globalCombinedUnit)); } else { inputs.add(ProcessingContext.fromFile(file, options)); } }
[ "@", "VisibleForTesting", "public", "void", "addSource", "(", "InputFile", "file", ")", "{", "if", "(", "globalCombinedUnit", "!=", "null", ")", "{", "inputs", ".", "add", "(", "new", "ProcessingContext", "(", "file", ",", "globalCombinedUnit", ")", ")", ";"...
Adds the given InputFile to this GenerationBatch, creating GenerationUnits and inferring unit names/output paths as necessary.
[ "Adds", "the", "given", "InputFile", "to", "this", "GenerationBatch", "creating", "GenerationUnits", "and", "inferring", "unit", "names", "/", "output", "paths", "as", "necessary", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/pipeline/GenerationBatch.java#L183-L190
mlhartme/mork
src/main/java/net/oneandone/mork/reflect/Field.java
Field.forName
public static Field forName(Class cl, String name) { """ Creates a Field if it the Java Field has valid modifiers. @param cl Class containing the Java field @param name of the field @return Field or null """ java.lang.reflect.Field result; try { result = cl.getDeclaredFiel...
java
public static Field forName(Class cl, String name) { java.lang.reflect.Field result; try { result = cl.getDeclaredField(name); } catch (NoSuchFieldException e) { return null; } return create(result); }
[ "public", "static", "Field", "forName", "(", "Class", "cl", ",", "String", "name", ")", "{", "java", ".", "lang", ".", "reflect", ".", "Field", "result", ";", "try", "{", "result", "=", "cl", ".", "getDeclaredField", "(", "name", ")", ";", "}", "catc...
Creates a Field if it the Java Field has valid modifiers. @param cl Class containing the Java field @param name of the field @return Field or null
[ "Creates", "a", "Field", "if", "it", "the", "Java", "Field", "has", "valid", "modifiers", "." ]
train
https://github.com/mlhartme/mork/blob/a069b087750c4133bfeebaf1f599c3bc96762113/src/main/java/net/oneandone/mork/reflect/Field.java#L61-L71
docusign/docusign-java-client
src/main/java/com/docusign/esign/client/ApiClient.java
ApiClient.getJWTUri
public String getJWTUri(String clientId, String redirectURI, String oAuthBasePath) { """ Helper method to build the OAuth JWT grant uri (used once to get a user consent for impersonation) @param clientId OAuth2 client ID @param redirectURI OAuth2 redirect uri @return the OAuth JWT grant uri as a String """ ...
java
public String getJWTUri(String clientId, String redirectURI, String oAuthBasePath) { return UriBuilder.fromUri(oAuthBasePath) .scheme("https") .path("/oauth/auth") .queryParam("response_type", "code") .queryParam("scope", "signature%20impersonation") .queryParam("client_id", clientId) .query...
[ "public", "String", "getJWTUri", "(", "String", "clientId", ",", "String", "redirectURI", ",", "String", "oAuthBasePath", ")", "{", "return", "UriBuilder", ".", "fromUri", "(", "oAuthBasePath", ")", ".", "scheme", "(", "\"https\"", ")", ".", "path", "(", "\"...
Helper method to build the OAuth JWT grant uri (used once to get a user consent for impersonation) @param clientId OAuth2 client ID @param redirectURI OAuth2 redirect uri @return the OAuth JWT grant uri as a String
[ "Helper", "method", "to", "build", "the", "OAuth", "JWT", "grant", "uri", "(", "used", "once", "to", "get", "a", "user", "consent", "for", "impersonation", ")" ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/client/ApiClient.java#L650-L659
nguillaumin/slick2d-maven
slick2d-peditor/src/main/java/org/newdawn/slick/tools/peditor/GradientEditor.java
GradientEditor.addPoint
public void addPoint(float pos, Color col) { """ Add a control point to the gradient @param pos The position in the gradient (0 -> 1) @param col The color at the new control point """ ControlPoint point = new ControlPoint(col, pos); for (int i=0;i<list.size()-1;i++) { ControlPoint now = (ControlP...
java
public void addPoint(float pos, Color col) { ControlPoint point = new ControlPoint(col, pos); for (int i=0;i<list.size()-1;i++) { ControlPoint now = (ControlPoint) list.get(i); ControlPoint next = (ControlPoint) list.get(i+1); if ((now.pos <= 0.5f) && (next.pos >=0.5f)) { list.add(i+1,point); ...
[ "public", "void", "addPoint", "(", "float", "pos", ",", "Color", "col", ")", "{", "ControlPoint", "point", "=", "new", "ControlPoint", "(", "col", ",", "pos", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "list", ".", "size", "(", ")...
Add a control point to the gradient @param pos The position in the gradient (0 -> 1) @param col The color at the new control point
[ "Add", "a", "control", "point", "to", "the", "gradient" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-peditor/src/main/java/org/newdawn/slick/tools/peditor/GradientEditor.java#L364-L375
joniles/mpxj
src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java
UniversalProjectReader.readProjectFile
private ProjectFile readProjectFile(ProjectReader reader, File file) throws MPXJException { """ Adds listeners and reads from a file. @param reader reader for file type @param file schedule data @return ProjectFile instance """ addListeners(reader); return reader.read(file); }
java
private ProjectFile readProjectFile(ProjectReader reader, File file) throws MPXJException { addListeners(reader); return reader.read(file); }
[ "private", "ProjectFile", "readProjectFile", "(", "ProjectReader", "reader", ",", "File", "file", ")", "throws", "MPXJException", "{", "addListeners", "(", "reader", ")", ";", "return", "reader", ".", "read", "(", "file", ")", ";", "}" ]
Adds listeners and reads from a file. @param reader reader for file type @param file schedule data @return ProjectFile instance
[ "Adds", "listeners", "and", "reads", "from", "a", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/reader/UniversalProjectReader.java#L366-L370
googleads/googleads-java-lib
extensions/adwords_rate_limiter/src/main/java/com/google/api/ads/adwords/extension/ratelimiter/ReflectionUtil.java
ReflectionUtil.isInstanceOf
public static boolean isInstanceOf(Object obj, String classSimpleName) { """ Check whether an object is an instance of a specified class. @param obj the object to check @param classSimpleName the simple name of the specified class. @return true if the object is an instance of the specified class """ i...
java
public static boolean isInstanceOf(Object obj, String classSimpleName) { if (obj == null) { return false; } Class<?> currentClass = obj.getClass(); while (currentClass != Object.class) { if (currentClass.getSimpleName().equals(classSimpleName)) { return true; } else { ...
[ "public", "static", "boolean", "isInstanceOf", "(", "Object", "obj", ",", "String", "classSimpleName", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "return", "false", ";", "}", "Class", "<", "?", ">", "currentClass", "=", "obj", ".", "getClass", ...
Check whether an object is an instance of a specified class. @param obj the object to check @param classSimpleName the simple name of the specified class. @return true if the object is an instance of the specified class
[ "Check", "whether", "an", "object", "is", "an", "instance", "of", "a", "specified", "class", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/extensions/adwords_rate_limiter/src/main/java/com/google/api/ads/adwords/extension/ratelimiter/ReflectionUtil.java#L30-L44
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/annotation/AnnotationValue.java
AnnotationValue.getRequiredValue
public @Nonnull final <T> T getRequiredValue(Class<T> type) { """ Get the value of the {@code value} member of the annotation. @param type The type @param <T> The type @throws IllegalStateException If no member is available that conforms to the given type @return The result """ return getRequired...
java
public @Nonnull final <T> T getRequiredValue(Class<T> type) { return getRequiredValue(AnnotationMetadata.VALUE_MEMBER, type); }
[ "public", "@", "Nonnull", "final", "<", "T", ">", "T", "getRequiredValue", "(", "Class", "<", "T", ">", "type", ")", "{", "return", "getRequiredValue", "(", "AnnotationMetadata", ".", "VALUE_MEMBER", ",", "type", ")", ";", "}" ]
Get the value of the {@code value} member of the annotation. @param type The type @param <T> The type @throws IllegalStateException If no member is available that conforms to the given type @return The result
[ "Get", "the", "value", "of", "the", "{", "@code", "value", "}", "member", "of", "the", "annotation", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/annotation/AnnotationValue.java#L210-L212
wanglinsong/thx-android
uia-client/src/main/java/com/android/uiautomator/stub/Rect.java
Rect.intersects
public static boolean intersects(Rect a, Rect b) { """ Returns true iff the two specified rectangles intersect. In no event are either of the rectangles modified. To record the intersection, use {@link #intersect(Rect)} or {@link #setIntersect(Rect, Rect)}. @param a The first rectangle being tested for inters...
java
public static boolean intersects(Rect a, Rect b) { return a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom; }
[ "public", "static", "boolean", "intersects", "(", "Rect", "a", ",", "Rect", "b", ")", "{", "return", "a", ".", "left", "<", "b", ".", "right", "&&", "b", ".", "left", "<", "a", ".", "right", "&&", "a", ".", "top", "<", "b", ".", "bottom", "&&",...
Returns true iff the two specified rectangles intersect. In no event are either of the rectangles modified. To record the intersection, use {@link #intersect(Rect)} or {@link #setIntersect(Rect, Rect)}. @param a The first rectangle being tested for intersection @param b The second rectangle being tested for intersecti...
[ "Returns", "true", "iff", "the", "two", "specified", "rectangles", "intersect", ".", "In", "no", "event", "are", "either", "of", "the", "rectangles", "modified", ".", "To", "record", "the", "intersection", "use", "{", "@link", "#intersect", "(", "Rect", ")",...
train
https://github.com/wanglinsong/thx-android/blob/4a98c4181b3e8876e688591737da37627c07e72b/uia-client/src/main/java/com/android/uiautomator/stub/Rect.java#L493-L495
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/PartialOrderPriorityQueue.java
PartialOrderPriorityQueue.offer
public boolean offer(T element) { """ Adds element to the PriorityQueue in log(size) time if either the PriorityQueue is not full, or not lessThan(element, top()). @param element The element to insert, @return True, if element is added, false otherwise. """ if (size < capacity) { put(element); re...
java
public boolean offer(T element) { if (size < capacity) { put(element); return true; } else if (size > 0 && !lessThan(element, peek())) { heap[1] = element; adjustTop(); return true; } else { return false; } }
[ "public", "boolean", "offer", "(", "T", "element", ")", "{", "if", "(", "size", "<", "capacity", ")", "{", "put", "(", "element", ")", ";", "return", "true", ";", "}", "else", "if", "(", "size", ">", "0", "&&", "!", "lessThan", "(", "element", ",...
Adds element to the PriorityQueue in log(size) time if either the PriorityQueue is not full, or not lessThan(element, top()). @param element The element to insert, @return True, if element is added, false otherwise.
[ "Adds", "element", "to", "the", "PriorityQueue", "in", "log", "(", "size", ")", "time", "if", "either", "the", "PriorityQueue", "is", "not", "full", "or", "not", "lessThan", "(", "element", "top", "()", ")", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/operators/sort/PartialOrderPriorityQueue.java#L110-L121
mapcode-foundation/mapcode-java
src/main/java/com/mapcode/Point.java
Point.fromUniformlyDistributedRandomPoints
@Nonnull public static Point fromUniformlyDistributedRandomPoints(@Nonnull final Random randomGenerator) { """ Create a random point, uniformly distributed over the surface of the Earth. @param randomGenerator Random generator used to create a point. @return Random point with uniform distribution over the ...
java
@Nonnull public static Point fromUniformlyDistributedRandomPoints(@Nonnull final Random randomGenerator) { checkNonnull("randomGenerator", randomGenerator); // Calculate uniformly distributed 3D point on sphere (radius = 1.0): // http://mathproofs.blogspot.co.il/2005/04/uniform-random-distr...
[ "@", "Nonnull", "public", "static", "Point", "fromUniformlyDistributedRandomPoints", "(", "@", "Nonnull", "final", "Random", "randomGenerator", ")", "{", "checkNonnull", "(", "\"randomGenerator\"", ",", "randomGenerator", ")", ";", "// Calculate uniformly distributed 3D poi...
Create a random point, uniformly distributed over the surface of the Earth. @param randomGenerator Random generator used to create a point. @return Random point with uniform distribution over the sphere.
[ "Create", "a", "random", "point", "uniformly", "distributed", "over", "the", "surface", "of", "the", "Earth", "." ]
train
https://github.com/mapcode-foundation/mapcode-java/blob/f12d4d9fbd460472ac0fff1f702f2ac716bc0ab8/src/main/java/com/mapcode/Point.java#L138-L163
omadahealth/CircularBarPager
library/src/main/java/com/github/omadahealth/circularbarpager/library/CircularBar.java
CircularBar.getArcRect
private RectF getArcRect(float offset) { """ Calculates the coordinates of {@link android.graphics.RectF} that are perfectly within the available window @param offset Half the width of the pain stroke @return The rectF """ RectF workingSurface = new RectF(); workingSurface.left = getPaddin...
java
private RectF getArcRect(float offset) { RectF workingSurface = new RectF(); workingSurface.left = getPaddingLeft() + offset; workingSurface.top = getPaddingTop() + offset; workingSurface.right = getWidth() - getPaddingRight() - offset; workingSurface.bottom = getHeight() - getPa...
[ "private", "RectF", "getArcRect", "(", "float", "offset", ")", "{", "RectF", "workingSurface", "=", "new", "RectF", "(", ")", ";", "workingSurface", ".", "left", "=", "getPaddingLeft", "(", ")", "+", "offset", ";", "workingSurface", ".", "top", "=", "getPa...
Calculates the coordinates of {@link android.graphics.RectF} that are perfectly within the available window @param offset Half the width of the pain stroke @return The rectF
[ "Calculates", "the", "coordinates", "of", "{", "@link", "android", ".", "graphics", ".", "RectF", "}", "that", "are", "perfectly", "within", "the", "available", "window" ]
train
https://github.com/omadahealth/CircularBarPager/blob/3a43e8828849da727fd13345e83b8432f7271155/library/src/main/java/com/github/omadahealth/circularbarpager/library/CircularBar.java#L513-L530
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/data/SharedDataContextUtils.java
SharedDataContextUtils.replaceDataReferences
public static <T extends ViewTraverse<T>> Map<String, Object> replaceDataReferences( final Map<String, Object> input, final T currentContext, final BiFunction<Integer, String, T> viewMap, final Converter<String, String> converter, final MultiDataContext<T, Dat...
java
public static <T extends ViewTraverse<T>> Map<String, Object> replaceDataReferences( final Map<String, Object> input, final T currentContext, final BiFunction<Integer, String, T> viewMap, final Converter<String, String> converter, final MultiDataContext<T, Dat...
[ "public", "static", "<", "T", "extends", "ViewTraverse", "<", "T", ">", ">", "Map", "<", "String", ",", "Object", ">", "replaceDataReferences", "(", "final", "Map", "<", "String", ",", "Object", ">", "input", ",", "final", "T", "currentContext", ",", "fi...
Recursively replace data references in the values in a map which contains either string, collection or Map values. @param input input map @param data context data @return Map with all string values having references replaced
[ "Recursively", "replace", "data", "references", "in", "the", "values", "in", "a", "map", "which", "contains", "either", "string", "collection", "or", "Map", "values", "." ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/data/SharedDataContextUtils.java#L322-L331
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/LogRecordBrowser.java
LogRecordBrowser.recordsInProcess
public OnePidRecordListImpl recordsInProcess(long min, long max, final LogRecordHeaderFilter filter) { """ Returns records belonging to a process and satisfying the filter. @param min the low time limit (the oldest log record). @param max the upper time limit (the youngest log record). @param filter criteria ...
java
public OnePidRecordListImpl recordsInProcess(long min, long max, final LogRecordHeaderFilter filter) { return startRecordsInProcess(min, max, filter==null ? new AllAcceptVerifier() : new HeadFilterVerifier(filter)); }
[ "public", "OnePidRecordListImpl", "recordsInProcess", "(", "long", "min", ",", "long", "max", ",", "final", "LogRecordHeaderFilter", "filter", ")", "{", "return", "startRecordsInProcess", "(", "min", ",", "max", ",", "filter", "==", "null", "?", "new", "AllAccep...
Returns records belonging to a process and satisfying the filter. @param min the low time limit (the oldest log record). @param max the upper time limit (the youngest log record). @param filter criteria to filter logs records on. @return the iterable list of records.
[ "Returns", "records", "belonging", "to", "a", "process", "and", "satisfying", "the", "filter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ws/logging/hpel/impl/LogRecordBrowser.java#L101-L103
dlew/joda-time-android
library/src/main/java/net/danlew/android/joda/DateUtils.java
DateUtils.getRelativeTimeSpanString
public static CharSequence getRelativeTimeSpanString(Context context, ReadablePartial time) { """ Returns a string describing 'time' as a time relative to the current time. Missing fields from 'time' are filled in with values from the current time. @see #getRelativeTimeSpanString(Context, ReadableInstant, in...
java
public static CharSequence getRelativeTimeSpanString(Context context, ReadablePartial time) { return getRelativeTimeSpanString(context, time.toDateTime(DateTime.now())); }
[ "public", "static", "CharSequence", "getRelativeTimeSpanString", "(", "Context", "context", ",", "ReadablePartial", "time", ")", "{", "return", "getRelativeTimeSpanString", "(", "context", ",", "time", ".", "toDateTime", "(", "DateTime", ".", "now", "(", ")", ")",...
Returns a string describing 'time' as a time relative to the current time. Missing fields from 'time' are filled in with values from the current time. @see #getRelativeTimeSpanString(Context, ReadableInstant, int)
[ "Returns", "a", "string", "describing", "time", "as", "a", "time", "relative", "to", "the", "current", "time", "." ]
train
https://github.com/dlew/joda-time-android/blob/5bf96f6ef4ea63ee91e73e1e528896fa00108dec/library/src/main/java/net/danlew/android/joda/DateUtils.java#L213-L215
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java
SoccomClient.call
public static String call(String serverspec, String msg, int timeout, PrintStream log) throws SoccomException { """ This method is a simple wrapper for synchronous invocation of server's service. It is roughly implemented as: <pre> SoccomClient soccom = new SoccomClient(host,port,log); p...
java
public static String call(String serverspec, String msg, int timeout, PrintStream log) throws SoccomException { String host; int port; int k = serverspec.indexOf(':'); if (k >= 0) { host = serverspec.substring(0,k); port = Integer.parseInt(serverspec.substring(k...
[ "public", "static", "String", "call", "(", "String", "serverspec", ",", "String", "msg", ",", "int", "timeout", ",", "PrintStream", "log", ")", "throws", "SoccomException", "{", "String", "host", ";", "int", "port", ";", "int", "k", "=", "serverspec", ".",...
This method is a simple wrapper for synchronous invocation of server's service. It is roughly implemented as: <pre> SoccomClient soccom = new SoccomClient(host,port,log); putreq(msg); return getresp(); soccom.close(); </pre> @param serverspec In the form of host:port. If ':' is missing, assume port is 4001 @param msg ...
[ "This", "method", "is", "a", "simple", "wrapper", "for", "synchronous", "invocation", "of", "server", "s", "service", ".", "It", "is", "roughly", "implemented", "as", ":", "<pre", ">", "SoccomClient", "soccom", "=", "new", "SoccomClient", "(", "host", "port"...
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/soccom/SoccomClient.java#L546-L571
nakamura5akihito/six-util
src/main/java/jp/go/aist/six/util/core/web/spring/Http.java
Http.postFrom
public static String postFrom( final URL to_url, final Reader from_reader, final MediaType media_type ) { """ HTTP POST: Reads the contents from the specified reader and sends them to the URL. @return the location, as an URI, wher...
java
public static String postFrom( final URL to_url, final Reader from_reader, final MediaType media_type ) { ReaderRequestCallback callback = new ReaderRequestCallback( from_reader, media_type ); St...
[ "public", "static", "String", "postFrom", "(", "final", "URL", "to_url", ",", "final", "Reader", "from_reader", ",", "final", "MediaType", "media_type", ")", "{", "ReaderRequestCallback", "callback", "=", "new", "ReaderRequestCallback", "(", "from_reader", ",", "m...
HTTP POST: Reads the contents from the specified reader and sends them to the URL. @return the location, as an URI, where the resource is created. @throws HttpException when an exceptional condition occurred during the HTTP method execution.
[ "HTTP", "POST", ":", "Reads", "the", "contents", "from", "the", "specified", "reader", "and", "sends", "them", "to", "the", "URL", "." ]
train
https://github.com/nakamura5akihito/six-util/blob/a6db388a345e220cea2b1fa6324d15c80c6278b6/src/main/java/jp/go/aist/six/util/core/web/spring/Http.java#L267-L279
igniterealtime/Smack
smack-tcp/src/main/java/org/jivesoftware/smack/sm/SMUtils.java
SMUtils.calculateDelta
public static long calculateDelta(long reportedHandledCount, long lastKnownHandledCount) { """ Calculates the delta of the last known stanza handled count and the new reported stanza handled count while considering that the new value may be wrapped after 2^32-1. @param reportedHandledCount @param lastKnownHa...
java
public static long calculateDelta(long reportedHandledCount, long lastKnownHandledCount) { if (lastKnownHandledCount > reportedHandledCount) { throw new IllegalStateException("Illegal Stream Management State: Last known handled count (" + lastKnownHandledCount + ") is greater than reported handled c...
[ "public", "static", "long", "calculateDelta", "(", "long", "reportedHandledCount", ",", "long", "lastKnownHandledCount", ")", "{", "if", "(", "lastKnownHandledCount", ">", "reportedHandledCount", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Illegal Stream ...
Calculates the delta of the last known stanza handled count and the new reported stanza handled count while considering that the new value may be wrapped after 2^32-1. @param reportedHandledCount @param lastKnownHandledCount @return the delta
[ "Calculates", "the", "delta", "of", "the", "last", "known", "stanza", "handled", "count", "and", "the", "new", "reported", "stanza", "handled", "count", "while", "considering", "that", "the", "new", "value", "may", "be", "wrapped", "after", "2^32", "-", "1",...
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-tcp/src/main/java/org/jivesoftware/smack/sm/SMUtils.java#L49-L54
wcm-io/wcm-io-tooling
commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/XmlContentBuilder.java
XmlContentBuilder.buildPage
public Document buildPage(Map<String, Object> content) { """ Build XML for cq:Page. @param content Content with page properties and nested nodes @return cq:Page JCR XML """ Document doc = documentBuilder.newDocument(); Element jcrRoot = createJcrRoot(doc, NT_PAGE); Element jcrContent = createJcrC...
java
public Document buildPage(Map<String, Object> content) { Document doc = documentBuilder.newDocument(); Element jcrRoot = createJcrRoot(doc, NT_PAGE); Element jcrContent = createJcrContent(doc, jcrRoot, NT_PAGE_CONTENT); exportPayload(doc, jcrContent, content); return doc; }
[ "public", "Document", "buildPage", "(", "Map", "<", "String", ",", "Object", ">", "content", ")", "{", "Document", "doc", "=", "documentBuilder", ".", "newDocument", "(", ")", ";", "Element", "jcrRoot", "=", "createJcrRoot", "(", "doc", ",", "NT_PAGE", ")"...
Build XML for cq:Page. @param content Content with page properties and nested nodes @return cq:Page JCR XML
[ "Build", "XML", "for", "cq", ":", "Page", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/commons/content-package-builder/src/main/java/io/wcm/tooling/commons/contentpackagebuilder/XmlContentBuilder.java#L88-L96
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/util/pathfinding/navmesh/NavMesh.java
NavMesh.findSpace
public Space findSpace(float x, float y) { """ Find the space at a given location @param x The x coordinate at which to find the space @param y The y coordinate at which to find the space @return The space at the given location """ for (int i=0;i<spaces.size();i++) { Space space = getSpace(i); if ...
java
public Space findSpace(float x, float y) { for (int i=0;i<spaces.size();i++) { Space space = getSpace(i); if (space.contains(x,y)) { return space; } } return null; }
[ "public", "Space", "findSpace", "(", "float", "x", ",", "float", "y", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "spaces", ".", "size", "(", ")", ";", "i", "++", ")", "{", "Space", "space", "=", "getSpace", "(", "i", ")", ";",...
Find the space at a given location @param x The x coordinate at which to find the space @param y The y coordinate at which to find the space @return The space at the given location
[ "Find", "the", "space", "at", "a", "given", "location" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/util/pathfinding/navmesh/NavMesh.java#L69-L78
UrielCh/ovh-java-sdk
ovh-java-sdk-overTheBox/src/main/java/net/minidev/ovh/api/ApiOvhOverTheBox.java
ApiOvhOverTheBox.serviceName_remoteAccesses_POST
public OvhRemoteAccess serviceName_remoteAccesses_POST(String serviceName, String allowedIp, Date expirationDate, Long exposedPort, String publicKey) throws IOException { """ Create a new remote access for the service REST: POST /overTheBox/{serviceName}/remoteAccesses @param exposedPort [required] The port th...
java
public OvhRemoteAccess serviceName_remoteAccesses_POST(String serviceName, String allowedIp, Date expirationDate, Long exposedPort, String publicKey) throws IOException { String qPath = "/overTheBox/{serviceName}/remoteAccesses"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<...
[ "public", "OvhRemoteAccess", "serviceName_remoteAccesses_POST", "(", "String", "serviceName", ",", "String", "allowedIp", ",", "Date", "expirationDate", ",", "Long", "exposedPort", ",", "String", "publicKey", ")", "throws", "IOException", "{", "String", "qPath", "=", ...
Create a new remote access for the service REST: POST /overTheBox/{serviceName}/remoteAccesses @param exposedPort [required] The port that the device will expose @param publicKey [required] The remote user public key authorized on the device (for SSH purpose) @param allowedIp [required] IP block from which the remote ...
[ "Create", "a", "new", "remote", "access", "for", "the", "service" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-overTheBox/src/main/java/net/minidev/ovh/api/ApiOvhOverTheBox.java#L262-L272
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/massindex/impl/BatchCoordinator.java
BatchCoordinator.beforeBatch
private void beforeBatch(BatchBackend backend) { """ Optional operations to do before the multiple-threads start indexing @param backend """ if ( this.purgeAtStart ) { // purgeAll for affected entities IndexedTypeSet targetedTypes = searchFactoryImplementor.getIndexedTypesPolymorphic( rootIndexedTyp...
java
private void beforeBatch(BatchBackend backend) { if ( this.purgeAtStart ) { // purgeAll for affected entities IndexedTypeSet targetedTypes = searchFactoryImplementor.getIndexedTypesPolymorphic( rootIndexedTypes ); for ( IndexedTypeIdentifier type : targetedTypes ) { // needs do be in-sync work to make su...
[ "private", "void", "beforeBatch", "(", "BatchBackend", "backend", ")", "{", "if", "(", "this", ".", "purgeAtStart", ")", "{", "// purgeAll for affected entities", "IndexedTypeSet", "targetedTypes", "=", "searchFactoryImplementor", ".", "getIndexedTypesPolymorphic", "(", ...
Optional operations to do before the multiple-threads start indexing @param backend
[ "Optional", "operations", "to", "do", "before", "the", "multiple", "-", "threads", "start", "indexing" ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/massindex/impl/BatchCoordinator.java#L133-L145
threerings/narya
core/src/main/java/com/threerings/io/ObjectInputStream.java
ObjectInputStream.readUnmodifiedUTF
public String readUnmodifiedUTF () throws IOException { """ Read a string encoded as real UTF-8 (rather than the modified format handled by {link #readUTF}). """ // find out how many raw bytes of UTF8 data there is int utflen = readUnsignedShort(); // read precisely that many i...
java
public String readUnmodifiedUTF () throws IOException { // find out how many raw bytes of UTF8 data there is int utflen = readUnsignedShort(); // read precisely that many into a buffer byte[] bbuf = new byte[utflen]; in.read(bbuf); return new String(bbuf, "UTF...
[ "public", "String", "readUnmodifiedUTF", "(", ")", "throws", "IOException", "{", "// find out how many raw bytes of UTF8 data there is", "int", "utflen", "=", "readUnsignedShort", "(", ")", ";", "// read precisely that many into a buffer", "byte", "[", "]", "bbuf", "=", "...
Read a string encoded as real UTF-8 (rather than the modified format handled by {link #readUTF}).
[ "Read", "a", "string", "encoded", "as", "real", "UTF", "-", "8", "(", "rather", "than", "the", "modified", "format", "handled", "by", "{", "link", "#readUTF", "}", ")", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/io/ObjectInputStream.java#L312-L322
ehcache/ehcache3
impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java
CacheConfigurationBuilder.withKeySerializer
public CacheConfigurationBuilder<K, V> withKeySerializer(Class<? extends Serializer<K>> keySerializerClass) { """ Adds a {@link Serializer} class for cache keys to the configured builder. <p> {@link Serializer}s are what enables cache storage beyond the heap tier. @param keySerializerClass the key serializer ...
java
public CacheConfigurationBuilder<K, V> withKeySerializer(Class<? extends Serializer<K>> keySerializerClass) { return withSerializer(new DefaultSerializerConfiguration<>(requireNonNull(keySerializerClass, "Null key serializer class"), DefaultSerializerConfiguration.Type.KEY)); }
[ "public", "CacheConfigurationBuilder", "<", "K", ",", "V", ">", "withKeySerializer", "(", "Class", "<", "?", "extends", "Serializer", "<", "K", ">", ">", "keySerializerClass", ")", "{", "return", "withSerializer", "(", "new", "DefaultSerializerConfiguration", "<>"...
Adds a {@link Serializer} class for cache keys to the configured builder. <p> {@link Serializer}s are what enables cache storage beyond the heap tier. @param keySerializerClass the key serializer to use @return a new builder with the added key serializer
[ "Adds", "a", "{", "@link", "Serializer", "}", "class", "for", "cache", "keys", "to", "the", "configured", "builder", ".", "<p", ">", "{", "@link", "Serializer", "}", "s", "are", "what", "enables", "cache", "storage", "beyond", "the", "heap", "tier", "." ...
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/impl/src/main/java/org/ehcache/config/builders/CacheConfigurationBuilder.java#L468-L470
sarl/sarl
main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java
Utilities.compareVersionToRange
public static int compareVersionToRange(Version version, Version minVersion, Version maxVersion) { """ Null-safe compare a version number to a range of version numbers. <p>The minVersion must be strictly lower to the maxVersion. Otherwise the behavior is not predictible. @param version the version to compar...
java
public static int compareVersionToRange(Version version, Version minVersion, Version maxVersion) { assert minVersion == null || maxVersion == null || minVersion.compareTo(maxVersion) < 0; if (version == null) { return Integer.MIN_VALUE; } if (minVersion != null && compareVersionsNoQualifier(version, minVersi...
[ "public", "static", "int", "compareVersionToRange", "(", "Version", "version", ",", "Version", "minVersion", ",", "Version", "maxVersion", ")", "{", "assert", "minVersion", "==", "null", "||", "maxVersion", "==", "null", "||", "minVersion", ".", "compareTo", "("...
Null-safe compare a version number to a range of version numbers. <p>The minVersion must be strictly lower to the maxVersion. Otherwise the behavior is not predictible. @param version the version to compare to the range; must not be <code>null</code>. @param minVersion the minimal version in the range (inclusive); co...
[ "Null", "-", "safe", "compare", "a", "version", "number", "to", "a", "range", "of", "version", "numbers", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.eclipse/src/io/sarl/eclipse/util/Utilities.java#L85-L97
sarl/sarl
main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractSubCodeBuilderFragment.java
AbstractSubCodeBuilderFragment.bindElementDescription
protected void bindElementDescription(BindingFactory factory, CodeElementExtractor.ElementDescription... descriptions) { """ Binds the given descriptions according to the standard policy. <p>If an custom implementation is defined, it is binded to. Otherwise, the default implementation is binded. @param fact...
java
protected void bindElementDescription(BindingFactory factory, CodeElementExtractor.ElementDescription... descriptions) { for (final CodeElementExtractor.ElementDescription description : descriptions) { bindTypeReferences(factory, description.getBuilderInterfaceType(), description.getBuilderImplementation...
[ "protected", "void", "bindElementDescription", "(", "BindingFactory", "factory", ",", "CodeElementExtractor", ".", "ElementDescription", "...", "descriptions", ")", "{", "for", "(", "final", "CodeElementExtractor", ".", "ElementDescription", "description", ":", "descripti...
Binds the given descriptions according to the standard policy. <p>If an custom implementation is defined, it is binded to. Otherwise, the default implementation is binded. @param factory the binding factory to use for creating the bindings. @param descriptions the descriptions to bind to.
[ "Binds", "the", "given", "descriptions", "according", "to", "the", "standard", "policy", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractSubCodeBuilderFragment.java#L707-L714
gliga/ekstazi
org.ekstazi.core/src/main/java/org/ekstazi/data/TxtStorer.java
TxtStorer.parseLine
protected RegData parseLine(State state, String line) { """ Parses a single line from the file. This method is never invoked for magic sequence. The line includes path to file and hash. Subclasses may include more fields. This method returns null if the line is of no interest. This can be used by subclasses ...
java
protected RegData parseLine(State state, String line) { // Note. Initial this method was using String.split, but that method // seems to be much more expensive than playing with indexOf and // substring. int sepIndex = line.indexOf(SEPARATOR); String urlExternalForm = line.substr...
[ "protected", "RegData", "parseLine", "(", "State", "state", ",", "String", "line", ")", "{", "// Note. Initial this method was using String.split, but that method", "// seems to be much more expensive than playing with indexOf and", "// substring.", "int", "sepIndex", "=", "line", ...
Parses a single line from the file. This method is never invoked for magic sequence. The line includes path to file and hash. Subclasses may include more fields. This method returns null if the line is of no interest. This can be used by subclasses to implement different protocols.
[ "Parses", "a", "single", "line", "from", "the", "file", ".", "This", "method", "is", "never", "invoked", "for", "magic", "sequence", ".", "The", "line", "includes", "path", "to", "file", "and", "hash", ".", "Subclasses", "may", "include", "more", "fields",...
train
https://github.com/gliga/ekstazi/blob/5bf4d39a13305afe62f8b8d2d7b4c573d37d42a1/org.ekstazi.core/src/main/java/org/ekstazi/data/TxtStorer.java#L144-L152
kirgor/enklib
sql/src/main/java/com/kirgor/enklib/sql/proxy/StoredProcedureProxyFactory.java
StoredProcedureProxyFactory.getProxy
public <T> T getProxy(Class<T> interfaceClass, Session session) throws Exception { """ Creates ready-to-use proxy instance for specified interface and {@link Session}. Please, use Sessions with {@link Dialect} compatible to {@link Dialect} used in factory. @param interfaceClass Interface class, which contains ...
java
public <T> T getProxy(Class<T> interfaceClass, Session session) throws Exception { Class proxyClass = proxyClassesByInterface.get(interfaceClass); if (proxyClass == null) { proxyClass = StoredProcedureProxy.createProxyClass(interfaceClass, dialect); proxyClassesByInterface.put(in...
[ "public", "<", "T", ">", "T", "getProxy", "(", "Class", "<", "T", ">", "interfaceClass", ",", "Session", "session", ")", "throws", "Exception", "{", "Class", "proxyClass", "=", "proxyClassesByInterface", ".", "get", "(", "interfaceClass", ")", ";", "if", "...
Creates ready-to-use proxy instance for specified interface and {@link Session}. Please, use Sessions with {@link Dialect} compatible to {@link Dialect} used in factory. @param interfaceClass Interface class, which contains proxy declaration. @param session {@link Session}, which generated proxy will wrap. @par...
[ "Creates", "ready", "-", "to", "-", "use", "proxy", "instance", "for", "specified", "interface", "and", "{", "@link", "Session", "}", ".", "Please", "use", "Sessions", "with", "{", "@link", "Dialect", "}", "compatible", "to", "{", "@link", "Dialect", "}", ...
train
https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/sql/src/main/java/com/kirgor/enklib/sql/proxy/StoredProcedureProxyFactory.java#L35-L45
threerings/nenya
core/src/main/java/com/threerings/openal/SoundManager.java
SoundManager.getClip
protected ClipBuffer getClip (ClipProvider provider, String path) { """ Creates a clip buffer for the sound clip loaded via the specified provider with the specified path. The clip buffer may come from the cache, and it will immediately be queued for loading if it is not already loaded. """ return ge...
java
protected ClipBuffer getClip (ClipProvider provider, String path) { return getClip(provider, path, null); }
[ "protected", "ClipBuffer", "getClip", "(", "ClipProvider", "provider", ",", "String", "path", ")", "{", "return", "getClip", "(", "provider", ",", "path", ",", "null", ")", ";", "}" ]
Creates a clip buffer for the sound clip loaded via the specified provider with the specified path. The clip buffer may come from the cache, and it will immediately be queued for loading if it is not already loaded.
[ "Creates", "a", "clip", "buffer", "for", "the", "sound", "clip", "loaded", "via", "the", "specified", "provider", "with", "the", "specified", "path", ".", "The", "clip", "buffer", "may", "come", "from", "the", "cache", "and", "it", "will", "immediately", "...
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/openal/SoundManager.java#L249-L252
rzwitserloot/lombok
src/core/lombok/core/AST.java
AST.setElementInASTCollection
@SuppressWarnings( { """ Override if your AST collection does not support the set method. Javac's for example, does not. @param field The field that contains the array or list of AST nodes. @param fieldRef The object that you can supply to the field's {@code get} method. @param chain If the collection is immu...
java
@SuppressWarnings({"rawtypes", "unchecked"}) protected void setElementInASTCollection(Field field, Object fieldRef, List<Collection<?>> chain, Collection<?> collection, int idx, N newN) throws IllegalAccessException { if (collection instanceof List<?>) { ((List) collection).set(idx, newN); } }
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "protected", "void", "setElementInASTCollection", "(", "Field", "field", ",", "Object", "fieldRef", ",", "List", "<", "Collection", "<", "?", ">", ">", "chain", ",", "Collection...
Override if your AST collection does not support the set method. Javac's for example, does not. @param field The field that contains the array or list of AST nodes. @param fieldRef The object that you can supply to the field's {@code get} method. @param chain If the collection is immutable, you need to update the poin...
[ "Override", "if", "your", "AST", "collection", "does", "not", "support", "the", "set", "method", ".", "Javac", "s", "for", "example", "does", "not", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/core/AST.java#L363-L368
taskadapter/redmine-java-api
src/main/java/com/taskadapter/redmineapi/IssueManager.java
IssueManager.getIssuesBySummary
public List<Issue> getIssuesBySummary(String projectKey, String summaryField) throws RedmineException { """ There could be several issues with the same summary, so the method returns List. @return empty list if not issues with this summary field exist, never NULL @throws RedmineAuthenticationException invalid ...
java
public List<Issue> getIssuesBySummary(String projectKey, String summaryField) throws RedmineException { if ((projectKey != null) && (projectKey.length() > 0)) { return transport.getObjectsList(Issue.class, new BasicNameValuePair("subject", summaryField), new B...
[ "public", "List", "<", "Issue", ">", "getIssuesBySummary", "(", "String", "projectKey", ",", "String", "summaryField", ")", "throws", "RedmineException", "{", "if", "(", "(", "projectKey", "!=", "null", ")", "&&", "(", "projectKey", ".", "length", "(", ")", ...
There could be several issues with the same summary, so the method returns List. @return empty list if not issues with this summary field exist, never NULL @throws RedmineAuthenticationException invalid or no API access key is used with the server, which requires authorization. Check the constructor arguments. @throws...
[ "There", "could", "be", "several", "issues", "with", "the", "same", "summary", "so", "the", "method", "returns", "List", "." ]
train
https://github.com/taskadapter/redmine-java-api/blob/0bb65f27ee806ec3bd4007e1641f3e996261a04e/src/main/java/com/taskadapter/redmineapi/IssueManager.java#L57-L66
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiMessageImpl.java
JsApiMessageImpl.getSystemContextMap
final JsMsgMap getSystemContextMap() { """ Helper method used by the System Context methods to obtain the System Context items in the form of a map. <p> The method has package level visibility as it is used by MQJsJmsMessageEncoderImpl. @return A JsMsgMap containing the Message Property name-value pairs. ...
java
final JsMsgMap getSystemContextMap() { if (systemContextMap == null) { List<String> keys = (List<String>) getApi().getField(JsApiAccess.SYSTEMCONTEXT_NAME); List<Object> values = (List<Object>) getApi().getField(JsApiAccess.SYSTEMCONTEXT_VALUE); systemContextMap = new JsMsgMa...
[ "final", "JsMsgMap", "getSystemContextMap", "(", ")", "{", "if", "(", "systemContextMap", "==", "null", ")", "{", "List", "<", "String", ">", "keys", "=", "(", "List", "<", "String", ">", ")", "getApi", "(", ")", ".", "getField", "(", "JsApiAccess", "....
Helper method used by the System Context methods to obtain the System Context items in the form of a map. <p> The method has package level visibility as it is used by MQJsJmsMessageEncoderImpl. @return A JsMsgMap containing the Message Property name-value pairs.
[ "Helper", "method", "used", "by", "the", "System", "Context", "methods", "to", "obtain", "the", "System", "Context", "items", "in", "the", "form", "of", "a", "map", ".", "<p", ">", "The", "method", "has", "package", "level", "visibility", "as", "it", "is...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiMessageImpl.java#L893-L900
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java
ChannelUtils.startConfig
public static Map<String, List<String>> startConfig(Map<String, Object> config, boolean restart) { """ Load and start the provided configuration of channels, chains, and groups. If a chain is already started, the restart input flag is used to decide whether to stop and restart that chain. Note that some configu...
java
public static Map<String, List<String>> startConfig(Map<String, Object> config, boolean restart) { Map<String, List<String>> rc = load(config, true, restart); return start(rc, true, restart); }
[ "public", "static", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "startConfig", "(", "Map", "<", "String", ",", "Object", ">", "config", ",", "boolean", "restart", ")", "{", "Map", "<", "String", ",", "List", "<", "String", ">", ">", ...
Load and start the provided configuration of channels, chains, and groups. If a chain is already started, the restart input flag is used to decide whether to stop and restart that chain. Note that some configuration values would require a restart of the chain to take effect (such as TCP bind information). This returns...
[ "Load", "and", "start", "the", "provided", "configuration", "of", "channels", "chains", "and", "groups", ".", "If", "a", "chain", "is", "already", "started", "the", "restart", "input", "flag", "is", "used", "to", "decide", "whether", "to", "stop", "and", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java#L505-L508
meltmedia/cadmium
email/src/main/java/com/meltmedia/cadmium/email/HtmlTextEmail.java
HtmlTextEmail.newMessage
public MimeMessage newMessage( Session session ) throws MessagingException, EmailException { """ Creates a mime message for an html emails with the following structure: mime/mixed - mime/alternative - text/plain - mime/related - text/html - image/* - image/* - (attachment mime type) - (attachment mime...
java
public MimeMessage newMessage( Session session ) throws MessagingException, EmailException { MimeMessage message = new MimeMessage( session ); // populate the addresses and subject. populate(message); // create the multipart content. MimeMultipart containingMultipart = new MimeMultipart(Emai...
[ "public", "MimeMessage", "newMessage", "(", "Session", "session", ")", "throws", "MessagingException", ",", "EmailException", "{", "MimeMessage", "message", "=", "new", "MimeMessage", "(", "session", ")", ";", "// populate the addresses and subject.", "populate", "(", ...
Creates a mime message for an html emails with the following structure: mime/mixed - mime/alternative - text/plain - mime/related - text/html - image/* - image/* - (attachment mime type) - (attachment mime type)
[ "Creates", "a", "mime", "message", "for", "an", "html", "emails", "with", "the", "following", "structure", ":", "mime", "/", "mixed", "-", "mime", "/", "alternative", "-", "text", "/", "plain", "-", "mime", "/", "related", "-", "text", "/", "html", "-"...
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/email/src/main/java/com/meltmedia/cadmium/email/HtmlTextEmail.java#L98-L153
real-logic/agrona
agrona/src/main/java/org/agrona/collections/BiInt2ObjectMap.java
BiInt2ObjectMap.get
@SuppressWarnings("unchecked") public V get(final int keyPartA, final int keyPartB) { """ Retrieve a value from the map. @param keyPartA for the key @param keyPartB for the key @return value matching the key if found or null if not found. """ final long key = compoundKey(keyPartA, keyPartB); ...
java
@SuppressWarnings("unchecked") public V get(final int keyPartA, final int keyPartB) { final long key = compoundKey(keyPartA, keyPartB); final int mask = values.length - 1; int index = Hashing.hash(key, mask); Object value; while (null != (value = values[index])) ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "V", "get", "(", "final", "int", "keyPartA", ",", "final", "int", "keyPartB", ")", "{", "final", "long", "key", "=", "compoundKey", "(", "keyPartA", ",", "keyPartB", ")", ";", "final", "int", ...
Retrieve a value from the map. @param keyPartA for the key @param keyPartB for the key @return value matching the key if found or null if not found.
[ "Retrieve", "a", "value", "from", "the", "map", "." ]
train
https://github.com/real-logic/agrona/blob/d1ea76e6e3598cd6a0d34879687652ef123f639b/agrona/src/main/java/org/agrona/collections/BiInt2ObjectMap.java#L206-L225
op4j/op4j
src/main/java/org/op4j/functions/FnString.java
FnString.toLong
public static final Function<String,Long> toLong(final RoundingMode roundingMode, final DecimalPoint decimalPoint) { """ <p> Converts a String into a Long, using the specified decimal point configuration ({@link DecimalPoint}). Rounding mode is used for removing the decimal part of the number. The target String...
java
public static final Function<String,Long> toLong(final RoundingMode roundingMode, final DecimalPoint decimalPoint) { return new ToLong(roundingMode, decimalPoint); }
[ "public", "static", "final", "Function", "<", "String", ",", "Long", ">", "toLong", "(", "final", "RoundingMode", "roundingMode", ",", "final", "DecimalPoint", "decimalPoint", ")", "{", "return", "new", "ToLong", "(", "roundingMode", ",", "decimalPoint", ")", ...
<p> Converts a String into a Long, using the specified decimal point configuration ({@link DecimalPoint}). Rounding mode is used for removing the decimal part of the number. The target String should contain no thousand separators. The integer part of the input string must be between {@link Long#MIN_VALUE} and {@link Lo...
[ "<p", ">", "Converts", "a", "String", "into", "a", "Long", "using", "the", "specified", "decimal", "point", "configuration", "(", "{", "@link", "DecimalPoint", "}", ")", ".", "Rounding", "mode", "is", "used", "for", "removing", "the", "decimal", "part", "o...
train
https://github.com/op4j/op4j/blob/b577596dfe462089d3dd169666defc6de7ad289a/src/main/java/org/op4j/functions/FnString.java#L789-L791
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java
ZipUtil.zip
public static File zip(String srcPath, Charset charset) throws UtilException { """ 打包到当前目录 @param srcPath 源文件路径 @param charset 编码 @return 打包好的压缩文件 @throws UtilException IO异常 """ return zip(FileUtil.file(srcPath), charset); }
java
public static File zip(String srcPath, Charset charset) throws UtilException { return zip(FileUtil.file(srcPath), charset); }
[ "public", "static", "File", "zip", "(", "String", "srcPath", ",", "Charset", "charset", ")", "throws", "UtilException", "{", "return", "zip", "(", "FileUtil", ".", "file", "(", "srcPath", ")", ",", "charset", ")", ";", "}" ]
打包到当前目录 @param srcPath 源文件路径 @param charset 编码 @return 打包好的压缩文件 @throws UtilException IO异常
[ "打包到当前目录" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java#L60-L62
grails/grails-core
grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java
GroovyPagesUriSupport.getViewURI
public String getViewURI(GroovyObject controller, String viewName) { """ Obtains a view URI of the given controller and view name @param controller The name of the controller @param viewName The name of the view @return The view URI """ return getViewURI(getLogicalControllerName(controller), viewNam...
java
public String getViewURI(GroovyObject controller, String viewName) { return getViewURI(getLogicalControllerName(controller), viewName); }
[ "public", "String", "getViewURI", "(", "GroovyObject", "controller", ",", "String", "viewName", ")", "{", "return", "getViewURI", "(", "getLogicalControllerName", "(", "controller", ")", ",", "viewName", ")", ";", "}" ]
Obtains a view URI of the given controller and view name @param controller The name of the controller @param viewName The name of the view @return The view URI
[ "Obtains", "a", "view", "URI", "of", "the", "given", "controller", "and", "view", "name" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-web-common/src/main/groovy/org/grails/web/pages/GroovyPagesUriSupport.java#L69-L71
Trilarion/java-vorbis-support
src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/CodeBook.java
CodeBook.besterror
int besterror(float[] a, int step, int addmul) { """ returns the entry number and *modifies a* to the remainder value """ int best = best(a, step); switch (addmul) { case 0: for (int i = 0, o = 0; i < dim; i++, o += step) { a[o] -= valuelist[best ...
java
int besterror(float[] a, int step, int addmul) { int best = best(a, step); switch (addmul) { case 0: for (int i = 0, o = 0; i < dim; i++, o += step) { a[o] -= valuelist[best * dim + i]; } break; case 1: ...
[ "int", "besterror", "(", "float", "[", "]", "a", ",", "int", "step", ",", "int", "addmul", ")", "{", "int", "best", "=", "best", "(", "a", ",", "step", ")", ";", "switch", "(", "addmul", ")", "{", "case", "0", ":", "for", "(", "int", "i", "="...
returns the entry number and *modifies a* to the remainder value
[ "returns", "the", "entry", "number", "and", "*", "modifies", "a", "*", "to", "the", "remainder", "value" ]
train
https://github.com/Trilarion/java-vorbis-support/blob/f72aba7d97167fe0ff20b1b719fdb5bb662ff736/src/main/java/com/github/trilarion/sound/vorbis/jcraft/jorbis/CodeBook.java#L284-L304
ravendb/ravendb-jvm-client
src/main/java/net/ravendb/client/documents/identity/GenerateEntityIdOnTheClient.java
GenerateEntityIdOnTheClient.trySetIdentity
public void trySetIdentity(Object entity, String id) { """ Tries to set the identity property @param entity Entity @param id Id to set """ Class<?> entityType = entity.getClass(); Field identityProperty = _conventions.getIdentityProperty(entityType); if (identityProperty == null) { ...
java
public void trySetIdentity(Object entity, String id) { Class<?> entityType = entity.getClass(); Field identityProperty = _conventions.getIdentityProperty(entityType); if (identityProperty == null) { return; } setPropertyOrField(identityProperty.getType(), entity, id...
[ "public", "void", "trySetIdentity", "(", "Object", "entity", ",", "String", "id", ")", "{", "Class", "<", "?", ">", "entityType", "=", "entity", ".", "getClass", "(", ")", ";", "Field", "identityProperty", "=", "_conventions", ".", "getIdentityProperty", "("...
Tries to set the identity property @param entity Entity @param id Id to set
[ "Tries", "to", "set", "the", "identity", "property" ]
train
https://github.com/ravendb/ravendb-jvm-client/blob/5a45727de507b541d1571e79ddd97c7d88bee787/src/main/java/net/ravendb/client/documents/identity/GenerateEntityIdOnTheClient.java#L81-L90
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
StatementManager.getSelectByPKStatement
public PreparedStatement getSelectByPKStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException { """ return a prepared Select Statement for the given ClassDescriptor """ try { return cds.getStatementsForClass(m_conMan).getSelectByPKStmt(m_co...
java
public PreparedStatement getSelectByPKStatement(ClassDescriptor cds) throws PersistenceBrokerSQLException, PersistenceBrokerException { try { return cds.getStatementsForClass(m_conMan).getSelectByPKStmt(m_conMan.getConnection()); } catch (SQLException e) { ...
[ "public", "PreparedStatement", "getSelectByPKStatement", "(", "ClassDescriptor", "cds", ")", "throws", "PersistenceBrokerSQLException", ",", "PersistenceBrokerException", "{", "try", "{", "return", "cds", ".", "getStatementsForClass", "(", "m_conMan", ")", ".", "getSelect...
return a prepared Select Statement for the given ClassDescriptor
[ "return", "a", "prepared", "Select", "Statement", "for", "the", "given", "ClassDescriptor" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java#L620-L634
stripe/stripe-android
stripe/src/main/java/com/stripe/android/model/StripeJsonUtils.java
StripeJsonUtils.stringHashToJsonObject
@Nullable static JSONObject stringHashToJsonObject(@Nullable Map<String, String> stringStringMap) { """ Converts a String-String {@link Map} into a {@link JSONObject}. @param stringStringMap the input map @return a {@link JSONObject} with the same key-value pairings """ if (stringStringMap == n...
java
@Nullable static JSONObject stringHashToJsonObject(@Nullable Map<String, String> stringStringMap) { if (stringStringMap == null) { return null; } JSONObject jsonObject = new JSONObject(); for (String key : stringStringMap.keySet()) { try { jso...
[ "@", "Nullable", "static", "JSONObject", "stringHashToJsonObject", "(", "@", "Nullable", "Map", "<", "String", ",", "String", ">", "stringStringMap", ")", "{", "if", "(", "stringStringMap", "==", "null", ")", "{", "return", "null", ";", "}", "JSONObject", "j...
Converts a String-String {@link Map} into a {@link JSONObject}. @param stringStringMap the input map @return a {@link JSONObject} with the same key-value pairings
[ "Converts", "a", "String", "-", "String", "{", "@link", "Map", "}", "into", "a", "{", "@link", "JSONObject", "}", "." ]
train
https://github.com/stripe/stripe-android/blob/0f199255f3769a3b84583fe3ace47bfae8c3b1c8/stripe/src/main/java/com/stripe/android/model/StripeJsonUtils.java#L337-L352
beangle/beangle3
ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java
BeanDefinitionParser.parseReplacedMethodSubElements
public void parseReplacedMethodSubElements(Element beanEle, MethodOverrides overrides) { """ Parse replaced-method sub-elements of the given bean element. @param beanEle a {@link org.w3c.dom.Element} object. @param overrides a {@link org.springframework.beans.factory.support.MethodOverrides} object. """ ...
java
public void parseReplacedMethodSubElements(Element beanEle, MethodOverrides overrides) { NodeList nl = beanEle.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element && nodeNameEquals(node, REPLACED_METHOD_ELEMENT)) { Element replacedM...
[ "public", "void", "parseReplacedMethodSubElements", "(", "Element", "beanEle", ",", "MethodOverrides", "overrides", ")", "{", "NodeList", "nl", "=", "beanEle", ".", "getChildNodes", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "nl", ".",...
Parse replaced-method sub-elements of the given bean element. @param beanEle a {@link org.w3c.dom.Element} object. @param overrides a {@link org.springframework.beans.factory.support.MethodOverrides} object.
[ "Parse", "replaced", "-", "method", "sub", "-", "elements", "of", "the", "given", "bean", "element", "." ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/ioc/spring/src/main/java/org/beangle/inject/spring/config/BeanDefinitionParser.java#L443-L461
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java
FastAdapter.notifyAdapterItemMoved
public void notifyAdapterItemMoved(int fromPosition, int toPosition) { """ wraps notifyItemMoved @param fromPosition the global fromPosition @param toPosition the global toPosition """ // handle our extensions for (IAdapterExtension<Item> ext : mExtensions.values()) { ext.noti...
java
public void notifyAdapterItemMoved(int fromPosition, int toPosition) { // handle our extensions for (IAdapterExtension<Item> ext : mExtensions.values()) { ext.notifyAdapterItemMoved(fromPosition, toPosition); } notifyItemMoved(fromPosition, toPosition); }
[ "public", "void", "notifyAdapterItemMoved", "(", "int", "fromPosition", ",", "int", "toPosition", ")", "{", "// handle our extensions", "for", "(", "IAdapterExtension", "<", "Item", ">", "ext", ":", "mExtensions", ".", "values", "(", ")", ")", "{", "ext", ".",...
wraps notifyItemMoved @param fromPosition the global fromPosition @param toPosition the global toPosition
[ "wraps", "notifyItemMoved" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/FastAdapter.java#L1319-L1325
Axway/Grapes
utils/src/main/java/org/axway/grapes/utils/client/GrapesClient.java
GrapesClient.postModule
public void postModule(final Module module, final String user, final String password) throws GrapesCommunicationException, AuthenticationException { """ Post a module to the server @param module @param user @param password @throws GrapesCommunicationException @throws javax.naming.AuthenticationException ...
java
public void postModule(final Module module, final String user, final String password) throws GrapesCommunicationException, AuthenticationException { final Client client = getClient(user, password); final WebResource resource = client.resource(serverURL).path(RequestUtils.moduleResourcePath()); f...
[ "public", "void", "postModule", "(", "final", "Module", "module", ",", "final", "String", "user", ",", "final", "String", "password", ")", "throws", "GrapesCommunicationException", ",", "AuthenticationException", "{", "final", "Client", "client", "=", "getClient", ...
Post a module to the server @param module @param user @param password @throws GrapesCommunicationException @throws javax.naming.AuthenticationException
[ "Post", "a", "module", "to", "the", "server" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/utils/src/main/java/org/axway/grapes/utils/client/GrapesClient.java#L178-L191
paypal/SeLion
client/src/main/java/com/paypal/selion/platform/html/Table.java
Table.getValueFromCell
public String getValueFromCell(int row, int column) { """ Finds value of a cell in a table indicated by row and column indices. <br/> <br/> @param row int number of row for cell @param column int number of column for cell @return String value of cell with row and column. Null if cannot be found. """ ...
java
public String getValueFromCell(int row, int column) { if (row < 1 || column < 1) { throw new IllegalArgumentException("Row and column must start from 1"); } List<WebElement> elements = HtmlElementUtils.locateElements(getXPathBase() + "tr"); List<WebElement> cells = elements.g...
[ "public", "String", "getValueFromCell", "(", "int", "row", ",", "int", "column", ")", "{", "if", "(", "row", "<", "1", "||", "column", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Row and column must start from 1\"", ")", ";", "}",...
Finds value of a cell in a table indicated by row and column indices. <br/> <br/> @param row int number of row for cell @param column int number of column for cell @return String value of cell with row and column. Null if cannot be found.
[ "Finds", "value", "of", "a", "cell", "in", "a", "table", "indicated", "by", "row", "and", "column", "indices", ".", "<br", "/", ">", "<br", "/", ">" ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/Table.java#L217-L229
tempodb/tempodb-java
src/main/java/com/tempodb/Client.java
Client.deleteSeries
public Result<DeleteSummary> deleteSeries(Filter filter) { """ Deletes set of series by a filter. @param filter The series filter @see Filter @return A DeleteSummary providing information about the series deleted. @see DeleteSummary @see Filter @since 1.0.0 """ URI uri = null; try { URIB...
java
public Result<DeleteSummary> deleteSeries(Filter filter) { URI uri = null; try { URIBuilder builder = new URIBuilder(String.format("/%s/series/", API_VERSION)); addFilterToURI(builder, filter); uri = builder.build(); } catch (URISyntaxException e) { String message = String.format("Co...
[ "public", "Result", "<", "DeleteSummary", ">", "deleteSeries", "(", "Filter", "filter", ")", "{", "URI", "uri", "=", "null", ";", "try", "{", "URIBuilder", "builder", "=", "new", "URIBuilder", "(", "String", ".", "format", "(", "\"/%s/series/\"", ",", "API...
Deletes set of series by a filter. @param filter The series filter @see Filter @return A DeleteSummary providing information about the series deleted. @see DeleteSummary @see Filter @since 1.0.0
[ "Deletes", "set", "of", "series", "by", "a", "filter", "." ]
train
https://github.com/tempodb/tempodb-java/blob/5733f204fe4c8dda48916ba1f67cf44f5a3f9c69/src/main/java/com/tempodb/Client.java#L248-L262
kaazing/gateway
mina.core/core/src/main/java/org/apache/mina/util/CopyOnWriteMap.java
CopyOnWriteMap.putAll
public void putAll(Map<? extends K, ? extends V> newData) { """ Inserts all the keys and values contained in the provided map to this map. @see java.util.Map#putAll(java.util.Map) """ synchronized (this) { Map<K, V> newMap = new HashMap<>(internalMap); newMap.putAll(newData)...
java
public void putAll(Map<? extends K, ? extends V> newData) { synchronized (this) { Map<K, V> newMap = new HashMap<>(internalMap); newMap.putAll(newData); internalMap = newMap; } }
[ "public", "void", "putAll", "(", "Map", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "newData", ")", "{", "synchronized", "(", "this", ")", "{", "Map", "<", "K", ",", "V", ">", "newMap", "=", "new", "HashMap", "<>", "(", "internalMap", ...
Inserts all the keys and values contained in the provided map to this map. @see java.util.Map#putAll(java.util.Map)
[ "Inserts", "all", "the", "keys", "and", "values", "contained", "in", "the", "provided", "map", "to", "this", "map", "." ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/mina.core/core/src/main/java/org/apache/mina/util/CopyOnWriteMap.java#L103-L109
Stratio/deep-spark
deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CellValidator.java
CellValidator.cellValidator
public static <T> CellValidator cellValidator(T obj) { """ Generates a CellValidator for a generic instance of an object. We need the actual instance in order to differentiate between an UUID and a TimeUUID. @param obj an instance to use to build the new CellValidator. @param <T> the generic type of the provi...
java
public static <T> CellValidator cellValidator(T obj) { if (obj == null) { return null; } Kind kind = Kind.objectToKind(obj); AbstractType<?> tAbstractType = CassandraUtils.marshallerInstance(obj); String validatorClassName = tAbstractType.getClass().getCanonicalName(...
[ "public", "static", "<", "T", ">", "CellValidator", "cellValidator", "(", "T", "obj", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "return", "null", ";", "}", "Kind", "kind", "=", "Kind", ".", "objectToKind", "(", "obj", ")", ";", "AbstractTyp...
Generates a CellValidator for a generic instance of an object. We need the actual instance in order to differentiate between an UUID and a TimeUUID. @param obj an instance to use to build the new CellValidator. @param <T> the generic type of the provided object instance. @return a new CellValidator associated to the p...
[ "Generates", "a", "CellValidator", "for", "a", "generic", "instance", "of", "an", "object", ".", "We", "need", "the", "actual", "instance", "in", "order", "to", "differentiate", "between", "an", "UUID", "and", "a", "TimeUUID", "." ]
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CellValidator.java#L247-L259
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/ErrorHandling.java
ErrorHandling.reportErrors
public void reportErrors(Writer writer, String tagName) throws JspException { """ This method will write out the <code>String</code> returned by <code>getErrorsReport</code> to the response output stream. @throws JspException if <code>write</code> throws an exception. @see #getErrorsReport """ ...
java
public void reportErrors(Writer writer, String tagName) throws JspException { try { writer.write(getErrorsReport(tagName)); } catch (IOException e) { JspException jspException = new JspException(e.getMessage(), e); // todo: future cleanup ...
[ "public", "void", "reportErrors", "(", "Writer", "writer", ",", "String", "tagName", ")", "throws", "JspException", "{", "try", "{", "writer", ".", "write", "(", "getErrorsReport", "(", "tagName", ")", ")", ";", "}", "catch", "(", "IOException", "e", ")", ...
This method will write out the <code>String</code> returned by <code>getErrorsReport</code> to the response output stream. @throws JspException if <code>write</code> throws an exception. @see #getErrorsReport
[ "This", "method", "will", "write", "out", "the", "<code", ">", "String<", "/", "code", ">", "returned", "by", "<code", ">", "getErrorsReport<", "/", "code", ">", "to", "the", "response", "output", "stream", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/ErrorHandling.java#L144-L161
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/File.java
File.setAttribute
public final synchronized void setAttribute(String view, String attribute, Object value) { """ Sets the given attribute in the given view to the given value. """ if (attributes == null) { attributes = HashBasedTable.create(); } attributes.put(view, attribute, value); }
java
public final synchronized void setAttribute(String view, String attribute, Object value) { if (attributes == null) { attributes = HashBasedTable.create(); } attributes.put(view, attribute, value); }
[ "public", "final", "synchronized", "void", "setAttribute", "(", "String", "view", ",", "String", "attribute", ",", "Object", "value", ")", "{", "if", "(", "attributes", "==", "null", ")", "{", "attributes", "=", "HashBasedTable", ".", "create", "(", ")", "...
Sets the given attribute in the given view to the given value.
[ "Sets", "the", "given", "attribute", "in", "the", "given", "view", "to", "the", "given", "value", "." ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/File.java#L235-L240
zk1931/jzab
src/main/java/com/github/zk1931/jzab/RollingLog.java
RollingLog.firstDivergingPoint
@Override public DivergingTuple firstDivergingPoint(Zxid zxid) throws IOException { """ See {@link Log#firstDivergingPoint}. @param zxid the id of the transaction. @return a tuple holds first diverging zxid and an iterator points to subsequent transactions. @throws IOException in case of IO failures ""...
java
@Override public DivergingTuple firstDivergingPoint(Zxid zxid) throws IOException { int idx = getFileIdx(zxid); if (idx == -1) { Log.LogIterator iter = new RollingLogIterator(Zxid.ZXID_NOT_EXIST); return new DivergingTuple(iter, Zxid.ZXID_NOT_EXIST); } Zxid firstZxid = getZxidFromFileName(...
[ "@", "Override", "public", "DivergingTuple", "firstDivergingPoint", "(", "Zxid", "zxid", ")", "throws", "IOException", "{", "int", "idx", "=", "getFileIdx", "(", "zxid", ")", ";", "if", "(", "idx", "==", "-", "1", ")", "{", "Log", ".", "LogIterator", "it...
See {@link Log#firstDivergingPoint}. @param zxid the id of the transaction. @return a tuple holds first diverging zxid and an iterator points to subsequent transactions. @throws IOException in case of IO failures
[ "See", "{", "@link", "Log#firstDivergingPoint", "}", "." ]
train
https://github.com/zk1931/jzab/blob/2a8893bcc1a125f3aebdaddee80ad49c9761bba1/src/main/java/com/github/zk1931/jzab/RollingLog.java#L191-L213
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/TokenFelligiSunter.java
TokenFelligiSunter.prepare
public StringWrapper prepare(String s) { """ Preprocess a string by finding tokens and giving them appropriate weights """ BagOfTokens bag = new BagOfTokens(s, tokenizer.tokenize(s)); // reweight by -log( freq/collectionSize ) double normalizer = 0.0; for (Iterator i=bag.tokenIterator(); i.hasNext(); )...
java
public StringWrapper prepare(String s) { BagOfTokens bag = new BagOfTokens(s, tokenizer.tokenize(s)); // reweight by -log( freq/collectionSize ) double normalizer = 0.0; for (Iterator i=bag.tokenIterator(); i.hasNext(); ) { Token tok = (Token)i.next(); if (collectionSize>0) { Integer dfInteger = (Inte...
[ "public", "StringWrapper", "prepare", "(", "String", "s", ")", "{", "BagOfTokens", "bag", "=", "new", "BagOfTokens", "(", "s", ",", "tokenizer", ".", "tokenize", "(", "s", ")", ")", ";", "// reweight by -log( freq/collectionSize )", "double", "normalizer", "=", ...
Preprocess a string by finding tokens and giving them appropriate weights
[ "Preprocess", "a", "string", "by", "finding", "tokens", "and", "giving", "them", "appropriate", "weights" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/TokenFelligiSunter.java#L52-L69
twitter/hraven
hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java
JobHistoryService.getFlowByJobID
public Flow getFlowByJobID(String cluster, String jobId, boolean populateTasks) throws IOException { """ Returns the {@link Flow} instance containing the given job ID. @param cluster the cluster identifier @param jobId the job identifier @return """ Flow flow = null; JobKey key = idService.g...
java
public Flow getFlowByJobID(String cluster, String jobId, boolean populateTasks) throws IOException { Flow flow = null; JobKey key = idService.getJobKeyById(new QualifiedJobId(cluster, jobId)); if (key != null) { byte[] startRow = ByteUtil.join(Constants.SEP_BYTES, Bytes.toBytes(key.get...
[ "public", "Flow", "getFlowByJobID", "(", "String", "cluster", ",", "String", "jobId", ",", "boolean", "populateTasks", ")", "throws", "IOException", "{", "Flow", "flow", "=", "null", ";", "JobKey", "key", "=", "idService", ".", "getJobKeyById", "(", "new", "...
Returns the {@link Flow} instance containing the given job ID. @param cluster the cluster identifier @param jobId the job identifier @return
[ "Returns", "the", "{", "@link", "Flow", "}", "instance", "containing", "the", "given", "job", "ID", "." ]
train
https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/datasource/JobHistoryService.java#L192-L216
lessthanoptimal/ejml
main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java
CommonOps_DSCC.changeSign
public static void changeSign(DMatrixSparseCSC A , DMatrixSparseCSC B ) { """ B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance. @param A (Input) Matrix. Not modified. @param B (Output) Matrix. Modified. """ if( A != B ) { B.copyStructure(A...
java
public static void changeSign(DMatrixSparseCSC A , DMatrixSparseCSC B ) { if( A != B ) { B.copyStructure(A); } for (int i = 0; i < A.nz_length; i++) { B.nz_values[i] = -A.nz_values[i]; } }
[ "public", "static", "void", "changeSign", "(", "DMatrixSparseCSC", "A", ",", "DMatrixSparseCSC", "B", ")", "{", "if", "(", "A", "!=", "B", ")", "{", "B", ".", "copyStructure", "(", "A", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "...
B = -A. Changes the sign of elements in A and stores it in B. A and B can be the same instance. @param A (Input) Matrix. Not modified. @param B (Output) Matrix. Modified.
[ "B", "=", "-", "A", ".", "Changes", "the", "sign", "of", "elements", "in", "A", "and", "stores", "it", "in", "B", ".", "A", "and", "B", "can", "be", "the", "same", "instance", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-dsparse/src/org/ejml/sparse/csc/CommonOps_DSCC.java#L442-L450
googleapis/google-cloud-java
google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java
KeyManagementServiceClient.asymmetricSign
public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Digest digest) { """ Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_SIGN, producing a signature that can be verified with the publi...
java
public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Digest digest) { AsymmetricSignRequest request = AsymmetricSignRequest.newBuilder() .setName(name == null ? null : name.toString()) .setDigest(digest) .build(); return asymmetricSign(reques...
[ "public", "final", "AsymmetricSignResponse", "asymmetricSign", "(", "CryptoKeyVersionName", "name", ",", "Digest", "digest", ")", "{", "AsymmetricSignRequest", "request", "=", "AsymmetricSignRequest", ".", "newBuilder", "(", ")", ".", "setName", "(", "name", "==", "...
Signs data using a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] ASYMMETRIC_SIGN, producing a signature that can be verified with the public key retrieved from [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]. <p>Sample cod...
[ "Signs", "data", "using", "a", "[", "CryptoKeyVersion", "]", "[", "google", ".", "cloud", ".", "kms", ".", "v1", ".", "CryptoKeyVersion", "]", "with", "[", "CryptoKey", ".", "purpose", "]", "[", "google", ".", "cloud", ".", "kms", ".", "v1", ".", "Cr...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java#L2379-L2387
apache/groovy
src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java
DefaultGroovyMethods.findResult
public static <T, U> T findResult(Iterable<U> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<T> condition) { """ Iterates through the Iterable calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all results are null,...
java
public static <T, U> T findResult(Iterable<U> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure<T> condition) { return findResult(self.iterator(), condition); }
[ "public", "static", "<", "T", ",", "U", ">", "T", "findResult", "(", "Iterable", "<", "U", ">", "self", ",", "@", "ClosureParams", "(", "FirstParam", ".", "FirstGenericType", ".", "class", ")", "Closure", "<", "T", ">", "condition", ")", "{", "return",...
Iterates through the Iterable calling the given closure condition for each item but stopping once the first non-null result is found and returning that result. If all results are null, null is returned. @param self an Iterable @param condition a closure that returns a non-null value to indicate that processing sh...
[ "Iterates", "through", "the", "Iterable", "calling", "the", "given", "closure", "condition", "for", "each", "item", "but", "stopping", "once", "the", "first", "non", "-", "null", "result", "is", "found", "and", "returning", "that", "result", ".", "If", "all"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java#L4547-L4549
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/AbstractPrintQuery.java
AbstractPrintQuery.addMsgPhrase
public AbstractPrintQuery addMsgPhrase(final SelectBuilder _selectBldr, final UUID... _msgPhrase) throws EFapsException { """ Adds the msg phrase. @param _selectBldr the select bldr @param _msgPhrase the msg phrase @return the abstract print query @throws EF...
java
public AbstractPrintQuery addMsgPhrase(final SelectBuilder _selectBldr, final UUID... _msgPhrase) throws EFapsException { final List<MsgPhrase> msgphrases = new ArrayList<>(); for (final UUID phraseUUID : _msgPhrase) { msgphrases.add(Msg...
[ "public", "AbstractPrintQuery", "addMsgPhrase", "(", "final", "SelectBuilder", "_selectBldr", ",", "final", "UUID", "...", "_msgPhrase", ")", "throws", "EFapsException", "{", "final", "List", "<", "MsgPhrase", ">", "msgphrases", "=", "new", "ArrayList", "<>", "(",...
Adds the msg phrase. @param _selectBldr the select bldr @param _msgPhrase the msg phrase @return the abstract print query @throws EFapsException on error
[ "Adds", "the", "msg", "phrase", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L546-L555
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/link/WaveHandlerBase.java
WaveHandlerBase.performHandle
private void performHandle(final Wave wave, final Method method) throws WaveException { """ Perform the handle independently of thread used. @param wave the wave to manage @param method the handler method to call, could be null @throws WaveException if an error occurred while processing the wave """ ...
java
private void performHandle(final Wave wave, final Method method) throws WaveException { // Build parameter list of the searched method final List<Object> parameterValues = new ArrayList<>(); // Don't add WaveType parameters if we us the default processWave method if (!AbstractComponent...
[ "private", "void", "performHandle", "(", "final", "Wave", "wave", ",", "final", "Method", "method", ")", "throws", "WaveException", "{", "// Build parameter list of the searched method", "final", "List", "<", "Object", ">", "parameterValues", "=", "new", "ArrayList", ...
Perform the handle independently of thread used. @param wave the wave to manage @param method the handler method to call, could be null @throws WaveException if an error occurred while processing the wave
[ "Perform", "the", "handle", "independently", "of", "thread", "used", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/link/WaveHandlerBase.java#L192-L220
opendatatrentino/smatch-webapi-client
src/main/java/it/unitn/disi/smatch/webapi/client/methods/MatchMethods.java
MatchMethods.generateJSONRequest
public JSONObject generateJSONRequest(String sourceName, List<String> sourceNodes, String targetName, List<String> targetNodes) throws JSONException { """ Generates JSON request from input parameters @param sourceName - The name of the root node in the source tree @param sourceNodes - Names of the ...
java
public JSONObject generateJSONRequest(String sourceName, List<String> sourceNodes, String targetName, List<String> targetNodes) throws JSONException { Context sourceContext = new Context("SourceContext", sourceName, sourceNodes); Context targetContext = new Context("TargetContext", ...
[ "public", "JSONObject", "generateJSONRequest", "(", "String", "sourceName", ",", "List", "<", "String", ">", "sourceNodes", ",", "String", "targetName", ",", "List", "<", "String", ">", "targetNodes", ")", "throws", "JSONException", "{", "Context", "sourceContext"...
Generates JSON request from input parameters @param sourceName - The name of the root node in the source tree @param sourceNodes - Names of the source nodes under the source root node @param targetName - The name of the root node in the target tree @param targetNodes -Names of the target nodes under the target root no...
[ "Generates", "JSON", "request", "from", "input", "parameters" ]
train
https://github.com/opendatatrentino/smatch-webapi-client/blob/d74fc41ab5bdc29afafd11c9001ac25dff20f965/src/main/java/it/unitn/disi/smatch/webapi/client/methods/MatchMethods.java#L89-L110
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/shared/core/types/Color.java
Color.getHEXColorKey
@Deprecated public static final String getHEXColorKey() { """ Generates a unique RGB color key, e.g. "rgb(12,34,255)". @Deprecated This is used internally. As public API use {@link Color#getRGB()} method. Note: Replaced by {@link ColorKeyRotor#next()} method. @return String """ s_r++; ...
java
@Deprecated public static final String getHEXColorKey() { s_r++; if (s_r == 256) { s_r = 0; s_g++; if (s_g == 256) { s_g = 0; s_b++; if (s_b == 256) { ...
[ "@", "Deprecated", "public", "static", "final", "String", "getHEXColorKey", "(", ")", "{", "s_r", "++", ";", "if", "(", "s_r", "==", "256", ")", "{", "s_r", "=", "0", ";", "s_g", "++", ";", "if", "(", "s_g", "==", "256", ")", "{", "s_g", "=", "...
Generates a unique RGB color key, e.g. "rgb(12,34,255)". @Deprecated This is used internally. As public API use {@link Color#getRGB()} method. Note: Replaced by {@link ColorKeyRotor#next()} method. @return String
[ "Generates", "a", "unique", "RGB", "color", "key", "e", ".", "g", ".", "rgb", "(", "12", "34", "255", ")", "." ]
train
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/shared/core/types/Color.java#L156-L182
google/closure-compiler
src/com/google/javascript/jscomp/TypeCheck.java
TypeCheck.propertyIsImplicitCast
private static boolean propertyIsImplicitCast(ObjectType type, String prop) { """ Returns true if any type in the chain has an implicitCast annotation for the given property. """ for (; type != null; type = type.getImplicitPrototype()) { JSDocInfo docInfo = type.getOwnPropertyJSDocInfo(prop); ...
java
private static boolean propertyIsImplicitCast(ObjectType type, String prop) { for (; type != null; type = type.getImplicitPrototype()) { JSDocInfo docInfo = type.getOwnPropertyJSDocInfo(prop); if (docInfo != null && docInfo.isImplicitCast()) { return true; } } return false; }
[ "private", "static", "boolean", "propertyIsImplicitCast", "(", "ObjectType", "type", ",", "String", "prop", ")", "{", "for", "(", ";", "type", "!=", "null", ";", "type", "=", "type", ".", "getImplicitPrototype", "(", ")", ")", "{", "JSDocInfo", "docInfo", ...
Returns true if any type in the chain has an implicitCast annotation for the given property.
[ "Returns", "true", "if", "any", "type", "in", "the", "chain", "has", "an", "implicitCast", "annotation", "for", "the", "given", "property", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeCheck.java#L1493-L1501
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/session/impl/HttpSessionContextImpl.java
HttpSessionContextImpl.getSessionUserName
public String getSessionUserName(HttpServletRequest request, HttpServletResponse response) { """ /* Get the session. Look for existing session Only called this way from sessionPreInvoke as a performance optimization. Won't create session on this call either. """ HttpSession session = null; ...
java
public String getSessionUserName(HttpServletRequest request, HttpServletResponse response) { HttpSession session = null; SessionAffinityContext sac = getSessionAffinityContext(request); if (!sac.isFirstSessionIdValid() && !sac.isAllSessionIdsSetViaSet()) { //PM89885 @SuppressWa...
[ "public", "String", "getSessionUserName", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "{", "HttpSession", "session", "=", "null", ";", "SessionAffinityContext", "sac", "=", "getSessionAffinityContext", "(", "request", ")", ";", "...
/* Get the session. Look for existing session Only called this way from sessionPreInvoke as a performance optimization. Won't create session on this call either.
[ "/", "*", "Get", "the", "session", ".", "Look", "for", "existing", "session", "Only", "called", "this", "way", "from", "sessionPreInvoke", "as", "a", "performance", "optimization", ".", "Won", "t", "create", "session", "on", "this", "call", "either", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer/src/com/ibm/ws/webcontainer/session/impl/HttpSessionContextImpl.java#L669-L693
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.license_cpanel_new_duration_GET
public OvhOrder license_cpanel_new_duration_GET(String duration, String ip, OvhLicenseTypeEnum serviceType, OvhOrderableCpanelVersionEnum version) throws IOException { """ Get prices and contracts information REST: GET /order/license/cpanel/new/{duration} @param serviceType [required] # DEPRECATED # The kind o...
java
public OvhOrder license_cpanel_new_duration_GET(String duration, String ip, OvhLicenseTypeEnum serviceType, OvhOrderableCpanelVersionEnum version) throws IOException { String qPath = "/order/license/cpanel/new/{duration}"; StringBuilder sb = path(qPath, duration); query(sb, "ip", ip); query(sb, "serviceType", s...
[ "public", "OvhOrder", "license_cpanel_new_duration_GET", "(", "String", "duration", ",", "String", "ip", ",", "OvhLicenseTypeEnum", "serviceType", ",", "OvhOrderableCpanelVersionEnum", "version", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/license...
Get prices and contracts information REST: GET /order/license/cpanel/new/{duration} @param serviceType [required] # DEPRECATED # The kind of service on which this license will be used # Will not be used, keeped only for compatibility # @param ip [required] Ip on which this license would be installed @param version [re...
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1445-L1453
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java
SpecializedOps_DDRM.copyTriangle
public static DMatrixRMaj copyTriangle(DMatrixRMaj src , DMatrixRMaj dst , boolean upper ) { """ Copies just the upper or lower triangular portion of a matrix. @param src Matrix being copied. Not modified. @param dst Where just a triangle from src is copied. If null a new one will be created. Modified. @para...
java
public static DMatrixRMaj copyTriangle(DMatrixRMaj src , DMatrixRMaj dst , boolean upper ) { if( dst == null ) { dst = new DMatrixRMaj(src.numRows,src.numCols); } else if( src.numRows != dst.numRows || src.numCols != dst.numCols ) { throw new IllegalArgumentException("src and dst...
[ "public", "static", "DMatrixRMaj", "copyTriangle", "(", "DMatrixRMaj", "src", ",", "DMatrixRMaj", "dst", ",", "boolean", "upper", ")", "{", "if", "(", "dst", "==", "null", ")", "{", "dst", "=", "new", "DMatrixRMaj", "(", "src", ".", "numRows", ",", "src"...
Copies just the upper or lower triangular portion of a matrix. @param src Matrix being copied. Not modified. @param dst Where just a triangle from src is copied. If null a new one will be created. Modified. @param upper If the upper or lower triangle should be copied. @return The copied matrix.
[ "Copies", "just", "the", "upper", "or", "lower", "triangular", "portion", "of", "a", "matrix", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java#L123-L145
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java
StringConverter.byteArrayToBitString
public static String byteArrayToBitString(byte[] bytes, int bitCount) { """ Converts a byte array into a bit string @param bytes byte array @param bitCount number of bits @return hex string """ char[] s = new char[bitCount]; for (int j = 0; j < bitCount; j++) { byte b = byt...
java
public static String byteArrayToBitString(byte[] bytes, int bitCount) { char[] s = new char[bitCount]; for (int j = 0; j < bitCount; j++) { byte b = bytes[j / 8]; s[j] = BitMap.isSet(b, j % 8) ? '1' : '0'; } return new...
[ "public", "static", "String", "byteArrayToBitString", "(", "byte", "[", "]", "bytes", ",", "int", "bitCount", ")", "{", "char", "[", "]", "s", "=", "new", "char", "[", "bitCount", "]", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "bitCount...
Converts a byte array into a bit string @param bytes byte array @param bitCount number of bits @return hex string
[ "Converts", "a", "byte", "array", "into", "a", "bit", "string" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/StringConverter.java#L270-L282
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/viterbi/ViterbiBuilder.java
ViterbiBuilder.repairBrokenLatticeBefore
private void repairBrokenLatticeBefore(ViterbiLattice lattice, int index) { """ Tries to repair the lattice by creating and adding an additional Viterbi node to the LEFT of the newly inserted user dictionary entry by using the substring of the node in the lattice that overlaps the least @param lattice @param ...
java
private void repairBrokenLatticeBefore(ViterbiLattice lattice, int index) { ViterbiNode[][] nodeStartIndices = lattice.getStartIndexArr(); for (int startIndex = index; startIndex > 0; startIndex--) { if (nodeStartIndices[startIndex] != null) { ViterbiNode glueBase = findGlue...
[ "private", "void", "repairBrokenLatticeBefore", "(", "ViterbiLattice", "lattice", ",", "int", "index", ")", "{", "ViterbiNode", "[", "]", "[", "]", "nodeStartIndices", "=", "lattice", ".", "getStartIndexArr", "(", ")", ";", "for", "(", "int", "startIndex", "="...
Tries to repair the lattice by creating and adding an additional Viterbi node to the LEFT of the newly inserted user dictionary entry by using the substring of the node in the lattice that overlaps the least @param lattice @param index
[ "Tries", "to", "repair", "the", "lattice", "by", "creating", "and", "adding", "an", "additional", "Viterbi", "node", "to", "the", "LEFT", "of", "the", "newly", "inserted", "user", "dictionary", "entry", "by", "using", "the", "substring", "of", "the", "node",...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp-japanese/src/main/java/com/atilika/kuromoji/viterbi/ViterbiBuilder.java#L237-L252
operasoftware/operaprestodriver
src/com/opera/core/systems/runner/launcher/OperaLauncherProtocol.java
OperaLauncherProtocol.recvMessage
private ResponseEncapsulation recvMessage() throws IOException { """ Receive a message response. @return Response body and request status code @throws IOException if socket read error or protocol parse error """ GeneratedMessage msg = null; byte[] headers = new byte[8]; recv(headers, headers.le...
java
private ResponseEncapsulation recvMessage() throws IOException { GeneratedMessage msg = null; byte[] headers = new byte[8]; recv(headers, headers.length); if (headers[0] != 'L' || headers[1] != '1') { throw new IOException("Wrong launcher protocol header"); } ByteBuffer buf = ByteBuffer....
[ "private", "ResponseEncapsulation", "recvMessage", "(", ")", "throws", "IOException", "{", "GeneratedMessage", "msg", "=", "null", ";", "byte", "[", "]", "headers", "=", "new", "byte", "[", "8", "]", ";", "recv", "(", "headers", ",", "headers", ".", "lengt...
Receive a message response. @return Response body and request status code @throws IOException if socket read error or protocol parse error
[ "Receive", "a", "message", "response", "." ]
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/runner/launcher/OperaLauncherProtocol.java#L196-L256
rundeck/rundeck
examples/example-java-step-plugin/src/main/java/com/dtolabs/rundeck/plugin/example/ExampleStepPlugin.java
ExampleStepPlugin.executeStep
public void executeStep(final PluginStepContext context, final Map<String, Object> configuration) throws StepException { """ Here is the meat of the plugin implementation, which should perform the appropriate logi...
java
public void executeStep(final PluginStepContext context, final Map<String, Object> configuration) throws StepException{ System.out.println("Example step executing on nodes: " + context.getNodes().getNodeNames()...
[ "public", "void", "executeStep", "(", "final", "PluginStepContext", "context", ",", "final", "Map", "<", "String", ",", "Object", ">", "configuration", ")", "throws", "StepException", "{", "System", ".", "out", ".", "println", "(", "\"Example step executing on nod...
Here is the meat of the plugin implementation, which should perform the appropriate logic for your plugin. <p/> The {@link PluginStepContext} provides access to the appropriate Nodes, the configuration of the plugin, and details about the step number and context.
[ "Here", "is", "the", "meat", "of", "the", "plugin", "implementation", "which", "should", "perform", "the", "appropriate", "logic", "for", "your", "plugin", ".", "<p", "/", ">", "The", "{" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/examples/example-java-step-plugin/src/main/java/com/dtolabs/rundeck/plugin/example/ExampleStepPlugin.java#L139-L148
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/PageServiceImpl.java
PageServiceImpl.compareAndSetLeaf
boolean compareAndSetLeaf(Page oldPage, Page page) { """ Updates the leaf to a new page. Called only from TableService. """ if (oldPage == page) { return true; } int pid = (int) page.getId(); updateTailPid(pid); if (oldPage instanceof PageLeafImpl && page instanceof Pa...
java
boolean compareAndSetLeaf(Page oldPage, Page page) { if (oldPage == page) { return true; } int pid = (int) page.getId(); updateTailPid(pid); if (oldPage instanceof PageLeafImpl && page instanceof PageLeafImpl) { PageLeafImpl oldLeaf = (PageLeafImpl) oldPage; PageLe...
[ "boolean", "compareAndSetLeaf", "(", "Page", "oldPage", ",", "Page", "page", ")", "{", "if", "(", "oldPage", "==", "page", ")", "{", "return", "true", ";", "}", "int", "pid", "=", "(", "int", ")", "page", ".", "getId", "(", ")", ";", "updateTailPid",...
Updates the leaf to a new page. Called only from TableService.
[ "Updates", "the", "leaf", "to", "a", "new", "page", ".", "Called", "only", "from", "TableService", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/PageServiceImpl.java#L970-L997
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java
Utility.fromHex
public static String fromHex(String string, int minLength, String separator) { """ Parse a list of hex numbers and return a string @param string String of hex numbers. @param minLength Minimal length. @param separator Separator. @return A string from hex numbers. """ return fromHex(string, minLengt...
java
public static String fromHex(String string, int minLength, String separator) { return fromHex(string, minLength, Pattern.compile(separator != null ? separator : "\\s+")); }
[ "public", "static", "String", "fromHex", "(", "String", "string", ",", "int", "minLength", ",", "String", "separator", ")", "{", "return", "fromHex", "(", "string", ",", "minLength", ",", "Pattern", ".", "compile", "(", "separator", "!=", "null", "?", "sep...
Parse a list of hex numbers and return a string @param string String of hex numbers. @param minLength Minimal length. @param separator Separator. @return A string from hex numbers.
[ "Parse", "a", "list", "of", "hex", "numbers", "and", "return", "a", "string" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1791-L1793
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/ExpressionToken.java
ExpressionToken.beanLookup
protected final Object beanLookup(Object value, Object propertyName) { """ Get a JavaBean property from the given <code>value</code> @param value the JavaBean @param propertyName the property name @return the value of the property from the object <code>value</code> """ LOGGER.trace("get JavaBean pro...
java
protected final Object beanLookup(Object value, Object propertyName) { LOGGER.trace("get JavaBean property : " + propertyName); return ParseUtils.getProperty(value, propertyName.toString(), PROPERTY_CACHE); }
[ "protected", "final", "Object", "beanLookup", "(", "Object", "value", ",", "Object", "propertyName", ")", "{", "LOGGER", ".", "trace", "(", "\"get JavaBean property : \"", "+", "propertyName", ")", ";", "return", "ParseUtils", ".", "getProperty", "(", "value", "...
Get a JavaBean property from the given <code>value</code> @param value the JavaBean @param propertyName the property name @return the value of the property from the object <code>value</code>
[ "Get", "a", "JavaBean", "property", "from", "the", "given", "<code", ">", "value<", "/", "code", ">" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/script/el/tokens/ExpressionToken.java#L61-L64
xmlet/XsdAsmFaster
src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmUtils.java
XsdAsmUtils.getInterfaceSignature
static String getInterfaceSignature(String[] interfaces, String apiName) { """ Obtains the interface signature for a interface. @param interfaces The extended interfaces. @param apiName The name of the generated fluent interface. @return The interface signature. """ StringBuilder signature = new Str...
java
static String getInterfaceSignature(String[] interfaces, String apiName) { StringBuilder signature = new StringBuilder("<T::L" + XsdSupportingStructure.elementType + "<TT;TZ;>;Z::" + XsdSupportingStructure.elementTypeDesc + ">" + JAVA_OBJECT_DESC); if (interfaces != null){ for (String anInt...
[ "static", "String", "getInterfaceSignature", "(", "String", "[", "]", "interfaces", ",", "String", "apiName", ")", "{", "StringBuilder", "signature", "=", "new", "StringBuilder", "(", "\"<T::L\"", "+", "XsdSupportingStructure", ".", "elementType", "+", "\"<TT;TZ;>;Z...
Obtains the interface signature for a interface. @param interfaces The extended interfaces. @param apiName The name of the generated fluent interface. @return The interface signature.
[ "Obtains", "the", "interface", "signature", "for", "a", "interface", "." ]
train
https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmUtils.java#L492-L504