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 co.paralleluniverse.vtime; /** * Clock instance that has a fixed epoch. By default will return a continuously-running * system clock from a fixed time base. * * @author jleskovar */ public final class FixedEpochClock extends Clock { private final long offset; private final Clock baseClock; p...
src/main/java/co/paralleluniverse/vtime/FixedEpochClock.java
0.959856
0.420719
FixedEpochClock.java
starcoder
package com.example.a301pro.Models; import com.google.firebase.firestore.GeoPoint; /** * This model initializes the property of a requested book as well as gets the data of a book */ public class Request { private String bookID; private String imageId; private String bookName; private String ISBN; ...
301pro/app/src/main/java/com/example/a301pro/Models/Request.java
0.902269
0.423756
Request.java
starcoder
package com.spotify.diffuser.diffuser; import com.spotify.diffuser.Effect; import com.spotify.diffuser.Function; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.concurrent.atomic.AtomicReference; /** * A Diffuser wraps a side-effecting functio...
jvm/diffuser/src/main/java/com/spotify/diffuser/diffuser/Diffuser.java
0.950835
0.598342
Diffuser.java
starcoder
package org.thirdreality.guinness.feature; import java.awt.Point; import java.awt.geom.Point2D; // A Point class which provides more features than Point2D.Float from the Java libraries. public class GIPoint extends Point2D.Float { public GIPoint() { super(); } public GIPoint(Point point) { super(point.x, p...
src/org/thirdreality/guinness/feature/GIPoint.java
0.826327
0.622086
GIPoint.java
starcoder
package com.avast.bytes; import com.avast.bytes.jdk.ByteArrayBytes; import com.avast.bytes.jdk.ByteBufferBytes; import java.io.InputStream; import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; /** * Represents an immutable sequence (or s...
core/src/main/java/com/avast/bytes/Bytes.java
0.961651
0.630457
Bytes.java
starcoder
package org.amc.game.chess; import org.amc.util.DefaultSubject; import static org.amc.game.chess.NoChessPiece.NO_CHESSPIECE; import java.util.ArrayList; import java.util.List; /** * Represents a Chess Board Responsibility is to know the position of all the * pieces * * @author <NAME> * */ public class ChessB...
src/main/java/org/amc/game/chess/ChessBoard.java
0.834576
0.418162
ChessBoard.java
starcoder
package ch.ethz.systems.netbench.xpt.tcpbase; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; public class AckRangeSet { // Mappings to ranges private Map<Long, AckRange> lowBoundToRange; private Map<Long, AckRange> highBoundToRange; private Co...
aifo_simulation/java-code/src/main/java/ch/ethz/systems/netbench/xpt/tcpbase/AckRangeSet.java
0.876238
0.457743
AckRangeSet.java
starcoder
package ml.regression; import la.matrix.DenseMatrix; import la.matrix.Matrix; import ml.options.Options; import static ml.utils.Matlab.*; /*** * Abstract super class for all regression methods. * * @author <NAME> * @version 1.0 Feb. 1st, 2014 */ public abstract class Regression { /** * Number of dependent ...
src/ml/regression/Regression.java
0.778733
0.577644
Regression.java
starcoder
package cocos2d.predefine; public class CCTypes { //ccColor3B predefined colors //! White color (255,255,255) public static final CCColor3B CCWhite = new CCColor3B(255, 255, 255); //! Yellow color (255,255,0) public static final CCColor3B CCYellow = new CCColor3B(255, 255, 0); //! Blue color (0...
cocos/src/cocos2d/predefine/CCTypes.java
0.885619
0.42316
CCTypes.java
starcoder
package net.andreinc.mockneat.abstraction; import net.andreinc.mockneat.utils.ValidationUtils; import java.time.DayOfWeek; import java.time.format.TextStyle; import java.util.Locale; import static java.time.format.TextStyle.FULL; import static net.andreinc.mockneat.utils.MockUnitUtils.ifSupplierNotNullDo; public in...
src/main/java/net/andreinc/mockneat/abstraction/MockUnitDays.java
0.888366
0.465387
MockUnitDays.java
starcoder
package chapter_4; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; import datastructures.tree.BinarySearchTree; import datastructures.tree.TreeNode; import util.InputUtil; /** * Question 4.3: Given a binary tree, design an algorithm which create...
cracking-the-coding-interview/src/chapter_4/ListOfDepths.java
0.863995
0.462352
ListOfDepths.java
starcoder
package de.eternity.gui; /** * A data holder class for window/display information. * @author <NAME> * */ public class DisplayMode { private int displayWidth, displayHeight, resolutionX, resolutionY, canvasBufferSize; /** * Creates a new DisplayMode instance. Make width and height 2 to the n times the value ...
src/de/eternity/gui/DisplayMode.java
0.860735
0.442877
DisplayMode.java
starcoder
package D18130495; import processing.core.*; public class TwoChannelDance { YushunVisual yv; public TwoChannelDance(YushunVisual yv) { this.yv = yv; } public void render() { //Draw the background yv.translate(yv.width/2, yv.height/2); //translate to the center of the screen...
java/src/D18130495/TwoChannelDance.java
0.590307
0.52007
TwoChannelDance.java
starcoder
package greglib.util; import java.io.Serializable; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; /** * Counter class. Behaves like a map with fast increment and decrement methods. * * Created by gpfinley on 10/27/16. */ public class Counter<T> implements Map<T, Integer>, ...
src/main/java/greglib/util/Counter.java
0.936205
0.457561
Counter.java
starcoder
package org.sleuthkit.autopsy.timeline.ui.detailview.datamodel; import static java.util.Collections.emptySet; import static java.util.Collections.singleton; import java.util.Comparator; import java.util.HashSet; import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.SortedSet; impo...
Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/datamodel/EventCluster.java
0.889223
0.490968
EventCluster.java
starcoder
package com.opengamma.integration.marketdata.manipulator.dsl.volsurface; import java.util.Arrays; import java.util.Objects; import org.fudgemsg.FudgeMsg; import org.fudgemsg.MutableFudgeMsg; import org.fudgemsg.mapping.FudgeDeserializer; import org.fudgemsg.mapping.FudgeSerializer; import com.opengamma.analytics.fin...
projects/OG-Integration/src/main/java/com/opengamma/integration/marketdata/manipulator/dsl/volsurface/VolatilitySurfaceMultipleMultiplicativeShifts.java
0.886801
0.434941
VolatilitySurfaceMultipleMultiplicativeShifts.java
starcoder
package com.interview.graph; import java.util.*; /* * https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/ * Category: Medium, dijakstra, bfs * Related: * https://leetcode.com/problems/second-minimum-time-to-reach-destination/ * * 1334. Find the City With t...
src/com/interview/graph/FindtheCityWiththeSmallestNumberofNeighborsataThresholdDistance.java
0.840423
0.609757
FindtheCityWiththeSmallestNumberofNeighborsataThresholdDistance.java
starcoder
package tech.bitey.bufferstuff; import static tech.bitey.bufferstuff.BufferUtils.rangeCheck; import java.nio.ByteBuffer; import java.nio.DoubleBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.nio.LongBuffer; import java.nio.ShortBuffer; import java.util.function.IntBinaryOperator; /** * S...
dataframe/bufferstuff/src/main/java/tech/bitey/bufferstuff/BufferSort.java
0.861698
0.463687
BufferSort.java
starcoder
package recursion2; /* * Given an array of ints, is it possible to choose a group of some of the * ints, such that the group sums to the given target, with this additional * constraint: if there are numbers in the array that are adjacent and the * identical value, they must either all be chosen, or none of them ch...
Java/recursion2/GroupSumClumpTest.java
0.751192
0.561636
GroupSumClumpTest.java
starcoder
package org.fujion.plotly.plot; import org.fujion.annotation.Option; import org.fujion.plotly.common.CalendarTypeEnum; import org.fujion.plotly.common.VHOrientationEnum; /** * Options for box plot. * <p> * A box plot graphically depicts groups of numerical data through their quartiles. Box plots may * also have l...
fujion-plotly/src/main/java/org/fujion/plotly/plot/PlotBox.java
0.912097
0.681925
PlotBox.java
starcoder
package net.ejrbuss.data2; import net.ejrbuss.function.*; import java.util.NoSuchElementException; public abstract class Maybe<A> { public static <A> Maybe<A> some(A value) { return new Some<>(value); } @SuppressWarnings("unchecked") public static <A> Maybe<A> none() { return None.n...
src/main/java/net/ejrbuss/data2/Maybe.java
0.870913
0.418756
Maybe.java
starcoder
package swim.codec; /** * Unicode code point {@link Input}/{@link Output}/{@link Writer} factory. * * <p>The {@code Unicode.stringInput(...)} family of functions return an {@code * Input} that reads the Unicode code points of a {@code String}.</p> * * <p>The {@code Unicode.stringOutput(...)} family of functions...
swim-java/swim-runtime-java/swim-core-java/swim.codec/src/main/java/swim/codec/Unicode.java
0.959592
0.766949
Unicode.java
starcoder
package org.spongepowered.common.data.provider; import io.leangen.geantyref.GenericTypeReflector; import org.spongepowered.api.data.DataHolder; import org.spongepowered.api.data.Key; import org.spongepowered.api.data.value.Value; import org.spongepowered.common.util.TypeTokenUtil; import java.lang.reflect.Type; impor...
src/main/java/org/spongepowered/common/data/provider/GenericImmutableDataProviderBase.java
0.88508
0.426202
GenericImmutableDataProviderBase.java
starcoder
package com.sunchp.utils.math; import static com.sunchp.utils.math.BigDecimalUtils.stringSafeGetBigDecimal; import java.math.BigDecimal; import java.math.RoundingMode; /** * @author albert */ public class BigDecimalCalculation { private final BigDecimal amount; public BigDecimalCalculation(BigDecimal amou...
src/main/java/com/sunchp/utils/math/BigDecimalCalculation.java
0.927732
0.612281
BigDecimalCalculation.java
starcoder
package jdepend.framework; import java.util.ArrayList; import java.util.List; /** * @author <b><NAME></b> * @author Clarkware Consulting, Inc. */ public class CollectAllCyclesTest extends JDependTestCase { public CollectAllCyclesTest(String name) { super(name); } public void testNoCycles() { JavaPac...
test/jdepend/framework/CollectAllCyclesTest.java
0.591015
0.456773
CollectAllCyclesTest.java
starcoder
public class HopcroftCarp { public static final int INF = Integer.MAX_VALUE; public static final int NIL = 0; Node[] L, R, G; // All indices for the nodes must be unique! public HopcroftCarp(Node[] L, Node[] R) { this.L = L; this.R = R; G = new Node[L.length + R.length + 1]; for (Node n : L...
code/Graphs/HopcroftCarp.java
0.861334
0.481759
HopcroftCarp.java
starcoder
package io.bussmann.gauss.math; import io.bussmann.gauss.types.GaussMatrix; import io.bussmann.gauss.types.GaussMatrixSolutionTrace; import java.util.Vector; /** * Gaussian elimination. * * Represents the gaussian elimination algorithm. * * @author <NAME> */ public class GaussianElimination { /** * Tr...
src/main/java/io/bussmann/gauss/math/GaussianElimination.java
0.951964
0.706532
GaussianElimination.java
starcoder
package com.google.j2cl.transpiler.integration.alllongoperations; import static com.google.j2cl.transpiler.utils.Asserts.assertTrue; public class Main { public static void main(String... args) { testInfixOperations(); testPrefixOperations(); testPostfixOperations(); testAssignmentOperators(); te...
transpiler/javatests/com/google/j2cl/transpiler/integration/alllongoperations/Main.java
0.821725
0.821689
Main.java
starcoder
package com.aimacademyla.model.dto; import com.aimacademyla.model.Charge; import com.aimacademyla.model.ChargeLine; import com.aimacademyla.model.Course; import com.aimacademyla.model.Member; import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; import java.util.HashMap; import java.ut...
src/main/java/com/aimacademyla/model/dto/MemberChargesFinancesDTO.java
0.862598
0.439386
MemberChargesFinancesDTO.java
starcoder
package com.github.tonivade.purefun.optics; import static com.github.tonivade.purefun.Precondition.checkNonNull; import com.github.tonivade.purefun.Function1; import com.github.tonivade.purefun.type.Either; public final class PIso<S, T, A, B> { private final Function1<S, A> get; private final Function1<B, T> re...
optics/src/main/java/com/github/tonivade/purefun/optics/PIso.java
0.774669
0.427875
PIso.java
starcoder
package gms.shared.mechanisms.objectstoragedistribution.coi.waveforms.repository.cassandra; import java.time.Instant; import java.time.LocalDate; import java.time.Period; import java.time.ZoneOffset; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; import java.util.Objects; impo...
gms-common/java/gms/shared/mechanisms/object-storage-distribution/osd-repository/src/main/java/gms/shared/mechanisms/objectstoragedistribution/coi/waveforms/repository/cassandra/CassandraDbUtility.java
0.91895
0.463626
CassandraDbUtility.java
starcoder
package com.uxxu.konashi.lib.action; import android.bluetooth.BluetoothGattCharacteristic; import android.bluetooth.BluetoothGattService; import com.uxxu.konashi.lib.KonashiErrorType; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.Mockit...
konashi-android-sdk/src/androidTest/java/com/uxxu/konashi/lib/action/PioPinPullupActionTest.java
0.847842
0.402392
PioPinPullupActionTest.java
starcoder
import java.util.Arrays; import java.util.List; /** * Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*'. * * '?' Matches any single character. * '*' Matches any sequence of characters (including the empty sequence). * The matching should cover the entire...
coding-problems/leetcode/WildcardMatching.java
0.701611
0.446495
WildcardMatching.java
starcoder
package co.edu.uniandes.csw.viajes.ejb; import co.edu.uniandes.csw.viajes.entities.ProveedorEntity; import co.edu.uniandes.csw.viajes.entities.ActividadEntity; import co.edu.uniandes.csw.viajes.exceptions.BusinessLogicException; import co.edu.uniandes.csw.viajes.persistence.ActividadPersistence; import co.edu.uniandes...
s4_viajes-back/src/main/java/co/edu/uniandes/csw/viajes/ejb/ProveedorActividadLogic.java
0.715225
0.439507
ProveedorActividadLogic.java
starcoder
package com.netflix.titus.common.framework.scheduler.model; import java.util.Objects; import java.util.Optional; import com.google.common.base.Preconditions; public class SchedulingStatus { public enum SchedulingState { Waiting, Running, Cancelling, Succeeded, Failed; ...
titus-common/src/main/java/com/netflix/titus/common/framework/scheduler/model/SchedulingStatus.java
0.930173
0.426322
SchedulingStatus.java
starcoder
package com.google.common.collect; import static com.google.common.collect.testing.IteratorFeature.MODIFIABLE; import com.google.common.collect.testing.ListIteratorTester; import static com.google.common.testing.junit3.JUnitAsserts.assertContentsInOrder; import java.util.Arrays; import java.util.Collection; import ja...
test/com/google/common/collect/AbstractListMultimapTest.java
0.930655
0.692616
AbstractListMultimapTest.java
starcoder
package com.github.sladecek.maze.jmaze.makers.moebius; //REV1 import com.github.sladecek.maze.jmaze.geometry.Point2DDbl; import com.github.sladecek.maze.jmaze.geometry.Point2DInt; import com.github.sladecek.maze.jmaze.geometry.Point3D; import com.github.sladecek.maze.jmaze.print3d.ConfigurableAltitudes; import com.gith...
src/main/java/com/github/sladecek/maze/jmaze/makers/moebius/Moebius3dMapper.java
0.927273
0.492676
Moebius3dMapper.java
starcoder
public class SinglyLinkedList<E> { private Node head; private int size; /** * Returns a string representation of the SinglyLinkedList. * * @return a string containing the values in the list */ public String toString() { Node node = head; if (node == null) { return "[]"; } Str...
Java Code/SinglyLinkedList.java
0.866104
0.527499
SinglyLinkedList.java
starcoder
package com.github.wuic.engine; import java.awt.Dimension; /** * <p> * Represents a region to use when need to specify a sprite. * </p> * * @author <NAME> * @version 1.4 * @since 0.2.0 */ public class Region extends Dimension implements Comparable<Dimension> { /** * Serial version UID. */ ...
modules/core/src/main/java/com/github/wuic/engine/Region.java
0.952772
0.403831
Region.java
starcoder
package tree.binary_search_tree; /** * <pre> * There is BST given with root node with key part as integer only. The structure of each node is as follows: * You need to find the inorder successor and predecessor of a given key. * In case the given key is not found in BST, then return the two values within which th...
arrows/src/main/java/tree/binary_search_tree/PredecessorSuccessor.java
0.903089
0.516595
PredecessorSuccessor.java
starcoder
package inf101.v18.sem2.grid; import java.util.Collection; /** * * Representation of a two-dimensional area. * * @author anya * */ public interface IArea extends Iterable<IPosition> { /** * @param x * X-coordinate * @param y * Y-coordinate * @return True if the (x,y) position li...
src/inf101/v18/sem2/grid/IArea.java
0.922792
0.588594
IArea.java
starcoder
package frc.lib5k.spatial; import frc.lib5k.utils.Consts; import java.lang.Math; import frc.lib5k.spatial.Translation2D; /** * A rotation in a 2d coordinate frame represented a point on the unit circle * (cosine and sine). * * Adapted from 254: * https://github.com/Team254/FRC-2019-Public/blob/f99f09a15a2c8e7b5...
src/main/java/frc/lib5k/spatial/Rotation2D.java
0.941855
0.646809
Rotation2D.java
starcoder
package gms.core.waveformqc.waveformsignalqc.algorithm; import gms.shared.mechanisms.objectstoragedistribution.coi.signaldetection.commonobjects.QcMask; import gms.shared.mechanisms.objectstoragedistribution.coi.signaldetection.commonobjects.QcMaskCategory; import gms.shared.mechanisms.objectstoragedistribution.coi.si...
gms-common/java/gms/core/waveform-qc/waveform-qc-gap-qc-algorithm/src/main/java/gms/core/waveformqc/waveformsignalqc/algorithm/WaveformGapUpdater.java
0.926628
0.506225
WaveformGapUpdater.java
starcoder
import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.junit.Test; import static org.junit.Assert.*; public class HeapTest { /* * Test case number: 1 * Test case values: sort array {"aaa","bbb","ccc","ddd"} * Expected output (Post-state): aaa bbb ccc ddd */ @Test public void test1 () ...
java projects/heap/src/HeapTest.java
0.525612
0.432543
HeapTest.java
starcoder
package com.samvasta.imagegenerator.generatorpack1.tessellation; import com.samvasta.imageGenerator.common.models.Transform2D; import java.awt.*; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; public class TilePattern { private final Tile[] tiles; private final Point2D.Doub...
imageGenerator/generator-pack-1/src/main/java/com/samvasta/imagegenerator/generatorpack1/tessellation/TilePattern.java
0.883085
0.533337
TilePattern.java
starcoder
package com.puttysoftware.fantastlereboot.battle.damageengines; import com.puttysoftware.randomrange.RandomRange; class MultiplierValues { private static final double tolerance = 0.001; private static final double[] values = { 0.1, 0.25, 0.33, 0.5, 0.67, 0.75, 1.0, 1.33, 1.5, 2.0, 3.0, 4.0, 10.0 }...
FantastleReboot/src/com/puttysoftware/fantastlereboot/battle/damageengines/MultiplierValues.java
0.777596
0.60871
MultiplierValues.java
starcoder
package pson.nodes; import java.util.ArrayList; import java.util.Collections; /** * Handles all the value conversions and everything to do with the * values of types that are parsed. * @author <NAME> */ public class ValueNode { public ValueNode() { } /** Converts the given value to an array */ ...
src/pson/nodes/ValueNode.java
0.854521
0.573021
ValueNode.java
starcoder
package io.github.cjkent.cobalt; import java.time.LocalDate; import java.util.List; import java.util.Random; import java.util.concurrent.ExecutorService; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.opengamma.strata.basics.currency.CurrencyAmount; import com.openg...
src/main/java/io/github/cjkent/cobalt/PvSeriesCalculator.java
0.826642
0.614278
PvSeriesCalculator.java
starcoder
package seedu.trackermon.model.show; import static java.util.Objects.requireNonNull; import static seedu.trackermon.commons.util.AppUtil.checkArgument; /** * Represents the Name of the Show. * Guarantees: immutable; name is valid as declared in {@link #isValidName(String)}. */ public class Name implements Comparab...
src/main/java/seedu/trackermon/model/show/Name.java
0.920665
0.420719
Name.java
starcoder
package ExternalPackages.jMEF; import ExternalPackages.jMEF.Parameter.TYPE; /** * @author <NAME> * @author <NAME> * @version 1.0 * @section License * <p> * See file LICENSE.txt * @section Description * <p> * The Poisson distribution is an exponential family and, as a consequence, the * probability density f...
DIA-Umpire/DIA-Umpire/src/ExternalPackages/jMEF/Poisson.java
0.910109
0.659529
Poisson.java
starcoder
package com.pandadecst.toy.utils; import com.badlogic.gdx.graphics.Camera; import com.badlogic.gdx.math.Frustum; import com.badlogic.gdx.math.Plane; import com.badlogic.gdx.math.Vector3; import com.badlogic.gdx.physics.bullet.collision.*; import com.badlogic.gdx.utils.BufferUtils; import com.badlogic.gdx.utils.Disposa...
core/src/main/java/com/pandadecst/toy/utils/OcclusionCuller.java
0.943223
0.587292
OcclusionCuller.java
starcoder
package com.github.firststraw.guice; import com.google.inject.Key; import com.google.inject.TypeLiteral; import com.google.inject.spi.LinkedKeyBinding; import java.util.Objects; import javax.annotation.concurrent.Immutable; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder....
src/main/java/com/github/firststraw/guice/LinkedKeyBindingVerifier.java
0.943828
0.482673
LinkedKeyBindingVerifier.java
starcoder
package de.charite.compbio.jannovar.reference; import de.charite.compbio.jannovar.Immutable; /** * Deletion relative to the reference. * * @author <a href="mailto:<EMAIL>"><NAME></a> */ @Immutable public final class SVDeletion extends SVGenomeVariant { /** * Initialize all fields. * * @param genomePos ...
jannovar-core/src/main/java/de/charite/compbio/jannovar/reference/SVDeletion.java
0.903874
0.527377
SVDeletion.java
starcoder
package net.java.sip.communicator.plugin.desktoputil; import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.util.*; import java.util.List; import javax.swing.*; import javax.swing.Timer; /** * AnimatedImage will display a series of Images in a predetermined sequence. * This sequence can ...
src/net/java/sip/communicator/plugin/desktoputil/AnimatedImage.java
0.920375
0.40698
AnimatedImage.java
starcoder
package org.asyou.sequoia.model; import org.bson.BSONObject; import static org.asyou.sequoia.model.Commons.*; /** * Created by steven on 17/10/10. */ public final class Functions { public static BSONObject abs(String fieldName){ return insideOpt(fieldName, "$abs", 1); } public static BSONObje...
src/main/java/org/asyou/sequoia/model/Functions.java
0.68763
0.413418
Functions.java
starcoder
package com.irurueta.navigation.inertial.calibration; import com.irurueta.algebra.AlgebraException; import com.irurueta.algebra.Matrix; import com.irurueta.algebra.Utils; import com.irurueta.algebra.WrongSizeException; import com.irurueta.navigation.inertial.BodyKinematics; import com.irurueta.units.Acceleration; impo...
src/main/java/com/irurueta/navigation/inertial/calibration/AccelerationFixer.java
0.968359
0.428293
AccelerationFixer.java
starcoder
package thothbot.parallax.core.shared.math; public class Plane { private Vector3 normal; private double constant; // Temporary variables static Vector3 _v1 = new Vector3(); static Vector3 _v2 = new Vector3(); static Matrix3 _m1 = new Matrix3(); public Plane() { this(new Vector3(1, 0, 0), 0); } public...
src/thothbot/parallax/core/shared/math/Plane.java
0.817137
0.605478
Plane.java
starcoder
package com.moon.office.excel.core; import com.moon.beans.BeanInfoUtil; import com.moon.beans.FieldDescriptor; import com.moon.enums.ArrayOperators; import com.moon.enums.ArraysEnum; import com.moon.util.compute.RunnerUtil; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; import j...
src/main/java/com/moon/office/excel/core/VarSetterIn.java
0.667581
0.432782
VarSetterIn.java
starcoder
package org.vitrivr.cineast.core.util.dsp.fft; import org.apache.commons.math3.complex.Complex; import org.apache.commons.math3.transform.DftNormalization; import org.apache.commons.math3.transform.FastFourierTransformer; import org.apache.commons.math3.transform.TransformType; import org.vitrivr.cineast.core.util.dsp...
cineast-core/src/main/java/org/vitrivr/cineast/core/util/dsp/fft/FFT.java
0.940939
0.546678
FFT.java
starcoder
package georegression.struct.se; import georegression.geometry.ConvertRotation3D_F64; import georegression.geometry.GeometryMath_F64; import georegression.struct.EulerType; import georegression.struct.affine.Affine2D_F64; import georegression.struct.point.Vector3D_F64; import georegression.struct.so.Rodrigues_F64; imp...
main/src/georegression/struct/se/SpecialEuclideanOps_F64.java
0.939533
0.596786
SpecialEuclideanOps_F64.java
starcoder
package de.vandermeer.skb.datatool.entries.geo.cities; import java.net.URISyntaxException; import java.util.Collection; import java.util.HashMap; import java.util.Map; import de.vandermeer.skb.datatool.commons.AbstractDataEntrySchema; import de.vandermeer.skb.datatool.commons.AbstractDataEntryType; import de.vanderme...
src/main/java/de/vandermeer/skb/datatool/entries/geo/cities/CityEntry.java
0.636466
0.423458
CityEntry.java
starcoder
package com.shortthirdman.core.algorithm; import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; import java.util.Stack; /* * Graham’s scan is a method of computing the convex hull of a finite set of points * in the plane with time complexity O(n log n). * * Graham Scan Algorit...
src/main/java/com/shortthirdman/core/algorithm/GrahamScan.java
0.771499
0.50354
GrahamScan.java
starcoder
package org.pathwayeditor.businessobjects.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.Iterator; import org.jmock.Mockery; import org.jmock.integration.junit4.JMock; import org.jmock.integration.junit4.JUnit...
test/org/pathwayeditor/businessobjects/impl/BendPointContainerEmptyTest.java
0.880489
0.673286
BendPointContainerEmptyTest.java
starcoder
package us.ihmc.quadrupedPlanning.stepStream; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Disabled; import us.ihmc.euclid.referenceFrame.FramePoint3D; import us.ihmc.euclid.referenceFrame.FramePose2D; import us.ihmc.euclid.re...
ihmc-quadruped/src/planning-test/java/us/ihmc/quadrupedPlanning/stepStream/QuadrupedXGaitPlannerTest.java
0.78083
0.518424
QuadrupedXGaitPlannerTest.java
starcoder
package ml.shifu.guagua.example.nn.meta; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.Arrays; import ml.shifu.guagua.example.nn.NNUtils; import ml.shifu.guagua.io.HaltBytable; /** * NNParams are used to save NN model info which can also be stored into ZooKeeper. ...
guagua-examples/src/main/java/ml/shifu/guagua/example/nn/meta/NNParams.java
0.889775
0.416441
NNParams.java
starcoder
package com.opengamma.analytics.financial.timeseries.analysis; import org.apache.commons.lang.Validate; import com.opengamma.analytics.math.regression.LeastSquaresRegression; import com.opengamma.analytics.math.regression.LeastSquaresRegressionResult; import com.opengamma.analytics.math.regression.OrdinaryLeastSquare...
src/com/opengamma/analytics/financial/timeseries/analysis/AutoregressiveTimeSeriesPACFOrderIdentifier.java
0.862974
0.560553
AutoregressiveTimeSeriesPACFOrderIdentifier.java
starcoder
package us.ihmc.commonWalkingControlModules.trajectories; import static us.ihmc.robotics.geometry.AngleTools.computeAngleDifferenceMinusPiToPi; import static us.ihmc.robotics.geometry.AngleTools.trimAngleMinusPiToPi; import javax.vecmath.AxisAngle4d; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; impor...
CommonWalkingControlModules/src/us/ihmc/commonWalkingControlModules/trajectories/CirclePoseTrajectoryGenerator.java
0.847905
0.631268
CirclePoseTrajectoryGenerator.java
starcoder
package co.edu.uniandes.quantum.biblioteca.ejb; import co.edu.uniandes.quantum.biblioteca.entities.ComentarioEntity; import co.edu.uniandes.quantum.biblioteca.exceptions.BusinessLogicException; import co.edu.uniandes.quantum.biblioteca.persistence.ComentarioPersistence; import java.util.List; import java.util.logging...
biblioteca-back/src/main/java/co/edu/uniandes/quantum/biblioteca/ejb/ComentarioLogic.java
0.638159
0.445349
ComentarioLogic.java
starcoder
package org.jgrapht.nio.csv; /** * Supported CSV formats. * * <ul> * <li> * <p> * Format {@link #EDGE_LIST} contains one edge per line. The following example * * <pre> * a,b * b,c * </pre> * * represents a graph with two edges: a-&gt;b and b-&gt;c.</li> * * <li> * <p> * Format {@link #ADJACENCY_LI...
Java tool/TIA-XML-modcheck/lib/jgrapht-1.5.0/source/jgrapht-io/src/main/java/org/jgrapht/nio/csv/CSVFormat.java
0.927986
0.44559
CSVFormat.java
starcoder
package com.hiabby.flyinterview.march; import com.google.common.collect.Lists; import java.util.List; /** * @desc: 各种排序算法展示:冒泡排序,选择排序,插入排序,快速排序,其它比如堆排序、希尔排序、归并排序等等在其它之后遇到了再学 * @author: ITflying * @create: 2019-03-14 14:24 **/ public class Nine { public static void main(String[] args) { List<Integer> ...
flyinterview/src/main/java/com/hiabby/flyinterview/march/Nine.java
0.576304
0.444083
Nine.java
starcoder
package org.apache.wicket.util.lang; import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.wicket.util.string.StringValue; import org.apache.wicket.util.string.StringValueConversionException; import or...
wicket-util/src/main/java/org/apache/wicket/util/lang/Bytes.java
0.93147
0.449332
Bytes.java
starcoder
package fitnesse.idea.rt; import fitnesse.idea.rt.FuncUtils.Mapper; import java.util.Arrays; import java.util.Collections; import java.util.List; import static fitnesse.idea.rt.FuncUtils.map; import static fitnesse.idea.rt.FuncUtils.zip; import static java.util.Collections.max; public class TableFormatter { pub...
idea-fitnesse_rt/src/main/java/fitnesse/idea/rt/TableFormatter.java
0.873566
0.428532
TableFormatter.java
starcoder
import java.util.ArrayList; import java.util.List; public class Chromosome { public boolean[] gene;//基因序列 private double score;//对应的函数得分 public boolean[] getGene() { return gene; } public void setGene(boolean[] gene) { this.gene = gene; } //score的get set 方法 public dou...
ExerGA/src/Chromosome.java
0.513181
0.425904
Chromosome.java
starcoder
package de.mirkosertic.bytecoder.graph; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.Stack; import java.util.function.Predicate; import java.util.stream.Collectors; public class Partitioning<T extends Node<T, ? extends EdgeType>> { private fi...
core/src/main/java/de/mirkosertic/bytecoder/graph/Partitioning.java
0.788909
0.402363
Partitioning.java
starcoder
public class Solution { public int shortestDistance(int[][] grid) { int m = grid.length; int n = grid[0].length; int walk = 0; // to record the current common empty land int[][] neighbors = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; int[][] dist = new int[m][n]; for(int i=0...
src/317ShortestDistanceFromAllBuildings.java
0.875574
0.437523
317ShortestDistanceFromAllBuildings.java
starcoder
package com.mindbodyonline.ironhide.Infrastructure.IronhideViews; import android.support.test.espresso.Root; import android.support.test.espresso.assertion.LayoutAssertions; import android.support.test.espresso.matcher.LayoutMatchers; import android.view.View; import com.mindbodyonline.ironhide.PageObjects.PageObject...
lib/src/main/java/com/mindbodyonline/ironhide/Infrastructure/IronhideViews/LayoutView.java
0.948597
0.432363
LayoutView.java
starcoder
package pbgLecture3lab; import java.awt.Color; import java.awt.Graphics2D; public class AnchoredBarrier_Curve extends AnchoredBarrier { /* Author: <NAME> * Creation Date: 2016-01-28 * Significant changes applied: */ private final Vector2D centreOfCircleBarrierArc; private final Color col; private final Do...
src/pbgLecture3lab/AnchoredBarrier_Curve.java
0.69987
0.553204
AnchoredBarrier_Curve.java
starcoder
package string.validAnagram; /* ***************************************************************************** 242. 有效的字母异位词 给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。 示例 1: 输入: s = "anagram", t = "nagaram" 输出: true 示例 2: 输入: s = "rat", t = "car" 输出: false 说明: 你可以假设字符串只包含小写字母。 进阶: 如果输入字符串包含 unicode 字符怎么办?你能否调整你的解...
java/src/string/validAnagram/ValidAnagram.java
0.520009
0.405802
ValidAnagram.java
starcoder
package cn.edu.cug.cs.gtl.jts.noding; import java.util.*; import cn.edu.cug.cs.gtl.jts.geom.Coordinate; import cn.edu.cug.cs.gtl.jts.geom.CoordinateArrays; /** * Allows comparing {@link Coordinate} arrays * in an orientation-independent way. * * @author <NAME> * @version 1.7 */ public class OrientedCoordinateA...
common/src/main/java/cn/edu/cug/cs/gtl/jts/noding/OrientedCoordinateArray.java
0.939913
0.465266
OrientedCoordinateArray.java
starcoder
import java.util.*; import java.lang.*; /** * Implement a function that takes two lists and returns interecting elements. * <p> * Eg: L1 = {2,4,5,6,7}; L2 = {9, -9, 5, 8, 7} * output = {5,7} */ public class IntersectionNumbers { public static void main(String[] args) { ArrayList<Integer> list1 = new ...
Arrays/IntersectionNumbers.java
0.705684
0.441854
IntersectionNumbers.java
starcoder
package com.googlecode.jmapper.conversions.implicit; import static com.googlecode.jmapper.conversions.implicit.ConversionMethod.*; import com.googlecode.jmapper.enums.ConversionType; /** * This Class handles conversion between primitive and wrapper types. * * @author <NAME> * */ public final class ConversionHan...
JMapper Framework/src/main/java/com/googlecode/jmapper/conversions/implicit/ConversionHandler.java
0.773388
0.40439
ConversionHandler.java
starcoder
package engine; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Set; /** * This class provides implementations of the various algorithms * dealing with flow in the Graph Toolkit, including Edmonds-Karp. * */ class Flow { private Fl...
src/engine/Flow.java
0.932269
0.505737
Flow.java
starcoder
package de.fhkiel.ki.cathedral; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Core class used to handle a full game of cathedral. * * The Game class is the core of this framework. It stores and handles all interactions and keeps * track of all players and the rules pertaining them...
src/main/java/de/fhkiel/ki/cathedral/Game.java
0.915101
0.489748
Game.java
starcoder
package leetcode.medium; import java.util.HashMap; /** * 146. LRUCache * Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. * <p> * get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwi...
src/main/java/leetcode/medium/LRUCache.java
0.802942
0.415492
LRUCache.java
starcoder
package com.beepscore.android.treetraverser; import junit.framework.TestCase; import java.util.ArrayList; import java.util.List; /** * Created by stevebaker on 6/4/15. */ public class TreeTraverserTest extends TestCase { Node start = null; @Override public void setUp() throws Exception { supe...
app/src/androidTest/java/com/beepscore/android/treetraverser/TreeTraverserTest.java
0.920464
0.520679
TreeTraverserTest.java
starcoder
package com.ferox.physics.collision.shape; import com.ferox.math.Const; import com.ferox.math.Vector3; /** * Cone is a convex shape implementation that represents a cone. It has two parameters, the height of the cone * and the radius of its base. The orientation of the cylinder is chosen by its dominant axis. The b...
ferox-physics/src/main/java/com/ferox/physics/collision/shape/Cone.java
0.954963
0.623033
Cone.java
starcoder
package org.apache.ignite.internal.runner.app.jdbc; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org....
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/jdbc/ItJdbcResultSetSelfTest.java
0.812942
0.483953
ItJdbcResultSetSelfTest.java
starcoder
package com.example.self.normalpractice.suanfa2; import com.google.common.collect.Lists; import javax.jws.Oneway; import java.util.ArrayList; import java.util.List; import java.util.Stack; /** * @description: * @author: hanxiaobo * @create: 2021-08-04 16:09 */ public class BinaryTreeMid { /** * 给定一个二叉树...
src/main/java/com/example/self/normalpractice/suanfa2/BinaryTreeMid.java
0.866217
0.483283
BinaryTreeMid.java
starcoder
package sun.java2d.loops; import java.awt.image.BufferedImage; import java.awt.AlphaComposite; import java.util.HashMap; /** * A CompositeType object provides a chained description of a type of * algorithm for color compositing. The object will provide a single * String constant descriptor which is one way of des...
openjdk/classes/sun/java2d/loops/CompositeType.java
0.86411
0.513485
CompositeType.java
starcoder
package com.google.javascript.jscomp.disambiguate; import static com.google.common.collect.ImmutableSet.toImmutableSet; import static com.google.common.truth.Truth.assertThat; import com.google.common.collect.ImmutableSet; import com.google.common.truth.Correspondence; import com.google.javascript.jscomp.colors.Color...
test/com/google/javascript/jscomp/disambiguate/ColorGraphNodeFactoryTest.java
0.898381
0.521654
ColorGraphNodeFactoryTest.java
starcoder
package gohai.simpleimagelabeling; import java.nio.ByteBuffer; import java.util.Arrays; import org.tensorflow.DataType; import org.tensorflow.Graph; import org.tensorflow.Output; import org.tensorflow.Session; import org.tensorflow.Tensor; import org.tensorflow.TensorFlow; import processing.core.*; /** * Image Lab...
src/gohai/simpleimagelabeling/SimpleImageLabeling.java
0.747063
0.523603
SimpleImageLabeling.java
starcoder
package java.lang.module; import java.util.Objects; import java.util.Set; /** * A module in a graph of <em>resolved modules</em>. * * <p> {@code ResolvedModule} defines the {@link #configuration configuration} * method to get the configuration that the resolved module is in. It defines * the {@link #reference() ...
java/lang/module/ResolvedModule.java
0.941365
0.417568
ResolvedModule.java
starcoder
package com.coillighting.udder.geometry; import java.awt.geom.Point2D; /** A simple public datastructure for storing four * points of a control polygon. */ public class ControlQuad { // Distortion quad for Stretch.stretchXY public Point2D.Double sw = null; public Point2D.Double se = null; public P...
udder/src/main/java/com/coillighting/udder/geometry/ControlQuad.java
0.850484
0.484075
ControlQuad.java
starcoder
import com.caomu.util.Utils; import java.util.*; import java.util.logging.Logger; /** * create time: 2021-03-14 21:28:14 */ public class _253_MeetingRoomsIi { private static final Logger logger = Logger.getLogger(_253_MeetingRoomsIi.class.toString()); public static void main(String[] args) { lon...
leetcode/editor/cn/src/main/java/_253_MeetingRoomsIi.java
0.817647
0.426322
_253_MeetingRoomsIi.java
starcoder
package lombok.ast; import lombok.*; @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class AST { public static Binary Add(final Expression<?> left, final Expression<?> right) { return new Binary(left, "+", right); } public static Binary And(final Expression<?> left, final Expression<?> right) { ...
src/core/lombok/ast/AST.java
0.801625
0.424889
AST.java
starcoder
package skewtune.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.hadoop.conf.Configuration; public class Utils { /** * Returns index of maximum element in a given * array of doubles. First maximum is returned. * * @param doubles the array of doubles * @return the ...
src/skewtune/utils/Utils.java
0.812496
0.535281
Utils.java
starcoder
package ai.djl.paddlepaddle.jni; import ai.djl.Device; import ai.djl.ndarray.NDList; import ai.djl.ndarray.types.DataType; import ai.djl.ndarray.types.Shape; import ai.djl.paddlepaddle.engine.PaddlePredictor; import ai.djl.paddlepaddle.engine.PpDataType; import ai.djl.paddlepaddle.engine.PpNDArray; import ai.djl.paddl...
engines/paddlepaddle/paddlepaddle-engine/src/main/java/ai/djl/paddlepaddle/jni/JniUtils.java
0.791861
0.445107
JniUtils.java
starcoder
package org.goldenroute.portfolio.service; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashSet; import java.util.List; import java.util.OptionalDouble; import java.util.Set; import org.apache.commons.math3.linear.MatrixUtils; import org.apache.commons....
src/main/java/org/goldenroute/portfolio/service/MarkowitzModel3.java
0.869382
0.468851
MarkowitzModel3.java
starcoder
package tools.superinstructions; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.oracle.truffle.api.instrumentation.InstrumentableFactory.WrapperNode; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.NodeUtil; import com.oracle...
src/tools/superinstructions/ContextCollector.java
0.914353
0.435541
ContextCollector.java
starcoder
package org.chromium.chrome.browser.offlinepages.indicator; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.annotation.Config; i...
chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineIndicatorMetricsDelegateUnitTest.java
0.92703
0.439627
OfflineIndicatorMetricsDelegateUnitTest.java
starcoder