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 a2; import static org.junit.Assert.assertEquals; import org.junit.Before; import org.junit.Test; /** * A testing class for the deque * * @author dfraser * */ public class TestDeque { private Deque<Integer> deck; private static final String EMPTY_DECK_PROMPT = "Empty deck did not have a size of 0"; /...
src/a2/TestDeque.java
0.809427
0.567457
TestDeque.java
starcoder
package vrlab.foodui.information; /** * the class nutritional value specifies typical values regarding the nutritional value of a food * all weight information is in grams [g] and the caloric value information is in kilocalories * [kcal] */ public class NutritionalValue { // attribute section private float...
app/src/main/java/vrlab/foodui/information/NutritionalValue.java
0.705886
0.457682
NutritionalValue.java
starcoder
package xyz.acygn.mokapot; import java.lang.ref.WeakReference; import java.util.ConcurrentModificationException; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import xyz.acygn.mokapot.skeletons.InvokeByCode; import xyz.acygn.mokapot.skeletons.Standin; import...
mokapot/src/main/java/xyz/acygn/mokapot/LooseTightStandinReference.java
0.898525
0.456289
LooseTightStandinReference.java
starcoder
package org.optaplanner.core.impl.domain.valuerange.buildin.composite; import java.util.Iterator; import java.util.Random; import org.optaplanner.core.api.domain.valuerange.CountableValueRange; import org.optaplanner.core.api.domain.valuerange.ValueRange; import org.optaplanner.core.impl.domain.valuerange.AbstractCou...
optaplanner-core/src/main/java/org/optaplanner/core/impl/domain/valuerange/buildin/composite/NullableCountableValueRange.java
0.905062
0.409811
NullableCountableValueRange.java
starcoder
package org.omarket.stats; import org.apache.commons.math3.linear.DecompositionSolver; import org.apache.commons.math3.linear.LUDecomposition; import org.apache.commons.math3.linear.MatrixUtils; import org.apache.commons.math3.linear.RealMatrix; import org.apache.commons.math3.linear.RealVector; import org.apache.comm...
omarket-app/src/main/java/org/omarket/stats/StatsUtils.java
0.92302
0.727855
StatsUtils.java
starcoder
package com.ns.greg.library.easy_viewpager.transformer; import android.support.v4.view.ViewPager; import android.view.View; /** * @author Gregory * @since 2016/4/6 */ public abstract class BaseTransformer implements ViewPager.PageTransformer { private static final float DEFAULT_SCALE = 1f; /** * @param pa...
easy-viewpager/src/main/java/com/ns/greg/library/easy_viewpager/transformer/BaseTransformer.java
0.929448
0.52275
BaseTransformer.java
starcoder
package de.ts.codility.lesson8; import java.util.Arrays; /** * https://app.codility.com/programmers/lessons/8-leader/dominator/ * <p> * An array A consisting of N integers is given. The dominator of array A is the value that occurs in more than half of the elements of A. * <p> * For example, consider array A suc...
src/main/java/de/ts/codility/lesson8/Dominator.java
0.867738
0.569254
Dominator.java
starcoder
package grondag.canvas.material.property; import net.minecraft.util.math.Matrix3f; import grondag.canvas.mixinterface.Matrix3fExt; /** * Describes how vertex coordinates relate to world and camera geometry. * Currently vertex collectors don't mix so not part of render state * but kept as a global indicator to all...
src/main/java/grondag/canvas/material/property/MaterialMatrixState.java
0.838184
0.505493
MaterialMatrixState.java
starcoder
package squidpony.squidgrid.gui.gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.scenes.scene2d.ui.Image; import squidpony.squidgrid.Direction; import java.util.ArrayList; import java.util.Collections; im...
squidlib/src/main/java/squidpony/squidgrid/gui/gdx/ColorChangeImage.java
0.929496
0.591251
ColorChangeImage.java
starcoder
package edu.idziak.planner.domain.logic; import com.google.common.collect.Lists; import edu.idziak.planner.domain.entity.EntityCell; import edu.idziak.planner.domain.entity.EntityDestinationCell; import edu.idziak.planner.domain.entity.GridCell; import edu.idziak.planner.domain.entity.GridModel; import edu.idziak.plan...
src/main/java/edu/idziak/planner/domain/logic/AStarPathCalculator.java
0.855685
0.415136
AStarPathCalculator.java
starcoder
package org.lwjgl.opengl; import org.lwjgl.*; import static org.lwjgl.system.Checks.*; import static org.lwjgl.system.JNI.*; import static org.lwjgl.system.MemoryUtil.*; /** * Native bindings to the <a href="http://www.opengl.org/registry/specs/NV/gpu_affinity.txt">WGL_NV_gpu_affinity</a> extension. * * <p>On sy...
04lwjgl/code/lwjgl/org/lwjgl/opengl/WGLNVGPUAffinity.java
0.866754
0.506225
WGLNVGPUAffinity.java
starcoder
package lt.vaitkus; import java.awt.*; /** * This is the Ball that bounces around the screen. * Small stationary versions of this ball are also used to represent lives remaining. * * Created by <NAME>. */ public class Ball extends Rectangle{ /** * The speed of movement in the x and y directions. */...
src/lt/vaitkus/Ball.java
0.888789
0.526099
Ball.java
starcoder
package sun.nio.cs.ext; import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CharsetEncoder; import java.nio.charset.CoderResult; import java.security.AccessController; import sun.nio.cs.HistoricallyNamedCharset; impor...
src/sun/nio/cs/ext/JISAutoDetect.java
0.846419
0.411998
JISAutoDetect.java
starcoder
package net.patowen.planetarium.math; import java.nio.FloatBuffer; /** * The {@code Vector3} class represents a given vector in 3-dimensional Euclidean space. * @author <NAME> */ public class Vector2 extends VectorN { /** * The x-coordinate of the vector. */ public double x; /** * The y-coordinate of th...
src/net/patowen/planetarium/math/Vector2.java
0.962259
0.860369
Vector2.java
starcoder
package lecho.lib.hellocharts.model; import lecho.lib.hellocharts.util.Utils; import lecho.lib.hellocharts.view.Chart; /** * Single value drawn as bubble on BubbleChart. * * @author <NAME> * */ public class BubbleValue { /** Current X value. */ private float x; /** Current Y value. */ private float y; /*...
hellocharts-library/src/lecho/lib/hellocharts/model/BubbleValue.java
0.857395
0.437884
BubbleValue.java
starcoder
package com.tencentcloudapi.ocr.v20181119.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class TableOCRRequest extends AbstractModel{ /** * Base64-encoded value of image. S...
src/main/java/com/tencentcloudapi/ocr/v20181119/models/TableOCRRequest.java
0.860296
0.461199
TableOCRRequest.java
starcoder
package io.crate.sql.tree; import com.google.common.base.Objects; import com.google.common.collect.ImmutableMap; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.function.Function; /** * these are a kind of map/dictionary with string keys and expr...
sql-parser/src/main/java/io/crate/sql/tree/GenericProperties.java
0.93126
0.419232
GenericProperties.java
starcoder
package com.linkedin.dagli.nn.layer; import com.linkedin.dagli.annotation.visitor.VisitedBy; import com.linkedin.dagli.generator.Constant; import com.linkedin.dagli.math.vector.DenseVector; import com.linkedin.dagli.nn.result.NNResult; import com.linkedin.dagli.producer.Producer; import com.linkedin.dagli.transformer....
nn/src/main/java/com/linkedin/dagli/nn/layer/NNSplitVectorSequenceLayer.java
0.940147
0.434401
NNSplitVectorSequenceLayer.java
starcoder
package Java_Training.Graph_Traversal; import java.util.Hashtable; import java.util.LinkedList; import java.util.ListIterator; import java.util.Set; //I will deal only with directed graph public class Graph { private int numVertices; public Hashtable<Integer, LinkedList<Node>> g; public Hashtable<Integer,...
Chapter_22_Elementary_Graph_Algorithms/Graph_Traversal/Graph.java
0.576423
0.434341
Graph.java
starcoder
package io.github.robolib.module.hid; import java.util.Arrays; /** * The HID (Human Interface Device) base * * @author noriah <<EMAIL>> * @see Joystick */ public abstract class GenericHID implements HIDModule { /** The m_axes. */ protected HIDAxis m_axes[]; /** The m_btns. */ protected HIDButt...
src/io/github/robolib/module/hid/GenericHID.java
0.96097
0.595316
GenericHID.java
starcoder
package chapter_4; import java.io.FileNotFoundException; import datastructures.tree.BinarySearchTree; import datastructures.tree.TreeNode; import util.InputUtil; /** * Question 4.2: Given a sorted(increasing order) array with unique integer * elements, write an algorithm to create a binary search tree with minimal...
cracking-the-coding-interview/src/chapter_4/MinimalTree.java
0.848722
0.423696
MinimalTree.java
starcoder
package jsr166e; import jsr166e.LongAdder; import java.util.Map; import java.util.Set; import java.io.Serializable; /** * A keyed table of adders, that may be useful in computing frequency * counts and histograms, or may be used as a form of multiset. A * {@link LongAdder} is associated with each key. Keys are add...
src/main/java/jsr166e/LongAdderTable.java
0.941882
0.412767
LongAdderTable.java
starcoder
package com.androidinternal.graphics.cam; import android.graphics.Color; import androidx.annotation.NonNull; import androidx.core.graphics.ColorUtils; /** * Collection of methods for transforming between color spaces. * * <p>Methods are named $xFrom$Y. For example, lstarFromInt() returns L* from an ARGB integer....
lawnchair/src/com/androidinternal/graphics/cam/CamUtils.java
0.908643
0.418281
CamUtils.java
starcoder
package org.deeplearning4j.graph.iterator; import org.deeplearning4j.graph.api.Edge; import org.deeplearning4j.graph.api.IGraph; import org.deeplearning4j.graph.api.IVertexSequence; import org.deeplearning4j.graph.api.NoEdgeHandling; import org.deeplearning4j.graph.exception.NoEdgesException; import org.deeplearning4j...
deeplearning4j/deeplearning4j-graph/src/main/java/org/deeplearning4j/graph/iterator/WeightedRandomWalkIterator.java
0.894853
0.506774
WeightedRandomWalkIterator.java
starcoder
package com.maths; import java.util.ArrayList; /** * Class for linear convolution of two discrete signals using the convolution theorem. * * @author <NAME> * @version 1.0 */ public class ConvolutionFFT { /** * This method pads the signal with zeros until it reaches the new size. * * @param x The signa...
Maths/ConvolutionFFT.java
0.959317
0.624222
ConvolutionFFT.java
starcoder
package io.improbable.keanu.network; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.improbable.keanu.algorithms.ProbabilisticModel; import io.improbable.keanu.algorithms.Variable; import io.improbable.keanu.algorithms.VariableReference; import io.improbable.kea...
keanu-project/src/main/java/io/improbable/keanu/network/KeanuProbabilisticModel.java
0.928603
0.601067
KeanuProbabilisticModel.java
starcoder
import java.util.InputMismatchException; import java.util.Scanner; public class JohnsonsAlgorithm { private int SOURCE_NODE; private int numberOfNodes; private int augmentedMatrix[][]; private int potential[]; private BellmanFord bellmanFord; private...
Java/JohnsonsAlgorithm/JohnsonsAlgorithm.java
0.768212
0.527195
JohnsonsAlgorithm.java
starcoder
package lesson7; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.dataset.DataSet; import org.nd4j.linalg.dataset.api.DataSetPreProcessor; import org.nd4j.linalg.dataset.api.iterator.DataSetIterator; import org.nd4j.linalg.factory.Nd4j; import java.util.LinkedList; import java.util.List; import jav...
src/main/java/lesson7/RegIterator.java
0.572006
0.429669
RegIterator.java
starcoder
package jp.imagemagic.breakout; import java.util.Optional; import java.util.function.UnaryOperator; import java.util.stream.Collectors; import java.util.stream.Stream; final record Field(Vector size) { UnaryOperator<State> moveBar(double x) { final UnaryOperator<State> trans = s -> s.transBar(bar -> bar.m...
src/jp/imagemagic/breakout/Field.java
0.800068
0.650523
Field.java
starcoder
package com.yahoo.document.update; import com.yahoo.document.DataType; import com.yahoo.document.TensorDataType; import com.yahoo.document.datatypes.FieldValue; import com.yahoo.document.datatypes.TensorFieldValue; import com.yahoo.document.serialization.DocumentUpdateWriter; import com.yahoo.tensor.Tensor; import com...
document/src/main/java/com/yahoo/document/update/TensorModifyUpdate.java
0.866472
0.404802
TensorModifyUpdate.java
starcoder
package net.zerobuilder.modules.generics; import com.squareup.javapoet.TypeName; import com.squareup.javapoet.TypeVariableName; import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; import java.util.stream.Stream; import static java.util.Collections.emptyList; import static net.zerob...
modules/module-generics/src/main/java/net/zerobuilder/modules/generics/VarLife.java
0.75401
0.402686
VarLife.java
starcoder
package reactor.util.context; import java.util.Map; import java.util.NoSuchElementException; import java.util.Objects; import java.util.Optional; import reactor.util.annotation.Nullable; /** * A key/value store that is propagated between components such as operators via the * context protocol. Contexts are ideal ...
reactor-core/src/main/java/reactor/util/context/Context.java
0.93913
0.655171
Context.java
starcoder
package com.github.tncrazvan.arcano.tool; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * * @author <NAME> */ public interface Regex { /** * Split a String according to a regular expression. * @param subject The string to analyze. * @param regex Your regex. * @param li...
src/main/java/com/github/tncrazvan/arcano/tool/Regex.java
0.930474
0.505554
Regex.java
starcoder
package matrix; import synchronizationBarrier.MyBarrier; /** * Calculates DFT for given Quarter of Matrix * @author murat */ public class CalculateDFTQuarterWithSyncronized implements Runnable{ /** * Given matrix to be added and calculated */ Matrix A; /** * Given matrix to be added and calculated */ ...
HW3/Part3/src/matrix/CalculateDFTQuarterWithSyncronized.java
0.545528
0.524882
CalculateDFTQuarterWithSyncronized.java
starcoder
package io.github.netvl.ecoji; import java.io.*; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; /** * The main entry point for Ecoji encoding/decoding. * * <p>Use the {@link #getEncoder()} and {@link #getDecoder()} methods to obtain an instance of {@link Encoder} and * {@link Decoder},...
src/main/java/io/github/netvl/ecoji/Ecoji.java
0.956917
0.559471
Ecoji.java
starcoder
package org.apache.commons.javaflow.spi; import java.io.InputStream; public class FastByteArrayInputStream extends InputStream { /** The array to read from the input stream. */ public byte[] array; /** The first valid index. */ public int offset; /** * The number of valid bytes in {@link #...
net.tascalate.javaflow.spi/src/main/java/org/apache/commons/javaflow/spi/FastByteArrayInputStream.java
0.951312
0.452778
FastByteArrayInputStream.java
starcoder
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; /** * This class provides an empty implementation of {@link BasketballVisitor}, * 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 V...
Grammar/Basketball/gen/BasketballBaseVisitor.java
0.842134
0.412589
BasketballBaseVisitor.java
starcoder
package us.ihmc.robotics.screwTheory; import us.ihmc.robotics.geometry.RigidBodyTransform; import us.ihmc.robotics.nameBasedHashCode.NameBasedHashCodeTools; import us.ihmc.robotics.referenceFrames.ReferenceFrame; public abstract class AbstractInverseDynamicsJoint implements InverseDynamicsJoint { protected final S...
IHMCRoboticsToolkit/src/us/ihmc/robotics/screwTheory/AbstractInverseDynamicsJoint.java
0.898079
0.527438
AbstractInverseDynamicsJoint.java
starcoder
package sg.edu.nus.comp.nsynth; import sg.edu.nus.comp.nsynth.ast.BoolType; import sg.edu.nus.comp.nsynth.ast.Hole; import sg.edu.nus.comp.nsynth.ast.IntType; import sg.edu.nus.comp.nsynth.ast.Node; import sg.edu.nus.comp.nsynth.ast.theory.*; import java.util.ArrayList; import java.util.Map; import java.util.function...
src/nsynth/src/main/java/sg/edu/nus/comp/nsynth/Simplifier.java
0.660501
0.45181
Simplifier.java
starcoder
package us.ihmc.robotics.screwTheory; import org.ejml.data.DenseMatrix64F; import org.ejml.ops.CommonOps; import us.ihmc.robotics.referenceFrames.ReferenceFrame; public class DesiredJointAccelerationCalculatorOld { private final GeometricJacobian jacobian; private final DenseMatrix64F jacobianDerivativeTermMatr...
IHMCRoboticsToolkit/src/us/ihmc/robotics/screwTheory/DesiredJointAccelerationCalculatorOld.java
0.892073
0.770292
DesiredJointAccelerationCalculatorOld.java
starcoder
package de.jtem.numericalMethods.calculus.functionApproximation; import de.jtem.numericalMethods.function.DoubleParametrized; import de.jtem.numericalMethods.function.DoubleValued; /** * A class that provides static methods related to the approximation of * functions with Chebyshev polynomials. * * <p> The Cheb...
libUnzipped/de/jtem/numericalMethods/calculus/functionApproximation/ChebyshevApproximation.java
0.796174
0.427158
ChebyshevApproximation.java
starcoder
package com.opengamma.core.security.impl; import java.util.Collection; import com.opengamma.DataNotFoundException; import com.opengamma.core.Link; import com.opengamma.core.security.Security; import com.opengamma.core.security.SecurityResolver; import com.opengamma.core.security.SecuritySource; import com.opengamma.i...
projects/OG-Core/src/com/opengamma/core/security/impl/AbstractSecurityResolver.java
0.908829
0.429788
AbstractSecurityResolver.java
starcoder
package heap; public class MinHeap { private HeapNode[] tree; private int size; private final int MIN_SIZE = 16; public MinHeap() { this.tree = new HeapNode[MIN_SIZE]; size = 0; } public void insert(int val) { insert(val, 0); } public void insert(int val, int priority) { checkSize(); HeapNode new...
main/src/main/java/heap/MinHeap.java
0.727104
0.432782
MinHeap.java
starcoder
package com.g2forge.reassert.express.eval; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; import java.util.stream.Collectors; import com.g2forge.alexandria.java.close.ICloseable; import com.g2forge.alexandria.java.core.helpers.HCollection; import com.g2forge.alexandria.java.functi...
re-express/src/main/java/com/g2forge/reassert/express/eval/AnalyzeInputsEvaluator.java
0.726717
0.401365
AnalyzeInputsEvaluator.java
starcoder
package lib.x; public class Tk { // Tk here means X Tool Kit public static final boolean dbg = true; public static void dbg(String s) { if (dbg) { System.err.println(s); } } public static void dbg(int i) { if (dbg) { System.err.println(i); } } public static void assert(boolean condition)...
dev/x11-java/src/lib/x/Tk.java
0.605566
0.517876
Tk.java
starcoder
package au.gov.asd.tac.constellation.graph.visual.utilities; import au.gov.asd.tac.constellation.graph.Graph; import au.gov.asd.tac.constellation.graph.GraphElementType; import au.gov.asd.tac.constellation.graph.GraphReadMethods; import au.gov.asd.tac.constellation.graph.GraphWriteMethods; import au.gov.asd.tac.conste...
CoreVisualGraph/src/au/gov/asd/tac/constellation/graph/visual/utilities/VisualGraphUtilities.java
0.842507
0.415314
VisualGraphUtilities.java
starcoder
package org.apache.lucene.util; import java.util.Comparator; /** * Just like {@link BytesRefArray} except all values have the same length. * * <b>Note: This class is not Thread-Safe!</b> * * @lucene.internal * @lucene.experimental */ final class FixedLengthBytesRefArray implements SortableBytesRefArray { p...
lucene/core/src/java/org/apache/lucene/util/FixedLengthBytesRefArray.java
0.931095
0.419886
FixedLengthBytesRefArray.java
starcoder
package nismod.transport.optimisation; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.Set; import org.apache.commons.collections4.keyvalue.MultiKey; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import nismod.transport.demand.ODM...
transport/src/main/java/nismod/transport/optimisation/SPSA.java
0.822403
0.471771
SPSA.java
starcoder
package org.powerflows.dmn.engine.model.decision; import org.powerflows.dmn.engine.model.decision.expression.Expression; import org.powerflows.dmn.engine.model.decision.expression.ExpressionType; import org.powerflows.dmn.engine.model.decision.field.Input; import org.powerflows.dmn.engine.model.decision.rule.Rule; imp...
dmn-model/src/main/java/org/powerflows/dmn/engine/model/decision/DecisionUtil.java
0.778733
0.427815
DecisionUtil.java
starcoder
package cellsociety.frontend; import cellsociety.Simulation; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.scene.shape.Ellipse; import javafx.scene.shape.Polygon; import javafx.scene.shape.Rectangle; import javafx.scene.shape.Shape; public class DiamondDisplay extends GridDisplay { ...
src/cellsociety/frontend/DiamondDisplay.java
0.725649
0.510252
DiamondDisplay.java
starcoder
package net.ssehub.kernel_haven.logic_utils; import static java.util.Arrays.asList; import static net.ssehub.kernel_haven.util.logic.FormulaBuilder.and; import static net.ssehub.kernel_haven.util.logic.FormulaBuilder.not; import static net.ssehub.kernel_haven.util.logic.FormulaBuilder.or; import static org.hamcrest.Co...
test/net/ssehub/kernel_haven/logic_utils/SubTreeGroupFinderTest.java
0.852445
0.499329
SubTreeGroupFinderTest.java
starcoder
package com.usal.jorgeav.sportapp.network.firebase; import com.google.firebase.database.ChildEventListener; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import java.util.concurrent.Executor; /** * Esta clase implementa los métodos del Listener de Firebase {@li...
app/src/main/java/com/usal/jorgeav/sportapp/network/firebase/ExecutorChildEventListener.java
0.834643
0.417271
ExecutorChildEventListener.java
starcoder
package io.atomix.catalyst.buffer.util; /** * Memory allocator. * * @author <a href="http://github.com/kuujo"><NAME></a> */ public interface Memory { /** * Returns the memory allocator that allocated this memory. * * @return The memory allocator. */ MemoryAllocator allocator(); /** * Returns...
buffer/src/main/java/io/atomix/catalyst/buffer/util/Memory.java
0.93408
0.490114
Memory.java
starcoder
package protopoet; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; /** * Represents a valid protobuf value that may be assigned to a field. This was primarly developed * conceptually to support messages as values as part of {@link Op...
java/protopoet/FieldValue.java
0.88452
0.501587
FieldValue.java
starcoder
package com.tinkerpop.gremlin.structure.io; import com.tinkerpop.gremlin.structure.Direction; import com.tinkerpop.gremlin.structure.Edge; import com.tinkerpop.gremlin.structure.Graph; import com.tinkerpop.gremlin.structure.Vertex; import com.tinkerpop.gremlin.structure.util.detached.DetachedEdge; import com.tinkerpop...
gremlin-core/src/main/java/com/tinkerpop/gremlin/structure/io/GraphReader.java
0.890669
0.583826
GraphReader.java
starcoder
package io.cdap.cdap.api.schedule; import io.cdap.cdap.api.ProgramStatus; import io.cdap.cdap.api.app.ProgramType; /** * A factory for getting a specific type of {@link Trigger} */ public interface TriggerFactory { /** * Creates a trigger which is satisfied when at least one of the internal triggers are satis...
cdap-api/src/main/java/io/cdap/cdap/api/schedule/TriggerFactory.java
0.899443
0.516169
TriggerFactory.java
starcoder
package cz.stv.neuronnetworkfromnet; import java.io.Serializable; import java.util.Arrays; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; public class Matrix implements Serializable, Cloneable { public final int rows; public final int cols; public final double[][] data; public Ma...
src/main/java/cz/stv/neuronnetworkfromnet/Matrix.java
0.715921
0.502441
Matrix.java
starcoder
package com.jpeony.leetcode.n0018; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * [18. 4Sum](https://leetcode.com/problems/4sum/) * [18. 四数之和](https://leetcode-cn.com/problems/4sum/) * * @author yihonglei */ public class N18_4Sum { /** * 【双指针 + 排序】 * 时间复杂度:O(n^3)...
java/src/main/java/com/jpeony/leetcode/n0018/N18_4Sum.java
0.830937
0.489931
N18_4Sum.java
starcoder
package com.timetable; import java.util.ArrayList; import java.util.stream.IntStream; public class GeneticAlgorithm { private Data data; public GeneticAlgorithm(Data data) { this.data = data; } public Population evolve(Population population) { return mutatePopulation(crossoverPopulation(population)); ...
GeneticAlgorithm.java
0.622689
0.540924
GeneticAlgorithm.java
starcoder
package tech.pegasys.artemis.datastructures.state; import java.util.ArrayList; import java.util.List; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import tech.pegasys.artemis.datastructures.Copyable; import tech.pegasys.artemis.datastructures.blocks.Eth1Data; public final class Beacon...
ethereum/datastructures/src/main/java/tech/pegasys/artemis/datastructures/state/BeaconStateWithCache.java
0.653127
0.405213
BeaconStateWithCache.java
starcoder
package com.google.gerrit.server.change; import static com.google.common.truth.Truth.assertThat; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.gerrit.entities.Account; import com.google.gerrit.entities.Comment; import com.google.gerrit.entities.Human...
javatests/com/google/gerrit/server/change/CommentThreadsTest.java
0.725065
0.693494
CommentThreadsTest.java
starcoder
package org.symphonyoss.s2.common.hash; import javax.annotation.Nonnull; import org.symphonyoss.s2.common.immutable.ImmutableByteArray; /** * A thread safe static alternative to creating a HashFactory. * * Note that the methods on this class are synchronized, it would be more * performant to create a HashFactor...
S2-common-core/src/main/java/org/symphonyoss/s2/common/hash/HashProvider.java
0.908561
0.414306
HashProvider.java
starcoder
* The <pre>blaze-persistence-integration-querydsl-expressions</pre> module implements an extended expression model for * Blaze-Persistence JPQL.Next. * * <p> * The module provides a {@link com.blazebit.persistence.querydsl.BlazeJPAQuery} as a default implementation of {@link * com.blazebit.persistence.querydsl.JP...
integration/querydsl/expressions/src/main/java/com/blazebit/persistence/querydsl/package-info.java
0.853654
0.458106
package-info.java
starcoder
package jdk.internal.reflect; /** Minimal set of class file constants for assembly of field and method accessors. */ interface ClassFileConstants { // Constants public static final byte opc_aconst_null = (byte) 0x1; public static final byte opc_sipush = (byte) 0x11; public static final by...
jdk/internal/reflect/ClassFileConstants.java
0.676299
0.427337
ClassFileConstants.java
starcoder
package org.jbehave.examples.core.steps; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import java.util.concurrent.atomic.AtomicInteger; import org.jbehave.core.annotations.AfterScenario; import org.jbehave.core.annotations.AfterScenario.Outcome; import org.jbehave...
examples/core/src/main/java/org/jbehave/examples/core/steps/BeforeAfterSteps.java
0.825519
0.459015
BeforeAfterSteps.java
starcoder
package org.enso.table.data.column.storage; import java.util.*; import java.util.stream.LongStream; import org.enso.table.data.column.builder.object.NumericBuilder; import org.enso.table.data.column.operation.aggregate.Aggregator; import org.enso.table.data.column.operation.aggregate.numeric.LongToLongAggregator; imp...
table/src/main/java/org/enso/table/data/column/storage/LongStorage.java
0.885841
0.47384
LongStorage.java
starcoder
package pl.karol202.evolution.entity.behaviour; import pl.karol202.evolution.entity.ComponentManager; import pl.karol202.evolution.entity.Entity; import pl.karol202.evolution.ui.main.ViewInfo; import java.awt.*; import java.util.HashMap; import java.util.Map; import java.util.stream.Stream; public class BehaviourMan...
src/pl/karol202/evolution/entity/behaviour/BehaviourManager.java
0.573559
0.420302
BehaviourManager.java
starcoder
package org.ojalgo.random; import org.ojalgo.function.special.CombinatorialFunctions; import org.ojalgo.function.special.ErrorFunction; import org.ojalgo.function.special.GammaFunction; import org.ojalgo.function.special.MissingMath; /** * RandomUtils * * @deprecated v48 * @author apete */ @Deprecated public abs...
src/org/ojalgo/random/RandomUtils.java
0.850717
0.450843
RandomUtils.java
starcoder
package com.opengamma.strata.calc.runner; import java.util.Optional; import com.opengamma.strata.basics.CalculationTarget; import com.opengamma.strata.calc.CalculationRules; import com.opengamma.strata.calc.Column; import com.opengamma.strata.calc.Measure; import com.opengamma.strata.calc.ReportingCurrency; /** * T...
modules/calc/src/main/java/com/opengamma/strata/calc/runner/CalculationParameter.java
0.906927
0.682904
CalculationParameter.java
starcoder
package pers.tavish.leetcode.hard; /* The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially positioned in the top-left room and must fight his way through the dungeon to rescu...
src/main/java/pers/tavish/leetcode/hard/DungeonGame.java
0.649134
0.628664
DungeonGame.java
starcoder
package org.elasticsearch.cluster.metadata; import org.apache.lucene.util.SetOnce; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.common.collect.Tuple; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; impor...
server/src/main/java/org/elasticsearch/cluster/metadata/IndexAbstraction.java
0.883676
0.490175
IndexAbstraction.java
starcoder
package com.sanctionco.jmail.net; import java.util.Arrays; import java.util.HashSet; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; /** * Provides validation methods for internet protocol (IP) addresses, * both IPv4 and IPv6. * * <p>Note: IP addresses with prefixes are not cu...
src/main/java/com/sanctionco/jmail/net/InternetProtocolAddress.java
0.893562
0.439687
InternetProtocolAddress.java
starcoder
package frechsack.dev.util.array; import frechsack.dev.util.Pair; import frechsack.dev.util.route.BiIterable; import frechsack.dev.util.route.BiIterator; import java.math.BigDecimal; import java.math.BigInteger; import java.util.*; import java.util.function.Consumer; import java.util.function.Function; import java.ut...
src/main/java/frechsack/dev/util/array/Array.java
0.885687
0.516656
Array.java
starcoder
package io.mykit.concurrent.forkjoin.countedcompleter; import org.junit.Test; import java.util.concurrent.CountedCompleter; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import static org.junit.Assert.assertThat; public class Co...
java-concurrent/src/main/java/io/mykit/concurrent/forkjoin/countedcompleter/CountedCompleterTest.java
0.835785
0.466846
CountedCompleterTest.java
starcoder
package io.micronaut.data.model.query.factory; import io.micronaut.data.model.query.QueryModel; /** * Factory for creating criterion instances. * * @author graemerocher * @since 1.0 */ public class Restrictions { /** * Restricts the property to be equal to the given value. * @param property The pr...
data-model/src/main/java/io/micronaut/data/model/query/factory/Restrictions.java
0.954984
0.703855
Restrictions.java
starcoder
package com.opengamma.analytics.financial.model.volatility.surface; import com.opengamma.analytics.math.curve.InterpolatedDoublesCurve; import com.opengamma.analytics.math.function.Function; import com.opengamma.analytics.math.function.Function2D; import com.opengamma.analytics.math.interpolation.Interpolator1D; impor...
projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/model/volatility/surface/InterpolatedVolatilityTermStructureProvider.java
0.946695
0.751306
InterpolatedVolatilityTermStructureProvider.java
starcoder
package org.jfree.chart.annotations; import java.awt.Graphics2D; import java.awt.Image; import java.awt.geom.Rectangle2D; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.jfree.chart.axis.AxisLocation; import org.jfree.chart.axis.ValueAxis; import org.jfree.c...
FeatureExtraction/SubjectExample/Chart/1/src/main/java/org/jfree/chart/annotations/XYDataImageAnnotation.java
0.879036
0.486575
XYDataImageAnnotation.java
starcoder
package com.tukeping.cs.algorithms.dynamicprogramming; import org.junit.Test; import java.util.Arrays; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; /** * LIS 最长上升子序列问题 经典问题 * * binary-search | dynamic-programming * * microsoft * * Longest ascending subsequence * * @auth...
src/main/java/com/tukeping/cs/algorithms/dynamicprogramming/LongestAscendingSubsequence.java
0.687105
0.523238
LongestAscendingSubsequence.java
starcoder
package io.github.yedaxia.apidocs.ext.rap; import io.github.yedaxia.apidocs.parser.ParamNode; /** * @author yeguozhong <EMAIL> */ class DataType { public static String STRING = "string"; public static String NUMBER = "number"; public static String BOOLEAN = "boolean"; public static String OBJECT = ...
library/src/main/java/io/github/yedaxia/apidocs/ext/rap/DataType.java
0.751922
0.429788
DataType.java
starcoder
import clipping.BackFaceCulling; import clipping.ClippingResult; import clipping.ClippingWorker; import model.*; import shading.GouraudShading; import java.util.ArrayList; import java.util.List; public class RasterScene { private MyCanvas canvas; Vector viewPortParams = new Vector(0.5, 0.5, 1); ClippingW...
src/main/java/RasterScene.java
0.559771
0.468426
RasterScene.java
starcoder
package com.irurueta.ar.sfm; import com.irurueta.ar.slam.BaseCalibrationData; import java.io.Serializable; /** * Contains base configuration for a two view sparse re-constructor using SLAM * (Simultaneous Location And Mapping) to determine the scale of the scene * (i.e. the baseline or separation between cameras)...
src/main/java/com/irurueta/ar/sfm/BaseSlamTwoViewsSparseReconstructorConfiguration.java
0.93972
0.541651
BaseSlamTwoViewsSparseReconstructorConfiguration.java
starcoder
package org.autopipes.util; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.Sorte...
mock/src/main/java/org/autopipes/util/EdgeIterator.java
0.759805
0.45944
EdgeIterator.java
starcoder
package chessGame.model; import chessGame.model.*; import chessGame.util.Movement; import junit.framework.TestCase; import java.io.*; public class PiecePawnTest extends TestCase { public void testGetAvailableMovements() throws Exception { Board board = new Board(); board.initializeSpace(); ...
tests/chessGame/model/PiecePawnTest.java
0.82755
0.416737
PiecePawnTest.java
starcoder
package selenium.boot.core.matchers; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; import java.util.Comparator; import static java.lang.Integer.signum; /** * @author <a href="mailto:<EMAIL>"><NAME></a> * @version %I%, %G% * @since 2.0 */ class ComparatorMa...
selenium-boot-project/selenium-boot-core/src/main/java/selenium/boot/core/matchers/ComparatorMatcherBuilder.java
0.853501
0.568835
ComparatorMatcherBuilder.java
starcoder
package org.sedgewick.algorithms.part_one.week_five.assigment_one; import edu.princeton.cs.algs4.Point2D; import edu.princeton.cs.algs4.RectHV; import edu.princeton.cs.algs4.StdDraw; import java.util.ArrayList; import java.util.List; public class KdTree { private Node root; private int size; public KdTr...
src/main/java/org/sedgewick/algorithms/part_one/week_five/assigment_one/KdTree.java
0.819207
0.476519
KdTree.java
starcoder
package me.drakeet.multitype; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.ViewGroup; import java.util.List; /*** * @author drakeet */ public abstract class ItemViewBinder<T, VH extends RecyclerView.ViewHolder> { ...
mulitype/src/main/java/me/drakeet/multitype/ItemViewBinder.java
0.758421
0.42674
ItemViewBinder.java
starcoder
package com.datastax.dse.driver.api.core.metadata; import com.datastax.oss.driver.api.core.Version; import com.datastax.oss.driver.api.core.metadata.Node; /** The keys for the additional DSE-specific properties stored in {@link Node#getExtras()}. */ public class DseNodeProperties { /** * The DSE version that th...
core/src/main/java/com/datastax/dse/driver/api/core/metadata/DseNodeProperties.java
0.859708
0.455744
DseNodeProperties.java
starcoder
package org.spacebits.spacecraft; import static org.junit.Assert.assertEquals; import org.junit.Test; import org.spacebits.physics.Unit; import org.spacebits.spacecraft.PhysicalSpecification; public class PhysicalSpecificationTest { @Test public void testPhysicalSpecification() { double mass = 1.5 * Unit.kg...
test/org/spacebits/spacecraft/PhysicalSpecificationTest.java
0.820972
0.550426
PhysicalSpecificationTest.java
starcoder
package org.tensorflow.op.core; import java.util.Arrays; import java.util.List; import org.tensorflow.GraphOperation; import org.tensorflow.Operand; import org.tensorflow.Operation; import org.tensorflow.OperationBuilder; import org.tensorflow.Output; import org.tensorflow.op.Operands; import org.tensorflow.op.RawOp;...
tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/BarrierTakeMany.java
0.893849
0.466542
BarrierTakeMany.java
starcoder
package kodkod.engine.fol2sat; import java.util.Iterator; import java.util.Set; import kodkod.ast.Formula; import kodkod.engine.config.Options; import kodkod.instance.Bounds; /** * A log of the translations of the descendants of a given formula that * are either formulas or that desugar to formulas. * @specfield...
src/kodkod/engine/fol2sat/TranslationLog.java
0.879774
0.457682
TranslationLog.java
starcoder
package javax.vecmath; import java.lang.Math; /** * A 2 element point that is represented by double precision floating point x,y * coordinates. * */ public class Point2d extends Tuple2d implements java.io.Serializable { // Compatible with 1.1 static final long serialVersionUID = 1133748791492571954L; /** ...
extern/gwt-vecmath/src/javax/vecmath/Point2d.java
0.930931
0.647687
Point2d.java
starcoder
package com.alexprut.algo.datastructures; import com.alexprut.algo.algorithms.graph.mst.Kruskal; import java.util.ArrayList; import java.util.List; /** * A graph data structure consists of a finite (and possibly mutable) set of vertices (also called * nodes), together with a set of unordered pairs of these vertices...
src/main/java/com/alexprut/algo/datastructures/Graph.java
0.949821
0.598752
Graph.java
starcoder
package rocks.inspectit.shared.cs.cmr.service; import java.util.Collection; import java.util.Date; import java.util.List; import rocks.inspectit.shared.all.cmr.service.ServiceExporterType; import rocks.inspectit.shared.all.cmr.service.ServiceInterface; import rocks.inspectit.shared.all.communication.data.InvocationSe...
inspectit.shared.cs/src/main/java/rocks/inspectit/shared/cs/cmr/service/IInvocationDataAccessService.java
0.913575
0.471953
IInvocationDataAccessService.java
starcoder
package dp.gof; import java.util.List; public class PersonBuilder implements Builder { private Person person; public PersonBuilder() { this.person = new Person(); } @Override public void name(String name) { this.person.setName(name); } @Override public void age(Integ...
src/main/java/dp/gof/PersonBuilder.java
0.749179
0.415729
PersonBuilder.java
starcoder
package com.bkahlert.nebula.utils; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import org.eclipse.core.runtime.AssertionFailedException; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.junit.Test; public class MathUtilsTest { @...
test/com/bkahlert/nebula/utils/MathUtilsTest.java
0.874707
0.684745
MathUtilsTest.java
starcoder
package javax0.geci.tools; /** * Simplified and limited version of Levenshtein distance calculation. * For more information on this distance google Levenshtein. * * <p> This implementation is used to guess the parameter name in case * it is not found because the user made a typo. In that case the error * message...
javageci-tools/src/main/java/javax0/geci/tools/Levenshtein.java
0.864268
0.44553
Levenshtein.java
starcoder
package organice.model.person; import static java.util.Objects.requireNonNull; import static organice.commons.util.AppUtil.checkArgument; /** * Represents a Person's type in ORGANice. * Guarantees: immutable; is valid as declared in {@link #isValidType(String)} */ public class Type { public static final Strin...
src/main/java/organice/model/person/Type.java
0.924773
0.435361
Type.java
starcoder
package cpsc2150.banking; /** * Holds information about their customer and allows them to apply for a loan. The actual work for the loan is handled by IMortgage * Defines: CreditScore: Z * MonthlyDebt: R - How much they pay per moth towards other forms of debt (car payments, student loans, etc) * ...
2150 Labs/7/Lab7/cpsc2150/banking/ICustomer.java
0.669205
0.471041
ICustomer.java
starcoder
package sc.iview.io; import net.imagej.mesh.Mesh; import net.imagej.mesh.naive.NaiveDoubleMesh; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessibleInterval; import net.imglib2.RealLocalizable; import net.imglib2.RealPoint; import net.imglib2.img.Img; import net.imglib2.img.array.ArrayImgs; import net....
src/main/java/sc/iview/io/N5.java
0.649134
0.402891
N5.java
starcoder
package harvard.robobees.simbeeotic.util; import java.util.concurrent.TimeUnit; /** * A simple PID control loop. * * @author bkate */ public class PIDController { private double setPoint; private double pGain; private double iGain; private double dGain; private long lastTime; private d...
simbeeotic-core/src/main/java/harvard/robobees/simbeeotic/util/PIDController.java
0.763484
0.417509
PIDController.java
starcoder