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 es.ull.autonomous_vehicles_system_simulation.high_level_simulation.simulation; import java.util.ArrayList; import es.ull.autonomous_vehicles_system_simulation.high_level_simulation.results_structures.PSIGHOSResults; import es.ull.autonomous_vehicles_system_simulation.high_level_simulation.results_structures.R...
high_level_simulation/high_level_simulation/src/main/java/es/ull/autonomous_vehicles_system_simulation/high_level_simulation/simulation/WheelChairsExperiment.java
0.75101
0.560373
WheelChairsExperiment.java
starcoder
package boofcv.alg.sfm.structure; import boofcv.abst.geo.TriangulateNViewsMetricH; import boofcv.abst.geo.bundle.MetricBundleAdjustmentUtils; import boofcv.abst.geo.bundle.SceneObservations; import boofcv.abst.geo.bundle.SceneStructureMetric; import boofcv.alg.distort.brown.RemoveBrownPtoN_F64; import boofcv.alg.geo.M...
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure/MetricExpandByOneView.java
0.850825
0.646118
MetricExpandByOneView.java
starcoder
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; /** * This class performs calculation. The connections in hypercube are represents * as binary tree. * * @author <NAME> <<EMAIL>> * */ public class Algorithm extends Hypercube { ...
Hypercube/Algorithm.java
0.923622
0.470068
Algorithm.java
starcoder
注意带有upper/lower bound. 定义:binary search tree, 左边的所有node都比root和右边的小;右边的所有node都比root和左边的大。 最短的这个解法,判断对的case,其余false. ``` /* Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the no...
LintCode-master/Others/old records/LeetCode-Merged/Java/Validate Binary Search Tree.java
0.735167
0.987375
Validate Binary Search Tree.java
starcoder
package mantle.world; /** * CoordTuple * * @author mDiyo */ @SuppressWarnings("rawtypes") public class CoordTuple implements Comparable { public final int x; public final int y; public final int z; public CoordTuple(double posX, double posY, double posZ) { x = (int) Math.floor(posX); ...
src/main/java/mantle/world/CoordTuple.java
0.917164
0.442697
CoordTuple.java
starcoder
package aprendizado; import java.util.List; import modelo.ConjuntoDados; import org.jblas.DoubleMatrix; import org.jblas.Solve; import utilidades.Matriz; public class RegressaoLinear implements Regressao { private DoubleMatrix pesos; public void treina(DoubleMatrix matrizTreino, DoubleMatrix targ...
TCC/src/aprendizado/RegressaoLinear.java
0.530966
0.433082
RegressaoLinear.java
starcoder
package com.trickl.assertj.core.internal; import static org.assertj.core.util.Strings.quote; import com.trickl.assertj.core.presentation.FileChangeSection; import com.trickl.assertj.util.diff.DirectoryChangeDelta; import com.trickl.assertj.util.diff.FileChangeDelta; import com.trickl.assertj.util.diff.FileMissingDelt...
src/main/java/com/trickl/assertj/core/internal/DirectoryDiff.java
0.842944
0.583322
DirectoryDiff.java
starcoder
package mitiv.optim; import static java.lang.Math.min; import mitiv.linalg.LinearEndomorphism; import mitiv.linalg.Vector; import mitiv.linalg.VectorSpace; /** * Multivariate non-linear optimization with simple bound constraints by * BLMVM method. * * <p> There are some differences compared to {@link LBFGS}, the...
src/mitiv/optim/BLMVM.java
0.875315
0.606906
BLMVM.java
starcoder
package com.samsungxr; import com.samsungxr.SXRRenderPass.SXRCullFaceEnum; import com.samsungxr.utility.Log; import java.lang.ref.WeakReference; import java.util.ArrayList; import static android.opengl.GLES30.GL_LINES; import static android.opengl.GLES30.GL_LINE_LOOP; import static android.opengl.GLES30.GL_LINE_STRI...
SXR/SDK/sxrsdk/src/main/java/com/samsungxr/SXRRenderData.java
0.907448
0.436622
SXRRenderData.java
starcoder
public class Vecteur extends Tuple { /** * initialise un vecteur allant de p1 à p2 * @param p1 * @param p2 */ public Vecteur(final Point p1, final Point p2) { x = p2.x - p1.x; y = p2.y - p1.y; z = p2.z - p1.z; } /** * constructeur * @param x ...
src/Vecteur.java
0.566019
0.453443
Vecteur.java
starcoder
package CrackingTheCodingInterview; import java.util.Arrays; import java.util.Stack; /** * In the classic problem of the Towers of Hanoi, you have 3 towers and N disks of diffierent sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order of size from top to bottom (i.e., each disk...
src/CrackingTheCodingInterview/HanoiTowers3d4.java
0.786295
0.635534
HanoiTowers3d4.java
starcoder
* WARNING: The use of G.729 may require a license fee and/or royalty fee in some countries and is * licensed by <a href="http://www.sipro.com">SIPRO Lab Telecom</a>. */ package org.atalk.impl.neomedia.codec.audio.g729; /** * General filter routines. * * @author <NAME> (translation of ITU-T C source code to Java)...
aTalk/src/main/java/org/atalk/impl/neomedia/codec/audio/g729/Filter.java
0.613815
0.404243
Filter.java
starcoder
package com.techelevator; public class Lecture { /* 1. Return the created array */ public int[] returnArray() { int[] array = {80,8080,443}; return array; } /* 2. Return the first element of the array */ public int returnFirstElement() { int[] portNumbers =...
Module_1-Basics/m1-w1d4-loops-and-arrays-lecture/src/main/java/com/techelevator/Lecture.java
0.747892
0.531331
Lecture.java
starcoder
package us.ihmc.commonWalkingControlModules.desiredFootStep; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import us.ihmc.euclid.matrix.RotationMatrix; import us.ihmc.euclid.referenceFrame.FramePoint3D; import us.ihmc.euclid.referenceFrame.FrameVector3D;...
ihmc-common-walking-control-modules/src/main/java/us/ihmc/commonWalkingControlModules/desiredFootStep/DesiredFootstepCalculatorTools.java
0.667148
0.701534
DesiredFootstepCalculatorTools.java
starcoder
package com.google.javascript.jscomp; import static com.google.common.truth.Truth.assertThat; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** * Tests for {@link MaybeReachingVariableUse}. * * <p>Each test case consist of a short code snippet that has an instruction lab...
test/com/google/javascript/jscomp/MaybeReachingVariableUseTest.java
0.70202
0.721486
MaybeReachingVariableUseTest.java
starcoder
package org.enso.table.data.column.storage; import java.util.Arrays; import java.util.BitSet; import java.util.Comparator; import org.enso.table.data.column.operation.map.MapOpStorage; import org.enso.table.data.column.operation.map.UnaryMapOperation; import org.enso.table.data.index.Index; import org.enso.table.data...
std-bits/table/src/main/java/org/enso/table/data/column/storage/ObjectStorage.java
0.881908
0.479626
ObjectStorage.java
starcoder
package org.openimaj.image.model.pixel; import org.openimaj.image.MBFImage; /** * Model of an orthotope/hyperrectangle/box in space. Everything inside classifies * as positive, everything outside as negative. * * @author <NAME> */ public class OrthotopePixelModel extends MBFPixelClassificationModel { private ...
image/image-feature-extraction/src/main/java/org/openimaj/image/model/pixel/OrthotopePixelModel.java
0.926587
0.418994
OrthotopePixelModel.java
starcoder
package seedu.address.model.course; import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import seedu.address.model.moduleinfo.ModuleInfoCode; /** * Represents course of the user that is...
src/main/java/seedu/address/model/course/Course.java
0.685423
0.5047
Course.java
starcoder
// http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing p...
engine/src/main/java/org/andresoviedo/android_3d_model_engine/services/gltf/jgltf_model/AccessorModel.java
0.916578
0.428771
AccessorModel.java
starcoder
package com.viro.core; import android.graphics.Color; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Text is a Geometry that renders strings of text. The properties of the Text determine the style * of the rendered string, and the bounds of the Text (width and height) determine the ar...
android/app/src/main/java/com/viro/core/Text.java
0.927425
0.567397
Text.java
starcoder
package Viewer.geom; import java.awt.Shape; import java.awt.geom.Path2D; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; /** * Methods to create star shapes */ public class Stars { /** * Create a star shape from the given parameters. * * @param centerX The x coor...
Monopoly/src/Viewer/geom/Stars.java
0.906497
0.680205
Stars.java
starcoder
package org.sagebionetworks.bridge.dynamodb; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; import static...
test/org/sagebionetworks/bridge/dynamodb/DynamoExternalIdDaoTest.java
0.65379
0.40592
DynamoExternalIdDaoTest.java
starcoder
package com.armadialogcreator.core.sv; import com.armadialogcreator.core.PropertyType; import com.armadialogcreator.expression.Env; import com.armadialogcreator.util.ColorUtil; import javafx.scene.paint.Color; import org.jetbrains.annotations.NotNull; /** Defines a color as an array. @author Kayler @since 05/22/2...
ADC Modules/ADC Core/src/com/armadialogcreator/core/sv/SVColorArray.java
0.853471
0.403009
SVColorArray.java
starcoder
package Algorithms.Utils; /** * Union Finder use by multiple algorithms * https://fr.wikipedia.org/wiki/Union-find */ public class UnionFind{ private int[] parent; private byte[] rank; private int count; /** * Initializes an empty union–find data structure with n sites * 0 through n-1. ...
src/Algorithms/Utils/UnionFind.java
0.938555
0.517327
UnionFind.java
starcoder
package ch.epfl.rigel.coordinates; import ch.epfl.rigel.astronomy.SiderealTime; import ch.epfl.rigel.math.Angle; import java.time.ZonedDateTime; import java.util.function.Function; import static java.lang.Math.asin; import static java.lang.Math.atan2; import static java.lang.Math.cos; import static java.lang.Math.si...
src/ch/epfl/rigel/coordinates/EquatorialToHorizontalConversion.java
0.941614
0.46217
EquatorialToHorizontalConversion.java
starcoder
import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ErrorTest0 { public static boolean debug = false; @Test public void test0001() throws Throwable { if (debug) System.out.format("%n...
elasticsearch/36884807b3cc9d660db4da062275c7fdbec8ba67/randoop_2/ErrorTest0.java
0.719088
0.481759
ErrorTest0.java
starcoder
package com.google.android.gms.maps.model; import android.os.Parcel; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.common.internal.zzw; import com.google.android.gms.common.internal.zzx; public class StreetViewPanoramaCamera implements SafeParcelable { publ...
delivery/app-release_source_from_JADX/com/google/android/gms/maps/model/StreetViewPanoramaCamera.java
0.899741
0.482002
StreetViewPanoramaCamera.java
starcoder
package com.example.lanusiv.myapplication; import android.util.Log; /** * Created by Leray on 2015/8/10. */ public class MathUtils { /** * calculate the length between two points * @param cx * @param cy * @param ax * @param ay * @return */ public static double sideLength(...
MyApplication2/app/src/main/java/com/example/lanusiv/myapplication/MathUtils.java
0.841272
0.510069
MathUtils.java
starcoder
package quek.undergarden.registry; import net.minecraft.item.Food; import net.minecraft.potion.EffectInstance; import net.minecraft.potion.Effects; public class UGFoods { public static final Food UNDERBEANS = (new Food.Builder().nutrition(3).saturationMod(0.2F).fast().build()); public static final Food ROAST...
src/main/java/quek/undergarden/registry/UGFoods.java
0.593491
0.410993
UGFoods.java
starcoder
package engine.graphics.shape; import engine.graphics.Geometry; import engine.graphics.mesh.MultiBufMesh; import engine.graphics.vertex.VertexDataBuf; import engine.graphics.vertex.VertexFormat; import engine.util.Color; import org.joml.Vector3f; import org.joml.Vector3fc; import org.lwjgl.BufferUtils; import java.ni...
graphics3d/src/main/java/engine/graphics/shape/Box.java
0.818229
0.583708
Box.java
starcoder
package seedu.clinicio.model.analytics.util; import static java.lang.Math.toIntExact; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.Month; import java.time.temporal.TemporalAdjusters; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import seedu.clinicio.model.an...
src/main/java/seedu/clinicio/model/analytics/util/DateUtil.java
0.895071
0.609117
DateUtil.java
starcoder
package com.pump.geom; import java.awt.geom.AffineTransform; import java.awt.geom.PathIterator; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; /** * A polyline that adds curvature to all nodes. * <p> * TODO: this is loosely based on my perception of how the Google Docs freehand *...
src/main/java/com/pump/geom/CurvedPolyline.java
0.663015
0.626381
CurvedPolyline.java
starcoder
package io.github._7isenko; import org.knowm.xchart.*; import org.knowm.xchart.style.Styler; import org.knowm.xchart.style.markers.SeriesMarkers; import javax.swing.*; import java.awt.*; import java.util.*; import java.util.concurrent.ThreadLocalRandom; /** * @author 7isenko */ public class GraphBuilder { pu...
src/main/java/io/github/_7isenko/GraphBuilder.java
0.654011
0.46308
GraphBuilder.java
starcoder
package hexagon.vecmat.vector; /** A vector is an element of a vector space. * Vectors of the same vector space may be summed, subtracted and scaled by a real number. <p> * * This interface provides methods for operations in common between vector spaces. * It is assumed that the implementing class uses integer num...
src/main/java/hexagon/vecmat/vector/IntVector.java
0.967945
0.879095
IntVector.java
starcoder
package tumor.carrier; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.List; import jam.bio.Propagator; import jam.math.DoubleUtil; import jam.math.JamRandom; import jam.util.CollectionUtil; import tumor.mutation.Mutation; /** * Represents a biological entity ...
src/tumor/carrier/Carrier.java
0.937096
0.541409
Carrier.java
starcoder
package pl.edu.agh.kis.core; import edu.uci.ics.jung.graph.Graph; import java.rmi.UnexpectedException; import java.util.ArrayList; import java.util.List; import pl.edu.agh.kis.core.data.Node; import pl.edu.agh.kis.core.data.StructNode; import pl.edu.agh.kis.exceptions.BadPatternException; import pl.edu.agh.kis.pattern...
Core/src/main/java/pl/edu/agh/kis/core/PatternExtractor.java
0.82151
0.421076
PatternExtractor.java
starcoder
package org.briljantframework.mimir.mds; import org.apache.commons.math3.exception.NotStrictlyPositiveException; import org.apache.commons.math3.linear.EigenDecomposition; import org.briljantframework.Check; import org.briljantframework.array.Arrays; import org.briljantframework.array.DoubleArray; import org.briljant...
mimir-core/src/main/java/org/briljantframework/mimir/mds/MultidimensionalScaling.java
0.822759
0.418043
MultidimensionalScaling.java
starcoder
package pulse.problem.schemes.rte.dom; import pulse.math.linear.Matrices; import pulse.math.linear.SquareMatrix; import pulse.math.linear.Vector; import pulse.util.Descriptive; /** * The Butcher tableau coefficients used by the explicit Runge-Kutta solvers. * Variable names correspond to the standard notations. * ...
src/main/java/pulse/problem/schemes/rte/dom/ButcherTableau.java
0.915854
0.450782
ButcherTableau.java
starcoder
package org.tribuo.regression; import com.oracle.labs.mlrg.olcut.util.MutableDouble; import com.oracle.labs.mlrg.olcut.util.MutableLong; import com.oracle.labs.mlrg.olcut.util.MutableNumber; import com.oracle.labs.mlrg.olcut.util.Pair; import org.tribuo.ImmutableOutputInfo; import org.tribuo.MutableOutputInfo; import ...
Regression/Core/src/main/java/org/tribuo/regression/RegressionInfo.java
0.920119
0.499756
RegressionInfo.java
starcoder
package controller_msgs.msg.dds; import us.ihmc.communication.packets.Packet; import us.ihmc.euclid.interfaces.Settable; import us.ihmc.euclid.interfaces.EpsilonComparable; import java.util.function.Supplier; import us.ihmc.pubsub.TopicDataType; /** * This message is part of the IHMC whole-body controller API....
ihmc-interfaces/src/main/generated-java/controller_msgs/msg/dds/EuclideanTrajectoryPointMessage.java
0.826642
0.455744
EuclideanTrajectoryPointMessage.java
starcoder
package org.smoothbuild.acceptance.lang; import static com.google.common.truth.Truth.assertThat; import java.io.IOException; import org.junit.jupiter.api.Test; import org.smoothbuild.acceptance.AcceptanceTestCase; import okio.ByteString; public class BlobLiteralTest extends AcceptanceTestCase { @Test public vo...
src/acceptance/org/smoothbuild/acceptance/lang/BlobLiteralTest.java
0.818773
0.486514
BlobLiteralTest.java
starcoder
* @test * @bug 6405536 8042967 * @summary basic test of SHA1withECDSA and NONEwithECDSA signing/verifying * @author <NAME> * @library /test/lib .. * @library ../../../../java/security/testlibrary * @key randomness * @modules jdk.crypto.cryptoki * @run main/othervm TestECDSA * @run main/othervm -Djava.security...
test/jdk/sun/security/pkcs11/ec/TestECDSA.java
0.71721
0.420897
TestECDSA.java
starcoder
package alb.util.money; import java.util.Currency; import java.math.BigDecimal; /* * Created on Jun 24, 2004 * * A class for handling numeric calculation, rounding and currency. * This class is extracted from "Patterns of Enterprise Application Architecture" by <NAME>ler. * http://www.martinfowler.com/eaaCatalog...
AlbUtil/src/alb/util/money/Money.java
0.896673
0.415077
Money.java
starcoder
package data_structure; import java.io.Serializable; import java.util.ArrayList; import data_structure.Pair; /** * This class implements sparse matrix, containing empty values for most space. * * @author <NAME> * @since 2012. 4. 20 * @version 1.1 */ public class SparseMatrix implements Serializabl...
ijcai18-vals-master/src/data_structure/SparseMatrix.java
0.887668
0.520374
SparseMatrix.java
starcoder
package code.docflow.utils; import static com.google.common.base.Preconditions.*; /** * Author: <NAME> (<EMAIL>) */ /** * Utility implementation of bit array manipulations, which highly required for rights managment logic. */ public final class BitArray { private final long[] bits; private final int size...
app/code/docflow/utils/BitArray.java
0.774796
0.436622
BitArray.java
starcoder
package org.nikita.renderer; import com.paulok777.formats.Image; import com.paulok777.formats.Pixel; import org.nikita.calculation.TriangleColorIntensitySolver; import org.nikita.geometry.*; import org.nikita.geometry.Vector; import org.nikita.structure.TriangleTree; import org.nikita.util.MapUtil; import java.io.IOE...
src/main/java/org/nikita/renderer/RayTracingObjRenderer.java
0.910682
0.537163
RayTracingObjRenderer.java
starcoder
package co.edu.unicesar.estructura.datos.taller2.models.collections.lists; import co.edu.unicesar.estructura.datos.taller2.models.collections.Contract; import java.util.function.Function; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.val; @Getter public class SimplyLinkedList<T> extends LinkedL...
src/main/java/co/edu/unicesar/estructura/datos/taller2/models/collections/lists/SimplyLinkedList.java
0.798933
0.443661
SimplyLinkedList.java
starcoder
package preclass.algorithm; import java.util.Arrays; /** * Computes the linear predictive model using the Levinson-Durbin algorithm. * Linear prediction assumes that a signal can be model as a linear combination * of previous samples, that is, the current sample x[i] can be modeled as: * <p/> * < * pre> x[i] = ...
src/preclass/algorithm/LinearPredictor.java
0.928263
0.673983
LinearPredictor.java
starcoder
package gov.nasa.pds.objectAccess.table; import java.math.BigInteger; import java.nio.ByteBuffer; import java.nio.charset.Charset; /** * Defines an adapter object for table fields that can * read the field value from a byte array or write the * field value into a byte array. Also has methods for * formatting th...
src/main/java/gov/nasa/pds/objectAccess/table/FieldAdapter.java
0.933537
0.688148
FieldAdapter.java
starcoder
package com.vaani.leetcode.linked_list; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Stack; /** * 31/07/2019 We are given a linked list with head as the first * node. Let's number the nodes in the list: node_1, node_2, node_3, ... etc. * * <p>Each node may have...
java/leetcode/src/main/java/com/vaani/leetcode/linked_list/NextGreaterNodeInLinkedList.java
0.850717
0.540257
NextGreaterNodeInLinkedList.java
starcoder
package com.mitchellbosecke.pebble.template; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * A stack data structure used to represent the scope of variables that are currently accessible. * Pushing a new...
pebble/src/main/java/com/mitchellbosecke/pebble/template/ScopeChain.java
0.90235
0.405272
ScopeChain.java
starcoder
package org.jzy3d.plot3d.primitives.enlightables; import org.jzy3d.colors.Color; import org.jzy3d.colors.ISingleColorable; import org.jzy3d.events.DrawableChangedEvent; import org.jzy3d.maths.BoundingBox3d; import org.jzy3d.maths.Coord3d; import org.jzy3d.maths.Utils; import org.jzy3d.painters.IPainter; import org.jzy...
jzy3d-core/src/main/java/org/jzy3d/plot3d/primitives/enlightables/EnlightableSphere.java
0.913661
0.459986
EnlightableSphere.java
starcoder
package org.cyclops.cyclopscore.ingredient.collection; import com.google.common.base.Function; import com.google.common.collect.Iterators; import org.cyclops.commoncapabilities.api.ingredient.IIngredientMatcher; import org.cyclops.commoncapabilities.api.ingredient.IngredientComponent; import javax.annotation.Nullable...
src/main/java/org/cyclops/cyclopscore/ingredient/collection/IngredientCollectionPrototypeMap.java
0.938266
0.506713
IngredientCollectionPrototypeMap.java
starcoder
package cc.mallet.grmm.inference; import java.util.*; import cc.mallet.grmm.types.*; import cc.mallet.types.Dirichlet; import cc.mallet.types.Multinomial; /** * Utility class for generating many useful kinds of random graphical * models. * Created: Mar 26, 2005 * * @author <A HREF="mailto:<EMAIL>><EMAIL></A> ...
src/twitter_nlp/mallet-2.0.6/src/cc/mallet/grmm/inference/RandomGraphs.java
0.813572
0.57344
RandomGraphs.java
starcoder
package org.gama.stalactite.query.builder; import java.util.Collection; import java.util.HashMap; import java.util.Map; /** * Storage of key-value pairs based on key {@link System#identityHashCode} to avoid loss of bean in classical {@link Map} : because those are based on * instance hashCode, beans can't be retrie...
core/src/main/java/org/gama/stalactite/query/builder/IdentityMap.java
0.858274
0.427695
IdentityMap.java
starcoder
package org.mini2Dx.core.playerdata; import com.badlogic.gdx.files.FileHandle; import org.mini2Dx.core.serialization.GameDataSerializable; import org.mini2Dx.core.serialization.annotation.Field; /** * Common interface for reading/writing player data, e.g. game saves, preferences, * etc. * * The location to save ...
core/src/main/java/org/mini2Dx/core/playerdata/PlayerData.java
0.87312
0.434401
PlayerData.java
starcoder
package utils.functions; import java.util.Objects; import java.util.function.Function; /** * {@link Function} that can throw checked {@link Exception}. * <p> * This is a functional interface whose functional method * is {@link #applyThrowing(Object)}. * * @param <T> the type of the input to the function * @par...
src/main/java/utils/functions/ThrowingFunction.java
0.9342
0.505493
ThrowingFunction.java
starcoder
package seedu.elisa.game; import java.util.LinkedList; import java.util.List; import javafx.scene.paint.Color; /** * Main logic class. Stores game's current state. * */ public class Snake { public static final Color COLOR = Color.CORNSILK; public static final Color DEAD = Color.RED; private Grid grid;...
src/main/java/seedu/elisa/game/Snake.java
0.943647
0.440349
Snake.java
starcoder
package student; import game.ExplorationState; import game.NodeStatus; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.Stack; /** * Cavern exploration and Orb finder based on depth-first search algorithm. * * @author <NAME> */ public class OrbFinder { final pri...
POP2/coursework-three/src/student/OrbFinder.java
0.796015
0.462109
OrbFinder.java
starcoder
import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class ErrorTest11 { public static boolean debug = false; @Test public void test5501() throws Throwable { if (debug) System.out.format("%...
elasticsearch/f3d63095dbcc985e24162fbac4ee0d6914dc757d/randoop_25/ErrorTest11.java
0.667039
0.438304
ErrorTest11.java
starcoder
package de.rub.nds.tlsattacker.core.protocol; import de.rub.nds.modifiablevariable.util.ArrayConverter; import de.rub.nds.tlsattacker.core.exceptions.ParserException; import de.rub.nds.tlsattacker.core.protocol.parser.context.ParserContext; import java.io.ByteArrayOutputStream; import java.math.BigInteger; import java...
TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/protocol/Parser.java
0.930703
0.434821
Parser.java
starcoder
package jinngine.geometry; import java.util.List; import jinngine.math.InertiaMatrix; import jinngine.math.Matrix3; import jinngine.math.Matrix4; import jinngine.math.Vector3; import jinngine.math.Transforms; import jinngine.physics.Body; public final class UniformCapsule implements Geometry, SupportMap3, Material { ...
jinngine/src/jinngine/geometry/UniformCapsule.java
0.791217
0.48987
UniformCapsule.java
starcoder
package jope; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; public class Hgd { private final static double TWO_32 = Math.pow(2, 32) - 1; private static final int bdPrecision = 20; private static final BigDecimal SQRT_PRE = new BigDecimal(10).pow(bdPrecision); // some ...
jope-master/src/jope/Hgd.java
0.784526
0.591546
Hgd.java
starcoder
package org.netbeans.modules.form.layoutdesign; import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Shape; public interface VisualMapper extends LayoutConstants { // String getTopComponentId(); /** * Provides actual bounds (position and size) of a component - as it appears * in t...
org-netbeans-modules-form/src/main/java/org/netbeans/modules/form/layoutdesign/VisualMapper.java
0.876185
0.428413
VisualMapper.java
starcoder
package com.lincolnschilli.jcr.drawing; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import java.util.ArrayList; public class Drawing { private ArrayList<Stroke> strokes; private Stroke currentStroke; private float width, ...
android/app/src/main/java/com/lincolnschilli/jcr/drawing/Drawing.java
0.876291
0.409339
Drawing.java
starcoder
package cgeo.geocaching.sensors; import android.support.annotation.NonNull; import java.util.concurrent.TimeUnit; import io.reactivex.BackpressureStrategy; import io.reactivex.Flowable; import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Composite...
main/src/cgeo/geocaching/sensors/GeoDirHandler.java
0.933522
0.465509
GeoDirHandler.java
starcoder
package com.satyam.problem.leetcode.medium; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.Set; /** LC #127 Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWo...
content/programming-realm/code_problems/src/main/java/com/satyam/problem/leetcode/medium/LC127WordLadder.java
0.917513
0.411761
LC127WordLadder.java
starcoder
package com.slinkydeveloper.assertjmigrator.migrations.common; import static com.slinkydeveloper.assertjmigrator.nodes.Predicates.*; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.function.Predicate; import com.github.javaparser.ast.expr.Expression; import com.github.j...
src/main/java/com/slinkydeveloper/assertjmigrator/migrations/common/EqualityMigrator.java
0.915318
0.66575
EqualityMigrator.java
starcoder
package frc.robot.oi.positions; import edu.wpi.first.wpilibj.Joystick; import frc.robot.brains.JoystickBrain; // The position values obtained from a Joystick public class JoystickPosition { public double forwardBackPosition = 0; // y Forward & Backward public double sideToSidePosition = 0; // x Side to Side...
src/main/java/frc/robot/oi/positions/JoystickPosition.java
0.610221
0.425605
JoystickPosition.java
starcoder
package com.github.jozsefkoza.webdriver.network.source; import static com.google.common.base.Preconditions.checkArgument; import static java.util.Collections.emptyList; import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toList; import java.util.Collection; import java.util.List;...
browsermob/src/main/java/com/github/jozsefkoza/webdriver/network/source/PollingTrafficSource.java
0.932145
0.400896
PollingTrafficSource.java
starcoder
package com.sun.me.web.atom; /** * This class encodes a user name and password * in the format (base 64) that HTTP Basic * Authorization requires. * * @see http://java.sun.com/docs/books/j2mewireless/examples/src/examples/netclient/BasicAuth.java */ public class BasicAuth { // make sure no one can instantia...
lib/atom/src/com/sun/me/web/atom/BasicAuth.java
0.826782
0.408395
BasicAuth.java
starcoder
package androidx.car.widget; import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static ...
car/core/src/androidTest/java/androidx/car/widget/DividerVisibilityManagerTest.java
0.857037
0.402744
DividerVisibilityManagerTest.java
starcoder
package com.typee.model.engagement; import java.time.DateTimeException; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Objects; /** * Represents the time slot during which an engagement is held. */ public class TimeSlot { public static final String MESSAGE_CONSTRAIN...
src/main/java/com/typee/model/engagement/TimeSlot.java
0.939533
0.585812
TimeSlot.java
starcoder
package selver.smartmissiles.agents; import selver.smartmissiles.physics.PhysicsManager; import selver.smartmissiles.physics.Vector2; import selver.smartmissiles.ui.gPanel; import java.awt.*; import java.util.ArrayList; public class Missile extends Agent { public float arrivalTick; private Integer width...
src/main/java/selver/smartmissiles/agents/Missile.java
0.622
0.504394
Missile.java
starcoder
package org.myworldgis.projection; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.LineString; import com.vividsolutions.jts.geom.MultiLineString; import com.vividsolutions.jts.geom.MultiPolygon; import com.vividsolutions.jts.geom.Point; import com.vividsolutions.jts.geom.Polygon; im...
src/org/myworldgis/projection/Geographic.java
0.898411
0.405508
Geographic.java
starcoder
public class UnionFind { private int components; // number of disjoint components private int parent[], // parent of a particular component size[]; // size of component rooted at i // however, i should be root of a component // initialize a union find ...
Data Structures/UnionFind/java/UnionFind.java
0.802401
0.619845
UnionFind.java
starcoder
package io.github.astrapi69.tree.api; import java.util.LinkedList; import java.util.List; /** * The interface {@link ILinkedNode} represents a chainable object with a generic value * * @param <T> * the generic type of the value */ public interface ILinkedNode<T> { /** * Gets the first {@link ILink...
src/main/java/io/github/astrapi69/tree/api/ILinkedNode.java
0.911355
0.426262
ILinkedNode.java
starcoder
package com.opengamma.integration.marketdata; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import org.fudgemsg.FudgeMsg; import org.threeten.bp.ZonedDateTime; import...
projects/integration-bloomberg/src/main/java/com/opengamma/integration/marketdata/RecordedBloombergLiveDataServer.java
0.890032
0.461563
RecordedBloombergLiveDataServer.java
starcoder
package com.k10ud.certs.util; import java.io.*; import java.util.BitSet; public class BloomFilter { private static final byte[] bitvalues = new byte[]{ (byte) 0x01, (byte) 0x02, (byte) 0x04, (byte) 0x08, (byte) 0x10, (byte) 0x20, ...
src/main/java/com/k10ud/certs/util/BloomFilter.java
0.713332
0.423518
BloomFilter.java
starcoder
package katas.java.yahtzee; import org.junit.Test; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; public class YahtzeeTest { @Test public void testOnes() { Yahtzee yahtzee = new Yahtzee(1, 1, 2, 4, 4); ...
java/src/main/java/katas/java/yahtzee/YahtzeeTest.java
0.73077
0.601067
YahtzeeTest.java
starcoder
import java.util.Arrays; class SpiralMatrix { // A two-dimensional matrix that starts with 1 in the middle and grows in spiral fashion: // size 1: // 1 // size 3: // 5 4 3 // 6 1 2 // 7 8 9 // size 5: // 17 16 15 14 13 // 18 5 4 ...
java_challenges/lib/src/main/java/SpiralMatrix.java
0.684159
0.44553
SpiralMatrix.java
starcoder
package de.ralfhergert.math.geom; import org.alltiny.math.vector.Vector; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; /** * A face defined by multiple vertices. */ public class Face { private List<Vertex> ver...
src/main/java/de/ralfhergert/math/geom/Face.java
0.889006
0.562477
Face.java
starcoder
package org.jruby.bytelist; import java.io.UnsupportedEncodingException; import java.util.Arrays; import org.jcodings.specific.UTF8Encoding; import org.jcodings.specific.ASCIIEncoding; import junit.framework.TestCase; public class ByteListTest extends TestCase { public void testEmptyByteListHasZeroByteLength() {...
test/org/jruby/bytelist/ByteListTest.java
0.840259
0.50354
ByteListTest.java
starcoder
package org.aperlambda.lambdacommon.utils; import com.google.gson.*; import org.aperlambda.lambdacommon.utils.function.PairFunction; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.Serializable; import java.lang.reflect.Type; import java.util.*; import java.util.fun...
src/main/java/org/aperlambda/lambdacommon/utils/Pair.java
0.926856
0.418816
Pair.java
starcoder
public class Solution { /** * @param buildings: A list of lists of integers * @return: Find the outline of those buildings */ public class Point { int bldg; int x; int height; int status; public Point(int bldg, int x, int height, int status) { ...
Sweep_Line/131.The Skyline Problem/Solution_TreeSet.java
0.894657
0.458894
Solution_TreeSet.java
starcoder
package com.liyongquan.design; /** * 设计链表的实现。您可以选择使用单链表或双链表。单链表中的节点应该具有两个属性:val 和 next。val 是当前节点的值,next 是指向下一个节点的指针/引用。如果要使用双向链表,则还需要一个属性 prev 以指示链表中的上一个节点。假设链表中的所有节点都是 0-index 的。 * <p> * 在链表类中实现这些功能: * <p> * get(index):获取链表中第 index 个节点的值。如果索引无效,则返回-1。 * addAtHead(val):在链表的第一个元素之前添加一个值为 val 的节点。插入后,新节点将成为链表的第一个节...
src/main/java/com/liyongquan/design/MyLinkedList.java
0.507812
0.468122
MyLinkedList.java
starcoder
package com.igormaznitsa.prologparser.terms; import java.math.BigInteger; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.stream.IntStream; import static java.util.Objects.requireNonNull; /** * Representation of integer numeric term. */ public final class PrologInt ex...
src/main/java/com/igormaznitsa/prologparser/terms/PrologInt.java
0.917367
0.404802
PrologInt.java
starcoder
package com.zzhw.gtms.common.utils; import java.text.DateFormat; import java.util.Date; import org.apache.commons.lang3.StringUtils; public class GetterUtil { public static final boolean DEFAULT_BOOLEAN = false; public static final boolean[] DEFAULT_BOOLEAN_VALUES = new boolean[0]; public static final double D...
Gtms/GtmsCommon/src/main/java/com/zzhw/gtms/common/utils/GetterUtil.java
0.762424
0.415017
GetterUtil.java
starcoder
package org.apache.spark.sql.catalyst.expressions; /** * Helper functions for creating an {@link InterpretedUnsafeProjection}. */ public class InterpretedUnsafeProjection$ { /** * Static reference to the singleton instance of this Scala object. */ public static final InterpretedUnsafeProjection$ MODULE$ = ...
sql/catalyst/target/java/org/apache/spark/sql/catalyst/expressions/InterpretedUnsafeProjection$.java
0.942639
0.477128
InterpretedUnsafeProjection$.java
starcoder
package net.blueberrymc.world.level; import com.google.common.base.Preconditions; import com.mojang.math.Vector3d; import net.minecraft.core.BlockPos; import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.L...
Blueberry-API/src/main/java/net/blueberrymc/world/level/BlueberryLevelAccessor.java
0.744285
0.419588
BlueberryLevelAccessor.java
starcoder
package co.vaughnvernon.algotrader.domain.model.vwap; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import co.vaughnvernon.tradercommon.monetary.Money; import co.vaughnvernon.tradercommon.pricevolume.PriceVolume; public class VWAPAnalytic { protected static final int TRADABLE_QUO...
iddd_algotrader/src/main/java/co/vaughnvernon/algotrader/domain/model/vwap/VWAPAnalytic.java
0.865878
0.401776
VWAPAnalytic.java
starcoder
package cz.quinix.condroid.model; import java.io.Serializable; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.TimeZone; public class Pl...
Condroid/src/main/java/cz/quinix/condroid/model/PlaceHours.java
0.680666
0.427755
PlaceHours.java
starcoder
package pt.it.av.tnav.utils.structures.tree; import pt.it.av.tnav.utils.SortUtils; import pt.it.av.tnav.utils.Utils; import pt.it.av.tnav.utils.bla.Vector; import java.lang.reflect.Array; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.uti...
src/main/java/pt/it/av/tnav/utils/structures/tree/KDTree.java
0.868743
0.471284
KDTree.java
starcoder
package edu.cmu.cs.crystal.flow; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.MethodDeclaration; /** * All flow analyses must be able to return the information defined by this * interface. * * @author <NAME> * * @param <LE> */ public interface IFlowAnalysis<LE> { /** ...
CrystalPlugin/src/edu/cmu/cs/crystal/flow/IFlowAnalysis.java
0.806472
0.466177
IFlowAnalysis.java
starcoder
package cs3500.easyanimator.model; import cs3500.easyanimator.model.motions.IMotion; import cs3500.easyanimator.model.shapes.IShape; import cs3500.easyanimator.model.shapes.WidthHeight; /** * An IAnimatorModel is an interface describing what the model for an animation program will need * to do. It will need the abi...
src/cs3500/easyanimator/model/IAnimatorModel.java
0.87699
0.47993
IAnimatorModel.java
starcoder
package org.apache.fop.afp.modca; import java.io.IOException; import java.io.OutputStream; import org.apache.fop.afp.ioca.ImageCellPosition; import org.apache.fop.afp.ioca.ImageInputDescriptor; import org.apache.fop.afp.ioca.ImageOutputControl; import org.apache.fop.afp.ioca.ImageRasterData; /** * An IM image data...
src/java/org/apache/fop/afp/modca/IMImageObject.java
0.881977
0.463809
IMImageObject.java
starcoder
package it.unive.lisa.analysis.representation; import java.util.function.Function; /** * A {@link DomainRepresentation} in the form of a pair of elements. * * @author <a href="mailto:<EMAIL>"><NAME></a> */ public class PairRepresentation extends DomainRepresentation { /** * The left-most element. */ prote...
lisa/lisa-sdk/src/main/java/it/unive/lisa/analysis/representation/PairRepresentation.java
0.910617
0.518851
PairRepresentation.java
starcoder
package org.la4j.vector; import java.io.InputStream; import org.la4j.factory.Basic1DFactory; import org.la4j.factory.CRSFactory; import org.la4j.factory.Factory; import org.la4j.factory.SafeFactory; import org.la4j.io.MatrixMarketStream; import org.la4j.io.SymbolSeparatedStream; import org.la4j.matrix.Matrices; impor...
src/main/java/org/la4j/vector/Vectors.java
0.893379
0.559049
Vectors.java
starcoder
package org.apache.commons.configuration2.tree; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * <p> * An immutable default implementation for configuration nodes. * </p> ...
src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java
0.957427
0.509093
ImmutableNode.java
starcoder
package com.radixdlt.crypto.hdwallet; import com.radixdlt.utils.Bytes; import java.util.List; public final class DefaultHDKeyPairDerivation { private DefaultHDKeyPairDerivation() { throw new IllegalStateException("Can't construct."); } /** * Creates a {@link HDKeyPairDerivation} from some {@code seed} (typi...
radixdlt-java-common/src/main/java/com/radixdlt/crypto/hdwallet/DefaultHDKeyPairDerivation.java
0.94256
0.639173
DefaultHDKeyPairDerivation.java
starcoder