code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
package com.jiahaoliuliu.chapter1.arraysandstrings; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * Write a method to replace all spaces in a string with '%20' You may assume that the string has sufficient space at the * end to hold additional characters, and that you are given the "true"...
src/com/jiahaoliuliu/chapter1/arraysandstrings/Q3URLify.java
0.87596
0.531878
Q3URLify.java
starcoder
package org.beryx.streamplify.shuffler; import java.math.BigInteger; import java.util.Arrays; import java.util.Random; /** * A helper class that implements the shuffling logic used by the default shufflers ({@link DefaultLongShuffler} and {@link DefaultBigIntegerShuffler}). * <br>This implementation is able to shuf...
streamplify/src/main/java/org/beryx/streamplify/shuffler/ShufflerImpl.java
0.910326
0.547827
ShufflerImpl.java
starcoder
package com.github.adaviding.numerics.sphere; import com.github.adaviding.numerics.f3.Point; /** * This class represents a mosaic of spherical triangles that uniformly cover the surface of a sphere. It is useful for * quickly mapping a LatLon coordinate to a numbered spherical triangle which contains the LatLon. ...
java/st-numerics/src/main/java/com/github/adaviding/numerics/sphere/Tessellation.java
0.878027
0.715697
Tessellation.java
starcoder
package org.stellar.sdk; import com.google.common.base.Objects; import org.stellar.sdk.xdr.BumpSequenceOp; import org.stellar.sdk.xdr.Int64; import org.stellar.sdk.xdr.OperationType; import org.stellar.sdk.xdr.SequenceNumber; import static com.google.common.base.Preconditions.checkNotNull; public class BumpSequenceO...
src/main/java/org/stellar/sdk/BumpSequenceOperation.java
0.930054
0.450057
BumpSequenceOperation.java
starcoder
package hermes.hshape; import processing.core.*; /** * An abstraction for a 2D shape, used for collision detection and response. * <p> * When the shape is linked to a being, shape's position should be a reference to the being's position. * <p> * In order for collision to work, all shapes must know how to collid...
hermes/hshape/HShape.java
0.808181
0.701048
HShape.java
starcoder
package org.burstsort4j; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.junit.Test; import static org.junit.Assert.*; /** * Unit tests for the DualPivotQuicksort class. * * @author <NAME> */ public class DualPivotQui...
test/org/burstsort4j/DualPivotQuicksortTest.java
0.793146
0.534005
DualPivotQuicksortTest.java
starcoder
********************************************************************** * Copyright (c) 2004-2013, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Author: <NAME> * Created: April 20, 2004 * Since: ICU 3.0 ***********...
icu4j/src/main/java/com/ibm/icu/util/Measure.java
0.860046
0.506225
Measure.java
starcoder
package qub; public interface Integers { /** * The number of bits in an int/Integer. */ int bitCount = 32; /** * The number of bytes in an int/Integer. */ int byteCount = 4; /** * The number of hex characters in an int/Integer. */ int hexCharCount = 8; int m...
sources/qub/Integers.java
0.943282
0.533154
Integers.java
starcoder
package tabuleiro; /** * Esta Classe implementa as coordenadas de uma jogada. * @author <NAME> */ public class Jogada { private int linhaInicial, colunaInicial, linha, coluna; /** * Cria uma objeto jogada com as coordenadas. Se a origem for negativa entao * a jogada é considerada como a colocaçã...
src/tabuleiro/Jogada.java
0.840161
0.47725
Jogada.java
starcoder
package org.ml4j.tensor; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; import org.jvmpy.symbolictensors.MultiplicationRules; import org.jvmpy.symbolictensors.Size; import org.ml4j.autograd.AutogradValue; import org.ml4j.autograd.Value; import org.ml4j.autograd.arithme...
src/main/java/org/ml4j/tensor/DifferentiableWrappedTensorOperations.java
0.808294
0.465448
DifferentiableWrappedTensorOperations.java
starcoder
package org.deeplearning4j.zoo.model.helper; import org.deeplearning4j.nn.conf.ComputationGraphConfiguration; import org.deeplearning4j.nn.conf.graph.MergeVertex; import org.deeplearning4j.nn.conf.layers.*; import org.nd4j.linalg.activations.Activation; public class FaceNetHelper { public static String getModule...
deeplearning4j/deeplearning4j-zoo/src/main/java/org/deeplearning4j/zoo/model/helper/FaceNetHelper.java
0.901585
0.622402
FaceNetHelper.java
starcoder
* Units of measurements, values related to measurement (like angles and ranges) and their formatters. * A key class in this package is {@link org.apache.sis.measure.Units}, which provides static constants * for about 50 units of measurement including all the SI base units * ({@linkplain org.apache.sis.measure.Units...
core/sis-utility/src/main/java/org/apache/sis/measure/package-info.java
0.880463
0.563078
package-info.java
starcoder
package uk.ac.ox.krr.logmap2.indexing.labelling_schema; import java.util.ArrayList; import java.util.Collection; import java.util.List; /** * Adapted from https://github.com/kevinjdolan/intervaltree * @author <NAME> (original author) */ public class IntervalTree { private IntervalNode head; private List<IntervalFo...
src/logmap/java/uk/ac/ox/krr/logmap2/indexing/labelling_schema/IntervalTree.java
0.895125
0.564759
IntervalTree.java
starcoder
package org.apache.commons.rng.sampling.distribution; import org.apache.commons.rng.UniformRandomProvider; /** * Sampling from a Gaussian distribution with given mean and * standard deviation. * * @since 1.1 */ public class GaussianSampler implements SharedStateContinuousSampler { /** Mean. */ private fi...
subjects/components/code/commons-rng/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/GaussianSampler.java
0.974423
0.558026
GaussianSampler.java
starcoder
package kws; import java.util.List; import java.util.Random; /* * Hausdorff Edit Distance (HED) */ public class HED { KCost cost; Random random; public HED(KCost cost) { this.cost = cost; random = new Random(); random.setSeed(1234567); } /* * Compute the Hausdorff...
src/task2/kws/HED.java
0.586168
0.436682
HED.java
starcoder
package roadgraph; import java.util.*; import java.util.function.Consumer; import geography.GeographicPoint; import util.GraphLoader; /** * @author UCSD MOOC development team and YOU * * A class which represents a graph of geographic locations Nodes in the * graph are intersections bet...
src/roadgraph/MapGraph.java
0.871379
0.452717
MapGraph.java
starcoder
package ch.randelshofer.rubik.cube; /** * We use our own implementation of EventListenerListAWT, because this class must * be able to run on a Java 1.1 VM. */ import org.jhotdraw.annotation.Nonnull; import org.jhotdraw.annotation.Nullable; import javax.swing.event.EventListenerList; import java.util.Arrays; impo...
src/main/java/ch.randelshofer.cubetwister/ch/randelshofer/rubik/cube/AbstractCube.java
0.820469
0.512632
AbstractCube.java
starcoder
package edu.caltech.cs2.helpers; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.function.Consumer; import java.util.function.Function; import static org.junit.jupiter.api.Assertions.fail; public class RuntimeInstrumentation { private static final int SKIP = 8; priva...
tests/edu/caltech/cs2/helpers/RuntimeInstrumentation.java
0.881787
0.407157
RuntimeInstrumentation.java
starcoder
package advanced.parallelStream; import java.util.Arrays; import java.util.List; import java.util.concurrent.ForkJoinPool; import static advanced.parallelStream.Person.getPersons; public class Main { public static void main(String[] args) { /* Streams can be executed in parallel to increase runti...
src/com/streams/advanced/parallelStream/Main.java
0.599602
0.407746
Main.java
starcoder
package org.apache.sis.util; import org.opengis.metadata.citation.Citation; // For javadoc. import org.apache.sis.util.resources.Errors; /** * Static methods working on {@code char} values, and some character constants. * Apache SIS uses Unicode symbols directly in the source code for easier reading, * except fo...
core/sis-utility/src/main/java/org/apache/sis/util/Characters.java
0.9521
0.526465
Characters.java
starcoder
package org.nem.core.crypto.ed25519.arithmetic; import org.nem.core.utils.ArrayUtils; import java.util.Arrays; public class Ed25519EncodedGroupElement { private final byte[] values; /** * Creates a new encoded group element. * * @param values The values. */ public Ed25519EncodedGroupElement(final byte[]...
src/main/java/org/nem/core/crypto/ed25519/arithmetic/Ed25519EncodedGroupElement.java
0.933613
0.485905
Ed25519EncodedGroupElement.java
starcoder
package com.shijingsh.ai.jsat.clustering.evaluation; import java.util.List; import com.shijingsh.ai.jsat.DataSet; import com.shijingsh.ai.jsat.classifiers.ClassificationDataSet; import com.shijingsh.ai.jsat.classifiers.DataPoint; import com.shijingsh.ai.jsat.DataSet; import com.shijingsh.ai.jsat.classifiers.Classific...
shijingsh-ai-jsat/src/main/java/com/shijingsh/ai/jsat/clustering/evaluation/VMeasure.java
0.920972
0.406067
VMeasure.java
starcoder
package tp4.ship; import utils.PointDumper; import java.io.IOException; public class GearPredictorCorrectorParticle extends MDParticle { double x2, x3, x4, x5; double y2, y3, y4, y5; PointDumper dumper; GearPredictorCorrectorParticle(double mass, double radius, double x0, double y0, double vx0, do...
src/main/java/tp4/ship/GearPredictorCorrectorParticle.java
0.785185
0.625381
GearPredictorCorrectorParticle.java
starcoder
package frc.robot; import edu.wpi.first.wpilibj.controller.SimpleMotorFeedforward; import edu.wpi.first.wpilibj.geometry.Translation2d; import edu.wpi.first.wpilibj.kinematics.SwerveDriveKinematics; import edu.wpi.first.wpilibj.util.Units; public class Constants { public static final class CANDevices { ...
src/main/java/frc/robot/Constants.java
0.727782
0.48121
Constants.java
starcoder
package net.geocentral.geometria.model; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import net.geocentral.geometria.action.GRenameVariableAction; import net.geocentral.geometria.evaluator.GEvaluator; import net.geocentral.geometria.evaluator.GTokenizer; impor...
archive/3.2/src/net/geocentral/geometria/model/GCalculation.java
0.612078
0.470858
GCalculation.java
starcoder
package java.util.stream; /** * Base class for a data structure for gathering elements into a buffer and then * iterating them. Maintains an array of increasingly sized arrays, so there is * no copying cost associated with growing the data structure. * * @since 1.8 */ /* * 弹性缓冲区的抽象实现 * * 弹性缓冲区是一个二维数组,该二维数组又由多...
src/src/java/util/stream/AbstractSpinedBuffer.java
0.545286
0.41941
AbstractSpinedBuffer.java
starcoder
package com.shopify.model; import java.math.BigDecimal; import java.math.RoundingMode; public class ShopifyVariantCreationRequest implements ShopifyVariantRequest { private final ShopifyVariant request; private final String imageSource; public static interface PriceStep { public CompareAtPriceStep withPrice(fi...
src/main/java/com/shopify/model/ShopifyVariantCreationRequest.java
0.828245
0.510435
ShopifyVariantCreationRequest.java
starcoder
package com.github.myyk.cracking; /** * Arrays and Strings */ public class Chapter1Solutions { /** * Is Unique? Are all characters unique in the string. * * Assumptions: Characters are ASCII characters, capitalization matters * * Time complexity: O(min(c,n)) where c is number of characters in alphab...
src/main/java/com/github/myyk/cracking/Chapter1Solutions.java
0.856992
0.406921
Chapter1Solutions.java
starcoder
package com.jhlabs.image; import java.awt.Rectangle; import java.awt.image.BufferedImage; import java.awt.image.Kernel; import com.jhlabs.math.Function2D; import com.jhlabs.math.ImageFunction2D; import com.jhlabs.vecmath.Color4f; import com.jhlabs.vecmath.Vector3f; public class ShadeFilter extends WholeImageFilter {...
src/com/jhlabs/image/ShadeFilter.java
0.619126
0.416619
ShadeFilter.java
starcoder
private class MarcUsecases { /** * The user types 'fd 50' in the command window, and sees the turtle move in the display window * leaving a trail, and the command is added to the environment's history. */ public void fd50(String commandString) { CommandParser parser = new CommandParser(); // This...
doc/plan/usecases/MarcUsecases.java
0.662032
0.40645
MarcUsecases.java
starcoder
package io.fabric8.jolokia.assertions; import org.assertj.core.api.AbstractAssert; import org.assertj.core.api.BigDecimalAssert; import org.assertj.core.api.BooleanAssert; import org.assertj.core.api.ByteAssert; import org.assertj.core.api.CharacterAssert; import org.assertj.core.api.DateAssert; import org.assertj.cor...
components/jolokia-assertions/src/main/java/io/fabric8/jolokia/assertions/JolokiaAssert.java
0.783988
0.46393
JolokiaAssert.java
starcoder
package ghidra.program.model.data; import ghidra.program.database.data.DataTypeUtilities; import ghidra.program.model.listing.Parameter; import ghidra.program.model.listing.Variable; import ghidra.program.model.symbol.SymbolUtilities; public class ParameterDefinitionImpl implements ParameterDefinition { private int...
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/ParameterDefinitionImpl.java
0.848157
0.445891
ParameterDefinitionImpl.java
starcoder
package com.cs_pum.uncertain_mlc.losses; import mulan.classifier.MultiLabelOutput; import mulan.evaluation.GroundTruth; import mulan.evaluation.measure.Measure; /** * This class implements the uncertain hamming loss. Predictions in the form of confidences or probabilities that the * label equals one are considered...
src/main/java/com/cs_pum/uncertain_mlc/losses/UncertainHammingLoss.java
0.929816
0.568655
UncertainHammingLoss.java
starcoder
package com.apple.eio; import java.io.*; /** * Provides functionality to query and modify Mac-specific file attributes. The methods in this class are based on Finder * attributes. These attributes in turn are dependent on HFS and HFS+ file systems. As such, it is important to recognize * their limitation when writ...
src/java.desktop/macosx/classes/com/apple/eio/FileManager.java
0.879043
0.501404
FileManager.java
starcoder
package com.game30.javagl.programs; /** * A GLAttribute represents an attribute of a OpenGL Scripting Language (GLSL) program. The attribute can be customized * in the way that it reads a buffer from the graphics card memory. Only one instance of an attribute should exist for * each attribute of a GLSL program so...
src/main/java/com/game30/javagl/programs/GLAttribute.java
0.927728
0.410166
GLAttribute.java
starcoder
package org.apache.derbyTesting.unitTests.harness; /** * * The UnitTestManager provides a mechanism for * registering subsystem tests and then invoking * them. It can produce an output report specifying * the results, the timing, and any output produced * by the tests. If the run fails, the invoker of * the tes...
java/org.apache.derby.tests/org/apache/derbyTesting/unitTests/harness/UnitTestManager.java
0.722135
0.434641
UnitTestManager.java
starcoder
package org.assertj.core.util; import static org.assertj.core.util.Arrays.*; import java.lang.reflect.Array; /** * Utility methods related to objects. * * @author <NAME> * @author <NAME> */ public final class Objects { /** Prime number used to calculate the hash code of objects. */ public static final int ...
src/main/java/org/assertj/core/util/Objects.java
0.933294
0.55935
Objects.java
starcoder
package com.teamderpy.shouldersurfing.math; import java.nio.FloatBuffer; import java.nio.IntBuffer; import org.lwjgl.opengl.GL11; import org.lwjgl.util.glu.GLU; import org.lwjgl.util.vector.Vector2f; import net.minecraft.client.renderer.GLAllocation; import net.minecraft.util.math.Vec3d; /** * @author <NAME>...
src/main/java/com/teamderpy/shouldersurfing/math/VectorConverter.java
0.901146
0.520618
VectorConverter.java
starcoder
package io.smallrye.mutiny.groups; import java.util.ArrayList; import java.util.List; import org.reactivestreams.Publisher; import io.smallrye.mutiny.CompositeException; import io.smallrye.mutiny.Multi; import io.smallrye.mutiny.infrastructure.Infrastructure; import io.smallrye.mutiny.operators.multi.MultiConcatOp; ...
implementation/src/main/java/io/smallrye/mutiny/groups/MultiConcat.java
0.889445
0.59464
MultiConcat.java
starcoder
package com.example.polysample; import java.util.ArrayList; /** * Representation of an object's geometry, extracted from an OBJ file. */ public class ObjGeometry { /** Symbolic constant used in place of an index to indicate a missing component. */ public static final int MISSING = -1; /** Represents a face ...
PolySampleAndroid/app/src/main/java/com/example/polysample/ObjGeometry.java
0.966875
0.661274
ObjGeometry.java
starcoder
package problems.problems101to200.problems121to130; import static utils.generators.Generators.from; import static utils.generators.Generators.range; import java.lang.invoke.MethodHandles; public class Problem121 { public static void main(String[] args) { System.out.println(MethodHandles.lookup().lookupClass()...
src/problems/problems101to200/problems121to130/Problem121.java
0.85341
0.51812
Problem121.java
starcoder
package org.springframework.data.util; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.List; import org.springframework.lang.Nullable; /** * Interface to access property types and resolving generics on the way. Starting with a {@link ClassTypeInformation} * you can traverse ...
src/main/java/org/springframework/data/util/TypeInformation.java
0.935214
0.465752
TypeInformation.java
starcoder
package whiteboard19; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class isIdenticalTest { @Test void isIdenticalTest() { isIdentical rootOne = new isIdentical(); TreeNode n531 = new TreeNode(53); TreeNode n181 = new TreeNode(18); Tre...
src/whiteboard19/isIdenticalTest.java
0.757615
0.521532
isIdenticalTest.java
starcoder
package com.google.i18n.phonenumbers.metadata.model; import static com.google.common.collect.ImmutableMap.toImmutableMap; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static java.util.function.Function.identity; import com.google.auto.value.AutoValue; import com.google.common.collect.Im...
metadata/src/main/java/com/google/i18n/phonenumbers/metadata/model/NumberingSchemes.java
0.530966
0.421016
NumberingSchemes.java
starcoder
package io.github.anthogdn.iataaa.checkersDomain.model; import java.util.Arrays; import java.util.EnumSet; import java.util.Objects; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; public class CheckersBoard { public final static String WHITE_CASE_REPRESENTATION = "\\|\\s{3}[...
api/checkers/checkers-domain/src/main/java/io/github/anthogdn/iataaa/checkersDomain/model/CheckersBoard.java
0.822581
0.415254
CheckersBoard.java
starcoder
package com.opengamma.web.analytics; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.opengamma.engine.ComputationTargetSpecification; import com.opengamma.engine.ComputationTargetType; impor...
projects/OG-Web/src/main/java/com/opengamma/web/analytics/PrimitivesGridStructure.java
0.82226
0.462898
PrimitivesGridStructure.java
starcoder
package com.opengamma.analytics.financial.model.option.definition; import org.threeten.bp.ZonedDateTime; import com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountCurve; import com.opengamma.analytics.financial.model.volatility.surface.VolatilitySurface; import com.opengamma.util.ArgumentCheck...
projects/analytics/src/main/java/com/opengamma/analytics/financial/model/option/definition/MertonJumpDiffusionModelDataBundle.java
0.911468
0.532
MertonJumpDiffusionModelDataBundle.java
starcoder
package ic2.api.crops; /** * Describe the plant through a set of properties, influencing breeding. * Plants sharing properties and attributes will tend to cross-breed more often. * * Properties: * - Tier (Tier of the plant. Ranges from 1 to 16, 0 is Weed. Valuable and powerful crops have higher tiers, useless and...
src/api/java/ic2/api/crops/CropProperties.java
0.846704
0.410106
CropProperties.java
starcoder
package us.myles.ViaVersion.protocols.protocol1_9to1_8.chunks; import com.google.common.collect.Lists; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import us.myles.ViaVersion.api.minecraft.chunks.ChunkSection; import us.myles.ViaVersion.api.minecraft.chunks.NibbleArray; import us.myles.ViaVersion.a...
common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/chunks/ChunkSection1_9to1_8.java
0.815673
0.424114
ChunkSection1_9to1_8.java
starcoder
package io.github.phantamanta44.warptastix.util; import com.google.gson.JsonObject; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; public class LazyLoc { private String worldName; private double x, y, z; private float yaw, pitch; public LazyLoc(String worldName, doubl...
src/main/java/io/github/phantamanta44/warptastix/util/LazyLoc.java
0.824568
0.534309
LazyLoc.java
starcoder
package com.moparisthebest.poi.ss.formula.functions; import com.moparisthebest.poi.ss.formula.eval.ErrorEval; import com.moparisthebest.poi.ss.formula.eval.EvaluationException; import com.moparisthebest.poi.ss.formula.eval.OperandResolver; import com.moparisthebest.poi.ss.formula.eval.StringEval; import com.moparisthe...
src/main/java/com/moparisthebest/poi/ss/formula/functions/Rept.java
0.719581
0.40392
Rept.java
starcoder
package org.brunel.data.summary; import org.brunel.data.Data; import org.brunel.data.Field; import org.brunel.data.Fields; import org.brunel.data.util.ItemsList; import org.brunel.data.util.Range; import java.util.ArrayList; import java.util.List; public final class SummaryValues { private final Field[] fields; ...
data/src/main/java/org/brunel/data/summary/SummaryValues.java
0.884539
0.426501
SummaryValues.java
starcoder
package org.apache.kylin.common.util; import java.io.Serializable; import java.nio.ByteBuffer; /** * @author yangli9 */ public class ByteArray implements Comparable<ByteArray>, Serializable { private static final long serialVersionUID = 1L; public static final ByteArray EMPTY = new ImmutableByteArray(); ...
core-common/src/main/java/org/apache/kylin/common/util/ByteArray.java
0.923923
0.488283
ByteArray.java
starcoder
package jaredbgreat.climaticbiome.generation.map; import static jaredbgreat.climaticbiome.util.ModMath.modRight; import jaredbgreat.climaticbiome.biomes.SubBiomeRegistry; import jaredbgreat.climaticbiome.generation.cache.Cache; import jaredbgreat.climaticbiome.generation.cache.Coords; import jaredbgreat.climaticbiome....
main/java/jaredbgreat/climaticbiome/generation/map/MapRegistry.java
0.722429
0.429549
MapRegistry.java
starcoder
package com.github.ennoxhd.glyphcreator.util.javafx; import java.util.function.DoubleConsumer; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableDoubleValue; import javafx.beans.value.ObservableValue; import javafx.event.ActionEvent; import javafx.geometry.Point2D; import javafx.geometry.R...
src/main/java/com/github/ennoxhd/glyphcreator/util/javafx/WindowUtils.java
0.937954
0.441191
WindowUtils.java
starcoder
import java.util.Arrays; import java.util.Scanner; import java.lang.StringBuilder; /** *Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remaining elements to the right. Note that elements beyond the length of the original array are not written. Do the above modifications to...
code/Arrays101/Dulplicate_zeros.java
0.647464
0.522263
Dulplicate_zeros.java
starcoder
package net.sourceforge.pmd.lang.java.typeresolution.typeinference; import java.util.List; import java.util.Set; import net.sourceforge.pmd.annotation.InternalApi; import net.sourceforge.pmd.lang.java.typeresolution.typedefinition.JavaTypeDefinition; @Deprecated @InternalApi public abstract class BoundOrConstraint ...
pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/typeinference/BoundOrConstraint.java
0.834069
0.523664
BoundOrConstraint.java
starcoder
package org.kiji.schema.util; import java.io.IOException; import java.util.Arrays; import org.kiji.annotations.ApiAudience; /** * Wraps a byte array of binary-encoded data into a byte stream. * * Provides various binary decoding functions. * Heavily inspired from protocol buffer's CodedOutputStream and Avro's Bi...
kiji-schema/src/main/java/org/kiji/schema/util/ByteStreamArray.java
0.93542
0.488405
ByteStreamArray.java
starcoder
package com.google.cloud.tools.jib.event.progress; import java.util.Optional; import javax.annotation.Nullable; /** * Represents a Decentralized Allocation Tree (DAT) node. * * <p>A DAT node is immutable and pointers only go in the direction from child to parent. Each node * has a set number of allocated units, t...
jib-core/src/main/java/com/google/cloud/tools/jib/event/progress/Allocation.java
0.947612
0.587056
Allocation.java
starcoder
package utils.matrix.operation; import utils.matrix.Matrix; import utils.matrix.MatrixException; import java.util.HashMap; /** * Defines cyclic pooling gradient matrix operation.<br> * Traverses cyclically each filter row and column through step by step and propagates selected row and column.<br> * */...
src/utils/matrix/operation/CyclicPoolGradientMatrixOperation.java
0.923043
0.424949
CyclicPoolGradientMatrixOperation.java
starcoder
package us.ihmc.atlas.calib; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.u...
Atlas/src/us/ihmc/atlas/calib/DetectChessboardInKinematicsData.java
0.866895
0.524212
DetectChessboardInKinematicsData.java
starcoder
package com.thealgorithms.datastructures.trees; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import java.util.Queue; /* The following class implements a vertical order traversal in a tree from top to bottom and left to right, so for a tree : 垂直顺序遍历 把一条垂线从X=-...
src/main/java/com/thealgorithms/datastructures/trees/VerticalOrderTraversal.java
0.743168
0.52074
VerticalOrderTraversal.java
starcoder
package com.sun.jdi; /** * Provides access to the class of an array and the type of * its components in the target VM. * * @see ArrayReference * * @author <NAME> * @author <NAME> * @author <NAME> * @since 1.3 */ public interface ArrayType extends ReferenceType { /** * Creates a new instance of thi...
src/jdk14-source/jdk.jdi/com/sun/jdi/ArrayType.java
0.936634
0.407274
ArrayType.java
starcoder
package minestra.collection; import java.util.Arrays; import java.util.OptionalDouble; final class DoubleImmArrayImpl implements DoubleImmArray { static final DoubleImmArray EMPTY = new DoubleImmArrayImpl(); final double[] values; DoubleImmArrayImpl(double... a) { this(false, a); } Dou...
src/main/java/minestra/collection/DoubleImmArrayImpl.java
0.837155
0.573021
DoubleImmArrayImpl.java
starcoder
package io.github.jhipster.online.service.dto; import java.io.Serializable; import java.time.Instant; /** * A DTO for the {@link io.github.jhipster.online.domain.EntityStats} entity. */ public class EntityStatsDTO implements Serializable { private Long id; private Integer year; private Integer month;...
src/main/java/io/github/jhipster/online/service/dto/EntityStatsDTO.java
0.908083
0.465327
EntityStatsDTO.java
starcoder
package js.lang.external.highcharts; import com.github.fluorumlabs.disconnect.core.annotations.Import; import com.github.fluorumlabs.disconnect.core.annotations.NpmPackage; import js.lang.Any; import org.teavm.jso.JSProperty; /** * (Highcharts, Gantt) Options for a scrollable plot area. This feature provides * a mi...
disconnect-highcharts/src/main/java/js/lang/external/highcharts/ChartScrollablePlotAreaOptions.java
0.894052
0.408926
ChartScrollablePlotAreaOptions.java
starcoder
package org.logicng.datastructures; import org.logicng.collections.LNGIntVector; import org.logicng.collections.LNGVector; import org.logicng.formulas.Formula; import org.logicng.formulas.FormulaFactory; import org.logicng.formulas.Literal; import org.logicng.formulas.Variable; import org.logicng.propositions.Proposi...
src/main/java/org/logicng/datastructures/EncodingResult.java
0.913293
0.468973
EncodingResult.java
starcoder
package uk.ac.sussex.gdsc.smlm.fitting.nonlinear.gradient; /** * Calculates the Hessian matrix (the square matrix of second-order partial derivatives of a * function) and the gradient vector of the function's partial first derivatives with respect to the * parameters. This is used within the Levenberg-Marquardt met...
src/main/java/uk/ac/sussex/gdsc/smlm/fitting/nonlinear/gradient/MleGradientCalculator6.java
0.898918
0.667568
MleGradientCalculator6.java
starcoder
package de.feelspace.fslib; /** * Interface to control the belt. * * <b>Belt mode for vibration command:</b> * Vibration signals can only be started in app mode except if the vibration signal has a limited * duration and is executed on channel index 0. However, it is not recommended to start a vibration * signal...
fslib-source/fslib/src/main/java/de/feelspace/fslib/BeltCommandInterface.java
0.943027
0.639989
BeltCommandInterface.java
starcoder
package org.apache.spark.sql.catalyst.util; /** * Constants used in the implementation of the HyperLogLogPlusPlus aggregate function. * <p> * See the Appendix to HyperLogLog in Practice: Algorithmic Engineering of a State of the Art * Cardinality (https://docs.google.com/document/d/1gyjfMHy43U9OWBXxfaeG-3MjGzejW1dl...
sql/catalyst/target/java/org/apache/spark/sql/catalyst/util/HyperLogLogPlusPlusHelper$.java
0.849878
0.466785
HyperLogLogPlusPlusHelper$.java
starcoder
* <p> * The classes in this package are loaded by a class loader which is a child of the class loader the Servlet API is loaded from. * This works around the problem that the agent does not have access to the Servlet API. * Instead of injecting the helper classes to the same class loader the Servlet API is loaded f...
apm-agent-plugins/apm-servlet-plugin/src/main/java/co/elastic/apm/agent/servlet/helper/package-info.java
0.718199
0.522507
package-info.java
starcoder
package poly2tri.sweep; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import poly2tri.common.Edge; import poly2tri.common.Point; import poly2tri.common.Triangle; public class SweepContext { // Inital triangle factor, seed triangle will extend 30% of /...
assimp/src/main/java/poly2tri/sweep/SweepContext.java
0.606848
0.491883
SweepContext.java
starcoder
package com.mnaseri.cs.homework.ch16; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Objects; /** * ZeroOneKnapsackFiller problem cannot be solved using Greedy algorithm. * We have to use the suffix technique to find the solution. * This problem cannot be memoized usin...
cs-homework/src/main/java/com/mnaseri/cs/homework/ch16/ZeroOneKnapsackFiller.java
0.88996
0.406567
ZeroOneKnapsackFiller.java
starcoder
package org.apache.felix.inventory; /** * Java 1.4 compatible enumeration of formats used for inventory printing. * <p> * {@link InventoryPrinter} services indicate supported formats listing any of * these values in their {@link InventoryPrinter#FORMAT} service * properties. * <p> * Requestors of inventory prin...
inventory/src/main/java/org/apache/felix/inventory/Format.java
0.924351
0.421611
Format.java
starcoder
package org.codepulsar.analysis; /* The Validator Class This class makes sure that all code is correct. This includes catching all errors that haven't been caught elsewhere. This will be expanded on in the future. */ import org.codepulsar.ast.Expression; import org.codepulsar.ast.Statement; import or...
src/org/codepulsar/analysis/Validator.java
0.773216
0.420362
Validator.java
starcoder
package net.geocentral.geometria.model; import java.util.ArrayList; import java.util.List; import javax.vecmath.Point3d; import org.apache.log4j.Logger; public class GSolidFactory { private static GSolidFactory instance; private static Logger logger = Logger.getLogger("net.geocentral.geometria"); ...
archive/3.0/src/net/geocentral/geometria/model/GSolidFactory.java
0.633637
0.401365
GSolidFactory.java
starcoder
package org.javarosa.xpath; import org.javarosa.core.model.condition.EvaluationContext; import org.javarosa.core.model.instance.DataInstance; import org.javarosa.core.model.instance.TreeReference; import org.javarosa.xpath.expr.XPathPathExpr; import java.text.MessageFormat; import java.util.Vector; /** * Represents...
src/main/java/org/javarosa/xpath/XPathNodeset.java
0.869908
0.409929
XPathNodeset.java
starcoder
package engine.parsing.json; import java.io.IOException; import java.io.Writer; import java.text.ParseException; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import engine.parsing.TokenReader; /** * An Object in a JSON file. * * @author <NAME> (<EMAIL>)...
src/engine/parsing/json/JSONObject.java
0.862554
0.42054
JSONObject.java
starcoder
package us.ihmc.euclid.axisAngle; import us.ihmc.euclid.axisAngle.interfaces.AxisAngleBasics; import us.ihmc.euclid.axisAngle.interfaces.AxisAngleReadOnly; import us.ihmc.euclid.interfaces.EpsilonComparable; import us.ihmc.euclid.interfaces.GeometricallyComparable; import us.ihmc.euclid.interfaces.Settable; import us....
src/us/ihmc/euclid/axisAngle/AxisAngle.java
0.972637
0.758824
AxisAngle.java
starcoder
package loon.geom; import loon.LObject; import loon.LSystem; import loon.action.ActionBind; import loon.utils.MathUtils; import loon.utils.NumberUtils; import loon.utils.StringKeyValue; import loon.utils.StringUtils; public class RectBox extends Shape implements BoxSize, XYZW { /** * */ private static final l...
Java/Loon-Neo/src/loon/geom/RectBox.java
0.732496
0.406774
RectBox.java
starcoder
import java.util.Comparator; import java.util.Set; import java.util.TreeSet; /** * Given an array of 4 digits, return the largest 24 hour time that can be made. * <p> * The smallest 24 hour time is 00:00, and the largest is 23:59. Starting from 00:00, a time is larger if more time has elapsed since midnight. * <p...
Algorithms/#0900 - #0999/#949 - Largest Time for Given Digits/Solution.java
0.813979
0.467696
Solution.java
starcoder
package com.mato.android.matoid.service.mtunnel; import com.google.a.c; import com.google.a.d; import com.google.a.e; import com.google.a.g; import java.io.IOException; import java.io.InputStream; public final class a { public static void a() {} public static final class a extends e { public static f...
java/classes2/com/mato/android/matoid/service/mtunnel/a.java
0.750644
0.448728
a.java
starcoder
package squidpony.squidgrid; import squidpony.squidmath.*; /** * A port of WaveFunctionCollapse by ExUtumno/mxgmn; takes a single sample of a grid to imitate and produces one or more * grids of requested sizes that have a similar layout of cells to the sample. Samples are given as {@code int[][]} * where an int is...
squidlib-util/src/main/java/squidpony/squidgrid/MimicWFC.java
0.736116
0.600862
MimicWFC.java
starcoder
package com.google.enterprise.connector.spi; import com.google.enterprise.connector.spi.SpiConstants.CaseSensitivityType; import com.google.enterprise.connector.spi.SpiConstants.PrincipalType; import junit.framework.TestCase; /** * Unit tests for the {@link Principal} class. */ public class PrincipalTest extends ...
projects/connector-manager/source/javatests/com/google/enterprise/connector/spi/PrincipalTest.java
0.847274
0.608187
PrincipalTest.java
starcoder
package careercup.google; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Arrays; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.LongAdder; import java.util.stream.Stre...
Scala99Exercises/src/careercup/google/StreamingData.java
0.858778
0.44897
StreamingData.java
starcoder
package gov.nasa.worldwind; import gov.nasa.worldwind.globes.Globe; import gov.nasa.worldwind.layers.LayerList; /** * Aggregates a globe and a set of layers. Through the globe it also indirectly includes the elevation model and the * surface geometry tessellator. A default model is defined in <code>worldwind.xml</c...
HW08/libs/WWJ/code/src/gov/nasa/worldwind/Model.java
0.925314
0.470797
Model.java
starcoder
package us.ihmc.robotics.geometry; import java.util.Random; import javax.vecmath.Point2d; import javax.vecmath.Vector2d; import us.ihmc.robotics.referenceFrames.ReferenceFrame; import us.ihmc.robotics.robotSide.RobotSide; /** * @author <NAME> */ public class FrameLine2d extends FrameGeometry2d<FrameLine2d, Line2d...
IHMCRoboticsToolkit/src/us/ihmc/robotics/geometry/FrameLine2d.java
0.89174
0.724724
FrameLine2d.java
starcoder
package dk.brics.tajs.analysis.signatures; import dk.brics.tajs.analysis.Conversion; import dk.brics.tajs.analysis.Solver; import dk.brics.tajs.analysis.signatures.types.Coercion; import dk.brics.tajs.analysis.signatures.types.Parameter; import dk.brics.tajs.analysis.signatures.types.Requirement; import dk.brics.tajs....
src/dk/brics/tajs/analysis/signatures/NativeFunctionSignatureUtilities.java
0.811639
0.480966
NativeFunctionSignatureUtilities.java
starcoder
package com.civilprotectionsensor.ui.viewmodels; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; public class CreateSensorViewModel extends ViewModel { // Smoke sensor private final MutableLiveData<Float> smokeMin = new MutableLiveData<>(); private final MutableLiveData<Fl...
SensorApp/app/src/main/java/com/civilprotectionsensor/ui/viewmodels/CreateSensorViewModel.java
0.888142
0.433802
CreateSensorViewModel.java
starcoder
package com.bjmasc.bfit.bodyweight.data.thighs; public class ThighsExerciseNotes { public static String exerciseNotes(@ThighsRetention.ThighsExercise int exerciseType) { switch (exerciseType) { case ThighsRetention.SUMO_SQUAT: return "The sumo squat is an excellent exercise bec...
bodyweight/src/main/java/com/bjmasc/bfit/bodyweight/data/thighs/ThighsExerciseNotes.java
0.682785
0.569194
ThighsExerciseNotes.java
starcoder
import java.util.ArrayList; import java.util.Arrays; public class FastCollinearPoints { private final Point[] points; private ArrayList<LineSegment> lines; public FastCollinearPoints(Point[] points) { if (points == null) { throw new IllegalArgumentException("You must pass and array of...
week3-collinear-points/src/FastCollinearPoints.java
0.891309
0.526647
FastCollinearPoints.java
starcoder
package com.dremio.service.execselector; import java.util.Set; import com.dremio.exec.proto.CoordinationProtos.NodeEndpoint; /** * Select a set of executors that can perform a query of a given size * * Thread safety note: * - The caller will guarantee an exclusive lock around the calls to {@link #nodesRegistered...
services/exec-selector/src/main/java/com/dremio/service/execselector/ExecutorSelector.java
0.866979
0.40486
ExecutorSelector.java
starcoder
package io.github.resilience4j.core; import java.util.List; import java.util.function.*; public class SupplierUtils { private SupplierUtils() { } /** * Returns a composed Supplier that first applies the Supplier and then applies the * resultHandler. * * @param <T> return ty...
resilience4j-core/src/main/java/io/github/resilience4j/core/SupplierUtils.java
0.923333
0.789923
SupplierUtils.java
starcoder
package pl.zmudzin.genetics.statistics; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; /** * @author <NAME> */ public class Table { private List<Row> rows; public Table(Row... rows) { this(new ArrayList<...
src/main/java/pl/zmudzin/genetics/statistics/Table.java
0.853394
0.438785
Table.java
starcoder
package valeri.sudoku; import java.util.LinkedList; import java.util.List; /** * created August 9, 2017 * @author <NAME> */ public class Grid { public static final int GRID_MAX_ROWS = 9; public static final int GRID_MAX_COLS = 9; public static final int REGION_MAX_ROWS = 3; public static final int...
src/main/java/valeri/sudoku/Grid.java
0.901625
0.416322
Grid.java
starcoder
package pers.tavish.solution.hard; import java.util.ArrayList; import java.util.List; /* A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are given the locations and height of all the buildings as shown on a cityscape...
src/pers/tavish/solution/hard/TheSkylineProblem.java
0.850562
0.763572
TheSkylineProblem.java
starcoder
package com.textEditor; /** * This is an abstraction of a mutable 2D array of characters for which any cell * can be altered or removed. All of the character data that is entered, * removed, or otherwise edited by the user is held here, and multiple instances * of these can exist should the need for multiple...
textEditor/textEditor/MutableCharacterMatrix.java
0.753739
0.551453
MutableCharacterMatrix.java
starcoder
package com.hui.DynamicPrograming; import java.util.LinkedList; import java.util.List; /** * @author: shenhaizhilong * @date: 2018/9/9 21:42 */ public class PermutationSequence { /** *60. Permutation Sequence * DescriptionHintsSubmissionsDiscussSolution * The set [1,2,3,...,n] c...
src/main/java/com/hui/DynamicPrograming/PermutationSequence.java
0.895651
0.418103
PermutationSequence.java
starcoder
package com.ocadotechnology.event; import java.math.RoundingMode; import java.time.Duration; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; import com.google.common.b...
OcavaCore/src/main/java/com/ocadotechnology/event/EventUtil.java
0.949751
0.503601
EventUtil.java
starcoder
package regex; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; import java.util.function.Predicate; /** * @author cyb */ public class NFA { public State start; public State end; /** * NFA 中有次数限制的 EpsilonEdge */ private static final ArrayList<EpsilonEdge> C...
src/main/java/regex/NFA.java
0.829112
0.524516
NFA.java
starcoder