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 basicObjects.shapes; /** * @author <NAME> <<EMAIL>> * @version Version 1 * @since 1.6 */ import basicObjects.Dimensions; import basicObjects.Point; import junit.framework.Assert; import logic.MathEngine; import org.junit.Test; public class BoxTest { @Test public void testCopy() { Box box = new Box()...
Testing/BasicObjects/Shapes/BoxTest.java
0.781539
0.65586
BoxTest.java
starcoder
package org.graalvm.vm.x86.node; import org.graalvm.vm.memory.vector.Vector128; import org.graalvm.vm.memory.vector.Vector256; import org.graalvm.vm.memory.vector.Vector512; import org.graalvm.vm.x86.isa.AVXRegister; import com.oracle.truffle.api.CompilerAsserts; import com.oracle.truffle.api.CompilerDirectives; impo...
projects/org.graalvm.vm.x86/src/org/graalvm/vm/x86/node/AVXRegisterWriteNode.java
0.58059
0.412708
AVXRegisterWriteNode.java
starcoder
package freemarker.template; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.List; import freemarker.ext.beans.BeansWrapper; /** * A simple implementation of the {@link TemplateSequenceModel} interface, using its own underlying {@link List} for * storing the l...
src/main/java/freemarker/template/SimpleSequence.java
0.912099
0.504089
SimpleSequence.java
starcoder
package chapter1.section4; import edu.princeton.cs.algs4.StdOut; /** * Created by <NAME> on 23/10/16. */ public class Exercise25_Throwing2Eggs { public static void main(String[] args){ int[] array = {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
src/chapter1/section4/Exercise25_Throwing2Eggs.java
0.521959
0.464902
Exercise25_Throwing2Eggs.java
starcoder
package org.usfirst.frc4388.utility.math; import java.text.DecimalFormat; /** * A translation in a 2d coordinate frame. Translations are simply shifts in an (x, y) plane. */ public class Translation2d implements Interpolable<Translation2d> { protected static final Translation2d kIdentity = new Translation2d(); ...
2019robot/src/main/java/org/usfirst/frc4388/utility/math/Translation2d.java
0.954489
0.717074
Translation2d.java
starcoder
package org.encog.engine.network.activation; /** * Computationally efficient alternative to ActivationSigmoid. * Its output is in the range [0, 1], and it is derivable. * * It will approach the 0 and 1 more slowly than Sigmoid so it * might be more suitable to classification tasks than predictions tasks. * ...
src/org/encog/engine/network/activation/ActivationElliott.java
0.901584
0.421492
ActivationElliott.java
starcoder
package org.springframework.core.annotation; import org.springframework.core.BridgeMethodResolver; import org.springframework.core.annotation.MergedAnnotation.Adapt; import org.springframework.core.annotation.MergedAnnotations.SearchStrategy; import org.springframework.lang.Nullable; import org.springframework.util.Mu...
spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java
0.91949
0.426501
AnnotatedElementUtils.java
starcoder
package ru.andrewt; import java.util.Arrays; /** * The {@link ArrayUtils} class provides utility methods to manipulate with arrays. */ public final class ArrayUtils { private ArrayUtils() {} /** * Swaps two array elements. * * @param array Array. * @param first First element. * @param second Sec...
src/main/java/ru/andrewt/ArrayUtils.java
0.924925
0.62309
ArrayUtils.java
starcoder
package org.firstinspires.ftc.teamcode.PreseasonTest.MecanumLocalizers; import org.apache.commons.math3.linear.ArrayRealVector; import org.apache.commons.math3.linear.MatrixUtils; import org.apache.commons.math3.linear.RealMatrix; import org.apache.commons.math3.linear.RealVector; import org.openftc.revextensions2.Rev...
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/PreseasonTest/MecanumLocalizers/ICCLocalizer.java
0.698227
0.462352
ICCLocalizer.java
starcoder
package io.vavr.control; import io.vavr.*; import io.vavr.collection.Seq; import io.vavr.collection.Iterator; import io.vavr.collection.Vector; import java.io.Serializable; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Objects; import java.util.concurrent.Callable; import java.uti...
vavr/src/main/java/io/vavr/control/Try.java
0.87168
0.472075
Try.java
starcoder
package net.imglib2.algorithm.convolution; import net.imglib2.RandomAccess; import net.imglib2.type.Type; /** * The interesting part of a separable convolution is how one line of the image * is convolved. An implementation of {@link LineConvolverFactory} needs to do * exactly this: Convolve one line of the image. ...
src/main/java/net/imglib2/algorithm/convolution/LineConvolverFactory.java
0.906369
0.572812
LineConvolverFactory.java
starcoder
package org.apache.hadoop.record; import java.io.UnsupportedEncodingException; /** * A byte sequence that is used as a Java native type for buffer. It is * resizable and distinguishes between the count of the seqeunce and the current * capacity. * */ public class Buffer implements Comparable, Cloneable { /** N...
src/core/org/apache/hadoop/record/Buffer.java
0.90827
0.506652
Buffer.java
starcoder
package boofcv.struct.image; import org.jetbrains.annotations.Nullable; import java.lang.reflect.Array; /** * <p> * A base class for a single band intensity image. The image is an rectangular array where each pixel represents * an intensity measurement from an imaging sensor. Internally the pixels are stored a 1D...
main/boofcv-types/src/noauto/java/boofcv/struct/image/ImageGray.java
0.944919
0.766294
ImageGray.java
starcoder
package debroejm.simpleblend; /** * Interface representing a color blending algorithm. * A blending algorithm takes two float inputs representing * top and bottom color components to blend with, and returns * the resulting color component. * * In addition, the BlendAlgorithm interface specifies a * default meth...
src/main/java/debroejm/simpleblend/BlendAlgorithm.java
0.948334
0.549097
BlendAlgorithm.java
starcoder
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.ArrayList; /** * A RandomArtPanel draws random pictures which might be taken to have * some vague resemblance to abstract art. A new picture is produced every * four seconds. There are three types of pictures: random lines, * ran...
data/javanotes7.0.2-exercise-solutions/chapter7/RandomArt2.java
0.574992
0.424531
RandomArt2.java
starcoder
package shootergame.prop; import city.cs.engine.BoxShape; import city.cs.engine.Shape; import city.cs.engine.World; import org.jbox2d.common.Vec2; /** * Generates Arrays of blocks. This is used to make 2 dimensional terrains. The * terrain generator will auto texture the terrain. With this you can set the * le...
src/shootergame/prop/GenerateBlock.java
0.758958
0.430506
GenerateBlock.java
starcoder
package net.codestory.http.misc; import static java.util.Objects.*; import java.util.*; import java.util.function.*; import java.util.stream.*; @FunctionalInterface public interface Fluent<T> extends Iterable<T> { Stream<T> stream(); static <T> Fluent<T> of() { return Stream::empty; } @SafeVarargs st...
src/main/java/net/codestory/http/misc/Fluent.java
0.899265
0.613468
Fluent.java
starcoder
package io.joyrpc.util.concurrenttrees.radix.node.concrete.charsequence; import io.joyrpc.util.concurrenttrees.radix.node.Node; import java.util.Collections; import java.util.List; /** * Stores incoming edge as a {@link CharSequence} (a <i>view</i> onto the original key) rather than copying the * edge into a chara...
joyrpc-core/src/main/java/io/joyrpc/util/concurrenttrees/radix/node/concrete/charsequence/CharSequenceNodeLeafWithValue.java
0.862525
0.483831
CharSequenceNodeLeafWithValue.java
starcoder
package org.wso2.carbon.dataservices.sql.driver.parser; import java.sql.SQLException; import java.util.Map; import org.wso2.carbon.dataservices.sql.driver.processor.reader.DataRow; import org.wso2.carbon.dataservices.sql.driver.processor.reader.DataTable; public class Condition { private Condition lhs; pri...
components/data-services/org.wso2.carbon.dataservices.sql.driver/src/main/java/org/wso2/carbon/dataservices/sql/driver/parser/Condition.java
0.895808
0.446796
Condition.java
starcoder
package androidx.constraintLayout.desktop.constraintRendering.drawing; /** * Simple class encapsulating a basic transform (scale + translate). * Used to draw from one coordinate system (android) to another (swing) */ public class ViewTransform { float dx; float dy; float scale = 1; /** * Retur...
desktop/ConstraintLayoutInspector/app/src/androidx/constraintLayout/desktop/constraintRendering/drawing/ViewTransform.java
0.950007
0.599895
ViewTransform.java
starcoder
package scratch.kevin.simulators.ruptures.rotation; import java.util.ArrayList; import java.util.List; import org.opensha.commons.calc.FaultMomentCalc; import org.opensha.commons.geo.Location; import org.opensha.commons.geo.LocationUtils; import org.opensha.commons.geo.LocationVector; import org.opensha.commons.util....
src/scratch/kevin/simulators/ruptures/rotation/GPRotatedRupture.java
0.775052
0.40389
GPRotatedRupture.java
starcoder
package com.yxy.algorithms.array.k.diff.pairs; import java.util.HashMap; import java.util.Map; /** * 532. K-diff Pairs in an Array Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j), where i and j are...
src/main/java/com/yxy/algorithms/array/k/diff/pairs/Solution3.java
0.899341
0.705747
Solution3.java
starcoder
package nl.weeaboo.common; import java.io.Serializable; /** * Padding amounts for top/right/bottom/left. */ @javax.annotation.concurrent.Immutable @com.google.errorprone.annotations.Immutable public final class Insets2D implements Serializable { private static final long serialVersionUID = 1L; public stat...
core/src/main/java/nl/weeaboo/common/Insets2D.java
0.942527
0.547948
Insets2D.java
starcoder
package bits.math3d; /** * Interpolation functions * * @author decamp */ public final class Interp { public static double bezier( double begin, double control, double end, double t ) { final double s = 1.0 - t; return s * s * begin + s * t * control + t * t * end; } public static ...
src/main/java/bits/math3d/Interp.java
0.79999
0.530358
Interp.java
starcoder
package org.jfree.data.xy; import java.util.Arrays; import java.util.Date; import org.jfree.util.PublicCloneable; /** * A simple implementation of the {@link OHLCDataset} interface. See also * the {@link DefaultOHLCDataset} class, which provides another implementation * that is very similar. */ publ...
jfreechart-1.0.14/source/org/jfree/data/xy/DefaultHighLowDataset.java
0.928449
0.500366
DefaultHighLowDataset.java
starcoder
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; /** * This class provides an empty implementation of {@link emlgVisitor}, * which can be extended to create a visitor which only needs to handle a subset * of the available methods. * * @param <T> The return type of the visit operation. Use {@link Void} f...
antler-ver/grammer/emlgBaseVisitor.java
0.852014
0.400691
emlgBaseVisitor.java
starcoder
package org.bytedeco.cuda.nppig; import java.nio.*; import org.bytedeco.javacpp.*; import org.bytedeco.javacpp.annotation.*; import static org.bytedeco.javacpp.presets.javacpp.*; import org.bytedeco.cuda.cudart.*; import static org.bytedeco.cuda.global.cudart.*; import org.bytedeco.cuda.nppc.*; import static org.byt...
cuda/src/gen/java/org/bytedeco/cuda/nppig/NppiResizeBatchCXR.java
0.880168
0.464598
NppiResizeBatchCXR.java
starcoder
package cf; import java.util.Arrays; /** * @author debmalyajash * */ public class PayingUp { /** * In the mysterious country of Byteland, everything is quite different from * what you'd normally expect. In most places, if you were approached by two * mobsters in a dark alley, they would probably tell you t...
src/main/java/cf/PayingUp.java
0.586878
0.418519
PayingUp.java
starcoder
package com.twu.biblioteca.view; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.twu.biblioteca.model.Book; import com.twu.biblioteca.model.Mov...
test/com/twu/biblioteca/view/BibliotecaViewTest.java
0.784567
0.419648
BibliotecaViewTest.java
starcoder
package net.coding.program.login.auth.qrscan; /** * Created by chenchao on 15/7/7. */ public class ResultPoint { private final float x; private final float y; public ResultPoint(float x, float y) { this.x = x; this.y = y; } public static void orderBestPatterns(ResultPoint[] patt...
app/src/main/java/net/coding/program/login/auth/qrscan/ResultPoint.java
0.843412
0.646913
ResultPoint.java
starcoder
package com.interview.codingblocks.week10DivideAndConquer; import java.util.Scanner; public class WinningCBScholarship { /* <NAME> decided to give 100% scholarships to the needy students by taking an admission test. However in order to avoid any losses at the institute, he came up with a solution. Cod...
src/com/interview/codingblocks/week10DivideAndConquer/WinningCBScholarship.java
0.678859
0.564819
WinningCBScholarship.java
starcoder
package problems.java.recursion; public class TravellingSalesman { /* Let's consider 4 points: A, B, C, D Distances between these points may be represented by a 2-D array: A B C D A: {0, 20, 42, 25} B: {20, 0, 30, 34} C: {42, 30, 0, 10} D: {25, 34, 10,...
2-content/14-Pure-Education/java-data-struc/java-problems/src/main/java/problems/java/recursion/TravellingSalesman.java
0.535827
0.480966
TravellingSalesman.java
starcoder
package aims.ereefs.netcdf.aggregator; import aims.ereefs.netcdf.aggregator.operators.factory.PipelineFactory; import aims.ereefs.netcdf.aggregator.operators.pipeline.BasicPipeline; import aims.ereefs.netcdf.aggregator.operators.pipeline.Pipeline; import aims.ereefs.netcdf.aggregator.time.TimeAggregatorHelper; import ...
src/main/java/aims/ereefs/netcdf/aggregator/AbstractAggregator.java
0.88779
0.409988
AbstractAggregator.java
starcoder
package org.poly2tri.triangulation.sets; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.poly2tri.triangulation.TriangulationContext; import org.poly2tri.triangulation.TriangulationMode; import org.poly2tri.triangulation.TriangulationPoint; /** * Extends the PointSet by addi...
src/main/java/org/poly2tri/triangulation/sets/ConstrainedPointSet.java
0.837188
0.511046
ConstrainedPointSet.java
starcoder
package smile.plot; import java.awt.Color; /** * A dendrogram is a tree diagram frequently used to illustrate the arrangement * of the clusters produced by hierarchical clustering. * * @author <NAME> */ public class Dendrogram extends Plot { /** * The one end points of lines. */ private double...
SmilePlot/src/smile/plot/Dendrogram.java
0.930797
0.668542
Dendrogram.java
starcoder
package impl.org.controlsfx.tools.rectangle.change; import impl.org.controlsfx.tools.rectangle.Edge2D; import javafx.geometry.Orientation; import javafx.geometry.Point2D; import javafx.geometry.Rectangle2D; /** * A strategy which enlarges an existing rectangle to the north. */ public class ToNorthChangeStrategy ext...
controlsfx/src/main/java/impl/org/controlsfx/tools/rectangle/change/ToNorthChangeStrategy.java
0.919077
0.563858
ToNorthChangeStrategy.java
starcoder
package java.nio.file; import java.util.Iterator; import java.io.Closeable; import java.io.IOException; /** * An object to iterate over the entries in a directory. A directory stream * allows for the convenient use of the for-each construct to iterate over a * directory. * * <p> <b> While {@code DirectoryStream}...
src/org/example/source/java/nio/file/DirectoryStream.java
0.908408
0.405331
DirectoryStream.java
starcoder
package alluxio.multi.process; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList.Builder; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; /** * Class for coordinating betwee...
minicluster/src/main/java/alluxio/multi/process/PortCoordination.java
0.755276
0.426202
PortCoordination.java
starcoder
package com.freetymekiyan.algorithms.other; import java.util.ArrayList; import java.util.List; /** * Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find * all possible words that can be formed by a sequence of adjacent characters. Note that we can move ...
src/main/java/com/freetymekiyan/algorithms/other/FindWords.java
0.909106
0.424949
FindWords.java
starcoder
package dp; /** * <pre> * * There are N piles of stones arranged in a row. The i-th pile has stones[i] stones. * * A move consists of merging exactly K consecutive piles into one pile, and the cost * of this move is equal to the total number of stones in these K piles. * * Find the minimum cost to merge all ...
arrows/src/main/java/dp/Leetcode1000MinimumCostToMergeStones.java
0.871352
0.617224
Leetcode1000MinimumCostToMergeStones.java
starcoder
package boofcv.factory.filter.convolve; import boofcv.abst.filter.convolve.ImageConvolveSparse; import boofcv.alg.filter.convolve.ConvolveImageSparse; import boofcv.core.image.GeneralizedImageOps; import boofcv.struct.border.ImageBorder_F32; import boofcv.struct.border.ImageBorder_S32; import boofcv.struct.convolve.*;...
main/boofcv-ip/src/main/java/boofcv/factory/filter/convolve/FactoryConvolveSparse.java
0.860046
0.664343
FactoryConvolveSparse.java
starcoder
package com.google.cloud.vision.v1p3beta1; public interface FaceAnnotationOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p3beta1.FaceAnnotation) com.google.protobuf.MessageOrBuilder { /** * * * <pre> * The bounding polygon around the face. The coordina...
google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotationOrBuilder.java
0.917485
0.552721
FaceAnnotationOrBuilder.java
starcoder
package io.github.shniu.arts.algothrim.graph.traversal; import java.util.Deque; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.Queue; import java.util.Set; /** * Traversal */ public class GraphTraversal { /** * DFS 非递归实现的核心是借助Stack和已访问节点的集合。 * * @param graph 图 ...
eco-notes/arts/src/main/java/io/github/shniu/arts/algothrim/graph/traversal/GraphTraversal.java
0.828835
0.402656
GraphTraversal.java
starcoder
package mil.nga.geopackage.io; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; /** * Result from {@link SQLExec} containing tables, columns, column widths, rows, * and values * * @author osbornb * @since 3.3.0 */ public class...
src/main/java/mil/nga/geopackage/io/SQLExecResult.java
0.908529
0.472805
SQLExecResult.java
starcoder
package org.spoofax.jsglr2.stack; import java.util.ArrayList; import java.util.List; import org.metaborg.parsetable.IState; import org.spoofax.jsglr2.parseforest.AbstractParseForest; import org.spoofax.jsglr2.parseforest.ParseForestManager; import org.spoofax.jsglr2.parser.Parse; import org.spoofax.jsglr2.stack.paths...
org.spoofax.jsglr2/src/main/java/org/spoofax/jsglr2/stack/StackManager.java
0.665411
0.423458
StackManager.java
starcoder
package edu.illinois.quicksel.basic; import edu.illinois.quicksel.Assertion; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; import java.util.Vector; public...
test/java/edu/illinois/quicksel/basic/AssertionReader.java
0.736116
0.465023
AssertionReader.java
starcoder
package org.chromium.chrome.browser.util; import android.support.test.filters.SmallTest; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.content.browser.test.Nati...
chrome/android/javatests/src/org/chromium/chrome/browser/util/UrlUtilitiesTest.java
0.830216
0.554109
UrlUtilitiesTest.java
starcoder
package net.finmath.time.daycount; import java.time.LocalDate; import java.time.Month; /** * Calculates the day count using the US 30/360 adjusted method. The daycount is calculated via * <code> * (endDateYear - startDateYear) * 360.0 + (endDateMonth - startDateMonth) * 30.0 + (endDateDay - startDateDay) * </cod...
src/main/java/net/finmath/time/daycount/DayCountConvention_30U_360.java
0.860266
0.481027
DayCountConvention_30U_360.java
starcoder
package com.google.android.exoplayer.dash.mpd; import com.google.android.exoplayer.C; import com.google.android.exoplayer.dash.DashSegmentIndex; import com.google.android.exoplayer.util.Util; import java.util.List; /** * An approximate representation of a SegmentBase manifest element. */ public abstract class Segm...
library/src/main/java/com/google/android/exoplayer/dash/mpd/SegmentBase.java
0.962108
0.422922
SegmentBase.java
starcoder
package cn.lee.hackerrank.tutorials.code30days; import java.util.Scanner; /** * <pre> * Objective * In this challenge, you'll work with arithmetic operators. Check out the Tutorial tab for learning materials and an instructional video! * * Task * Given the meal price (base cost of a meal), tip percent (the ...
src/main/java/cn/lee/hackerrank/tutorials/code30days/Day02_Operators.java
0.793186
0.544922
Day02_Operators.java
starcoder
package com.castellanos94.datatype; /* *@author <NAME>, Alejandro *@since 22/03/202 */ public abstract class Data extends Number implements Comparable<Number> { private static final long serialVersionUID = -7730849596544487990L; abstract public Data times(Number b); abstract public Data plus(Number b); ...
src/main/java/com/castellanos94/datatype/Data.java
0.838713
0.476275
Data.java
starcoder
package org.apache.solr.util.hll; /** * A serialization schema for HLLs. Reads and writes HLL metadata to and from <code>byte[]</code> * representations. */ public interface ISchemaVersion { /** * The number of metadata bytes required for a serialized HLL of the specified type. * * @param type the type o...
solr/core/src/java/org/apache/solr/util/hll/ISchemaVersion.java
0.896399
0.425486
ISchemaVersion.java
starcoder
package android.opengl; import javax.microedition.khronos.opengles.GL10; /** * Matrix math utilities. These methods operate on OpenGL ES format * matrices and vectors stored in float arrays. * * Matrices are 4 x 4 column-vector matrices stored in column-major * order: * <pre> * m[offset + 0] m[offset + 4] m...
com.intel.jsdroid/src/android/opengl/Matrix.java
0.91501
0.552962
Matrix.java
starcoder
package org.apache.commons.math3.analysis.integration.gauss; import java.math.BigDecimal; import org.apache.commons.math3.util.Pair; /** * Class that provides different ways to compute the nodes and weights to be * used by the {@link GaussIntegrator Gaussian integration rule}. * * @since 3.1 * @version $Id: Gau...
src/org/apache/commons/math3/analysis/integration/gauss/GaussIntegratorFactory.java
0.968723
0.711544
GaussIntegratorFactory.java
starcoder
package com.ericc.the.game.utils; import com.badlogic.gdx.utils.Bits; public class RectangularBitset { protected final int width; protected final int height; protected final Bits backingBitset; public RectangularBitset(int width, int height) { this.width = width; this.height = height...
core/src/com/ericc/the/game/utils/RectangularBitset.java
0.922058
0.589628
RectangularBitset.java
starcoder
package seedu.medmoriser.model.qanda; import static java.util.Objects.requireNonNull; import static seedu.medmoriser.commons.util.CollectionUtil.requireAllNonNull; import java.util.Iterator; import java.util.List; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import seedu.medmori...
src/main/java/seedu/medmoriser/model/qanda/UniqueQAndAList.java
0.888771
0.419172
UniqueQAndAList.java
starcoder
package com.opengamma.financial.analytics.conversion; import javax.time.calendar.ZonedDateTime; import org.apache.commons.lang.Validate; import com.opengamma.OpenGammaRuntimeException; import com.opengamma.core.security.SecuritySource; import com.opengamma.financial.analytics.model.forex.ForexUtils; import com.openg...
projects/OG-Financial/src/com/opengamma/financial/analytics/conversion/ForexSecurityConverter.java
0.736401
0.447158
ForexSecurityConverter.java
starcoder
package us.ihmc.footstepPlanning.graphSearch.graph; import us.ihmc.euclid.tools.EuclidCoreRandomTools; import us.ihmc.euclid.tuple2D.Point2D; import us.ihmc.robotics.robotSide.RobotSide; import java.util.ArrayList; import java.util.List; import java.util.Random; public class DiscreteFootstep { private final Latti...
ihmc-footstep-planning/src/main/java/us/ihmc/footstepPlanning/graphSearch/graph/DiscreteFootstep.java
0.928425
0.561095
DiscreteFootstep.java
starcoder
package de.up.ling.irtg.sampling; import de.up.ling.irtg.automata.Rule; import de.up.ling.irtg.automata.TreeAutomaton; import de.up.ling.tree.Tree; /** * This interface represents the target distribution for sampling and the auxiliary * distribution. * * All probability are only computed when the implementing cl...
src/main/java/de/up/ling/irtg/sampling/RuleWeighting.java
0.87198
0.551574
RuleWeighting.java
starcoder
package io.github.green4j.jelly; public final class FlyweightStringBuilder implements JsonStringBuilder { private CharSequence buffer; private int start; private int len; public FlyweightStringBuilder() { } public CharSequence buffer() { return buffer; } public int start() {...
src/main/java/io/github/green4j/jelly/FlyweightStringBuilder.java
0.880258
0.422624
FlyweightStringBuilder.java
starcoder
package deitel.tests.graphicsExercises.watch; import deitel.graphicsExercises.watch.Time; import java.util.Arrays; import java.util.Collection; import java.util.regex.Pattern; import org.junit.Test; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import org.junit.runner.RunWi...
tests/graphicsExercises/watch/TimeTest.java
0.835785
0.635802
TimeTest.java
starcoder
package com.cargame.gameObjects; import com.badlogic.gdx.math.Vector2; /** * Created by isaias on 19/11/16. * @author <NAME>. */ public class PlayerCar extends Car { private boolean isAlive; private float positionIniX; private float positionIniX2; public PlayerCar(float posX, float posY, int widt...
core/src/com/cargame/gameObjects/PlayerCar.java
0.847527
0.400192
PlayerCar.java
starcoder
package org.omnaest.utils; import java.lang.ref.SoftReference; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.function.Supplier; import org.omnaest.utils.element.cached.CachedElement; /** * Helper for operations regarding {@link Supplier}s * * @author omnaest *...
src/main/java/org/omnaest/utils/SupplierUtils.java
0.918079
0.508178
SupplierUtils.java
starcoder
package io.lettuce.core.dynamic.support; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.util.List; import java.util.Map; /** * Interface to access types and resolving generics on the way. */ public interface Ty...
src/main/java/io/lettuce/core/dynamic/support/TypeInformation.java
0.918608
0.439386
TypeInformation.java
starcoder
package hr.fer.zemris.trisat.util; import hr.fer.zemris.trisat.*; import java.util.*; import java.util.regex.Pattern; public class Util { private static final Pattern COMPILE = Pattern.compile(""); /** * Calculates fit function for provided <i>x</i> as determined by lowest lvl, by * {@link Clause#isSatisfied...
hw01-0036506587/src/main/java/hr/fer/zemris/trisat/util/Util.java
0.848596
0.413684
Util.java
starcoder
package org.briljantframework.data.index; import org.briljantframework.data.reader.DataEntry; import org.briljantframework.data.resolver.Resolve; import org.briljantframework.data.vector.Vector; /** * @author <NAME> */ public interface VectorLocationSetter { /** * Add NA at {@code index}. If {@code index > si...
briljant-core/src/main/java/org/briljantframework/data/index/VectorLocationSetter.java
0.888111
0.527499
VectorLocationSetter.java
starcoder
package com.google.dataflow.v1beta3; /** * <pre> * Specifies the processing model used by a * [google.dataflow.v1beta3.Job], which determines the way the Job is * managed by the Cloud Dataflow service (how workers are scheduled, how * inputs are sharded, etc). * </pre> * * Protobuf enum {@code google.dataflow...
google/dataflow/v1beta3/google-cloud-dataflow-v1beta3-java/proto-google-cloud-dataflow-v1beta3-java/src/main/java/com/google/dataflow/v1beta3/JobType.java
0.873916
0.451327
JobType.java
starcoder
package tech.tablesaw.api; import com.google.common.base.Preconditions; import it.unimi.dsi.fastutil.longs.*; import java.nio.ByteBuffer; import java.time.Instant; import java.time.ZoneOffset; import java.util.Iterator; import java.util.stream.LongStream; import tech.tablesaw.columns.AbstractColumnParser; import tech....
core/src/main/java/tech/tablesaw/api/LongColumn.java
0.728459
0.404155
LongColumn.java
starcoder
package me.dslztx.assist.util; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * @author dslztx */ public class ArrayAssist { public static boolean isEmpty(Object[] array) { if (array == null || array.length == 0) { return true; } return false...
assist-core/src/main/java/me/dslztx/assist/util/ArrayAssist.java
0.656768
0.410166
ArrayAssist.java
starcoder
package org.apache.flink.table.api.java; import org.apache.flink.annotation.PublicEvolving; import org.apache.flink.api.common.JobExecutionResult; import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.java.tuple.Tuple2; import org.apache.flink.streaming.api.datastream.DataStream; imp...
flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/java/StreamTableEnvironment.java
0.858452
0.413181
StreamTableEnvironment.java
starcoder
package stitching.model; import java.util.ArrayList; import java.util.Collection; public class Tile { final private float width; final public float getWidth(){ return width; } final private float height; final public float getHeight(){ return height; } /** * Local center coordinates of the {@link Tile}. ...
src-plugins/Stitching_/src/main/java/stitching/model/Tile.java
0.914425
0.573141
Tile.java
starcoder
package net.fortuna.ical4j.filter; import net.fortuna.ical4j.filter.expression.*; import java.time.temporal.Temporal; import java.util.Collection; import java.util.Date; import java.util.List; public interface FilterExpression { enum Op { // comparison operators.. equalTo, notEqualTo, in, notIn,...
src/main/java/net/fortuna/ical4j/filter/FilterExpression.java
0.863794
0.596463
FilterExpression.java
starcoder
// click to show follow up. // Follow up: // Did you use extra space? // A straight forward solution using O(mn) space is probably a bad idea. // A simple improvement uses O(m + n) space, but still not the best solution. // Could you devise a constant space solution? // Time will always be O(mxn) // 三板斧的优化过程,1是情况记录在...
Leetcode answer/[Array]73. Set Matrix Zeroes.java
0.57523
0.402216
[Array]73. Set Matrix Zeroes.java
starcoder
package Motion.PurePursuit; import java.util.ArrayList; import Motion.DriveToPoint.DriveToPoint; import State.StateMachine; import MathSystems.*; /** * Drives in a curve using the Pure Pursuit driving system * Essentially Pure Pursuit uses a circle around the robot intersecting with the path to compute motion */ ...
TeamCode/src/main/java/Motion/PurePursuit/PurePursuit.java
0.879574
0.664129
PurePursuit.java
starcoder
import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class RegressionTest8 { public static boolean debug = false; @Test public void test01() throws Throwable { if (debug) { System.out.format("%n%s%n","Regressio...
rgts/RegressionTest8.java
0.589835
0.503906
RegressionTest8.java
starcoder
package com.opengamma.analytics.financial.interestrate.cashflow; import java.util.ArrayList; import java.util.List; import org.threeten.bp.LocalDate; import com.opengamma.analytics.financial.instrument.InstrumentDefinitionVisitor; import com.opengamma.analytics.financial.instrument.InstrumentDefinitionVisitorAdapter...
projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/cashflow/AnnuityFixingDatesVisitor.java
0.884514
0.555254
AnnuityFixingDatesVisitor.java
starcoder
package org.lwjgl.opengl; import java.nio.*; import org.lwjgl.system.*; import static org.lwjgl.system.Checks.*; import static org.lwjgl.system.JNI.*; import static org.lwjgl.system.MemoryUtil.*; /** * Native bindings to the <a target="_blank" href="https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_multit...
modules/lwjgl/opengl/src/generated/java/org/lwjgl/opengl/ARBMultitexture.java
0.887089
0.442637
ARBMultitexture.java
starcoder
package io.bdeploy.bhive.op; import static io.bdeploy.common.util.RuntimeAssert.assertFalse; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import io.bdeploy.bhive.BHive; import io.bdeploy.bhive.audit.AuditParameterExtractor.AuditStrateg...
bhive/src/main/java/io/bdeploy/bhive/op/ManifestConsistencyCheckOperation.java
0.818047
0.427217
ManifestConsistencyCheckOperation.java
starcoder
* NearestNeighborIntersticeFactory.java * * Created on May 4, 2004, 3:50 PM */ package org.netbeans.swing.splitcontainer; import java.awt.Component; import java.awt.Point; import java.awt.Rectangle; import java.util.Arrays; import java.util.Comparator; /** * An IntersticeFactory which produces Interstice instan...
other/uberMetaSplitContainer/src/main/java/org/netbeans/swing/splitcontainer/NearestNeighborIntersticeFactory.java
0.905249
0.434461
NearestNeighborIntersticeFactory.java
starcoder
package org.sakaiproject.evaluation.logic; import java.util.List; import org.sakaiproject.evaluation.beans.EvalBeanUtils; import org.sakaiproject.evaluation.model.EvalAssignGroup; import org.sakaiproject.evaluation.model.EvalAssignHierarchy; import org.sakaiproject.evaluation.model.EvalAssignUser; import org.sakaipro...
evaluations/api/src/java/org/sakaiproject/evaluation/logic/EvalEvaluationSetupService.java
0.71423
0.444806
EvalEvaluationSetupService.java
starcoder
package com.bis.common.area; public class Line { private Point startPoint; private Point endPoint; private Double slope; private boolean vertical; private double b; public Line(Point startPoint, Point endPoint) { this.startPoint = startPoint; this.endPoint = endPoint; if (!en...
src/main/java/common/com/bis/common/area/Line.java
0.707708
0.436742
Line.java
starcoder
package yamahari.ilikewood.registry.woodtype; import yamahari.ilikewood.registry.objecttype.WoodenBlockType; import yamahari.ilikewood.registry.objecttype.WoodenItemType; import yamahari.ilikewood.registry.objecttype.WoodenTieredItemType; import java.util.Collections; import java.util.HashMap; import java.util.Map; i...
src/api/java/yamahari/ilikewood/registry/woodtype/DefaultWoodType.java
0.759493
0.436442
DefaultWoodType.java
starcoder
package algo.leetcode; import java.util.Arrays; import java.util.HashMap; import java.util.Map; public class SplitArrayAverage { public boolean splitArraySameAverage(int[] A) { return dfs(A, 0, 0, 0, 0, 0); } public boolean dfs(int[] A, int index, int a1, int a2, int count1, int count2) { ...
codes/src/algo/leetcode/SplitArrayAverage.java
0.620966
0.453322
SplitArrayAverage.java
starcoder
package org.bouncycastle.math.ec.custom.sec; import java.math.BigInteger; import org.bouncycastle.math.ec.ECFieldElement; import org.bouncycastle.math.raw.Mod; import org.bouncycastle.math.raw.Nat; import org.bouncycastle.math.raw.Nat224; import org.bouncycastle.util.Arrays; import org.bouncycastle.util.encoders.Hex;...
core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecP224R1FieldElement.java
0.830732
0.457743
SecP224R1FieldElement.java
starcoder
package chapter2.section2; import edu.princeton.cs.algs4.StdRandom; /** * Created by <NAME> on 12/02/17. */ @SuppressWarnings("unchecked") public class Exercise11_Improvements { private static final int CUTOFF = 15; public static void main(String[] args) { Comparable[] array = generateRandomArray(...
src/chapter2/section2/Exercise11_Improvements.java
0.750918
0.461138
Exercise11_Improvements.java
starcoder
package com.coship.rnkit.utils; /** * author: zoujunda * date: 2019/7/4 13:42 * version: 1.0 * description: One-sentence description */ public class HexUtils { /** * An array of lowercase characters used to create the output of hexadecimal characters */ private static final char[] DIGITS_...
android/src/main/java/com/coship/rnkit/utils/HexUtils.java
0.922839
0.445349
HexUtils.java
starcoder
package io.rtcore.sip.message.message.api.headers; import java.util.Optional; import com.google.common.base.Preconditions; /** * */ public final class RfcTimestamp { Integer timePartOne; Optional<Integer> timePartTwo; Optional<Integer> delayPartOne; Optional<Integer> delayPartTwo; public RfcTimestamp(I...
sip-parser/src/main/java/io/rtcore/sip/message/message/api/headers/RfcTimestamp.java
0.891428
0.519521
RfcTimestamp.java
starcoder
package com.fishercoder.solutions; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * 1387. Sort Integers by The Power Value * * The power of an integer x is defined as the number of steps needed to transform x into 1 using the following steps: * if x is even then x = x / 2 * ...
src/main/java/com/fishercoder/solutions/_1387.java
0.90882
0.602237
_1387.java
starcoder
package org.contextmapper.dsl.generators.contextmap; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertThrows; import org.contextmapper...
org.contextmapper.dsl.tests/src/org/contextmapper/dsl/generators/contextmap/ContextMapGeneratorTest.java
0.66454
0.429609
ContextMapGeneratorTest.java
starcoder
package io.improbable.keanu.vertices.dbl.probabilistic; import static io.improbable.keanu.distributions.dual.Diffs.A; import static io.improbable.keanu.distributions.dual.Diffs.B; import static io.improbable.keanu.distributions.dual.Diffs.X; import static io.improbable.keanu.tensor.TensorShape.shapeToDesiredRankByPrep...
keanu-project/src/main/java/io/improbable/keanu/vertices/dbl/probabilistic/InverseGammaVertex.java
0.947902
0.807423
InverseGammaVertex.java
starcoder
import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertThat; import java.io.IOException; import org.apache.hadoop.io.*; import org.junit.Test; public class TextTest extends WritableTestBase { @Test public void test() throws IOException { // vv TextTest Text t = new Text("hadoop"); ...
hadoop-book-src/ch04/src/main/java/TextTest.java
0.769687
0.688017
TextTest.java
starcoder
package com.google.phonenumbers.migrator; import com.google.common.base.CharMatcher; import com.google.common.collect.ImmutableList; import com.google.i18n.phonenumbers.metadata.DigitSequence; import com.google.i18n.phonenumbers.metadata.table.CsvTable; import com.google.i18n.phonenumbers.metadata.table.RangeKey; impo...
migrator/src/main/java/com/google/phonenumbers/migrator/MigrationFactory.java
0.884526
0.409604
MigrationFactory.java
starcoder
package hso.autonomy.agent.model.worldmodel.localizer; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; /** * Reference line that can be used for localization. * * @author <NAME> * */ public interface IReferenceLine { /** * Update the local position of the reference points of the line (rela...
src/hso/autonomy/agent/model/worldmodel/localizer/IReferenceLine.java
0.877962
0.613555
IReferenceLine.java
starcoder
package com.twu.biblioteca; import org.junit.Before; import org.junit.Test; import java.util.List; import static junit.framework.Assert.assertNull; import static junit.framework.Assert.assertSame; import static junit.framework.TestCase.assertFalse; import static org.junit.Assert.assertTrue; public class BookLibrar...
test/com/twu/biblioteca/BookLibraryTest.java
0.814016
0.428652
BookLibraryTest.java
starcoder
package org.apache.commons.geometry.euclidean.threed.line; import org.apache.commons.geometry.core.Transform; import org.apache.commons.geometry.euclidean.oned.Interval; import org.apache.commons.geometry.euclidean.threed.Vector3D; /** Class representing a convex subset of a line in 3D Euclidean space. Instances * n...
commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/line/LineConvexSubset3D.java
0.959903
0.582164
LineConvexSubset3D.java
starcoder
import java.util.ArrayList; import java.util.List; import java.util.Stack; class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; } } public class Solution { // 该方法体现的思路,可以应用于前序遍历、中序遍历和后序遍历 private enum Action { GO, ADDTORESULT } pri...
tree/Java/0144-binary-tree-preorder-traversal/src/Solution.java
0.788705
0.42477
Solution.java
starcoder
package stl.threebodysimulation; import org.apache.commons.math3.ode.FirstOrderDifferentialEquations; /** * A class that represents the differential equations, which govern the movement of three masses. */ class ParticleDifferentialEquations implements FirstOrderDifferentialEquations { /** * Universal gra...
src/main/java/stl/threebodysimulation/ParticleDifferentialEquations.java
0.957991
0.824179
ParticleDifferentialEquations.java
starcoder
package org.apache.hadoop.hdfs.server.namenode.startupprogress; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import java.util.TreeSet; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.util.Time; /** * StartupProgressView is an immutable, consistent, re...
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/startupprogress/StartupProgressView.java
0.93852
0.458652
StartupProgressView.java
starcoder
package core.game; import tools.Vector2d; /** * Created by Diego on 19/03/14. */ public class Observation implements Comparable<Observation> { /** * Category of this observation (static, resource, npc, etc.). */ public int category; /** * Type of sprite of this observation. */ ...
gvgai/src/main/java/core/game/Observation.java
0.913484
0.403949
Observation.java
starcoder
package org.matthiaszimmermann.location.egm96; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; import java.util.zip.GZIPInputStream; import org.matthiaszimmermann.location.Location; /** * offline <a href="https://en.wikipedia.org/wiki/Ge...
src/main/java/org/matthiaszimmermann/location/egm96/Geoid.java
0.632843
0.404537
Geoid.java
starcoder