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 georegression.fitting.cylinder; import georegression.misc.GrlConstants; import georegression.struct.point.Point3D_F64; import georegression.struct.shapes.Cylinder3D_F64; import org.ddogleg.fitting.modelset.ModelFitter; import org.ddogleg.optimization.FactoryOptimization; import org.ddogleg.optimization.Unconst...
main/src/georegression/fitting/cylinder/FitCylinderToPoints_F64.java
0.908333
0.498596
FitCylinderToPoints_F64.java
starcoder
package a2u.tn.utils.computer.calcobj.functions.forcollections; import a2u.tn.utils.computer.calcobj.ObjCalcEngine; import a2u.tn.utils.computer.formula.Formula; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class SubListTest { private ObjCalcEngine engine; ...
test/a2u/tn/utils/computer/calcobj/functions/forcollections/SubListTest.java
0.799912
0.505493
SubListTest.java
starcoder
package io.smallrye.reactive.groups; import io.smallrye.reactive.Uni; import io.smallrye.reactive.infrastructure.Infrastructure; import java.util.NoSuchElementException; import java.util.function.Supplier; import static io.smallrye.reactive.helpers.ParameterValidation.SUPPLIER_PRODUCED_NULL; import static io.smallry...
smallrye-reactive-operators/src/main/java/io/smallrye/reactive/groups/UniOnNull.java
0.863521
0.4575
UniOnNull.java
starcoder
package org.orekit.utils; import java.io.Serializable; import org.hipparchus.RealFieldElement; import org.hipparchus.analysis.differentiation.DSFactory; import org.hipparchus.analysis.differentiation.DerivativeStructure; import org.hipparchus.exception.LocalizedCoreFormats; import org.hipparchus.exception.MathIllegal...
src/main/java/org/orekit/utils/AngularCoordinates.java
0.954137
0.554712
AngularCoordinates.java
starcoder
package org.im97mori.ble.advertising.filter; import org.im97mori.ble.advertising.AdvertisingDataParser; import org.im97mori.ble.advertising.PublicTargetAddressAndroid; import org.junit.Test; import java.util.Arrays; import java.util.Collections; import java.util.LinkedList; import static org.im97mori.ble.constants.D...
advertising/src/androidTest/java/org/im97mori/ble/advertising/filter/PublicTargetAddressFilterTest.java
0.74055
0.534977
PublicTargetAddressFilterTest.java
starcoder
package com.leetcode.top100.medium; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; /** * Given a collection of distinct integers, return all possible permutations. * 给出一组不重复的整数,打印所有的排列组合 * * @author hitomeng * @date 2019/09/...
src/com/leetcode/top100/medium/Permutations.java
0.767603
0.402187
Permutations.java
starcoder
package com.bluegosling.collections.lists; import com.bluegosling.collections.CollectionUtils; import com.bluegosling.collections.MoreIterators; import com.bluegosling.tuples.Pair; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java...
src/com/bluegosling/collections/lists/UnrolledLinkedList.java
0.647798
0.436322
UnrolledLinkedList.java
starcoder
package indi.yume.tools.avocado.functional; import com.annimon.stream.function.ThrowableSupplier; import io.reactivex.functions.Action; import io.reactivex.functions.BiConsumer; import io.reactivex.functions.BiFunction; import io.reactivex.functions.Consumer; import io.reactivex.functions.Function; import io.reactive...
avocado-functional/src/main/java/indi/yume/tools/avocado/functional/Partial.java
0.517327
0.501953
Partial.java
starcoder
package tech.ferus.util.config.transformer; /** * Contains a bunch of basic transformers. */ public final class Transformers { // Basic List Transformers public static final ListTransformer<String> STRING_LIST = new ListTransformer<>(); public static final ListTransformer<Boolean> BOOLEAN_LIST = new Lis...
src/main/java/tech/ferus/util/config/transformer/Transformers.java
0.855081
0.459682
Transformers.java
starcoder
package org.apache.sis.referencing.operation; import org.opengis.util.FactoryException; import org.opengis.referencing.cs.CartesianCS; import org.opengis.referencing.cs.SphericalCS; import org.opengis.referencing.cs.EllipsoidalCS; import org.opengis.referencing.cs.CoordinateSystem; import org.opengis.referencing.datum...
core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/MathTransformContext.java
0.898059
0.449816
MathTransformContext.java
starcoder
package com.gojuno.hexgrid; import com.gojuno.morton.Morton64; public class HexGrid { private Orientation orientation; private Point origin; private Point size; private Morton64 mort; public HexGrid(Orientation orientation, Point origin, Point size, Morton64 mort) { this.orientation = ori...
src/main/java/com/gojuno/hexgrid/HexGrid.java
0.893843
0.455138
HexGrid.java
starcoder
package au.gov.asd.tac.constellation.graph.interaction.animation; import au.gov.asd.tac.constellation.graph.Graph; import au.gov.asd.tac.constellation.graph.GraphReadMethods; import au.gov.asd.tac.constellation.graph.GraphWriteMethods; import au.gov.asd.tac.constellation.graph.schema.visual.concept.VisualConcept; impo...
CoreInteractiveGraph/src/au/gov/asd/tac/constellation/graph/interaction/animation/FlyingAnimation.java
0.892761
0.44565
FlyingAnimation.java
starcoder
package de.vorb.tesseract.tools.training; import java.util.regex.Pattern; public class CharacterProperties { private final static int BIT_ALPHA = 0; private final static int BIT_LOWER = 1; private final static int BIT_UPPER = 2; private final static int BIT_DIGIT = 3; private final static int BIT_...
gui/tesseract4java-develop/tools/src/main/java/de/vorb/tesseract/tools/training/CharacterProperties.java
0.896987
0.470128
CharacterProperties.java
starcoder
package org.apache.commons.statistics.distribution; /** * Computes extended precision floating-point operations. * * <p>It is based on the 1971 paper * <a href="https://doi.org/10.1007/BF01397083"> * Dekker (1971) A floating-point technique for extending the available precision</a> * Numer. Math. 18, 224-242. *...
commons-statistics-distribution/src/main/java/org/apache/commons/statistics/distribution/ExtendedPrecision.java
0.955765
0.655577
ExtendedPrecision.java
starcoder
package com.example.android.basicglsurfaceview.example07.camera; import android.opengl.GLES20; import android.opengl.Matrix; import com.voyagegames.core.android.opengles.interfaces.ICamera; import com.voyagegames.core.android.opengles.interfaces.IRenderableBuffer; import com.voyagegames.core.android.opengles.modules....
BasicGLSurfaceView/src/com/example/android/basicglsurfaceview/example07/camera/ExampleShaderSet.java
0.826852
0.414484
ExampleShaderSet.java
starcoder
public class RoobikCube { private RoobikFace[] faces = new RoobikFace[6]; private static String[] colors = new String[] {"\u001B[37m" + "W" + "\u001B[0m", "\u001B[34m" + "B" + "\u001B[0m", "\u001B[35m" + "O" + "\u001B[0m", "\u001B[32m" + "G" + "\u001B[0m", "\u001B[33m" + "Y" + "\u001B[0m", "\u001B[31m" + "R" + ...
Java/Rubik's Cube Project/RoobikCube.java
0.704465
0.493775
RoobikCube.java
starcoder
package com.github.armedis.utils; /** * 박스형태의 로그를 출력하기 위한 유틸리티 클래스. * @author kris */ public class LogStringBuilder { /** * 화면에 출력할 로그의 길이. */ private static final int DISPLAY_LEN = 80; /** * 로그를 구분하기 위한 문자열 */ private static final char DEFAULT_CHAR = '='; /** * 줄바꿈 문...
src/main/java/com/github/armedis/utils/LogStringBuilder.java
0.809991
0.425367
LogStringBuilder.java
starcoder
package com.alipay.sofa.jraft.rhea.util; import java.util.HashMap; import java.util.IdentityHashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.TreeMap; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import com.alipay.sofa.jraft.rhea.util.concurre...
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/Maps.java
0.926528
0.467818
Maps.java
starcoder
package org.deeplearning4j.ui.api; import org.deeplearning4j.core.storage.StatsStorage; import org.deeplearning4j.core.storage.StatsStorageEvent; import org.deeplearning4j.ui.i18n.I18NResource; import java.util.Collection; import java.util.List; /** * UIModule encapsulates the user interface functionality for a pag...
deeplearning4j/deeplearning4j-ui-parent/deeplearning4j-vertx/src/main/java/org/deeplearning4j/ui/api/UIModule.java
0.866825
0.41182
UIModule.java
starcoder
package androidx.constraintlayout.motion.utils; /** * This performs a simple linear interpolation in multiple dimensions * * @hide */ public class LinearCurveFit extends CurveFit { private static final String TAG = "LinearCurveFit"; private double[] mT; private double[][] mY; private double mTotalL...
constraintlayout/constraintlayout/src/main/java/androidx/constraintlayout/motion/utils/LinearCurveFit.java
0.845002
0.575827
LinearCurveFit.java
starcoder
package org.locationtech.jts.operation.overlayng; import static org.locationtech.jts.operation.overlayng.OverlayNG.UNION; import java.util.Collection; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.PrecisionModel; import org.locationtech....
src/main/java/org/locationtech/jts/operation/overlayng/UnaryUnionNG.java
0.947442
0.435781
UnaryUnionNG.java
starcoder
package androidx.media3.common; import static androidx.media3.common.util.Assertions.checkNotNull; import static androidx.media3.common.util.BundleableUtil.fromBundleNullableList; import static androidx.media3.common.util.BundleableUtil.toBundleArrayList; import static java.util.Collections.max; import static java.uti...
libraries/common/src/main/java/androidx/media3/common/TrackSelectionOverrides.java
0.934768
0.416381
TrackSelectionOverrides.java
starcoder
package com.alibaba.alink.operator.common.evaluation; import org.apache.flink.util.Preconditions; import java.io.Serializable; import java.util.Arrays; /** * Confusion matrix for classification evaluation. * * <p>The horizontal axis is predictResult value, the vertical axis is label value. * * <p>[TP FP][FN TN]...
core/src/main/java/com/alibaba/alink/operator/common/evaluation/ConfusionMatrix.java
0.906292
0.558748
ConfusionMatrix.java
starcoder
package org.apache.kafka.raft; import org.apache.kafka.snapshot.SnapshotReader; import org.apache.kafka.snapshot.SnapshotWriter; import java.util.List; import java.util.Optional; import java.util.OptionalInt; import java.util.concurrent.CompletableFuture; public interface RaftClient<T> extends AutoCloseable { i...
raft/src/main/java/org/apache/kafka/raft/RaftClient.java
0.930276
0.577495
RaftClient.java
starcoder
package org.asciicerebrum.neocortexengine.domain.core.particles; import org.apache.commons.lang3.StringUtils; /** * * @author species8472 */ public class BonusValue extends LongParticle { /** * Default value as a string. */ private static final String DEFAULT_STRING_VALUE = "0"; /** * ...
src/main/java/org/asciicerebrum/neocortexengine/domain/core/particles/BonusValue.java
0.937904
0.411525
BonusValue.java
starcoder
package nl.tudelft.jpacman.level; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import nl.tudelft.jpacman.PacmanConfigurationException; import nl.tudelft.jpacman.board.Board; import nl.tudelft...
src/main/java/nl/tudelft/jpacman/level/MapParser.java
0.908848
0.427815
MapParser.java
starcoder
package javax.vecmath; import java.awt.Color; /** * A three-element color value represented by single precision floating * point x,y,z values. The x,y,z values represent the red, green, and * blue color values, respectively. Color components should be in the * range of [0.0, 1.0]. * <p> * Java 3D assumes that...
javax/vecmath/Color3f.java
0.9189
0.568895
Color3f.java
starcoder
package com.examples; import io.improbable.keanu.algorithms.NetworkSamples; import io.improbable.keanu.algorithms.mcmc.MetropolisHastings; import io.improbable.keanu.network.BayesianNetwork; import io.improbable.keanu.tensor.bool.BooleanTensor; import io.improbable.keanu.vertices.bool.probabilistic.BernoulliVertex; im...
keanu-examples/bayesianMethodsForHackers/src/main/java/com/examples/ABTesting.java
0.885353
0.547343
ABTesting.java
starcoder
package com.numericalmethod.suanshu.stats.hmm.mixture.distribution; import com.numericalmethod.suanshu.matrix.doubles.Matrix; import com.numericalmethod.suanshu.stats.distribution.univariate.ProbabilityDistribution; import com.numericalmethod.suanshu.stats.random.univariate.RandomNumberGenerator; import com.numer...
src/main/java/com/numericalmethod/suanshu/stats/hmm/mixture/distribution/PoissonDistribution.java
0.948894
0.46035
PoissonDistribution.java
starcoder
package com.tdunning.math.stats.datasketches.req; import java.util.Arrays; import com.tdunning.math.stats.datasketches.InequalitySearch; import com.tdunning.math.stats.datasketches.SketchesArgumentException; import org.apache.datasketches.memory.WritableBuffer; import org.apache.datasketches.memory.WritableMemory; /...
core/src/main/java/com/tdunning/math/stats/datasketches/req/DoubleBuffer.java
0.957007
0.543893
DoubleBuffer.java
starcoder
package sc.fiji.labkit.pixel_classification.random_forest; import hr.irb.fastRandomForest.FastRandomForest; import net.imglib2.RandomAccessibleInterval; import sc.fiji.labkit.pixel_classification.utils.ArrayUtils; import sc.fiji.labkit.pixel_classification.utils.views.FastViews; import net.imglib2.type.numeric.Integer...
src/main/java/sc/fiji/labkit/pixel_classification/random_forest/CpuRandomForestPrediction.java
0.908728
0.401424
CpuRandomForestPrediction.java
starcoder
package org.apache.flink.streaming.api.datastream; import java.util.List; import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.java.functions.KeySelector; import org.apache.flink.api.java.typeutils.TypeExtractor; import org.apache.flink.api.java.typeutils.TypeInfoParser; import org...
flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/datastream/IterativeDataStream.java
0.879729
0.533337
IterativeDataStream.java
starcoder
package io.r2dbc.spi; import org.reactivestreams.Publisher; import org.reactivestreams.Subscriber; import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Predicate; /** * Represents the results of a query against a database. Results can be consumed only once by either c...
r2dbc-spi/src/main/java/io/r2dbc/spi/Result.java
0.930482
0.703295
Result.java
starcoder
package pro.ruloff.tasks.mapper; import java.util.List; import java.util.stream.Collectors; import org.springframework.stereotype.Component; import pro.ruloff.tasks.domain.TrelloBoard; import pro.ruloff.tasks.domain.TrelloCard; import pro.ruloff.tasks.domain.TrelloList; import pro.ruloff.tasks.domain.dto.TrelloBoardDt...
src/main/java/pro/ruloff/tasks/mapper/TrelloMapper.java
0.57523
0.445168
TrelloMapper.java
starcoder
package net.finmath.rootfinder; /** * This class implements a root finder as question-and-answer algorithm using * the secant method. * * @author <NAME> * @version 1.3 * @date 2008-04-06 */ public class SecantMethod extends NewtonsMethod implements RootFinder { // We need a second guess for the initial secant...
src/main/java6/net/finmath/rootfinder/SecantMethod.java
0.920455
0.406862
SecantMethod.java
starcoder
package org.elasticsearch.search.facet.terms.strings; import com.carrotsearch.hppc.ObjectIntOpenHashMap; import com.google.common.collect.ImmutableList; import org.apache.lucene.util.ArrayUtil; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.collect.BoundedTreeSet; import org.elasticsearch.comm...
src/main/java/org/elasticsearch/search/facet/terms/strings/HashedAggregator.java
0.862149
0.457137
HashedAggregator.java
starcoder
package org.libpag; import android.graphics.Matrix; import android.graphics.RectF; import org.extra.tools.LibraryLoadUtils; public class PAGPlayer { private PAGSurface pagSurface = null; public PAGPlayer() { nativeSetup(); } /** * Returns the current PAGComposition for PAGPlayer to ren...
android/libpag/src/main/java/org/libpag/PAGPlayer.java
0.897094
0.427636
PAGPlayer.java
starcoder
package com.opengamma.analytics.math.interpolation; import java.util.Arrays; import com.opengamma.analytics.math.matrix.DoubleMatrix1D; import com.opengamma.analytics.math.matrix.DoubleMatrix2D; /** * Hermite interpolation is determined if one specifies first derivatives for a cubic interpolant and first and second...
projects/analytics/src/main/java/com/opengamma/analytics/math/interpolation/HermiteCoefficientsProvider.java
0.924082
0.755163
HermiteCoefficientsProvider.java
starcoder
package cellsociety_team11.predator_prey; import java.util.ArrayList; import java.util.Random; import cellsociety_team11.Cell; import cellsociety_team11.Coordinates; import cellsociety_team11.Grid; import cellsociety_team11.Rule; public class PredatorPreyRules implements Rule<Integer>{ public static final int EMPT...
src/cellsociety_team11/predator_prey/PredatorPreyRules.java
0.82029
0.538316
PredatorPreyRules.java
starcoder
package com.github.zhgxun.leetcode.thread; import java.util.concurrent.BlockingDeque; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingDeque; public class ZeroEvenOdd { private int n; private final BlockingDeque<Integer> zero = new L...
src/main/java/com/github/zhgxun/leetcode/thread/ZeroEvenOdd.java
0.698124
0.409575
ZeroEvenOdd.java
starcoder
package CrackingTheCodeInterview.stack; /** * @Author: HB * @Description: 面试题03.01 - 三合一 * 描述: 三合一。描述如何只用一个数组来实现三个栈。 * 你应该实现push(stackNum, value)、pop(stackNum)、 * isEmpty(stackNum)、peek(stackNum)方法。stackNum表示栈 * 下标,value表示压入的值。 * ...
src/main/java/CrackingTheCodeInterview/stack/Q18.java
0.579995
0.450118
Q18.java
starcoder
package com.github.kumaraman21.intellijbehave.psi; import org.jetbrains.annotations.*; import com.intellij.psi.PsiElementVisitor; import com.intellij.psi.PsiElement; public class JBehaveVisitor extends PsiElementVisitor { public void visitDescription(@NotNull JBehaveDescription o) { visitPsiElement(o); } ...
gen/com/github/kumaraman21/intellijbehave/psi/JBehaveVisitor.java
0.604165
0.505127
JBehaveVisitor.java
starcoder
package BackTracking; /* You are given a N*N maze with a rat placed at maze[0][0]. Find whether any path exist that rat can follow to reach its destination i.e. maze[N-1][N-1]. Rat can move in any direc­tion ( left, right, up and down). Value of every cell in the maze can either be 0 or 1. Cells with value 0 are block...
BackTracking/Rat_In_A_Maze.java
0.523664
0.617974
Rat_In_A_Maze.java
starcoder
package org.apache.shardingsphere.scaling.core.execute.executor.importer; import org.apache.shardingsphere.scaling.core.constant.ScalingConstant; import org.apache.shardingsphere.scaling.core.execute.executor.record.Column; import org.apache.shardingsphere.scaling.core.execute.executor.record.DataRecord; import org.ap...
shardingsphere-scaling/shardingsphere-scaling-core/src/main/java/org/apache/shardingsphere/scaling/core/execute/executor/importer/DataRecordMerger.java
0.817246
0.431884
DataRecordMerger.java
starcoder
package io.restassured.matcher; import io.restassured.http.Cookie; import org.hamcrest.Matcher; import org.hamcrest.Matchers; import org.hamcrest.core.CombinableMatcher; import java.util.Date; import static org.hamcrest.Matchers.equalTo; /** * Fluent Hamcrest matcher for assertions related to {@link Cookie} instan...
rest-assured/src/main/java/io/restassured/matcher/DetailedCookieMatcher.java
0.893728
0.553083
DetailedCookieMatcher.java
starcoder
package org.redfx.strange.local; import org.redfx.strange.*; import org.redfx.strange.gate.PermutationGate; import org.redfx.strange.gate.ProbabilitiesGate; import java.util.ArrayList; import java.util.List; import java.util.function.Function; /**@author <NAME> (From SimpleQuantumExecutionEnvironment.class)**/ publi...
src/main/java/org/redfx/strange/local/QuantumExecutor.java
0.799638
0.486514
QuantumExecutor.java
starcoder
package com.computablefacts.decima.problog.graphs; import static com.computablefacts.decima.problog.TestUtils.isValid; import static com.computablefacts.decima.problog.TestUtils.parseClause; import static com.computablefacts.decima.problog.TestUtils.solver; import java.math.BigDecimal; import java.util.Set; import o...
test/com/computablefacts/decima/problog/graphs/SocialNetworkTest.java
0.72487
0.578567
SocialNetworkTest.java
starcoder
package com.opengamma.analytics.financial.horizon.constantspread; import org.threeten.bp.ZonedDateTime; import com.opengamma.analytics.financial.horizon.HorizonCalculator; import com.opengamma.analytics.financial.horizon.rolldown.CurveProviderConstantSpreadRolldown; import com.opengamma.analytics.financial.instrument...
projects/analytics/src/main/java/com/opengamma/analytics/financial/horizon/constantspread/StirFutureConstantSpreadHorizonCalculator.java
0.869894
0.521167
StirFutureConstantSpreadHorizonCalculator.java
starcoder
package diyeats.model.meal; import diyeats.commons.datatypes.Pair; import java.time.LocalDate; import java.util.HashMap; //@@author Fractalisk /** * ExerciseList is a structure to store exercises in the model. */ public class ExerciseList { private HashMap<String, Integer> storedExercises = new HashMap<>(); ...
src/main/java/diyeats/model/meal/ExerciseList.java
0.880168
0.471832
ExerciseList.java
starcoder
package org.neuroph.contrib.rnn.bptt; import java.util.Map; import org.jblas.DoubleMatrix; import org.neuroph.contrib.rnn.LSTM; import org.neuroph.contrib.rnn.RNN; /** * * @author <NAME> <<EMAIL>> */ public class LSTMBackPropagationThroughTime extends BackPropagationThroughTime { @Override public void pro...
neuroph/Contrib/src/main/java/org/neuroph/contrib/rnn/bptt/LSTMBackPropagationThroughTime.java
0.852307
0.627951
LSTMBackPropagationThroughTime.java
starcoder
package com.streamquote.strategies; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.streamquote.strategies.Order.OrderType; public class StockPriceSeries { /** Name of the series */ private final String name; /** Begin index of the time series */ private int beginIndex = -1;...
src/main/java/com/streamquote/strategies/StockPriceSeries.java
0.840979
0.506836
StockPriceSeries.java
starcoder
package de.blau.android.presets; import androidx.annotation.NonNull; import androidx.annotation.Nullable; public class ValueWithCount implements Comparable<ValueWithCount> { private final String value; private String description = null; private int count = -1; private bool...
src/main/java/de/blau/android/presets/ValueWithCount.java
0.935766
0.40486
ValueWithCount.java
starcoder
package MaximumSumOf3NonOverlappingSubarray; import java.util.Arrays; /** * In a given array nums of positive integers, * find three non-overlapping subarrays with maximum sum. * * Each subarray will be of size k, * and we want to maximize the sum of all 3*k entries. * * Return the result as a list of indices ...
leetcode/src/MaximumSumOf3NonOverlappingSubarray/Solution.java
0.822474
0.663342
Solution.java
starcoder
package org.tikv.common.expression.visitor; import java.util.Objects; import java.util.Set; import org.tikv.common.expression.*; import org.tikv.common.expression.ComparisonBinaryExpression.NormalizedPredicate; import org.tikv.common.expression.FuncCallExpr.Type; import org.tikv.common.predicates.PredicateUtils; /** ...
src/main/java/org/tikv/common/expression/visitor/PartAndFilterExprRewriter.java
0.732305
0.481759
PartAndFilterExprRewriter.java
starcoder
package boofcv.alg.color; import boofcv.alg.color.impl.ImplColorLab; import boofcv.alg.color.impl.ImplColorLab_MT; import boofcv.concurrency.BoofConcurrency; import boofcv.struct.image.GrayF32; import boofcv.struct.image.GrayU8; import boofcv.struct.image.ImageGray; import boofcv.struct.image.Planar; import static bo...
main/boofcv-ip/src/main/java/boofcv/alg/color/ColorLab.java
0.835416
0.498718
ColorLab.java
starcoder
package com.bumptech.glide.load.resource.bitmap; import static com.google.common.truth.Truth.assertThat; import static com.bumptech.glide.tests.Util.assertClassHasValidId; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import android.graphics...
library/src/androidTest/java/com/bumptech/glide/load/resource/bitmap/BitmapEncoderTest.java
0.905065
0.40987
BitmapEncoderTest.java
starcoder
import javafx.scene.paint.Color; /** * Implementation of a general tetris piece. Each tetris piece has a total of * 4 squares, named as piece(0-3). Subclasses should set the colors of each * square and the relative location to the designated center square (piece0 as * my convention, which has relLocX & relLocY of ...
Tetris/src/TetrisPiece.java
0.74512
0.436682
TetrisPiece.java
starcoder
package as2; import javax.swing.*; import java.awt.*; import java.awt.geom.*; import static java.awt.Color.*; import static java.awt.BasicStroke.*; /** * Project: Cat Snake - Graphics 2D Animation * Date: 2/27/2018 * * Purpose: * This applet program will create an animation of a shape cat moving * ...
src/as2/catsnake.java
0.859118
0.442817
catsnake.java
starcoder
* This file is available under and governed by the GNU General Public * License version 2 only, as published by the Free Software Foundation. * However, the following notice accompanied the original version of this * file: * * Written by <NAME> with assistance from members of JCP JSR-166 * Expert Group and relea...
src/share/classes/java/util/concurrent/CompletionStage.java
0.922639
0.520557
CompletionStage.java
starcoder
package com.amazonaws.services.codedeploy.model; import java.io.Serializable; /** * <p> * Information about the deployment status of the instances in the deployment. * </p> */ public class DeploymentOverview implements Serializable, Cloneable { /** * <p> * The number of instances in the deployment ...
aws-java-sdk-codedeploy/src/main/java/com/amazonaws/services/codedeploy/model/DeploymentOverview.java
0.859162
0.403861
DeploymentOverview.java
starcoder
package org.jgrapht.alg.shortestpath; import org.jgrapht.*; import org.jgrapht.alg.util.*; import org.jgrapht.graph.*; import java.util.*; import java.util.stream.*; import static org.jgrapht.alg.shortestpath.ContractionHierarchyPrecomputation.*; /** * Efficient algorithm for the many-to-many shortest paths proble...
Java tool/TIA-XML-modcheck/lib/jgrapht-1.5.0/source/jgrapht-core/src/main/java/org/jgrapht/alg/shortestpath/CHManyToManyShortestPaths.java
0.945343
0.555315
CHManyToManyShortestPaths.java
starcoder
package us.ihmc.geometry.polytope; import java.util.Random; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import us.ihmc.robotics.random.RandomTools; public class ConvexPolytopeConstructor { public static ConvexPolytope constructUnitCube() { ConvexPolytope polytope = new ConvexPolytope()...
IHMCGeometry/src/us/ihmc/geometry/polytope/ConvexPolytopeConstructor.java
0.721939
0.741908
ConvexPolytopeConstructor.java
starcoder
package org.fcrepo.utilities; import java.net.URI; import java.net.URISyntaxException; import java.util.HashMap; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * A representation of a normalized URI, per RFC3986. * * @author <NAME> * @since 3.0 * @see <a href="https://www.ietf.org/rfc/rfc3...
fcrepo-common/src/main/java/org/fcrepo/utilities/NormalizedURI.java
0.839175
0.422505
NormalizedURI.java
starcoder
package org.apache.qpid.protonj2.buffer; import java.nio.ByteBuffer; /** * Interface for a ProtonBuffer allocator object that can be used by Proton * objects to create memory buffers using the preferred type of the application * or library that embeds the Proton engine. */ public interface ProtonBufferAllocator {...
protonj2/src/main/java/org/apache/qpid/protonj2/buffer/ProtonBufferAllocator.java
0.947088
0.533458
ProtonBufferAllocator.java
starcoder
package com.example.petgame.PetGame; import android.content.Context; import com.example.petgame.Pet.Pet; /** Presents data updates from the PetGameFacade to the PetGameView. */ public class PetGamePresenter implements PetGameInteractionReceiver { /** The PetGameView this PetGamePresenter is presenting data to. ...
version1/app/src/main/java/com/example/petgame/PetGame/PetGamePresenter.java
0.91437
0.418222
PetGamePresenter.java
starcoder
package org.apache.commons.math.geometry; import java.io.Serializable; import java.text.NumberFormat; /** This interface represents a generic vector in a vectorial space or a point in an affine space. * @param <S> Type of the space. * @version $Id: Vector.java 1180316 2011-10-08 05:23:06Z psteitz $ * @see Space *...
src/main/java/org/apache/commons/math/geometry/Vector.java
0.96693
0.710503
Vector.java
starcoder
package nl.sunflare.sunflare_sensorviewer.Classes; import java.io.Serializable; import java.util.ArrayList; import java.util.List; public class Session implements Serializable { // Variables need to be public for firebase. public String currentTime = ""; public String currentSpeed = ""; public float...
app/src/main/java/nl/sunflare/sunflare_sensorviewer/Classes/Session.java
0.881175
0.541106
Session.java
starcoder
package dungeontest; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import dungeon.Dungeon; import dungeon.DungeonDesign; import java.util.ArrayList; import org.junit.Before; import o...
test/dungeontest/TestDungeon.java
0.850484
0.545286
TestDungeon.java
starcoder
package com.jme3.scene.plugins.blender.textures; import com.jme3.math.FastMath; import com.jme3.texture.Image.Format; /** * The data that helps in bytes calculations for the result image. * * @author <NAME> (Kaelthas) */ /* package */class DDSTexelData { /** The colors of the texes. */ privat...
engine/src/blender/com/jme3/scene/plugins/blender/textures/DDSTexelData.java
0.779616
0.414366
DDSTexelData.java
starcoder
package us.ihmc.euclid.transform.interfaces; import us.ihmc.euclid.exceptions.NotARotationMatrixException; import us.ihmc.euclid.interfaces.Clearable; import us.ihmc.euclid.matrix.RotationMatrix; import us.ihmc.euclid.matrix.interfaces.RotationMatrixReadOnly; import us.ihmc.euclid.orientation.interfaces.Orientation3DB...
src/main/java/us/ihmc/euclid/transform/interfaces/RigidBodyTransformBasics.java
0.954584
0.689965
RigidBodyTransformBasics.java
starcoder
package pl.edu.pw.ee; import pl.edu.pw.ee.services.PatternSearch; import java.util.*; import static java.lang.Math.min; import static java.util.stream.Collectors.toList; public class DeterministicFiniteAutomatonTextSearch implements PatternSearch { private String pattern; private Map<Key, Integer> transMap...
8_finite_state_automaton_based_string_search/src/main/java/pl/edu/pw/ee/DeterministicFiniteAutomatonTextSearch.java
0.760828
0.40028
DeterministicFiniteAutomatonTextSearch.java
starcoder
package boofcv.alg.distort; import boofcv.struct.distort.PointTransform_F64; import georegression.geometry.GeometryMath_F64; import georegression.struct.point.Point2D_F64; import org.ejml.data.DenseMatrix64F; import org.ejml.ops.CommonOps; /** * Given an undistorted pixel coordinate, compute the distorted coordinate...
main/geo/src/boofcv/alg/distort/AddRadialPtoP_F64.java
0.837421
0.58747
AddRadialPtoP_F64.java
starcoder
package io.rala.math.algebra.equation; import org.jetbrains.annotations.NotNull; import java.util.Objects; /** * class which supports solving {@link AbstractEquationSystem}s * * @param <E> class of {@link AbstractEquationSystem} * @param <T> number class of {@link AbstractEquationSystem} * @since 1.0.0 */ publ...
src/main/java/io/rala/math/algebra/equation/AbstractSolver.java
0.950881
0.422743
AbstractSolver.java
starcoder
package net.automatalib.commons.smartcollections; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; import org.checkerframework.checker.nullness.qual.Nullable; /** * An extended collection interface. * <p> * This interface overcomes various sho...
commons/smartcollections/src/main/java/net/automatalib/commons/smartcollections/SmartCollection.java
0.929768
0.528229
SmartCollection.java
starcoder
import edu.colorado.nodes.Node; /****************************************************************************** * This class is a homework assignment; * A <CODE>LinkedSeq</CODE> is a sequence of references to Objects. * The sequence can have a special "current element," which is specified and * access...
CS_211/LinkedSeq.java
0.727975
0.474936
LinkedSeq.java
starcoder
package org.kitesdk.data; import javax.annotation.concurrent.Immutable; /** * A {@code View} is a subset of a {@link Dataset}. * * A {@code View} defines a space of potential storage keys or a partition * space. Views can be created from ranges, partial keys, or the union of other * views. * * @param <E> * ...
kite-data/kite-data-core/src/main/java/org/kitesdk/data/View.java
0.953046
0.580382
View.java
starcoder
package com.seedfinding.latticg.math.decomposition; import com.seedfinding.latticg.math.component.BigFraction; import com.seedfinding.latticg.math.component.BigMatrix; import com.seedfinding.latticg.math.component.BigVector; import com.seedfinding.latticg.math.component.Matrix; import com.seedfinding.latticg.math.comp...
src/main/java/com/seedfinding/latticg/math/decomposition/LUDecomposition.java
0.832203
0.565299
LUDecomposition.java
starcoder
package org.springframework.expression.spel; import org.springframework.expression.EvaluationException; import org.springframework.expression.TypedValue; /** * Represents a node in the Ast for a parsed expression. * * @author <NAME> * @since 3.0 */ public interface SpelNode { /** * Evaluate the expression no...
spring-expression/src/main/java/org/springframework/expression/spel/SpelNode.java
0.836521
0.659659
SpelNode.java
starcoder
package yacx; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; import org.junit.jupiter.api.Bef...
test/java/yacx/TestExecutor.java
0.782372
0.500732
TestExecutor.java
starcoder
package org.timothyb89.lifx.net.field; import java.nio.ByteBuffer; import lombok.Getter; /** * Defines an abstract field that can be used to convert between native * datatypes and a LIFX-compatible byte representation. * @author tim * @param <T> the field datatype */ public abstract class Field<T> { @Getter ...
src/main/java/org/timothyb89/lifx/net/field/Field.java
0.917492
0.430207
Field.java
starcoder
package org.apache.poi.ss.formula.functions; import java.util.Locale; import org.apache.poi.ss.formula.eval.AreaEval; import org.apache.poi.ss.formula.eval.BoolEval; import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.formula.eval.EvaluationException; import org.apache.poi.ss.formula.eval.Number...
poi/src/main/java/org/apache/poi/ss/formula/functions/TextFunction.java
0.84556
0.494873
TextFunction.java
starcoder
package io.aiven.connect.elasticsearch; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; /** * Utility to compute the retry times for a given attempt, using exponential backoff. * * <p>The purposes of using exponential backoff is to give the ES service time to recover when it *...
src/main/java/io/aiven/connect/elasticsearch/RetryUtil.java
0.948262
0.476153
RetryUtil.java
starcoder
package com.brianway.learning.algorithms.algs4utils; import java.util.Arrays; /** * The <tt>GrahamScan</tt> data type provides methods for computing the * convex hull of a set of <em>N</em> points in the plane. * <p> * The implementation uses the Graham-Scan convex hull algorithm. * It runs in O(<em>N</em> log <...
algorithms-algs4/src/main/java/com/brianway/learning/algorithms/algs4utils/GrahamScan.java
0.87728
0.587825
GrahamScan.java
starcoder
package up.edu.isgc.raytracer.objects; import up.edu.isgc.raytracer.IIntersectable; import up.edu.isgc.raytracer.Intersection; import up.edu.isgc.raytracer.Ray; import up.edu.isgc.raytracer.Vector3D; /** * @author <NAME> * @coauthor <NAME> */ public class Triangle implements IIntersectable { publ...
objects/Triangle.java
0.856002
0.726231
Triangle.java
starcoder
package be.ceau.querymapper; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; /** * Objects of this class represent a hierarchy of Field objects, * with entries from the root class and each of the nested fields. */ public c...
src/main/java/be/ceau/querymapper/NestedField.java
0.849722
0.479504
NestedField.java
starcoder
package com.elastisys.autoscaler.core.utils.stats.timeseries.impl; import java.util.Collection; import java.util.List; import org.joda.time.DateTime; import com.elastisys.autoscaler.core.api.types.MetricValue; import com.elastisys.autoscaler.core.utils.stats.timeseries.DataPoint; import com.elastisys.autoscaler.core...
core/src/main/java/com/elastisys/autoscaler/core/utils/stats/timeseries/impl/MaxAgeTimeSeries.java
0.956745
0.529932
MaxAgeTimeSeries.java
starcoder
package org.orekit.gnss; import java.util.Collections; import java.util.List; import org.orekit.time.AbsoluteDate; import org.orekit.time.TimeStamped; /** * Combined observation data set. * @author <NAME> * @since 10.1 */ public class CombinedObservationDataSet implements TimeStamped { /** Rinex header asso...
src/main/java/org/orekit/gnss/CombinedObservationDataSet.java
0.936481
0.452778
CombinedObservationDataSet.java
starcoder
package io.netty.util.collection; import io.netty.util.collection.ShortObjectMap.PrimitiveEntry; import org.junit.Before; import org.junit.Test; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Random; import java.util.Set; ...
common/target/generated-test-sources/collections/java/io/netty/util/collection/ShortObjectHashMapTest.java
0.90828
0.519156
ShortObjectHashMapTest.java
starcoder
package io.vertx.reactivex; import io.reactivex.Scheduler; import io.vertx.core.Vertx; import io.vertx.core.WorkerExecutor; /** * @author <a href="mailto:<EMAIL>"><NAME></a> */ public class RxHelper { /** * Create a scheduler for a {@link io.vertx.core.Vertx} object, actions are executed on the event loop. ...
rx-java2-gen/src/main/java/io/vertx/reactivex/RxHelper.java
0.829319
0.425128
RxHelper.java
starcoder
package com.questnr.common; import java.util.Arrays; import java.util.List; public class UserInterests { public static List<String> getUserInterests(){ String[] interestList = { "Advertising", "Agriculture", "Architecture", "Aviation", ...
src/main/java/com/questnr/common/UserInterests.java
0.560854
0.53965
UserInterests.java
starcoder
package dev.Hilligans.ourcraft.World.Builders.Foliage; import dev.Hilligans.ourcraft.Block.Block; import dev.Hilligans.ourcraft.Block.Blocks; import dev.Hilligans.ourcraft.Data.Other.BlockPos; import dev.Hilligans.ourcraft.Data.Other.BlockTemplate; import dev.Hilligans.ourcraft.Data.Other.JoinedBlockTemplate; import d...
src/main/java/dev/Hilligans/ourcraft/World/Builders/Foliage/CustomTreeBuilder.java
0.71103
0.495361
CustomTreeBuilder.java
starcoder
package com.google.javascript.jscomp; import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES8; import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES8_MODULES; import com.google.javascript.jscomp.NodeTraversal.Callback; import com.google.javascript.jscomp.PassFactory.HotSwapPassFacto...
src/com/google/javascript/jscomp/TranspilationPasses.java
0.609524
0.447641
TranspilationPasses.java
starcoder
package de.tudarmstadt.ukp.jwktl.api; import java.util.Date; import java.util.List; import java.util.Set; import de.tudarmstadt.ukp.jwktl.api.util.ILanguage; /** * A {@link IWiktionaryPage} corresponds to a unique URL of Wiktionary. That * is, a distinct web page, such as http://en.wiktionary.org/wiki/plant. The ...
src/main/java/de/tudarmstadt/ukp/jwktl/api/IWiktionaryPage.java
0.8415
0.421135
IWiktionaryPage.java
starcoder
package jme3utilities.mesh; import com.jme3.font.Rectangle; import com.jme3.scene.Mesh; import com.jme3.scene.VertexBuffer.Type; import java.util.logging.Level; import java.util.logging.Logger; /** * A 2-D, static, TriangleFan-mode mesh that renders an axis-aligned rectangle * in the X-Y plane. * <p> * In local s...
HeartLibrary/src/main/java/jme3utilities/mesh/RectangleMesh.java
0.891776
0.60507
RectangleMesh.java
starcoder
package nl.knaw.huygens.timbuctoo.v5.graphql.datafetchers.berkeleydb.datafetchers; import nl.knaw.huygens.timbuctoo.v5.dataset.dto.DataSet; import nl.knaw.huygens.timbuctoo.v5.datastores.collectionindex.CursorSubject; import nl.knaw.huygens.timbuctoo.v5.graphql.datafetchers.dto.PaginatedList; import nl.knaw.huygens.ti...
python/experiments/projects/HuygensING-timbuctoo/real_error_dataset/1/53/PaginationHelperTest.java
0.714728
0.47926
PaginationHelperTest.java
starcoder
package org.robotframework.ide.eclipse.main.plugin.tableeditor.source.assist; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.templates.Template; import org.eclipse.jface.text.templates.TemplateConte...
src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin.tests/src/org/robotframework/ide/eclipse/main/plugin/tableeditor/source/assist/RedTemplateProposalTest.java
0.806815
0.467149
RedTemplateProposalTest.java
starcoder
package core; import com.dajudge.colordiff.ColorDiff; import com.dajudge.colordiff.RgbColor; import java.util.List; public class ColorDistanceCalculator { private final ColorSpace colorSpace; private double chromaOffset = 0; public ColorDistanceCalculator(ColorSpace colorSpace) { this.colorSpac...
src/main/java/core/ColorDistanceCalculator.java
0.902301
0.483648
ColorDistanceCalculator.java
starcoder
package it.polimi.ingsw.server.model.player.board; import it.polimi.ingsw.server.model.Resource; import javafx.util.Pair; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.S...
src/main/java/it/polimi/ingsw/server/model/player/board/WarehouseLeadersDepots.java
0.81626
0.476641
WarehouseLeadersDepots.java
starcoder
import java.util.Collections; import java.util.List; public class MergeSortedFiles { /* 11.1 Write a program that takes asinput a set of sorted sequences and computesthe union of these sequences as a sorted sequence. For example, if the input is (3,5,7), (0,6), and (0,6, 28), then the output is(0,0,3,5,6...
heaps_solved/src/main/java/MergeSortedFiles.java
0.79158
0.561395
MergeSortedFiles.java
starcoder
package com.ramamosr.LinkedList; public class LinkedList { /* Problem Description Design and implement a Linked List data structure. A node in a linked list should have the following attributes - an integer value and a pointer to the next node. It should support the following operations: insert_n...
src/com/ramamosr/LinkedList/LinkedList.java
0.531939
0.674536
LinkedList.java
starcoder