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 org.joda.time.chrono; import org.joda.time.Chronology; import org.joda.time.DateTime; import org.joda.time.DateTimeConstants; import org.joda.time.DateTimeField; import org.joda.time.DateTimeZone; import java.util.concurrent.ConcurrentHashMap; /** * Implements the Islamic, or Hijri, calendar system using ar...
src/main/java/org/joda/time/chrono/BISChronology.java
0.905969
0.482246
BISChronology.java
starcoder
// @formatter:on package org.tensorics.core.tensor.operations; import static java.util.Objects.requireNonNull; import static org.tensorics.core.tensor.operations.PositionFunctions.forSupplier; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.function.Function; impor...
src/java/org/tensorics/core/tensor/operations/TensorInternals.java
0.818737
0.420897
TensorInternals.java
starcoder
package org.apache.geode; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; /** * This interface defines a contract between the application and GemFire that allows GemFire to * determine whether an application object contains a delta, allows GemFire to extract the delta * from an ap...
geode-core/src/main/java/org/apache/geode/Delta.java
0.851614
0.433622
Delta.java
starcoder
package objects; import javafx.geometry.Bounds; import javafx.scene.Group; import javafx.scene.shape.Circle; import math.num.Vector; import java.util.ArrayList; import java.util.Random; /** * Basic ball class, implements collisions with objects */ public class Ball extends Circle { private Vector vel; pri...
src/objects/Ball.java
0.901177
0.452113
Ball.java
starcoder
package org.python.core; import junit.framework.TestCase; import org.junit.Assert; import org.python.util.PythonInterpreter; /** * Tests for PyArray. */ public class PyArrayTest extends TestCase { public void testSetSliceNegativeStep() { PyArray arrayToModify = new PyArray(PyString.class, new String[] ...
tests/java/org/python/core/PyArrayTest.java
0.781289
0.47993
PyArrayTest.java
starcoder
package js.util.collections; import js.lang.Any; import js.util.function.JsComparator; import js.util.iterable.JsIterable; import org.teavm.jso.*; import javax.annotation.Nullable; import java.util.Collection; public interface Array<T extends Any> extends ReadonlyArray<T> { @JSBody(script = "return []") sta...
disconnect-classlib/src/main/java/js/util/collections/Array.java
0.864511
0.547706
Array.java
starcoder
package loon.core.geom; public enum Alignment { TOP_LEFT(0.0, 1.0) { public Vector2f align(Vector2f o, Dimension s) { return new Vector2f(o.getX(), o.getY() + s.getHeight() - 1); } public Vector2f alignBox(Vector2f o, Dimension s, Dimension b) { return new Vector2f(o.getX(), o.getY() + s.getHeight() ...
Java/old/OpenGL-1.0(old_ver)/Loon-backend-JavaSE/src/loon/core/geom/Alignment.java
0.862496
0.63131
Alignment.java
starcoder
package com.google.appengine.api.search; import com.google.common.base.Preconditions; import java.io.Serializable; import java.util.Collection; import java.util.Collections; import java.util.Iterator; /** * Represents a result of executing a search. * The Results include an {@link OperationResult}, a collection of ...
api/src/main/java/com/google/appengine/api/search/Results.java
0.945826
0.414899
Results.java
starcoder
package de.hdm.mi.sd1.Task8_Classes; import java.util.Random; /** * Created by TG on 08.11.19. */ /* Source: https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html ____________________________________________________________ | │ Class │ Package │ Subclass │ Subclass │ World ...
scannerProj/src/main/java/de/hdm/mi/sd1/Task8_Classes/Coordinate.java
0.725746
0.551815
Coordinate.java
starcoder
package pbd; import javafx.geometry.*; import javafx.scene.shape.Line; /* * Author: <NAME> * * This class builds an N-Gon, this merely meaning the object has to be a polygon requiring a closed loop. * This class will throw exceptions if too few vertices are defined. * This class is expected to behave ...
NGon.java
0.564339
0.602588
NGon.java
starcoder
package com.gm.repository.cache; import android.support.annotation.Nullable; import java.util.LinkedHashMap; import java.util.Map; /** * Author : Gowtham * Email : <EMAIL> * Github : https://github.com/goutham106 * Created on : 9/18/17. * * LRU is Least Recently Used, that is, least recently, that...
repository/src/main/java/com/gm/repository/cache/LruCache.java
0.890056
0.429429
LruCache.java
starcoder
package meldexun.raytraceutil; public class RaytracingEngine { private double camX; private double camY; private double camZ; private int camBlockX; private int camBlockY; private int camBlockZ; private final IRaytracingCache opacityCache; private final IRaytracingCache resultCache; private final Int2BoolTri...
src/main/java/meldexun/raytraceutil/RaytracingEngine.java
0.76454
0.402157
RaytracingEngine.java
starcoder
package tuio_demo; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Image; import java.awt.image.BufferedImage; public abstract class ImageTool { private ImageTool() { } /** * Converts a given Image into a BufferedImage * * @param img The Image to be converted * @re...
TUIO_Demo/src/tuio_demo/ImageTool.java
0.856468
0.471953
ImageTool.java
starcoder
package com.googlecode.cqengine.query.option; import com.googlecode.cqengine.query.QueryFactory; /** * An enum of some flags which can be set into {@link QueryOptions} to request certain behaviours from the query engine. * This enum is not an exhaustive set of possible flags which can be set. For example custom ind...
code/src/main/java/com/googlecode/cqengine/query/option/EngineFlags.java
0.888789
0.41401
EngineFlags.java
starcoder
package design; /** * Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle and the last position is connected back to the first position to make a circle. It is also called "Ring Buffer". * ...
src/design/DesignCircularQueue.java
0.904203
0.637059
DesignCircularQueue.java
starcoder
package core; import SportPlanner.*; import java.util.Date; import java.text.DateFormat; import java.text.SimpleDateFormat; public class TrainingDay { private String date; // dd.mm.yyyy private FitnessTraining fitnessTraining; private DistanceTraining distanceTraining; public TrainingDay() { } ...
src/core/TrainingDay.java
0.535827
0.533944
TrainingDay.java
starcoder
package org.jacoco.agent.p025rt.internal_8ff85ea.asm.tree; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import org.jacoco.agent.p025rt.internal_8ff85ea.asm.MethodVisitor; /* renamed from: org.jacoco.agent.rt.internal_8ff85ea.asm.tree.FrameNode */ public class Frame...
sources/org/jacoco/agent/p025rt/internal_8ff85ea/asm/tree/FrameNode.java
0.661923
0.404507
FrameNode.java
starcoder
package map.intersection; import map.track.*; import math.Vector2D; import sim.Const; import sim.Simulation; import traveldata.TravelPlan; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Area; import java.awt.geom.Rectangle2D; import...
java/src/map/intersection/Intersection.java
0.818447
0.560313
Intersection.java
starcoder
package com.github.ryuseiishida.pedestrian_simulation.environment.object.cell; import com.badlogic.gdx.math.Vector2; import com.github.ryuseiishida.pedestrian_simulation.util.Tuple; import java.util.ArrayList; /** * This class manages multiple Cell classes for the representation of pedestrian_simulation areas and o...
core/src/com/github/ryuseiishida/pedestrian_simulation/environment/object/cell/CellsMap.java
0.937476
0.607343
CellsMap.java
starcoder
package org.mapstruct; /** * Contains all constants defined in the mapping process. * * @author <NAME> */ public final class MappingConstants { private MappingConstants() { } /** * In an {@link ValueMapping} this represents a {@code null} source or target. */ public static final String ...
core/src/main/java/org/mapstruct/MappingConstants.java
0.908431
0.402069
MappingConstants.java
starcoder
package org.ggp.base.player.gamer.statemachine.MCTS.manager.parameterstuning.structure.problemrep; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.ggp.base.player.gamer.statemachine.MCS.manager.hybrid.CompleteMoveStats; import inriacmaes.CMAEvolutionStrategy; /** * This ...
src/main/java/org/ggp/base/player/gamer/statemachine/MCTS/manager/parameterstuning/structure/problemrep/SelfAdaptiveESProblemRepresentation.java
0.734691
0.597637
SelfAdaptiveESProblemRepresentation.java
starcoder
package fi.oulu.tol.sqat.atest; import static org.junit.Assert.*; import org.junit.Test; import tol.sqat.session6.*; public class US08 { @Test public void testStartWithAMultipleStrikesForm() throws InvalidInput, InvalidFrameStateException { BowlingGame game = new BowlingGame(); game.addFrame(new Frame(10,...
data/dissectionTDD/Acceptance Tests/BSK/src/fi/oulu/tol/sqat/atest/US08.java
0.595845
0.481698
US08.java
starcoder
package acousticfield3d.math; /** * Started Date: Jul 16, 2004<br><br> * Represents a translation, rotation and scale in one object. * * @author <NAME> * @author <NAME> */ public final class Transform implements Cloneable, java.io.Serializable { static final long serialVersionUID = 1; public static fi...
AcousticFieldSim/src/acousticfield3d/math/Transform.java
0.986409
0.723187
Transform.java
starcoder
package utils; /** * Created by <NAME> on 2017-03-08 * Interface used to unify iteration across different data structures. * @param <T> */ public interface IteratorInterface<T> { /** * Method sets the focus of the iterator to the firs element of data structure */ void first(); /** * Method sets the focus...
src/utils/IteratorInterface.java
0.86916
0.433682
IteratorInterface.java
starcoder
package org.riversun.rfcode; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * This class implements the basic structure of the Random Forests. It contains methods to run the classification. * * Modified: * author <NAME>(<EMAIL>) * version July 10, 2019 * ...
src/main/java/org/riversun/rfcode/_RandomForest.java
0.910228
0.482185
_RandomForest.java
starcoder
package biomight.view; import java.io.Serializable; import java.math.BigDecimal; /*************************************************************************** * @author SurferJim * * Everything in BioMight can be constructed by attaching cubes. This * object will wrap a bound box around a compoent and desc...
BioMightUtility/src/view/BioMightBoundBox.java
0.76145
0.499451
BioMightBoundBox.java
starcoder
package it.unicam.cs.asdl2021.mp2TeseiTest; import static org.junit.jupiter.api.Assertions.*; import java.util.HashSet; import java.util.Set; import org.junit.jupiter.api.Test; class StronglyConnectedComponentsFinderTest { @Test final void testExceptions() { StronglyConnectedComponentsFinder<String...
MiniProgetto2/MP2/src/it/unicam/cs/asdl2021/mp2/StronglyConnectedComponentsFinderTest.java
0.734976
0.553988
StronglyConnectedComponentsFinderTest.java
starcoder
package com.github.robtimus.junit.support.collections; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import java.util.AbstractMap.SimpleEntry; import java.util.HashMap; import jav...
src/main/java/com/github/robtimus/junit/support/collections/MapEntryTests.java
0.934873
0.542682
MapEntryTests.java
starcoder
package design; import java.util.Stack; /** * Created by gouthamvidyapradhan on 13/08/2017. * Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. * <p> * Calling next() will return the next smallest number in the BST. * <p> * Note: next() and has...
java/tag/design/BSTIterator.java
0.906303
0.508178
BSTIterator.java
starcoder
package hageldave.dimred.datasets.regular; import FileHandler.FileHandler; import java.util.ArrayList; import java.util.Arrays; import java.util.Objects; import java.util.Scanner; import java.util.stream.IntStream; public class AutoMPG { private static AutoMPG instance; private static final String SRC_URL = ...
proj/src/main/java/hageldave/dimred/datasets/regular/AutoMPG.java
0.741487
0.452234
AutoMPG.java
starcoder
package io.flutter.run.common; import com.intellij.psi.PsiElement; import com.intellij.psi.impl.source.tree.LeafPsiElement; import io.flutter.AbstractDartElementTest; import org.jetbrains.annotations.NotNull; import org.junit.Test; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.core.IsNot...
testSrc/unit/io/flutter/run/common/TestTypeTest.java
0.797044
0.47098
TestTypeTest.java
starcoder
package com.github.dabasan.xops.bd1; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.dabasan.basis.matrix.Matrix; import com.github.dabasan.bas...
xopsmanipulator-bd1/src/main/java/com/github/dabasan/xops/bd1/BD1Creator.java
0.877922
0.438184
BD1Creator.java
starcoder
package org.anchoranalysis.image.core.bufferedimage; import java.awt.image.BufferedImage; import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.anchoranalysis.core.exception.CreateException; import org.anchoranalysis.image.core.stack.RGBChannelNames; import org.anchoranalysis.image.core.stack.Stack; i...
anchor-image-core/src/main/java/org/anchoranalysis/image/core/bufferedimage/BufferedImageFromStack.java
0.908079
0.460168
BufferedImageFromStack.java
starcoder
package seedu.address.logic; import java.io.IOException; import java.nio.file.Path; import javafx.collections.ObservableList; import seedu.address.commons.core.GuiSettings; import seedu.address.logic.commands.CommandResult; import seedu.address.logic.commands.deliverable.Command; import seedu.address.logic.commands.e...
src/main/java/seedu/address/logic/LogicDeliverableManager.java
0.836354
0.422564
LogicDeliverableManager.java
starcoder
package tarehart.rlbot.physics; import tarehart.rlbot.math.vector.Vector2; import tarehart.rlbot.math.vector.Vector3; import tarehart.rlbot.math.*; import java.time.Duration; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.function.Predica...
java/src/tarehart/rlbot/physics/BallPath.java
0.872198
0.563378
BallPath.java
starcoder
package com.github.s4ke.algo2.exercise9; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by Martin on 20.12.2015. */ public class Change { private static class InfiniteList<T> extends ArrayList<...
src/main/java/com/github/s4ke/algo2/exercise9/Change.java
0.799325
0.414484
Change.java
starcoder
package com.energyxxer.trident.compiler.analyzers.default_libs.via_reflection; public class Math { private static final double LN_2 = java.lang.Math.log(2); public static final double PI = java.lang.Math.PI; public static final double E = java.lang.Math.E; public static double pow(double a, double b) ...
trident-lang/src/com/energyxxer/trident/compiler/analyzers/default_libs/via_reflection/Math.java
0.901111
0.790611
Math.java
starcoder
package nl.knokko.entities; import java.nio.ByteBuffer; import org.lwjgl.util.vector.Vector3f; import nl.knokko.render.model.TexturedModel; import nl.knokko.util.Resources; import nl.knokko.world.World; public class EntityDecorative extends Entity { public static final byte ID = -128; protected TexturedModel ...
Chosen Warrior/src/nl/knokko/entities/EntityDecorative.java
0.810479
0.419707
EntityDecorative.java
starcoder
package leetcode; import java.util.LinkedList; import java.util.Queue; /** * You are given a m x n 2D grid initialized with these three possible values. -1 - A wall or an obstacle. 0 - A gate. INF - Infinity means an empty room. We use the value 231 - 1 = 2147483647 to represent INF as you may assume that the distan...
java/286.java
0.686895
0.510558
286.java
starcoder
package com.twofortyfouram.spackle; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import com.twofortyfouram.spackle.test.R; import org.junit.Test; import org.junit.runner.RunWith; import static android.support.test.InstrumentationRegistry.getContext; import static ...
spackleLib/src/androidTest/java/com/twofortyfouram/spackle/ResourceUtilTest.java
0.82108
0.490663
ResourceUtilTest.java
starcoder
package infodynamics.measures.discrete; import infodynamics.utils.EmpiricalMeasurementDistribution; /** * A basic interface for calculators computing measures on a univariate <i>channel</i> * for discrete (ie int[]) data from a * source to a destination time-series (ie mutual information and transfer entrop...
artifacts/infodynamics-dist-1.3/java/source/infodynamics/measures/discrete/ChannelCalculatorDiscrete.java
0.867022
0.434461
ChannelCalculatorDiscrete.java
starcoder
package org.orekit.propagation.analytical.gnss; import org.hipparchus.analysis.differentiation.UnivariateDerivative2; import org.hipparchus.geometry.euclidean.threed.FieldVector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.orekit.attitudes.AttitudeProvider; import org.orekit.errors.OrekitExc...
src/main/java/org/orekit/propagation/analytical/gnss/SBASPropagator.java
0.943452
0.467636
SBASPropagator.java
starcoder
package gw.internal.gosu.compiler; /** */ public class UsingStatementTest extends ByteCodeTestBase { public void testUsingStatementBlockExecutes() throws Exception { invokeTestMethodAndVerifyAssertions( "testUsingStatementBlockExecutes", 1 ); } public void testDisposableExpression() throws Exception { ...
gosu-test/src/main/java/gw/internal/gosu/compiler/UsingStatementTest.java
0.755096
0.480052
UsingStatementTest.java
starcoder
package com.sumzerotrading.marketdata; import java.math.BigDecimal; import java.math.BigInteger; public class MarketDepthLevel implements Comparable<MarketDepthLevel> { private BigDecimal price; private BigDecimal size; private MarketDepthBook.Side side; private int deciamlPlaces = 0; public MarketDe...
sumzero-api/sumzero-market-data-api/src/main/java/com/sumzerotrading/marketdata/MarketDepthLevel.java
0.839865
0.424531
MarketDepthLevel.java
starcoder
package com.graphbuilder.curve; /** <p>The Cardinal-spline passes through the points in the control-path specified by the group-iterator. However, the curve does not pass through the first or the last control-point, it begins at the second control-point and ends at the second last control-point. <p>There is ...
src/main/java/com/graphbuilder/curve/CardinalSpline.java
0.816333
0.448426
CardinalSpline.java
starcoder
package at.jku.cg.sar.trajectory; import java.util.ArrayList; import java.util.List; import at.jku.cg.sar.pathfinder.PathFinderResult; import at.jku.cg.sar.sim.SimulatorSettings; import at.jku.cg.sar.sim.flightpath.FlightLeg; import at.jku.cg.sar.sim.flightpath.GridFlightLeg; import at.jku.cg.sar.sim.flightpath.World...
src/at/jku/cg/sar/trajectory/SimpleTrajectory.java
0.780412
0.441914
SimpleTrajectory.java
starcoder
package ika.geo.grid; import ika.geo.GeoGrid; import ika.geo.GeoObject; import ika.geo.GeoPath; import ika.geo.GeoRefGrid; import ika.geo.VectorSymbol; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; /** * @author <NAME>, Institute of Cartography, ETH Zurich */ public class GridFalllineOperator impl...
src/ika/geo/grid/GridFalllineOperator.java
0.819171
0.468183
GridFalllineOperator.java
starcoder
package CH.ifa.draw.framework; import java.awt.*; /** * Handles are used to change a figure by direct manipulation. * Handles know their owning figure and they provide methods to * locate the handle on the figure and to track changes. * <hr> * <b>Design Patterns</b><P> * <img src="images/red-ball-small.gif" wid...
data/jhotdraw/jhotdraw-5.2/CH/ifa/draw/framework/Handle.java
0.925701
0.422624
Handle.java
starcoder
package org.jglrxavpok.jlsl.glsl; import static org.jglrxavpok.jlsl.glsl.GLSL.Extensions; import static org.jglrxavpok.jlsl.glsl.GLSL.Uniform; @Extensions({"GL_ARB_explicit_uniform_location", "GL_ARB_arrays_of_arrays"}) public class TestShader extends FragmentShaderEnvironment { public final double PI = ...
src/main/java/org/jglrxavpok/jlsl/glsl/TestShader.java
0.713831
0.459743
TestShader.java
starcoder
public class BinarySearchTreeT<T extends Comparable> { private Node root; /** * Constructs an empty binary search tree (BST). */ public BinarySearchTreeT() { root = null; } /** * Inner class representing one node in a BST. */ private class Node { p...
BinarySearchTreeT.java
0.892969
0.629746
BinarySearchTreeT.java
starcoder
package org.graalvm.compiler.jtt.optimize; import static org.junit.runners.Parameterized.Parameter; import static org.junit.runners.Parameterized.Parameters; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org....
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/IfNodeCanonicalizationsTest.java
0.694613
0.470919
IfNodeCanonicalizationsTest.java
starcoder
package org.paukov.exercise.array; import java.util.HashSet; import java.util.Set; /** * Created by dpaukov on 5/21/18. 128. Longest Consecutive Sequence (Hard) * https://leetcode.com/problems/longest-consecutive-sequence/description/ * * Given an unsorted array of integers, find the length of the longest consecu...
src/main/java/org/paukov/exercise/array/LongestConsecutiveSequence.java
0.933915
0.421611
LongestConsecutiveSequence.java
starcoder
package org.apache.geode.redis; import java.util.Arrays; import java.util.List; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java....
geode-for-redis/src/commonTest/java/org/apache/geode/redis/ConcurrentLoopingThreads.java
0.89906
0.450782
ConcurrentLoopingThreads.java
starcoder
package net.finmath.montecarlo.interestrate.products; import java.util.Set; import net.finmath.exception.CalculationException; import net.finmath.montecarlo.RandomVariable; import net.finmath.montecarlo.interestrate.LIBORModelMonteCarloSimulationInterface; import net.finmath.montecarlo.interestrate.products.component...
src/main/java6/net/finmath/montecarlo/interestrate/products/Portfolio.java
0.853272
0.400222
Portfolio.java
starcoder
package org.apache.poi.ss.formula.eval; import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.formula.eval.EvaluationException; import org.apache.poi.ss.formula.eval.NumberEval; import org.apache.poi.ss.formula.eval.OperandResolver; import org.apache.poi.ss.formula.eval.ValueEval; import org.apache...
org/apache/poi/ss/formula/eval/TwoOperandNumericOperation.java
0.588534
0.431824
TwoOperandNumericOperation.java
starcoder
package com.gemstone.gemfire.cache.client; import com.gemstone.gemfire.cache.*; /** * Each enum represents a predefined {@link RegionAttributes} in a {@link ClientCache}. * These enum values can be used to create regions using a {@link ClientRegionFactory} * obtained by calling {@link ClientCache#createClientRegio...
gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/ClientRegionShortcut.java
0.8827
0.444685
ClientRegionShortcut.java
starcoder
package cz.muni.csirt.aida.matching.esper.soda; import com.espertech.esper.common.client.soda.*; import cz.muni.csirt.aida.matching.esper.soda.annotations.StatementType; import cz.muni.csirt.aida.mining.model.Item; import cz.muni.csirt.aida.mining.model.Rule; import cz.muni.csirt.aida.mining.model.Rules; import java...
services/matching/src/main/java/cz/muni/csirt/aida/matching/esper/soda/RuleStatements.java
0.761804
0.429609
RuleStatements.java
starcoder
package com.masanari.wallet.util; import java.security.SecureRandom; import java.util.Arrays; public class CharSequenceX implements CharSequence { private char[] chars; private int rounds = 10; private CharSequenceX(CharSequence charSequence, int start, int end) { zap(); int len = end - ...
app/src/main/java/com/masanari/wallet/util/CharSequenceX.java
0.829492
0.441733
CharSequenceX.java
starcoder
package mbarix4j.geometry; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; /** * * @author brian */ public class PointUtilities { private static final Point2D<Double> ORIGIN = new Point2D<>(0D, 0D); /** * Calculate the centroid of a colle...
src/main/java/mbarix4j/geometry/PointUtilities.java
0.957118
0.682059
PointUtilities.java
starcoder
package net.kurobako.gesturefx; import javafx.geometry.Dimension2D; import javafx.geometry.Point2D; /** * A set of operations that can be used to alternate the transformation of a {@link GesturePane} */ public interface GesturePaneOps { /** * Centre the target within the viewport to a point, the actual effect is...
gesturefx/src/main/java/net/kurobako/gesturefx/GesturePaneOps.java
0.85022
0.588771
GesturePaneOps.java
starcoder
package ro.jgal; import java.util.ArrayList; import java.util.Collections; /** * Tournament Selection. * * The parents are selected by creating random tournament pools * of n individuals (default is 2) and choosing the i'th best of * them with the probability p^i (default probability is 1.0, * so the best i...
src/ro/jgal/SelectorTournament.java
0.848972
0.427158
SelectorTournament.java
starcoder
import java.util.ArrayList; public class Test { private static String output = ""; private static boolean compareTwoArrayLists(ArrayList<Integer> one, ArrayList<Integer> two) { boolean equal = true; for (int i = 0; i < one.size(); i++) { if (!one.get(i).equals(two.get(i))) { eq...
src/Test.java
0.526343
0.453383
Test.java
starcoder
package org.optimizationBenchmarking.utils.ml.classification.impl.greedyMCCTree; import org.optimizationBenchmarking.utils.ml.classification.impl.abstr.ClassificationTools; import org.optimizationBenchmarking.utils.ml.classification.spec.EFeatureType; import org.optimizationBenchmarking.utils.ml.classification.spec.IC...
src/main/java/org/optimizationBenchmarking/utils/ml/classification/impl/greedyMCCTree/_RangeAssignment.java
0.881889
0.409457
_RangeAssignment.java
starcoder
import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; class MoreExecutors { /** * Shuts down the given executor service gradually, first disabling new submissions and later, if * necessary, cancelling remaining tasks. * * &lt;p&gt;The method takes the following steps: ...
samples/632/a.java
0.764012
0.456228
a.java
starcoder
package com.ge.verdict.attackdefensecollector; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; /** Various utility functions. */ public class Util { /** * Given a mapping of keys to lists of values, a...
tools/verdict-back-ends/verdict-bundle/verdict-attack-defense-collector/src/main/java/com/ge/verdict/attackdefensecollector/Util.java
0.90372
0.507751
Util.java
starcoder
package us.ihmc.commonWalkingControlModules.controllerCore.parameters; import us.ihmc.commonWalkingControlModules.momentumBasedController.optimization.JointAccelerationIntegrationCalculator; public class JointAccelerationIntegrationParameters implements JointAccelerationIntegrationParametersReadOnly { private doub...
ihmc-common-walking-control-modules/src/main/java/us/ihmc/commonWalkingControlModules/controllerCore/parameters/JointAccelerationIntegrationParameters.java
0.967747
0.661472
JointAccelerationIntegrationParameters.java
starcoder
package util; /** * 平面向量工具类 * <p> * 参考链接: https://www.cnblogs.com/vokie/p/3602063.html */ public class Vector2d { private double x; private double y; public Vector2d() { x = 0; y = 0; } public Vector2d(double x, double y) { this.x = x; this.y = y; } //...
src/main/java/util/Vector2d.java
0.740456
0.591812
Vector2d.java
starcoder
package crackingthecode; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; import java.util.List; import javax.annotation.Nullable; public final class Chapter3StacksAndQueues { /* * 3.1 - Describe how you could use a single array to implement three stacks. */ // n - si...
java/src/main/java/crackingthecode/Chapter3StacksAndQueues.java
0.890711
0.487063
Chapter3StacksAndQueues.java
starcoder
package edu.uta.futureye.lib.element; import static edu.uta.futureye.function.FMath.C0; import edu.uta.futureye.core.DOF; import edu.uta.futureye.core.Element; import edu.uta.futureye.core.Line2DCoord; import edu.uta.futureye.core.Mesh; import edu.uta.futureye.core.NodeType; import edu.uta.futureye.core.geometry.GeoEn...
src/edu/uta/futureye/lib/element/FEQuadraticV_LinearPLine2D.java
0.628863
0.429429
FEQuadraticV_LinearPLine2D.java
starcoder
package brfv4.utils; import brfv4.geom.Point; public class BRFv4PointUtils { public static double PI = 3.14159265358979323846; public static double abs(double a) { return (a < 0.0) ? -a : a; } public static double max(double a, double b, double c) { double _max = a; if(b > _max) _max = b; if(c > _max) ...
app/src/main/java/brfv4/utils/BRFv4PointUtils.java
0.651577
0.647896
BRFv4PointUtils.java
starcoder
package com.ehsanmashhadi.countrypicker; import android.support.test.espresso.action.ViewActions; import android.support.test.espresso.intent.rule.IntentsTestRule; import android.support.test.runner.AndroidJUnit4; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import static android.su...
app/src/androidTest/java/com/ehsanmashhadi/countrypicker/CountryPickerTest.java
0.597138
0.460956
CountryPickerTest.java
starcoder
package com.smt.kata.security; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; /*****************...
src/main/java/com/smt/kata/security/WeakestRow.java
0.795301
0.597608
WeakestRow.java
starcoder
package gash.leaderelection; import gash.messaging.Message; import gash.messaging.Node; import gash.messaging.transports.Bus; import java.util.concurrent.atomic.AtomicInteger; /** * Bully demonstrates the bully algorithm for election of a leader. Similar to * other polling algorithms, the bully is designed to have...
concurrency-2.2/src/gash/leaderelection/Bully.java
0.686895
0.406685
Bully.java
starcoder
public class VolumeGenerator { public static char[] generateScalarFieldChar(int []size) { final char[] scalarField = new char[size[0] * size[1] * size[2]]; float axisMin = -10; float axisMax = 10; float axisRange = axisMax - axisMin; for (int k = 0; k < size[0]; k++) { ...
MarchingCubesJava/src/VolumeGenerator.java
0.846704
0.444625
VolumeGenerator.java
starcoder
package array.sort.topological_sort; import java.util.*; public class Q269AlienDictionary { //Difficulty: Hard //TAG: Airbnb //TAG: Facebook //TAG: BFS /** * 269. Alien Dictionary * There is a new alien language which uses the latin alphabet. However, the order among letters are unknow...
src/array/sort/topological_sort/Q269AlienDictionary.java
0.836321
0.454109
Q269AlienDictionary.java
starcoder
package eu.shooktea.datamodel; import java.util.*; import java.util.stream.Stream; public class DataModelMap extends AbstractMap<String, DataModelValue> implements DataModelValue { public DataModelMap(Map map) { this.map = new LinkedHashMap<>(); for (Object key : map.keySet()) { this....
src/eu/shooktea/datamodel/DataModelMap.java
0.908539
0.457137
DataModelMap.java
starcoder
package com.lgc.wsh.inv; import com.lgc.wsh.util.Almost; import java.util.logging.*; /** Implements a Vect by wrapping an array of doubles. The embedded data are exposed by a getData method. For all practical purposes this member is public, except that this class must always point to the same array. The...
src/main/java/com/lgc/wsh/inv/ArrayVect1.java
0.938074
0.476945
ArrayVect1.java
starcoder
package bits.collect; import java.util.*; /** * LongIntervalMap is just a version of IntervalMap with convenience methods for * placing two long values into an array. Otherwise, LongIntervalMap does not * validate input beyond what IntervalMap performs. * <p> * 1) It returns the reference to the actual keys (no...
src/main/java/bits/collect/LongIntervalMap.java
0.823648
0.47658
LongIntervalMap.java
starcoder
package net.fauxpark.oled.font; /** * A simple {@link Font} implementation, based on the Windows-1252 character set. * * @author fauxpark * @see <a href="https://en.wikipedia.org/wiki/Windows-1252">Windows-1252</a> */ public class CodePage1252 implements Font { /** * The name of the font's character set. */ ...
src/main/java/net/fauxpark/oled/font/CodePage1252.java
0.677261
0.696907
CodePage1252.java
starcoder
package ru.korchinskiy.service.impl; import org.springframework.stereotype.Service; import ru.korchinskiy.dto.*; import ru.korchinskiy.entity.*; import ru.korchinskiy.service.DTOMappingService; import java.util.ArrayList; import java.util.Date; import java.util.List; @Service public class DTOMappingServiceImpl imple...
InternetStore/shop/src/main/java/ru/korchinskiy/service/impl/DTOMappingServiceImpl.java
0.864096
0.447883
DTOMappingServiceImpl.java
starcoder
package io.keen.client.java; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.apache.commons.lang3.builder.ReflectionToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * A Percentile representation enforcing the format...
query/src/main/java/io/keen/client/java/Percentile.java
0.945387
0.450662
Percentile.java
starcoder
package org.JMathStudio.MathToolkit.StatisticalTools.Regression; import org.JMathStudio.DataStructure.Cell.Cell; import org.JMathStudio.DataStructure.Vector.Vector; import org.JMathStudio.Exceptions.BugEncounterException; import org.JMathStudio.Exceptions.IllegalArgumentException; import org.JMathStudio.MathToolkit.Ma...
org/JMathStudio/MathToolkit/StatisticalTools/Regression/PolynomialRegression.java
0.865991
0.661
PolynomialRegression.java
starcoder
package frc.robot.trajectory; // WPILib Imports import edu.wpi.first.math.geometry.Translation2d; import java.util.ArrayList; import frc.robot.Constants; public class AutoPaths { //Auto paths for Pure Pursuit /** * The red 1 ball path. * @return an arraylist containing the key points */ public static Arra...
src/main/java/frc/robot/trajectory/AutoPaths.java
0.777933
0.426979
AutoPaths.java
starcoder
package com.yammer.metrics.core; import com.yammer.metrics.core.HistogramMetric.SampleType; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; /** * A timer metric which aggregates timing durations and provides duration * statistics, plus ...
metrics-core/src/main/java/com/yammer/metrics/core/TimerMetric.java
0.956583
0.592578
TimerMetric.java
starcoder
package edu.wpi.first.wpilibj.estimator; import java.util.function.BiConsumer; import edu.wpi.first.wpilibj.geometry.Pose2d; import edu.wpi.first.wpilibj.geometry.Rotation2d; import edu.wpi.first.wpilibj.geometry.Translation2d; import edu.wpi.first.wpilibj.kinematics.MecanumDriveKinematics; import edu.wpi.first.wpil...
wpimath/src/main/java/edu/wpi/first/wpilibj/estimator/MecanumDrivePoseEstimator.java
0.931134
0.505737
MecanumDrivePoseEstimator.java
starcoder
package com.opengamma.analytics.financial.provider.calculator.blackswaption; import com.opengamma.analytics.financial.interestrate.InstrumentDerivativeVisitorAdapter; import com.opengamma.analytics.financial.interestrate.sensitivity.PresentValueBlackSwaptionSensitivity; import com.opengamma.analytics.financial.interes...
projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/calculator/blackswaption/PresentValueBlackSensitivityBlackSwaptionCalculator.java
0.870817
0.416203
PresentValueBlackSensitivityBlackSwaptionCalculator.java
starcoder
package norswap.javalexer; /** * Utilities dealing with lexical specificities of Java (escape handling, number parsing). */ public final class LexUtil { // --------------------------------------------------------------------------------------------- /** * Returns the character escaped by a backslash fo...
src/norswap/javalexer/LexUtil.java
0.899938
0.462048
LexUtil.java
starcoder
package four.game; import inout.Out; /** * Implements the game <a href="https://en.wikipedia.org/wiki/Connect_Four">Connect Four</a> * for two {@linkplain Player players} on a {@link Board} with custom dimensions. */ public class Game { private final Board board; private State gameState; private final...
2022s/se2/10/src/four/game/Game.java
0.774669
0.49347
Game.java
starcoder
package com.oneonezz.opengl.camera; import android.content.Context; import android.opengl.GLES11Ext; import android.opengl.GLES20; import com.oneonezz.R; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import static android.opengl.GLES20.GL_FLOAT; import static android.opengl.GLE...
app/src/main/java/com/oneonezz/opengl/camera/FilterEngine.java
0.750827
0.442637
FilterEngine.java
starcoder
package com.emxsys.wildfire.behavior; import com.emxsys.gis.api.Terrain; import com.emxsys.solar.api.Sunlight; import com.emxsys.weather.api.Weather; import com.emxsys.wildfire.api.FuelModel; import com.emxsys.wildfire.api.FuelMoisture; import com.emxsys.wildfire.api.BasicFuelMoisture; import static com.emxsys.wildfir...
wmt-wildfire/src/main/java/com/emxsys/wildfire/behavior/SurfaceFuelProvider.java
0.876158
0.443239
SurfaceFuelProvider.java
starcoder
package Debug; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import com.um.omega.game.SimpleGame; import Helpers.SimpleGameHelpers; import ObjectsToHelp.CellType; // This should be in another folder but the git was not created correctly and therefore moved here to be able to ...
Debug/SimpleGameTest.java
0.656548
0.609902
SimpleGameTest.java
starcoder
package org.broadinstitute.hellbender.utils; import htsjdk.samtools.SAMFileHeader; import org.broadinstitute.hellbender.utils.read.GATKRead; import org.broadinstitute.hellbender.utils.read.ReadUtils; import java.util.Arrays; import java.util.LinkedList; import java.util.List; /** * A canonical, master list of the s...
src/main/java/org/broadinstitute/hellbender/utils/NGSPlatform.java
0.723895
0.418875
NGSPlatform.java
starcoder
package breakout; 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 breakout.blocks.AbstractBlock; import breakout.blocks.ShieldBlock; import breakout.level.BasicLevel; import break...
test/breakout/LevelTest.java
0.804098
0.48377
LevelTest.java
starcoder
package us.ihmc.atlas; import static us.ihmc.atlas.ros.AtlasOrderedJointMap.back_bkx; import static us.ihmc.atlas.ros.AtlasOrderedJointMap.back_bky; import static us.ihmc.atlas.ros.AtlasOrderedJointMap.back_bkz; import static us.ihmc.atlas.ros.AtlasOrderedJointMap.forcedSideDependentJointNames; import static us.ihmc.a...
Atlas/src/us/ihmc/atlas/AtlasJointMap.java
0.628065
0.632758
AtlasJointMap.java
starcoder
package gg.sep.result; import gg.sep.result.annotations.Experimental; import java.util.Optional; import java.util.function.Function; /** * Result is a basic Java implementation of the Rust language's {@code std::result::Result} type. * * <p>Result represents either a success ({@link Ok}&lt;T&gt; or failure {@link...
src/main/java/gg/sep/result/Result.java
0.933157
0.491761
Result.java
starcoder
package bdv.viewer.render; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import net.imglib2.Dimensions; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessible; import net.imglib2.RandomAccessibleInterval; import net.imglib2.RealRandomAccessible; import n...
src/main/java/bdv/viewer/render/ProjectorFactory.java
0.710126
0.406273
ProjectorFactory.java
starcoder
package a2.classes; import java.util.Scanner; public class Lancha extends Veiculo implements Desconto{ private String nome; private static final double DESCONTO_LANCHA = 0.10; public Motor motor1, motor2; //MC1 public Lancha() { motor1 = new Motor(); motor2 = new Motor(); } ...
Thiago_Xavier(TrabalhoA2)/src/a2/classes/Lancha.java
0.644449
0.434521
Lancha.java
starcoder
package htsjdk.samtools.cram.structure; /** * A span of reads on a single reference. Immutable. * * Holds alignment start and span values as well as counts of how many are mapped vs. unmapped. */ public class AlignmentSpan { /** * A constant to represent a span of unmapped-unplaced reads. */ pub...
src/main/java/htsjdk/samtools/cram/structure/AlignmentSpan.java
0.955537
0.553928
AlignmentSpan.java
starcoder
package io.opensphere.core.util; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import java.nio.IntBuffer; import gnu.trove.list.TIntList; /** * Utilities for working with NIO buffers. The methods provided here return * buffers which are indirectly allocated. For use with JOGL,...
open-sphere-base/core/src/main/java/io/opensphere/core/util/BufferUtilities.java
0.916358
0.453867
BufferUtilities.java
starcoder
package com.opengamma.strata.math.impl.statistics.leastsquare; import com.opengamma.strata.collect.ArgChecker; import com.opengamma.strata.collect.array.DoubleArray; import com.opengamma.strata.collect.array.DoubleMatrix; /** * Hold for results of {@link NonLinearLeastSquareWithPenalty} */ public class LeastSquareW...
modules/math/src/main/java/com/opengamma/strata/math/impl/statistics/leastsquare/LeastSquareWithPenaltyResults.java
0.93688
0.94625
LeastSquareWithPenaltyResults.java
starcoder