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
import java.util.ArrayList; /** * The abstract base class of all Players. Contains all functions for the game to interact with a player. * All contained functions are to be overridden and it is to be assumed that the overriding player will block execution for any amount of time. */ public abstract class Player { /...
src/Player.java
0.708213
0.471223
Player.java
starcoder
package info.varden.hauk.utils; import android.util.SparseArray; import java.util.Random; /** * Receiver classes and services are instantiated by Android itself, and we cannot pass arbitrary * objects to them during construction. They receive Intents, where we can put some basic data, but * for transferring custo...
android/app/src/main/java/info/varden/hauk/utils/ReceiverDataRegistry.java
0.901591
0.508849
ReceiverDataRegistry.java
starcoder
package application.rest.geoentity; import application.rest.handler.WeatherData; import java.util.ArrayList; import java.util.List; public class Region { private static List<WeatherData> cherkasyRegion = new ArrayList<>(); private static List<WeatherData> chernihivRegion = new ArrayList<>(); private sta...
src/main/java/application/rest/geoentity/Region.java
0.77193
0.830525
Region.java
starcoder
package io.github.dengliming.redismodule.redisbloom; import io.github.dengliming.redismodule.redisbloom.model.CountMinSketchInfo; import io.github.dengliming.redismodule.common.util.ArgsUtil; import io.github.dengliming.redismodule.common.util.RAssert; import io.github.dengliming.redismodule.redisbloom.protocol.Keywor...
redisbloom/src/main/java/io/github/dengliming/redismodule/redisbloom/CountMinSketch.java
0.85226
0.418578
CountMinSketch.java
starcoder
package com.ambrosoft.exercises; import java.util.Arrays; /** * Created by jacek on 1/2/17. */ public class SearchSparseSorted { /* sorted String array except from any number of empty Strings which break simple binary search suggests a modified binary search with some linear scans for nonempty s...
src/main/java/com/ambrosoft/exercises/SearchSparseSorted.java
0.585101
0.500122
SearchSparseSorted.java
starcoder
package com.concurrentli; import java.util.Objects; import java.util.function.Supplier; /** * An {@link ObjectPool} is a means to reuse a pool of objects without the use of locks or other memory barriers (such * as atomics or volatiles) by essentially hoping for advantageous data races (although "losing" this bet ...
concurrentli/src/main/java/com/concurrentli/ObjectPool.java
0.908056
0.605741
ObjectPool.java
starcoder
package LargestDivisibleSubset_368; import java.util.*; /** * Given a set of distinct positive integers, * find the largest subset such that every pair (Si, Sj) of elements * in this subset satisfies: Si % Sj = 0 or Sj % Si = 0. * * If there are multiple solutions, return any subset is fine. * * Example 1: * ...
leetcode/src/LargestDivisibleSubset_368/Solution.java
0.730194
0.402744
Solution.java
starcoder
package com.alibaba.polardbx.executor.mpp.execution.buffer; import com.alibaba.polardbx.executor.chunk.Chunk; import io.airlift.slice.Slice; import org.openjdk.jol.info.ClassLayout; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkArgument; impor...
polardbx-executor/src/main/java/com/alibaba/polardbx/executor/mpp/execution/buffer/SerializedChunk.java
0.882377
0.406155
SerializedChunk.java
starcoder
package com.wildbeeslabs.sensiblemetrics.diffy.metrics.score; import com.wildbeeslabs.sensiblemetrics.diffy.common.utils.ValidationUtils; import com.wildbeeslabs.sensiblemetrics.diffy.metrics.interfaces.SimilarityScore; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import java.util.Hash...
metrics/src/main/java/com/wildbeeslabs/sensiblemetrics/diffy/metrics/score/CosineScore.java
0.94437
0.575916
CosineScore.java
starcoder
package java.util.zip; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; /** * An inputstream filter to compress data by the compressing format of Deflate. */ public class DeflaterInputStream extends FilterInputStream { /** * The Deflater used by this DeflaterInputS...
classlib/modules/archive/src/main/java/java/util/zip/DeflaterInputStream.java
0.918224
0.435902
DeflaterInputStream.java
starcoder
package com.google.visualization.datasource.query; import com.google.common.collect.Sets; import com.google.visualization.datasource.datatable.DataTable; import com.google.visualization.datasource.datatable.TableRow; import com.google.visualization.datasource.datatable.value.Value; import java.util.List; import java...
src/com/google/visualization/datasource/query/ColumnValueFilter.java
0.969106
0.545649
ColumnValueFilter.java
starcoder
package shapes.vector; import colors.LEGOColor; public class MathShapes { public static VectorShape union(final VectorShape a, final VectorShape b) { return new VectorShape() { @Override public boolean occupies(Vector v) { return a.occupies(v) || b.occupies(v); } }; } public stat...
src/shapes/vector/MathShapes.java
0.906502
0.694393
MathShapes.java
starcoder
package me.edwards.des.block; import java.math.BigInteger; import java.nio.ByteBuffer; import java.util.ArrayList; // ----------------------------------------------------------------------------- /** * Data structure to maintain {@link Block Blocks} in the BlockChain. Blocks can * be randomly appended to t...
src/me/edwards/des/block/BlockChain.java
0.768733
0.461684
BlockChain.java
starcoder
package com.williamlewww.thane.TMain; import android.graphics.PointF; import com.williamlewww.thane.TEngine.TLine; import com.williamlewww.thane.TEngine.TQuad; import java.util.ArrayList; import java.util.List; import java.util.Random; public class Track { public static List<PointF> speedZones = new ArrayList<>...
app/src/main/java/com/williamlewww/thane/TMain/Track.java
0.814496
0.443781
Track.java
starcoder
package com.simibubi.create.foundation.utility; import net.minecraft.util.math.MathHelper; import java.util.ArrayList; public class PhysicalFloat { float previousValue; float value; float speed; private final ArrayList<Force> forces = new ArrayList<>(); public static PhysicalFloat create() { ...
src/main/java/com/simibubi/create/foundation/utility/PhysicalFloat.java
0.947721
0.482612
PhysicalFloat.java
starcoder
package de.gesundkrank.jskills.numerics; /** * A very limited implementation of an immutable range of Integers, including * endpoints. There is no such thing as an empty range. * <p> * The whole purpose of this class is to make the code for the * SkillCalculator(s) look a little cleaner * <p> * Derived classes ...
src/main/java/de/gesundkrank/jskills/numerics/Range.java
0.841011
0.442697
Range.java
starcoder
package org.ode4j.ode.internal.joints; import static org.ode4j.ode.internal.joints.JointEnums.GI2_JAX; import static org.ode4j.ode.internal.joints.JointEnums.GI2_JAY; import static org.ode4j.ode.internal.joints.JointEnums.GI2_JAZ; import static org.ode4j.ode.internal.joints.JointEnums.GI2_JLX; import static org.ode4j....
ode4j/src/org/ode4j/ode/internal/joints/Info2DescrQuickStep.java
0.751648
0.571348
Info2DescrQuickStep.java
starcoder
package twg2.io.serialize.base.reader; import java.io.IOException; import twg2.io.serialize.base.DataElement; /** * @author TeamworkGuy2 * @since 2015-5-21 */ public interface PrimitiveArrayReader { /** Read an array of bytes from the next element of the input stream. * The length of the byte array determines...
src/twg2/io/serialize/base/reader/PrimitiveArrayReader.java
0.802903
0.423577
PrimitiveArrayReader.java
starcoder
package javapt; import java.io.FileWriter; import java.io.BufferedWriter; import java.io.IOException; /** * This class contains the image buffer that will store the rendered image. * It has methods for setting and retrieving pixel colors as well as saving * image buffer contents to a file in PPM format. */ publi...
src/main/java/javapt/ImageBuffer.java
0.915793
0.419707
ImageBuffer.java
starcoder
package android.graphics; import android.os.Build; import android.util.Log; import android_svg_code_render.*; /** * Simulated Android Canvas class * * @author <NAME> */ public class Canvas extends AndroidClass { public static final int MATRIX_SAVE_FLAG = 1; public static final int ALL_SAVE_FLAG = 31; ...
src/main/java/android/graphics/Canvas.java
0.855369
0.41324
Canvas.java
starcoder
package it.finsiel.siged.constant; public class Parametri { public static final String TUTTI = "Tutti"; public static final String LABEL_MOZIONE_USCITA = "Mozione + uscita"; public static final String LABEL_STATO_SOSPESO = "Sospeso"; public static final String FLAG_STATO_SOSPESO = "S"; public ...
src/it/finsiel/siged/constant/Parametri.java
0.52902
0.414603
Parametri.java
starcoder
package us.ihmc.robotics.math.trajectories.yoVariables; import us.ihmc.euclid.Axis3D; import us.ihmc.euclid.tuple3D.interfaces.Point3DReadOnly; import us.ihmc.euclid.tuple3D.interfaces.Tuple3DReadOnly; import us.ihmc.euclid.tuple3D.interfaces.Vector3DReadOnly; import us.ihmc.graphicsDescription.yoGraphics.YoGraphicPol...
ihmc-robotics-toolkit/src/main/java/us/ihmc/robotics/math/trajectories/yoVariables/YoPolynomial3D.java
0.936778
0.881309
YoPolynomial3D.java
starcoder
package com.mediatek.ngin3d; import com.mediatek.ngin3d.utils.JSON; /** * Representation of rotation in 3D space. * <p> * There are several mathematical ways to represent a rotation. * This API presents various easy-to-use ways of specifying a rotation. */ public class Rotation implements JSON.ToJson { /** ...
frameworks/opt/ngin3d/java/com/mediatek/ngin3d/Rotation.java
0.962935
0.688665
Rotation.java
starcoder
package com.cspirat; import java.util.HashMap; import java.util.Stack; /** * Project Name : Leetcode * Package Name : leetcode * File Name : NextGreaterElementI * Creator : Edward * Date : Nov, 2017 * Description : 496. Next Greater Element I */ public class NextGreaterElementI { /** * You are given t...
app/src/main/java/com/cspirat/NextGreaterElementI.java
0.842507
0.53783
NextGreaterElementI.java
starcoder
package com.airbnb.aerosolve.core.util; import com.airbnb.aerosolve.core.FeatureVector; import lombok.Setter; import java.io.Serializable; import java.util.*; import java.util.AbstractMap.SimpleEntry; import java.util.Map.Entry; /** * A class that maintains a dictionary for sparse features and returns * the respon...
core/src/main/java/com/airbnb/aerosolve/core/util/LocalitySensitiveHashSparseFeatureDictionary.java
0.916255
0.432902
LocalitySensitiveHashSparseFeatureDictionary.java
starcoder
package org.encog.mathutil.randomize; import org.encog.engine.network.activation.ActivationReLU; import org.encog.mathutil.matrices.Matrix; import org.encog.mathutil.randomize.generate.GenerateRandom; import org.encog.mathutil.randomize.generate.MersenneTwisterGenerateRandom; import org.encog.ml.MLMethod; import org.e...
src/main/java/org/encog/mathutil/randomize/XaiverRandomizer.java
0.789802
0.513303
XaiverRandomizer.java
starcoder
public class BinarySearchTree { public TreeNode root; private int leftH; private int rightH; public void add(int data){ TreeNode node = new TreeNode(data); if(this.root == null){ this.root = node; }else{ this.insertNode(this.root,data); } } ...
data-structures/Tree/BinarySearchTree/java/BinarySearchTree.java
0.526099
0.522933
BinarySearchTree.java
starcoder
package org.matihost.algorithms.euler; import java.math.BigInteger; import java.util.concurrent.atomic.AtomicLong; /** Starting in the top left corner of a 2*2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner. How many such routes are there through a 2...
algorithms/project-euler/src/main/java/org/matihost/algorithms/euler/Problem15.java
0.557243
0.549399
Problem15.java
starcoder
package com.halohoop.floralhoopview.widgets; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PointF; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermo...
floralhoopview-lib/src/main/java/com/halohoop/floralhoopview/widgets/FloralHoopView.java
0.594787
0.424472
FloralHoopView.java
starcoder
package ericghara.week_9; import java.util.LinkedList; import java.util.HashSet; /** * This is a solver for Boggle (essentially a word search). It implements hash based data structures (hashmap * and hashset) as opposed to the more commonly used trie. This solver is able to maintain comparable speed * to a trie...
week_9/src/main/java/ericghara/week_9/BoggleSolver.java
0.933937
0.708477
BoggleSolver.java
starcoder
package com.jordanappler.util; import java.text.DecimalFormat; public class Rational { private long num, den; public Rational(long numIn, long denIn) { this.num = numIn; this.den = denIn; } @Override public boolean equals(Object object) { if (this == object) ...
src/com/jordanappler/util/Rational.java
0.921512
0.448004
Rational.java
starcoder
package osp.leobert.android.pandora.rv; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.util.Pair; import java.util.Collection; import osp.leobert.android.pandora.PandoraBoxAdapter; import osp.leobert.android.pandora.PandoraException; import osp.leobert.android.pandora.RealDat...
pandorarv/src/main/java/osp/leobert/android/pandora/rv/PandoraRealRvDataSet.java
0.613352
0.402862
PandoraRealRvDataSet.java
starcoder
package ru.job4j.calculator; import java.util.HashMap; import java.util.Map; import java.util.Scanner; import java.util.function.BiConsumer; import java.util.regex.Matcher; import java.util.regex.Pattern; public class InteractCalc { public static final Pattern ICPATTERN = Pattern.compile("\\d*+[+\\/\\*-]+\\d+");...
chapter_008/src/main/java/ru/job4j/calculator/InteractCalc.java
0.747063
0.448487
InteractCalc.java
starcoder
package util; import java.util.ArrayList; public class OldPathGenerator { private Position[] smoothedPath; int[][] anchorHeadings; public Position[] generatePosPath(Position[] targetPositions, double spacing, double weightSmooth) { smoothedPath = smoothPath(injectPoints(targetPositions, spacing)...
TeamCode/src/util/OldPathGenerator.java
0.820613
0.518363
OldPathGenerator.java
starcoder
package com.andedit.arcubit; import static com.andedit.arcubit.block.Blocks.blocks; import static com.andedit.arcubit.world.World.world; import static com.badlogic.gdx.math.MathUtils.floor; import java.util.Random; import com.andedit.arcubit.block.Blocks; import com.andedit.arcubit.chunk.ChunkRegion; import com.ande...
core/src/com/andedit/arcubit/PartiBench.java
0.547706
0.448789
PartiBench.java
starcoder
package org.apache.nlpcraft; import java.util.Collections; import java.util.List; import java.util.Optional; /** * NLP processing pipeline for the input request. Pipeline is associated with the model. * <p> * An NLP pipeline is a container for various processing components that take the input text at the beginning...
nlpcraft/src/main/scala/org/apache/nlpcraft/NCPipeline.java
0.8796
0.423398
NCPipeline.java
starcoder
package info.wurzinger.segmenting.elements.segment; import static info.wurzinger.segmenting.elements.segment.state.SegmentState.*; import info.wurzinger.segmenting.elements.Atom; import info.wurzinger.segmenting.elements.Pixel; import java.util.TreeSet; import info.wurzinger.segmenting.elements.segment.state.*; /*...
src/main/java/info/wurzinger/segmenting/elements/segment/Segment.java
0.776581
0.595904
Segment.java
starcoder
package org.opennars.inference; import org.opennars.entity.*; import org.opennars.language.Term; import org.opennars.storage.Memory; import static java.lang.Math.*; import org.opennars.main.Parameters; /** * Budget functions for resources allocation * * @author <NAME> * @author <NAME> */ public final class Budg...
src/main/java/org/opennars/inference/BudgetFunctions.java
0.828106
0.441372
BudgetFunctions.java
starcoder
package ru.finex.core.math; import jdk.incubator.vector.FloatVector; import jdk.incubator.vector.VectorMask; import jdk.incubator.vector.VectorOperators; import jdk.incubator.vector.VectorShuffle; import jdk.incubator.vector.VectorSpecies; import lombok.experimental.UtilityClass; /** * @author m0nster.mind */ @Util...
core/src/main/java/ru/finex/core/math/FloatVectorMath.java
0.772616
0.648637
FloatVectorMath.java
starcoder
package cellModel; public class CMEGFR extends CMMembraneProtein{ float k_off = .24f; //reverse rate of binding of ligand to receptor units /min float k_e = .15f; //internalization rate of bound receptor - units /min float k_t = .02f; //internalization rate of unbound receptor - units /min float k_D = 2.47f; //D...
src/cellModel/CMEGFR.java
0.511961
0.442998
CMEGFR.java
starcoder
package com.instana.sdk.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.util.Arrays; /** * <p> * This annotation enables you to declare that the return value of the method it mark...
instana-java-sdk/src/main/java/com/instana/sdk/annotation/TagReturn.java
0.895757
0.410461
TagReturn.java
starcoder
* @test * @bug 4326988 6990146 8231213 * @summary test SimpleDateFormat, check its pattern in the constructor * @run testng/othervm SimpleDateFormatPatternTest */ import java.lang.IllegalArgumentException; import java.text.DateFormat; import java.text.DateFormatSymbols; import java.text.SimpleDateFormat; import ja...
test/jdk/java/text/Format/DateFormat/SimpleDateFormatPatternTest.java
0.782496
0.441312
SimpleDateFormatPatternTest.java
starcoder
import java.util.*; /** * Design a Snake game that is played on a device with screen size = width x height. Play the game online if you are not familiar with the game. * * The snake is initially positioned at the top left corner (0,0) with length = 1 unit. * * You are given a list of food's positions in row-colum...
coding-problems/leetcode/SnakeGame.java
0.918393
0.584805
SnakeGame.java
starcoder
package com.istic.mini3d.lib; /** * Classe permetant de créer des objets de type paire * @param <A> type du premier élèment de la paire * @param <B> type du deuxième élèment de la paire * @author Mini3D * @version 1.0 */ public class Pair<A, B> { private A first; private B second; /** * Constru...
compilation/high/com/istic/mini3d/lib/Pair.java
0.757705
0.463262
Pair.java
starcoder
public class Main { public static void expectEquals(long expected, long result) { if (expected != result) { throw new Error("Expected: " + expected + ", found: " + result); } } public static void main(String[] args) { long l = $opt$ReturnLong(); expectEquals(42, l); System.out.println(...
test/403-optimizing-long/src/Main.java
0.816333
0.53959
Main.java
starcoder
package org.eigenbase.util; import java.util.*; /** * ArrayQueue is a queue implementation backed by an array. Grows by doubling * the existing size, but never shrinks. Queue entries are allowed to wrap * around array boundaries. ArrayQueue does not allow <code>null</code> entries. * * <p>Contains the necessary...
farrago/src/org/eigenbase/util/ArrayQueue.java
0.961043
0.42322
ArrayQueue.java
starcoder
package edu.berkeley.cs186.database.common; import java.nio.ByteOrder; /** * Wrapper around java.nio.ByteBuffer to implement our Buffer interface. * * Buffers are used to store and sequences of bytes, for example when we want * to serialize information into a byte sequence that can be stored on disk * and deseri...
proj5/src/main/java/edu/berkeley/cs186/database/common/ByteBuffer.java
0.920562
0.581719
ByteBuffer.java
starcoder
package com.google.fhir.common; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; import com.google.protobuf.Descriptors.Descriptor; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public final class D...
javatests/com/google/fhir/common/DescriptorMemosMapTest.java
0.910181
0.46217
DescriptorMemosMapTest.java
starcoder
package graph; public class Edge<T> implements Comparable<Edge<T>> { // -------------------------------------------------------------------------------- // Edge attributes private double weight; private T source; private T destination; // --------------------------------------------------------------...
FSM/src/graph/Edge.java
0.790692
0.523542
Edge.java
starcoder
package ru.ispras.fortress.esexpr; import ru.ispras.fortress.util.InvariantChecks; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; /** * The {@link EsExpr} class represents Lisp-like S-expressions using tuple notation. * EsExpr can be atom, i.e. string lite...
src/main/java/ru/ispras/fortress/esexpr/EsExpr.java
0.943027
0.409634
EsExpr.java
starcoder
package com.purplepip.odin.math; abstract class AbstractReal implements Real { /** * Minus a real number. * * @param real real number to minus * @return result of subtraction */ @Override public Real minus(Real real) { return Reals.valueOf(getValue() - real.getValue()); } /** * Multipl...
odin-core/src/main/java/com/purplepip/odin/math/AbstractReal.java
0.945551
0.44077
AbstractReal.java
starcoder
package com.bluegosling.redis.concurrent; import java.util.concurrent.Executor; import java.util.concurrent.ForkJoinPool; /** * A subject is used to create a stream of elements. Its API is the same as {@link Observer}, which * is how calling code provides data and notices into the produced stream. * * @author <N...
src/com/bluegosling/redis/concurrent/Subject.java
0.944241
0.445349
Subject.java
starcoder
package org.onebusaway.uk.network_rail.gtfs_realtime.graph; import java.awt.geom.Point2D; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import jav...
onebusaway-uk-network-rail-gtfs-realtime/src/main/java/org/onebusaway/uk/network_rail/gtfs_realtime/graph/RailwayGraph.java
0.846578
0.414129
RailwayGraph.java
starcoder
package moe.mewore.rabbit.backend.physics; import javax.vecmath.Vector2f; import javax.vecmath.Vector3f; import java.util.List; import java.util.function.Consumer; import com.bulletphysics.collision.broadphase.Dispatcher; import com.bulletphysics.collision.dispatch.CollisionWorld; import com.bulletphysics.collision.n...
backend/src/main/java/moe/mewore/rabbit/backend/physics/RigidBodyController.java
0.804137
0.510252
RigidBodyController.java
starcoder
package io.strimzi.api.kafka.model; /** * Encapsulates the naming scheme used for the resources which the Cluster Operator manages for a * {@code KafkaConnect} cluster. */ public class KafkaConnectResources { protected KafkaConnectResources() { } /** * Returns the name of the Kafka Connect {@code Depl...
api/src/main/java/io/strimzi/api/kafka/model/KafkaConnectResources.java
0.929128
0.54153
KafkaConnectResources.java
starcoder
package lejos.robotics.subsumption; /** * Arbitrator controls which Behavior object will become active in * a behavior control system. Make sure to call start() after the * Arbitrator is instantiated.<br> * This class has three major responsibilities: <br> * 1. Determine the highest priority behavior that re...
classes/src_shared/lejos/robotics/subsumption/Arbitrator.java
0.886776
0.417746
Arbitrator.java
starcoder
package Fireworks.src; import java.applet.Applet; import java.awt.Graphics; import java.util.Vector; import java.util.Random; public class FireworksSystem { Random ran = new Random(); // Init random Vector fireworks; // Data structure to hold particles Applet app; // Define Applet int numfireworks; //...
FireworksSystem.java
0.551332
0.434401
FireworksSystem.java
starcoder
package com.tukeping.tools; import org.junit.Test; import java.util.Arrays; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; /** * @author tukeping * @date 2020/2/11 **/ public class Integers { public static String toBinaryString(int n, int bitSize) { char[] buf = ne...
src/main/java/com/tukeping/tools/Integers.java
0.668772
0.41478
Integers.java
starcoder
package org.JMathStudio.SignalToolkit.TransformTools.FourierSet; import org.JMathStudio.DataStructure.Cell.Cell; import org.JMathStudio.DataStructure.Cell.CellMath; import org.JMathStudio.DataStructure.Cell.CellTools; import org.JMathStudio.DataStructure.Vector.Vector; import org.JMathStudio.DataStructure.Vector.Vecto...
org/JMathStudio/SignalToolkit/TransformTools/FourierSet/WHT1D.java
0.807461
0.585871
WHT1D.java
starcoder
package daily2019; import util.BTNode; import java.util.*; /* Given the root of a binary search tree, and a target K, return two nodes in the tree whose sum equals K. For example, given the following tree and K of 20 10 / \ 5 15 / \ 11 15 Return the nodes 5 and 15. @Google @binarytr...
src/daily2019/D20190206.java
0.721939
0.621369
D20190206.java
starcoder
package com.wirsching.graphics; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType; import com.badlogic.gdx.math.Matri...
core/src/com/wirsching/graphics/Graphics.java
0.77518
0.477311
Graphics.java
starcoder
package org.itas.util.collection; import java.util.AbstractCollection; import java.util.AbstractSet; import java.util.Collection; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Set; public class IntHashMap<T> { /** * The hash table data. */ private transient E...
common/src/main/java/org/itas/util/collection/IntHashMap.java
0.905303
0.419886
IntHashMap.java
starcoder
package SChemP; import static java.lang.Math.*; import java.math.BigInteger; /** * The Calculations class is a utility class with a collection * of static functions. * <p> * Most of the functions work in the same manner, which is * slightly counter-intuitive, but are simple to use. * <p> * In shor...
src/SChemP/Calculations.java
0.550849
0.408837
Calculations.java
starcoder
package javacardx.biometry1toN; /** * The {@code Bio1toNBuilder} class is a {@link BioMatcher} object factory. It * builds empty/blank biometric matchers. * * @since 3.0.5 */ public class Bio1toNBuilder { /** * Facial feature recognition (visage). */ public static final byte FACIAL_FEATURE...
src/javacardx/biometry1toN/Bio1toNBuilder.java
0.940298
0.460289
Bio1toNBuilder.java
starcoder
package scheduling.core.input; import org.apache.commons.math3.util.Pair; import java.util.*; /** * An item. */ public class Item implements Comparable<Item> { private String id; private ItemType type; private double materialCost; private ProductCategory productCategory; private double holding...
src/scheduling/core/input/Item.java
0.955587
0.510924
Item.java
starcoder
package de.viadee.xai.anchor.adapter.classifiers; import de.viadee.xai.anchor.adapter.tabular.TabularInstance; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import smile.classification.SoftClassifier; import java.util.function.Function; import java.util.stream.Stream; /** * May be used to quickly train a...
DefaultMLMethods/src/main/java/de/viadee/xai/anchor/adapter/classifiers/AbstractTabularSmileClassifier.java
0.660829
0.457743
AbstractTabularSmileClassifier.java
starcoder
package com.raytheon.uf.common.time.domain; import static com.raytheon.uf.common.serialization.SerializationUtil.transformFromThrift; import static com.raytheon.uf.common.serialization.SerializationUtil.transformToThrift; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; impo...
tests/unit/com/raytheon/uf/common/time/domain/DurationTest.java
0.889187
0.448849
DurationTest.java
starcoder
package services.helpers; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.collect.ImmutableList; import lombok.val; import org.junit.Before; import org.junit.Test; import play.libs.Json; import java.util.List; import static java.util...
test/services/helpers/OffenderSorterTest.java
0.802246
0.418875
OffenderSorterTest.java
starcoder
package com.bluegosling.collections.immutable; import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableMap; /** * Utility methods related to immutable collections. * * @author <NAME> (<EMAIL>) */ public final class Immutables { private Immutables() { } /** ...
src/com/bluegosling/collections/immutable/Immutables.java
0.937619
0.444444
Immutables.java
starcoder
package org.bhavaya.ui; import junit.framework.TestCase; import org.bhavaya.ui.table.DateSeries; import org.bhavaya.util.BhavayaPersistenceDelegate; import java.beans.*; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.Date; /** * A now...
test/org/bhavaya/ui/DateSeriesTest.java
0.743168
0.454109
DateSeriesTest.java
starcoder
package jsat.linear.vectorcollection.lsh; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.concurrent.ExecutorService; import jsat.linear.*; import jsat.linear.distancemetrics.CosineDistance; import jsat.linear.distancemetrics.CosineDistanceNormalize...
jsat/src/main/java/jsat/linear/vectorcollection/lsh/RandomProjectionLSH.java
0.916056
0.673688
RandomProjectionLSH.java
starcoder
package com.amyliascarlet.lib.datatable; import java.util.LinkedHashMap; import java.util.Map; public class DataRow { // 定义该行记录在table所处的行数 private int rowIndex = -1; private DataColumnCollection columns; // table的一个引用 private DataTable table; // 用于存储数据的Map对象,这里保存的对象不包括顺序信息,数据获取的索引通过行信息标识 ...
src/main/java/com/amyliascarlet/lib/datatable/DataRow.java
0.670608
0.456591
DataRow.java
starcoder
package fastmath.java; public final class Array { public static int inc(int[] a, int idx) { return ++a[idx]; } public static long inc(long[] a, int idx) { return ++a[idx]; } public static double inc(double[] a, int idx) { return ++a[idx]; } public static int dec(int[] a, int idx) { return --a[idx]; }...
src/fastmath/java/Array.java
0.582966
0.622689
Array.java
starcoder
package org.olap4j.metadata; import org.olap4j.OlapException; /** * An organized hierarchy of categories, known as levels, that describes data * in a cube. * * <p>A Dimension typically describes a similar set of members upon which the * user wants to base an analysis. * * <p>A Dimension must have at least one ...
src/org/olap4j/metadata/Dimension.java
0.895791
0.443962
Dimension.java
starcoder
package com.barrybecker4.game.twoplayer.go.board.analysis.group.eye.potential; /** * Figure out the "eye potential" contribution from a horizontal or vertical run within a string. * * @author <NAME> */ class Run { private int firstPos; private int endPos; private int max; private boolean boundedBy...
source/com/barrybecker4/game/twoplayer/go/board/analysis/group/eye/potential/Run.java
0.915148
0.47171
Run.java
starcoder
package fr.laas.fape.planning.core.planning.preprocessing; import fr.laas.fape.anml.model.AnmlProblem; import fr.laas.fape.anml.model.LActRef; import fr.laas.fape.anml.model.abs.AbstractAction; import fr.laas.fape.anml.model.abs.AbstractTask; import fr.laas.fape.anml.model.concrete.Action; import fr.laas.fape.anml.mod...
planning/src/main/java/fr/laas/fape/planning/core/planning/preprocessing/TaskDecompositionsReasoner.java
0.753739
0.419053
TaskDecompositionsReasoner.java
starcoder
package org.omg.dds.core.policy; import java.util.concurrent.TimeUnit; import org.omg.dds.core.Duration; /** * Filter that allows a {@link org.omg.dds.sub.DataReader} to specify that it is * interested only in (potentially) a subset of the values of the data. The * filter states that the DataReader does not want...
src/api/dcps/java5/common/java/code/org/omg/dds/core/policy/TimeBasedFilter.java
0.905617
0.67077
TimeBasedFilter.java
starcoder
package com.hui.HashMap; import java.util.Map; import java.util.TreeMap; /** * @author: shenhaizhilong * @date: 2018/11/26 22:13 * * * * 726. Number of Atoms * DescriptionHintsSubmissionsDiscussSolution * Given a chemical formula (given as a string), return the count of each atom. * * An atom...
src/main/java/com/hui/HashMap/NumberofAtoms.java
0.881322
0.519582
NumberofAtoms.java
starcoder
package com.spacegame.game.projectile; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.physics.box2d.Body; import com.spacegame.common.SolMath; import com.spacegame.game.SolGame; import com.spacegame.game.asteroid.AsteroidBuilder; import com.spacegame.game.ship.SolShip; public class BallProjectileBody i...
main/src/com/spacegame/game/projectile/BallProjectileBody.java
0.882694
0.460289
BallProjectileBody.java
starcoder
package gov.sandia.cognition.learning.performance.categorization; import gov.sandia.cognition.learning.data.TargetEstimatePair; import gov.sandia.cognition.math.MutableDouble; import gov.sandia.cognition.util.AbstractCloneableSerializable; import gov.sandia.cognition.util.Pair; import gov.sandia.cognition.util.Summari...
Components/LearningCore/Source/gov/sandia/cognition/learning/performance/categorization/DefaultConfusionMatrix.java
0.958479
0.536252
DefaultConfusionMatrix.java
starcoder
package com.paymybuddy.business.util; import com.google.common.collect.ImmutableMap; import com.paymybuddy.business.exception.PreconditionException; import java.util.Collection; import lombok.experimental.UtilityClass; @UtilityClass public class ValidationUtil { /** * Perform a {@link javax.validation.constr...
business/src/main/java/com/paymybuddy/business/util/ValidationUtil.java
0.924018
0.405449
ValidationUtil.java
starcoder
package q1100; import java.util.HashMap; import java.util.Map; import java.util.PriorityQueue; import org.junit.runner.RunWith; import util.runner.Answer; import util.runner.LeetCodeRunner; import util.runner.TestData; import util.runner.data.DataExpectation; /** * [Medium] 1090. Largest Values From Labels * https:...
src/main/java/q1100/Q1090_LargestValuesFromLabels.java
0.859958
0.60507
Q1090_LargestValuesFromLabels.java
starcoder
package org.geysermc.geyser.session.cache; import com.github.steveice10.mc.auth.data.GameProfile; import com.nukkitx.math.vector.Vector3i; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import lombok.Data; import lombok.Getter; import lombok.RequiredArgsConstructor; import org.geysermc.geyser.entity.ty...
core/src/main/java/org/geysermc/geyser/session/cache/SkullCache.java
0.830009
0.44897
SkullCache.java
starcoder
package gw.xml.simple; import gw.test.TestClass; import java.util.*; /** * Created by IntelliJ IDEA. * User: akeefer * Date: Jun 18, 2010 * Time: 7:43:33 AM * To change this template use File | Settings | File Templates. */ public class XmlChildListTest extends TestClass { private SimpleXmlNode _parent; p...
gosu-test/src/main/java/gw/xml/simple/XmlChildListTest.java
0.718594
0.424233
XmlChildListTest.java
starcoder
package com.games.andronoid; import android.graphics.*; import android.graphics.drawable.BitmapDrawable; public class Ball extends Graphic { private float mVX; private float mVY; private long mLastT; private float mLastDeltaT; public Ball(BitmapDrawable oBall, float metersToPixelsX, float metersToPixelsY, Strin...
src/com/games/andronoid/Ball.java
0.560854
0.485234
Ball.java
starcoder
package pt.up.fc.dcc.asura.models; import pt.up.fc.dcc.asura.AsteroidsState; import pt.up.fc.dcc.asura.builder.base.movie.GameMovieBuilder; import pt.up.fc.dcc.asura.models.effects.BombExplosionEffect; import pt.up.fc.dcc.asura.models.effects.EffectActor; import pt.up.fc.dcc.asura.utils.Vector; public class Bomb exte...
asteroids/src/main/java/pt/up/fc/dcc/asura/models/Bomb.java
0.875388
0.427337
Bomb.java
starcoder
package practicePackage.builtInLists.attempts; import java.util.*; import ServiceClasses.MathService; import ServiceClasses.Rectangle; @SuppressWarnings("unused") public class Stage3 { /** * * @param list * @return a list containing all the positive items from the list passed. * return null if list is null ...
comp1010_s2_2021_source_codes_for_students_v1/comp1010_s2_2021_source_codes_for_students_v1/src/practicePackage/builtInLists/attempts/Stage3.java
0.837653
0.450299
Stage3.java
starcoder
package com.github.h4ste.scribe; import java.io.Serializable; import java.util.AbstractSet; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util...
scribe-impl-standard/src/main/java/com/github/h4ste/scribe/RangeMap.java
0.922001
0.525856
RangeMap.java
starcoder
package ca.mcgill.ecse211.lab3; import static ca.mcgill.ecse211.lab3.Resources.*; import static java.lang.Math.*; import lejos.hardware.Sound; import lejos.hardware.motor.EV3LargeRegulatedMotor; import lejos.hardware.motor.EV3MediumRegulatedMotor; import lejos.robotics.SampleProvider; public class ObstacleAvoidan...
34/src/ca/mcgill/ecse211/lab3/ObstacleAvoidance.java
0.50415
0.407451
ObstacleAvoidance.java
starcoder
package com.codereligion.flux; import com.google.common.base.Preconditions; import com.google.common.reflect.TypeParameter; import com.google.common.reflect.TypeToken; import java.util.Collection; import java.util.List; import java.util.Map; public final class Tokens { public static final class Wildcard { ...
src/main/java/com/codereligion/flux/Tokens.java
0.823967
0.433921
Tokens.java
starcoder
package com.devsmart.ubjson; import java.io.Serializable; import java.util.Comparator; public abstract class UBValue implements Comparable<UBValue>, Serializable { public static final byte MARKER_NULL = 'Z'; public static final byte MARKER_TRUE = 'T'; public static final byte MARKER_FALSE = 'F'; publ...
ubjson/src/main/java/com/devsmart/ubjson/UBValue.java
0.802903
0.46642
UBValue.java
starcoder
package com.google.common.collect; import com.google.common.annotations.Beta; import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Preconditions; import java.util.Collections; import java.util.Map; import java.util.Map.Entry; import java.util.NavigableMap; import java.util.NoSuchElementE...
coeey/com/google/common/collect/TreeRangeMap.java
0.922264
0.444806
TreeRangeMap.java
starcoder
package uk.dangrew.jupa.json.structure; import java.util.Collection; import org.json.JSONArray; import org.json.JSONObject; /** * The {@link JsonStructureCompatibility} provides a mechanism for verifying that a given * {@link JSONObject} matches the {@link JsonStructureTree} associated. Extra keys are permitted *...
JsonUpgradingPersistenceArchitecture/src/uk/dangrew/jupa/json/structure/JsonStructureCompatibility.java
0.926337
0.517022
JsonStructureCompatibility.java
starcoder
package lesson3; import kotlin.NotImplementedError; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; // Attention: comparable supported but comparator is not @SuppressWarnings("WeakerAccess") public class BinaryTree<T extends Comparable<T>> extends AbstractSet<...
src/lesson3/BinaryTree.java
0.836488
0.481637
BinaryTree.java
starcoder
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Timer; /** * A fault tolerant executive and adjudicator that can use multiple {@link Variant} objects to perform a computation * and obtain the results. * * The failure may be because of an unhandled exception within the e...
src/RecoveryBlocksExecutor.java
0.886045
0.488527
RecoveryBlocksExecutor.java
starcoder
package frc.robot.robot_utils.motor; import com.revrobotics.CANSparkMax; import com.revrobotics.RelativeEncoder; import edu.wpi.first.wpilibj.Timer; import edu.wpi.first.wpilibj2.command.CommandBase; import edu.wpi.first.wpilibj2.command.SubsystemBase; import me.wobblyyyy.pathfinder2.robot.components.AbstractMo...
src/main/java/frc/robot/robot_utils/motor/ProtectedAbstractMotor.java
0.879328
0.416856
ProtectedAbstractMotor.java
starcoder
package io.improbable.keanu.vertices.bool; import com.google.common.collect.ImmutableList; import io.improbable.keanu.kotlin.BooleanOperators; import io.improbable.keanu.network.NetworkLoader; import io.improbable.keanu.network.NetworkSaver; import io.improbable.keanu.tensor.Tensor; import io.improbable.keanu.tensor.b...
keanu-project/src/main/java/io/improbable/keanu/vertices/bool/BoolVertex.java
0.869465
0.566858
BoolVertex.java
starcoder
package image; /** General utilities for hw2.image.Rescaler. * @author <NAME> */ public class Utils { /** Returns the image with the given FILENAME as an energy matrix. */ public static double[][] toEnergyMatrix(String filename) { Picture inputImg = new Picture(filename); Rescaler ir = new R...
hw2/image/Utils.java
0.792745
0.465752
Utils.java
starcoder
package dialight.extensions; import dialight.compatibility.WorldBc; import org.bukkit.Location; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.util.Vector; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collecti...
bukkit/libs/misc/src/main/java/dialight/extensions/LocationEx.java
0.695545
0.455865
LocationEx.java
starcoder
package org.simmetrics.example; import static org.simmetrics.builders.StringMetricBuilder.with; import java.util.Set; import java.util.function.Function; import java.util.function.Predicate; import org.simmetrics.StringMetric; import org.simmetrics.metrics.CosineSimilarity; import org.simmetrics.metrics.Levenshtein;...
simmetrics-example/src/main/java/org/simmetrics/example/StringMetricBuilderExample.java
0.912655
0.458591
StringMetricBuilderExample.java
starcoder