id stringlengths 24 24 | repo stringlengths 7 59 | path stringlengths 11 234 | func_name stringlengths 3 140 | url stringlengths 102 339 | split stringclasses 3
values | language stringclasses 1
value | docstring stringlengths 1 34k | code stringlengths 63 466k | text stringlengths 101 467k | token_count int32 22 125k | doc_chars int32 1 34k | code_chars int32 63 466k | license_basis stringclasses 1
value | source stringclasses 1
value | added stringdate 2026-12-05 00:00:00 2026-12-05 00:00:00 | record_sha256 stringlengths 64 64 | license stringclasses 18
values | license_class stringclasses 4
values | license_source stringlengths 45 101 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
791a69bebeda289fbcc2b873 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/ManagementClientImpl.java | ManagementClientImpl.waitForResponse | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/ManagementClientImpl.java#L686-L719 | train | java | min + max ASDU len are *not* including any field that contains ACPI | private byte[] waitForResponse(int minASDULen, int maxASDULen, long timeout)
throws KNXInvalidResponseException, KNXTimeoutException
{
long remaining = timeout;
final long end = System.currentTimeMillis() + remaining;
synchronized (indications) {
while (remaining > 0) {
try {
while (indicat... | min + max ASDU len are *not* including any field that contains ACPI
private byte[] waitForResponse(int minASDULen, int maxASDULen, long timeout)
throws KNXInvalidResponseException, KNXTimeoutException
{
long remaining = timeout;
final long end = System.currentTimeMillis() + remaining;
synchronized (indic... | 354 | 67 | 1,324 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 0a32dfcf8b4a53b1dc5d69e2c2dbd906af743b8c7537e36c1e581ae4ba3d0d5b | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
13417a4814166e02e8ac9838 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/ManagementClientImpl.java | ManagementClientImpl.makeDOAs | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/ManagementClientImpl.java#L755-L765 | train | java | cut domain addresses out of APDUs | private List makeDOAs(List l)
{
for (int i = 0; i < l.size(); ++i) {
final byte[] pdu = (byte[]) l.get(i);
if (pdu.length == 4)
l.set(i, new byte[] { pdu[2], pdu[3] });
else if (pdu.length == 8)
l.set(i, new byte[] { pdu[2], pdu[3], pdu[4], pdu[5], pdu[6], pdu[7] });
}
return l;
} | cut domain addresses out of APDUs
private List makeDOAs(List l)
{
for (int i = 0; i < l.size(); ++i) {
final byte[] pdu = (byte[]) l.get(i);
if (pdu.length == 4)
l.set(i, new byte[] { pdu[2], pdu[3] });
else if (pdu.length == 8)
l.set(i, new byte[] { pdu[2], pdu[3], pdu[4], pdu[5], pdu[6], p... | 132 | 33 | 316 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 8f40782466446b00a9ebefb6171cb143bb5f0b2d6d503a7d4fdf2f5023b83ec7 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
c70094637dc1df7f5a1a84f4 | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/util/MethodUtil.java | MethodUtil.determineAccessorName | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/util/MethodUtil.java#L41-L48 | train | java | Determines the accessor method name based on a field name.
@param fieldName
a field name
@return the resulting method name | public static String determineAccessorName(@Nonnull final AccessorPrefix prefix, @Nonnull final String fieldName) {
Check.notNull(prefix, "prefix");
Check.notEmpty(fieldName, "fieldName");
final Matcher m = PATTERN.matcher(fieldName);
Check.stateIsTrue(m.find(), "passed field name '%s' is not applicable", field... | Determines the accessor method name based on a field name.
@param fieldName
a field name
@return the resulting method name
public static String determineAccessorName(@Nonnull final AccessorPrefix prefix, @Nonnull final String fieldName) {
Check.notNull(prefix, "prefix");
Check.notEmpty(fieldName, "fieldName");
... | 127 | 123 | 448 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 5fbd5248e5fa9e0f3cf3d4bb9e30a024952ce9b04749b3b3934268dd86702ab4 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
115bc2807e0e42c665c9bef3 | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/util/MethodUtil.java | MethodUtil.determineMutatorName | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/util/MethodUtil.java#L57-L63 | train | java | Determines the mutator method name based on a field name.
@param fieldName
a field name
@return the resulting method name | public static String determineMutatorName(@Nonnull final String fieldName) {
Check.notEmpty(fieldName, "fieldName");
final Matcher m = PATTERN.matcher(fieldName);
Check.stateIsTrue(m.find(), "passed field name '%s' is not applicable", fieldName);
final String name = m.group();
return METHOD_SET_PREFIX + name.... | Determines the mutator method name based on a field name.
@param fieldName
a field name
@return the resulting method name
public static String determineMutatorName(@Nonnull final String fieldName) {
Check.notEmpty(fieldName, "fieldName");
final Matcher m = PATTERN.matcher(fieldName);
Check.stateIsTrue(m.find(),... | 112 | 122 | 373 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | d57a1c360de627e66d9f82dfb3a16c36b4de8e83a5cf27c0e012ad8d58261942 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
4baf45b818ee6d4d5728442c | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/RemotePropertyServiceAdapter.java | RemotePropertyServiceAdapter.getDescription | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/RemotePropertyServiceAdapter.java#L169-L173 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.mgmt.PropertyAdapter#getDescription(int, int, int) | public byte[] getDescription(int objIndex, int pid, int propIndex)
throws KNXException
{
return mc.readPropertyDesc(dst, objIndex, pid, propIndex);
} | /* (non-Javadoc)
@see tuwien.auto.calimero.mgmt.PropertyAdapter#getDescription(int, int, int)
public byte[] getDescription(int objIndex, int pid, int propIndex)
throws KNXException
{
return mc.readPropertyDesc(dst, objIndex, pid, propIndex);
} | 67 | 93 | 159 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 663240d27ff32cffcafedf40173a2c2083bc97675486556d8ae2fa8bb4d983aa | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
3d22055ec57ff429b4c8397a | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/FT12Connection.java | FT12Connection.getPortIdentifiers | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/FT12Connection.java#L303-L327 | train | java | Attempts to gets the available serial communication ports on the host.
<p>
At first, the Java system property "microedition.commports" is queried. If there is
no property with that key, and Calimero itself has access to serial ports,
the lowest 10 ports numbers are enumerated and checked if present.<br>
The empty array... | public static String[] getPortIdentifiers()
{
String ports = null;
try {
ports = System.getProperty("microedition.commports");
}
catch (final SecurityException e) {}
if (ports != null) {
final StringTokenizer st = new StringTokenizer(ports, ",");
final String[] portIDs = new String[st.count... | Attempts to gets the available serial communication ports on the host.
<p>
At first, the Java system property "microedition.commports" is queried. If there is
no property with that key, and Calimero itself has access to serial ports,
the lowest 10 ports numbers are enumerated and checked if present.<br>
The empty array... | 303 | 406 | 809 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | d7579fef93ac6bf433a50899b81b22f7a50f035a1905ec52af43c26b4715f897 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
a24642fa4ba42c0ff2a50a1f | phax/ph-xmldsig | src/main/java/com/helger/xmldsig/XMLDSigValidationResult.java | XMLDSigValidationResult.createReferenceErrors | https://github.com/phax/ph-xmldsig/blob/c00677fe3dac5aef0f3039b08a03e90052473952/src/main/java/com/helger/xmldsig/XMLDSigValidationResult.java#L133-L137 | train | java | An invalid reference or references. The verification of the digest of a
reference failed. This can be caused by a change to the referenced data
since the signature was generated.
@param aInvalidReferences
The indices to the invalid references.
@return Result object | @Nonnull
public static XMLDSigValidationResult createReferenceErrors (@Nonnull @Nonempty final List <Integer> aInvalidReferences)
{
return new XMLDSigValidationResult (aInvalidReferences);
} | An invalid reference or references. The verification of the digest of a
reference failed. This can be caused by a change to the referenced data
since the signature was generated.
@param aInvalidReferences
The indices to the invalid references.
@return Result object
@Nonnull
public static XMLDSigValidationResult cre... | 96 | 266 | 200 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | b265f736f6daec870d3c284f14809c1616f06adad09156be93701f029b83ed8a | Apache-2.0 | permissive | https://github.com/phax/ph-xmldsig/blob/master/LICENSE |
9a12819cc7dc2126d47864c7 | ow2-chameleon/fuchsia | examples/upnp-components/src/main/java/org/ow2/chameleon/fuchsia/upnp/clock/ClockDevice.java | ClockDevice.getService | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/examples/upnp-components/src/main/java/org/ow2/chameleon/fuchsia/upnp/clock/ClockDevice.java#L105-L108 | train | java | /* (non-Javadoc)
@see org.osgi.service.upnp.UPnPDevice#getService(java.lang.String) | public UPnPService getService(String serviceId) {
if (serviceId.equals(timerService.getId())) return timerService;
return null;
} | /* (non-Javadoc)
@see org.osgi.service.upnp.UPnPDevice#getService(java.lang.String)
public UPnPService getService(String serviceId) {
if (serviceId.equals(timerService.getId())) return timerService;
return null;
} | 52 | 83 | 135 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 4c3bfd7a3b6443554b94701b3abb07628d9f96a9ed2a3db25f503996c535d673 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
2d60df7f978afb251b0a0dca | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/buffer/LDataObject.java | LDataObject.setFrame | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/buffer/LDataObject.java#L108-L114 | train | java | Sets a new {@link CEMILData} <code>frame</code> for this cache object.
<p>
The key generated out of <code>frame</code> (i.e. out of the KNX address of
<code>frame</code>) has to be equal to the key of this {@link LDataObject},
as returned from {@link #getKey()}. Otherwise a
{@link KNXIllegalArgumentException} will be t... | public synchronized void setFrame(CEMILData frame)
{
if (!frame.getDestination().equals(getKey()))
throw new KNXIllegalArgumentException("frame key differs from cache key");
value = frame;
resetTimestamp();
} | Sets a new {@link CEMILData} <code>frame</code> for this cache object.
<p>
The key generated out of <code>frame</code> (i.e. out of the KNX address of
<code>frame</code>) has to be equal to the key of this {@link LDataObject},
as returned from {@link #getKey()}. Otherwise a
{@link KNXIllegalArgumentException} will be t... | 168 | 437 | 225 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 99949641633f039e8eec9afc515226946755318634630391cf135755c051b817 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
96e6403e44348e638e54d2fd | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getTrajectoryChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L56-L74 | train | java | Plots the trajectory
@param title Title of the plot
@param t Trajectory to be plotted | public static Chart getTrajectoryChart(String title, Trajectory t){
if(t.getDimension()==2){
double[] xData = new double[t.size()];
double[] yData = new double[t.size()];
for(int i = 0; i < t.size(); i++){
xData[i] = t.get(i).x;
yData[i] = t.get(i).y;
}
// Create Char... | Plots the trajectory
@param title Title of the plot
@param t Trajectory to be plotted
public static Chart getTrajectoryChart(String title, Trajectory t){
if(t.getDimension()==2){
double[] xData = new double[t.size()];
double[] yData = new double[t.size()];
for(int i = 0; i < t.size(); i++){
xD... | 179 | 85 | 542 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | b27e956076b9c07e7136de44d8ec91343ab19796a3921649671ab58e26c87e87 | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
e1a93c8d1d85519dd2c12b03 | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getMSDLineChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L91-L112 | train | java | Plots the MSD curve for trajectory t
@param t Trajectory to calculate the msd curve
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param msdeval Evaluates the mean squared displacment | public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax,
AbstractMeanSquaredDisplacmentEvaluator msdeval) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
msdeval.setTrajectory(t);
msdeval.setTimelag(lagMin);
for (int i = lagMin; i < la... | Plots the MSD curve for trajectory t
@param t Trajectory to calculate the msd curve
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param msdeval Evaluates the mean squared displacment
public st... | 319 | 309 | 651 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 07ae44220770f2e06f1b7140211884e5df5712978e3c61eb093801e23034058d | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
455e83f31a95c1a48b71baee | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getMSDLineWithConfinedModelChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L125-L156 | train | java | Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above.
@param t Trajectory to calculate the msd curve
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@pa... | public static Chart getMSDLineWithConfinedModelChart(Trajectory t, int lagMin,
int lagMax, double timelag, double a, double b, double c, double d) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
double[] modelData = new double[lagMax - lagMin + 1];
MeanS... | Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above.
@param t Trajectory to calculate the msd curve
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@pa... | 528 | 474 | 1,113 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | b9c71c29c36e9e23b5ecd82d6a8180f79ab12921e350049e425743ba1045120e | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
319ef930e386756ba8e883c9 | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getMSDLineWithPowerModelChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L167-L193 | train | java | Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.
@param t
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param timelag Elapsed time betwe... | public static Chart getMSDLineWithPowerModelChart(Trajectory t, int lagMin,
int lagMax, double timelag, double a, double D) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
double[] modelData = new double[lagMax - lagMin + 1];
MeanSquaredDisplacmentFeatur... | Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above.
@param t
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param timelag Elapsed time betwe... | 430 | 410 | 916 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | a71446b9b1cdf7791b81b7da9fc0ed33ce93916a685865ba4fee43b6d4ee2edd | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
1411ab50c136ec6e387bcd36 | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getMSDLineWithFreeModelChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L204-L230 | train | java | Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion.
@param t
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param timelag Elapsed time between two fram... | public static Chart getMSDLineWithFreeModelChart(Trajectory t, int lagMin,
int lagMax, double timelag, double diffusionCoefficient, double intercept) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
double[] modelData = new double[lagMax - lagMin + 1];
Me... | Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion.
@param t
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param timelag Elapsed time between two fram... | 436 | 390 | 989 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | cf3f9783b86497c518ac1365f145c13a692da1c06093617a4080660e75584f56 | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
21309dbb20c7db6b008628fe | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getMSDLineWithActiveTransportModelChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L241-L267 | train | java | Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.
@param t
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param timelag Elapsed time between t... | public static Chart getMSDLineWithActiveTransportModelChart(Trajectory t, int lagMin,
int lagMax, double timelag, double diffusionCoefficient, double velocity) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
double[] modelData = new double[lagMax - lagMin ... | Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above.
@param t
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param timelag Elapsed time between t... | 460 | 429 | 1,029 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 3d3707ad9d5b8b6652e749bace2cb1eca0b11f54a9a49bead1826e777862d67c | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
09870c5e3faefd3738c4337c | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getMSDLineChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L276-L304 | train | java | Plots the mean MSD curve over all trajectories in t.
@param t List of trajectories
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param msdeval Evaluates the mean squared displacment | public static Chart getMSDLineChart(ArrayList<? extends Trajectory> t, int lagMin,
int lagMax, AbstractMeanSquaredDisplacmentEvaluator msdeval) {
double[] xData = new double[lagMax - lagMin + 1];
double[] yData = new double[lagMax - lagMin + 1];
for (int j = lagMin; j < lagMax + 1; j++) {
double msd = 0;
... | Plots the mean MSD curve over all trajectories in t.
@param t List of trajectories
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
@param msdeval Evaluates the mean squared displacment
public sta... | 371 | 308 | 792 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | bd15068d7251978aa8dce2bfbe16aad735564e65dab3063c6e1e2ca3a112f0bb | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
6b1501ddd76e7b7ae72ca2bb | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getMSDLineChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L312-L315 | train | java | Plots the MSD curve for trajectory t.
@param t List of trajectories
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds | public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax) {
return getMSDLineChart(t, lagMin, lagMax, new MeanSquaredDisplacmentFeature(t,
lagMin));
} | Plots the MSD curve for trajectory t.
@param t List of trajectories
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax) {
... | 132 | 240 | 173 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 51c133c73900efc31ef1fd785553afea9c2ca6bfea513b4086d19cfc22d243d3 | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
4a5384cd1d4161adc58c1a8f | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.getMSDLineChart | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L323-L327 | train | java | Plots the mean MSD curve over all trajectories in t.
@param t List of trajectories
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds | public static Chart getMSDLineChart(ArrayList<Trajectory> t, int lagMin,
int lagMax) {
return getMSDLineChart(t, lagMin, lagMax,
new MeanSquaredDisplacmentFeature(t.get(0), lagMin));
} | Plots the mean MSD curve over all trajectories in t.
@param t List of trajectories
@param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds
@param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
public static Chart getMSDLineChart(ArrayList<Trajectory> t, int... | 139 | 254 | 194 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 3026ffd065ab438ef7c19cc049920c19f46fbc603f3fe7b924191c6d2a25bc6d | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
2f39ab797b414178f106a037 | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java | VisualizationUtils.plotCharts | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L341-L366 | train | java | Plots a list of charts in matrix with 2 columns.
@param charts | public static void plotCharts(List<Chart> charts){
int numRows =1;
int numCols =1;
if(charts.size()>1){
numRows = (int) Math.ceil(charts.size()/2.0);
numCols = 2;
}
final JFrame frame = new JFrame("");
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
frame.getContentPane().setLay... | Plots a list of charts in matrix with 2 columns.
@param charts
public static void plotCharts(List<Chart> charts){
int numRows =1;
int numCols =1;
if(charts.size()>1){
numRows = (int) Math.ceil(charts.size()/2.0);
numCols = 2;
}
final JFrame frame = new JFrame("");
frame.setDefaultCloseOperat... | 183 | 62 | 758 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 061113f20f78407212ed8154d45147c16649eb972b60ed136dccb45035c1f340 | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
41278c9b8782d509745b64f4 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/SerialCom.java | SerialCom.openDataInputStream | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/SerialCom.java#L282-L289 | train | java | /* (non-Javadoc)
@see javax.microedition.io.InputConnection#openDataInputStream() | DataInputStream openDataInputStream()
{
final InputStream is = getInputStream();
if (is instanceof DataInputStream) {
return (DataInputStream) is;
}
return new DataInputStream(is);
} | /* (non-Javadoc)
@see javax.microedition.io.InputConnection#openDataInputStream()
DataInputStream openDataInputStream()
{
final InputStream is = getInputStream();
if (is instanceof DataInputStream) {
return (DataInputStream) is;
}
return new DataInputStream(is);
} | 63 | 81 | 202 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 8d5d085b718868e9ecc899b9c2bdad33abaae5a0a1ad062a49efe9dbee3c886d | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
5305eb866c6ffcd175aee52f | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/SerialCom.java | SerialCom.openDataOutputStream | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/SerialCom.java#L294-L301 | train | java | /* (non-Javadoc)
@see javax.microedition.io.OutputConnection#openDataOutputStream() | DataOutputStream openDataOutputStream()
{
final OutputStream os = getOutputStream();
if (os instanceof DataOutputStream) {
return (DataOutputStream) os;
}
return new DataOutputStream(os);
} | /* (non-Javadoc)
@see javax.microedition.io.OutputConnection#openDataOutputStream()
DataOutputStream openDataOutputStream()
{
final OutputStream os = getOutputStream();
if (os instanceof DataOutputStream) {
return (DataOutputStream) os;
}
return new DataOutputStream(os);
} | 63 | 83 | 209 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | ac856d5af6cb4c715686ca5a8ff08b18258744d4a0a721e80c7840670fff729a | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
5ef3f4bb92abf07c68e9032a | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/knxnetip/util/CRD.java | CRD.createResponse | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/knxnetip/util/CRD.java#L120-L123 | train | java | Creates a new CRD out of a byte array.
<p>
If possible, a matching, more specific, CRD subtype is returned. Note, that CRD for
specific communication types might expect certain characteristics on
<code>data</code> (regarding contained data).<br>
@param data byte array containing the CRD structure
@param offset start o... | public static CRD createResponse(byte[] data, int offset) throws KNXFormatException
{
return (CRD) create(false, data, offset);
} | Creates a new CRD out of a byte array.
<p>
If possible, a matching, more specific, CRD subtype is returned. Note, that CRD for
specific communication types might expect certain characteristics on
<code>data</code> (regarding contained data).<br>
@param data byte array containing the CRD structure
@param offset start o... | 141 | 444 | 136 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 3b07a4ddd765dfb1b9ff8106096a897fb4aeb340bd2ee90b28d5aecbdf6f2743 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
1bc572a7a9821ecfd76c715f | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java | Imports.copyAndAdd | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java#L185-L191 | train | java | Adds the passed set of {@code Import}s to the current set and returns them as new instance of {@code Imports}.
@param imports
set of {@code Import}s to add
@return new instance of {@code Imports} | @Nonnull
public Imports copyAndAdd(final Collection<Import> imports) {
Check.notNull(imports, "imports");
final List<Import> internal = Lists.newArrayList(imports);
internal.addAll(imports);
return new Imports(internal);
} | Adds the passed set of {@code Import}s to the current set and returns them as new instance of {@code Imports}.
@param imports
set of {@code Import}s to add
@return new instance of {@code Imports}
@Nonnull
public Imports copyAndAdd(final Collection<Import> imports) {
Check.notNull(imports, "imports");
final List<... | 97 | 196 | 232 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 3fe50b4acef100b23ea5f52c429cc86c33f55e068ee2e1b8d52e94a8ee073156 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
4bea7c44af7f75bfbda16916 | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java | Imports.copyAndAdd | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java#L200-L204 | train | java | Adds the passed {@code Imports} to the current set and returns them as new instance of {@code Imports}.
@param imports
{@code Imports} to add
@return new instance of {@code Imports} | @Nonnull
public Imports copyAndAdd(final Imports imports) {
Check.notNull(imports, "imports");
return copyAndAdd(imports.asList());
} | Adds the passed {@code Imports} to the current set and returns them as new instance of {@code Imports}.
@param imports
{@code Imports} to add
@return new instance of {@code Imports}
@Nonnull
public Imports copyAndAdd(final Imports imports) {
Check.notNull(imports, "imports");
return copyAndAdd(imports.asList());... | 74 | 182 | 139 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | fc2516bfb4840cdfc35315775a10672dda5776046c1e41134f0f8756f5baf9f1 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
3d9f7b9cbdfe11ab861cb54e | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java | Imports.filter | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java#L212-L215 | train | java | Filters primitive types, types without a package declaration and duplicates and returns them as new instance of
{@code Imports}.
@return new instance of {@code Imports} | @Nonnull
public Imports filter() {
return new Imports(Sets.newHashSet(Collections2.filter(imports, Predicates.and(IGNORE_JAVA_LANG, IGNORE_UNDEFINED))));
} | Filters primitive types, types without a package declaration and duplicates and returns them as new instance of
{@code Imports}.
@return new instance of {@code Imports}
@Nonnull
public Imports filter() {
return new Imports(Sets.newHashSet(Collections2.filter(imports, Predicates.and(IGNORE_JAVA_LANG, IGNORE_UNDEFIN... | 68 | 169 | 159 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 036a47f10df8cba27bcabfbc44f3aa85f4ac68545c5de1e5f85a4ee456c6cd7c | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
3c398080e9eaf1ac84cb8ad4 | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java | Imports.find | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java#L224-L242 | train | java | Searches the set of imports to find a matching import by type name.
@param typeName
name of type (qualified or simple name allowed)
@return found import or {@code null} | @Nullable
public Import find(@Nonnull final String typeName) {
Check.notEmpty(typeName, "typeName");
Import ret = null;
final Type type = new Type(typeName);
for (final Import imp : imports) {
if (imp.getType().getName().equals(type.getName())) {
ret = imp;
break;
}
}
if (ret == null) {
fi... | Searches the set of imports to find a matching import by type name.
@param typeName
name of type (qualified or simple name allowed)
@return found import or {@code null}
@Nullable
public Import find(@Nonnull final String typeName) {
Check.notEmpty(typeName, "typeName");
Import ret = null;
final Type type = new ... | 167 | 169 | 472 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 66c97f4dabdabe191de0b650750d14965adcb9efc94e5db030e15a79826f501a | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
58107d594b5f822d7b20305d | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java | Imports.sortByName | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/domain/Imports.java#L249-L254 | train | java | Sorts the current set of {@code Import}s by name and returns them as new instance of {@code Imports}.
@return new instance of {@code Imports} | @Nonnull
public Imports sortByName() {
final List<Import> imports = Lists.newArrayList(this.imports);
Collections.sort(imports, ORDER.nullsLast());
return new Imports(imports);
} | Sorts the current set of {@code Import}s by name and returns them as new instance of {@code Imports}.
@return new instance of {@code Imports}
@Nonnull
public Imports sortByName() {
final List<Import> imports = Lists.newArrayList(this.imports);
Collections.sort(imports, ORDER.nullsLast());
return new Imports(im... | 76 | 142 | 186 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 738e767b1266d203c570b200b649c9c2182ce7035347c336916c986599e212ff | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
932b40d1bda631c0b0537123 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/Destination.java | Destination.destroy | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/mgmt/Destination.java#L445-L458 | train | java | Destroys this destination.
<p>
If the connection state is connected, it will be disconnected. The connection state
is set to {@link #DESTROYED}. The associated transport layer is notified through
{@link TransportLayer#destroyDestination(Destination)}. <br>
On an already destroyed destination, no action is performed. | public synchronized void destroy()
{
if (state == DESTROYED)
return;
if (state != DISCONNECTED)
try {
tl.disconnect(this);
}
catch (final KNXLinkClosedException e) {
// we already should've been destroyed on catching this exception
}
setState(DESTROYED);
tl.destroyDestination... | Destroys this destination.
<p>
If the connection state is connected, it will be disconnected. The connection state
is set to {@link #DESTROYED}. The associated transport layer is notified through
{@link TransportLayer#destroyDestination(Destination)}. <br>
On an already destroyed destination, no action is performed.
p... | 150 | 317 | 331 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 0de07cb5d8bbed1211d905b5cd41f093d5a111fa1c2b644d380ea8c6e74b6b25 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
e7d39faed621290fa8ee2457 | ow2-chameleon/fuchsia | examples/jax-ws/weatherForecast/weather-ws-impl/src/main/java/org/ow2/chameleon/fuchsia/examples/jaxws/weather/impl/ZipCodeConverter.java | ZipCodeConverter.query | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/examples/jax-ws/weatherForecast/weather-ws-impl/src/main/java/org/ow2/chameleon/fuchsia/examples/jaxws/weather/impl/ZipCodeConverter.java#L51-L72 | train | java | Query zipcode from Yahoo to find associated WOEID | private void query(String zipcode) {
/* Setup YQL query statement using dynamic zipcode. The statement searches geo.places
for the zipcode and returns XML which includes the WOEID. For more info about YQL go
to: http://developer.yahoo.com/yql/ */
... | Query zipcode from Yahoo to find associated WOEID
private void query(String zipcode) {
/* Setup YQL query statement using dynamic zipcode. The statement searches geo.places
for the zipcode and returns XML which includes the WOEID. For more info about YQL go
... | 189 | 49 | 936 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | bb388866fde73555727966c68fe64c8c35235a6b87e1d83f2a819fe0bd0bab4e | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
333f188eaeaea839f3bb9b95 | ow2-chameleon/fuchsia | examples/jax-ws/weatherForecast/weather-ws-impl/src/main/java/org/ow2/chameleon/fuchsia/examples/jaxws/weather/impl/ZipCodeConverter.java | ZipCodeConverter.parseResponse | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/examples/jax-ws/weatherForecast/weather-ws-impl/src/main/java/org/ow2/chameleon/fuchsia/examples/jaxws/weather/impl/ZipCodeConverter.java#L75-L96 | train | java | Extract WOEID after XML loads | private void parseResponse(InputStream inputStream) {
try {
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(inputStream);
doc.getDocumentElement().no... | Extract WOEID after XML loads
private void parseResponse(InputStream inputStream) {
try {
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(inputStream);
... | 146 | 29 | 787 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 137d45ea54f3d155eb0480a7560905e42b2b084ff1702167de7743862d6b5e10 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
2b38322a0c81b93308e03977 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/cemi/CEMIDevMgmt.java | CEMIDevMgmt.getErrorMessage | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/cemi/CEMIDevMgmt.java#L320-L328 | train | java | Returns a descriptive error message on a negative response, as determined by
{@link #isNegativeResponse()}.
<p>
A negative response contains an error information code, which is used to find the
associated message.<br>
If invoked on positive response, "no error" will be returned.
@return error status message as string | public String getErrorMessage()
{
if (!isNegativeResponse())
return "no error";
final int err = data[0] & 0xFF;
if (err > errors.length - 1)
return "unknown error code";
return errors[err];
} | Returns a descriptive error message on a negative response, as determined by
{@link #isNegativeResponse()}.
<p>
A negative response contains an error information code, which is used to find the
associated message.<br>
If invoked on positive response, "no error" will be returned.
@return error status message as string
... | 126 | 319 | 215 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 61ee8c672c92f58e7e5242bdece7076c02ffb563ce1206a598446eff02a42f85 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
e700b70766ff4ad7be98940e | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/knxnetip/Discoverer.java | Discoverer.startSearch | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/knxnetip/Discoverer.java#L243-L253 | train | java | Starts a new discovery, the <code>localPort</code> and network interface can be
specified.
<p>
The search will continue for <code>timeout</code> seconds, or infinite if timeout
value is zero. During this time, search responses will get collected asynchronous
in the background by this {@link Discoverer}.<br>
With <code>... | public void startSearch(int localPort, NetworkInterface ni, int timeout, boolean wait)
throws KNXException
{
if (timeout < 0)
throw new KNXIllegalArgumentException("timeout has to be >= 0");
if (localPort < 0 || localPort > 65535)
throw new KNXIllegalArgumentException("port out of range [0..0xFFFF]")... | Starts a new discovery, the <code>localPort</code> and network interface can be
specified.
<p>
The search will continue for <code>timeout</code> seconds, or infinite if timeout
value is zero. During this time, search responses will get collected asynchronous
in the background by this {@link Discoverer}.<br>
With <code>... | 453 | 1,479 | 434 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 25019613f3c3806fadf497940bdaaa080346315eead8fe245f9c1d391fe461d4 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
d020cc29957bed83fbe5d549 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/knxnetip/Discoverer.java | Discoverer.startSearch | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/knxnetip/Discoverer.java#L274-L557 | train | java | Starts a new discovery from all found network interfaces.
<p>
The search will continue for <code>timeout</code> seconds, or infinite if timeout
value is zero. During this time, search responses will get collected asynchronous
in the background by this Discoverer.<br>
With <code>wait</code> you can force this method int... | public void startSearch(int timeout, boolean wait) throws KNXException
{
if (timeout < 0)
throw new KNXIllegalArgumentException("timeout has to be >= 0");
final Enumeration eni;
try {
eni = NetworkInterface.getNetworkInterfaces();
}
catch (final SocketException e) {
logger.error("failed to ... | Starts a new discovery from all found network interfaces.
<p>
The search will continue for <code>timeout</code> seconds, or infinite if timeout
value is zero. During this time, search responses will get collected asynchronous
in the background by this Discoverer.<br>
With <code>wait</code> you can force this method int... | 2,358 | 932 | 8,664 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | f1bcf290fe202cfcc681466e8f2e6a776aa0ef656edd426b365679397ab640e9 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
d2ea0c9d27f733ca5ca448e4 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java | IPConfig.main | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java#L175-L184 | train | java | Entry point for running IPConfig.
<p>
An IP host or port identifier has to be supplied to specify the endpoint for the
KNX network access.<br>
To show the usage message of this tool on the console, supply the command line
option -help (or -h).<br>
Command line options are treated case sensitive. Available options:
<ul>... | public static void main(String[] args)
{
try {
new IPConfig(args);
}
catch (final Throwable t) {
if (t.getMessage() != null)
System.out.println(t.getMessage());
}
} | Entry point for running IPConfig.
<p>
An IP host or port identifier has to be supplied to specify the endpoint for the
KNX network access.<br>
To show the usage message of this tool on the console, supply the command line
option -help (or -h).<br>
Command line options are treated case sensitive. Available options:
<ul>... | 724 | 2,377 | 193 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | f4473992c9d5e3bfff3989ba77330fef63f9a7880d1540bb9b88fb98d8ee431f | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
41e17da3b767c70eb492cfba | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java | IPConfig.receivedConfig | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java#L305-L314 | train | java | Supplies information about a received IP configuration.
<p>
This default implementation writes information to standard output.
@param config a list with config entries, a config entry is of type String[3], with
[0] being the PID, [1] being a short config name, [2] being the value | protected void receivedConfig(List config)
{
System.out.println("KNXnet/IP server " + ((String[]) config.get(0))[2] + " "
+ ((String[]) config.get(1))[2]);
final String padding = " ";
for (int i = 2; i < config.size(); ++i) {
final String[] s = (String[]) config.get(... | Supplies information about a received IP configuration.
<p>
This default implementation writes information to standard output.
@param config a list with config entries, a config entry is of type String[3], with
[0] being the PID, [1] being a short config name, [2] being the value
protected void receivedConfig(List co... | 176 | 281 | 404 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 0bc7fe07c59b2397d5c224458403af482d813d890bf97c325d6b3d8a02642c1a | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
e436d1dc5d82b2e421bd7980 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java | IPConfig.create | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java#L399-L410 | train | java | Creates the property adapter to be used, depending on the supplied user
<code>options</code>.
<p>
There are two types of property adapters. One uses KNXnet/IP local device
management to access KNX properties in an interface object, the other type uses
remote property services. The remote adapter needs a KNX network lin... | private PropertyAdapter create(Map options) throws KNXException
{
// create local and remote socket address for use in adapter
final InetSocketAddress local = createLocalSocket((InetAddress) options
.get("localhost"), (Integer) options.get("localport"));
final InetSocketAddress host = new InetSocketAddre... | Creates the property adapter to be used, depending on the supplied user
<code>options</code>.
<p>
There are two types of property adapters. One uses KNXnet/IP local device
management to access KNX properties in an interface object, the other type uses
remote property services. The remote adapter needs a KNX network lin... | 251 | 566 | 602 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | a08572a466c1cb7f37518ee7e9fd900adfab003c18289180c127c430574e5533 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
b89cae75957ef723c7170f3e | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java | IPConfig.createLocalDMAdapter | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java#L422-L427 | train | java | Creates a local device management adapter.
<p>
@param local local socket address
@param host remote socket address of host
@param options contains parameters for property adapter creation
@return local DM adapter
@throws KNXException on adapter creation problem | private PropertyAdapter createLocalDMAdapter(InetSocketAddress local,
InetSocketAddress host, Map options) throws KNXException
{
return new KnIPDeviceMgmtAdapter(local, host, options.containsKey("nat"), null,
false);
} | Creates a local device management adapter.
<p>
@param local local socket address
@param host remote socket address of host
@param options contains parameters for property adapter creation
@return local DM adapter
@throws KNXException on adapter creation problem
private PropertyAdapter createLocalDMAdapter(InetSocketA... | 98 | 262 | 232 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 28ddbe75f060064f999681def4ea9aa8eb2ae35b54e10d806af79da01e49ca92 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
27ec8d313272ab71c6a783ef | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java | IPConfig.createRemoteAdapter | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/tools/IPConfig.java#L440-L468 | train | java | Creates a remote property service adapter for one device in the KNX network.
<p>
The adapter uses a KNX network link for access, also is created by this method.
@param local local socket address
@param host remote socket address of host
@param options contains parameters for property adapter creation
@return remote pr... | private PropertyAdapter createRemoteAdapter(InetSocketAddress local,
InetSocketAddress host, Map options) throws KNXException
{
final KNXMediumSettings medium = (KNXMediumSettings) options.get("medium");
if (options.containsKey("serial")) {
// create FT1.2 network link
final String p = (String) optio... | Creates a remote property service adapter for one device in the KNX network.
<p>
The adapter uses a KNX network link for access, also is created by this method.
@param local local socket address
@param host remote socket address of host
@param options contains parameters for property adapter creation
@return remote pr... | 374 | 391 | 1,194 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | a4d99fb228d92afa22558c41ddf3346a21a00f1adb57dc263ce2398eb33e647d | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
e3478a158df008bcb55e46a2 | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/generator/InterfaceAnalyzer.java | InterfaceAnalyzer.analyze | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/generator/InterfaceAnalyzer.java#L47-L65 | train | java | Analyzes the source code of an interface. The specified interface must not contain methods, that changes the
state of the corresponding object itself.
@param code
source code of an interface which describes how to generate the <i>immutable</i>
@return analysis result | @Nonnull
public static InterfaceAnalysis analyze(@Nonnull final String code) {
Check.notNull(code, "code");
final CompilationUnit unit = Check.notNull(SourceCodeReader.parse(code), "compilationUnit");
final List<TypeDeclaration> types = Check.notEmpty(unit.getTypes(), "typeDeclarations");
Check.stateIsTrue(ty... | Analyzes the source code of an interface. The specified interface must not contain methods, that changes the
state of the corresponding object itself.
@param code
source code of an interface which describes how to generate the <i>immutable</i>
@return analysis result
@Nonnull
public static InterfaceAnalysis analyze(... | 315 | 268 | 1,263 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 0da15655c69abb31453a455b621bd9d7a51e51619fa33f9c4761d9e296edb026 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
6223a211f6dc64d5de27bccf | before/quality-check | modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/generator/InterfaceAnalyzer.java | InterfaceAnalyzer.hasPossibleMutatingMethods | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-immutable-object/src/main/java/net/sf/qualitycheck/immutableobject/generator/InterfaceAnalyzer.java#L74-L83 | train | java | Checks if the given type has possible mutating methods (e.g. setter methods or methods with parameters).
@param type
interface
@return {@code true} if possible mutating methods were found otherwise {@code false} | private static boolean hasPossibleMutatingMethods(@Nonnull final List<Method> methods) {
boolean result = false;
for (final Method method : methods) {
if (!method.getAttributes().isEmpty()) {
result = true;
break;
}
}
return result;
} | Checks if the given type has possible mutating methods (e.g. setter methods or methods with parameters).
@param type
interface
@return {@code true} if possible mutating methods were found otherwise {@code false}
private static boolean hasPossibleMutatingMethods(@Nonnull final List<Method> methods) {
boolean result ... | 105 | 212 | 257 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 69a769cdf69cdd5005de122a94b1989042df4efe7daf7d6e78350fb0ef740abb | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
e6891cfcb9add1233e5bedb1 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/knxnetip/util/SuppFamiliesDIB.java | SuppFamiliesDIB.toByteArray | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/knxnetip/util/SuppFamiliesDIB.java#L148-L158 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.knxnetip.util.DIB#toByteArray() | public byte[] toByteArray()
{
final byte[] buf = super.toByteArray();
int i = 2;
for (final Iterator it = map.entrySet().iterator(); it.hasNext();) {
final Map.Entry e = (Map.Entry) it.next();
buf[i++] = ((Short) e.getKey()).byteValue();
buf[i++] = ((Short) e.getValue()).byteValue();
}
retu... | /* (non-Javadoc)
@see tuwien.auto.calimero.knxnetip.util.DIB#toByteArray()
public byte[] toByteArray()
{
final byte[] buf = super.toByteArray();
int i = 2;
for (final Iterator it = map.entrySet().iterator(); it.hasNext();) {
final Map.Entry e = (Map.Entry) it.next();
buf[i++] = ((Short) e.getKey()).... | 115 | 74 | 331 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | e7b6421fa84e3b0eaf61067ea3bcae187567ef616161ca506626ff20c4275513 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
020710b156e7901001fbf6da | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.setOutput | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L119-L124 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#setOutput(java.io.Writer, boolean) | public void setOutput(Writer output, boolean close)
{
reset();
w = new BufferedWriter(output);
closeWriter = close;
} | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#setOutput(java.io.Writer, boolean)
public void setOutput(Writer output, boolean close)
{
reset();
w = new BufferedWriter(output);
closeWriter = close;
} | 57 | 91 | 130 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | b1c1f73f8bf6475dc4448190942537009c34e9f550a83657e315c2189e842416 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
74a58493c68f938676afe321 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.writeDeclaration | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L129-L143 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeDeclaration(boolean, java.lang.String) | public void writeDeclaration(boolean standalone, String encoding)
throws KNXMLException
{
try {
w.write("<?xml version=" + quote + "1.0" + quote);
w.write(" standalone=" + quote + (standalone ? "yes" : "no") + quote);
if (encoding != null && encoding.length() > 0)
w.write(" encoding=" + quote +... | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeDeclaration(boolean, java.lang.String)
public void writeDeclaration(boolean standalone, String encoding)
throws KNXMLException
{
try {
w.write("<?xml version=" + quote + "1.0" + quote);
w.write(" standalone=" + quote + (standalone ? "yes" : ... | 150 | 100 | 468 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 49c7dc13552371fafbc3433ad5a7ba6453e0a31538277925bab42dac3c957065 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
ff712de9e594dd0b1f782324 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.writeElement | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L149-L158 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeElement
(java.lang.String, java.util.List, java.lang.String) | public void writeElement(String name, List att, String content) throws KNXMLException
{
try {
final Tag tag = new Tag(name, att, content, false);
layout.push(tag);
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeElement
(java.lang.String, java.util.List, java.lang.String)
public void writeElement(String name, List att, String content) throws KNXMLException
{
try {
final Tag tag = new Tag(name, att, content, false);
layout.push(tag);
}
catch (fina... | 101 | 122 | 269 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | bbe06ffe9b686a76d39cc716c5e6d995422ce81f87cd1315e7b1a9160f63a18b | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
38007c6dc5c774938eabe7a0 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.writeEmptyElement | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L164-L173 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeEmptyElement
(java.lang.String, java.util.List) | public void writeEmptyElement(String name, List att) throws KNXMLException
{
try {
final Tag tag = new Tag(name, att, null, true);
tag.endTag();
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeEmptyElement
(java.lang.String, java.util.List)
public void writeEmptyElement(String name, List att) throws KNXMLException
{
try {
final Tag tag = new Tag(name, att, null, true);
tag.endTag();
}
catch (final IOException e) {
throw new... | 96 | 109 | 250 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 671b02d0759ffd8d12b09be7d1f3550e2a9d695612eb9c7fdaebb25673df64b7 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
f6d97abb46830e6489615655 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.writeCharData | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L178-L192 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeCharData(java.lang.String, boolean) | public void writeCharData(String text, boolean isCDATASection) throws KNXMLException
{
try {
if (isCDATASection) {
w.write("<![CDATA[");
w.write(text);
w.write("]]>");
}
else
w.write(References.replace(text, true));
}
catch (final IOException e) {
throw new KNXMLException(... | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeCharData(java.lang.String, boolean)
public void writeCharData(String text, boolean isCDATASection) throws KNXMLException
{
try {
if (isCDATASection) {
w.write("<![CDATA[");
w.write(text);
w.write("]]>");
}
else
w.write(R... | 118 | 97 | 345 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | adc3d29a229ddd1f5e3304df7b9272ae5ac6511537830af8fcd4d8bf41afc9a8 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
7178c237b2f901aaa733c2d6 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.writeComment | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L197-L208 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeComment(java.lang.String) | public void writeComment(String comment) throws KNXMLException
{
try {
w.write("<!--");
w.write(comment);
w.write("-->");
w.newLine();
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#writeComment(java.lang.String)
public void writeComment(String comment) throws KNXMLException
{
try {
w.write("<!--");
w.write(comment);
w.write("-->");
w.newLine();
}
catch (final IOException e) {
throw new KNXMLException(e.getMes... | 86 | 87 | 248 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 044e324f9d875210fa9cac1528dad56c63ecf3c9d66fdc211d89f80a42c9a36e | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
376fa7b627320900d908f062 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.endElement | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L213-L225 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#endElement() | public void endElement() throws KNXMLException
{
if (layout.empty())
throw new KNXIllegalStateException("no elements to end");
try {
((Tag) layout.pop()).endTag();
if (layout.empty())
w.flush();
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#endElement()
public void endElement() throws KNXMLException
{
if (layout.empty())
throw new KNXIllegalStateException("no elements to end");
try {
((Tag) layout.pop()).endTag();
if (layout.empty())
w.flush();
}
catch (final IOExcept... | 101 | 69 | 312 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 85fcdb951b7e920c6ffc32d40b5c38d851810ac5ba128732aa76a06ff2baa6ea | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
56d9fcea0bf31adee12d499d | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.endAllElements | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L230-L240 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#endAllElements() | public void endAllElements() throws KNXMLException
{
try {
while (!layout.empty())
((Tag) layout.pop()).endTag();
w.flush();
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#endAllElements()
public void endAllElements() throws KNXMLException
{
try {
while (!layout.empty())
((Tag) layout.pop()).endTag();
w.flush();
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | 84 | 73 | 235 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 17290f4b7c307fc09da71fe96e8a4a0597dc9447139d333ae005d0c9294c23c0 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
ebd5b3080fcc2d958cc1e710 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java | DefaultXMLWriter.close | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/xml/def/DefaultXMLWriter.java#L245-L256 | train | java | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#close() | public void close() throws KNXMLException
{
if (!layout.isEmpty())
endAllElements();
if (closeWriter)
try {
w.close();
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | /* (non-Javadoc)
@see tuwien.auto.calimero.xml.XMLWriter#close()
public void close() throws KNXMLException
{
if (!layout.isEmpty())
endAllElements();
if (closeWriter)
try {
w.close();
}
catch (final IOException e) {
throw new KNXMLException(e.getMessage());
}
} | 80 | 64 | 236 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | e5be60afa09302f314f74376e95daada22780b65bac464dda954bdc88cd66cfb | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
ab6bad9160cfec689b678a33 | thorstenwagner/TraJ | src/main/java/de/biomedical_imaging/traJ/TrajectoryValidIndexTimelagIterator.java | TrajectoryValidIndexTimelagIterator.next | https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryValidIndexTimelagIterator.java#L81-L98 | train | java | Give next index i where i and i+timelag is valid | public Integer next() {
for(int i = currentIndex; i < t.size(); i++){
if(i+timelag>=t.size()){
return null;
}
if((t.get(i) != null) && (t.get(i+timelag) != null)){
if(overlap){
currentIndex = i+1;
}
else{
currentIndex = i+timelag;
}
return i;
}
}
return null;
} | Give next index i where i and i+timelag is valid
public Integer next() {
for(int i = currentIndex; i < t.size(); i++){
if(i+timelag>=t.size()){
return null;
}
if((t.get(i) != null) && (t.get(i+timelag) != null)){
if(overlap){
currentIndex = i+1;
}
else{
currentIndex = i+timelag;
... | 124 | 48 | 317 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | ba476f351b92e7c636bb83796d69ba4dfee49357a8418319b32954fd40d2f28b | MIT | permissive | https://github.com/thorstenwagner/TraJ/blob/master/license.txt |
80f58023cfa90ce02e304446 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/PortOutputStream.java | PortOutputStream.write | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/PortOutputStream.java#L92-L97 | train | java | /* (non-Javadoc)
@see java.io.OutputStream#write(byte[]) | public void write(byte[] b) throws IOException
{
if (b == null)
throw new NullPointerException();
p.writeBytes(b, 0, b.length);
} | /* (non-Javadoc)
@see java.io.OutputStream#write(byte[])
public void write(byte[] b) throws IOException
{
if (b == null)
throw new NullPointerException();
p.writeBytes(b, 0, b.length);
} | 53 | 56 | 143 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 16ccf3bd89c05f152aef3973be53e3b095101871136a2eeb8253a85db1954bf2 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
c701eee3695361185edffb26 | ow2-chameleon/fuchsia | bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/PortOutputStream.java | PortOutputStream.write | https://github.com/ow2-chameleon/fuchsia/blob/4e9318eadbdeb945e529789f573b45386e619bed/bases/knx/calimero/src/main/java/tuwien/auto/calimero/serial/PortOutputStream.java#L102-L110 | train | java | /* (non-Javadoc)
@see java.io.OutputStream#write(byte[], int, int) | public void write(byte[] b, int off, int len) throws IOException
{
if (b == null)
throw new NullPointerException();
if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) > b.length)
|| ((off + len) < 0))
throw new IndexOutOfBoundsException();
p.writeBytes(b, off, len);
} | /* (non-Javadoc)
@see java.io.OutputStream#write(byte[], int, int)
public void write(byte[] b, int off, int len) throws IOException
{
if (b == null)
throw new NullPointerException();
if ((off < 0) || (off > b.length) || (len < 0) || ((off + len) > b.length)
|| ((off + len) < 0))
throw new IndexOutO... | 110 | 66 | 305 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 732d704f2e598f9b5395525e85a85de5f52f9f0a6862a1d935b9c79e28be2153 | Apache-2.0 | permissive | https://github.com/ow2-chameleon/fuchsia/blob/master/LICENSE |
a1a79dbbaa8e603532c5f275 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.checkNumberInRange | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L98-L132 | train | java | Checks the passed {@code value} against the ranges of the given datatype.
@param value
value which must be a number and in the range of the given datatype.
@param type
requested return value type, must be a subclass of {@code Number}
@return a number
@throws NumberFormatException
if the given value can not be parsed ... | private static <T> Number checkNumberInRange(final String value, final Class<T> type) {
final Number ret;
if (type.equals(Byte.class)) {
final Number number = new BigInteger(value);
NumberInRange.checkByte(number);
ret = Byte.valueOf(number.byteValue());
} else if (type.equals(Double.class)) {
final N... | Checks the passed {@code value} against the ranges of the given datatype.
@param value
value which must be a number and in the range of the given datatype.
@param type
requested return value type, must be a subclass of {@code Number}
@return a number
@throws NumberFormatException
if the given value can not be parsed ... | 397 | 331 | 1,437 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 9cc24fdaa6dbc21580bb8868a7252b15ec5b034ca1b69eff14c7c0cb12c25ea0 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
69ddd1ac6940df1a3ffac1f2 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.contains | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L154-L165 | train | java | Ensures that an element {@code needle} is contained in a collection {@code haystack}.
<p>
This is in particular useful if you want to check whether an enum value is contained in an {@code EnumSet}. The
check is implemented using {@link java.util.Collection#contains(Object)}.
<p>
We recommend to use the overloaded met... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNotContainedArgumentException.class })
public static <T extends Object> T contains(@Nonnull final Collection<T> haystack, @Nonnull final T needle) {
Check.notNull(haystack, "haystack");
Check.notNull(needle, "needle");
if (!haystack.contain... | Ensures that an element {@code needle} is contained in a collection {@code haystack}.
<p>
This is in particular useful if you want to check whether an enum value is contained in an {@code EnumSet}. The
check is implemented using {@link java.util.Collection#contains(Object)}.
<p>
We recommend to use the overloaded met... | 245 | 747 | 416 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 586dff2fb032d29db13d7831d48515d321acb4444e1361b925140d6ff898d24e | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
7ebf26b9a1341b0dd13a6110 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.containsNullElements | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L205-L214 | train | java | Checks if the given array contains {@code null}.
@param array
reference to an array
@return {@code true} if the array contains {@code null}, otherwise {@code false} | private static boolean containsNullElements(@Nonnull final Object[] array) {
boolean containsNull = false;
for (final Object o : array) {
if (o == null) {
containsNull = true;
break;
}
}
return containsNull;
} | Checks if the given array contains {@code null}.
@param array
reference to an array
@return {@code true} if the array contains {@code null}, otherwise {@code false}
private static boolean containsNullElements(@Nonnull final Object[] array) {
boolean containsNull = false;
for (final Object o : array) {
if (o ==... | 99 | 165 | 232 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 6b9e75a42ab1a65742ed476216ff02923f22771c37ded5eedc6ccd0abf0feb50 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
77c9a35b7f92ea403f756ee5 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.greaterOrEqualThan | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L705-L717 | train | java | Ensures that a passed {@code Comparable} is greater or equal compared to another {@code Comparable}. The
comparison is made using {@code expected.compareTo(check) > 0}.
@param expected
Expected value
@param check
Comparable to be checked
@param message
an error message describing why the comparable must be greater tha... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNotGreaterOrEqualThanException.class })
public static <T extends Comparable<T>> T greaterOrEqualThan(@Nonnull final T expected, @Nonnull final T check,
@Nonnull final String message) {
Check.notNull(expected, "expected");
Check.notNull(chec... | Ensures that a passed {@code Comparable} is greater or equal compared to another {@code Comparable}. The
comparison is made using {@code expected.compareTo(check) > 0}.
@param expected
Expected value
@param check
Comparable to be checked
@param message
an error message describing why the comparable must be greater tha... | 240 | 631 | 464 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | d6da6f859cbbe0e96cbb4dff4e3a56bba476f614dd463e715d92e6bd777e1fb3 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
41d48053171843f087753549 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.greaterThan | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L731-L739 | train | java | Ensures that a passed {@code byte} is greater to another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@return the passed {@code Comparable} argument {@code check}
@throws IllegalNotGreaterThanException
if the argument value {@code check} is not greater than value {@code expected} | @ArgumentsChecked
@Throws(IllegalNotGreaterThanException.class)
public static byte greaterThan(final byte expected, final byte check) {
if (expected >= check) {
throw new IllegalNotGreaterThanException(check);
}
return check;
} | Ensures that a passed {@code byte} is greater to another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@return the passed {@code Comparable} argument {@code check}
@throws IllegalNotGreaterThanException
if the argument value {@code check} is not greater than value {@code expected}... | 122 | 320 | 240 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 5cf00a2a99f707afebbbde583ac37791732ebee66514d474126731b32693d0c3 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
c7753c33db4b9138142829d1 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.greaterThan | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L756-L764 | train | java | Ensures that a passed {@code byte} is greater than another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@param message
an error message describing why the comparable must be greater than a value (will be passed to
{@code IllegalNotGreaterThanException})
@return the passed {@code C... | @ArgumentsChecked
@Throws(IllegalNotGreaterThanException.class)
public static byte greaterThan(final byte expected, final byte check, @Nonnull final String message) {
if (expected >= check) {
throw new IllegalNotGreaterThanException(message, check);
}
return check;
} | Ensures that a passed {@code byte} is greater than another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@param message
an error message describing why the comparable must be greater than a value (will be passed to
{@code IllegalNotGreaterThanException})
@return the passed {@code C... | 159 | 472 | 280 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 02940cde80fb2c73ac4b48a545ada9c8fe58c929b12c0d9086a3b3bb76c2a64c | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
c86c33b40d890b3c92c09809 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.greaterThan | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1092-L1103 | train | java | Ensures that a passed {@code Comparable} is greater than another {@code Comparable}. The comparison is made using
{@code expected.compareTo(check) >= 0}.
@param expected
Expected value
@param check
Comparable to be checked
@param message
an error message describing why the comparable must be greater than a value (will... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNotGreaterThanException.class })
public static <T extends Comparable<T>> T greaterThan(@Nonnull final T expected, @Nonnull final T check, @Nonnull final String message) {
Check.notNull(expected, "expected");
Check.notNull(check, "check");
i... | Ensures that a passed {@code Comparable} is greater than another {@code Comparable}. The comparison is made using
{@code expected.compareTo(check) >= 0}.
@param expected
Expected value
@param check
Comparable to be checked
@param message
an error message describing why the comparable must be greater than a value (will... | 218 | 589 | 441 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 55544893a524fdcef1fc45027a86330e9a9e4430dfa9416c3f728d479850661f | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
14e3b764d4f1c355c14509a6 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.hasAnnotation | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1117-L1127 | train | java | Ensures that a passed class has an annotation of a specific type
@param clazz
the class that must have a required annotation
@param annotation
the type of annotation that is required on the class
@return the given annotation which is present on the checked class
@throws IllegalMissingAnnotationException
if the passed... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalMissingAnnotationException.class })
public static Annotation hasAnnotation(@Nonnull final Class<?> clazz, @Nonnull final Class<? extends Annotation> annotation) {
Check.notNull(clazz, "clazz");
Check.notNull(annotation, "annotation");
if (!c... | Ensures that a passed class has an annotation of a specific type
@param clazz
the class that must have a required annotation
@param annotation
the type of annotation that is required on the class
@return the given annotation which is present on the checked class
@throws IllegalMissingAnnotationException
if the passed... | 162 | 367 | 476 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 6abe669a6d15a09a80d4cf5256400b4040168eefda8adc50225e5c6d6f382f8d | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
22592615c82367da79cc7b3c | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.instanceOf | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1141-L1146 | train | java | Ensures that a passed argument is a member of a specific type.
@param type
class that the given object is a member of
@param obj
the object reference that should be a member of a specific {@code type}
@return the given object cast to type
@throws IllegalInstanceOfArgumentException
if the given argument {@code obj} is... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalInstanceOfArgumentException.class })
@SuppressWarnings("unchecked")
public static <T> T instanceOf(@Nonnull final Class<?> type, @Nonnull final Object obj) {
return (T) instanceOf(type, obj, EMPTY_ARGUMENT_NAME);
} | Ensures that a passed argument is a member of a specific type.
@param type
class that the given object is a member of
@param obj
the object reference that should be a member of a specific {@code type}
@return the given object cast to type
@throws IllegalInstanceOfArgumentException
if the given argument {@code obj} is... | 138 | 349 | 291 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 74d8b192ad354acff55b76912ef5734225fd3df9ea8658f6cfda28f224b4c9b2 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
f33c42421196641c1d4065a7 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.instanceOf | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1162-L1172 | train | java | Ensures that a passed argument is a member of a specific type.
@param type
class that the given object is a member of
@param obj
the object reference that should be a member of a specific {@code type}
@param name
name of object reference (in source code)
@return the given object cast to type
@throws IllegalInstanceOf... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalInstanceOfArgumentException.class })
@SuppressWarnings("unchecked")
public static <T> T instanceOf(@Nonnull final Class<?> type, @Nonnull final Object obj, @Nullable final String name) {
Check.notNull(type, "type");
Check.notNull(obj, "obj");... | Ensures that a passed argument is a member of a specific type.
@param type
class that the given object is a member of
@param obj
the object reference that should be a member of a specific {@code type}
@param name
name of object reference (in source code)
@return the given object cast to type
@throws IllegalInstanceOf... | 189 | 403 | 453 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | ae8d3783530e0b24b1043149fd5df8a48807d79e230f77f7b32c778265ce7a75 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
dbf484081097b9600ede3677 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.isNull | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1188-L1193 | train | java | Ensures that a given argument is {@code null}.
Normally, the usage of {@code null} arguments is disregarded by the authors of quality-check. Still, there are
certain circumstances where null is required, e.g. the primary key of an entity before it is written to the
database for the first time. In such cases it is ok t... | @Throws(IllegalNotNullArgumentException.class)
public static void isNull(@Nullable final Object reference) {
if (reference != null) {
throw new IllegalNotNullArgumentException(reference);
}
} | Ensures that a given argument is {@code null}.
Normally, the usage of {@code null} arguments is disregarded by the authors of quality-check. Still, there are
certain circumstances where null is required, e.g. the primary key of an entity before it is written to the
database for the first time. In such cases it is ok t... | 170 | 593 | 200 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | c9e8500d238e20dd6158bf650655dea3afd35a0898870c409f93f792b60a04ac | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
b405f3b0816f9b6dcdcda9d9 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.isNull | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1211-L1216 | train | java | Ensures that a given argument is {@code null}.
Normally, the usage of {@code null} arguments is disregarded by the authors of quality-check. Still, there are
certain circumstances where null is required, e.g. the primary key of an entity before it is written to the
database for the first time. In such cases it is ok t... | @Throws(IllegalNotNullArgumentException.class)
public static void isNull(@Nullable final Object reference, @Nullable final String name) {
if (reference != null) {
throw new IllegalNotNullArgumentException(name, reference);
}
} | Ensures that a given argument is {@code null}.
Normally, the usage of {@code null} arguments is disregarded by the authors of quality-check. Still, there are
certain circumstances where null is required, e.g. the primary key of an entity before it is written to the
database for the first time. In such cases it is ok t... | 190 | 648 | 235 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | d1dbc3914594039eeeef8da8acc09a667b8c4528b7215e0ef76a3b87a62a37a3 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
94d1c7cb648c1c078dcedc6f | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.isNumber | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1267-L1272 | train | java | Ensures that a string argument is a number according to {@code Integer.parseInt}
@param value
value which must be a number
@param name
name of object reference (in source code)
@return the given string argument converted to an int
@throws IllegalNumberArgumentException
if the given argument {@code value} is no number | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNumberArgumentException.class })
public static int isNumber(@Nonnull final String value, @Nullable final String name) {
Check.notNull(value, "value");
return Check.isNumber(value, name, Integer.class).intValue();
} | Ensures that a string argument is a number according to {@code Integer.parseInt}
@param value
value which must be a number
@param name
name of object reference (in source code)
@return the given string argument converted to an int
@throws IllegalNumberArgumentException
if the given argument {@code value} is no number... | 126 | 320 | 292 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | ca295937285f7041d5ff6fc002565b3067a38263970dc98eecb882edb748d1aa | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
478f2eebc07e65603676cc8d | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.isNumber | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1294-L1312 | train | java | Ensures that a String argument is a number. This overload supports all subclasses of {@code Number}. The number
is first converted to a {@code BigDecimal} or {@code BigInteger}. Floating point types are only supported if the
{@code type} is one of {@code Float, Double, BigDecimal}.
<p>
This method does also check agai... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNumberArgumentException.class })
public static <T extends Number> T isNumber(@Nonnull final String value, @Nullable final String name, @Nonnull final Class<T> type) {
Check.notNull(value, "value");
Check.notNull(type, "type");
final Number ... | Ensures that a String argument is a number. This overload supports all subclasses of {@code Number}. The number
is first converted to a {@code BigDecimal} or {@code BigInteger}. Floating point types are only supported if the
{@code type} is one of {@code Float, Double, BigDecimal}.
<p>
This method does also check agai... | 328 | 839 | 615 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 051fc21cd21ad00bc875470da90e43dda76ae99e6164fa8bbe9f8815ac01790b | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
f490e280c20c0916cb3c75e1 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.isNumeric | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1329-L1333 | train | java | Ensures that a readable sequence of {@code char} values is numeric. Numeric arguments consist only of the
characters 0-9 and may start with 0 (compared to number arguments, which must be valid numbers - think of a bank
account number).
<p>
We recommend to use the overloaded method {@link Check#isNumeric(CharSequence, ... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNumberArgumentException.class })
public static <T extends CharSequence> T isNumeric(@Nonnull final T value) {
return isNumeric(value, EMPTY_ARGUMENT_NAME);
} | Ensures that a readable sequence of {@code char} values is numeric. Numeric arguments consist only of the
characters 0-9 and may start with 0 (compared to number arguments, which must be valid numbers - think of a bank
account number).
<p>
We recommend to use the overloaded method {@link Check#isNumeric(CharSequence, ... | 179 | 618 | 233 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 976aea044df2ff91fd1e6faf273e17c535ae8dc16cc1946f9453eb6d943a2061 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
123949de41c02812a9861613 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.isNumeric | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1348-L1356 | train | java | Ensures that a readable sequence of {@code char} values is numeric. Numeric arguments consist only of the
characters 0-9 and may start with 0 (compared to number arguments, which must be valid numbers - think of a bank
account number).
@param value
a readable sequence of {@code char} values which must be a number
@par... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNumericArgumentException.class })
public static <T extends CharSequence> T isNumeric(@Nonnull final T value, @Nullable final String name) {
Check.notNull(value, "value");
if (!matches(NumericRegularExpressionHolder.getPattern(), value)) {
t... | Ensures that a readable sequence of {@code char} values is numeric. Numeric arguments consist only of the
characters 0-9 and may start with 0 (compared to number arguments, which must be valid numbers - think of a bank
account number).
@param value
a readable sequence of {@code char} values which must be a number
@par... | 190 | 491 | 397 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 8799814192f30dd1351db7d8f650941a6b6db4ce168b5273d6707c6468bfb44f | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
fde72fb42c8fdcbcd7793a11 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.lesserThan | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1370-L1378 | train | java | Ensures that a passed {@code byte} is less than another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@return the passed {@code byte} argument {@code check}
@throws IllegalNotLesserThanException
if the argument value {@code check} is not lesser than value {@code expected} | @ArgumentsChecked
@Throws(IllegalNotLesserThanException.class)
public static byte lesserThan(final byte expected, final byte check) {
if (expected <= check) {
throw new IllegalNotLesserThanException(check);
}
return check;
} | Ensures that a passed {@code byte} is less than another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@return the passed {@code byte} argument {@code check}
@throws IllegalNotLesserThanException
if the argument value {@code check} is not lesser than value {@code expected}
@Argume... | 128 | 311 | 237 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 2e2fe82b5fc1120c8a681e5ede32578c9c678efe506bc2d3117146974e082b45 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
9e6a5cc2470a063fe2a0f87f | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.lesserThan | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1395-L1403 | train | java | Ensures that a passed {@code byte} is less than another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@param message
an error message describing why the comparables must be less than a value (will be passed to
{@code IllegalNotLessThanException})
@return the passed {@code Comparabl... | @ArgumentsChecked
@Throws(IllegalNotLesserThanException.class)
public static byte lesserThan(final byte expected, final byte check, @Nonnull final String message) {
if (expected <= check) {
throw new IllegalNotLesserThanException(message, check);
}
return check;
} | Ensures that a passed {@code byte} is less than another {@code byte}.
@param expected
Expected value
@param check
Comparable to be checked
@param message
an error message describing why the comparables must be less than a value (will be passed to
{@code IllegalNotLessThanException})
@return the passed {@code Comparabl... | 167 | 462 | 277 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | a1ff9534488a5cfdd78c74ea6e70309f614b598d5f51c691fe6cf2ed6bd9fb68 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
e2b8b79275166e12451f9dd4 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.matches | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1753-L1755 | train | java | Checks whether a character sequence matches against a specified pattern or not.
@param pattern
pattern, that the {@code chars} must correspond to
@param chars
a readable sequence of {@code char} values which should match the given pattern
@return {@code true} when {@code chars} matches against the passed {@code patter... | private static boolean matches(@Nonnull final Pattern pattern, @Nonnull final CharSequence chars) {
return pattern.matcher(chars).matches();
} | Checks whether a character sequence matches against a specified pattern or not.
@param pattern
pattern, that the {@code chars} must correspond to
@param chars
a readable sequence of {@code char} values which should match the given pattern
@return {@code true} when {@code chars} matches against the passed {@code patter... | 97 | 347 | 145 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 657481b25a117c7dbb7d1b130b96690f477a61445316eed301ac418610397b83 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
6c01a49ebf598859f1fe63c3 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.matchesPattern | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1776-L1780 | train | java | Ensures that a readable sequence of {@code char} values matches a specified pattern. If the given character
sequence does not match against the passed pattern, an {@link IllegalPatternArgumentException} will be thrown.
<p>
We recommend to use the overloaded method {@link Check#matchesPattern(Pattern, CharSequence, Str... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalPatternArgumentException.class })
public static <T extends CharSequence> T matchesPattern(@Nonnull final Pattern pattern, @Nonnull final T chars) {
return matchesPattern(pattern, chars, EMPTY_ARGUMENT_NAME);
} | Ensures that a readable sequence of {@code char} values matches a specified pattern. If the given character
sequence does not match against the passed pattern, an {@link IllegalPatternArgumentException} will be thrown.
<p>
We recommend to use the overloaded method {@link Check#matchesPattern(Pattern, CharSequence, Str... | 224 | 834 | 285 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | c7f7be0b741c695000de5272d14fbb4024e09602c0c797b72496ab835343206e | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
4a2f9fb059e9137e301afc38 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.matchesPattern | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1799-L1809 | train | java | Ensures that a readable sequence of {@code char} values matches a specified pattern. If the given character
sequence does not match against the passed pattern, an {@link IllegalPatternArgumentException} will be thrown.
@param pattern
pattern, that the {@code chars} must correspond to
@param chars
a readable sequence o... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalPatternArgumentException.class })
public static <T extends CharSequence> T matchesPattern(@Nonnull final Pattern pattern, @Nonnull final T chars,
@Nullable final String name) {
Check.notNull(pattern, "pattern");
Check.notNull(chars, "chars"... | Ensures that a readable sequence of {@code char} values matches a specified pattern. If the given character
sequence does not match against the passed pattern, an {@link IllegalPatternArgumentException} will be thrown.
@param pattern
pattern, that the {@code chars} must correspond to
@param chars
a readable sequence o... | 237 | 693 | 447 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | cc3b441e10d36d9f801185e614d93e3cdf9c45541aa41d3a0bfdad75af3ab0f4 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
5c8cac2927bdc7df38189a4f | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.noNullElements | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1825-L1829 | train | java | Ensures that an iterable reference is neither {@code null} nor contains any elements that are {@code null}.
<p>
We recommend to use the overloaded method {@link Check#noNullElements(Iterable, String)} and pass as second
argument the name of the parameter to enhance the exception message.
@param iterable
the iterable ... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNullElementsException.class })
public static <T extends Iterable<?>> T noNullElements(@Nonnull final T iterable) {
return noNullElements(iterable, EMPTY_ARGUMENT_NAME);
} | Ensures that an iterable reference is neither {@code null} nor contains any elements that are {@code null}.
<p>
We recommend to use the overloaded method {@link Check#noNullElements(Iterable, String)} and pass as second
argument the name of the parameter to enhance the exception message.
@param iterable
the iterable ... | 163 | 562 | 246 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 236611248a47b006fb7ebcab93c2c9f039508b75174690a271a990e15bf2c01a | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
6d41896fa393845542c1aa07 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.noNullElements | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1842-L1852 | train | java | Ensures that an iterable reference is neither {@code null} nor contains any elements that are {@code null}.
@param iterable
the iterable reference which should not contain {@code null}
@param name
name of object reference (in source code)
@return the passed reference which contains no elements that are {@code null}
@t... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNullElementsException.class })
public static <T extends Iterable<?>> T noNullElements(@Nonnull final T iterable, final String name) {
Check.notNull(iterable, "iterable");
for (final Object element : iterable) {
if (element == null) {
th... | Ensures that an iterable reference is neither {@code null} nor contains any elements that are {@code null}.
@param iterable
the iterable reference which should not contain {@code null}
@param name
name of object reference (in source code)
@return the passed reference which contains no elements that are {@code null}
@t... | 176 | 433 | 394 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | a88d12b4a87bd3a9df5c43de597f38070cd15848c620497387311bb2fb4e18db | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
f5a64d5696519bae4fab677f | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.noNullElements | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1867-L1871 | train | java | Ensures that an array does not contain {@code null}.
<p>
We recommend to use the overloaded method {@link Check#noNullElements(Object[], String)} and pass as second
argument the name of the parameter to enhance the exception message.
@param array
reference to an array
@return the passed reference which contains no el... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNullElementsException.class })
public static <T> T[] noNullElements(@Nonnull final T[] array) {
return noNullElements(array, EMPTY_ARGUMENT_NAME);
} | Ensures that an array does not contain {@code null}.
<p>
We recommend to use the overloaded method {@link Check#noNullElements(Object[], String)} and pass as second
argument the name of the parameter to enhance the exception message.
@param array
reference to an array
@return the passed reference which contains no el... | 142 | 443 | 224 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 7403548c012074aa8bdc3bd1cccde443c7c83492f453d8891bb26ffa34bcf4d8 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
0b578bc6f8a65557ad8a227d | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.noNullElements | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1884-L1892 | train | java | Ensures that an array does not contain {@code null}.
@param array
reference to an array
@param name
name of object reference (in source code)
@return the passed reference which contains no elements that are {@code null}
@throws IllegalNullElementsException
if the given argument {@code array} contains {@code null} | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalNullElementsException.class })
public static <T> T[] noNullElements(@Nonnull final T[] array, @Nullable final String name) {
Check.notNull(array, "array");
if (containsNullElements(array)) {
throw new IllegalNullElementsException(name);
}... | Ensures that an array does not contain {@code null}.
@param array
reference to an array
@param name
name of object reference (in source code)
@return the passed reference which contains no elements that are {@code null}
@throws IllegalNullElementsException
if the given argument {@code array} contains {@code null}
@Ar... | 145 | 315 | 339 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 87c00911dd38c7e7172e79db2e8954ffa69830e7ee980b7e4dd6d5d4772c5e4c | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
d90f6ab0a07903242e607a7b | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1930-L1936 | train | java | Ensures that a passed parameter of the calling method is not empty, using the passed expression to evaluate the
emptiness.
@param expression
the result of the expression to verify the emptiness of a reference ({@code true} means empty,
{@code false} means not empty)
@param name
name of object reference (in source code... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static void notEmpty(final boolean expression, @Nullable final String name) {
if (expression) {
throw new IllegalEmptyArgumentException(name);
}
} | Ensures that a passed parameter of the calling method is not empty, using the passed expression to evaluate the
emptiness.
@param expression
the result of the expression to verify the emptiness of a reference ({@code true} means empty,
{@code false} means not empty)
@param name
name of object reference (in source code... | 139 | 409 | 266 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 7c128d72648bc699a55e4ae2c5dac35ecf16e454a2054a493d3fece6b1118202 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
b6c498bd1ae626fb948d0841 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1953-L1959 | train | java | Ensures that a passed string as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(CharSequence, String)} and pass as second
argument the name of the parameter to enhance the exception message.
@param chars
a readable sequence of {@code char} values whi... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T extends CharSequence> T notEmpty(@Nonnull final T chars) {
notNull(chars);
notEmpty(chars, chars.length() == 0, EMPTY_ARGUMENT_NAME);
return chars;
} | Ensures that a passed string as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(CharSequence, String)} and pass as second
argument the name of the parameter to enhance the exception message.
@param chars
a readable sequence of {@code char} values whi... | 177 | 569 | 278 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | a49b490b2388a6fd4cbd32f8c36ad9efcc00a23edcad52f236fd35b2a1e562df | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
494abd97012729a3a39ebb5f | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1976-L1982 | train | java | Ensures that a passed collection as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Collection, String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param collection
a collection which should not be empty
... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T extends Collection<?>> T notEmpty(@Nonnull final T collection) {
notNull(collection);
notEmpty(collection, collection.isEmpty(), EMPTY_ARGUMENT_NAME);
return collection;
} | Ensures that a passed collection as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Collection, String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param collection
a collection which should not be empty
... | 166 | 548 | 300 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 03a24eaec2a436261735d29f3a459f8288021ccf0d24ca4fe407ef1804250941 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
ef21c5a047fbda4b4ace5364 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1999-L2005 | train | java | Ensures that a passed iterable as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Iterable, String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param iterable
an iterable which should not be empty
@return... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T extends Iterable<?>> T notEmpty(@Nonnull final T iterable) {
notNull(iterable);
notEmpty(iterable, !iterable.iterator().hasNext(), EMPTY_ARGUMENT_NAME);
return iterable;
} | Ensures that a passed iterable as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Iterable, String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param iterable
an iterable which should not be empty
@return... | 174 | 537 | 300 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 1262feaa2c3480c222f93758b4f6a47cde4f14cb52c30bae60b70dbccb3deeab | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
81705500f0d06198e4a4be08 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2022-L2028 | train | java | Ensures that a passed map as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Collection, String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param map
a map which should not be empty
@return the passed re... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T extends Map<?, ?>> T notEmpty(@Nonnull final T map) {
notNull(map);
notEmpty(map, map.isEmpty(), EMPTY_ARGUMENT_NAME);
return map;
} | Ensures that a passed map as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Collection, String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param map
a map which should not be empty
@return the passed re... | 167 | 513 | 261 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 46409355fe1de75885b96e8009f2cb59be33d4eb3eeeb5a53634eaf3376b5c0f | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
5affefe09584128104cfbf35 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2058-L2066 | train | java | Ensures that an object reference passed as a parameter to the calling method is not empty. The passed boolean
value is the result of checking whether the reference is empty or not.
<p>
The following example describes how to use it.
<pre>
@ArgumentsChecked
public setText(String text) {
Check.notEmpty(text, text.i... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T> T notEmpty(@Nonnull final T reference, final boolean expression, @Nullable final String name) {
notNull(reference, name);
if (expression) {
throw new IllegalEmptyArgumentException(name);
}... | Ensures that an object reference passed as a parameter to the calling method is not empty. The passed boolean
value is the result of checking whether the reference is empty or not.
<p>
The following example describes how to use it.
<pre>
@ArgumentsChecked
public setText(String text) {
Check.notEmpty(text, text.i... | 258 | 864 | 343 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | ab43ded156b70aa9c6ce5dfeef307f53ae6e7565d187a4866e14cd0e5a338c86 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
1acc9ca4ce0d0822e4eb731c | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2091-L2097 | train | java | Ensures that a passed string as a parameter of the calling method is not empty.
<p>
The following example describes how to use it.
<pre>
@ArgumentsChecked
public setText(String text) {
this.text = Check.notEmpty(text, "text");
}
</pre>
@param chars
a readable sequence of {@code char} values which shou... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T extends CharSequence> T notEmpty(@Nonnull final T chars, @Nullable final String name) {
notNull(chars, name);
notEmpty(chars, chars.length() == 0, name);
return chars;
} | Ensures that a passed string as a parameter of the calling method is not empty.
<p>
The following example describes how to use it.
<pre>
@ArgumentsChecked
public setText(String text) {
this.text = Check.notEmpty(text, "text");
}
</pre>
@param chars
a readable sequence of {@code char} values which shou... | 203 | 610 | 298 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 6ec026f4faa833dab8d45f599a21c7b6a97efcbcf441e53ae0ac2804f8f84a4f | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
eac5553b257c268f7b98d76b | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2116-L2122 | train | java | Ensures that a passed map as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Collection, String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param map
a map which should not be empty
@param name
name of o... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T extends Map<?, ?>> T notEmpty(@Nonnull final T map, @Nullable final String name) {
notNull(map);
notEmpty(map, map.isEmpty(), name);
return map;
} | Ensures that a passed map as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Collection, String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param map
a map which should not be empty
@param name
name of o... | 183 | 567 | 275 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 22de2a6715184dec547278f4772c51c51a5b4e22b853dad91ac81be8de7a3b95 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
d88e7233f9f169dc9229addb | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2147-L2153 | train | java | Ensures that a passed collection as a parameter of the calling method is not empty.
<p>
The following example describes how to use it.
<pre>
@ArgumentsChecked
public setCollection(Collection<String> collection) {
this.collection = Check.notEmpty(collection, "collection");
}
</pre>
@param collect... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T extends Collection<?>> T notEmpty(@Nonnull final T collection, @Nullable final String name) {
notNull(collection, name);
notEmpty(collection, collection.isEmpty(), name);
return collection;
} | Ensures that a passed collection as a parameter of the calling method is not empty.
<p>
The following example describes how to use it.
<pre>
@ArgumentsChecked
public setCollection(Collection<String> collection) {
this.collection = Check.notEmpty(collection, "collection");
}
</pre>
@param collect... | 199 | 645 | 320 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | f1ef3a1a622f0186031e6be39fc03a3ef256857e69f1a07390cbafcf990039a0 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
d1c4d43b40095b42342db9c1 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2178-L2184 | train | java | Ensures that a passed iterable as a parameter of the calling method is not empty.
<p>
The following example describes how to use it.
<pre>
@ArgumentsChecked
public setIterable(Iterable<String> iterable) {
this.iterable = Check.notEmpty(iterable, "iterable");
}
</pre>
@param iterable
an iterable ... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T extends Iterable<?>> T notEmpty(@Nonnull final T iterable, @Nullable final String name) {
notNull(iterable, name);
notEmpty(iterable, !iterable.iterator().hasNext(), name);
return iterable;
} | Ensures that a passed iterable as a parameter of the calling method is not empty.
<p>
The following example describes how to use it.
<pre>
@ArgumentsChecked
public setIterable(Iterable<String> iterable) {
this.iterable = Check.notEmpty(iterable, "iterable");
}
</pre>
@param iterable
an iterable ... | 210 | 624 | 320 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 9e5014792f32f01477552c8e4094404f9c2908ce1cf3a70c0503af7b39c33133 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
b7b89bb5540e33be6b7c83b4 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2201-L2207 | train | java | Ensures that a passed map as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Object[], String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param array
a map which should not be empty
@return the passed re... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T> T[] notEmpty(@Nonnull final T[] array) {
notNull(array);
notEmpty(array, array.length == 0, EMPTY_ARGUMENT_NAME);
return array;
} | Ensures that a passed map as a parameter of the calling method is not empty.
<p>
We recommend to use the overloaded method {@link Check#notEmpty(Object[], String)} and pass as second argument
the name of the parameter to enhance the exception message.
@param array
a map which should not be empty
@return the passed re... | 169 | 517 | 259 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 2755179b09fabfb9e34c0b89f10ac693012b8ddd824496b37271b2f7870110c4 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
c148b42493075fc26ba19054 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEmpty | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2222-L2228 | train | java | Ensures that a passed map as a parameter of the calling method is not empty.
@param array
a map which should not be empty
@param name
name of object reference (in source code)
@return the passed reference that is not empty
@throws IllegalNullArgumentException
if the given argument {@code array} is {@code null}
@throws... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class })
public static <T> T[] notEmpty(@Nonnull final T[] array, @Nullable final String name) {
notNull(array);
notEmpty(array, array.length == 0, EMPTY_ARGUMENT_NAME);
return array;
} | Ensures that a passed map as a parameter of the calling method is not empty.
@param array
a map which should not be empty
@param name
name of object reference (in source code)
@return the passed reference that is not empty
@throws IllegalNullArgumentException
if the given argument {@code array} is {@code null}
@throws... | 152 | 395 | 288 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 1d384a03d7b777f6c9485502a9e17afae753c901261ea799960abd2e8d8be76d | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
8b6631d0f353cbfd58c3a0d0 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEquals | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2247-L2254 | train | java | Ensures that a passed boolean is not equal to another boolean. The comparison is made using
<code>expected == check</code>.
<p>
We recommend to use the overloaded method {@link Check#notEquals(boolean, boolean, String)} and pass as second
argument the name of the parameter to enhance the exception message.
@param exp... | @Throws(IllegalEqualException.class)
public static boolean notEquals(final boolean expected, final boolean check) {
if (expected == check) {
throw new IllegalEqualException(check);
}
return check;
} | Ensures that a passed boolean is not equal to another boolean. The comparison is made using
<code>expected == check</code>.
<p>
We recommend to use the overloaded method {@link Check#notEquals(boolean, boolean, String)} and pass as second
argument the name of the parameter to enhance the exception message.
@param exp... | 150 | 494 | 210 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | cb4bbb9d78ecb0a1ee1ecc54535affe17299d8be19ef92c615b3efceb08c1688 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
af03198634016d01cecb21ba | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notEquals | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2272-L2279 | train | java | Ensures that a passed boolean is not equal to another boolean. The comparison is made using
<code>expected == check</code>.
@param expected
Expected value
@param check
boolean to be checked
@param message
an error message describing why the booleans must equal (will be passed to
{@code IllegalEqualException})
@return ... | @Throws(IllegalEqualException.class)
public static boolean notEquals(final boolean expected, final boolean check, @Nonnull final String message) {
if (expected == check) {
throw new IllegalEqualException(message, check);
}
return check;
} | Ensures that a passed boolean is not equal to another boolean. The comparison is made using
<code>expected == check</code>.
@param expected
Expected value
@param check
boolean to be checked
@param message
an error message describing why the booleans must equal (will be passed to
{@code IllegalEqualException})
@return ... | 145 | 430 | 250 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | d89ece0e891b724eb7928b44acacff6b861bb41f4be90504bc7655d9f5242967 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
9bd374cff89c53f5b15c342e | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notNaN | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2696-L2703 | train | java | Ensures that a double argument is not NaN (not a number).
@see java.lang.Double#NaN
@param value
value which should not be NaN
@param name
name of object reference (in source code)
@return the given double value
@throws IllegalNaNArgumentException
if the given argument {@code value} is NaN | @Throws(IllegalNaNArgumentException.class)
public static double notNaN(final double value, @Nullable final String name) {
// most efficient check for NaN, see Double.isNaN(value))
if (value != value) {
throw new IllegalNaNArgumentException(name);
}
return value;
} | Ensures that a double argument is not NaN (not a number).
@see java.lang.Double#NaN
@param value
value which should not be NaN
@param name
name of object reference (in source code)
@return the given double value
@throws IllegalNaNArgumentException
if the given argument {@code value} is NaN
@Throws(IllegalNaNArgument... | 131 | 292 | 277 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | a676cd44eb8d28665661feb5dd1599ea5cd3188345dce5095e3c6edfbd180a62 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
8c828540c1bc8a723b3f214c | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notNegative | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2779-L2785 | train | java | Ensures that an double reference passed as a parameter to the calling method is not smaller than {@code 0}.
@param value
a number
@param name
name of the number reference (in source code)
@return the non-null reference that was validated
@throws IllegalNullArgumentException
if the given argument {@code reference} is s... | @Throws(IllegalNegativeArgumentException.class)
public static double notNegative(final double value, @Nullable final String name) {
if (value < 0.0) {
throw new IllegalNegativeArgumentException(name, value);
}
return value;
} | Ensures that an double reference passed as a parameter to the calling method is not smaller than {@code 0}.
@param value
a number
@param name
name of the number reference (in source code)
@return the non-null reference that was validated
@throws IllegalNullArgumentException
if the given argument {@code reference} is s... | 128 | 341 | 236 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | c8272738f384e75a934972846fe3bddd780626e077a5fe883c158a87fc77395d | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
c6d5fd70e965fac0dad09610 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notNull | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2960-L2966 | train | java | Ensures that an object reference passed as a parameter to the calling method is not {@code null}.
<p>
We recommend to use the overloaded method {@link Check#notNull(Object, String)} and pass as second argument the
name of the parameter to enhance the exception message.
@param reference
an object reference
@return the... | @Throws(IllegalNullArgumentException.class)
public static <T> T notNull(@Nonnull final T reference) {
if (reference == null) {
throw new IllegalNullArgumentException();
}
return reference;
} | Ensures that an object reference passed as a parameter to the calling method is not {@code null}.
<p>
We recommend to use the overloaded method {@link Check#notNull(Object, String)} and pass as second argument the
name of the parameter to enhance the exception message.
@param reference
an object reference
@return the... | 139 | 451 | 201 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | bf0f88f6818463dde0abb85613833ff60de7b1d0ec4ea4d6f580ac36eef65649 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
5444db06e93d7febb6b3274b | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notNull | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L2979-L2985 | train | java | Ensures that an object reference passed as a parameter to the calling method is not {@code null}.
@param reference
an object reference
@param name
name of object reference (in source code)
@return the non-null reference that was validated
@throws IllegalNullArgumentException
if the given argument {@code reference} is ... | @Throws(IllegalNullArgumentException.class)
public static <T> T notNull(@Nonnull final T reference, @Nullable final String name) {
if (reference == null) {
throw new IllegalNullArgumentException(name);
}
return reference;
} | Ensures that an object reference passed as a parameter to the calling method is not {@code null}.
@param reference
an object reference
@param name
name of object reference (in source code)
@return the non-null reference that was validated
@throws IllegalNullArgumentException
if the given argument {@code reference} is ... | 122 | 332 | 234 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | b486f7cfbc5c57a44904162eb611dc40e081ecb170325279e85b6ced01f9ae9b | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
6e7f5d223dcd4e2e6bdb7781 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.notPositive | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L3019-L3025 | train | java | Ensures that an double reference passed as a parameter to the calling method is not greater than {@code 0}.
@param value
a number
@param name
name of the number reference (in source code)
@return the non-null reference that was validated
@throws IllegalNullArgumentException
if the given argument {@code reference} is s... | @Throws(IllegalPositiveArgumentException.class)
public static double notPositive(final double value, @Nullable final String name) {
if (value > 0.0) {
throw new IllegalPositiveArgumentException(name, value);
}
return value;
} | Ensures that an double reference passed as a parameter to the calling method is not greater than {@code 0}.
@param value
a number
@param name
name of the number reference (in source code)
@return the non-null reference that was validated
@throws IllegalNullArgumentException
if the given argument {@code reference} is s... | 128 | 341 | 236 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | e95f9c3e4e46b97f02ad953c3fb22254ef658f0c8d1807bcfc27fb2333d9142f | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
ee7bd72046f5dbd3b4e5b16f | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.positionIndex | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L3200-L3209 | train | java | Ensures that a given position index is valid within the size of an array, list or string ...
@param index
index of an array, list or string
@param size
size of an array list or string
@return the index
@throws IllegalPositionIndexException
if the index is not a valid position index within an array, list or string of ... | @Throws(IllegalPositionIndexException.class)
public static int positionIndex(final int index, final int size) {
final boolean isIndexValid = (size >= 0) && (index >= 0) && (index < size);
if (!isIndexValid) {
throw new IllegalPositionIndexException(index, size);
}
return index;
} | Ensures that a given position index is valid within the size of an array, list or string ...
@param index
index of an array, list or string
@param size
size of an array list or string
@return the index
@throws IllegalPositionIndexException
if the index is not a valid position index within an array, list or string of ... | 156 | 338 | 295 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 81e9e1b63b6c365b8edcdf993dd0dd399ca1d9bda1511cd8f4dc9545e6c6b5e6 | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
f6f570abb280d5e936e6c227 | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.range | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L3234-L3242 | train | java | Ensures that the given arguments are a valid range.
A range (<em>start</em>, <em>end</em>, <em>size</em>) is valid if the following conditions are {@code true}:
<ul>
<li>start <= size</li>
<li>end <= size</li>
<li>start <= end</li>
<li>size >= 0</li>
<li>start >= 0</li>
<li>end >= 0</li>
</ul>
@param start
the start ... | @Throws(IllegalRangeException.class)
public static void range(@Nonnegative final int start, @Nonnegative final int end, @Nonnegative final int size) {
final boolean rangeIsValid = (start <= size) && (end <= size) && (start <= end);
final boolean inputValuesAreValid = (size >= 0) && (start >= 0) && (end >= 0);
i... | Ensures that the given arguments are a valid range.
A range (<em>start</em>, <em>end</em>, <em>size</em>) is valid if the following conditions are {@code true}:
<ul>
<li>start <= size</li>
<li>end <= size</li>
<li>start <= end</li>
<li>size >= 0</li>
<li>start >= 0</li>
<li>end >= 0</li>
</ul>
@param start
the start ... | 291 | 598 | 424 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 9caad970beda22719327df5248308fb2a9dd50efbd602fcbabae4978885cfafd | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
1fdafe907695471b417a1ecd | before/quality-check | modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java | Check.stateIsTrue | https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L3280-L3296 | train | java | Ensures that a given state is {@code true} and allows to specify the class of exception which is thrown in case
the state is not {@code true}.
@param expression
an expression that must be {@code true} to indicate a valid state
@param clazz
an subclass of {@link RuntimeException} which will be thrown if the given state... | @ArgumentsChecked
@Throws({ IllegalNullArgumentException.class, RuntimeInstantiationException.class })
public static void stateIsTrue(final boolean expression, final Class<? extends RuntimeException> clazz) {
Check.notNull(clazz, "clazz");
if (!expression) {
RuntimeException re;
try {
re = clazz.newIns... | Ensures that a given state is {@code true} and allows to specify the class of exception which is thrown in case
the state is not {@code true}.
@param expression
an expression that must be {@code true} to indicate a valid state
@param clazz
an subclass of {@link RuntimeException} which will be thrown if the given state... | 248 | 613 | 587 | CodeSearchNet permissive-repo filter (dataset-level; per-row license absent) | code_search_net | 2026-12-05 | 21b3b6291478f2192b610b3c7a096038f549958976951ee546b15d9c0a9152af | Apache-2.0 | permissive | https://github.com/arouel/quality-check/blob/master/LICENSE.txt |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.