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 vib.edge; import java.util.Vector; public class SphereIterators { final static double EPSILON=1e-15; /* * This method returns a sampling of a sphere along a spiral. * The spiral is defined by * * / sin(t*PI/N)cos(2*PI*t) \ * f(t) = ( sin(t*PI/N)sin(2*PI*t) ), 0 <= t <= N * ...
src-plugins/VIB-lib/src/main/java/vib/edge/SphereIterators.java
0.525369
0.663321
SphereIterators.java
starcoder
package dev.jorel.commandapi.arguments; import dev.jorel.commandapi.IStringTooltip; import dev.jorel.commandapi.SuggestionInfo; import dev.jorel.commandapi.Tooltip; import java.util.concurrent.CompletableFuture; import java.util.function.Function; /** * This class represents safe suggestions. These are parameterize...
CommandAPI/commandapi-core/src/main/java/dev/jorel/commandapi/arguments/SafeSuggestions.java
0.83363
0.661103
SafeSuggestions.java
starcoder
package dfs; public class Leetcode980UniquePathsIII { /* Leetcode 980. Unique Paths III you are given an m x n integer array grid where grid[i][j] could be: 1 representing the starting square. There is exactly one starting square. 2 representing the ending square. There is exactly one ending square. ...
arrows/src/main/java/dfs/Leetcode980UniquePathsIII.java
0.677047
0.774199
Leetcode980UniquePathsIII.java
starcoder
package goldilocks.domain.staff.rosterweekview; import java.io.Serializable; import java.time.DayOfWeek; import java.time.Duration; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; import com.fasterxml.jackson.annotation.JsonIgnore; import goldilocks.domain.staff.Sta...
mvn/goldilocks-domain/src/main/java/goldilocks/domain/staff/rosterweekview/StaffRosterWeek.java
0.852168
0.416678
StaffRosterWeek.java
starcoder
package math.matrix; import collection.TList; import java.util.Optional; import math.C2; import static org.testng.Assert.*; import org.testng.annotations.Test; /** * * @author masao */ public class HouseholderNGTest { public HouseholderNGTest() { } @Test public void testQSym...
test/math/matrix/HouseholderNGTest.java
0.673836
0.490114
HouseholderNGTest.java
starcoder
package graphTheory.utils; /** * This class associates, as a couple, a double and a boolean. * * This couple extends the {@link Comparable2} abstract class, as any two * couples can be compared. The doubles are firstly compared. If equals, the * booleans are compared. True is bigger than False. * * (Positive_...
graphTheory/utils/DoubleBooleanInteger.java
0.902545
0.412471
DoubleBooleanInteger.java
starcoder
package org.restlet.representation; import java.io.ByteArrayInputStream; /** * Representation wrapping a byte array. * * @author <NAME> */ public class ByteArrayRepresentation extends InputRepresentation { /** * Constructor. * * @param byteArray * The byte array to wrap. ...
org.restlet/src/main/java/org/restlet/representation/ByteArrayRepresentation.java
0.906148
0.419826
ByteArrayRepresentation.java
starcoder
*/ package org.jmock.expectation; import java.util.Vector; import org.jmock.core.Verifiable; /** * <p>This class allows a list of objects to be setup which can be used whilst.The * list is check to make sure that all the object in it are used and that none * are left over at the end of a test.</p> * <p/> * <p>...
core/src/org/jmock/expectation/ReturnObjectList.java
0.889481
0.46794
ReturnObjectList.java
starcoder
package com.opengamma.financial.analytics.model.future; import java.util.Collections; import java.util.Set; import com.opengamma.engine.ComputationTarget; import com.opengamma.engine.ComputationTargetType; import com.opengamma.engine.function.FunctionCompilationContext; import com.opengamma.engine.value.ValueProperty...
projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/future/InterestRateFutureDefaultValuesFunctionDeprecated.java
0.857112
0.456531
InterestRateFutureDefaultValuesFunctionDeprecated.java
starcoder
package org.lcsim.event; import java.util.List; /** * The LCIO cluster interface. */ public interface Cluster { /** Flagword that defines the type of cluster. Bits 0-15 can be used to denote the subdetectors * that have contributed hits to the cluster. The definition of the bits has to be done * e...
event-model/src/main/java/org/lcsim/event/Cluster.java
0.791257
0.448909
Cluster.java
starcoder
package org.jvnet.ogc.gml.v_3_2_1.jts.gml2jts; import java.util.ArrayList; import java.util.List; import net.opengis.gml.v_3_2_1.MultiSurfacePropertyType; import net.opengis.gml.v_3_2_1.MultiSurfaceType; import net.opengis.gml.v_3_2_1.SurfacePropertyType; import net.opengis.gml.v_3_2_1.PolygonType; import org.jvnet....
src/main/java/org/jvnet/ogc/gml/v_3_2_1/jts/gml2jts/GML321ToJTSMultiPolygonConverter.java
0.671147
0.413832
GML321ToJTSMultiPolygonConverter.java
starcoder
package leetcode1; import java.util.*; public class ThreeSum { public static void main(String[] args) { new ThreeSum().new Solution().threeSum(new int[]{-1, 0, 1, 2, -1, -4}); } /** * 简单解法「hash法」,内含很多冗余结果,故用 Set 去重 * 双指针法,外层循环 + 内层夹逼:O(n^2) */ class Solution { public...
bitkylin-algorithm/section-1/leetcode1/ThreeSum.java
0.540924
0.405154
ThreeSum.java
starcoder
package org.janelia.saalfeldlab.ngff.axes; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import java.util.stream.Collectors; import java.util.stream.IntStream; ...
src/main/java/org/janelia/saalfeldlab/ngff/axes/AxisUtils.java
0.809201
0.435061
AxisUtils.java
starcoder
package org.orekit.propagation.integration; import org.hipparchus.analysis.differentiation.Gradient; import org.hipparchus.geometry.euclidean.threed.FieldRotation; import org.hipparchus.geometry.euclidean.threed.FieldVector3D; public class PythonAbstractGradientConverter extends AbstractGradientConverter { /** ...
src/main/java/org/orekit/propagation/integration/PythonAbstractGradientConverter.java
0.87699
0.407982
PythonAbstractGradientConverter.java
starcoder
package toxi.audio; import toxi.math.MathUtils; import toxi.math.SinCosLUT; /** * This class provides a simple IIR filter implementation with one of lowpass, * highpass or bandpass characteristics. The class can filter individual samples * or entire signal buffers. The filter function always has this form: * * ...
libraries/toxiclibs/src/toxi/audio/IIRFilter.java
0.921601
0.45944
IIRFilter.java
starcoder
package ee.ristoseene.vecmath.immutable; import ee.ristoseene.vecmath.Value; import ee.ristoseene.vecmath.Vector2; import ee.ristoseene.vecmath.Vector3; import ee.ristoseene.vecmath.Vector4; public class ImmutableVector4 implements Vector4.Accessible { private final double x; private final double y; priv...
src/main/java/ee/ristoseene/vecmath/immutable/ImmutableVector4.java
0.897715
0.775732
ImmutableVector4.java
starcoder
package gov.sandia.cognition.learning.data.feature; import gov.sandia.cognition.annotation.PublicationReference; import gov.sandia.cognition.annotation.PublicationType; import gov.sandia.cognition.learning.algorithm.BatchLearner; import gov.sandia.cognition.learning.data.DatasetUtil; import gov.sandia.cognition.learni...
Components/LearningCore/Source/gov/sandia/cognition/learning/data/feature/RandomSubspace.java
0.921118
0.602705
RandomSubspace.java
starcoder
package algorithms.dynamicprogramming; /** * There are n stairs, a person standing at the bottom wants to reach the top. The person can climb * either 1 stair or 2 stairs at a time. * On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). * <p> * Once you pay the cost, you can eith...
src/main/java/algorithms/dynamicprogramming/ClimbingStairs.java
0.890681
0.610337
ClimbingStairs.java
starcoder
package qub; public class BuildJSON extends JSONObjectWrapperBase { private static final String projectJsonPropertyName = "project.json"; private static final String javacVersionPropertyName = "javacVersion"; private static final String sourceFilesPropertyName = "sourceFiles"; private BuildJSON(JSONOb...
sources/qub/BuildJSON.java
0.802052
0.448426
BuildJSON.java
starcoder
package com.hacker.rank.algorithms.medium; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /** * Class that is executed in hacker rank website as solution. * * @...
src/main/java/com/hacker/rank/algorithms/medium/CellGrid.java
0.900326
0.488954
CellGrid.java
starcoder
package msolver; import org.apache.commons.math3.analysis.solvers.LaguerreSolver; import org.apache.commons.math3.complex.Complex; import org.apache.commons.math3.linear.*; import java.util.Arrays; // http://www.sciencedirect.com/science/article/pii/S0895717705004863#fd16 public class BoundSolver { private doubl...
javamsketch/msolver/src/main/java/msolver/BoundSolver.java
0.73029
0.480418
BoundSolver.java
starcoder
package cascading.nested.core; import cascading.flow.FlowProcess; import cascading.operation.Function; import cascading.operation.FunctionCall; import cascading.operation.OperationException; import cascading.tuple.Fields; import cascading.tuple.Tuple; import heretical.pointer.path.NestedPointer; import heretical.point...
cascading-nested/src/main/java/cascading/nested/core/NestedGetAllFunction.java
0.886997
0.407923
NestedGetAllFunction.java
starcoder
import java.util.TreeSet; import java.util.HashMap; public class containsDuplicateIII { // Bucket method // Time: O(n), Space: O(k); // As a follow-up question, it naturally also requires maintaining a window of size k. When t == 0, // it reduces to the previous question so we just reuse the solution. // Since...
Leetcode/220_containsDuplicateIII.java
0.653901
0.57827
220_containsDuplicateIII.java
starcoder
package com.avail.optimizer; import com.avail.interpreter.levelTwo.L2Instruction; import com.avail.interpreter.levelTwo.operand.L2PcOperand; import com.avail.interpreter.levelTwo.operation.L2_JUMP; import com.avail.interpreter.levelTwo.operation.L2_PHI_PSEUDO_OPERATION; import java.util.ArrayList; import java.util.It...
src/main/java/com/avail/optimizer/L2BasicBlock.java
0.893059
0.455078
L2BasicBlock.java
starcoder
*/ package bvr; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Opaque Variation Point</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * <p>An OpaqueVariationPoint is an executable, domain-specific variation point whose semantics is not defined by BVR. It is the res...
no.sintef.autorealspl.converter.parent/no.sintef.bvr.model/src/bvr/OpaqueVariationPoint.java
0.813238
0.406744
OpaqueVariationPoint.java
starcoder
package ar.edu.itba.cep.evaluations_service.repositories; import ar.edu.itba.cep.evaluations_service.models.Exam; import ar.edu.itba.cep.evaluations_service.models.ExamSolutionSubmission; import com.bellotapps.webapps_commons.persistence.repository_utils.paging_and_sorting.Page; import com.bellotapps.webapps_commons.p...
evaluations-service-core/evaluations-service-ports/evaluations-service-repositories/src/main/java/ar/edu/itba/cep/evaluations_service/repositories/ExamSolutionSubmissionRepository.java
0.889475
0.408218
ExamSolutionSubmissionRepository.java
starcoder
package de.delbrueg.math; import de.delbrueg.exceptions.PointsCollinearException; import java.util.LinkedList; import java.util.List; import javax.vecmath.Point2d; import java.awt.geom.Point2D; import java.util.Collection; import javax.vecmath.Vector2d; /** * A PseudoLine represents a Line, but does not have to be e...
vtorcs-RL-color/scr-client-java/mr_racer/src/de/delbrueg/math/PseudoLine.java
0.799051
0.441553
PseudoLine.java
starcoder
package fr.upem.library; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; import java.util.ArrayList; public class Book { private final String isbn; private final String title; private final String author; private final LocalDate introductionD...
WS/server/src/fr/upem/library/Book.java
0.873404
0.439567
Book.java
starcoder
package io.github.macfja.obd2.response; /** * <p>This class is the response of a {@link io.github.macfja.obd2.command.livedata.StatusSinceStart} command * or a {@link io.github.macfja.obd2.command.livedata.StatusSinceLastClean} command.</p> * * @author MacFJA */ public class MILResponse extends BinaryResponse { ...
src/main/java/io/github/macfja/obd2/response/MILResponse.java
0.845241
0.522629
MILResponse.java
starcoder
package com.yilian.mylibrary; import java.math.BigDecimal; /** * Created by on 2017/8/12 0012. */ public class ArithUtil { /** * 默认精度 */ private static final int DEFAULT_DIV_SCALE = 32; private ArithUtil() {} /** * 加法运算(浮点型) * @param v1 * @param v2 * @return 两个参数的和...
mylibrary/src/main/java/com/yilian/mylibrary/ArithUtil.java
0.803251
0.476458
ArithUtil.java
starcoder
package com.sloth.functions.widget.particle.bloom; import android.graphics.RectF; /** * Author: Oscar * Version V1.0 * Date: 2020/8/27 * Description:粒子爆炸 * Modification History: * Date Author Version Description * -----------------------------------------------------------...
pins-platform/platform/src/functions/java/com/sloth/functions/widget/particle/bloom/BloomParticle.java
0.875202
0.409221
BloomParticle.java
starcoder
package vncviewer; import java.util.Hashtable; import java.util.Vector; class CapsContainer { protected Hashtable infoMap; protected Vector orderedList; public CapsContainer() { this.infoMap = new Hashtable(64, 0.25F); this.orderedList = new Vector(32, 8); } public void add(CapabilityInfo paramC...
src/vncviewer/CapsContainer.java
0.692226
0.441011
CapsContainer.java
starcoder
package com.josedab.interviewbit.arrays; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Given a matrix of m * n elements (m rows, n columns), return all elements of the matrix in spiral order. Example: Given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] ...
src/main/java/com/josedab/interviewbit/arrays/SpiralOrderMatrixI.java
0.911288
0.605595
SpiralOrderMatrixI.java
starcoder
package se.sics.veloxj; import java.io.ByteArrayOutputStream; import java.io.IOException; public class VeloxBitStream { private ByteArrayOutputStream outputStream; private int byteValue; private int bitsFree; private int highestSetBit(int value) { for (int i = 31; i >= 0; i--) { if (((value >> ...
languages/veloxj/src/main/java/se/sics/veloxj/VeloxBitStream.java
0.654564
0.439266
VeloxBitStream.java
starcoder
package game2048; import org.junit.Test; import static org.junit.Assert.*; /** Tests the tilt() method in the up (Side.NORTH) direction only. * * @author <NAME> */ public class TestUpOnly extends TestUtils { @Test /** Move tiles up (no merging). */ public void testUpNoMerge() { int[][] befor...
proj0/game2048/TestUpOnly.java
0.696991
0.457016
TestUpOnly.java
starcoder
package java.nio; import def.jsbn.BigInteger; public class ByteBuffer { private byte[] bytes; private int cursor; private boolean bigEndian = true; // private static byte long7(long x) { return (byte)(x >> 56); } // private static byte long6(long x) { return (byte)(x >> 48); } // private stat...
src/main/java/java/nio/ByteBuffer.java
0.733547
0.582966
ByteBuffer.java
starcoder
package com.bryanww.cycle.model; /** * Basic encapsulation of two {@link Vertex}es that form an edge in a graph. * The edge can also be interpretted as a line segment in the Cartesian plane, * and methods are provided accordingly. * * @author <NAME> * @since 2014-10-25 * @version 2014-10-25 */ public class...
src/com/bryanww/cycle/model/Edge.java
0.935678
0.800107
Edge.java
starcoder
package math.floatV; import java.util.Random; import IK.floatIK.G; import math.RandomXS128; /** Utility and fast math functions. * <p> * Thanks to Riven on JavaGaming.org for the basis of sin/cos/floor/ceil. * @author <NAME> */ public final class MathUtils { static public final double nanoToSec = 1 /...
src/math/floatV/MathUtils.java
0.656768
0.418162
MathUtils.java
starcoder
package org.opengts.util; import java.lang.*; import java.util.*; import java.math.*; /** *** Accerometer XYZ-axis container. **/ public class Accelerometer { // ------------------------------------------------------------------------ private double xAxis = 0.0; private double yAxis = 0.0; pr...
src/org/opengts/util/Accelerometer.java
0.702428
0.441914
Accelerometer.java
starcoder
package medicalimageviewer.models; import java.awt.Color; import java.awt.image.BufferedImage; import java.util.List; /** * This class provides the reconstruction functionality stated by * the requirement. The reconstruction functionality makes a new image by * obtaining the pixels from the x,y,z points o...
models/Reconstruction.java
0.851521
0.420243
Reconstruction.java
starcoder
package practices.questions.medium; import java.util.ArrayList; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.PriorityQueue; import javax.inject.Inject; import javax.inject.Singleton; import org.jetbrains.annotations.NotNull; import org.jetbrains.a...
src/main/java/practices/questions/medium/TopKFrequentWords.java
0.895814
0.52342
TopKFrequentWords.java
starcoder
package net.sf.f8api; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.EnumMap; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; public final class FacebookSignatureUtil { private FacebookSignatureUtil() { ...
core/src/main/java/net/sf/f8api/FacebookSignatureUtil.java
0.826572
0.46035
FacebookSignatureUtil.java
starcoder
package ttt.utils.graph.dijkstra; import java.util.*; /** * Classe per la ricerca del percorso migliore dato il nodo di partenza. * (Minimum Spanning Tree) * <br>La distanza tra i nodi deve essere di tipo numerico.<br> * @param <G> Tipo di contenuto dei nodi. */ public class DijkstraAlgoritm <G extends DijkstraC...
src/ttt/utils/graph/dijkstra/DijkstraAlgoritm.java
0.845081
0.510558
DijkstraAlgoritm.java
starcoder
package org.openimaj.math.matrix; import ch.akuhn.matrix.KuhnMatrix; import ch.akuhn.matrix.Vector; /** * A diagonal specialization of Adrian Kuhn's {@link KuhnMatrix}. * <p> * @author <NAME> (<EMAIL>) */ public class DiagonalMatrix extends KuhnMatrix { private final double[] vals; /** * New empty ...
src/main/java/org/openimaj/math/matrix/DiagonalMatrix.java
0.950273
0.515132
DiagonalMatrix.java
starcoder
package com.google.jepsenonspanner.verifier.knossos; import com.google.common.annotations.VisibleForTesting; import com.google.jepsenonspanner.client.Record; import com.google.jepsenonspanner.operation.OpRepresentation; import us.bpsm.edn.Keyword; import java.util.ArrayList; import java.util.Collections; import java....
src/main/java/com/google/jepsenonspanner/verifier/knossos/Node.java
0.836521
0.402304
Node.java
starcoder
package com.metroveu.metroveu; import android.support.test.espresso.assertion.ViewAssertions; import android.support.test.rule.ActivityTestRule; import android.support.test.runner.AndroidJUnit4; import com.metroveu.metroveu.activities.MainActivity; import org.junit.Rule; import org.junit.Test; import org.junit.runne...
src/androidTest/java/com/metroveu/metroveu/MainActivityTest.java
0.541894
0.541166
MainActivityTest.java
starcoder
package Accounting; /** * Loan class used as base for all other Loan types. * * @author <NAME> * @version 2018-03-19 */ public class Loan { /** * Storage of the loan amount */ double loanWanted; /** * Storage of the yearly loan rate */ double yearlyPercent; /** * St...
src/Accounting/Loan.java
0.859177
0.600803
Loan.java
starcoder
package model; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.Stack; import javafx.collections.ObservableList; import javafx.scene.Node; import javafx.scene.canvas.Canvas; import javafx.scene.layout.Pane; import javafx.scene.shape.Ellipse; import j...
src/model/OperationHistory.java
0.916773
0.423577
OperationHistory.java
starcoder
package example.com.pkmnavidemo4.classes; import org.junit.Test; import example.com.pkmnavidemo4.R; import static org.junit.Assert.*; public class ElfSourceControllerTest { @Test public void getAttack() { //对战伤害测试 assertEquals(30, ElfSourceController.getAttack(1,1)); assertEquals(0, ...
code/map_running/app/src/androidTest/java/example/com/pkmnavidemo4/classes/ElfSourceControllerTest.java
0.732496
0.490236
ElfSourceControllerTest.java
starcoder
class NumArray { int[] tree; int n; private void buildTree(int[] nums, int treeIndex, int lo, int hi) { if (lo == hi) { tree[treeIndex] = nums[lo]; return; } int mid = lo + (hi - lo) / 2; buildTree(nums, 2 * treeIndex + 1, lo, mid); ...
problems/leetcode/range-sum-query-mutable.java
0.619471
0.526769
range-sum-query-mutable.java
starcoder
package code.vipul.aoc2018; import code.vipul.aoc2019.Grid; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.TreeMap; /** * https://adventofcode.com/2018/day/13 */ public class Solve13 { private static final Map<Character, Direction> CART_CHARS; ...
src/code/vipul/aoc2018/Solve13.java
0.881168
0.414484
Solve13.java
starcoder
package seedu.weme.model.statistics; import static seedu.weme.commons.util.CollectionUtil.requireAllNonNull; import java.util.Map; import java.util.logging.Logger; import javafx.beans.property.SimpleIntegerProperty; import javafx.collections.ObservableMap; import seedu.weme.commons.core.LogsCenter; import seedu.weme...
src/main/java/seedu/weme/model/statistics/LikeManager.java
0.88457
0.403126
LikeManager.java
starcoder
package io.github.softwarecats.craps; /** * {@link Game} is a preliminary design for the game of Craps. This initial design contains the interface used by * the {@link io.github.softwarecats.craps.event.Throw} class hierarchy to implement game state changes. */ public class Game { /** * The current point....
src/main/java/io/github/softwarecats/craps/Game.java
0.910672
0.703333
Game.java
starcoder
package com.example.android.messagingservice; public final class R { public static final class attr { /** * <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", * "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or * "<code>#<i>aarrggbb</i></code>". */ public sta...
Application/build/generated/source/r/debug/com/example/android/messagingservice/R.java
0.832169
0.51129
R.java
starcoder
package qcri.dafna.dataModel.data; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import qcri.dafna.dataModel.dataFormatter.DataTypeMatcher.ValueType; public class ValueBucket { private int id; private List<SourceClaim> claims; private ValueType valueType; //...
source/java-code/qcri/dafna/dataModel/data/ValueBucket.java
0.695441
0.427098
ValueBucket.java
starcoder
package org.apache.commons.math.distribution; import java.io.Serializable; import org.apache.commons.math.exception.NotStrictlyPositiveException; import org.apache.commons.math.exception.util.LocalizedFormats; import org.apache.commons.math.special.Gamma; import org.apache.commons.math.util.FastMath; /** * Implemen...
src/main/java/org/apache/commons/math/distribution/GammaDistribution.java
0.932707
0.454533
GammaDistribution.java
starcoder
public class ToBeImplemented { /** * Checks if two circles defined by center point coordinates and common radius intersect * * @param x1 x-value of center point of first circle * @param y1 y-value of center point of first circle * @param x2 x-value of center point of second circle * ...
U7/src/ToBeImplemented.java
0.95979
0.931525
ToBeImplemented.java
starcoder
* Defines all the Selectors which can be assigned to a ResourcePool in the ResourceManagement configuration. A * selector helps to evaluate that given a query and it's metadata if that query can be admitted inside associated * ResourcePool or not. Selectors are associated with both intermediate and leaf level Resour...
exec/java-exec/src/main/java/org/apache/drill/exec/resourcemgr/config/selectors/package-info.java
0.876753
0.647074
package-info.java
starcoder
package util; import android.net.Uri; import org.fest.assertions.api.AbstractAssert; import org.fest.assertions.api.Assertions; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; public ...
android-sdk/src/androidTest/java/util/URLAssertion.java
0.643217
0.424949
URLAssertion.java
starcoder
package jdk.internal.module; import java.io.IOException; import java.io.UncheckedIOException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.nio.file.Path; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Collections; import java.util.Ha...
jdk/internal/module/ModuleHashes.java
0.923859
0.413181
ModuleHashes.java
starcoder
package zutil.converter; public class WGS84Converter { public static void main(String[] args) { System.out.println(toWGS84Decimal("N 59� 47' 43\"") + " " +toWGS84Decimal(" E 17� 42' 55\"")); System.out.println(toWGS84Decimal("55� 0' 0\"") + " " +toWGS84Decimal("68� 59' 59,999\"")); System.o...
src/zutil/converter/WGS84Converter.java
0.799442
0.411229
WGS84Converter.java
starcoder
package com.linkedin.dagli.math.vector; import java.util.Iterator; /** * {@link VectorElementIterator}s are an {@link Iterator} over {@link VectorElement}s, but also add methods for * processing vector elements efficiently, without instantiating {@link VectorElement} objects. */ public interface VectorElementIter...
math-vector/src/main/java/com/linkedin/dagli/math/vector/VectorElementIterator.java
0.939755
0.557966
VectorElementIterator.java
starcoder
package fr.ritaly.dungeonmaster; import org.apache.commons.lang.Validate; /** * A transform turning a direction into another. * * @author <a href="mailto:<EMAIL>"><NAME></a> */ public enum DirectionTransform { /** * The identify transform turns a direction into itself. */ IDENTITY, /** * Transform to tu...
src/main/java/fr/ritaly/dungeonmaster/DirectionTransform.java
0.862265
0.500366
DirectionTransform.java
starcoder
package net.cabezudo.json.values; import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; import java.util.Calendar; import java.util.Iterator; import java.util.List; import net.cabezudo.json.JSON; import net.cabezudo.json.JSONElement; import net.cabezudo.json.Position; import net.cabezud...
src/main/java/net/cabezudo/json/values/JSONArray.java
0.9462
0.490175
JSONArray.java
starcoder
package backend.turtle; /** * @author <NAME> */ public class Turtle { public static final double STARTING_ANGLE = Math.PI / 2; public static final double ONE_REVOLUTION_DEGREES = 360; private double xCoord; private double yCoord; private double angle; private boolean penUp; private boolean showing; publi...
src/backend/turtle/Turtle.java
0.64791
0.549218
Turtle.java
starcoder
package org.anchoranalysis.spatial.orientation; import org.anchoranalysis.core.exception.friendly.AnchorFriendlyRuntimeException; import org.anchoranalysis.core.exception.friendly.AnchorImpossibleSituationException; import org.anchoranalysis.spatial.axis.Axis; import org.anchoranalysis.spatial.point.Point3d; import or...
anchor-spatial/src/main/java/org/anchoranalysis/spatial/orientation/DirectionVector.java
0.963455
0.734239
DirectionVector.java
starcoder
package com.iabtcf.v2.decoder; import com.iabtcf.v2.Field; import java.time.Instant; import java.util.BitSet; /** * @author SleimanJneidi * @author evanwht1 */ class BitVector { private final byte[] data; private int position = 0; private BitVector(byte[] bytes) { this.data = bytes; } ...
decoder/src/main/java/com/iabtcf/v2/decoder/BitVector.java
0.883135
0.438364
BitVector.java
starcoder
package org.gavrog.joss.dsyms.basic; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.gavrog.joss.dsyms.basic.DSymbol; import org.gavrog.joss.dsyms.basic.DelaneySymbol; import org.gavrog.joss.dsyms.basic.DSMorphism; import org.gav...
test/org/gavrog/joss/dsyms/basic/TestMorphism.java
0.750187
0.406862
TestMorphism.java
starcoder
package java.util.regex; import gnu.java.util.regex.CharIndexed; import gnu.java.util.regex.RE; import gnu.java.util.regex.REMatch; /** * Instance of a regular expression applied to a char sequence. * * @since 1.4 */ public final class Matcher implements MatchResult { private Pattern pattern; private CharSequ...
llvm-gcc-4.2-2.9/libjava/classpath/java/util/regex/Matcher.java
0.852091
0.401981
Matcher.java
starcoder
* HyperPipes.java * Copyright (C) 2002 University of Waikato * */ package weka.classifiers.misc; import weka.classifiers.Evaluation; import weka.classifiers.Classifier; import weka.core.Attribute; import weka.core.Instance; import weka.core.Instances; import weka.core.Utils; import weka.core.UnsupportedAttr...
subjectSystems/C,D/src/weka/classifiers/misc/HyperPipes.java
0.802478
0.437103
HyperPipes.java
starcoder
package io.getmedusa.medusa.core.util; import org.springframework.expression.spel.SpelEvaluationException; import org.springframework.expression.spel.SpelParseException; import org.springframework.expression.spel.standard.SpelExpressionParser; /** * Helper class to parse SPel-Expressions */ abstract class SpelExpre...
medusa-ui/src/main/java/io/getmedusa/medusa/core/util/SpelExpressionParserHelper.java
0.88038
0.440349
SpelExpressionParserHelper.java
starcoder
package com.antvr.antvrsdk.sensor.model; public class GyroBiasEstimator { private static final float GYRO_SMOOTHING_FACTOR = 0.01f; private static final float ACC_SMOOTHING_FACTOR = 0.1f; private static final Vector3d UP_VECTOR; private static final float MIN_ACCEL_DOT_WITH_UP; private static final...
app/src/main/java/com/antvr/antvrsdk/sensor/model/GyroBiasEstimator.java
0.843927
0.61927
GyroBiasEstimator.java
starcoder
package core.helpers; import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import org.testng.Assert; import org.testng.asserts.SoftAssert; import core.support.configReader.Config; import...
automation/src/main/java/core/helpers/AssertHelper.java
0.518302
0.490297
AssertHelper.java
starcoder
package org.shirolang.dag; import java.util.LinkedHashSet; import java.util.Set; /** * Defines a graph node used in the generic directed acyclic graph * @param <T> the type of the graph node */ public class GraphNode<T> { private T value; // object stored in the graph nodes private boolean isLea...
src/main/java/org/shirolang/dag/GraphNode.java
0.907396
0.450239
GraphNode.java
starcoder
package io.github.cottonmc.cotton.datapack.util; import java.util.List; import java.util.regex.Pattern; import com.google.common.base.Splitter; import com.google.common.collect.Lists; import net.minecraft.util.Identifier; import net.minecraft.util.InvalidIdentifierException; /** * @author Daomephsta Static utility...
modules/cotton-datapack/src/main/java/io/github/cottonmc/cotton/datapack/util/Identifiers.java
0.91346
0.542015
Identifiers.java
starcoder
package com.github.cluelab.dollar; /** * Implements the $Q recognizer */ public class QPointCloudRecognizer { // $Q's two major optimization layers (Early Abandoning and Lower Bounding) // can be activated / deactivated as desired public static boolean UseEarlyAbandoning =...
src/main/java/com/github/cluelab/dollar/QPointCloudRecognizer.java
0.8931
0.555375
QPointCloudRecognizer.java
starcoder
package bio.singa.sequence.algorithms.alignment; import bio.singa.core.utility.Pair; import bio.singa.mathematics.graphs.model.DirectedWeightedGraph; import bio.singa.mathematics.vectors.Vector2D; import bio.singa.sequence.model.ProteinSequence; import bio.singa.structure.model.families.AminoAcidFamily; /** * @autho...
singa-sequence/src/main/java/bio/singa/sequence/algorithms/alignment/DynamicProgrammingGraph.java
0.868199
0.499207
DynamicProgrammingGraph.java
starcoder
package com.sleepycoders.jlib.algorithm.sort; import java.util.Arrays; import java.util.Comparator; /** * Recursive MergeSort Implementation with an iterative merge routine * That requires O(n) extra Memory * @author <NAME> (<EMAIL>) */ public final class MergeSort { /** * Don't let anyone instantiate t...
src/com/sleepycoders/jlib/algorithm/sort/MergeSort.java
0.818011
0.448547
MergeSort.java
starcoder
package org.rsna.ctp.stdstages.anonymizer.dicom; import org.apache.log4j.Logger; import java.util.LinkedList; import java.util.List; /** * An encapsulation of pixel regions. */ public class Regions { static final Logger logger = Logger.getLogger(Regions.class); List<Region> regions = null; /** * Constructo...
src/main/java/org/rsna/ctp/stdstages/anonymizer/dicom/Regions.java
0.925107
0.442576
Regions.java
starcoder
package com.signalcollect.psl; import scala.collection.immutable.Map; /** * {@link ADMMReasoner} objective term of the form <br /> * weight * max(coeffs^T * x - constant, 0) * <p> * All coeffs must be non-zero. * * Modified for using with S/C and added more comments. Hinge loss is a type of * convex loss func...
src/main/java/com/signalcollect/psl/HingeLossTerm.java
0.876383
0.516352
HingeLossTerm.java
starcoder
package no.laukvik.csv.columns; /** * Column with String as the data type. */ public final class StringColumn extends Column<String> { /** * The size of the column. */ private int size; /** * Column with String as the data type. * * @param name the name of the column */ ...
src/main/java/no/laukvik/csv/columns/StringColumn.java
0.91112
0.464598
StringColumn.java
starcoder
package srbrettle.financialformulas; import junit.framework.Assert; import org.junit.Test; public class FinancialFormulasTest { @Test public void AssetTurnover_ValidInput_ReturnsCorrect() { double result = FinancialFormulas.CalcAssetTurnover(500,200); Assert.assertEquals(2.5,result)...
test/java/srbrettle/financialformulas/FinancialFormulasTest.java
0.828141
0.400427
FinancialFormulasTest.java
starcoder
package de.uni_hannover.sra.minimax_simulator.model.machine.simulation; import de.uni_hannover.sra.minimax_simulator.model.machine.base.memory.MachineMemory; /** * Provides the methods each implementation of a machine simulation has to implement. * * @author <NAME> */ public interface Simulation { /** *...
src/main/java/de/uni_hannover/sra/minimax_simulator/model/machine/simulation/Simulation.java
0.8758
0.436382
Simulation.java
starcoder
package repast.simphony.valueLayer; import repast.simphony.space.Dimensions; import repast.simphony.space.continuous.NdPoint; import repast.simphony.space.continuous.PointTranslator; import repast.simphony.space.continuous.StrictBorders; import java.util.HashMap; import java.util.Map; /** * A continuous ...
repast.simphony.core/src/repast/simphony/valueLayer/ContinuousValueLayer.java
0.882814
0.401629
ContinuousValueLayer.java
starcoder
package org.tensorflow.utils; import org.tensorflow.Shape; import java.util.Arrays; /** * Represents the shape of a `Tensor`. * * <p>A `TensorShape` represents a possibly-partial shape specification for a `Tensor`. It may be * one of the following: * * <p>Fully-known shape: has a known number of di...
src/main/java/org/tensorflow/utils/TensorShape.java
0.933552
0.7874
TensorShape.java
starcoder
package model; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Queue; public class Edmond implements Serializable { /** * Given an graph, returns a graph c...
src/main/java/model/Edmond.java
0.884439
0.488771
Edmond.java
starcoder
package com.noahhusby.sledgehammer.common; import com.google.gson.Gson; import com.noahhusby.sledgehammer.common.projection.GeographicProjection; import com.noahhusby.sledgehammer.common.projection.ModifiedAirocean; import com.noahhusby.sledgehammer.common.projection.ScaleProjection; import java.util.ArrayList; impor...
common/src/main/java/com/noahhusby/sledgehammer/common/CommonUtil.java
0.905799
0.408365
CommonUtil.java
starcoder
package org.spongepowered.lantern.util; import org.apache.commons.lang3.Validate; import java.util.Arrays; /** * An array of nibbles (4-bit values) stored efficiently as a byte array of * half the size. The even indices are stored in the least significant nibble * and the odd indices in the most significant bits....
src/main/java/org/spongepowered/lantern/util/NibbleArray.java
0.947186
0.676787
NibbleArray.java
starcoder
package org.talend.sdk.component.api.service.cache; import java.util.function.Predicate; import java.util.function.Supplier; /** * Framework service injectable in components or services methods * to handle local caching. * Useful for actions when deployed in a long running instance * when actions are costly. */ ...
component-api/src/main/java/org/talend/sdk/component/api/service/cache/LocalCache.java
0.911291
0.535888
LocalCache.java
starcoder
package com.draga.spaceTravels3; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.glutils.HdpiUtils; import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import com.badlog...
core/src/com/draga/spaceTravels3/MiniMap.java
0.836421
0.404507
MiniMap.java
starcoder
import java.awt.*; import java.util.concurrent.Semaphore; /** * The tetrad class represents 1 tetrad in the tetris game. * A tetrad is a group of 4 blocks in a specific orientation * that remembers where the blocks are on the grid and what color they are. * * @author <NAME> * @version v1 */ public class Tetrad ...
Tetris Lab/Tetrad.java
0.891049
0.424173
Tetrad.java
starcoder
package jdk.jfr.event.io; import static jdk.test.lib.Asserts.assertEquals; import static jdk.test.lib.Asserts.assertTrue; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; import jdk.jfr.event.io.IOEvent.EventType; import jdk.jfr.consumer.RecordedE...
test/jdk/jdk/jfr/event/io/IOHelper.java
0.628635
0.429788
IOHelper.java
starcoder
package org.decomposer.math.vector; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Iterator; /** * Basic interface for mathematical vectors (elements of a finite dimensional linear vector space). * Effectively extends Map<Integer, Double>, but is not really a true member of the java...
src/org/decomposer/math/vector/MapVector.java
0.927437
0.45532
MapVector.java
starcoder
package com.sezertanriverdi.dailycodingproblems.problem11; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; public class Problem11 { /** * Good morning! Here's your coding interview problem for today. * * T...
src/com/sezertanriverdi/dailycodingproblems/problem11/Problem11.java
0.872673
0.424889
Problem11.java
starcoder
package problems; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /** * https://leetcode.com/problems/possible-bipartition/ * * Given a set of N people (numbered 1, 2, ..., N), we would like to split everyone into two groups of any size. * * Each person may dislike...
src/main/java/problems/PossibleBipartition.java
0.9189
0.496277
PossibleBipartition.java
starcoder
package name.martingeisse.stackd.common.cubes; import java.io.IOException; import java.io.OutputStream; import name.martingeisse.stackd.common.geometry.ClusterSize; /** * Cubes object that is filled uniformly with a single cube type. Only the cube * type is stored. Any modification that sets a cube to another type ...
name.martingeisse.stackd-core-common/src/main/java/name/martingeisse/stackd/common/cubes/UniformCubes.java
0.927034
0.413004
UniformCubes.java
starcoder
package cellularAutomata.util.math; import java.awt.geom.Point2D; import java.util.List; /** * Finds a linear least squares fit to data. The solution has the form mx+b. * * @author <NAME> */ public class LeastSquaresFit { // The points that will be fitted. private Point2D[] points = null; ...
cellularAutomata/util/math/LeastSquaresFit.java
0.883845
0.59969
LeastSquaresFit.java
starcoder
package hr.fer.zemris.math; import java.util.Arrays; import java.util.List; import java.util.Objects; public class ComplexPolynomial { /** * List of complex numbers. */ private List<Complex> complexNumbers; /** * Constructor used for initializing this polynom. * * @param factors list of factors. * @...
Homeworks/hw09-0036506587/src/main/java/hr/fer/zemris/math/ComplexPolynomial.java
0.921825
0.554531
ComplexPolynomial.java
starcoder
import java.util.Arrays; public class PolynomialLongDivision { private static class Solution { double[] quotient, remainder; Solution(double[] q, double[] r) { this.quotient = q; this.remainder = r; } } private static int polyDegree(double[] p) { fo...
Polynomial_long_division/Java/src/PolynomialLongDivision.java
0.788543
0.551815
PolynomialLongDivision.java
starcoder
package at.jku.fmv.qbf; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.function.BiFunction; import java.util.function.Co...
src/main/java/at/jku/fmv/qbf/QBF.java
0.890838
0.437763
QBF.java
starcoder