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 de.gymolching.fsb.regulation; import de.gymolching.fsb.api.FSBPosition; import de.gymolching.fsb.maths.Matrix3; import de.gymolching.fsb.maths.Vector3; public class Regulation { /** Radius of the top or bottom portion of the seat */ private static final double SEAT_RADIUS = 10; /** * Height o...
src/de/gymolching/fsb/regulation/Regulation.java
0.748352
0.570989
Regulation.java
starcoder
package de.pxlab.pxl.display; import java.awt.*; import de.pxlab.pxl.*; /** * Mach Bands - A smooth transition from a dark to a bright field shows light * and dark bands at the start and end of the transition. * * <P> * Look at the points where the brighter/darker area enters the smooth * transition...
pxlab/src/main/java/de/pxlab/pxl/display/MachBands.java
0.687945
0.420778
MachBands.java
starcoder
package neqsim.PVTsimulation.modelTuning; import neqsim.PVTsimulation.simulation.SimulationInterface; /** * <p> * BaseTuningClass class. * </p> * * @author esol * @version $Id: $Id */ public class BaseTuningClass implements TuningInterface { private SimulationInterface simulation = null; private boolea...
src/main/java/neqsim/PVTsimulation/modelTuning/BaseTuningClass.java
0.918185
0.500854
BaseTuningClass.java
starcoder
package org.solovyev.android.plotter; import android.support.annotation.NonNull; public final class Color { public static final Color BLACK = new Color(0xFF000000); public static final Color DKGRAY = new Color(0xFF444444); public static final Color GRAY = new Color(0xFF888888); public static final Col...
lib/src/main/java/org/solovyev/android/plotter/Color.java
0.938287
0.52141
Color.java
starcoder
package com.kauailabs.sf2.time; import java.util.ArrayList; import com.kauailabs.sf2.quantity.IQuantity; public class Timestamp implements IQuantity { public enum TimestampResolution { Second, Millisecond, Microsecond, Nanosecond }; long timestamp; TimestampResolution resolution; public Timestamp() { thi...
core/java/src/com/kauailabs/sf2/time/Timestamp.java
0.850438
0.45175
Timestamp.java
starcoder
package org.protempa.proposition.interval; import java.util.Iterator; import org.protempa.graph.DirectedGraph; import org.protempa.graph.Edge; import org.protempa.graph.Weight; /** * An implementation of the directional path consistency (DPC) algorithm for * determining if a simple temporal problem (STP) constrain...
protempa-framework/src/main/java/org/protempa/proposition/interval/DirectionalPathConsistency.java
0.891037
0.401923
DirectionalPathConsistency.java
starcoder
package q050; import org.junit.runner.RunWith; import util.runner.Answer; import util.runner.LeetCodeRunner; import util.runner.TestData; import util.runner.data.DataExpectation; /** * https://leetcode.com/problems/multiply-strings/ * * Given two non-negative integers num1 and num2 represented as strings, return t...
src/main/java/q050/Q043_MultiplyStrings.java
0.86988
0.430985
Q043_MultiplyStrings.java
starcoder
package tutorialquestions.question888a; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.IntStream; public class Example { static <T> List<T> concatenate(List<List<T>> lists) { ret...
solutions/code/tutorialquestions/question888a/Example.java
0.794704
0.442817
Example.java
starcoder
package org.highj.data.num; import org.highj.data.num.instances.IntegerEnum; import org.highj.data.num.instances.IntegerIntegral; import org.highj.data.num.instances.IntegerNum; import org.highj.data.num.instances.IntegerReal; import org.highj.data.predicates.Pred; import org.highj.typeclass0.group.Group; import org.h...
src/main/java/org/highj/data/num/Integers.java
0.843348
0.529993
Integers.java
starcoder
package jFasta; /** * This class implements a basic scoring scheme. At least three parameters must be * provided to the constructor: the reward for a match (a substitution of equal * characters), the penalty for a mismatch (a substitution of different characters) and * the cost of a gap (an insertion or dele...
src/jFasta/BasicScoringScheme.java
0.901963
0.536009
BasicScoringScheme.java
starcoder
package us.ilite.common.lib.control; import edu.wpi.first.util.sendable.Sendable; import edu.wpi.first.util.sendable.SendableBuilder; import edu.wpi.first.util.sendable.SendableRegistry; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import us.ilite.common.lib.util.Utils; import us.ilite.robot.hardware.Cl...
src/main/java/us/ilite/common/lib/control/ILITEPIDController.java
0.902048
0.434281
ILITEPIDController.java
starcoder
package com.hit.basmath.learn.others; import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; /** * 847. Shortest Path Visiting All Nodes * <p> * An undirected, connected graph of N nodes (labeled 0, 1, 2, ..., N-1) is given as graph. * <p> * graph.length = N, and j != i is in the list grap...
codes/java/leetcodes/src/main/java/com/hit/basmath/learn/others/_847.java
0.880553
0.454351
_847.java
starcoder
package com.github.pgasync; import com.github.pgasync.async.Row; import com.github.pgasync.conversion.DataConverter; import com.github.pgasync.message.backend.DataRow; import org.pfj.lang.Option; import java.math.BigDecimal; import java.math.BigInteger; import java.time.Instant; import java.time.LocalDate; import jav...
src/main/java/com/github/pgasync/PgRow.java
0.718298
0.491334
PgRow.java
starcoder
package org.opensim.modeling; /** * Minimize the error between a model's step time asymmetry and a specified<br> * target asymmetry value over a gait cycle.<br> * <br> * Step Length Asymmetry (SLA) is a ratio and is calculated as follows:<br> * The Right Step Length (RSL) is the distance between feet at right fo...
Gui/opensim/modeling/src/org/opensim/modeling/MocoStepLengthAsymmetryGoal.java
0.923979
0.606848
MocoStepLengthAsymmetryGoal.java
starcoder
package com.entwinemedia.fn.data; import com.entwinemedia.fn.Stream; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Set; /** * Set builder. * todo follow the ListBuilder pattern */ public abstract class SetBuilder { public abstract <A> Set<A> empty(); p...
src/main/java/com/entwinemedia/fn/data/SetBuilder.java
0.712632
0.406302
SetBuilder.java
starcoder
package io.inbot.utils; import java.util.Optional; import java.util.function.Function; /** * Simple Java lambda based implementation of Kotlin and Scala style pattern matching. This provides a nice alternative to the if else chaos that and a more * powerful alternative to switch statements. It's not perfect of cour...
src/main/java/io/inbot/utils/PatternEvaluator.java
0.934268
0.603523
PatternEvaluator.java
starcoder
package org.TexasTorque.TexasTorque2014.io.dependency; import org.TexasTorque.TexasTorque2014.io.*; public class RobotOutputState { //----- Pneumatics ----- private boolean compressorEnabled; private boolean driveBaseMode; private boolean backHoop; //----- Drive Motors ----- private double l...
src/org/TexasTorque/TexasTorque2014/io/dependency/RobotOutputState.java
0.789437
0.433202
RobotOutputState.java
starcoder
package io.enoa.toolkit.map; import io.enoa.toolkit.value.EnoaValue; import java.math.BigDecimal; import java.math.BigInteger; import java.sql.Timestamp; import java.util.Date; public interface FastKv { Object origin(String key); default EnoaValue value(String key) { return EnoaValue.with(this.origin(key))...
enoa-toolkit/src/main/java/io/enoa/toolkit/map/FastKv.java
0.783699
0.415432
FastKv.java
starcoder
package com.googleresearch.capturesync.softwaresync.phasealign; /** * Calculates the current camera phase and returns the necessary exposure offset needed to align. * Runs in the clock domain of the timestamps passed in to `passTimestamp`. * * <p>Note: A single instance of PhaseAligner expects a constant period. G...
app/src/main/java/com/googleresearch/capturesync/softwaresync/phasealign/PhaseAligner.java
0.959355
0.750964
PhaseAligner.java
starcoder
package se.cbb.jprime.misc; /** * Ordered triple of doubles. * * @author <NAME>. */ public class DoubleTriple { /** First object in tuple. */ public final double first; /** Second object in tuple. */ public final double second; /** Third object in tuple. */ public final double third; ...
src/main/java/se/cbb/jprime/misc/DoubleTriple.java
0.891817
0.430506
DoubleTriple.java
starcoder
package systems.bitcoinSystem; import systems.bitcoinSystem.models.Investor; import java.text.DecimalFormat; import java.util.Random; import java.util.Scanner; public class BitcoinSystem { private static Scanner in = new Scanner(System.in); private static DecimalFormat formatter = new DecimalFormat("#.##");...
src/systems/bitcoinSystem/BitcoinSystem.java
0.598782
0.402921
BitcoinSystem.java
starcoder
package cellsociety.model.cells; import cellsociety.model.Cell; import cellsociety.model.Grid; import java.util.ArrayList; import java.util.Collections; /** * Segregation Cell class */ public class SegregationCell extends Cell { private double threshold = 0.5; private static final int emptyState = 0; private...
src/cellsociety/model/cells/SegregationCell.java
0.773473
0.528168
SegregationCell.java
starcoder
package org.jhotdraw8.geom; import javafx.scene.shape.FillRule; import org.jhotdraw8.annotation.NonNull; import org.jhotdraw8.geom.intersect.IntersectPathIteratorPoint; import org.jhotdraw8.geom.intersect.IntersectionResult; import org.jhotdraw8.geom.intersect.IntersectionStatus; import java.awt.Rectangle; import jav...
org.jhotdraw8.draw/src/main/java/org.jhotdraw8.draw/org/jhotdraw8/geom/BezierNodePath.java
0.924989
0.521776
BezierNodePath.java
starcoder
package com.telenav.kivakit.kernel.data.validation; import com.telenav.kivakit.kernel.language.values.name.Name; import com.telenav.kivakit.kernel.project.lexakai.diagrams.DiagramDataValidation; import com.telenav.lexakai.annotations.UmlClassDiagram; import java.util.HashSet; import java.util.Set; /** * A kind of ...
kivakit-kernel/src/main/java/com/telenav/kivakit/kernel/data/validation/ValidationType.java
0.910867
0.442637
ValidationType.java
starcoder
import java.util.Stack; import java.util.HashSet; import java.lang.Math; //~ Problem Statement //~ You have the number s. You may change this number. In each step you can apply one of two possible changes: //~ Add a to your current number. //~ Multiply your current number by b. //~ Your goal is to change s into t u...
MultiplyAddPuzzle.java
0.547585
0.406273
MultiplyAddPuzzle.java
starcoder
package com.alexkasko.unsafe.bytearray; import sun.misc.Unsafe; import java.lang.reflect.Field; /** * Implementation of {@link ByteArrayTool} using {@code sun.misc.Unsafe}. * All bound checks are done using {@code assert} keyword, they may be enabled * with java {@code ea} switch. * * @author alexkasko * Date:...
src/main/java/com/alexkasko/unsafe/bytearray/UnsafeByteArrayTool.java
0.942268
0.520679
UnsafeByteArrayTool.java
starcoder
package qub; public class SpanTests { public static void test(TestRunner runner) { runner.testGroup(Span.class, () -> { runner.test("constructor", (Test test) -> { final Span span = new Span(1, 2); test.assertEqual(1, span.getStartIndex())...
tests/qub/SpanTests.java
0.77569
0.553928
SpanTests.java
starcoder
package jat.coreNOSA.forces; import jat.coreNOSA.math.MatrixVector.data.VectorN; import jat.coreNOSA.spacecraft.Spacecraft; import jat.coreNOSA.spacetime.BodyRef; import jat.coreNOSA.spacetime.Time; import jat.coreNOSA.timeRef.EarthRef; /** * <P> * The ExponentialDrag class computes the acceleration due to drag on a...
src/jat/coreNOSA/forces/ExponentialDrag.java
0.902516
0.510924
ExponentialDrag.java
starcoder
package gparap.apps.weather; import android.util.DisplayMetrics; import androidx.test.core.app.ActivityScenario; import org.junit.Before; import org.junit.Test; import java.util.concurrent.atomic.AtomicReference; import static androidx.test.espresso.Espresso.onView; import static androidx.test.espresso.assertion.V...
weather/app/src/androidTest/java/gparap/apps/weather/WidgetVisibilityInstrumentedTest.java
0.738009
0.475362
WidgetVisibilityInstrumentedTest.java
starcoder
package org.hyperledger.besu.crosschain.crypto.threshold.scheme; import java.math.BigInteger; import java.nio.ByteBuffer; /** Represents a single share. */ public class IntegerSecretShare { private BigInteger shareY; private BigInteger shareX; public IntegerSecretShare(final BigInteger shareX, final BigInteger...
crosschain/src/main/java/org/hyperledger/besu/crosschain/crypto/threshold/scheme/IntegerSecretShare.java
0.930062
0.493958
IntegerSecretShare.java
starcoder
package org.carrot2.examples; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.carrot2.core.Document; /** * Some example search results for use off-line. */ public final class SampleDocumentData { public final static List<Document> DOCUMENTS_DATA_MINING; static ...
lib/carrot/examples/org/carrot2/examples/SampleDocumentData.java
0.777596
0.667967
SampleDocumentData.java
starcoder
package ca.aodong; import java.util.Scanner; public class ThresCal { private static int frameIndex; private static int chosenThresNum; private static boolean isThresValid; private static int k1; private static int k2; private static int k3; private static ImageData img; //The followin...
src/Java/ca/aodong/ThresCal.java
0.553023
0.470007
ThresCal.java
starcoder
package org.tensa.tensada.matrix; import java.io.IOException; import java.util.Map; import java.util.Optional; import java.util.concurrent.RejectedExecutionException; import java.util.function.Function; import java.util.function.UnaryOperator; import java.util.logging.Level; import java.util.logging.Logger; import jav...
src/main/java/org/tensa/tensada/matrix/NumericMatriz.java
0.784855
0.511107
NumericMatriz.java
starcoder
package com.ramamosr.MathProb; public class SumOfAllSubMatrices { /* Sum of all Submatrices Problem Description Given a 2D Matrix A of dimensions N*N, we need to return sum of all possible submatrices. Problem Constraints 1 <= N <=30 0 <= A[i][j] <= 10 Input Format Single argument representing a 2-D a...
src/com/ramamosr/MathProb/SumOfAllSubMatrices.java
0.730674
0.817392
SumOfAllSubMatrices.java
starcoder
package com.njkremer.Sqlite; import java.util.LinkedHashMap; /** * A expression to allow for custom columns and functions to be called as part of a "select" portion of a sql * statment. * * <p> The idea here is to be able to return arbitrary columns and to operate on columns (such as SQLite's <a * href="http://...
src/com/njkremer/Sqlite/ColumnExpression.java
0.922648
0.454956
ColumnExpression.java
starcoder
package net.i2p.crypto; import java.math.BigInteger; import java.security.spec.ECField; import java.security.spec.ECFieldFp; import java.security.spec.ECPoint; import java.security.spec.EllipticCurve; import net.i2p.util.NativeBigInteger; /** * Used by KeyGenerator.getSigningPublicKey() * * Modified from * ht...
CryptMeme/core/java/src/net/i2p/crypto/ECUtil.java
0.882111
0.404566
ECUtil.java
starcoder
package org.metasyntactic.automata.compiler.java.parser; import org.metasyntactic.automata.compiler.framework.parsers.packrat.PackratGrammar; import org.metasyntactic.automata.compiler.framework.parsers.packrat.Rule; import org.metasyntactic.automata.compiler.framework.parsers.packrat.expressions.Expression; import st...
java/org/metasyntactic/automata/compiler/java/parser/JavaGrammar.java
0.652795
0.416144
JavaGrammar.java
starcoder
package simulation.entity; import core.Direction; import core.Vector; import simulation.entity.state.AttackState; import simulation.entity.state.CanBeAnimated; public class MovingEntity implements CanBeAnimated { private Entity entity; private Vector move; private Vector speed; private Direction direction; pri...
src/main/java/simulation/entity/MovingEntity.java
0.776792
0.529142
MovingEntity.java
starcoder
package countingSort; public class CountingSort implements SortableSortingAlgorithm { @Override public String getName() { return "CountingSort"; } /** * Sorts an array. * @param array * @param min minimal element in this array * @param max maximal element in this array * @return a sorted array *...
src/countingSort/CountingSort.java
0.683314
0.421314
CountingSort.java
starcoder
package edu.pitt.apollo.examples; import edu.pitt.apollo.simulator_service_types.v4_0_2.RunSimulationMessage; import edu.pitt.apollo.types.v4_0_2.*; public class ExampleUnconditionalProbabilityDistribution { static final double ONE_DAY_LATENT_PERIOD = 1d; static final double TWO_DAY_LATENT_PERIOD = 2d; static f...
config-examples/src/main/java/edu/pitt/apollo/examples/ExampleUnconditionalProbabilityDistribution.java
0.668123
0.44903
ExampleUnconditionalProbabilityDistribution.java
starcoder
package glj2.core; import com.jogamp.opengl.util.glsl.ShaderCode; import com.jogamp.opengl.util.glsl.ShaderProgram; import java.io.PrintStream; import java.io.Serializable; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import ...
src/glj2/core/ExtendedShaderProgram.java
0.857291
0.425784
ExtendedShaderProgram.java
starcoder
package org.opl.access.block; /** * Additional superclass of {@link MemoryBlockDirect} to be used in development/test process. Performs * additional checks on all operations. Created with {@link MemoryBlockFactory} * @see MemoryBlockFactory */ public class MemoryBlockSafe implements MemoryBlock { private fina...
src/main/java/org/opl/access/block/MemoryBlockSafe.java
0.955382
0.48121
MemoryBlockSafe.java
starcoder
package org.hexworks.zircon.api.resource; import org.hexworks.zircon.api.Positions; import org.hexworks.zircon.api.Sizes; import org.hexworks.zircon.api.data.Position; import org.hexworks.zircon.api.data.Size; import org.hexworks.zircon.api.data.impl.Position3D; import org.hexworks.zircon.internal.component.impl.Compo...
zircon.core/src/jvmTest/java/org/hexworks/zircon/api/resource/PositionsTest.java
0.886144
0.725041
PositionsTest.java
starcoder
import java.util.Arrays; public class KruskalMST { private static class Edge implements Comparable<Edge> { int dist, fromVertex, toVertex; public Edge(int from, int to, int weight) { fromVertex = from; toVertex = to; dist = weight; } @Overri...
Algorithms/Graphs/KruskalMST.java
0.786254
0.57069
KruskalMST.java
starcoder
package org.ezvolve.core.stochastic; import com.gargoylesoftware.base.testing.EqualsTester; import java.util.Random; import org.ezvolve.core.encoding.BitString; import org.junit.*; import static org.junit.Assert.*; import static org.ezvolve.core.test.ExceptionTestUtils.*; public class ProbabilityVectorTest {...
test/org/ezvolve/core/stochastic/ProbabilityVectorTest.java
0.791418
0.704592
ProbabilityVectorTest.java
starcoder
package abstractions; import skipList.SkipListNode; /** * A skip list is a data structure that allows fast search within an ordered * sequence of elements. Fast search is made possible by maintaining a linked * hierarchy and skipping over some elements. The elements that are skipped over * may be chosen probabili...
abstractions/SkipList.java
0.83545
0.594757
SkipList.java
starcoder
package com.hit.basmath.learn.concurrency; import java.util.concurrent.Semaphore; import java.util.function.IntConsumer; /** * 1195. Fizz Buzz Multithreaded * <p> * Write a program that outputs the string representation of numbers from 1 to n, however: * <p> * If the number is divisible by 3, output "fizz". * I...
codes/java/leetcodes/src/main/java/com/hit/basmath/learn/concurrency/_1195.java
0.690872
0.439206
_1195.java
starcoder
package arrays; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class RotateArray { /** * 189. Rotate Array * * https://leetcode.com/problems/rotate-array/ * */ /* * First Solution * */ public static void rotateSolution1(int[] nums, int st...
src/arrays/RotateArray.java
0.863636
0.409516
RotateArray.java
starcoder
package com.salesforce.pyplyn.util; import static java.util.Objects.nonNull; import java.util.*; /** * Various utils used for manipulating collection and array data structures * * @author <NAME> &lt;<EMAIL>&gt; * @since 3.0 */ public final class CollectionUtils { /** * Utilities classes should not be ...
plugin-api/src/main/java/com/salesforce/pyplyn/util/CollectionUtils.java
0.923936
0.614654
CollectionUtils.java
starcoder
package br.com.centralit.citcorpore.bean; import java.sql.Date; import br.com.citframework.dto.IDto; public class RelatorioAcompanhamentoDTO implements IDto { private static final long serialVersionUID = 1L; private Double anoDouble; private Integer idContrato; private Double custoAtividade; private Doubl...
agile-itsm-web/agile-itsm-web-portal/src/main/java/br/com/centralit/citcorpore/bean/RelatorioAcompanhamentoDTO.java
0.749546
0.485417
RelatorioAcompanhamentoDTO.java
starcoder
package com.tokelon.toktales.core.render.model; import org.joml.Matrix4f; import org.joml.Vector2f; import org.joml.Vector3f; public class TexturedModel extends RenderModel implements ITexturedModel { private final Matrix4f textureMatrix; private final Vector2f textureTranslation; private final Vector2f textu...
tokTales-core/tokTales-core-library/src/main/java/com/tokelon/toktales/core/render/model/TexturedModel.java
0.854748
0.585072
TexturedModel.java
starcoder
package com.alibaba.polardbx.common.datatype; import com.google.common.base.Preconditions; import io.airlift.slice.Slice; import static com.alibaba.polardbx.common.datatype.DecimalTypeBase.*; public class RawBytesDecimalUtils { public static int hashCode(Slice memorySegment) { Preconditions.checkPosit...
polardbx-common/src/main/java/com/alibaba/polardbx/common/datatype/RawBytesDecimalUtils.java
0.661158
0.422564
RawBytesDecimalUtils.java
starcoder
package org.knowm.xchart.internal.series; /** * A Series containing X and Y data to be plotted on a Chart with X and Y Axes. xData can be Number * or Date(epochtime), hence a double[] * * @author timmolter */ public abstract class AxesChartSeriesNumericalNoErrorBars extends MarkerSeries { double[] xData; // ca...
xchart/src/main/java/org/knowm/xchart/internal/series/AxesChartSeriesNumericalNoErrorBars.java
0.863449
0.666205
AxesChartSeriesNumericalNoErrorBars.java
starcoder
package com.louis.flink.hbase; import org.apache.flink.api.java.tuple.*; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.util.Bytes; import java.io.IOException; import java.time.Instant; import java.util.ArrayList; import java.util.List; /** * 将...
src/main/java/com/louis/flink/hbase/AssignmentTuple.java
0.560012
0.401952
AssignmentTuple.java
starcoder
package us.ihmc.graphicsDescription.plotting.artifact; import java.awt.Color; import java.util.ArrayList; import java.util.List; import us.ihmc.euclid.geometry.BoundingBox2D; import us.ihmc.euclid.geometry.ConvexPolygon2D; import us.ihmc.euclid.geometry.interfaces.Vertex2DSupplier; import us.ihmc.euclid.tuple2D.Point...
src/main/java/us/ihmc/graphicsDescription/plotting/artifact/PolygonArtifact.java
0.926204
0.567577
PolygonArtifact.java
starcoder
package lapr.project.utils; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * @author DEI-ESINF */ public class AdjacencyMatrixGraph implements Cloneable{ public static final int INITIAL_CAPACITY = 10; public static final float RESIZE_FACTOR = 1.5F; int numVertices; ...
src/main/java/lapr/project/utils/AdjacencyMatrixGraph.java
0.836655
0.572364
AdjacencyMatrixGraph.java
starcoder
package com.mathgame.math; import java.awt.Component; import java.util.ArrayList; import java.util.Random; import com.mathgame.cards.NumberCard; import com.mathgame.cards.OperationCard; /** * The Calculate class contains methods for calculating the result of combining two cards */ public class Calculate { /** ...
src/com/mathgame/math/Calculate.java
0.683736
0.401893
Calculate.java
starcoder
package net.tclemens.calcium.math.vector; import android.support.annotation.NonNull; import net.tclemens.calcium.math.Geometry; /** * This class represents an affine two-dimensional vector * * @author <NAME> */ public final class Vector2D { /** The <tt>x</tt> component of the vector */ private final flo...
calcium-core/src/main/java/net/tclemens/calcium/math/vector/Vector2D.java
0.970785
0.68822
Vector2D.java
starcoder
package i5.las2peer.services.ocd.algorithms.utils; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import i5.las2peer.services.ocd.graphs.CustomGraph; import y.base.Node; import y.base.NodeCursor; /** * ...
rest_ocd_services/src/main/java/i5/las2peer/services/ocd/algorithms/utils/MaximalCliqueSearch.java
0.612194
0.419648
MaximalCliqueSearch.java
starcoder
package com.arakelian.elastic.model.enums; import java.util.Map; import java.util.TreeMap; import com.arakelian.elastic.model.search.Query; import com.google.common.base.Preconditions; /** * Regular expression flags that can be applied to {@link Query}. * * @see <a href= * "http://lucene.apache.org/core/4_9...
src/main/java/com/arakelian/elastic/model/enums/DateFormat.java
0.833663
0.425277
DateFormat.java
starcoder
package ca.mcgill.ecse211.project; import static ca.mcgill.ecse211.project.LocalResources.redTeam; import java.util.ArrayList; /** * This class is a template for the proposed searching algorithm. * * <p>The robot will rotate and read ultrasonic distances to detect where the * stranded vehicle might be, which is...
src/ca/mcgill/ecse211/project/Search.java
0.864568
0.538437
Search.java
starcoder
package com.liemily.recommender.example.data; import java.util.Arrays; import java.util.HashMap; import java.util.Map; public class DataSetUtils { public DataSets split(final DataSet data, final double testPercentage) { final int splitIdx = (int) Math.round(data.length() * testPercentage); final S...
src/main/java/com/liemily/recommender/example/data/DataSetUtils.java
0.829043
0.531209
DataSetUtils.java
starcoder
package core; import java.util.Collection; import static core.protocols.DummyDetection.dummyDetection; /** * A destination is a tag interface to indicate that a node is the destination of the simulation. A router * must implement the destination interface. This interface only includes methods export the initial ro...
src/core/Destination.java
0.881002
0.500793
Destination.java
starcoder
package edu.mit.rewire.view.animation; import edu.mit.rewire.view.Bubble; import edu.mit.rewire.view.ProcessingView; import edu.mit.rewire.view.Bubble.State; public class ExpandBubbleAnimation implements Animation { private Bubble bubble; // VARIABLES TO ADJUST EXPANSION ANIMATION private final float R = 400; ...
src/edu/mit/rewire/view/animation/ExpandBubbleAnimation.java
0.526099
0.472136
ExpandBubbleAnimation.java
starcoder
package smile.stat.distribution; import smile.math.MathEx; /** * The base class of univariate distributions. Both rejection * and inverse transform sampling methods are implemented to provide some * general approaches to generate random samples based on probability density * function or quantile function. Besides...
math/src/main/java/smile/stat/distribution/AbstractDistribution.java
0.95489
0.776369
AbstractDistribution.java
starcoder
import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Solution3 { private class UnionFind { public static final int SIZE = 1_0000_0000; private int[] parent; private double[] value; private boolean[] used; public UnionFind() { ...
union-find/Java/0399-evaluate-division/src/Solution3.java
0.785802
0.478346
Solution3.java
starcoder
package com.humanaxe.entities; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.image.BufferedImage; import java.util.Comparator; import java.util.List; import java.util.Random; import com.humanaxe.main.Game; import com.humanaxe.systems.Camera; import com.humanaxe.systems.Node; import com.humanaxe...
src/com/humanaxe/entities/Entity.java
0.767777
0.453988
Entity.java
starcoder
package list; /** * Sum Lists: You have two numbers represented by a linked list, where each node contains a single digit. * The digits are stored in reverse order, such that the 1 's digit is at the head of the list. * Write a function that adds the two numbers and returns the sum as a linked list. * EXAMPLE * I...
list/SumLists.java
0.909073
0.767625
SumLists.java
starcoder
package com.github.miachm.sods; import org.testng.annotations.Test; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.fail; public class A1NotationTest { private Sheet generateSheet(int size) { Sheet sheet = new Sheet("A", size, size); int cnt = 0; ...
tests/com/github/miachm/sods/A1NotationTest.java
0.513425
0.405861
A1NotationTest.java
starcoder
package schermer.math; import static java.lang.Math.abs; import java.io.Serializable; import java.util.function.ToDoubleBiFunction; import java.util.function.ToDoubleFunction; /** * An implementation of an immutable quaternion for use in graphics * calculations. * <p> * -----------------------------------------...
src/schermer/math/Quaternion.java
0.967414
0.59752
Quaternion.java
starcoder
package org.xSakix.individuals; import cern.jet.random.Uniform; public class QuantumSimpleIndividual extends SimpleIndividual{ //particle private double Pw; private double Gw; private double C; private double alpha; private double fitness; private double lastFitness = Double.NaN; pu...
ETF_GROWTH/src/main/java/org/xSakix/individuals/QuantumSimpleIndividual.java
0.659624
0.446736
QuantumSimpleIndividual.java
starcoder
package Tree; import java.util.*; /** * * [Minimum depth - no.111] * URL : https://leetcode.com/problems/binary-tree-level-order-traversal/ * Question: * Given a binary tree, find its minimum depth. * * The minimum depth is the number of nodes along the shortest path from the root node down to the nearest...
src/Tree/MinDepthTree.java
0.912487
0.550245
MinDepthTree.java
starcoder
package code.ponfee.commons.collect; import static com.google.common.base.Preconditions.checkElementIndex; import static com.google.common.base.Preconditions.checkPositionIndexes; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Objects; /** * The primitive long array t...
src/main/java/code/ponfee/commons/collect/LongArrayList.java
0.884414
0.417865
LongArrayList.java
starcoder
import java.util.EmptyStackException; import java.nio.BufferOverflowException; /**Test the stack interface * * <p>This module provides pseudo-unit tests * against the stack class. All core functions * are excercised to test * their stated function, along with the cases * and errors that should ...
JHU/615.202.81.FA15_data_structures/module_05/src/TestStack.java
0.619126
0.500061
TestStack.java
starcoder
package org.ldaptive.schema; import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; /** * Base class for default definition functions. * * @param <T> type of schema element * * @author Middleware Services */ public ...
core/src/main/java/org/ldaptive/schema/AbstractDefaultDefinitionFunction.java
0.83602
0.439086
AbstractDefaultDefinitionFunction.java
starcoder
package ai.utility; import ai.GreedyBestFirst; import gui.constant.GuiConst; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; /** * This class is an utility class for providing some array manipulation functions * * @author <NAME> * @version Version 1.0 */ ...
src/ai/utility/AiUtils.java
0.928075
0.438605
AiUtils.java
starcoder
package com.cet325.gamers_emotional_state_detection.holders; import com.cet325.gamers_emotional_state_detection.datasets.EmotionValuesDataset; import java.util.ArrayList; import java.util.LinkedHashMap; /** * Singleton holder object that stores the facial emotion recognition results before the analysis * also it s...
app/src/main/java/com/cet325/gamers_emotional_state_detection/holders/FacialEmotionRecognitionResultsHolder.java
0.907107
0.416737
FacialEmotionRecognitionResultsHolder.java
starcoder
package org.pengfei.Lesson01_Java_Standard_API.S12_Reflection; import org.pengfei.Lesson01_Java_Standard_API.S12_Reflection.source.ReflectionApplicationExample; public class S12_Reflection { /********************************************* 12.1 Introduction ***********************************************/ /* ...
LearningJava/src/main/java/org/pengfei/Lesson01_Java_Standard_API/S12_Reflection/S12_Reflection.java
0.834643
0.551091
S12_Reflection.java
starcoder
package com.alibaba.alink.common.matrix.string; import java.io.Serializable; import java.util.Arrays; public class DenseStringVector extends StringVector implements Serializable { private String[] data; public DenseStringVector() { } public DenseStringVector(DenseStringVector other) { this....
alink_core/src/main/java/com/alibaba/alink/common/matrix/string/DenseStringVector.java
0.866217
0.517144
DenseStringVector.java
starcoder
package edu.stanford.math.plex4.homology.chain_basis; /** * This interface defines the functionality of a primitive basis element type * for a chain complex. The two main implementing classes are designed to be * the Simplex and Cell classes. We refer to these as "primitive" basis types * since they are not built...
src/java/edu/stanford/math/plex4/homology/chain_basis/PrimitiveBasisElement.java
0.916619
0.735713
PrimitiveBasisElement.java
starcoder
package org.vertexium.type; import org.vertexium.VertexiumException; import static org.vertexium.util.Preconditions.checkNotNull; public class GeoRect extends GeoShapeBase { private static final long serialVersionUID = 7701255671989639309L; private final GeoPoint northWest; private final GeoPoint southEa...
core/src/main/java/org/vertexium/type/GeoRect.java
0.928344
0.514827
GeoRect.java
starcoder
package de.beachboys.aoc2015; import de.beachboys.Day; import org.javatuples.Pair; import org.javatuples.Triplet; import java.util.HashMap; import java.util.List; import java.util.Map; public class Day21 extends Day { private interface BestCostPredicate { boolean test(int currentBestCost, int cost, Trip...
src/main/java/de/beachboys/aoc2015/Day21.java
0.753104
0.416085
Day21.java
starcoder
package com.amobee.freebee.evaluator.index; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util....
freebee-core/src/main/java/com/amobee/freebee/evaluator/index/RangeCollectionMapImpl.java
0.933256
0.446072
RangeCollectionMapImpl.java
starcoder
package com.baz.app.lc.medium; import com.baz.app.Interface.Facebook.Facebook; import com.baz.app.util.UndirectedGraphNode; import com.baz.app.util.Utils; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; public class CloneGraph implements Facebook { /** * Given the head of a gra...
src/main/java/com/baz/app/lc/medium/CloneGraph.java
0.879082
0.553143
CloneGraph.java
starcoder
import java.lang.Math; import java.util.LinkedList; class DataBT implements IBinTree { int data; IBinTree left; IBinTree right; DataBT(int data, IBinTree left, IBinTree right) { this.data = data; this.left = left; this.right = right; } // an alternate constructor for when both subtrees are empty Data...
Homework 4/src/DataBT.java
0.829354
0.680767
DataBT.java
starcoder
package com.opengamma.strata.basics.index; import java.util.Optional; import java.util.Set; import org.joda.convert.FromString; import org.joda.convert.ToString; import com.google.common.collect.Iterables; import com.opengamma.strata.basics.currency.Currency; import com.opengamma.strata.basics.date.DaysAdjustment; i...
modules/basics/src/main/java/com/opengamma/strata/basics/index/FloatingRateName.java
0.933393
0.652947
FloatingRateName.java
starcoder
package org.sbml.libsbml; /** * Base class for extending {@link SBMLDocument} in packages. <p> * <p style='color: #777; font-style: italic'> This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although...
third_party/libSBML-5.11.0-Source/src/bindings/java/java-files/org/sbml/libsbml/SBMLDocumentPlugin.java
0.918601
0.493592
SBMLDocumentPlugin.java
starcoder
package io.nabox.common.utils.bens.conversion; import java.util.Collection; import java.util.Collections; /** * 类型转换器管理器。 * * <p> * 注意:由于数组是协变的,所以一维数组可以使用 Object[].class 表示。 */ public interface TypeConverterManager { /** 表示可用作所有源类型“通配符”的 Class 。 */ public static final Class<?> ALL_SOUECE_TYPE_CLASS = AllSou...
nabox-common/src/main/java/io/nabox/common/utils/bens/conversion/TypeConverterManager.java
0.52683
0.494751
TypeConverterManager.java
starcoder
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.ArrayList; /** * This panel lets the user place colored rectangles on a canvas * by clicking the canvas. The color of the rectangle is given * by a color palette that lies along the bottom of the applet. * Alt-clicking (or clicki...
assets/source/SimpleDrawRects.java
0.802013
0.412767
SimpleDrawRects.java
starcoder
package com.merryapps.tictacpro.model.game; import android.support.annotation.NonNull; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; /** * Created by mephisto on 8/30/16. */ public class Board { final private TokenCell[][] tokenCells; private Tok...
app/src/main/java/com/merryapps/tictacpro/model/game/Board.java
0.909468
0.506103
Board.java
starcoder
package de.beachboys.aoc2021; import de.beachboys.Day; import org.javatuples.Pair; import org.javatuples.Triplet; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; public class Day19 extends Day { private static final int REQUIRED_MATCHES = 12; private static final ...
src/main/java/de/beachboys/aoc2021/Day19.java
0.814311
0.610453
Day19.java
starcoder
package lejos.geom; import java.awt.geom.*; /** * Point with float co-ordinates for use in navigation. * * @author <NAME> * */ public class Point extends Point2D.Float { public Point(float x, float y) { super(x,y); } public Point(float radians) { this.x = (float)Math.cos(radians); ...
CS200s/CS217b/OriginalFiles/lejos/geom/Point.java
0.935531
0.574872
Point.java
starcoder
package org.sellcom.core.internal.util; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; import java.util.Random; import java.util.UUID; public class RandomUtils { private RandomUtils() { // Utility class, not to be instantiated } public static BigDecimal nextBigDecimal...
src/main/java/org/sellcom/core/internal/util/RandomUtils.java
0.611962
0.458409
RandomUtils.java
starcoder
package com.example.mvmax.speakrecognition.speakrecognition.pitch; import java.util.ArrayList; import java.util.Collection; import java.util.List; public final class McLeodPitchMethod implements PitchDetector { private static final double DEFAULT_CUTOFF = 0.97; private static final double SMALL_CUTOFF = 0.5;...
app/src/main/java/com/example/mvmax/speakrecognition/speakrecognition/pitch/McLeodPitchMethod.java
0.901298
0.522629
McLeodPitchMethod.java
starcoder
* To change this template, choose Tools | Templates * and open the template in the editor. */ package com.mgmtp.perfload.loadprofiles.model; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.newArrayListWithCapacity; import java.util.List; /** * A load cur...
src/main/java/com/mgmtp/perfload/loadprofiles/model/LoadCurveAssignment.java
0.908036
0.432603
LoadCurveAssignment.java
starcoder
package com.ambrosoft.exercises; /** * Created by jacek on 8/2/16. */ public class MergeSort { public static void main(String[] args) { int[] a = {7, 6, 3, 4, 5, 2, 1}; mergeSort(a); } static void mergeSort(final int[] a) { int len = a.length; mergeSort(a, new int[len], ...
src/main/java/com/ambrosoft/exercises/MergeSort.java
0.704668
0.419351
MergeSort.java
starcoder
package org.jacpfx.concurrency; import java.util.concurrent.CompletableFuture; import java.util.function.Function; /** * Represents an execution step in the AsyncHandler * Created by <NAME> on 16.04.15. */ public class ExecutionStep<V, T> { private final CheckedFunction<V, T> function; private final Exec...
JacpFXConcurrencyTools/src/main/java/org/jacpfx/concurrency/ExecutionStep.java
0.76934
0.403214
ExecutionStep.java
starcoder
package org.hedinger.scaffold; import java.io.File; import java.util.Set; import org.hedinger.scaffold.extractor.PatternExtractor; import org.hedinger.scaffold.template.TemplateTree; import org.junit.Assert; import org.junit.Before; import org.junit.Test; public class PatternExtractorTest { @Before public void se...
test/org/hedinger/scaffold/PatternExtractorTest.java
0.741768
0.445288
PatternExtractorTest.java
starcoder
package com.faanggang.wisetrack.model.stats; import android.util.Log; import com.google.firebase.Timestamp; import com.jjoe64.graphview.series.DataPoint; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; public class StatPlot { private List<Float> values; ...
WiseTrack/app/src/main/java/com/faanggang/wisetrack/model/stats/StatPlot.java
0.916152
0.467514
StatPlot.java
starcoder
package com.sunny.grokkingalgorithms.basic_2020.warmup; public class MaxProfit { /* * An array A consisting of N integers is given. It contains daily prices of a stock share for a period of N consecutive days. If a single share was bought on day P and sold on day Q, where 0 ≤ P ≤ Q < N, then the profit of such tra...
src/main/java/com/sunny/grokkingalgorithms/basic_2020/warmup/MaxProfit.java
0.727685
0.811974
MaxProfit.java
starcoder