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 com.machinezoo.hookless.time; import java.math.*; import java.time.*; import java.time.temporal.*; import com.machinezoo.stagean.*; /** * Reactive version of {@link Duration}, negative (shrinking) variant. */ @DraftApi("requires review") @DraftCode("requires review") @NoTests @StubDocs public class Shrinkin...
src/main/java/com/machinezoo/hookless/time/ShrinkingReactiveDuration.java
0.877647
0.552479
ShrinkingReactiveDuration.java
starcoder
package buildingblock.sorting.quick.lc179_largestnumber; import java.util.Arrays; /** * Given a list of non negative integers, arrange them such that they form the largest number. * For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. * Note: The result may be very large, so you need to retu...
1-algorithm/13-leetcode/java/src/buildingblock/sorting/quick/lc179_largestnumber/Solution.java
0.862265
0.526099
Solution.java
starcoder
package org.nodes.rdf; import static java.util.Collections.reverseOrder; import static nl.peterbloem.kit.Functions.log2; import static nl.peterbloem.kit.Series.series; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Deque; import java.util.HashSet; import java.u...
nodes/src/main/java/org/nodes/rdf/InformedLabels.java
0.688364
0.486758
InformedLabels.java
starcoder
package prosperoClasses; import static java.lang.Math.pow; import static java.lang.Math.exp; public class RadiationMethod { double diffuseExtinctionCoefficient = 0.719; double leafScatteringCoefficient = 0.2; double canopyReflectionCoefficientDiffuse = 0.036; public double computeLongWaveRadiationBalance(doub...
src/main/java/prosperoClasses/RadiationMethod.java
0.629091
0.516352
RadiationMethod.java
starcoder
package com.team687.frc2017.utilities; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import org.junit.Test; import org.junit.runner.RunWith; im...
test/com/team687/frc2017/utilities/BezierCurveTest.java
0.922115
0.57517
BezierCurveTest.java
starcoder
package be.twofold.tinyjson; import java.util.*; public final class JsonObject extends JsonValue implements Iterable<Map.Entry<String, JsonValue>> { private final Map<String, JsonValue> values; JsonObject() { this(new HashMap<>()); } private JsonObject(Map<String, JsonValue> values) { ...
core/src/main/java/be/twofold/tinyjson/JsonObject.java
0.876819
0.48121
JsonObject.java
starcoder
package com.zeynelcgurbuz.particles; import java.io.Serializable; /** * Vector, class */ public class Vector implements Serializable { /** The x component of the vector */ public double x; /** The y component of the vector. */ public double y; /** * Empty constructor, x=0 and y =0 * ...
src/main/java/com/zeynelcgurbuz/particles/Vector.java
0.903693
0.621311
Vector.java
starcoder
package edu.cmu.ml.rtw.theo2012.core; import java.util.Map; /** * Interface that extends java.util.Map that adds a few things needed for a {@link Store} * implementation so that we can generate a class of Store implementations based on various * key/value pair databases. * * One of the things we add to Map is th...
src/main/java/edu/cmu/ml/rtw/theo2012/core/StoreMap.java
0.874961
0.45944
StoreMap.java
starcoder
package com.univocity.parsers.common.processor.core; import com.univocity.parsers.common.*; import com.univocity.parsers.conversions.*; /** * A {@link Processor} implementation for converting rows extracted from any implementation of {@link AbstractParser} into arrays of objects. * <p>This uses the value conversion...
src/main/java/com/univocity/parsers/common/processor/core/AbstractObjectProcessor.java
0.928934
0.618176
AbstractObjectProcessor.java
starcoder
package datastructures; /** * A binary search tree (BST) is a node based binary tree data structure which has the following properties. * - The left subtree of a node contains only nodes with keys less than the node's key. * - The right subtree of a node contains only nodes with keys greater than the node's key. *...
iq/src/datastructures/BinarySearchTree.java
0.844056
0.502563
BinarySearchTree.java
starcoder
package com.nathan818.polus.protocol.util; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; import lombok.experimental.UtilityClass; @UtilityClass public class GameCodeUtil { public static int gameCodeFromString(String value) throws IllegalArgumentException { if (value.length() == 6...
protocol/src/main/java/com/nathan818/polus/protocol/util/GameCodeUtil.java
0.834576
0.404625
GameCodeUtil.java
starcoder
package Connectivity; import java.util.ArrayList; import Common.Matrix4; import Common.Vector3f; import com.bulletphysics.collision.dispatch.CollisionObject; import com.bulletphysics.collision.shapes.ConvexHullShape; import com.bulletphysics.collision.shapes.SphereShape; import com.bulletphysics.linearmath.Transform...
MOC Builder/src/Connectivity/CollisionConvexHull.java
0.580233
0.413744
CollisionConvexHull.java
starcoder
package q1400; import org.junit.runner.RunWith; import util.runner.Answer; import util.runner.LeetCodeRunner; import util.runner.TestData; import util.runner.data.DataExpectation; /** * [Hard] 1359. Count All Valid Pickup and Delivery Options * https://leetcode.com/problems/count-all-valid-pickup-and-delivery-optio...
src/main/java/q1400/Q1359_CountAllValidPickupAndDeliveryOptions.java
0.7586
0.435601
Q1359_CountAllValidPickupAndDeliveryOptions.java
starcoder
package org.jetbrains.skija; public class PathEffect extends RefCounted { public enum Style { /** translate the shape to each position */ TRANSLATE, /** rotate the shape about its center */ ROTATE, /** transform each point, and turn lines into curves */ MORPH } ...
src/main/java/org/jetbrains/skija/PathEffect.java
0.895671
0.680564
PathEffect.java
starcoder
package com.github.acc15.glob.scanners; import com.github.acc15.glob.matchers.GlobPattern; import java.io.IOException; import java.nio.file.Path; import java.util.*; import java.util.function.Consumer; import java.util.function.Predicate; import java.util.stream.Collectors; /** * @author <NAME> * @since 2015-30-12...
src/main/java/com/github/acc15/glob/scanners/Glob.java
0.845751
0.452234
Glob.java
starcoder
import java.util.List; import java.util.ArrayList; /** * Q. 동쪽과 서쪽으로 지나가는 차량의 쌍의 수를 알아내라. * A. https://app.codility.com/demo/results/trainingZJCM4N-PGV/ * Test Score. 60% * Time complexity. O(N ** 2) * * Analysis summary. * timeout errors. */ class Solution1 { public int solution(int[] A) { List<In...
Java/Codility/src/5_PrefixSums/PassingCars.java
0.808861
0.575349
PassingCars.java
starcoder
package org.deri.iris.utils; /** * Utility class for floating point comparison. This class allows for round-off * errors by using only the specified most significant bits of the operands, * after allowing for scale. */ public class StandardFloatingPointComparator implements IFloatingPointComparator { /** ...
JoDS_IRIS+-/src/org/deri/iris/utils/StandardFloatingPointComparator.java
0.899231
0.488771
StandardFloatingPointComparator.java
starcoder
package shiver.me.timbers.waiting; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import shiver.me.timbers.waiting.execution.WaitingExclude; import shiver.me.timbers.waiting.execution.WaitingFor; import shiver.me.timbers.waiting.execution.WaitingForNotNull; import shiver.me.tim...
smt-waiting-test/smt-waiting-integration-test/src/main/java/shiver/me/timbers/waiting/AbstractITWaiter.java
0.837155
0.594904
AbstractITWaiter.java
starcoder
package leetcode; import java.util.ArrayList; import java.util.List; /** * https://leetcode.com/problems/merge-sorted-array */ public final class Problem88MergeSortedArray { public void merge(int[] nums1, int m, int[] nums2, int n) { if (nums1 == null || nums2 == null) { return; } ...
java/src/main/java/leetcode/Problem88MergeSortedArray.java
0.92895
0.501953
Problem88MergeSortedArray.java
starcoder
package com.opengamma.analytics.math.interpolation; import java.util.Arrays; import org.apache.commons.lang.Validate; import com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle; import com.opengamma.analytics.math.interpolation.data.InterpolationBoundedValues; import com.opengamma.analytics...
projects/OG-Analytics/src/main/java/com/opengamma/analytics/math/interpolation/ExponentialInterpolator1D.java
0.915271
0.719408
ExponentialInterpolator1D.java
starcoder
package eu.woolplatform.wool.model; /** * A {@link WoolNode} represents a single step in a {@link WoolDialogue} definition. * * @author <NAME> (Roessingh Research and Development) */ public class WoolNode { private WoolNodeHeader header; private WoolNodeBody body; // ---------- Constructors: /** * Creat...
java/WoolCore/src/main/java/eu/woolplatform/wool/model/WoolNode.java
0.922709
0.612194
WoolNode.java
starcoder
private static <OS extends OutputStream> OS getUnzipAndDecodeOutputStream(InputStream inputStream, final OS outputStream) { final PipedOutputStream pipedOutputStream = new PipedOutputStream(); final List<Throwable> ungzipThreadThrowableList = new LinkedList<Throwable>(); Writer decoderWriter = n...
references/bcb_chosen_clones/selected#1267422#1041#1085.java
0.55254
0.431584
selected#1267422#1041#1085.java
starcoder
package com.SCHSRobotics.HAL9001.util.math.geometry; import static java.lang.Math.abs; import static java.lang.Math.hypot; import static java.lang.Math.max; import static java.lang.Math.min; import static java.lang.Math.pow; import com.SCHSRobotics.HAL9001.util.exceptions.ExceptionChecker; import com.SCHSRobotics.HAL...
HAL9001/src/main/java/com/SCHSRobotics/HAL9001/util/math/geometry/MatrixSimple.java
0.92142
0.630884
MatrixSimple.java
starcoder
package javax.print.attribute; import java.io.Serializable; /** * <code>Size2DSyntax</code> is the abstract base class of all attribute * classes which provide a two dimensional size as value (e.g. the size of * a media like Letter or A4). * <p> * A <code>Size2DSyntax</code> instance consists of two integer val...
classpath-0.98/javax/print/attribute/Size2DSyntax.java
0.948627
0.666855
Size2DSyntax.java
starcoder
package org.jresearch.gwt.time.apt.data.client; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Objects; import org.jresearch.gwt.time.apt.base.Chrono; /** * Immutable implementation of {@link PatternCoordinates}. * * <p>Use the builder to create immutable instances: {@...
gwt-time/gwt-time/src/main/java/org/jresearch/gwt/time/apt/data/client/ImmutablePatternCoordinates.java
0.954223
0.480479
ImmutablePatternCoordinates.java
starcoder
package com.mnaseri.cs.homework.ch22; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class AdjacencyMatrixGraph implements Graph { private Edge[][] arr; private List<Integer> nodes = new ArrayList<>(); private int size; private boolean ...
cs-homework/src/main/java/com/mnaseri/cs/homework/ch22/AdjacencyMatrixGraph.java
0.764012
0.459864
AdjacencyMatrixGraph.java
starcoder
package awh; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; /** Raster image representation. */ public final class Image { /** Maximum size of the image in one dimension. * * <p> * This is an artificial...
src/java/awh/Image.java
0.933233
0.50952
Image.java
starcoder
package mcjty.aquamunda.chunkdata; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.math.BlockPos; import java.util.HashMap; import java.util.Map; public class WorldData { private byte initialValue; private Map<DataChunkCoordinate,ChunkData> chunkDataMap = new HashMap<>(); public World...
src/main/java/mcjty/aquamunda/chunkdata/WorldData.java
0.810666
0.432243
WorldData.java
starcoder
package net.tekrei.ds; import java.util.PriorityQueue; /** * * @author tekrei * * A simple undirected, unweighted graph implementation which uses * singly linked list to store nodes and nodes storing edges using * singly linked list * * @param <AnyType> data type to store in the grap...
java/src/main/java/net/tekrei/ds/Graph.java
0.78968
0.521288
Graph.java
starcoder
package edu.colorado.cires.cmg.hullgen; ; import com.uber.h3core.H3Core; import com.uber.h3core.util.GeoCoord; import edu.colorado.cires.cmg.polarprocessor.PolarProcessor; import java.io.IOException; import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import org.locationtech.jts.geom...
src/main/java/edu/colorado/cires/cmg/hullgen/BaseGeometryProcessor.java
0.952618
0.475362
BaseGeometryProcessor.java
starcoder
package com.freetymekiyan.algorithms.level.medium; import java.util.ArrayList; import java.util.List; /** * Given two sparse matrices A and B, return the result of AB. * <p> * You may assume that A's column number is equal to B's row number. * <p> * Example: * <p> * | A = [ * | [ 1, 0, 0], * | [-1, 0, 3]...
src/com/freetymekiyan/algorithms/level/medium/SparseMatrixMultiplication.java
0.903463
0.527621
SparseMatrixMultiplication.java
starcoder
package pl.marcinchwedczuk.javafx.validation; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toUnmodifiableList; public class ObjectionsList implements Iterable<Objection> { public...
validation/src/main/java/pl/marcinchwedczuk/javafx/validation/ObjectionsList.java
0.761272
0.447823
ObjectionsList.java
starcoder
package ru.shemplo.dm.course.physics.schemes; import ru.shemplo.dm.course.physics.Model; import ru.shemplo.dm.course.physics.ProcessorResult; import java.util.ArrayList; import java.util.List; public class UnknownScheme extends Scheme { private final List<double[]> Ts = new ArrayList<>(), ...
DM Course work/src/main/java/ru/shemplo/dm/course/physics/schemes/UnknownScheme.java
0.733261
0.464719
UnknownScheme.java
starcoder
package com.evg.ss.parser.visitors; import com.evg.ss.parser.ast.*; import java.util.Arrays; public abstract class AbstractVisitor implements Visitor { @Override public void visit(AnonymousFunctionExpression target) { target.getBody().accept(this); } @Override public void visit(Containe...
src/com/evg/ss/parser/visitors/AbstractVisitor.java
0.862279
0.521167
AbstractVisitor.java
starcoder
package edu.southwestern.parameters; import java.io.PrintStream; import java.util.HashMap; /** * This class represents a collection of command-line parameters of a particular * type. Each lookup key is the parameter name that would actually be used at * the command-line. The values of these parameters can easily b...
src/edu/southwestern/parameters/ParameterCollection.java
0.914468
0.412353
ParameterCollection.java
starcoder
package com.climbwithyourfeet.clustering; import java.util.Arrays; /** * * @author nichole */ public class BackgroundSeparationHolder { /* There are two states of data present here. (1) the PDF is in the scaled axes reference frame (if no scaling is performed the scaled is the original d...
src/main/java/com/climbwithyourfeet/clustering/BackgroundSeparationHolder.java
0.872592
0.641815
BackgroundSeparationHolder.java
starcoder
package info.schnatterer.java.util; import java.util.Collection; import java.util.HashSet; import java.util.function.Function; import java.util.stream.Stream; /** * Implementation of basic set (in a mathematical sense) operations. * * @author schnatterer * */ public class Sets { /** * Returns the intersecti...
src/main/java/info/schnatterer/java/util/Sets.java
0.902247
0.438785
Sets.java
starcoder
package com.snowmantheater.warden; import lombok.NonNull; import java.util.function.Predicate; import static com.snowmantheater.warden.Value.of; /** * A {@link Validator} validates a value with given {@link Predicate}s and provides appropriate {@link Actions} * based on whether the value matches. * * @author <E...
src/main/java/com/snowmantheater/warden/Validator.java
0.924518
0.519278
Validator.java
starcoder
package org.jhotdraw8.geom.intersect; import org.jhotdraw8.annotation.NonNull; import org.jhotdraw8.geom.BezierCurves; import org.jhotdraw8.geom.Geom; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; /** * The code of this class has been derived from intersection.js [1]. * <p> * Re...
org.jhotdraw8.draw/src/main/java/org.jhotdraw8.draw/org/jhotdraw8/geom/intersect/IntersectCircleCubicCurve.java
0.916323
0.528412
IntersectCircleCubicCurve.java
starcoder
import java.util.Arrays; /** * Given an array of unsorted numbers, check if all the numbers in the array are consecutive * numbers. * * Example: * int[] array = {21, 24, 22, 26, 23, 25} - True * All integers are consecutive from 21 to 26 * * int[] array = {11, 10, 12, 14, 13} - True * All integers are consec...
src/CheckIfArrayIsConsecutiveIntegers.java
0.833155
0.674948
CheckIfArrayIsConsecutiveIntegers.java
starcoder
package org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.mbus; import org.apache.commons.lang3.StringUtils; import org.openmuc.jdlms.datatypes.DataObject; import org.openmuc.jdlms.interfaceclass.attribute.MbusClientAttribute; /** * Represents the M-Bus Client Setup identification number. * <p> * The...
osgp/protocol-adapter-dlms/osgp-protocol-adapter-dlms/src/main/java/org/opensmartgridplatform/adapter/protocol/dlms/domain/commands/mbus/IdentificationNumber.java
0.886733
0.40436
IdentificationNumber.java
starcoder
package org.firstinspires.ftc.teamcode; import com.qualcomm.hardware.bosch.BNO055IMU; import com.qualcomm.robotcore.eventloop.opmode.Autonomous; import com.qualcomm.robotcore.eventloop.opmode.OpMode; import com.qualcomm.robotcore.hardware.ColorSensor; import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm...
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/AutonTestRed.java
0.628293
0.441553
AutonTestRed.java
starcoder
package org.pcsoft.framework.jnode3d.node.processing.vert_calc; import org.joml.Vector2f; import org.joml.Vector3f; import org.pcsoft.framework.jnode3d.node.BoxNode; import org.pcsoft.framework.jnode3d.node.processing.SimpleVertexCalculationProcessor; import org.pcsoft.framework.jnode3d.type.Color; import org.pcsoft.f...
source/core/src/main/java/org/pcsoft/framework/jnode3d/node/processing/vert_calc/BoxVertexCalculationProcessor.java
0.801936
0.4133
BoxVertexCalculationProcessor.java
starcoder
package flitesharp.component.operation; import flitesharp.component.Component; import flitesharp.component.data.DataComponent; import flitesharp.component.environment.EnvFrame; import flitesharp.component.literal.NumberComponent; import flitesharp.exception.DivisionByZeroException; import flitesharp.exception.compilin...
app/src/main/java/flitesharp/component/operation/DivisionComponent.java
0.855716
0.407687
DivisionComponent.java
starcoder
package io.xlate.edi.stream; import java.io.InputStream; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import io.xlate.edi.schema.Schema; public abstract class EDIInputFactory extends PropertySupport { public static final String EDI_VALIDATE_CONTROL_STRUCTURE = "io.xlate....
src/main/java/io/xlate/edi/stream/EDIInputFactory.java
0.896018
0.42316
EDIInputFactory.java
starcoder
package com.pump.showcase.chart; import com.pump.geom.TransformUtils; import java.awt.*; import java.awt.font.FontRenderContext; import java.awt.geom.*; import java.util.*; import java.util.Map.Entry; public class LineChartRenderer { final DataContainer dataContainer; final String horizontalAxisLabel...
src/main/java/com/pump/showcase/chart/LineChartRenderer.java
0.884906
0.403038
LineChartRenderer.java
starcoder
package com.binghamton.jhelp.ast; /** * A class representing a Java binary expression * e.g. {@code 5 + 4} */ public class BinaryExpression extends Expression { private final Expression lhs; private final Expression rhs; private final BinaryOperator op; /** * Construct a new binary expression ...
src/com/binghamton/jhelp/ast/BinaryExpression.java
0.960786
0.4081
BinaryExpression.java
starcoder
import java.util.ArrayList; import java.util.List; import edu.princeton.cs.algs4.Point2D; import edu.princeton.cs.algs4.RectHV; import edu.princeton.cs.algs4.StdDraw; /** * * 2d-tree implementation. A mutable data type that uses a 2d-tree. A 2d-tree is * a generalization of a BST to two-dimensional keys. The idea...
kd-tree/src/KdTree.java
0.939401
0.621483
KdTree.java
starcoder
package com.bluemaestro.utility.sdk.views.graphs; import android.content.Context; import android.graphics.Canvas; import android.graphics.Typeface; import android.util.AttributeSet; import com.github.mikephil.charting.charts.LineChart; import com.github.mikephil.charting.components.Legend; import com.github.mikephil....
Blue-Maestro-UART-master/app/src/main/java/com/bluemaestro/utility/sdk/views/graphs/BMLineChart.java
0.905804
0.421492
BMLineChart.java
starcoder
package frc.robot.launcher; import java.util.ArrayList; import java.util.Collections; import frc.robot.Constants; import frc.robot.limelight.Distance; import frc.robot.limelight.LimeLight; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; class Alignment { private Distance distance; private LimeLi...
src/main/java/frc/robot/launcher/Alignment.java
0.798776
0.501892
Alignment.java
starcoder
package edu.wpi.first.wpilibj.can; import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import java.util.c...
wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/can/CANDefaultTest.java
0.853913
0.505249
CANDefaultTest.java
starcoder
package Objects; import math.Vector3; import static java.lang.Math.*; import static java.lang.Math.toRadians; public class Camera { private Vector3 position; private Vector3 focusPoint; private float FOV; private float scale; private Vector3 viewDir; private Vector3 rotatedUpVector; priva...
src/Objects/Camera.java
0.628293
0.638835
Camera.java
starcoder
package co.edu.unbosque.back_cadena_lagenerica.supplier; import java.util.Objects; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Id; @Entity @Table(name = "proveedores") public class Supplier { @Id private Long nitproveedor; private String ciudad_proveedor; private ...
back_cadena_lagenerica/src/main/java/co/edu/unbosque/back_cadena_lagenerica/supplier/Supplier.java
0.508056
0.436082
Supplier.java
starcoder
import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class RegressionTest4 { public static boolean debug = false; @Test public void test02001() throws Throwable { if (debug) System.out.form...
libgdx/da27e2dae56be0a159e82231e5c3a5b83b099063/randoop-modified_7/RegressionTest4.java
0.681939
0.405743
RegressionTest4.java
starcoder
package itx.blockchain.basic; import itx.blockchain.api.Block; import itx.blockchain.api.Ledger; import itx.blockchain.api.LedgerError; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util....
block-chain/src/main/java/itx/blockchain/basic/LedgerUtils.java
0.806281
0.411525
LedgerUtils.java
starcoder
package jhs.lc.geom; import java.awt.geom.Rectangle2D; import jhs.math.util.MathUtil; import jhs.math.util.MatrixUtil; public class SphereViewport { private static final double TOLERANCE = 0.001; private final Sphere sphere; private final double boxWidth, boxHeight; public SphereViewport(Sphere sphere) { this...
src/main/java/jhs/lc/geom/SphereViewport.java
0.561696
0.604224
SphereViewport.java
starcoder
package com.mateoi.gp.rules; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import com.mateoi.gp.games.Game; import com.mateoi.gp.tree.Node; /** * An implementation of tournament selection. Players are randoml...
src/com/mateoi/gp/rules/TournamentRules.java
0.915981
0.461623
TournamentRules.java
starcoder
package wblut.geom; import java.util.Collection; /** * */ public class WB_TriangleMesh extends WB_Mesh { /** * */ private final static int[] PREV = new int[] { 2, 0, 1 }; /** * */ private final static int[] NEXT = new int[] { 1, 2, 0 }; /** * */ WB_Vector[] pdir1 = null, pdir2 = null; /** *...
java/CodeMonkey/HEMesh/wblut/geom/WB_TriangleMesh.java
0.794505
0.491822
WB_TriangleMesh.java
starcoder
package com.hbx.play.daily; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; public class GenerateTrees95 { public static void main(String[] args) { GenerateTrees95 generateTrees95 = new GenerateTrees95(); List<TreeNode> res = generateTrees95.generateTrees(3); ...
src/main/java/com/hbx/play/daily/GenerateTrees95.java
0.871174
0.470676
GenerateTrees95.java
starcoder
package com.google.api.services.dataplex.v1.model; /** * Settings to manage the metadata discovery and publishing for an asset. * * <p>This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Dataplex API. For a detailed expla...
v2/googlecloud-to-googlecloud/src/main/java/com/google/api/services/dataplex/v1/model/GoogleCloudDataplexV1AssetDiscoverySpec.java
0.964606
0.405861
GoogleCloudDataplexV1AssetDiscoverySpec.java
starcoder
package org.ejml.alg.dense.decomposition.qr; import org.ejml.alg.dense.mult.SubmatrixOps; import org.ejml.data.DenseMatrix64F; import org.ejml.interfaces.decomposition.QRDecomposition; import org.ejml.ops.CommonOps; import org.ejml.ops.MatrixFeatures; import org.ejml.ops.RandomMatrices; import org.junit.Test; import ...
test/org/ejml/alg/dense/decomposition/qr/TestQrUpdate.java
0.815196
0.66403
TestQrUpdate.java
starcoder
package com.hp.hpl.jena.reasoner.rulesys.impl; import com.hp.hpl.jena.graph.*; import java.util.*; /** * Represents one input left of a join node. The queue points to * a sibling queue representing the other leg which should be joined * against. * * @author <a href="mailto:<EMAIL>"><NAME></a> * @version $Rev...
Jena/src/com/hp/hpl/jena/reasoner/rulesys/impl/RETEQueue.java
0.877201
0.421492
RETEQueue.java
starcoder
* Kruskal algorithm taken from https://youtu.be/RIayaaOCllU */ package collections; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.Hashtable; import java.util.List; import java.util.PriorityQueue; import java.util.Queue; import java.util.Set; import java.util....
src/collections/GraphAlgorithms.java
0.68437
0.427994
GraphAlgorithms.java
starcoder
package us.kbase.assemblyhomology.minhash; import static com.google.common.base.Preconditions.checkNotNull; import static us.kbase.assemblyhomology.util.Util.exceptOnEmpty; /** A MinHash distance from a query sequence to a reference sequence. * @author <EMAIL> * */ public class MinHashDistance implements Comparabl...
src/us/kbase/assemblyhomology/minhash/MinHashDistance.java
0.883249
0.422683
MinHashDistance.java
starcoder
package com.twitter.crunch; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.List; public class Crunch { private final MessageDigest md; public Crunch() { try { md = MessageDigest.getInstance("SHA-1"); } catch (NoSuchAl...
src/main/java/com/twitter/crunch/Crunch.java
0.792143
0.406273
Crunch.java
starcoder
package com.natsumes.tree; /** * 不同场景使用不同的方法 * - 数据离散 -> 使用计数排序 * - 数据集中在某个小区间内,使用平衡树 O(log n) * * 由于AVL树种类较少所以比红黑树实际上更容易实现.而且ALV树在旋转插入所需要的复杂度为0(1),而红 * 黑树则需要的复杂度为0(lgn). * * 实际上插入AVL树和红黑树的速度取决于你所插入的数据.如果你的数据分布较好,则比较宜于采用AVL树(例如随机产生系列数), * 但是如果你想处理比较杂乱的情况,则红黑树是比较快的,因为红黑树对已经处理好的数据重新平衡减少了不心要的操作. * * 另...
src/main/java/com/natsumes/tree/AbstractTree.java
0.501709
0.457561
AbstractTree.java
starcoder
package cn.lee.hackerrank.tutorials.satistics10day; import java.util.Arrays; import java.util.Scanner; /** * https://www.hackerrank.com/challenges/s10-quartiles/problem * <pre> * Objective * In this challenge, we practice calculating quartiles. Check out the Tutorial tab for learning materials and an instruct...
src/main/java/cn/lee/hackerrank/tutorials/satistics10day/Day01_Quartiles.java
0.867471
0.566198
Day01_Quartiles.java
starcoder
package org.aion.kernel; import java.math.BigInteger; import org.aion.avm.core.BillingRules; import org.aion.avm.core.util.Helpers; import org.aion.types.Address; import java.util.Arrays; import java.util.Objects; import org.aion.vm.api.interfaces.TransactionInterface; public class Transaction implements Transacti...
aion_vm/org.aion.avm.core/src/org/aion/kernel/Transaction.java
0.849441
0.524212
Transaction.java
starcoder
package com.pump.geom; import java.awt.*; import java.awt.geom.*; import java.io.IOException; import java.io.Serializable; import java.util.Objects; /** * A simple wrapper for a shape that makes it immutable and serializable. * <p> * If we simply stored data as a Path2D or GeneralPath then other entities may * in...
src/main/java/com/pump/geom/ImmutableShape.java
0.92498
0.504211
ImmutableShape.java
starcoder
package net.aryaman.algo.misc; import java.util.Random; import java.util.Arrays; public class SimpleSort { /** * Generate an array of count random numbers * * @param count * @return array */ public int[] generateArray(int count) { int[] array = new int[count]; Rando...
hhsalgo/src/main/java/net/aryaman/algo/misc/SimpleSort.java
0.756897
0.519704
SimpleSort.java
starcoder
package org.openstreetmap.atlas.checks.validation.tag; import static org.openstreetmap.atlas.checks.constants.CommonConstants.COMMA; import static org.openstreetmap.atlas.checks.constants.CommonConstants.EMPTY_STRING; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Li...
src/main/java/org/openstreetmap/atlas/checks/validation/tag/InvalidTagsCheck.java
0.898104
0.446072
InvalidTagsCheck.java
starcoder
package au.com.centrumsystems.hudson.plugin.buildpipeline; /** * Two-dimensional finite sparse placement of things (such as projects and builds) into a grid/matrix layout. * * @param <T> * The type of the data that gets placed in a two dimensional table. * @author <NAME> */ public abstract class Grid<T> { ...
src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/Grid.java
0.930268
0.440951
Grid.java
starcoder
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Scanner; public class p08_Matrix_shuffling { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(Sy...
02. 2. Abstraction-Exercises/src/p08_Matrix_shuffling.java
0.61057
0.439807
p08_Matrix_shuffling.java
starcoder
package qub; /** * A row within a CSV document. */ public class CSVRow { private final List<String> cells; private CSVRow(List<String> cells) { this.cells = cells; } public static CSVRow create(String... cells) { PreCondition.assertNotNull(cells, "cells"); return ne...
sources/qub/CSVRow.java
0.929464
0.626438
CSVRow.java
starcoder
package chopchop.model.attributes.units; import chopchop.commons.util.Result; import chopchop.model.attributes.Quantity; import chopchop.model.exceptions.IncompatibleIngredientsException; /** * This class represents a quantity of mass, eg. grams, kilograms, etc. For the purposes of this class, * a ratio of 1.0 repr...
src/main/java/chopchop/model/attributes/units/Mass.java
0.894219
0.475971
Mass.java
starcoder
package gov.dot.fhwa.saxton.carma.geometry.geodesic; /** * Represents a line between two locations. * It is not necessarily straight in the traditional sense as the distance is calculated along the surface of the earth according to a curved earth model. */ public class GreatCircleSegment { protected Location loc1...
carmajava/geometry/src/main/java/gov/dot/fhwa/saxton/carma/geometry/geodesic/GreatCircleSegment.java
0.917857
0.538559
GreatCircleSegment.java
starcoder
package org.kuali.ole.gl.batch.service.impl; import java.util.Iterator; import org.kuali.ole.gl.businessobject.OriginEntryFull; import org.kuali.ole.sys.OLEConstants; import org.kuali.rice.core.api.util.type.KualiDecimal; /** * This class holds information about the sums of a list of origin entries. This informatio...
ole-app/olefs/src/main/java/org/kuali/ole/gl/batch/service/impl/OriginEntryTotals.java
0.799912
0.416619
OriginEntryTotals.java
starcoder
package com.opengamma.financial.analytics.conversion; import javax.time.calendar.Period; import javax.time.calendar.ZonedDateTime; import org.apache.commons.lang.Validate; import com.opengamma.OpenGammaRuntimeException; import com.opengamma.core.holiday.HolidaySource; import com.opengamma.core.region.RegionSource; i...
projects/OG-Financial/src/com/opengamma/financial/analytics/conversion/SwapSecurityConverter.java
0.784402
0.454412
SwapSecurityConverter.java
starcoder
package com.company; public class Tree { public final static String GENUS = "Plants"; private String designation = "unknown"; private int ageInYears; private String color; private String leafShape; { System.out.println(designation + " tree is being planted!"); } public Tree(...
Constructor/src/com/company/Tree.java
0.87456
0.411347
Tree.java
starcoder
package functionalj.function.aggregator; import java.util.function.DoubleToLongFunction; import java.util.function.IntToLongFunction; import java.util.function.LongUnaryOperator; import java.util.function.ToLongFunction; import functionalj.stream.longstream.collect.LongCollectorPlus; import functionalj.stream.longstr...
functionalj-core/src/main/java/functionalj/function/aggregator/LongAggregationToInt.java
0.702632
0.438605
LongAggregationToInt.java
starcoder
package com.ramamosr; import java.util.HashMap; public class ChangeDateFormat { /* Change Date Format Given a date string in the format Day Month Year, where: Day is in the set {"1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", ..., "29th", "30th", "31st"}. Month is in the set {"Jan", "Feb", "M...
src/com/ramamosr/ChangeDateFormat.java
0.771672
0.441914
ChangeDateFormat.java
starcoder
package org.stepik.lesson12; import java.util.ArrayDeque; import java.util.Queue; import java.util.Scanner; /** * @author <NAME> */ public class QuestionAnswer_1_12_7 { /* * Вопрос: * * Write a program that implements a simple load balancer. * The program must read tasks from the standard in...
src/main/java/org/stepik/lesson12/QuestionAnswer_1_12_7.java
0.663887
0.474692
QuestionAnswer_1_12_7.java
starcoder
package com.palyrobotics.frc2022.util; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.util.Units; /** * This class holds a bunch of static methods and variables needed for mathematics */ public class Util { public static final double kEpsilon = ...
src/main/java/com/palyrobotics/frc2022/util/Util.java
0.925609
0.770681
Util.java
starcoder
package io.github.andypyrope.ai.data; import io.github.andypyrope.ai.InvalidSizeException; import io.github.andypyrope.ai.util.CoordinateConsumer; import io.github.andypyrope.ai.util.Vector; import java.util.Random; /** * Unlike atomic data, which has 0 dimensions, this one has up to 3 dimensions. Useful for * rep...
ingenious/ai/src/main/java/io/github/andypyrope/ai/data/RasterData.java
0.902528
0.819316
RasterData.java
starcoder
package com.db.antlr; import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; /** * This class provides an empty implementation of {@link xpathgrammarVisitor}, * 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...
src/main/java/com/db/antlr/xpathgrammarBaseVisitor.java
0.888638
0.488222
xpathgrammarBaseVisitor.java
starcoder
import java.util.*; class Program { public static void main(String[] args) { sequenceNtoM(); } private static void siteUndo() { Scanner scanner = new Scanner(System.in); Stack<String> stack = new Stack<>(); String previous = null; String command = scanner.nextLine...
Projects/DataStructures/Projects/linked_list_stack_queue/src/main/java/Program.java
0.754282
0.411466
Program.java
starcoder
package org.egzi.nn.elements.cmac; import org.egzi.math.DenseVector; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; public class CMACCell { private DenseVector vector; private Double value = 0d; public CMACCell(Double[] vector) { this.vec...
src/main/java/org/egzi/nn/elements/cmac/CMACCell.java
0.831349
0.451266
CMACCell.java
starcoder
package de.hypoport.efi.bausparen.model.berechnung.angebot; import de.hypoport.efi.bausparen.model.basis.SparBeitrag; import java.math.BigDecimal; import java.util.List; public class SparPhase { BigDecimal guthabenzinsInProzent; BigDecimal guthabenzinsBetragInEuro; BigDecimal bonuszinsInProzent; BigDecimal ...
src/main/java/de/hypoport/efi/bausparen/model/berechnung/angebot/SparPhase.java
0.696681
0.442155
SparPhase.java
starcoder
package advanced.combinatorial.backtracking.floodfill.lc417_pacificatlanticwaterflow; import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.List; /** */ public class Solution { @Test void test() { pacificAtlantic(new int[][]{ {3, 3, 3, 3, 3, 3}, ...
1-algorithm/13-leetcode/java/src/advanced/combinatorial/backtracking/floodfill/lc417_pacificatlanticwaterflow/Solution.java
0.86806
0.453564
Solution.java
starcoder
package com.twokwy.tetris.game.grid; import android.graphics.Rect; import com.google.common.collect.ImmutableList; import com.twokwy.tetris.game.grid.shapes.TetrisShapeSupplier; import com.twokwy.tetris.game.grid.tile.PositionedTile; import com.twokwy.tetris.game.grid.tile.Tile; import java.util.ArrayList; import ja...
app/src/main/java/com/twokwy/tetris/game/grid/TileGridFactory.java
0.934035
0.422624
TileGridFactory.java
starcoder
package com.litchiny.camera; import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import com.litchiny.camera.ui.PopupView; public class GyroSensor implements SensorEventListener...
app/src/main/java/com/litchiny/camera/GyroSensor.java
0.717507
0.433622
GyroSensor.java
starcoder
*/ package org.eclipse.epf.uma; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Variability Element</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * Variability Element is an abstract class derived from Method Element that provides new capabilities for content vari...
org.eclipse.epf.uma/src/org/eclipse/epf/uma/VariabilityElement.java
0.84966
0.758622
VariabilityElement.java
starcoder
package com.github.yellowstonegames.path; import com.github.tommyettinger.ds.ObjectList; import com.github.yellowstonegames.grid.Coord; /** * Most of the algorithms that operate on a {@link Graph} are defined here, with some specific cases in subclasses. * The most-frequently-used algorithm here is probably {@link ...
squidpath/src/main/java/com/github/yellowstonegames/path/Algorithms.java
0.951448
0.640207
Algorithms.java
starcoder
package com.bluegosling.collections; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; import org.junit.Test; public class MoreIteratorsTest { ...
test/com/bluegosling/collections/MoreIteratorsTest.java
0.610918
0.418935
MoreIteratorsTest.java
starcoder
package prog2assig2; import java.util.Arrays; /** * * @author <NAME> */ public class First_3_tasks { /** * @param args the command line arguments */ public static void main(String[] args) { } public static double sum(double[] nums) { double sum = 0; for (double n...
NetBeansProjects/Prog2Assig2/src/prog2assig2/First_3_tasks.java
0.825519
0.64969
First_3_tasks.java
starcoder
package com.faanggang.wisetrack.model.stats; import android.provider.ContactsContract; import android.util.Log; import com.jjoe64.graphview.series.DataPoint; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Handle the creation of the histogram values */ public class StatHist...
WiseTrack/app/src/main/java/com/faanggang/wisetrack/model/stats/StatHistogram.java
0.880451
0.673424
StatHistogram.java
starcoder
package org.artrev.workshop.fp.part5.exercise1; import org.artrev.workshop.fp.tools.Function1; import org.artrev.workshop.fp.tools.control.Maybe; import org.artrev.workshop.fp.tools.control.Try; /* -- Lifting -- We played a lot with functions, especially in part 1 where we tried to compose everything. Of cours...
java/exercises/src/main/java/org/artrev/workshop/fp/part5/exercise1/Exercise1.java
0.679604
0.735404
Exercise1.java
starcoder
package com.alcatrazescapee.oreveins.world.rule; import java.lang.reflect.Type; import java.util.function.Predicate; import com.google.gson.*; import net.minecraft.util.JSONUtils; import net.minecraft.util.math.BlockPos; public class DistanceRule implements Predicate<BlockPos> { public static final Predicate<Blo...
src/main/java/com/alcatrazescapee/oreveins/world/rule/DistanceRule.java
0.897908
0.422028
DistanceRule.java
starcoder
package org.corant.shared.util; import static org.corant.shared.util.Assertions.shouldBeTrue; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.BitSet; import org.corant.shared.exception.CorantRuntimeException; /** * corant-shared * <p> * Bit byte processing tool class, used for conversion betw...
corant-shared/src/main/java/org/corant/shared/util/Bytes.java
0.955257
0.718718
Bytes.java
starcoder
package network; import java.util.Arrays; import network.activation.ActivationFunction; import utilities.Vector3; public class NetworkConfiguration { public static int FULLY_CONNECTED = 0; public static int CONVOLUTIONAL = 1; public static int POOLING = 2; //Fully connected layers private int[] layerType; V...
src/network/NetworkConfiguration.java
0.631253
0.507019
NetworkConfiguration.java
starcoder