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
PistoiaHELM/HELM2NotationToolkit
src/main/java/org/helm/notation2/tools/HELM1Utils.java
HELM1Utils.setCanonicalHELMSecondSection
private static String setCanonicalHELMSecondSection(Map<String, String> convertsortedIdstoIds, List<ConnectionNotation> connectionNotations) throws HELM1ConverterException { """ method to generate a canonical HELM 1 connection section @param convertsortedIdstoIds Map of old ids with the equivalent new ids @ret...
java
private static String setCanonicalHELMSecondSection(Map<String, String> convertsortedIdstoIds, List<ConnectionNotation> connectionNotations) throws HELM1ConverterException { StringBuilder notation = new StringBuilder(); for (ConnectionNotation connectionNotation : connectionNotations) { /* canonicalize...
[ "private", "static", "String", "setCanonicalHELMSecondSection", "(", "Map", "<", "String", ",", "String", ">", "convertsortedIdstoIds", ",", "List", "<", "ConnectionNotation", ">", "connectionNotations", ")", "throws", "HELM1ConverterException", "{", "StringBuilder", "n...
method to generate a canonical HELM 1 connection section @param convertsortedIdstoIds Map of old ids with the equivalent new ids @return second section of HELM @throws HELM1ConverterException
[ "method", "to", "generate", "a", "canonical", "HELM", "1", "connection", "section" ]
train
https://github.com/PistoiaHELM/HELM2NotationToolkit/blob/ac5bb01fd5b4082134a8ef226bbe2ff0f60fcd38/src/main/java/org/helm/notation2/tools/HELM1Utils.java#L299-L320
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/util/HyperLinkUtil.java
HyperLinkUtil.applyHyperLinkToElement
public static void applyHyperLinkToElement(DynamicJasperDesign design, DJHyperLink djlink, JRDesignChart chart, String name) { """ Creates necessary objects to make a chart an hyperlink @param design @param djlink @param chart @param name """ JRDesignExpression hlpe = ExpressionUtils.createAndRegisterE...
java
public static void applyHyperLinkToElement(DynamicJasperDesign design, DJHyperLink djlink, JRDesignChart chart, String name) { JRDesignExpression hlpe = ExpressionUtils.createAndRegisterExpression(design, name, djlink.getExpression()); chart.setHyperlinkReferenceExpression(hlpe); chart.setHyperlinkType( Hyperlink...
[ "public", "static", "void", "applyHyperLinkToElement", "(", "DynamicJasperDesign", "design", ",", "DJHyperLink", "djlink", ",", "JRDesignChart", "chart", ",", "String", "name", ")", "{", "JRDesignExpression", "hlpe", "=", "ExpressionUtils", ".", "createAndRegisterExpres...
Creates necessary objects to make a chart an hyperlink @param design @param djlink @param chart @param name
[ "Creates", "necessary", "objects", "to", "make", "a", "chart", "an", "hyperlink" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/util/HyperLinkUtil.java#L95-L104
codelibs/jcifs
src/main/java/jcifs/smb1/smb1/SmbFile.java
SmbFile.getSecurity
public ACE[] getSecurity(boolean resolveSids) throws IOException { """ Return an array of Access Control Entry (ACE) objects representing the security descriptor associated with this file or directory. If no DACL is present, null is returned. If the DACL is empty, an array with 0 elements is returned. @param re...
java
public ACE[] getSecurity(boolean resolveSids) throws IOException { int f; ACE[] aces; f = open0( O_RDONLY, READ_CONTROL, 0, isDirectory() ? 1 : 0 ); /* * NtTrans Query Security Desc Request / Response */ NtTransQuerySecurityDesc request = new NtTransQuerySecu...
[ "public", "ACE", "[", "]", "getSecurity", "(", "boolean", "resolveSids", ")", "throws", "IOException", "{", "int", "f", ";", "ACE", "[", "]", "aces", ";", "f", "=", "open0", "(", "O_RDONLY", ",", "READ_CONTROL", ",", "0", ",", "isDirectory", "(", ")", ...
Return an array of Access Control Entry (ACE) objects representing the security descriptor associated with this file or directory. If no DACL is present, null is returned. If the DACL is empty, an array with 0 elements is returned. @param resolveSids Attempt to resolve the SIDs within each ACE form their numeric repres...
[ "Return", "an", "array", "of", "Access", "Control", "Entry", "(", "ACE", ")", "objects", "representing", "the", "security", "descriptor", "associated", "with", "this", "file", "or", "directory", ".", "If", "no", "DACL", "is", "present", "null", "is", "return...
train
https://github.com/codelibs/jcifs/blob/ac6a8ba2925648ae003ca2508aec32316065dc34/src/main/java/jcifs/smb1/smb1/SmbFile.java#L2892-L2920
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java
DiSH.isParent
private boolean isParent(Relation<V> relation, Cluster<SubspaceModel> parent, It<Cluster<SubspaceModel>> iter, int db_dim) { """ Returns true, if the specified parent cluster is a parent of one child of the children clusters. @param relation the database containing the objects @param parent the parent to be t...
java
private boolean isParent(Relation<V> relation, Cluster<SubspaceModel> parent, It<Cluster<SubspaceModel>> iter, int db_dim) { Subspace s_p = parent.getModel().getSubspace(); NumberVector parent_centroid = ProjectedCentroid.make(s_p.getDimensions(), relation, parent.getIDs()); int subspaceDim_parent = db_dim ...
[ "private", "boolean", "isParent", "(", "Relation", "<", "V", ">", "relation", ",", "Cluster", "<", "SubspaceModel", ">", "parent", ",", "It", "<", "Cluster", "<", "SubspaceModel", ">", ">", "iter", ",", "int", "db_dim", ")", "{", "Subspace", "s_p", "=", ...
Returns true, if the specified parent cluster is a parent of one child of the children clusters. @param relation the database containing the objects @param parent the parent to be tested @param iter the list of children to be tested @param db_dim Database dimensionality @return true, if the specified parent cluster is...
[ "Returns", "true", "if", "the", "specified", "parent", "cluster", "is", "a", "parent", "of", "one", "child", "of", "the", "children", "clusters", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L548-L564
fuinorg/srcgen4javassist
src/main/java/org/fuin/srcgen4javassist/SgAnnotation.java
SgAnnotation.addArgument
public final void addArgument(final String name, final Object value) { """ Adds an argument. @param name Name of the argument - Cannot be null. @param value Value of the argument - Cannot be null. """ if (name == null) { throw new IllegalArgumentException("The argument 'name' cannot...
java
public final void addArgument(final String name, final Object value) { if (name == null) { throw new IllegalArgumentException("The argument 'name' cannot be null!"); } if (value == null) { throw new IllegalArgumentException("The argument 'value' cannot be null!"); ...
[ "public", "final", "void", "addArgument", "(", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"The argument 'name' cannot be null!\"", ")", ";", ...
Adds an argument. @param name Name of the argument - Cannot be null. @param value Value of the argument - Cannot be null.
[ "Adds", "an", "argument", "." ]
train
https://github.com/fuinorg/srcgen4javassist/blob/355828113cfce3cdd3d69ba242c5bdfc7d899f2f/src/main/java/org/fuin/srcgen4javassist/SgAnnotation.java#L114-L122
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/data/AnyValueMap.java
AnyValueMap.getAsLongWithDefault
public long getAsLongWithDefault(String key, long defaultValue) { """ Converts map element into a long or returns default value if conversion is not possible. @param key a key of element to get. @param defaultValue the default value @return long value of the element or default value if conversion is...
java
public long getAsLongWithDefault(String key, long defaultValue) { Object value = getAsObject(key); return LongConverter.toLongWithDefault(value, defaultValue); }
[ "public", "long", "getAsLongWithDefault", "(", "String", "key", ",", "long", "defaultValue", ")", "{", "Object", "value", "=", "getAsObject", "(", "key", ")", ";", "return", "LongConverter", ".", "toLongWithDefault", "(", "value", ",", "defaultValue", ")", ";"...
Converts map element into a long or returns default value if conversion is not possible. @param key a key of element to get. @param defaultValue the default value @return long value of the element or default value if conversion is not supported. @see LongConverter#toLongWithDefault(Object, long)
[ "Converts", "map", "element", "into", "a", "long", "or", "returns", "default", "value", "if", "conversion", "is", "not", "possible", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/data/AnyValueMap.java#L290-L293
MKLab-ITI/multimedia-indexing
src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java
ImageIOGreyScale.getImageWritersByFormatName
public static Iterator<ImageWriter> getImageWritersByFormatName(String formatName) { """ Returns an <code>Iterator</code> containing all currently registered <code>ImageWriter</code>s that claim to be able to encode the named format. @param formatName a <code>String</code> containing the informal name of a fo...
java
public static Iterator<ImageWriter> getImageWritersByFormatName(String formatName) { if (formatName == null) { throw new IllegalArgumentException("formatName == null!"); } Iterator iter; // Ensure category is present try { iter = theRegistry.getServiceProviders(ImageWriterSpi.class, new ContainsF...
[ "public", "static", "Iterator", "<", "ImageWriter", ">", "getImageWritersByFormatName", "(", "String", "formatName", ")", "{", "if", "(", "formatName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"formatName == null!\"", ")", ";", "}...
Returns an <code>Iterator</code> containing all currently registered <code>ImageWriter</code>s that claim to be able to encode the named format. @param formatName a <code>String</code> containing the informal name of a format (<i>e.g.</i>, "jpeg" or "tiff". @return an <code>Iterator</code> containing <code>ImageWrite...
[ "Returns", "an", "<code", ">", "Iterator<", "/", "code", ">", "containing", "all", "currently", "registered", "<code", ">", "ImageWriter<", "/", "code", ">", "s", "that", "claim", "to", "be", "able", "to", "encode", "the", "named", "format", "." ]
train
https://github.com/MKLab-ITI/multimedia-indexing/blob/f82e8e517da706651f4b7a719805401f3102e135/src/main/java/gr/iti/mklab/visual/utilities/ImageIOGreyScale.java#L781-L793
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java
PackageSummaryBuilder.buildClassSummary
public void buildClassSummary(XMLNode node, Content summaryContentTree) { """ Build the summary for the classes in this package. @param node the XML element that specifies which components to document @param summaryContentTree the summary tree to which the class summary will be added """ String cl...
java
public void buildClassSummary(XMLNode node, Content summaryContentTree) { String classTableSummary = configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Class_Summary"), configuration.getText("doclet.classes")); List<String> ...
[ "public", "void", "buildClassSummary", "(", "XMLNode", "node", ",", "Content", "summaryContentTree", ")", "{", "String", "classTableSummary", "=", "configuration", ".", "getText", "(", "\"doclet.Member_Table_Summary\"", ",", "configuration", ".", "getText", "(", "\"do...
Build the summary for the classes in this package. @param node the XML element that specifies which components to document @param summaryContentTree the summary tree to which the class summary will be added
[ "Build", "the", "summary", "for", "the", "classes", "in", "this", "package", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java#L202-L218
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/TrueTypeFontUnicode.java
TrueTypeFontUnicode.getWidth
public int getWidth(int char1) { """ Gets the width of a <CODE>char</CODE> in normalized 1000 units. @param char1 the unicode <CODE>char</CODE> to get the width of @return the width in normalized 1000 units """ if (vertical) return 1000; if (fontSpecific) { if ((char1 ...
java
public int getWidth(int char1) { if (vertical) return 1000; if (fontSpecific) { if ((char1 & 0xff00) == 0 || (char1 & 0xff00) == 0xf000) return getRawWidth(char1 & 0xff, null); else return 0; } else { return ...
[ "public", "int", "getWidth", "(", "int", "char1", ")", "{", "if", "(", "vertical", ")", "return", "1000", ";", "if", "(", "fontSpecific", ")", "{", "if", "(", "(", "char1", "&", "0xff00", ")", "==", "0", "||", "(", "char1", "&", "0xff00", ")", "=...
Gets the width of a <CODE>char</CODE> in normalized 1000 units. @param char1 the unicode <CODE>char</CODE> to get the width of @return the width in normalized 1000 units
[ "Gets", "the", "width", "of", "a", "<CODE", ">", "char<", "/", "CODE", ">", "in", "normalized", "1000", "units", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/TrueTypeFontUnicode.java#L158-L170
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java
PrimaveraReader.getActivityIDField
private FieldType getActivityIDField(Map<FieldType, String> map) { """ Determine which field the Activity ID has been mapped to. @param map field map @return field """ FieldType result = null; for (Map.Entry<FieldType, String> entry : map.entrySet()) { if (entry.getValue().equals...
java
private FieldType getActivityIDField(Map<FieldType, String> map) { FieldType result = null; for (Map.Entry<FieldType, String> entry : map.entrySet()) { if (entry.getValue().equals("task_code")) { result = entry.getKey(); break; } } retu...
[ "private", "FieldType", "getActivityIDField", "(", "Map", "<", "FieldType", ",", "String", ">", "map", ")", "{", "FieldType", "result", "=", "null", ";", "for", "(", "Map", ".", "Entry", "<", "FieldType", ",", "String", ">", "entry", ":", "map", ".", "...
Determine which field the Activity ID has been mapped to. @param map field map @return field
[ "Determine", "which", "field", "the", "Activity", "ID", "has", "been", "mapped", "to", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L793-L805
jbundle/jbundle
base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/BaseHttpTask.java
BaseHttpTask.initTask
public void initTask(App application, Map<String, Object> properties) { """ If this task object was created from a class name, call init(xxx) for the task. You may want to put logic in here that checks to make sure this object was not already inited. Typically, you init a Task object and pass it to the job sched...
java
public void initTask(App application, Map<String, Object> properties) { Utility.getLogger().warning("error: initTask() can never be called for a Servlet"); new Exception().printStackTrace(); }
[ "public", "void", "initTask", "(", "App", "application", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "Utility", ".", "getLogger", "(", ")", ".", "warning", "(", "\"error: initTask() can never be called for a Servlet\"", ")", ";", "new"...
If this task object was created from a class name, call init(xxx) for the task. You may want to put logic in here that checks to make sure this object was not already inited. Typically, you init a Task object and pass it to the job scheduler. The job scheduler will check to see if this task is owned by an application.....
[ "If", "this", "task", "object", "was", "created", "from", "a", "class", "name", "call", "init", "(", "xxx", ")", "for", "the", "task", ".", "You", "may", "want", "to", "put", "logic", "in", "here", "that", "checks", "to", "make", "sure", "this", "obj...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/control/servlet/src/main/java/org/jbundle/base/screen/control/servlet/BaseHttpTask.java#L475-L479
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XStringForFSB.java
XStringForFSB.indexOf
public int indexOf(int ch, int fromIndex) { """ Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. <p> If a character with value <code>ch</code> occurs in the character sequence represented by this <code>String</code> object at a...
java
public int indexOf(int ch, int fromIndex) { int max = m_start + m_length; FastStringBuffer fsb = fsb(); if (fromIndex < 0) { fromIndex = 0; } else if (fromIndex >= m_length) { // Note: fromIndex might be near -1>>>1. return -1; } for (int i = m_start + fromInd...
[ "public", "int", "indexOf", "(", "int", "ch", ",", "int", "fromIndex", ")", "{", "int", "max", "=", "m_start", "+", "m_length", ";", "FastStringBuffer", "fsb", "=", "fsb", "(", ")", ";", "if", "(", "fromIndex", "<", "0", ")", "{", "fromIndex", "=", ...
Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. <p> If a character with value <code>ch</code> occurs in the character sequence represented by this <code>String</code> object at an index no smaller than <code>fromIndex</code>, then the ...
[ "Returns", "the", "index", "within", "this", "string", "of", "the", "first", "occurrence", "of", "the", "specified", "character", "starting", "the", "search", "at", "the", "specified", "index", ".", "<p", ">", "If", "a", "character", "with", "value", "<code"...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XStringForFSB.java#L707-L733
aboutsip/pkts
pkts-core/src/main/java/io/pkts/framer/SIPFramer.java
SIPFramer.frame
@Override public SipPacket frame(final TransportPacket parent, final Buffer buffer) throws IOException { """ {@inheritDoc} Very basic way of framing a sip message. It makes a lot of assumption but in the framing phase we are, well, just framing. """ if (parent == null) { throw new ...
java
@Override public SipPacket frame(final TransportPacket parent, final Buffer buffer) throws IOException { if (parent == null) { throw new IllegalArgumentException("The parent frame cannot be null"); } final SipMessage sip = SipParser.frame(buffer); if (sip.isRequest()) {...
[ "@", "Override", "public", "SipPacket", "frame", "(", "final", "TransportPacket", "parent", ",", "final", "Buffer", "buffer", ")", "throws", "IOException", "{", "if", "(", "parent", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Th...
{@inheritDoc} Very basic way of framing a sip message. It makes a lot of assumption but in the framing phase we are, well, just framing.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/aboutsip/pkts/blob/0f06bb0dac76c812187829f580a8d476ca99a1a1/pkts-core/src/main/java/io/pkts/framer/SIPFramer.java#L40-L53
Axway/Grapes
commons/src/main/java/org/axway/grapes/commons/datamodel/DataModelFactory.java
DataModelFactory.createModule
public static Module createModule(final String name,final String version) { """ Generates a module regarding the parameters. @param name String @param version String @return Module """ final Module module = new Module(); module.setName(name); module.setVersion(version); mo...
java
public static Module createModule(final String name,final String version){ final Module module = new Module(); module.setName(name); module.setVersion(version); module.setPromoted(false); return module; }
[ "public", "static", "Module", "createModule", "(", "final", "String", "name", ",", "final", "String", "version", ")", "{", "final", "Module", "module", "=", "new", "Module", "(", ")", ";", "module", ".", "setName", "(", "name", ")", ";", "module", ".", ...
Generates a module regarding the parameters. @param name String @param version String @return Module
[ "Generates", "a", "module", "regarding", "the", "parameters", "." ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/commons/src/main/java/org/axway/grapes/commons/datamodel/DataModelFactory.java#L49-L58
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java
SpecializedOps_DDRM.diffNormP1
public static double diffNormP1(DMatrixD1 a , DMatrixD1 b ) { """ <p> Computes the p=1 p-norm of the difference between the two Matrices:<br> <br> &sum;<sub>i=1:m</sub> &sum;<sub>j=1:n</sub> | a<sub>ij</sub> - b<sub>ij</sub>| <br> <br> where |x| is the absolute value of x. </p> <p> This is often used as a ...
java
public static double diffNormP1(DMatrixD1 a , DMatrixD1 b ) { if( a.numRows != b.numRows || a.numCols != b.numCols ) { throw new IllegalArgumentException("Both matrices must have the same shape."); } final int size = a.getNumElements(); double total=0; for( int ...
[ "public", "static", "double", "diffNormP1", "(", "DMatrixD1", "a", ",", "DMatrixD1", "b", ")", "{", "if", "(", "a", ".", "numRows", "!=", "b", ".", "numRows", "||", "a", ".", "numCols", "!=", "b", ".", "numCols", ")", "{", "throw", "new", "IllegalArg...
<p> Computes the p=1 p-norm of the difference between the two Matrices:<br> <br> &sum;<sub>i=1:m</sub> &sum;<sub>j=1:n</sub> | a<sub>ij</sub> - b<sub>ij</sub>| <br> <br> where |x| is the absolute value of x. </p> <p> This is often used as a cost function. </p> @param a m by n matrix. Not modified. @param b m by n matr...
[ "<p", ">", "Computes", "the", "p", "=", "1", "p", "-", "norm", "of", "the", "difference", "between", "the", "two", "Matrices", ":", "<br", ">", "<br", ">", "&sum", ";", "<sub", ">", "i", "=", "1", ":", "m<", "/", "sub", ">", "&sum", ";", "<sub"...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java#L258-L271
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java
TiledMap.getObjectName
public String getObjectName(int groupID, int objectID) { """ Return the name of a specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The name of an object or null, when error occurred """ if (groupID >= 0 && groupID < objectGroups.size())...
java
public String getObjectName(int groupID, int objectID) { if (groupID >= 0 && groupID < objectGroups.size()) { ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID); if (objectID >= 0 && objectID < grp.objects.size()) { GroupObject object = (GroupObject) grp.objects.get(objectID); return object....
[ "public", "String", "getObjectName", "(", "int", "groupID", ",", "int", "objectID", ")", "{", "if", "(", "groupID", ">=", "0", "&&", "groupID", "<", "objectGroups", ".", "size", "(", ")", ")", "{", "ObjectGroup", "grp", "=", "(", "ObjectGroup", ")", "o...
Return the name of a specific object from a specific group. @param groupID Index of a group @param objectID Index of an object @return The name of an object or null, when error occurred
[ "Return", "the", "name", "of", "a", "specific", "object", "from", "a", "specific", "group", "." ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/tiled/TiledMap.java#L806-L815
cdk/cdk
tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
MolecularFormulaManipulator.getMajorIsotopeMolecularFormula
public static IMolecularFormula getMajorIsotopeMolecularFormula(String stringMF, IChemObjectBuilder builder) { """ Construct an instance of IMolecularFormula, initialized with a molecular formula string. The string is immediately analyzed and a set of Nodes is built based on this analysis. The hydrogens must be ...
java
public static IMolecularFormula getMajorIsotopeMolecularFormula(String stringMF, IChemObjectBuilder builder) { return getMolecularFormula(stringMF, true, builder); }
[ "public", "static", "IMolecularFormula", "getMajorIsotopeMolecularFormula", "(", "String", "stringMF", ",", "IChemObjectBuilder", "builder", ")", "{", "return", "getMolecularFormula", "(", "stringMF", ",", "true", ",", "builder", ")", ";", "}" ]
Construct an instance of IMolecularFormula, initialized with a molecular formula string. The string is immediately analyzed and a set of Nodes is built based on this analysis. The hydrogens must be implicit. Major isotopes are being used. @param stringMF The molecularFormula string @param builder a IChemObjectBuild...
[ "Construct", "an", "instance", "of", "IMolecularFormula", "initialized", "with", "a", "molecular", "formula", "string", ".", "The", "string", "is", "immediately", "analyzed", "and", "a", "set", "of", "Nodes", "is", "built", "based", "on", "this", "analysis", "...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java#L591-L593
joniles/mpxj
src/main/java/net/sf/mpxj/planner/PlannerReader.java
PlannerReader.processExceptionDays
private void processExceptionDays(ProjectCalendar mpxjCalendar, net.sf.mpxj.planner.schema.Calendar plannerCalendar) throws MPXJException { """ Process exception days. @param mpxjCalendar MPXJ calendar @param plannerCalendar Planner calendar """ Days days = plannerCalendar.getDays(); if (days !...
java
private void processExceptionDays(ProjectCalendar mpxjCalendar, net.sf.mpxj.planner.schema.Calendar plannerCalendar) throws MPXJException { Days days = plannerCalendar.getDays(); if (days != null) { List<net.sf.mpxj.planner.schema.Day> dayList = days.getDay(); for (net.sf.mpxj.pla...
[ "private", "void", "processExceptionDays", "(", "ProjectCalendar", "mpxjCalendar", ",", "net", ".", "sf", ".", "mpxj", ".", "planner", ".", "schema", ".", "Calendar", "plannerCalendar", ")", "throws", "MPXJException", "{", "Days", "days", "=", "plannerCalendar", ...
Process exception days. @param mpxjCalendar MPXJ calendar @param plannerCalendar Planner calendar
[ "Process", "exception", "days", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/planner/PlannerReader.java#L433-L456
sarl/sarl
main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/SREutils.java
SREutils.getInternalSkill
@Pure public static <S extends Capacity> S getInternalSkill(Agent agent, Class<S> type) { """ Replies the internal skill of an agent. @param <S> the type of the capacity. @param agent the agent. @param type the type of the capacity. @return the skill. @throws UnimplementedCapacityException if the agent has...
java
@Pure public static <S extends Capacity> S getInternalSkill(Agent agent, Class<S> type) { return agent.getSkill(type); }
[ "@", "Pure", "public", "static", "<", "S", "extends", "Capacity", ">", "S", "getInternalSkill", "(", "Agent", "agent", ",", "Class", "<", "S", ">", "type", ")", "{", "return", "agent", ".", "getSkill", "(", "type", ")", ";", "}" ]
Replies the internal skill of an agent. @param <S> the type of the capacity. @param agent the agent. @param type the type of the capacity. @return the skill. @throws UnimplementedCapacityException if the agent has not a skill for the given capacity. @since 0.6
[ "Replies", "the", "internal", "skill", "of", "an", "agent", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/core/SREutils.java#L139-L142
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/Xml.java
Xml.getChildren
public Collection<Xml> getChildren(String name) { """ Get the list of all children with this name. @param name The children name (must not be <code>null</code>). @return The children list. @throws LionEngineException If invalid argument. """ Check.notNull(name); final Collection<Xml> node...
java
public Collection<Xml> getChildren(String name) { Check.notNull(name); final Collection<Xml> nodes = new ArrayList<>(1); final NodeList list = root.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { final Node node = list.item(i); if (name....
[ "public", "Collection", "<", "Xml", ">", "getChildren", "(", "String", "name", ")", "{", "Check", ".", "notNull", "(", "name", ")", ";", "final", "Collection", "<", "Xml", ">", "nodes", "=", "new", "ArrayList", "<>", "(", "1", ")", ";", "final", "Nod...
Get the list of all children with this name. @param name The children name (must not be <code>null</code>). @return The children list. @throws LionEngineException If invalid argument.
[ "Get", "the", "list", "of", "all", "children", "with", "this", "name", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/Xml.java#L393-L408
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/ResourceBundle.java
ResourceBundle.getBundle
public static ResourceBundle getBundle(String baseName, Locale targetLocale, ClassLoader loader, ResourceBundle.Control control) { """ Finds the named resource bundle for the specified base name and control. @param baseName the base name of a resource bundle @param targetLocale the ta...
java
public static ResourceBundle getBundle(String baseName, Locale targetLocale, ClassLoader loader, ResourceBundle.Control control) { boolean expired = false; String bundleName = control.toBundleName(baseName, targetLocale); Object cacheKey = loader != null ? loader : "null"...
[ "public", "static", "ResourceBundle", "getBundle", "(", "String", "baseName", ",", "Locale", "targetLocale", ",", "ClassLoader", "loader", ",", "ResourceBundle", ".", "Control", "control", ")", "{", "boolean", "expired", "=", "false", ";", "String", "bundleName", ...
Finds the named resource bundle for the specified base name and control. @param baseName the base name of a resource bundle @param targetLocale the target locale of the resource bundle @param loader the class loader to load resource @param control the control that control the access sequence @return the named resource...
[ "Finds", "the", "named", "resource", "bundle", "for", "the", "specified", "base", "name", "and", "control", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/ResourceBundle.java#L297-L328
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java
FileUtils.loadFileListRelativeTo
public static ImmutableList<File> loadFileListRelativeTo(File fileList, File basePath) throws IOException { """ Takes a file with relative pathnames listed one per line and returns a list of the corresponding {@link java.io.File} objects, resolved against the provided base path using the {@link java.io.Fil...
java
public static ImmutableList<File> loadFileListRelativeTo(File fileList, File basePath) throws IOException { checkNotNull(basePath); final ImmutableList.Builder<File> ret = ImmutableList.builder(); for (final String filename : Files.readLines(fileList, Charsets.UTF_8)) { if (!filename.isEmpty() ...
[ "public", "static", "ImmutableList", "<", "File", ">", "loadFileListRelativeTo", "(", "File", "fileList", ",", "File", "basePath", ")", "throws", "IOException", "{", "checkNotNull", "(", "basePath", ")", ";", "final", "ImmutableList", ".", "Builder", "<", "File"...
Takes a file with relative pathnames listed one per line and returns a list of the corresponding {@link java.io.File} objects, resolved against the provided base path using the {@link java.io.File#File(java.io.File, String)} constructor. Ignores blank lines and lines beginning with "#".
[ "Takes", "a", "file", "with", "relative", "pathnames", "listed", "one", "per", "line", "and", "returns", "a", "list", "of", "the", "corresponding", "{" ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L170-L182
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Waiter.java
Waiter.waitForView
public View waitForView(int id, int index, int timeout, boolean scroll) { """ Waits for a certain view. @param view the id of the view to wait for @param index the index of the {@link View}. {@code 0} if only one is available @return the specified View """ Set<View> uniqueViewsMatchingId = new HashSet<V...
java
public View waitForView(int id, int index, int timeout, boolean scroll){ Set<View> uniqueViewsMatchingId = new HashSet<View>(); long endTime = SystemClock.uptimeMillis() + timeout; while (SystemClock.uptimeMillis() <= endTime) { sleeper.sleep(); for (View view : viewFetcher.getAllViews(false)) { Integ...
[ "public", "View", "waitForView", "(", "int", "id", ",", "int", "index", ",", "int", "timeout", ",", "boolean", "scroll", ")", "{", "Set", "<", "View", ">", "uniqueViewsMatchingId", "=", "new", "HashSet", "<", "View", ">", "(", ")", ";", "long", "endTim...
Waits for a certain view. @param view the id of the view to wait for @param index the index of the {@link View}. {@code 0} if only one is available @return the specified View
[ "Waits", "for", "a", "certain", "view", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Waiter.java#L398-L420
xiaosunzhu/resource-utils
src/main/java/net/sunyijun/resource/config/Configs.java
Configs.modifySelfConfig
public static void modifySelfConfig(String configAbsoluteClassPath, Map<IConfigKey, String> modifyConfig) throws IOException { """ Modify self configs. @param configAbsoluteClassPath config path. {@link #addSelfConfigs(String, OneProperties)} @param modifyConfig need update configs. If ...
java
public static void modifySelfConfig(String configAbsoluteClassPath, Map<IConfigKey, String> modifyConfig) throws IOException { OneProperties configs = otherConfigs.get(configAbsoluteClassPath); if (configs == null) { return; } configs.modifyConfig(modifyConf...
[ "public", "static", "void", "modifySelfConfig", "(", "String", "configAbsoluteClassPath", ",", "Map", "<", "IConfigKey", ",", "String", ">", "modifyConfig", ")", "throws", "IOException", "{", "OneProperties", "configs", "=", "otherConfigs", ".", "get", "(", "confi...
Modify self configs. @param configAbsoluteClassPath config path. {@link #addSelfConfigs(String, OneProperties)} @param modifyConfig need update configs. If one value is null, will not update that one. @throws IOException
[ "Modify", "self", "configs", "." ]
train
https://github.com/xiaosunzhu/resource-utils/blob/4f2bf3f36df10195a978f122ed682ba1eb0462b5/src/main/java/net/sunyijun/resource/config/Configs.java#L469-L476
Stratio/cassandra-lucene-index
builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java
Builder.geoDistance
public static GeoDistanceCondition geoDistance(String field, double latitude, double longitude, String maxDistance) { """ Returns a new {@link GeoDistanceConditio...
java
public static GeoDistanceCondition geoDistance(String field, double latitude, double longitude, String maxDistance) { return new GeoDistanceCondition(field, la...
[ "public", "static", "GeoDistanceCondition", "geoDistance", "(", "String", "field", ",", "double", "latitude", ",", "double", "longitude", ",", "String", "maxDistance", ")", "{", "return", "new", "GeoDistanceCondition", "(", "field", ",", "latitude", ",", "longitud...
Returns a new {@link GeoDistanceCondition} with the specified field reference point. @param field the name of the field to be matched @param latitude the latitude of the reference point @param longitude the longitude of the reference point @param maxDistance the max allowed distance @return a new geo distance conditio...
[ "Returns", "a", "new", "{", "@link", "GeoDistanceCondition", "}", "with", "the", "specified", "field", "reference", "point", "." ]
train
https://github.com/Stratio/cassandra-lucene-index/blob/a94a4d9af6c25d40e1108729974c35c27c54441c/builder/src/main/java/com/stratio/cassandra/lucene/builder/Builder.java#L456-L461
jqno/equalsverifier
src/main/java/nl/jqno/equalsverifier/internal/reflection/annotations/AnnotationProperties.java
AnnotationProperties.putArrayValues
public void putArrayValues(String name, Set<String> values) { """ Adds the content of an array value property. @param name The name of the array value property. @param values The content of the array value property. """ arrayValues.put(name, values); }
java
public void putArrayValues(String name, Set<String> values) { arrayValues.put(name, values); }
[ "public", "void", "putArrayValues", "(", "String", "name", ",", "Set", "<", "String", ">", "values", ")", "{", "arrayValues", ".", "put", "(", "name", ",", "values", ")", ";", "}" ]
Adds the content of an array value property. @param name The name of the array value property. @param values The content of the array value property.
[ "Adds", "the", "content", "of", "an", "array", "value", "property", "." ]
train
https://github.com/jqno/equalsverifier/blob/25d73c9cb801c8b20b257d1d1283ac6e0585ef1d/src/main/java/nl/jqno/equalsverifier/internal/reflection/annotations/AnnotationProperties.java#L40-L42
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java
GenericGenerators.jumpTo
public static InsnList jumpTo(LabelNode labelNode) { """ Generates instructions for an unconditional jump to a label. @param labelNode label to jump to @throws NullPointerException if any argument is {@code null} @return instructions for an unconditional jump to {@code labelNode} """ Validate.notNul...
java
public static InsnList jumpTo(LabelNode labelNode) { Validate.notNull(labelNode); InsnList ret = new InsnList(); ret.add(new JumpInsnNode(Opcodes.GOTO, labelNode)); return ret; }
[ "public", "static", "InsnList", "jumpTo", "(", "LabelNode", "labelNode", ")", "{", "Validate", ".", "notNull", "(", "labelNode", ")", ";", "InsnList", "ret", "=", "new", "InsnList", "(", ")", ";", "ret", ".", "add", "(", "new", "JumpInsnNode", "(", "Opco...
Generates instructions for an unconditional jump to a label. @param labelNode label to jump to @throws NullPointerException if any argument is {@code null} @return instructions for an unconditional jump to {@code labelNode}
[ "Generates", "instructions", "for", "an", "unconditional", "jump", "to", "a", "label", "." ]
train
https://github.com/offbynull/coroutines/blob/b1b83c293945f53a2f63fca8f15a53e88b796bf5/instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/generators/GenericGenerators.java#L254-L261
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/PhoneNumberUtil.java
PhoneNumberUtil.setCountryCode
public final void setCountryCode(final String pcountryCode, final Locale plocale) { """ set country code. @param pcountryCode iso code of country @param plocale locale to read properties in the correct language """ if (StringUtils.isEmpty(pcountryCode)) { defaultCountryData = null; } else { ...
java
public final void setCountryCode(final String pcountryCode, final Locale plocale) { if (StringUtils.isEmpty(pcountryCode)) { defaultCountryData = null; } else { defaultCountryData = CreatePhoneCountryConstantsClass.create(plocale).countryMap().get(pcountryCode); } }
[ "public", "final", "void", "setCountryCode", "(", "final", "String", "pcountryCode", ",", "final", "Locale", "plocale", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "pcountryCode", ")", ")", "{", "defaultCountryData", "=", "null", ";", "}", "else...
set country code. @param pcountryCode iso code of country @param plocale locale to read properties in the correct language
[ "set", "country", "code", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/PhoneNumberUtil.java#L76-L83
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml11Attribute
public static void escapeXml11Attribute(final Reader reader, final Writer writer, final XmlEscapeType type, final XmlEscapeLevel level) throws IOException { """ <p> Perform a (configurable) XML 1.1 <strong>escape</strong> operation on a <tt>Reader</tt> input meant to be an XML attribute value, writin...
java
public static void escapeXml11Attribute(final Reader reader, final Writer writer, final XmlEscapeType type, final XmlEscapeLevel level) throws IOException { escapeXml(reader, writer, XmlEscapeSymbols.XML11_ATTRIBUTE_SYMBOLS, type, level); }
[ "public", "static", "void", "escapeXml11Attribute", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ",", "final", "XmlEscapeType", "type", ",", "final", "XmlEscapeLevel", "level", ")", "throws", "IOException", "{", "escapeXml", "(", "reader", ...
<p> Perform a (configurable) XML 1.1 <strong>escape</strong> operation on a <tt>Reader</tt> input meant to be an XML attribute value, writing results to a <tt>Writer</tt>. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xm...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "XML", "1", ".", "1", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "meant", "to", "be", "an", "XML", "attribute", "value", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L1698-L1701
windup/windup
config/api/src/main/java/org/jboss/windup/config/tags/TagService.java
TagService.isUnderTag
public boolean isUnderTag(String superTagName, String subTagName) { """ Convenience method, calls this.isUnderTag(Tag superTag, Tag subTag). """ if (superTagName == null || subTagName == null) throw new IllegalArgumentException("Looking for a null tag name."); superTagName = Tag.no...
java
public boolean isUnderTag(String superTagName, String subTagName) { if (superTagName == null || subTagName == null) throw new IllegalArgumentException("Looking for a null tag name."); superTagName = Tag.normalizeName(superTagName); subTagName = Tag.normalizeName(subTagName); ...
[ "public", "boolean", "isUnderTag", "(", "String", "superTagName", ",", "String", "subTagName", ")", "{", "if", "(", "superTagName", "==", "null", "||", "subTagName", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"Looking for a null tag name.\...
Convenience method, calls this.isUnderTag(Tag superTag, Tag subTag).
[ "Convenience", "method", "calls", "this", ".", "isUnderTag", "(", "Tag", "superTag", "Tag", "subTag", ")", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/tags/TagService.java#L157-L173
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionVertex.java
ExecutionVertex.insertInputGate
void insertInputGate(final int pos, final ExecutionGate inputGate) { """ Inserts the input gate at the given position. @param pos the position to insert the input gate @param outputGate the input gate to be inserted """ if (this.inputGates[pos] != null) { throw new IllegalStateException("Input gate...
java
void insertInputGate(final int pos, final ExecutionGate inputGate) { if (this.inputGates[pos] != null) { throw new IllegalStateException("Input gate at position " + pos + " is not null"); } this.inputGates[pos] = inputGate; }
[ "void", "insertInputGate", "(", "final", "int", "pos", ",", "final", "ExecutionGate", "inputGate", ")", "{", "if", "(", "this", ".", "inputGates", "[", "pos", "]", "!=", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Input gate at position ...
Inserts the input gate at the given position. @param pos the position to insert the input gate @param outputGate the input gate to be inserted
[ "Inserts", "the", "input", "gate", "at", "the", "given", "position", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/executiongraph/ExecutionVertex.java#L268-L275
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/Relinearlize.java
Relinearlize.process
public void process( DMatrixRMaj L_full , DMatrixRMaj y , double betas[] ) { """ Estimates betas using relinearization. @param L_full Linear constraint matrix @param y distances between world control points @param betas Estimated betas. Output. """ svd.decompose(L_full); // extract null space V =...
java
public void process( DMatrixRMaj L_full , DMatrixRMaj y , double betas[] ) { svd.decompose(L_full); // extract null space V = svd.getV(null,true); // compute one possible solution pseudo.setA(L_full); pseudo.solve(y,x0); // add additional constraints to reduce the number of possible solutions DMatri...
[ "public", "void", "process", "(", "DMatrixRMaj", "L_full", ",", "DMatrixRMaj", "y", ",", "double", "betas", "[", "]", ")", "{", "svd", ".", "decompose", "(", "L_full", ")", ";", "// extract null space", "V", "=", "svd", ".", "getV", "(", "null", ",", "...
Estimates betas using relinearization. @param L_full Linear constraint matrix @param y distances between world control points @param betas Estimated betas. Output.
[ "Estimates", "betas", "using", "relinearization", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/Relinearlize.java#L110-L141
protostuff/protostuff
protostuff-core/src/main/java/io/protostuff/IOUtil.java
IOUtil.mergeFrom
static <T> void mergeFrom(InputStream in, byte[] buf, T message, Schema<T> schema, boolean decodeNestedMessageAsGroup) throws IOException { """ Merges the {@code message} from the {@link InputStream} with the supplied {@code buf} to use. """ final CodedInput input = new CodedInput(in, buf...
java
static <T> void mergeFrom(InputStream in, byte[] buf, T message, Schema<T> schema, boolean decodeNestedMessageAsGroup) throws IOException { final CodedInput input = new CodedInput(in, buf, decodeNestedMessageAsGroup); schema.mergeFrom(input, message); input.checkLastTagWas(0...
[ "static", "<", "T", ">", "void", "mergeFrom", "(", "InputStream", "in", ",", "byte", "[", "]", "buf", ",", "T", "message", ",", "Schema", "<", "T", ">", "schema", ",", "boolean", "decodeNestedMessageAsGroup", ")", "throws", "IOException", "{", "final", "...
Merges the {@code message} from the {@link InputStream} with the supplied {@code buf} to use.
[ "Merges", "the", "{" ]
train
https://github.com/protostuff/protostuff/blob/af669cf089057d0ec83220266131ce411854af7b/protostuff-core/src/main/java/io/protostuff/IOUtil.java#L62-L68
notnoop/java-apns
src/main/java/com/notnoop/apns/ApnsServiceBuilder.java
ApnsServiceBuilder.withCert
public ApnsServiceBuilder withCert(String fileName, String password) throws RuntimeIOException, InvalidSSLConfig { """ Specify the certificate used to connect to Apple APNS servers. This relies on the path (absolute or relative to working path) to the keystore (*.p12) containing the certificate, along with...
java
public ApnsServiceBuilder withCert(String fileName, String password) throws RuntimeIOException, InvalidSSLConfig { FileInputStream stream = null; try { stream = new FileInputStream(fileName); return withCert(stream, password); } catch (FileNotFoundException e) { ...
[ "public", "ApnsServiceBuilder", "withCert", "(", "String", "fileName", ",", "String", "password", ")", "throws", "RuntimeIOException", ",", "InvalidSSLConfig", "{", "FileInputStream", "stream", "=", "null", ";", "try", "{", "stream", "=", "new", "FileInputStream", ...
Specify the certificate used to connect to Apple APNS servers. This relies on the path (absolute or relative to working path) to the keystore (*.p12) containing the certificate, along with the given password. The keystore needs to be of PKCS12 and the keystore needs to be encrypted using the SunX509 algorithm. Both ...
[ "Specify", "the", "certificate", "used", "to", "connect", "to", "Apple", "APNS", "servers", ".", "This", "relies", "on", "the", "path", "(", "absolute", "or", "relative", "to", "working", "path", ")", "to", "the", "keystore", "(", "*", ".", "p12", ")", ...
train
https://github.com/notnoop/java-apns/blob/180a190d4cb49458441596ca7c69d50ec7f1dba5/src/main/java/com/notnoop/apns/ApnsServiceBuilder.java#L152-L163
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java
ContentSpecProcessor.doesCommonContentMatch
protected boolean doesCommonContentMatch(final CommonContent commonContent, final CSNodeWrapper node, boolean matchContent) { """ Checks to see if a ContentSpec Common Content matches a Content Spec Entity Common Content. @param commonContent The ContentSpec common content object. @param node The Cont...
java
protected boolean doesCommonContentMatch(final CommonContent commonContent, final CSNodeWrapper node, boolean matchContent) { if (!node.getNodeType().equals(CommonConstants.CS_NODE_COMMON_CONTENT)) return false; // If the unique id is not from the parser, in which case it will start with a number than ...
[ "protected", "boolean", "doesCommonContentMatch", "(", "final", "CommonContent", "commonContent", ",", "final", "CSNodeWrapper", "node", ",", "boolean", "matchContent", ")", "{", "if", "(", "!", "node", ".", "getNodeType", "(", ")", ".", "equals", "(", "CommonCo...
Checks to see if a ContentSpec Common Content matches a Content Spec Entity Common Content. @param commonContent The ContentSpec common content object. @param node The Content Spec Entity common content. @param matchContent If the contents of the common content have to match to a reasonable extent. @return T...
[ "Checks", "to", "see", "if", "a", "ContentSpec", "Common", "Content", "matches", "a", "Content", "Spec", "Entity", "Common", "Content", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java#L2280-L2297
alkacon/opencms-core
src/org/opencms/staticexport/CmsStaticExportManager.java
CmsStaticExportManager.addDefaultFileNameToFolder
public String addDefaultFileNameToFolder(String rfsName, boolean isFolder) { """ Returns the real file system name plus the default file name.<p> @param rfsName the real file system name to append the default file name to @param isFolder signals whether the according virtual file system resource is an folder o...
java
public String addDefaultFileNameToFolder(String rfsName, boolean isFolder) { StringBuffer name = new StringBuffer(rfsName); if (isFolder) { // vfs folder case name.append(EXPORT_DEFAULT_FILE); } return name.toString(); }
[ "public", "String", "addDefaultFileNameToFolder", "(", "String", "rfsName", ",", "boolean", "isFolder", ")", "{", "StringBuffer", "name", "=", "new", "StringBuffer", "(", "rfsName", ")", ";", "if", "(", "isFolder", ")", "{", "// vfs folder case", "name", ".", ...
Returns the real file system name plus the default file name.<p> @param rfsName the real file system name to append the default file name to @param isFolder signals whether the according virtual file system resource is an folder or not @return the real file system name plus the default file name
[ "Returns", "the", "real", "file", "system", "name", "plus", "the", "default", "file", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsStaticExportManager.java#L345-L354
hellosign/hellosign-java-sdk
src/main/java/com/hellosign/sdk/resource/SignatureRequest.java
SignatureRequest.getSignature
public Signature getSignature(String email, String name) throws HelloSignException { """ Returns the signature for the given email/name combination, or null if not found on this request. @param email String email address @param name String name @return Signature or null if not found @throws HelloSignExcepti...
java
public Signature getSignature(String email, String name) throws HelloSignException { if (email == null || "".equals(email)) { throw new HelloSignException("Email address cannot be empty"); } if (name == null || "".equals(name)) { throw new HelloSignException("Name cannot ...
[ "public", "Signature", "getSignature", "(", "String", "email", ",", "String", "name", ")", "throws", "HelloSignException", "{", "if", "(", "email", "==", "null", "||", "\"\"", ".", "equals", "(", "email", ")", ")", "{", "throw", "new", "HelloSignException", ...
Returns the signature for the given email/name combination, or null if not found on this request. @param email String email address @param name String name @return Signature or null if not found @throws HelloSignException if the email or name are empty
[ "Returns", "the", "signature", "for", "the", "given", "email", "/", "name", "combination", "or", "null", "if", "not", "found", "on", "this", "request", "." ]
train
https://github.com/hellosign/hellosign-java-sdk/blob/08fa7aeb3b0c68ddb6c7ea797d114d55d36d36b1/src/main/java/com/hellosign/sdk/resource/SignatureRequest.java#L142-L155
phax/ph-oton
ph-oton-security/src/main/java/com/helger/photon/security/util/SecurityHelper.java
SecurityHelper.getUserDisplayName
@Nullable public static String getUserDisplayName (@Nullable final IUser aUser, @Nonnull final Locale aDisplayLocale) { """ Get the display name of the user. If no display name is present (because first name and last name are empty), the login name is returned. @param aUser User. May be <code>null</code>. ...
java
@Nullable public static String getUserDisplayName (@Nullable final IUser aUser, @Nonnull final Locale aDisplayLocale) { ValueEnforcer.notNull (aDisplayLocale, "DisplayLocale"); if (aUser == null) return getGuestUserDisplayName (aDisplayLocale); String ret = aUser.getDisplayName (); if (String...
[ "@", "Nullable", "public", "static", "String", "getUserDisplayName", "(", "@", "Nullable", "final", "IUser", "aUser", ",", "@", "Nonnull", "final", "Locale", "aDisplayLocale", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aDisplayLocale", ",", "\"DisplayLocale\...
Get the display name of the user. If no display name is present (because first name and last name are empty), the login name is returned. @param aUser User. May be <code>null</code>. @param aDisplayLocale The display locale to be used to resolve the "Guest" text if the passed user is <code>null</code>. @return Never <...
[ "Get", "the", "display", "name", "of", "the", "user", ".", "If", "no", "display", "name", "is", "present", "(", "because", "first", "name", "and", "last", "name", "are", "empty", ")", "the", "login", "name", "is", "returned", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-security/src/main/java/com/helger/photon/security/util/SecurityHelper.java#L186-L197
aspectran/aspectran
shell/src/main/java/com/aspectran/shell/command/option/HelpFormatter.java
HelpFormatter.renderWrappedTextBlock
private void renderWrappedTextBlock(StringBuilder sb, int nextLineTabStop, String text) { """ Render the specified text width a maximum width. This method differs from renderWrappedText by not removing leading spaces after a new line. @param sb the StringBuilder to place the rendered text into @param nextLine...
java
private void renderWrappedTextBlock(StringBuilder sb, int nextLineTabStop, String text) { try { BufferedReader in = new BufferedReader(new StringReader(text)); String line; boolean firstLine = true; while ((line = in.readLine()) != null) { if (!fir...
[ "private", "void", "renderWrappedTextBlock", "(", "StringBuilder", "sb", ",", "int", "nextLineTabStop", ",", "String", "text", ")", "{", "try", "{", "BufferedReader", "in", "=", "new", "BufferedReader", "(", "new", "StringReader", "(", "text", ")", ")", ";", ...
Render the specified text width a maximum width. This method differs from renderWrappedText by not removing leading spaces after a new line. @param sb the StringBuilder to place the rendered text into @param nextLineTabStop the position on the next line for the first tab @param text the text to be rendered
[ "Render", "the", "specified", "text", "width", "a", "maximum", "width", ".", "This", "method", "differs", "from", "renderWrappedText", "by", "not", "removing", "leading", "spaces", "after", "a", "new", "line", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/shell/src/main/java/com/aspectran/shell/command/option/HelpFormatter.java#L512-L528
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/block/decomposition/qr/QRDecompositionHouseholder_DDRB.java
QRDecompositionHouseholder_DDRB.initializeQ
public static DMatrixRBlock initializeQ(DMatrixRBlock Q, int numRows , int numCols , int blockLength , boolean compact) { """ Sanity checks the input or declares a new matrix. Return matrix is an identity matrix. """ ...
java
public static DMatrixRBlock initializeQ(DMatrixRBlock Q, int numRows , int numCols , int blockLength , boolean compact) { int minLength = Math.min(numRows,numCols); if( compact ) { if( Q == null ) { ...
[ "public", "static", "DMatrixRBlock", "initializeQ", "(", "DMatrixRBlock", "Q", ",", "int", "numRows", ",", "int", "numCols", ",", "int", "blockLength", ",", "boolean", "compact", ")", "{", "int", "minLength", "=", "Math", ".", "min", "(", "numRows", ",", "...
Sanity checks the input or declares a new matrix. Return matrix is an identity matrix.
[ "Sanity", "checks", "the", "input", "or", "declares", "a", "new", "matrix", ".", "Return", "matrix", "is", "an", "identity", "matrix", "." ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/block/decomposition/qr/QRDecompositionHouseholder_DDRB.java#L124-L152
petergeneric/stdlib
util/carbon-client/src/main/java/com/peterphi/carbon/type/mutable/CarbonSource.java
CarbonSource.setInOutPoint
public void setInOutPoint(long in, long out) { """ Set the in/out frame points (expressed in timebase of 1/27,000,000) @param in @param out """ // Remove in/out point (we're replacing it) removeInOutPoint(); // Build a new InOutPoints element Element filter = buildInOutElement(in, out); element...
java
public void setInOutPoint(long in, long out) { // Remove in/out point (we're replacing it) removeInOutPoint(); // Build a new InOutPoints element Element filter = buildInOutElement(in, out); element.addContent(filter); }
[ "public", "void", "setInOutPoint", "(", "long", "in", ",", "long", "out", ")", "{", "// Remove in/out point (we're replacing it)", "removeInOutPoint", "(", ")", ";", "// Build a new InOutPoints element", "Element", "filter", "=", "buildInOutElement", "(", "in", ",", "...
Set the in/out frame points (expressed in timebase of 1/27,000,000) @param in @param out
[ "Set", "the", "in", "/", "out", "frame", "points", "(", "expressed", "in", "timebase", "of", "1", "/", "27", "000", "000", ")" ]
train
https://github.com/petergeneric/stdlib/blob/d4025d2f881bc0542b1e004c5f65a1ccaf895836/util/carbon-client/src/main/java/com/peterphi/carbon/type/mutable/CarbonSource.java#L70-L79
classgraph/classgraph
src/main/java/io/github/classgraph/Classfile.java
Classfile.readAnnotation
private AnnotationInfo readAnnotation() throws IOException { """ Read annotation entry from classfile. @return the annotation, as an {@link AnnotationInfo} object. @throws IOException If an IO exception occurs. """ // Lcom/xyz/Annotation; -> Lcom.xyz.Annotation; final String annotationClas...
java
private AnnotationInfo readAnnotation() throws IOException { // Lcom/xyz/Annotation; -> Lcom.xyz.Annotation; final String annotationClassName = getConstantPoolClassDescriptor( inputStreamOrByteBuffer.readUnsignedShort()); final int numElementValuePairs = inputStreamOrByteBuffer.r...
[ "private", "AnnotationInfo", "readAnnotation", "(", ")", "throws", "IOException", "{", "// Lcom/xyz/Annotation; -> Lcom.xyz.Annotation;", "final", "String", "annotationClassName", "=", "getConstantPoolClassDescriptor", "(", "inputStreamOrByteBuffer", ".", "readUnsignedShort", "("...
Read annotation entry from classfile. @return the annotation, as an {@link AnnotationInfo} object. @throws IOException If an IO exception occurs.
[ "Read", "annotation", "entry", "from", "classfile", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Classfile.java#L807-L822
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/Capsule3f.java
Capsule3f.setMedial1
@Override public void setMedial1(double x, double y, double z) { """ Set the first point of the capsule's segment. @param x x xoordinate of the new first point for the capsule's segment.. @param y y xoordinate of the new first point for the capsule's segment.. @param z z xoordinate of the new first point for...
java
@Override public void setMedial1(double x, double y, double z) { this.medial1.set(x, y, z); ensureAIsLowerPoint(); }
[ "@", "Override", "public", "void", "setMedial1", "(", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "this", ".", "medial1", ".", "set", "(", "x", ",", "y", ",", "z", ")", ";", "ensureAIsLowerPoint", "(", ")", ";", "}" ]
Set the first point of the capsule's segment. @param x x xoordinate of the new first point for the capsule's segment.. @param y y xoordinate of the new first point for the capsule's segment.. @param z z xoordinate of the new first point for the capsule's segment..
[ "Set", "the", "first", "point", "of", "the", "capsule", "s", "segment", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/Capsule3f.java#L139-L143
apache/flink
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateUploader.java
RocksDBStateUploader.uploadFilesToCheckpointFs
public Map<StateHandleID, StreamStateHandle> uploadFilesToCheckpointFs( @Nonnull Map<StateHandleID, Path> files, CheckpointStreamFactory checkpointStreamFactory, CloseableRegistry closeableRegistry) throws Exception { """ Upload all the files to checkpoint fileSystem using specified number of threads. @pa...
java
public Map<StateHandleID, StreamStateHandle> uploadFilesToCheckpointFs( @Nonnull Map<StateHandleID, Path> files, CheckpointStreamFactory checkpointStreamFactory, CloseableRegistry closeableRegistry) throws Exception { Map<StateHandleID, StreamStateHandle> handles = new HashMap<>(); Map<StateHandleID, Comple...
[ "public", "Map", "<", "StateHandleID", ",", "StreamStateHandle", ">", "uploadFilesToCheckpointFs", "(", "@", "Nonnull", "Map", "<", "StateHandleID", ",", "Path", ">", "files", ",", "CheckpointStreamFactory", "checkpointStreamFactory", ",", "CloseableRegistry", "closeabl...
Upload all the files to checkpoint fileSystem using specified number of threads. @param files The files will be uploaded to checkpoint filesystem. @param checkpointStreamFactory The checkpoint streamFactory used to create outputstream. @throws Exception Thrown if can not upload all the files.
[ "Upload", "all", "the", "files", "to", "checkpoint", "fileSystem", "using", "specified", "number", "of", "threads", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateUploader.java#L62-L89
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/auth/AWS4Signer.java
AWS4Signer.newSigningKey
protected byte[] newSigningKey(AWSCredentials credentials, String dateStamp, String regionName, String serviceName) { """ Generates a new signing key from the given parameters and returns it. """ byte[] kSecret = ("AWS4" + credentials.getAWSSecretKey()) .getBytes(Charset.for...
java
protected byte[] newSigningKey(AWSCredentials credentials, String dateStamp, String regionName, String serviceName) { byte[] kSecret = ("AWS4" + credentials.getAWSSecretKey()) .getBytes(Charset.forName("UTF-8")); byte[] kDate = sign(dateStamp, kSecret, SigningAlgorithm.HmacSH...
[ "protected", "byte", "[", "]", "newSigningKey", "(", "AWSCredentials", "credentials", ",", "String", "dateStamp", ",", "String", "regionName", ",", "String", "serviceName", ")", "{", "byte", "[", "]", "kSecret", "=", "(", "\"AWS4\"", "+", "credentials", ".", ...
Generates a new signing key from the given parameters and returns it.
[ "Generates", "a", "new", "signing", "key", "from", "the", "given", "parameters", "and", "returns", "it", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/auth/AWS4Signer.java#L623-L632
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java
FacebookRestClient.profile_setFBML
public boolean profile_setFBML(CharSequence profileFbmlMarkup, CharSequence profileActionFbmlMarkup, Long profileId) throws FacebookException, IOException { """ Sets the FBML for the profile box and profile actions for the user or page profile with ID <code>profileId</code>. Refer to the FBML documentation fo...
java
public boolean profile_setFBML(CharSequence profileFbmlMarkup, CharSequence profileActionFbmlMarkup, Long profileId) throws FacebookException, IOException { return profile_setFBML(profileFbmlMarkup, profileActionFbmlMarkup, /* mobileFbmlMarkup */null, profileId); }
[ "public", "boolean", "profile_setFBML", "(", "CharSequence", "profileFbmlMarkup", ",", "CharSequence", "profileActionFbmlMarkup", ",", "Long", "profileId", ")", "throws", "FacebookException", ",", "IOException", "{", "return", "profile_setFBML", "(", "profileFbmlMarkup", ...
Sets the FBML for the profile box and profile actions for the user or page profile with ID <code>profileId</code>. Refer to the FBML documentation for a description of the markup and its role in various contexts. @param profileFbmlMarkup the FBML for the profile box @param profileActionFbmlMarkup the FBML for the profi...
[ "Sets", "the", "FBML", "for", "the", "profile", "box", "and", "profile", "actions", "for", "the", "user", "or", "page", "profile", "with", "ID", "<code", ">", "profileId<", "/", "code", ">", ".", "Refer", "to", "the", "FBML", "documentation", "for", "a",...
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1530-L1533
apache/groovy
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
StaticTypeCheckingVisitor.checkGroovyStyleConstructor
protected MethodNode checkGroovyStyleConstructor(final ClassNode node, final ClassNode[] arguments, final ASTNode source) { """ Checks that a constructor style expression is valid regarding the number of arguments and the argument types. @param node the class node for which we will try to find a matching c...
java
protected MethodNode checkGroovyStyleConstructor(final ClassNode node, final ClassNode[] arguments, final ASTNode source) { if (node.equals(ClassHelper.OBJECT_TYPE) || node.equals(ClassHelper.DYNAMIC_TYPE)) { // in that case, we are facing a list constructor assigned to a def or object r...
[ "protected", "MethodNode", "checkGroovyStyleConstructor", "(", "final", "ClassNode", "node", ",", "final", "ClassNode", "[", "]", "arguments", ",", "final", "ASTNode", "source", ")", "{", "if", "(", "node", ".", "equals", "(", "ClassHelper", ".", "OBJECT_TYPE", ...
Checks that a constructor style expression is valid regarding the number of arguments and the argument types. @param node the class node for which we will try to find a matching constructor @param arguments the constructor arguments
[ "Checks", "that", "a", "constructor", "style", "expression", "is", "valid", "regarding", "the", "number", "of", "arguments", "and", "the", "argument", "types", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java#L1457-L1483
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/settings/Factories.java
Factories.newInstance
public static <T> T newInstance(Settings settings, Key<String> key, ClassLoader classLoader) throws ServiceLocationException { """ Creates a new instance of a class whose full qualified name is specified under the given key, loading the class with the given class loader. <br /> If the given settings is null, or...
java
public static <T> T newInstance(Settings settings, Key<String> key, ClassLoader classLoader) throws ServiceLocationException { Class<?> klass = loadClass(settings, key, classLoader); // Workaround for compiler bug (#6302954) return Factories.<T>newInstance(klass); }
[ "public", "static", "<", "T", ">", "T", "newInstance", "(", "Settings", "settings", ",", "Key", "<", "String", ">", "key", ",", "ClassLoader", "classLoader", ")", "throws", "ServiceLocationException", "{", "Class", "<", "?", ">", "klass", "=", "loadClass", ...
Creates a new instance of a class whose full qualified name is specified under the given key, loading the class with the given class loader. <br /> If the given settings is null, or it does not contain the specified key, the default value of the key is taken from the {@link Defaults defaults}. @param settings the c...
[ "Creates", "a", "new", "instance", "of", "a", "class", "whose", "full", "qualified", "name", "is", "specified", "under", "the", "given", "key", "loading", "the", "class", "with", "the", "given", "class", "loader", ".", "<br", "/", ">", "If", "the", "give...
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/settings/Factories.java#L64-L69
couchbase/couchbase-lite-java-core
src/main/java/com/couchbase/lite/Manager.java
Manager.upgradeOldDatabaseFiles
@InterfaceAudience.Private private void upgradeOldDatabaseFiles(File dir) throws IOException { """ Scan my dir for SQLite-based databases from Couchbase Lite 1.0 and upgrade them: <p/> in CBLManager.m - (void) upgradeOldDatabaseFiles @exclude """ if (dir == null) throw new IllegalArgumentExce...
java
@InterfaceAudience.Private private void upgradeOldDatabaseFiles(File dir) throws IOException { if (dir == null) throw new IllegalArgumentException("dir argument is null."); if (!dir.exists() || !dir.isDirectory() || !dir.canRead() || !dir.canWrite()) throw new IllegalArgumentException(St...
[ "@", "InterfaceAudience", ".", "Private", "private", "void", "upgradeOldDatabaseFiles", "(", "File", "dir", ")", "throws", "IOException", "{", "if", "(", "dir", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"dir argument is null.\"", ")", "...
Scan my dir for SQLite-based databases from Couchbase Lite 1.0 and upgrade them: <p/> in CBLManager.m - (void) upgradeOldDatabaseFiles @exclude
[ "Scan", "my", "dir", "for", "SQLite", "-", "based", "databases", "from", "Couchbase", "Lite", "1", ".", "0", "and", "upgrade", "them", ":", "<p", "/", ">", "in", "CBLManager", ".", "m", "-", "(", "void", ")", "upgradeOldDatabaseFiles" ]
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/Manager.java#L800-L827
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/clustering/ClusteringService.java
ClusteringService.startStandalone
public static ClusteringService startStandalone( String clusterName, String jgroupsConfig ) { """ Starts a standalone clustering service which in turn will start & connect its own JGroup channel. @param clusterName the name of the cluster to which the JGroups...
java
public static ClusteringService startStandalone( String clusterName, String jgroupsConfig ) { ClusteringService clusteringService = new StandaloneClusteringService(clusterName, jgroupsConfig); clusteringService.init(); return clusteringService...
[ "public", "static", "ClusteringService", "startStandalone", "(", "String", "clusterName", ",", "String", "jgroupsConfig", ")", "{", "ClusteringService", "clusteringService", "=", "new", "StandaloneClusteringService", "(", "clusterName", ",", "jgroupsConfig", ")", ";", "...
Starts a standalone clustering service which in turn will start & connect its own JGroup channel. @param clusterName the name of the cluster to which the JGroups channel should connect; may not be null @param jgroupsConfig either the path or the XML content of a JGroups configuration file; may not be null @return a {@...
[ "Starts", "a", "standalone", "clustering", "service", "which", "in", "turn", "will", "start", "&", "connect", "its", "own", "JGroup", "channel", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/clustering/ClusteringService.java#L260-L265
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/VsanUpgradeSystem.java
VsanUpgradeSystem.performVsanUpgradePreflightCheck
public VsanUpgradeSystemPreflightCheckResult performVsanUpgradePreflightCheck(ClusterComputeResource cluster, Boolean downgradeFormat) throws RuntimeFault, VsanFault, RemoteException { """ Perform an upgrade pre-flight check on a cluster. @param cluster The cluster for which to perform the check. @para...
java
public VsanUpgradeSystemPreflightCheckResult performVsanUpgradePreflightCheck(ClusterComputeResource cluster, Boolean downgradeFormat) throws RuntimeFault, VsanFault, RemoteException { return getVimService().performVsanUpgradePreflightCheck(getMOR(), cluster.getMOR(), downgradeFormat); }
[ "public", "VsanUpgradeSystemPreflightCheckResult", "performVsanUpgradePreflightCheck", "(", "ClusterComputeResource", "cluster", ",", "Boolean", "downgradeFormat", ")", "throws", "RuntimeFault", ",", "VsanFault", ",", "RemoteException", "{", "return", "getVimService", "(", ")...
Perform an upgrade pre-flight check on a cluster. @param cluster The cluster for which to perform the check. @param downgradeFormat Intend to perform a on-disk format downgrade instead of upgrade. Adds additional checks. @return Pre-flight check result. @throws RuntimeFault @throws VsanFault @throws RemoteExce...
[ "Perform", "an", "upgrade", "pre", "-", "flight", "check", "on", "a", "cluster", "." ]
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/VsanUpgradeSystem.java#L194-L196
h2oai/h2o-2
src/main/java/water/Model.java
Model.toJavaPredict
private SB toJavaPredict(SB ccsb, SB fileCtxSb) { """ Wrapper around the main predict call, including the signature and return value """ // ccsb = classContext ccsb.nl(); ccsb.p(" // Pass in data in a double[], pre-aligned to the Model's requirements.").nl(); ccsb.p(" // Jam predictions into the ...
java
private SB toJavaPredict(SB ccsb, SB fileCtxSb) { // ccsb = classContext ccsb.nl(); ccsb.p(" // Pass in data in a double[], pre-aligned to the Model's requirements.").nl(); ccsb.p(" // Jam predictions into the preds[] array; preds[0] is reserved for the").nl(); ccsb.p(" // main prediction (class for ...
[ "private", "SB", "toJavaPredict", "(", "SB", "ccsb", ",", "SB", "fileCtxSb", ")", "{", "// ccsb = classContext", "ccsb", ".", "nl", "(", ")", ";", "ccsb", ".", "p", "(", "\" // Pass in data in a double[], pre-aligned to the Model's requirements.\"", ")", ".", "nl",...
Wrapper around the main predict call, including the signature and return value
[ "Wrapper", "around", "the", "main", "predict", "call", "including", "the", "signature", "and", "return", "value" ]
train
https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/water/Model.java#L696-L711
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/views/image/CompassImageView.java
CompassImageView.rotationUpdate
public void rotationUpdate(final float angleNew, final boolean animate) { """ Use this to set new "magnetic field" angle at which image should rotate @param angleNew new magnetic field angle, deg., relative to vertical axis. @param animate true, if image shoud rotate using animation, false to set new rotation...
java
public void rotationUpdate(final float angleNew, final boolean animate) { if (animate) { if (Math.abs(angle0 - angleNew) > ANGLE_DELTA_THRESHOLD) { angle0 = angleNew; this.invalidate(); } animationOn = true; } else { angle1 ...
[ "public", "void", "rotationUpdate", "(", "final", "float", "angleNew", ",", "final", "boolean", "animate", ")", "{", "if", "(", "animate", ")", "{", "if", "(", "Math", ".", "abs", "(", "angle0", "-", "angleNew", ")", ">", "ANGLE_DELTA_THRESHOLD", ")", "{...
Use this to set new "magnetic field" angle at which image should rotate @param angleNew new magnetic field angle, deg., relative to vertical axis. @param animate true, if image shoud rotate using animation, false to set new rotation instantly
[ "Use", "this", "to", "set", "new", "magnetic", "field", "angle", "at", "which", "image", "should", "rotate" ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/views/image/CompassImageView.java#L118-L133
JavaMoney/jsr354-ri-bp
src/main/java/org/javamoney/moneta/spi/base/BaseExchangeRateProvider.java
BaseExchangeRateProvider.isAvailable
public boolean isAvailable(String baseCode, String termCode) { """ Checks if an {@link javax.money.convert.ExchangeRate} between two {@link javax.money.CurrencyUnit} is available from this provider. This method should check, if a given rate is <i>currently</i> defined. @param baseCode the base currency code ...
java
public boolean isAvailable(String baseCode, String termCode){ return isAvailable(Monetary.getCurrency(baseCode), Monetary.getCurrency(termCode)); }
[ "public", "boolean", "isAvailable", "(", "String", "baseCode", ",", "String", "termCode", ")", "{", "return", "isAvailable", "(", "Monetary", ".", "getCurrency", "(", "baseCode", ")", ",", "Monetary", ".", "getCurrency", "(", "termCode", ")", ")", ";", "}" ]
Checks if an {@link javax.money.convert.ExchangeRate} between two {@link javax.money.CurrencyUnit} is available from this provider. This method should check, if a given rate is <i>currently</i> defined. @param baseCode the base currency code @param termCode the terminal/target currency code @return {@code true}, if su...
[ "Checks", "if", "an", "{", "@link", "javax", ".", "money", ".", "convert", ".", "ExchangeRate", "}", "between", "two", "{", "@link", "javax", ".", "money", ".", "CurrencyUnit", "}", "is", "available", "from", "this", "provider", ".", "This", "method", "s...
train
https://github.com/JavaMoney/jsr354-ri-bp/blob/9c147ef5623d8032a6dc4c0e5eefdfb41641a9a2/src/main/java/org/javamoney/moneta/spi/base/BaseExchangeRateProvider.java#L122-L124
Appendium/objectlabkit
utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java
BigDecimalUtil.ifNotNull
public static boolean ifNotNull(final BigDecimal bd, final Consumer<BigDecimal> consumer) { """ If the BigDecimal is not null call the consumer (depends on JDK8+) @param bd the BigDecimal @param consumer of the value, called if not null @return true if consumed @since 1.4.0 """ if (bd != null) { ...
java
public static boolean ifNotNull(final BigDecimal bd, final Consumer<BigDecimal> consumer) { if (bd != null) { consumer.accept(bd); return true; } return false; }
[ "public", "static", "boolean", "ifNotNull", "(", "final", "BigDecimal", "bd", ",", "final", "Consumer", "<", "BigDecimal", ">", "consumer", ")", "{", "if", "(", "bd", "!=", "null", ")", "{", "consumer", ".", "accept", "(", "bd", ")", ";", "return", "tr...
If the BigDecimal is not null call the consumer (depends on JDK8+) @param bd the BigDecimal @param consumer of the value, called if not null @return true if consumed @since 1.4.0
[ "If", "the", "BigDecimal", "is", "not", "null", "call", "the", "consumer", "(", "depends", "on", "JDK8", "+", ")" ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/BigDecimalUtil.java#L62-L68
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPOptionValueUtil.java
CPOptionValueUtil.removeByC_K
public static CPOptionValue removeByC_K(long CPOptionId, String key) throws com.liferay.commerce.product.exception.NoSuchCPOptionValueException { """ Removes the cp option value where CPOptionId = &#63; and key = &#63; from the database. @param CPOptionId the cp option ID @param key the key @return the cp o...
java
public static CPOptionValue removeByC_K(long CPOptionId, String key) throws com.liferay.commerce.product.exception.NoSuchCPOptionValueException { return getPersistence().removeByC_K(CPOptionId, key); }
[ "public", "static", "CPOptionValue", "removeByC_K", "(", "long", "CPOptionId", ",", "String", "key", ")", "throws", "com", ".", "liferay", ".", "commerce", ".", "product", ".", "exception", ".", "NoSuchCPOptionValueException", "{", "return", "getPersistence", "(",...
Removes the cp option value where CPOptionId = &#63; and key = &#63; from the database. @param CPOptionId the cp option ID @param key the key @return the cp option value that was removed
[ "Removes", "the", "cp", "option", "value", "where", "CPOptionId", "=", "&#63", ";", "and", "key", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/service/persistence/CPOptionValueUtil.java#L1024-L1027
sksamuel/scrimage
scrimage-filters/src/main/java/thirdparty/marvin/image/MarvinImage.java
MarvinImage.setIntColor
public void setIntColor(int x, int y, int alpha, int c0, int c1, int c2) { """ Sets the integer color in X an Y position @param x position @param y position @param c0 component 0 @param c1 component 1 @param c2 component 2 """ arrIntColor[((y * image.getWidth() + x))] = (alpha << 24) + ...
java
public void setIntColor(int x, int y, int alpha, int c0, int c1, int c2) { arrIntColor[((y * image.getWidth() + x))] = (alpha << 24) + (c0 << 16) + (c1 << 8) + c2; }
[ "public", "void", "setIntColor", "(", "int", "x", ",", "int", "y", ",", "int", "alpha", ",", "int", "c0", ",", "int", "c1", ",", "int", "c2", ")", "{", "arrIntColor", "[", "(", "(", "y", "*", "image", ".", "getWidth", "(", ")", "+", "x", ")", ...
Sets the integer color in X an Y position @param x position @param y position @param c0 component 0 @param c1 component 1 @param c2 component 2
[ "Sets", "the", "integer", "color", "in", "X", "an", "Y", "position" ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-filters/src/main/java/thirdparty/marvin/image/MarvinImage.java#L341-L346
voldemort/voldemort
src/java/voldemort/client/protocol/admin/BaseStreamingClient.java
BaseStreamingClient.streamingPut
@SuppressWarnings( { """ A Streaming Put call * @param key - The key @param value - The value """}) public synchronized void streamingPut(ByteArray key, Versioned<byte[]> value) { if(MARKED_BAD) { logger.error("Cannot stream more entries since Recovery Callback Failed!"); ...
java
@SuppressWarnings({}) public synchronized void streamingPut(ByteArray key, Versioned<byte[]> value) { if(MARKED_BAD) { logger.error("Cannot stream more entries since Recovery Callback Failed!"); throw new VoldemortException("Cannot stream more entries since Recovery Callback Failed!...
[ "@", "SuppressWarnings", "(", "{", "}", ")", "public", "synchronized", "void", "streamingPut", "(", "ByteArray", "key", ",", "Versioned", "<", "byte", "[", "]", ">", "value", ")", "{", "if", "(", "MARKED_BAD", ")", "{", "logger", ".", "error", "(", "\"...
A Streaming Put call * @param key - The key @param value - The value
[ "A", "Streaming", "Put", "call", "*", "@param", "key", "-", "The", "key" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/protocol/admin/BaseStreamingClient.java#L197-L209
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java
ItemImpl.removeVersionable
protected void removeVersionable() throws RepositoryException, ConstraintViolationException, VersionException { """ Check when it's a Node and is versionable will a version history removed. Case of last version in version history. @throws RepositoryException @throws ConstraintViolationException @throws Versi...
java
protected void removeVersionable() throws RepositoryException, ConstraintViolationException, VersionException { if (isNode()) { NodeTypeDataManager ntManager = session.getWorkspace().getNodeTypesHolder(); NodeData node = (NodeData)data; if (ntManager.isNodeType(Constants.MIX_VE...
[ "protected", "void", "removeVersionable", "(", ")", "throws", "RepositoryException", ",", "ConstraintViolationException", ",", "VersionException", "{", "if", "(", "isNode", "(", ")", ")", "{", "NodeTypeDataManager", "ntManager", "=", "session", ".", "getWorkspace", ...
Check when it's a Node and is versionable will a version history removed. Case of last version in version history. @throws RepositoryException @throws ConstraintViolationException @throws VersionException
[ "Check", "when", "it", "s", "a", "Node", "and", "is", "versionable", "will", "a", "version", "history", "removed", ".", "Case", "of", "last", "version", "in", "version", "history", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java#L379-L401
radkovo/SwingBox
src/main/java/org/fit/cssbox/swingbox/view/ElementBoxView.java
ElementBoxView.isAfter
@Override protected boolean isAfter(int x, int y, Rectangle innerAlloc) { """ Determines if a point falls after an allocated region. @param x the X coordinate >= 0 @param y the Y coordinate >= 0 @param innerAlloc the allocated region; this is the area inside of the insets @return true if the point lie...
java
@Override protected boolean isAfter(int x, int y, Rectangle innerAlloc) { // System.err.println("isAfter: " + innerAlloc + " my bounds " + // box.getAbsoluteBounds()); // System.err.println("XY: " + x + " : " + y); innerAlloc.setBounds(box.getAbsoluteBounds()); if (majorA...
[ "@", "Override", "protected", "boolean", "isAfter", "(", "int", "x", ",", "int", "y", ",", "Rectangle", "innerAlloc", ")", "{", "// System.err.println(\"isAfter: \" + innerAlloc + \" my bounds \" +", "// box.getAbsoluteBounds());", "// System.err.println(\"XY: \" + x + \" : \" + ...
Determines if a point falls after an allocated region. @param x the X coordinate >= 0 @param y the Y coordinate >= 0 @param innerAlloc the allocated region; this is the area inside of the insets @return true if the point lies after the region else false
[ "Determines", "if", "a", "point", "falls", "after", "an", "allocated", "region", "." ]
train
https://github.com/radkovo/SwingBox/blob/ff370f3dc54d248e4c8852c17513618c83c25984/src/main/java/org/fit/cssbox/swingbox/view/ElementBoxView.java#L623-L638
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java
SARLValidator.reportCastWarnings
protected void reportCastWarnings(JvmTypeReference concreteSyntax, LightweightTypeReference toType, LightweightTypeReference fromType) { """ Report the warnings associated to the casted expressions. @param concreteSyntax the type specified into the casted expression. @param toType the type specified into the c...
java
protected void reportCastWarnings(JvmTypeReference concreteSyntax, LightweightTypeReference toType, LightweightTypeReference fromType) { if (!isIgnored(OBSOLETE_CAST) && toType.isAssignableFrom(fromType)) { addIssue(MessageFormat.format(Messages.SARLValidator_96, fromType.getHumanReadableName(), toType.getHum...
[ "protected", "void", "reportCastWarnings", "(", "JvmTypeReference", "concreteSyntax", ",", "LightweightTypeReference", "toType", ",", "LightweightTypeReference", "fromType", ")", "{", "if", "(", "!", "isIgnored", "(", "OBSOLETE_CAST", ")", "&&", "toType", ".", "isAssi...
Report the warnings associated to the casted expressions. @param concreteSyntax the type specified into the casted expression. @param toType the type specified into the casted expression. @param fromType the type of the source expression.
[ "Report", "the", "warnings", "associated", "to", "the", "casted", "expressions", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/validation/SARLValidator.java#L3036-L3041
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureConverter.java
SignatureConverter.convertMethodSignature
public static String convertMethodSignature(JavaClass javaClass, Method method) { """ Convenience method for generating a method signature in human readable form. @param javaClass the class @param method the method """ return convertMethodSignature(javaClass.getClassName(), method.getName(), met...
java
public static String convertMethodSignature(JavaClass javaClass, Method method) { return convertMethodSignature(javaClass.getClassName(), method.getName(), method.getSignature()); }
[ "public", "static", "String", "convertMethodSignature", "(", "JavaClass", "javaClass", ",", "Method", "method", ")", "{", "return", "convertMethodSignature", "(", "javaClass", ".", "getClassName", "(", ")", ",", "method", ".", "getName", "(", ")", ",", "method",...
Convenience method for generating a method signature in human readable form. @param javaClass the class @param method the method
[ "Convenience", "method", "for", "generating", "a", "method", "signature", "in", "human", "readable", "form", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/SignatureConverter.java#L146-L148
javagl/ND
nd-arrays/src/main/java/de/javagl/nd/arrays/d/DoubleArraysND.java
DoubleArraysND.wrap
public static DoubleArrayND wrap(DoubleTuple t, IntTuple size) { """ Creates a <i>view</i> on the given tuple as a {@link DoubleArrayND}. Changes in the given tuple will be visible in the returned array. @param t The tuple @param size The size of the array @return The view on the tuple @throws NullPointerEx...
java
public static DoubleArrayND wrap(DoubleTuple t, IntTuple size) { Objects.requireNonNull(t, "The tuple is null"); Objects.requireNonNull(size, "The size is null"); int totalSize = IntTupleFunctions.reduce(size, 1, (a, b) -> a * b); if (t.getSize() != totalSize) { ...
[ "public", "static", "DoubleArrayND", "wrap", "(", "DoubleTuple", "t", ",", "IntTuple", "size", ")", "{", "Objects", ".", "requireNonNull", "(", "t", ",", "\"The tuple is null\"", ")", ";", "Objects", ".", "requireNonNull", "(", "size", ",", "\"The size is null\"...
Creates a <i>view</i> on the given tuple as a {@link DoubleArrayND}. Changes in the given tuple will be visible in the returned array. @param t The tuple @param size The size of the array @return The view on the tuple @throws NullPointerException If any argument is <code>null</code> @throws IllegalArgumentException If...
[ "Creates", "a", "<i", ">", "view<", "/", "i", ">", "on", "the", "given", "tuple", "as", "a", "{", "@link", "DoubleArrayND", "}", ".", "Changes", "in", "the", "given", "tuple", "will", "be", "visible", "in", "the", "returned", "array", "." ]
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-arrays/src/main/java/de/javagl/nd/arrays/d/DoubleArraysND.java#L112-L124
indeedeng/util
util-core/src/main/java/com/indeed/util/core/sort/Quicksortables.java
Quicksortables.partialSortUsingHeap
public static void partialSortUsingHeap(Quicksortable q, int k, int size) { """ finds the lowest k elements of q and stores them in sorted order at the beginning of q by using a heap of size k @param q The quicksortable to heapsort. @param k The number of elements to sort at the beginning of the quicksortabl...
java
public static void partialSortUsingHeap(Quicksortable q, int k, int size) { Quicksortable revq = reverseQuicksortable(q); makeHeap(revq, k); for (int i = k; i < size; i++) { if (q.compare(0, i) > 0) { q.swap(0, i); heapifyDown(revq, 0, k); ...
[ "public", "static", "void", "partialSortUsingHeap", "(", "Quicksortable", "q", ",", "int", "k", ",", "int", "size", ")", "{", "Quicksortable", "revq", "=", "reverseQuicksortable", "(", "q", ")", ";", "makeHeap", "(", "revq", ",", "k", ")", ";", "for", "(...
finds the lowest k elements of q and stores them in sorted order at the beginning of q by using a heap of size k @param q The quicksortable to heapsort. @param k The number of elements to sort at the beginning of the quicksortable. @param size The size of the quicksortable.
[ "finds", "the", "lowest", "k", "elements", "of", "q", "and", "stores", "them", "in", "sorted", "order", "at", "the", "beginning", "of", "q", "by", "using", "a", "heap", "of", "size", "k" ]
train
https://github.com/indeedeng/util/blob/332008426cf14b57e7fc3e817d9423e3f84fb922/util-core/src/main/java/com/indeed/util/core/sort/Quicksortables.java#L269-L279
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/classfile/MethodUtils.java
MethodUtils.findMethod
private static Method findMethod(Class<?> clazz, Method method) { """ Find the specified method on the given class. If not specified, then <code>null</code> is returned. Otherwise, the associated method is returned. The specified method definition does not need to be from the specified class. This method is...
java
private static Method findMethod(Class<?> clazz, Method method) { try { return clazz.getMethod(method.getName(), method.getParameterTypes()); } catch (NoSuchMethodException e) { return null; } }
[ "private", "static", "Method", "findMethod", "(", "Class", "<", "?", ">", "clazz", ",", "Method", "method", ")", "{", "try", "{", "return", "clazz", ".", "getMethod", "(", "method", ".", "getName", "(", ")", ",", "method", ".", "getParameterTypes", "(", ...
Find the specified method on the given class. If not specified, then <code>null</code> is returned. Otherwise, the associated method is returned. The specified method definition does not need to be from the specified class. This method is usually used to check a method defined in an interface or superclass on anoth...
[ "Find", "the", "specified", "method", "on", "the", "given", "class", ".", "If", "not", "specified", "then", "<code", ">", "null<", "/", "code", ">", "is", "returned", ".", "Otherwise", "the", "associated", "method", "is", "returned", ".", "The", "specified...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/classfile/MethodUtils.java#L184-L192
hawtio/hawtio
platforms/hawtio-osgi-jmx/src/main/java/io/hawt/osgi/jmx/RBACDecorator.java
RBACDecorator.decorateCanInvoke
@SuppressWarnings("unchecked") private void decorateCanInvoke(Map<String, Object> mBeanInfo, String method, boolean canInvoke) { """ Decorates {@link MBeanInfo} operations with "canInvoke" entries. Note both "op" and "opByString" may be used in HawtIO. @param mBeanInfo @param method @param canInvoke ""...
java
@SuppressWarnings("unchecked") private void decorateCanInvoke(Map<String, Object> mBeanInfo, String method, boolean canInvoke) { LOG.trace("decorateCanInvoke: {} - {}", method, canInvoke); // op String[] methodNameAndArgs = method.split("[()]"); Object op = ((Map<String, Object>) mB...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "decorateCanInvoke", "(", "Map", "<", "String", ",", "Object", ">", "mBeanInfo", ",", "String", "method", ",", "boolean", "canInvoke", ")", "{", "LOG", ".", "trace", "(", "\"decorateCanInvo...
Decorates {@link MBeanInfo} operations with "canInvoke" entries. Note both "op" and "opByString" may be used in HawtIO. @param mBeanInfo @param method @param canInvoke
[ "Decorates", "{" ]
train
https://github.com/hawtio/hawtio/blob/d8b1c8f246307c0313ba297a494106d0859f3ffd/platforms/hawtio-osgi-jmx/src/main/java/io/hawt/osgi/jmx/RBACDecorator.java#L480-L508
ironjacamar/ironjacamar
deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java
AbstractResourceAdapterDeployer.getTransactionSupport
private TransactionSupportEnum getTransactionSupport(Connector connector, Activation activation) { """ Get the transaction support level @param connector The spec metadata @param activation The activation @return True if XA, otherwise false """ if (activation.getTransactionSupport() != null) ...
java
private TransactionSupportEnum getTransactionSupport(Connector connector, Activation activation) { if (activation.getTransactionSupport() != null) return activation.getTransactionSupport(); if (connector.getResourceadapter().getOutboundResourceadapter() != null) return connector.getRes...
[ "private", "TransactionSupportEnum", "getTransactionSupport", "(", "Connector", "connector", ",", "Activation", "activation", ")", "{", "if", "(", "activation", ".", "getTransactionSupport", "(", ")", "!=", "null", ")", "return", "activation", ".", "getTransactionSupp...
Get the transaction support level @param connector The spec metadata @param activation The activation @return True if XA, otherwise false
[ "Get", "the", "transaction", "support", "level" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/deployers/src/main/java/org/ironjacamar/deployers/common/AbstractResourceAdapterDeployer.java#L923-L933
spring-projects/spring-boot
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/ConnectionInputStream.java
ConnectionInputStream.readHeader
public String readHeader() throws IOException { """ Read the HTTP header from the {@link InputStream}. Note: This method doesn't expect any HTTP content after the header since the initial request is usually just a WebSocket upgrade. @return the HTTP header @throws IOException in case of I/O errors """ by...
java
public String readHeader() throws IOException { byte[] buffer = new byte[BUFFER_SIZE]; StringBuilder content = new StringBuilder(BUFFER_SIZE); while (content.indexOf(HEADER_END) == -1) { int amountRead = checkedRead(buffer, 0, BUFFER_SIZE); content.append(new String(buffer, 0, amountRead)); } return con...
[ "public", "String", "readHeader", "(", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "BUFFER_SIZE", "]", ";", "StringBuilder", "content", "=", "new", "StringBuilder", "(", "BUFFER_SIZE", ")", ";", "while", "(", "co...
Read the HTTP header from the {@link InputStream}. Note: This method doesn't expect any HTTP content after the header since the initial request is usually just a WebSocket upgrade. @return the HTTP header @throws IOException in case of I/O errors
[ "Read", "the", "HTTP", "header", "from", "the", "{" ]
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/livereload/ConnectionInputStream.java#L45-L53
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java
DockerAgentUtils.getParentIdFromAgent
public static String getParentIdFromAgent(Launcher launcher, final String imageID, final String host) throws IOException, InterruptedException { """ Get image parent ID from imageID on the current agent. @param imageID @return """ return launcher.getChannel().call(new MasterToSlaveCallable<String, ...
java
public static String getParentIdFromAgent(Launcher launcher, final String imageID, final String host) throws IOException, InterruptedException { return launcher.getChannel().call(new MasterToSlaveCallable<String, IOException>() { public String call() throws IOException { return Docke...
[ "public", "static", "String", "getParentIdFromAgent", "(", "Launcher", "launcher", ",", "final", "String", "imageID", ",", "final", "String", "host", ")", "throws", "IOException", ",", "InterruptedException", "{", "return", "launcher", ".", "getChannel", "(", ")",...
Get image parent ID from imageID on the current agent. @param imageID @return
[ "Get", "image", "parent", "ID", "from", "imageID", "on", "the", "current", "agent", "." ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java#L292-L298
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.handle
public static boolean handle(File zip, String name, ZipEntryCallback action) { """ Reads the given ZIP file and executes the given action for a single entry. @param zip input ZIP file. @param name entry name. @param action action to be called for this entry. @return <code>true</code> if the entry was foun...
java
public static boolean handle(File zip, String name, ZipEntryCallback action) { ZipFile zf = null; try { zf = new ZipFile(zip); ZipEntry ze = zf.getEntry(name); if (ze == null) { return false; // entry not found } InputStream in = new BufferedInputStream(zf.getInputStream(...
[ "public", "static", "boolean", "handle", "(", "File", "zip", ",", "String", "name", ",", "ZipEntryCallback", "action", ")", "{", "ZipFile", "zf", "=", "null", ";", "try", "{", "zf", "=", "new", "ZipFile", "(", "zip", ")", ";", "ZipEntry", "ze", "=", ...
Reads the given ZIP file and executes the given action for a single entry. @param zip input ZIP file. @param name entry name. @param action action to be called for this entry. @return <code>true</code> if the entry was found, <code>false</code> if the entry was not found. @see ZipEntryCallback
[ "Reads", "the", "given", "ZIP", "file", "and", "executes", "the", "given", "action", "for", "a", "single", "entry", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L847-L872
HubSpot/jinjava
src/main/java/com/hubspot/jinjava/interpret/JinjavaInterpreter.java
JinjavaInterpreter.resolveObject
public Object resolveObject(String variable, int lineNumber, int startPosition) { """ Resolve a variable into an object value. If given a string literal (e.g. 'foo' or "foo"), this method returns the literal unquoted. If the variable is undefined in the context, this method returns the given variable string. @p...
java
public Object resolveObject(String variable, int lineNumber, int startPosition) { if (StringUtils.isBlank(variable)) { return ""; } if (WhitespaceUtils.isQuoted(variable)) { return WhitespaceUtils.unquote(variable); } else { Object val = retraceVariable(variable, lineNumber, startPosit...
[ "public", "Object", "resolveObject", "(", "String", "variable", ",", "int", "lineNumber", ",", "int", "startPosition", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "variable", ")", ")", "{", "return", "\"\"", ";", "}", "if", "(", "WhitespaceUti...
Resolve a variable into an object value. If given a string literal (e.g. 'foo' or "foo"), this method returns the literal unquoted. If the variable is undefined in the context, this method returns the given variable string. @param variable name of variable in context @param lineNumber current line number, for error re...
[ "Resolve", "a", "variable", "into", "an", "object", "value", ".", "If", "given", "a", "string", "literal", "(", "e", ".", "g", ".", "foo", "or", "foo", ")", "this", "method", "returns", "the", "literal", "unquoted", ".", "If", "the", "variable", "is", ...
train
https://github.com/HubSpot/jinjava/blob/ce570935630f49c666170d2330b0b9ba4eddb955/src/main/java/com/hubspot/jinjava/interpret/JinjavaInterpreter.java#L359-L372
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/NetUtil.java
NetUtil.getInputStreamHttp
public static InputStream getInputStreamHttp(URL pURL, Properties pProperties, boolean pFollowRedirects, int pTimeout) throws IOException { """ Gets the InputStream from a given URL, with the given timeout. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout. Supports bas...
java
public static InputStream getInputStreamHttp(URL pURL, Properties pProperties, boolean pFollowRedirects, int pTimeout) throws IOException { // Open the connection, and get the stream HttpURLConnection conn = createHttpURLConnection(pURL, pProperties, pFollowRedirects, pTimeout); //...
[ "public", "static", "InputStream", "getInputStreamHttp", "(", "URL", "pURL", ",", "Properties", "pProperties", ",", "boolean", "pFollowRedirects", ",", "int", "pTimeout", ")", "throws", "IOException", "{", "// Open the connection, and get the stream", "HttpURLConnection", ...
Gets the InputStream from a given URL, with the given timeout. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout. Supports basic HTTP authentication, using a URL string similar to most browsers. <P/> <SMALL>Implementation note: If the timeout parameter is greater than 0, this method uses ...
[ "Gets", "the", "InputStream", "from", "a", "given", "URL", "with", "the", "given", "timeout", ".", "The", "timeout", "must", "be", ">", "0", ".", "A", "timeout", "of", "zero", "is", "interpreted", "as", "an", "infinite", "timeout", ".", "Supports", "basi...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/net/NetUtil.java#L705-L722
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/DateUtils.java
DateUtils.parseDate
public static Date parseDate(String str, String... parsePatterns) throws ParseException { """ <p>Parses a string representing a date by trying a variety of different parsers.</p> <p/> <p>The parse will try each parse pattern in turn. A parse is only deemed successful if it parses the whole of the input string. ...
java
public static Date parseDate(String str, String... parsePatterns) throws ParseException { return parseDate(str, null, parsePatterns); }
[ "public", "static", "Date", "parseDate", "(", "String", "str", ",", "String", "...", "parsePatterns", ")", "throws", "ParseException", "{", "return", "parseDate", "(", "str", ",", "null", ",", "parsePatterns", ")", ";", "}" ]
<p>Parses a string representing a date by trying a variety of different parsers.</p> <p/> <p>The parse will try each parse pattern in turn. A parse is only deemed successful if it parses the whole of the input string. If no parse patterns match, a ParseException is thrown.</p> The parser will be lenient toward the pars...
[ "<p", ">", "Parses", "a", "string", "representing", "a", "date", "by", "trying", "a", "variety", "of", "different", "parsers", ".", "<", "/", "p", ">", "<p", "/", ">", "<p", ">", "The", "parse", "will", "try", "each", "parse", "pattern", "in", "turn"...
train
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/DateUtils.java#L49-L51
future-architect/uroborosql
src/main/java/jp/co/future/uroborosql/coverage/PassedRoute.java
PassedRoute.appendBranchState
public void appendBranchState(int start, int end, BranchCoverageState state) { """ 分岐情報追加 @param start 開始位置(文字index) @param end 終了位置(文字index) @param state カバレッジ状態 """ this.passed.put(new Range(start, end), state); }
java
public void appendBranchState(int start, int end, BranchCoverageState state) { this.passed.put(new Range(start, end), state); }
[ "public", "void", "appendBranchState", "(", "int", "start", ",", "int", "end", ",", "BranchCoverageState", "state", ")", "{", "this", ".", "passed", ".", "put", "(", "new", "Range", "(", "start", ",", "end", ")", ",", "state", ")", ";", "}" ]
分岐情報追加 @param start 開始位置(文字index) @param end 終了位置(文字index) @param state カバレッジ状態
[ "分岐情報追加" ]
train
https://github.com/future-architect/uroborosql/blob/4c26db51defdac3c6ed16866e33ab45e190e2e0c/src/main/java/jp/co/future/uroborosql/coverage/PassedRoute.java#L35-L37
openbase/jul
extension/protobuf/src/main/java/org/openbase/jul/extension/protobuf/ProtoBufBuilderProcessor.java
ProtoBufBuilderProcessor.addDefaultInstanceToRepeatedField
public static Message.Builder addDefaultInstanceToRepeatedField(final Descriptors.FieldDescriptor repeatedFieldDescriptor, final Message.Builder builder) throws CouldNotPerformException { """ Method adds a new default message instance to the repeated field and return it's builder instance. @param repeatedFieldDes...
java
public static Message.Builder addDefaultInstanceToRepeatedField(final Descriptors.FieldDescriptor repeatedFieldDescriptor, final Message.Builder builder) throws CouldNotPerformException { if (repeatedFieldDescriptor == null) { throw new NotAvailableException("repeatedFieldDescriptor"); } ...
[ "public", "static", "Message", ".", "Builder", "addDefaultInstanceToRepeatedField", "(", "final", "Descriptors", ".", "FieldDescriptor", "repeatedFieldDescriptor", ",", "final", "Message", ".", "Builder", "builder", ")", "throws", "CouldNotPerformException", "{", "if", ...
Method adds a new default message instance to the repeated field and return it's builder instance. @param repeatedFieldDescriptor The field descriptor of the repeated field. @param builder The builder instance of the message which contains the repeated field. @return The builder instance of the new added message is ret...
[ "Method", "adds", "a", "new", "default", "message", "instance", "to", "the", "repeated", "field", "and", "return", "it", "s", "builder", "instance", "." ]
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/protobuf/src/main/java/org/openbase/jul/extension/protobuf/ProtoBufBuilderProcessor.java#L124-L129
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/squares/SquareGridTools.java
SquareGridTools.findIntersection
protected int findIntersection( SquareNode target , SquareNode node ) { """ Finds the side which intersects the line segment from the center of target to center of node """ lineCenters.a = target.center; lineCenters.b = node.center; for (int i = 0; i < 4; i++) { int j = (i+1)%4; lineSide.a = targ...
java
protected int findIntersection( SquareNode target , SquareNode node ) { lineCenters.a = target.center; lineCenters.b = node.center; for (int i = 0; i < 4; i++) { int j = (i+1)%4; lineSide.a = target.square.get(i); lineSide.b = target.square.get(j); if(Intersection2D_F64.intersection(lineCenters,lin...
[ "protected", "int", "findIntersection", "(", "SquareNode", "target", ",", "SquareNode", "node", ")", "{", "lineCenters", ".", "a", "=", "target", ".", "center", ";", "lineCenters", ".", "b", "=", "node", ".", "center", ";", "for", "(", "int", "i", "=", ...
Finds the side which intersects the line segment from the center of target to center of node
[ "Finds", "the", "side", "which", "intersects", "the", "line", "segment", "from", "the", "center", "of", "target", "to", "center", "of", "node" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/squares/SquareGridTools.java#L326-L341
joniles/mpxj
src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java
FastTrackData.readBlock
private void readBlock(int blockIndex, int startIndex, int blockLength) throws Exception { """ Read a block of data from the FastTrack file and determine if it contains a table definition, or columns. @param blockIndex index of the current block @param startIndex start index of the block in the file @param b...
java
private void readBlock(int blockIndex, int startIndex, int blockLength) throws Exception { logBlock(blockIndex, startIndex, blockLength); if (blockLength < 128) { readTableBlock(startIndex, blockLength); } else { readColumnBlock(startIndex, blockLength); }...
[ "private", "void", "readBlock", "(", "int", "blockIndex", ",", "int", "startIndex", ",", "int", "blockLength", ")", "throws", "Exception", "{", "logBlock", "(", "blockIndex", ",", "startIndex", ",", "blockLength", ")", ";", "if", "(", "blockLength", "<", "12...
Read a block of data from the FastTrack file and determine if it contains a table definition, or columns. @param blockIndex index of the current block @param startIndex start index of the block in the file @param blockLength block length
[ "Read", "a", "block", "of", "data", "from", "the", "FastTrack", "file", "and", "determine", "if", "it", "contains", "a", "table", "definition", "or", "columns", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/fasttrack/FastTrackData.java#L141-L153
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java
FieldUtils.getDeclaredField
public static Field getDeclaredField(final Class<?> cls, final String fieldName) { """ Gets an accessible {@link Field} by name respecting scope. Only the specified class will be considered. @param cls the {@link Class} to reflect, must not be {@code null} @param fieldName the field name to obtain @return t...
java
public static Field getDeclaredField(final Class<?> cls, final String fieldName) { return getDeclaredField(cls, fieldName, false); }
[ "public", "static", "Field", "getDeclaredField", "(", "final", "Class", "<", "?", ">", "cls", ",", "final", "String", "fieldName", ")", "{", "return", "getDeclaredField", "(", "cls", ",", "fieldName", ",", "false", ")", ";", "}" ]
Gets an accessible {@link Field} by name respecting scope. Only the specified class will be considered. @param cls the {@link Class} to reflect, must not be {@code null} @param fieldName the field name to obtain @return the Field object @throws IllegalArgumentException if the class is {@code null}, or the field name i...
[ "Gets", "an", "accessible", "{", "@link", "Field", "}", "by", "name", "respecting", "scope", ".", "Only", "the", "specified", "class", "will", "be", "considered", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java#L151-L153
timewalker74/ffmq
core/src/main/java/net/timewalker/ffmq4/common/session/AbstractSession.java
AbstractSession.checkTemporaryDestinationScope
public final void checkTemporaryDestinationScope( Destination destination ) throws JMSException { """ Check temporary destinations scope (JMS Spec 4.4.3 p2) @param destination destination to check """ if (destination instanceof LocalQueue) { LocalQueue localQueue = (LocalQueue)destination; ...
java
public final void checkTemporaryDestinationScope( Destination destination ) throws JMSException { if (destination instanceof LocalQueue) { LocalQueue localQueue = (LocalQueue)destination; if (localQueue.isTemporary() && !connection.isRegisteredTemporaryQueue(localQueue.getQueueName())) ...
[ "public", "final", "void", "checkTemporaryDestinationScope", "(", "Destination", "destination", ")", "throws", "JMSException", "{", "if", "(", "destination", "instanceof", "LocalQueue", ")", "{", "LocalQueue", "localQueue", "=", "(", "LocalQueue", ")", "destination", ...
Check temporary destinations scope (JMS Spec 4.4.3 p2) @param destination destination to check
[ "Check", "temporary", "destinations", "scope", "(", "JMS", "Spec", "4", ".", "4", ".", "3", "p2", ")" ]
train
https://github.com/timewalker74/ffmq/blob/638773ee29a4a5f9c6119ed74ad14ac9c46382b3/core/src/main/java/net/timewalker/ffmq4/common/session/AbstractSession.java#L167-L184
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java
SpecNodeWithRelationships.addRelationshipToTopic
public void addRelationshipToTopic(final SpecTopic topic, final RelationshipType type) { """ Add a relationship to the topic. @param topic The topic that is to be related to. @param type The type of the relationship. """ final TopicRelationship relationship = new TopicRelationship(this, topic, typ...
java
public void addRelationshipToTopic(final SpecTopic topic, final RelationshipType type) { final TopicRelationship relationship = new TopicRelationship(this, topic, type); topicRelationships.add(relationship); relationships.add(relationship); }
[ "public", "void", "addRelationshipToTopic", "(", "final", "SpecTopic", "topic", ",", "final", "RelationshipType", "type", ")", "{", "final", "TopicRelationship", "relationship", "=", "new", "TopicRelationship", "(", "this", ",", "topic", ",", "type", ")", ";", "...
Add a relationship to the topic. @param topic The topic that is to be related to. @param type The type of the relationship.
[ "Add", "a", "relationship", "to", "the", "topic", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L57-L61
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/objects/DwgVertex2D.java
DwgVertex2D.readDwgVertex2DV15
public void readDwgVertex2DV15(int[] data, int offset) throws Exception { """ Read a Vertex2D in the DWG format Version 15 @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in ...
java
public void readDwgVertex2DV15(int[] data, int offset) throws Exception { //System.out.println("readDwgVertex2D executing ..."); int bitPos = offset; bitPos = readObjectHeaderV15(data, bitPos); Vector v = DwgUtil.getRawChar(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); int flags = ((Integer)v.get(...
[ "public", "void", "readDwgVertex2DV15", "(", "int", "[", "]", "data", ",", "int", "offset", ")", "throws", "Exception", "{", "//System.out.println(\"readDwgVertex2D executing ...\");", "int", "bitPos", "=", "offset", ";", "bitPos", "=", "readObjectHeaderV15", "(", "...
Read a Vertex2D in the DWG format Version 15 @param data Array of unsigned bytes obtained from the DWG binary file @param offset The current bit offset where the value begins @throws Exception If an unexpected bit value is found in the DWG file. Occurs when we are looking for LwPolylines.
[ "Read", "a", "Vertex2D", "in", "the", "DWG", "format", "Version", "15" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/objects/DwgVertex2D.java#L47-L89
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/core/util/ReflectionUtils.java
ReflectionUtils.getAnnotation
public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationClass) { """ Returns an annotation by type from a method. @param method is the method to find @param annotationClass is the type of annotation @param <A> is the type of annotation @return annotation if it is found """ ...
java
public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationClass) { A annotation = method.getAnnotation(annotationClass); if (annotation == null) { for (Annotation metaAnnotation : method.getAnnotations()) { annotation = metaAnnotation.annotationTy...
[ "public", "static", "<", "A", "extends", "Annotation", ">", "A", "getAnnotation", "(", "Method", "method", ",", "Class", "<", "A", ">", "annotationClass", ")", "{", "A", "annotation", "=", "method", ".", "getAnnotation", "(", "annotationClass", ")", ";", "...
Returns an annotation by type from a method. @param method is the method to find @param annotationClass is the type of annotation @param <A> is the type of annotation @return annotation if it is found
[ "Returns", "an", "annotation", "by", "type", "from", "a", "method", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.openapi/src/com/ibm/ws/microprofile/openapi/impl/core/util/ReflectionUtils.java#L215-L230
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator._generate
protected XExpression _generate(XAssignment assignment, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param assignment the assignment operator. @param it the target for the generated content. @param context the context. @return the assignment. """ appendRetur...
java
protected XExpression _generate(XAssignment assignment, IAppendable it, IExtraLanguageGeneratorContext context) { appendReturnIfExpectedReturnedExpression(it, context); it.append("("); //$NON-NLS-1$ newFeatureCallGenerator(context, it).generate(assignment); it.append(" = "); //$NON-NLS-1$ generate(assignment....
[ "protected", "XExpression", "_generate", "(", "XAssignment", "assignment", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "appendReturnIfExpectedReturnedExpression", "(", "it", ",", "context", ")", ";", "it", ".", "append", "(", ...
Generate the given object. @param assignment the assignment operator. @param it the target for the generated content. @param context the context. @return the assignment.
[ "Generate", "the", "given", "object", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L424-L432
elki-project/elki
addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java
XSplitter.add2MBR
private void add2MBR(int[] entrySorting, double[] ub, double[] lb, int index) { """ Adds the minimum and maximum bounds of the MBR of entry number <code>entrySorting[index]</code> to the dimension-wise upper and lower bounds, <code>ub</code> and <code>lb</code>. Note that if this method is called for <code>ub</...
java
private void add2MBR(int[] entrySorting, double[] ub, double[] lb, int index) { SpatialComparable currMBR = node.getEntry(entrySorting[index]); for(int d = 0; d < currMBR.getDimensionality(); d++) { double max = currMBR.getMax(d); if(max > ub[d]) { ub[d] = max; } double min = cur...
[ "private", "void", "add2MBR", "(", "int", "[", "]", "entrySorting", ",", "double", "[", "]", "ub", ",", "double", "[", "]", "lb", ",", "int", "index", ")", "{", "SpatialComparable", "currMBR", "=", "node", ".", "getEntry", "(", "entrySorting", "[", "in...
Adds the minimum and maximum bounds of the MBR of entry number <code>entrySorting[index]</code> to the dimension-wise upper and lower bounds, <code>ub</code> and <code>lb</code>. Note that if this method is called for <code>ub</code> and <code>lb</code> which are already owned by an MBR, this update operation also upda...
[ "Adds", "the", "minimum", "and", "maximum", "bounds", "of", "the", "MBR", "of", "entry", "number", "<code", ">", "entrySorting", "[", "index", "]", "<", "/", "code", ">", "to", "the", "dimension", "-", "wise", "upper", "and", "lower", "bounds", "<code", ...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java#L270-L282
schallee/alib4j
core/src/main/java/net/darkmist/alib/res/PkgRes.java
PkgRes.getString
public String getString(String name) { """ Gets a resource as a String @param name The name of the resource. @return The contents of the resource converted to a string with the default encoding. @throws NullPointerException if name is null. ResourceException if the resource cannot be found or there is a erro...
java
public String getString(String name) { InputStream in = null; if(name == null) throw new NullPointerException("name is null"); try { if((in = loader.getResourceAsStream(prefix + name))==null) throw new ResourceException("Unable to find resource for " + name); return IOUtils.toString(in); } ca...
[ "public", "String", "getString", "(", "String", "name", ")", "{", "InputStream", "in", "=", "null", ";", "if", "(", "name", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"name is null\"", ")", ";", "try", "{", "if", "(", "(", "in", ...
Gets a resource as a String @param name The name of the resource. @return The contents of the resource converted to a string with the default encoding. @throws NullPointerException if name is null. ResourceException if the resource cannot be found or there is a error reading it.
[ "Gets", "a", "resource", "as", "a", "String" ]
train
https://github.com/schallee/alib4j/blob/0e0718aee574bbb62268e1cf58e99286529ce529/core/src/main/java/net/darkmist/alib/res/PkgRes.java#L328-L348
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addNotLikeIgnoresCaseCondition
protected void addNotLikeIgnoresCaseCondition(final String propertyName, final String value) { """ Add a Field Search Condition that will search a field for values that aren't like a specified value using the following SQL logic: {@code LOWER(field) NOT LIKE LOWER('%value%')} @param propertyName The name of th...
java
protected void addNotLikeIgnoresCaseCondition(final String propertyName, final String value) { final Expression<String> propertyNameField = getCriteriaBuilder().lower(getRootPath().get(propertyName).as(String.class)); fieldConditions.add(getCriteriaBuilder().notLike(propertyNameField, "%" + cleanLikeCon...
[ "protected", "void", "addNotLikeIgnoresCaseCondition", "(", "final", "String", "propertyName", ",", "final", "String", "value", ")", "{", "final", "Expression", "<", "String", ">", "propertyNameField", "=", "getCriteriaBuilder", "(", ")", ".", "lower", "(", "getRo...
Add a Field Search Condition that will search a field for values that aren't like a specified value using the following SQL logic: {@code LOWER(field) NOT LIKE LOWER('%value%')} @param propertyName The name of the field as defined in the Entity mapping class. @param value The value to search against.
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "search", "a", "field", "for", "values", "that", "aren", "t", "like", "a", "specified", "value", "using", "the", "following", "SQL", "logic", ":", "{", "@code", "LOWER", "(", "field", ")", "NOT"...
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L235-L238
googleapis/google-cloud-java
google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/UnixPath.java
UnixPath.getName
public UnixPath getName(int index) { """ Returns component in {@code path} at {@code index}. @see java.nio.file.Path#getName(int) """ if (path.isEmpty()) { return this; } try { return new UnixPath(permitEmptyComponents, getParts().get(index)); } catch (IndexOutOfBoundsException e...
java
public UnixPath getName(int index) { if (path.isEmpty()) { return this; } try { return new UnixPath(permitEmptyComponents, getParts().get(index)); } catch (IndexOutOfBoundsException e) { throw new IllegalArgumentException(); } }
[ "public", "UnixPath", "getName", "(", "int", "index", ")", "{", "if", "(", "path", ".", "isEmpty", "(", ")", ")", "{", "return", "this", ";", "}", "try", "{", "return", "new", "UnixPath", "(", "permitEmptyComponents", ",", "getParts", "(", ")", ".", ...
Returns component in {@code path} at {@code index}. @see java.nio.file.Path#getName(int)
[ "Returns", "component", "in", "{", "@code", "path", "}", "at", "{", "@code", "index", "}", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/UnixPath.java#L242-L251
ronmamo/reflections
src/main/java/org/reflections/Store.java
Store.getAll
public Iterable<String> getAll(String index, Iterable<String> keys) { """ recursively get the values stored for the given {@code index} and {@code keys}, not including keys """ return getAllIncluding(index, get(index, keys), new IterableChain<String>()); }
java
public Iterable<String> getAll(String index, Iterable<String> keys) { return getAllIncluding(index, get(index, keys), new IterableChain<String>()); }
[ "public", "Iterable", "<", "String", ">", "getAll", "(", "String", "index", ",", "Iterable", "<", "String", ">", "keys", ")", "{", "return", "getAllIncluding", "(", "index", ",", "get", "(", "index", ",", "keys", ")", ",", "new", "IterableChain", "<", ...
recursively get the values stored for the given {@code index} and {@code keys}, not including keys
[ "recursively", "get", "the", "values", "stored", "for", "the", "given", "{" ]
train
https://github.com/ronmamo/reflections/blob/084cf4a759a06d88e88753ac00397478c2e0ed52/src/main/java/org/reflections/Store.java#L96-L98
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/RandomUtil.java
RandomUtil.randomBigDecimal
public static BigDecimal randomBigDecimal(BigDecimal min, BigDecimal max) { """ 获得指定范围内的随机数 @param min 最小数(包含) @param max 最大数(不包含) @return 随机数 @since 4.0.9 """ return NumberUtil.toBigDecimal(getRandom().nextDouble(min.doubleValue(), max.doubleValue())); }
java
public static BigDecimal randomBigDecimal(BigDecimal min, BigDecimal max) { return NumberUtil.toBigDecimal(getRandom().nextDouble(min.doubleValue(), max.doubleValue())); }
[ "public", "static", "BigDecimal", "randomBigDecimal", "(", "BigDecimal", "min", ",", "BigDecimal", "max", ")", "{", "return", "NumberUtil", ".", "toBigDecimal", "(", "getRandom", "(", ")", ".", "nextDouble", "(", "min", ".", "doubleValue", "(", ")", ",", "ma...
获得指定范围内的随机数 @param min 最小数(包含) @param max 最大数(不包含) @return 随机数 @since 4.0.9
[ "获得指定范围内的随机数" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/RandomUtil.java#L239-L241
rometools/rome
rome/src/main/java/com/rometools/rome/io/impl/DateParser.java
DateParser.parseDate
public static Date parseDate(final String sDate, final Locale locale) { """ Parses a Date out of a String with a date in W3C date-time format or in a RFC822 format. <p> @param sDate string to parse for a date. @return the Date represented by the given W3C date-time string. It returns <b>null</b> if it was no...
java
public static Date parseDate(final String sDate, final Locale locale) { Date date = parseW3CDateTime(sDate, locale); if (date == null) { date = parseRFC822(sDate, locale); if (date == null && ADDITIONAL_MASKS.length > 0) { date = parseUsingMask(ADDITIONAL_MASKS, s...
[ "public", "static", "Date", "parseDate", "(", "final", "String", "sDate", ",", "final", "Locale", "locale", ")", "{", "Date", "date", "=", "parseW3CDateTime", "(", "sDate", ",", "locale", ")", ";", "if", "(", "date", "==", "null", ")", "{", "date", "="...
Parses a Date out of a String with a date in W3C date-time format or in a RFC822 format. <p> @param sDate string to parse for a date. @return the Date represented by the given W3C date-time string. It returns <b>null</b> if it was not possible to parse the given string into a Date.
[ "Parses", "a", "Date", "out", "of", "a", "String", "with", "a", "date", "in", "W3C", "date", "-", "time", "format", "or", "in", "a", "RFC822", "format", ".", "<p", ">" ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome/src/main/java/com/rometools/rome/io/impl/DateParser.java#L229-L238
google/closure-templates
java/src/com/google/template/soy/base/SourceLocation.java
SourceLocation.extend
public SourceLocation extend(SourceLocation other) { """ Returns a new SourceLocation that starts where this SourceLocation starts and ends where {@code other} ends. """ checkState( filePath.equals(other.filePath), "Mismatched files paths: %s and %s", filePath, other.filePa...
java
public SourceLocation extend(SourceLocation other) { checkState( filePath.equals(other.filePath), "Mismatched files paths: %s and %s", filePath, other.filePath); return new SourceLocation(filePath, begin, other.end); }
[ "public", "SourceLocation", "extend", "(", "SourceLocation", "other", ")", "{", "checkState", "(", "filePath", ".", "equals", "(", "other", ".", "filePath", ")", ",", "\"Mismatched files paths: %s and %s\"", ",", "filePath", ",", "other", ".", "filePath", ")", "...
Returns a new SourceLocation that starts where this SourceLocation starts and ends where {@code other} ends.
[ "Returns", "a", "new", "SourceLocation", "that", "starts", "where", "this", "SourceLocation", "starts", "and", "ends", "where", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/base/SourceLocation.java#L187-L194
apache/incubator-heron
heron/scheduler-core/src/java/org/apache/heron/scheduler/UpdateTopologyManager.java
UpdateTopologyManager.getTopology
@VisibleForTesting TopologyAPI.Topology getTopology(SchedulerStateManagerAdaptor stateManager, String topologyName) { """ Returns the topology. It's key that we get the topology from the physical plan to reflect any state changes since launch. The stateManager.getTopology(name) method returns the topology from ...
java
@VisibleForTesting TopologyAPI.Topology getTopology(SchedulerStateManagerAdaptor stateManager, String topologyName) { return stateManager.getPhysicalPlan(topologyName).getTopology(); }
[ "@", "VisibleForTesting", "TopologyAPI", ".", "Topology", "getTopology", "(", "SchedulerStateManagerAdaptor", "stateManager", ",", "String", "topologyName", ")", "{", "return", "stateManager", ".", "getPhysicalPlan", "(", "topologyName", ")", ".", "getTopology", "(", ...
Returns the topology. It's key that we get the topology from the physical plan to reflect any state changes since launch. The stateManager.getTopology(name) method returns the topology from the time of submission. See additional commentary in topology.proto and physical_plan.proto.
[ "Returns", "the", "topology", ".", "It", "s", "key", "that", "we", "get", "the", "topology", "from", "the", "physical", "plan", "to", "reflect", "any", "state", "changes", "since", "launch", ".", "The", "stateManager", ".", "getTopology", "(", "name", ")",...
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/scheduler-core/src/java/org/apache/heron/scheduler/UpdateTopologyManager.java#L346-L349
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java
NodeSetDTM.removeNode
public void removeNode(int n) { """ Remove a node. @param n Node to be added @throws RuntimeException thrown if this NodeSetDTM is not of a mutable type. """ if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This ...
java
public void removeNode(int n) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!"); this.removeElement(n); }
[ "public", "void", "removeNode", "(", "int", "n", ")", "{", "if", "(", "!", "m_mutable", ")", "throw", "new", "RuntimeException", "(", "XSLMessages", ".", "createXPATHMessage", "(", "XPATHErrorResources", ".", "ER_NODESETDTM_NOT_MUTABLE", ",", "null", ")", ")", ...
Remove a node. @param n Node to be added @throws RuntimeException thrown if this NodeSetDTM is not of a mutable type.
[ "Remove", "a", "node", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java#L569-L576
pmwmedia/tinylog
tinylog-impl/src/main/java/org/tinylog/core/TinylogLoggingProvider.java
TinylogLoggingProvider.calculateMinimumLevel
private static Level calculateMinimumLevel(final Level globalLevel, final Map<String, Level> customLevels) { """ Calculates the minimum severity level that can output any log entries. @param globalLevel Global severity level @param customLevels Custom severity levels for packages and classes @return Minimum...
java
private static Level calculateMinimumLevel(final Level globalLevel, final Map<String, Level> customLevels) { Level minimumLevel = globalLevel; for (Level level : customLevels.values()) { if (level.ordinal() < minimumLevel.ordinal()) { minimumLevel = level; } } return minimumLevel; }
[ "private", "static", "Level", "calculateMinimumLevel", "(", "final", "Level", "globalLevel", ",", "final", "Map", "<", "String", ",", "Level", ">", "customLevels", ")", "{", "Level", "minimumLevel", "=", "globalLevel", ";", "for", "(", "Level", "level", ":", ...
Calculates the minimum severity level that can output any log entries. @param globalLevel Global severity level @param customLevels Custom severity levels for packages and classes @return Minimum severity level
[ "Calculates", "the", "minimum", "severity", "level", "that", "can", "output", "any", "log", "entries", "." ]
train
https://github.com/pmwmedia/tinylog/blob/d03d4ef84a1310155037e08ca8822a91697d1086/tinylog-impl/src/main/java/org/tinylog/core/TinylogLoggingProvider.java#L209-L217
zxing/zxing
core/src/main/java/com/google/zxing/qrcode/encoder/MatrixUtil.java
MatrixUtil.calculateBCHCode
static int calculateBCHCode(int value, int poly) { """ operations. We don't care if coefficients are positive or negative. """ if (poly == 0) { throw new IllegalArgumentException("0 polynomial"); } // If poly is "1 1111 0010 0101" (version info poly), msbSetInPoly is 13. We'll subtract 1 ...
java
static int calculateBCHCode(int value, int poly) { if (poly == 0) { throw new IllegalArgumentException("0 polynomial"); } // If poly is "1 1111 0010 0101" (version info poly), msbSetInPoly is 13. We'll subtract 1 // from 13 to make it 12. int msbSetInPoly = findMSBSet(poly); value <<= msbS...
[ "static", "int", "calculateBCHCode", "(", "int", "value", ",", "int", "poly", ")", "{", "if", "(", "poly", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"0 polynomial\"", ")", ";", "}", "// If poly is \"1 1111 0010 0101\" (version info po...
operations. We don't care if coefficients are positive or negative.
[ "operations", ".", "We", "don", "t", "care", "if", "coefficients", "are", "positive", "or", "negative", "." ]
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/qrcode/encoder/MatrixUtil.java#L303-L317
zaproxy/zaproxy
src/org/zaproxy/zap/spider/Spider.java
Spider.addRootFileSeed
private void addRootFileSeed(URI baseUri, String fileName) { """ Adds a file seed, with the given file name, at the root of the base URI. <p> For example, with base URI as {@code http://example.com/some/path/file.html} and file name as {@code sitemap.xml} it's added the seed {@code http://example.com/sitemap.xm...
java
private void addRootFileSeed(URI baseUri, String fileName) { String seed = buildUri(baseUri.getScheme(), baseUri.getRawHost(), baseUri.getPort(), "/" + fileName); try { this.seedList.add(new URI(seed, true)); } catch (Exception e) { log.warn("Error while creating [" + fileName + "] seed: " + seed, e); } ...
[ "private", "void", "addRootFileSeed", "(", "URI", "baseUri", ",", "String", "fileName", ")", "{", "String", "seed", "=", "buildUri", "(", "baseUri", ".", "getScheme", "(", ")", ",", "baseUri", ".", "getRawHost", "(", ")", ",", "baseUri", ".", "getPort", ...
Adds a file seed, with the given file name, at the root of the base URI. <p> For example, with base URI as {@code http://example.com/some/path/file.html} and file name as {@code sitemap.xml} it's added the seed {@code http://example.com/sitemap.xml}. @param baseUri the base URI. @param fileName the file name.
[ "Adds", "a", "file", "seed", "with", "the", "given", "file", "name", "at", "the", "root", "of", "the", "base", "URI", ".", "<p", ">", "For", "example", "with", "base", "URI", "as", "{", "@code", "http", ":", "//", "example", ".", "com", "/", "some"...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/Spider.java#L269-L276
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ExceptionDestinationHandlerImpl.java
ExceptionDestinationHandlerImpl.handleUndeliverableMessage
public UndeliverableReturnCode handleUndeliverableMessage( SIMPMessage message, TransactionCommon tran, int exceptionReason, ...
java
public UndeliverableReturnCode handleUndeliverableMessage( SIMPMessage message, TransactionCommon tran, int exceptionReason, ...
[ "public", "UndeliverableReturnCode", "handleUndeliverableMessage", "(", "SIMPMessage", "message", ",", "TransactionCommon", "tran", ",", "int", "exceptionReason", ",", "String", "[", "]", "exceptionStrings", ")", "{", "// F001333-14610", "// Delegate down onto the new method ...
This method contains the routine used to handle an undeliverable message. The method examines the attributes of a message to determine what to do with it. It is possible for a message to be discarded, blocked, or sent to an exception destination. @param msg - The undeliverable message @param tran - The transaction th...
[ "This", "method", "contains", "the", "routine", "used", "to", "handle", "an", "undeliverable", "message", ".", "The", "method", "examines", "the", "attributes", "of", "a", "message", "to", "determine", "what", "to", "do", "with", "it", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ExceptionDestinationHandlerImpl.java#L371-L381
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UnicodeSetStringSpan.java
UnicodeSetStringSpan.matches16CPB
static boolean matches16CPB(CharSequence s, int start, int limit, final String t, int tlength) { """ Compare 16-bit Unicode strings (which may be malformed UTF-16) at code point boundaries. That is, each edge of a match must not be in the middle of a surrogate pair. @param s The string to match in. @para...
java
static boolean matches16CPB(CharSequence s, int start, int limit, final String t, int tlength) { return matches16(s, start, t, tlength) && !(0 < start && Character.isHighSurrogate(s.charAt(start - 1)) && Character.isLowSurrogate(s.charAt(start))) && !((sta...
[ "static", "boolean", "matches16CPB", "(", "CharSequence", "s", ",", "int", "start", ",", "int", "limit", ",", "final", "String", "t", ",", "int", "tlength", ")", "{", "return", "matches16", "(", "s", ",", "start", ",", "t", ",", "tlength", ")", "&&", ...
Compare 16-bit Unicode strings (which may be malformed UTF-16) at code point boundaries. That is, each edge of a match must not be in the middle of a surrogate pair. @param s The string to match in. @param start The start index of s. @param limit The limit of the subsequence of s being spanned. @param t ...
[ "Compare", "16", "-", "bit", "Unicode", "strings", "(", "which", "may", "be", "malformed", "UTF", "-", "16", ")", "at", "code", "point", "boundaries", ".", "That", "is", "each", "edge", "of", "a", "match", "must", "not", "be", "in", "the", "middle", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UnicodeSetStringSpan.java#L964-L970
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java
OverlyConcreteParameter.methodHasSyntheticTwin
private boolean methodHasSyntheticTwin(String methodName, String methodSig) { """ returns whether this method has an equivalent method that is synthetic, which implies this method is constrained by some Generified interface. We could compare parameters but that is a bunch of work that probably doesn't make this...
java
private boolean methodHasSyntheticTwin(String methodName, String methodSig) { for (Method m : cls.getMethods()) { if (m.isSynthetic() && m.getName().equals(methodName) && !m.getSignature().equals(methodSig)) { return true; } } return false; }
[ "private", "boolean", "methodHasSyntheticTwin", "(", "String", "methodName", ",", "String", "methodSig", ")", "{", "for", "(", "Method", "m", ":", "cls", ".", "getMethods", "(", ")", ")", "{", "if", "(", "m", ".", "isSynthetic", "(", ")", "&&", "m", "....
returns whether this method has an equivalent method that is synthetic, which implies this method is constrained by some Generified interface. We could compare parameters but that is a bunch of work that probably doesn't make this test any more precise, so just return true if method name and synthetic is found. @param...
[ "returns", "whether", "this", "method", "has", "an", "equivalent", "method", "that", "is", "synthetic", "which", "implies", "this", "method", "is", "constrained", "by", "some", "Generified", "interface", ".", "We", "could", "compare", "parameters", "but", "that"...
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/OverlyConcreteParameter.java#L372-L380
finmath/finmath-lib
src/main/java6/net/finmath/montecarlo/AbstractMonteCarloProduct.java
AbstractMonteCarloProduct.getValuesForModifiedData
public Map<String, Object> getValuesForModifiedData(double evaluationTime, MonteCarloSimulationInterface model, Map<String,Object> dataModified) throws CalculationException { """ This method returns the value under shifted market data (or model parameters). In its default implementation it does bump (creating a n...
java
public Map<String, Object> getValuesForModifiedData(double evaluationTime, MonteCarloSimulationInterface model, Map<String,Object> dataModified) throws CalculationException { MonteCarloSimulationInterface modelModified = model.getCloneWithModifiedData(dataModified); return getValues(evaluationTime, modelModified)...
[ "public", "Map", "<", "String", ",", "Object", ">", "getValuesForModifiedData", "(", "double", "evaluationTime", ",", "MonteCarloSimulationInterface", "model", ",", "Map", "<", "String", ",", "Object", ">", "dataModified", ")", "throws", "CalculationException", "{",...
This method returns the value under shifted market data (or model parameters). In its default implementation it does bump (creating a new model) and revalue. Override the way the new model is created, to implemented improved techniques (proxy scheme, re-calibration). @param evaluationTime The time on which this produc...
[ "This", "method", "returns", "the", "value", "under", "shifted", "market", "data", "(", "or", "model", "parameters", ")", ".", "In", "its", "default", "implementation", "it", "does", "bump", "(", "creating", "a", "new", "model", ")", "and", "revalue", ".",...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/AbstractMonteCarloProduct.java#L144-L149