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 edu.utdallas.davisbase.result; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkState; import static java.util.Arrays.asList; import static java.util.Arrays.copyOf; import java.io.Serializable; import java.time.LocalDate; import java.time...
src/main/java/edu/utdallas/davisbase/result/SelectResultDataRow.java
0.942619
0.430506
SelectResultDataRow.java
starcoder
package net.powermatcher.api.data; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; /** * This immutable data object represents a price in the PowerMatcher cluster. * * @author FAN * @version 2.1 */ public class Price implements Comparable<Price> { /** ...
net.powermatcher.api/src/net/powermatcher/api/data/Price.java
0.965471
0.568476
Price.java
starcoder
package sunggyu.algorism.dfs.gold5; import java.io.*; import java.util.*; //https://www.acmicpc.net/problem/13023 //ABCDE /* 한 개의 노드로부터 depth가 5개까지 존재하는지 확인하면 됨. 노드의 개수는 최대 2000개이고 각 노드마다 깊이를 계산한다고 하면 2000*2000 = 4000000 400백만이므로 완전 탐색 가능 주의 dfs는 기본적으로 완전탐색이기 때문에 한 번 방문한 것은 더이상 방문할 필요가 없음. ...
sunggyu/algorism/dfs/gold5/Dfs2.java
0.559531
0.542318
Dfs2.java
starcoder
package org.apache.geode.distributed; import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT; import static org.apache.geode.internal.AvailablePortHelper.getRandomAvailableTCPPorts; import static org.apache.geode.test.dunit.Assert.assertEquals; import static org.apache.geode.test.dunit.Assert.as...
geode-core/src/distributedTest/java/org/apache/geode/distributed/HostedLocatorsDUnitTest.java
0.77827
0.441372
HostedLocatorsDUnitTest.java
starcoder
package org.ringingmaster.util.radixtree; import org.ringingmaster.util.radixtree.sequence.CharSequenceWithIntTerminator; import java.util.Collection; /** * User: nick * Date: 07/05/13 * Time: 19:00 */ public class RadixTree<V> implements CharSequenceWithIntTerminator { //the next node in the linked lis...
src/main/java/org/ringingmaster/util/radixtree/RadixTree.java
0.667256
0.483953
RadixTree.java
starcoder
package org.mcisb.util.math; import java.math.*; import java.nio.*; import java.util.*; import org.apache.commons.math3.linear.*; import org.apache.commons.math3.stat.descriptive.moment.*; import org.mcisb.util.*; /** * * @author <NAME> */ public abstract class MathUtils { /** * */ public final static int ...
src/main/java/org/mcisb/util/math/MathUtils.java
0.895474
0.497803
MathUtils.java
starcoder
package no.nav.modiapersonoversikt.legacy.utbetaling.domain.util; import no.nav.modiapersonoversikt.legacy.utbetaling.domain.Hovedutbetaling; import no.nav.modiapersonoversikt.legacy.utbetaling.domain.Hovedytelse; import no.nav.modiapersonoversikt.legacy.utbetaling.domain.Mottakertype; import no.nav.tjeneste.virksomhe...
web/src/main/java/no/nav/modiapersonoversikt/legacy/utbetaling/domain/util/YtelseUtils.java
0.515132
0.413477
YtelseUtils.java
starcoder
package io.github.palexdev.flowless; import javafx.beans.property.DoubleProperty; import javafx.geometry.Bounds; import javafx.geometry.Orientation; import javafx.scene.Node; import org.reactfx.value.Val; import org.reactfx.value.Var; /** * Helper class for returning the correct value (should the {@code width} or {@...
src/main/java/io/github/palexdev/flowless/OrientationHelper.java
0.894996
0.589391
OrientationHelper.java
starcoder
package blue.endless.splinter; public class LayoutElementMetrics { public static final LayoutElementMetrics EMPTY_METRICS = new LayoutElementMetrics(-1,-1,0,0); /** The X coordinate, in cells, of the child element */ public int cellX; /** The Y coordinate, in cells, of the child element */ public int cellY; /*...
src/main/java/blue/endless/splinter/LayoutElementMetrics.java
0.558327
0.453867
LayoutElementMetrics.java
starcoder
package calculator.ast; import calculator.errors.EvaluationError; import datastructures.concrete.DoubleLinkedList; import datastructures.interfaces.IList; /** * Represents a single node in an abstract syntax tree (AST). * * See spec for more details on what an AST is. */ public class AstNode { private String ...
project1/src/main/java/calculator/ast/AstNode.java
0.892522
0.41324
AstNode.java
starcoder
package com.apple.foundationdb.tuple; import com.apple.foundationdb.FDB; import com.apple.foundationdb.annotation.API; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.math.BigInteger; import java.util.List; /** * Helper methods for working with {@link Tuple}s. */ @API(API.Status.UNST...
fdb-extensions/src/main/java/com/apple/foundationdb/tuple/TupleHelpers.java
0.918963
0.414247
TupleHelpers.java
starcoder
package allow.simulator.knowledge; import java.util.List; import allow.simulator.mobility.planner.Itinerary; import allow.simulator.mobility.planner.TType; import allow.simulator.utility.ItineraryParams; public final class EvoKnowledgeUtil { public static ItineraryParams createFromExperiences(Itinerary prior, List...
Simulator/src/allow/simulator/knowledge/EvoKnowledgeUtil.java
0.610918
0.461077
EvoKnowledgeUtil.java
starcoder
package agent; import org.junit.Before; import org.junit.Test; import java.util.HashSet; import java.util.Set; import static org.junit.Assert.assertEquals; /** * Created by jonsteinn on 21.3.2017. */ public class PositionGridTest { private PositionGrid grid; @Before public void setUp() throws Except...
test/agent/PositionGridTest.java
0.874144
0.589303
PositionGridTest.java
starcoder
package com.equinor.neqsimapi.dto; public class TEGdehydrationRequest { public double coolingMedium1FlowRate = 3448.0; public double coolingMedium1FeedTemperature = 18.0; public double coolingMedium1FeedPressure = 7.5; public double UAoverheadCondenser = 513.0; /** * The flow rate of gas from the scrubber con...
API/java/src/main/java/com/equinor/neqsimapi/dto/TEGdehydrationRequest.java
0.780202
0.494446
TEGdehydrationRequest.java
starcoder
import java.util.Arrays; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Scanner; /** * This class sets up the countries and continents on the Risk game RiskBoard. * * @author <NAME> **/ public class RiskBoard { private int i; private int j; private boolean isL...
Practice Work/RiskBoard.java
0.652574
0.52007
RiskBoard.java
starcoder
package org.assertj.swing.util; import static org.assertj.core.util.Preconditions.checkNotNull; import static org.assertj.core.util.Preconditions.checkNotNullOrEmpty; import static org.assertj.core.util.Strings.quote; import static org.assertj.swing.util.Arrays.format; import static org.assertj.swing.util.Strings.areE...
assertj-swing/src/main/java/org/assertj/swing/util/StringTextMatcher.java
0.942915
0.604224
StringTextMatcher.java
starcoder
package cells; import java.util.ArrayList; import java.util.List; import java.util.Random; import cellManager.Grid; import gridPatches.ForagingLand; import javafx.scene.paint.Color; /** * @author Madhavi * @author <NAME> This class outlines the functionality of a general Cell * type. The Cell needs to kno...
src/cells/Cell.java
0.867584
0.496399
Cell.java
starcoder
package amat.report; import java.util.Arrays; import java.util.Collection; import java.util.Map; import jam.math.DoubleUtil; import amat.bcell.BCell; import amat.epitope.Epitope; import amat.structure.CV; import amat.structure.CVClassifier; import amat.structure.Structure; import amat.vaccine.VaccinationSchedule; /...
src/amat/report/MatchingRecord.java
0.922787
0.50116
MatchingRecord.java
starcoder
package de.nenick.espressomacchiato.elements; import android.view.View; import org.hamcrest.Matcher; import static android.support.test.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.matcher.ViewMatchers.withText; /** * Actions and assertions for a Button. * * @since Espre...
espresso-macchiato/src/main/java/de/nenick/espressomacchiato/elements/EspButton.java
0.879587
0.416619
EspButton.java
starcoder
package org.observe.collect; import static org.observe.ObservableDebug.d; import java.util.ArrayDeque; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.function.BiFun...
src/main/java/org/observe/collect/ObservableSet.java
0.831177
0.41947
ObservableSet.java
starcoder
package io.tiledb.libtiledb; public class PointerUtils { public static SWIGTYPE_p_void toVoid(int32_tArray p) { return new SWIGTYPE_p_void(int32_tArray.getCPtr(p), false); } public static SWIGTYPE_p_void toVoid(int64_tArray p) { return new SWIGTYPE_p_void(int64_tArray.getCPtr(p), false); } public ...
swig/customCode/PointerUtils.java
0.597256
0.457803
PointerUtils.java
starcoder
package ca.mcgill.ecse211.pctest; import static org.junit.Assert.*; import ca.mcgill.ecse211.project.ColorDetection; import org.junit.Test; /** * This is a JUnit test for Color Detection math and logic. This test can be run * individually or along with all of the tests using {@link RunAllTests} * * <p> * Note:...
test/ca/mcgill/ecse211/pctest/ColorDetectionTest.java
0.939727
0.62088
ColorDetectionTest.java
starcoder
package bio.singa.mathematics.geometry.bodies; import bio.singa.mathematics.geometry.edges.LineSegment; import bio.singa.mathematics.geometry.faces.Circle; import bio.singa.mathematics.topology.grids.rectangular.MooreRectangularDirection; import bio.singa.mathematics.vectors.Vector2D; import bio.singa.mathematics.vect...
singa-mathematics/src/main/java/bio/singa/mathematics/geometry/bodies/Spheres.java
0.914734
0.777258
Spheres.java
starcoder
package WayofTime.bloodmagic.ritual; import WayofTime.bloodmagic.api.BlockStack; import WayofTime.bloodmagic.api.Constants; import WayofTime.bloodmagic.api.iface.IHarvestHandler; import WayofTime.bloodmagic.api.saving.SoulNetwork; import WayofTime.bloodmagic.api.registry.HarvestRegistry; import WayofTime.bloodmagic.ap...
src/main/java/WayofTime/bloodmagic/ritual/RitualHarvest.java
0.817574
0.422326
RitualHarvest.java
starcoder
package com.google.template.soy.internal.i18n; import java.util.regex.Pattern; /** * Utility functions for performing common Bidi tests on strings. */ public class BidiUtils { /** * Not instantiable. */ private BidiUtils() { } /** * Enum for directionality type. */ public enum Dir { LTR ...
java/src/com/google/template/soy/internal/i18n/BidiUtils.java
0.894548
0.558447
BidiUtils.java
starcoder
package sk.hackcraft.bwu.grid; import java.util.function.BinaryOperator; import java.util.function.UnaryOperator; import sk.hackcraft.bwu.grid.GridIterator.IterateListener; /** * Definition of two dimensional grid holding integer values. */ public interface Grid { /** * Returns dimension of this grid. * * ...
src/sk/hackcraft/bwu/grid/Grid.java
0.937655
0.52829
Grid.java
starcoder
package flounder.maths.matrices; import flounder.maths.vectors.*; import java.nio.*; /** * Holds a 3x3 matrix. */ public class Matrix3f { public float m00, m01, m02; public float m10, m11, m12; public float m20, m21, m22; /** * Constructor for Matrix3f. The matrix is initialised to the identity. */ publi...
src/flounder/maths/matrices/Matrix3f.java
0.89284
0.610366
Matrix3f.java
starcoder
package bio.singa.mathematics.vectors; import bio.singa.mathematics.geometry.faces.Polygons; import bio.singa.mathematics.geometry.model.Polygon; /** * The {@code Vector2D} class handles the general properties and operations of * two dimensional vectors. Basically this is an regular vector with the * constraint, t...
singa-mathematics/src/main/java/bio/singa/mathematics/vectors/Vector2D.java
0.97546
0.870157
Vector2D.java
starcoder
package com.neilalexander.jnacl.crypto.auth; import com.neilalexander.jnacl.crypto.verify_32; import static com.neilalexander.jnacl.crypto.hashblocks.sha256.crypto_hashblocks; public class hmacsha256 { static byte[] iv = new byte[]{ (byte) 0x6a, (byte) 0x09, (byte) 0xe6, (byte) 0x67, (byte) 0xbb, (byt...
src/main/java/com/neilalexander/jnacl/crypto/auth/hmacsha256.java
0.551574
0.451145
hmacsha256.java
starcoder
package com.raytheon.viz.gfe.contours.util; import java.io.Serializable; /** * This is a port of the GFE SIRS CartCoord2D C++ class. The original * C++ class was implemented as a template class to allow for different * underlying data types. A quick search of the legacy code indicates * that only float were used,...
cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/contours/util/CartCoord2D.java
0.96862
0.536677
CartCoord2D.java
starcoder
package org.linuxlsx.algo.leetcode; /** * Solution of <a href='https://leetcode.com/problems/search-in-rotated-sorted-array/'>Search in Rotated Sorted Array</a> * 8 ms, faster than 98.71% of Java online submissions for Search in Rotated Sorted Array. * @author linuxlsx * @date 2018/11/2 */ public class SearchInRo...
src/main/java/org/linuxlsx/algo/leetcode/SearchInRotatedSortedArray.java
0.743075
0.451266
SearchInRotatedSortedArray.java
starcoder
package algorithms.imageProcessing.scaleSpace; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.logging.Logger; /** * class to use CSSContourMatcher to match the given contours lists from the * edges of two different images * with logic to retry with reverse ordered...
src/algorithms/imageProcessing/scaleSpace/CSSContourMatcherWrapper.java
0.912326
0.539287
CSSContourMatcherWrapper.java
starcoder
package net.pawstep.engine.hierarchy; import org.lwjgl.util.vector.Matrix4f; import org.lwjgl.util.vector.Quaternion; import org.lwjgl.util.vector.Vector3f; import net.pawstep.engine.Templates; public final class Transform { public Vector3f position; public Quaternion rotation; public Vector3f scaling; publi...
pawstep-core/src/main/java/net/pawstep/engine/hierarchy/Transform.java
0.891475
0.496582
Transform.java
starcoder
package ca.eandb.jmist.framework.material; import ca.eandb.jmist.framework.color.Color; import ca.eandb.jmist.framework.color.ColorModel; import ca.eandb.jmist.framework.color.WavelengthPacket; import ca.eandb.jmist.math.Complex; import ca.eandb.jmist.math.Optics; import ca.eandb.jmist.math.Vector3; /** * Static uti...
jmist-core/src/main/java/ca/eandb/jmist/framework/material/MaterialUtil.java
0.84124
0.690207
MaterialUtil.java
starcoder
package edu.wpi.first.wpilibj2.command; /** * A robot subsystem. Subsystems are the basic unit of robot organization in the Command-based * framework; they encapsulate low-level hardware objects (motor controllers, sensors, etc) and * provide methods through which they can be used by {@link Command}s. Subsystems a...
wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Subsystem.java
0.890936
0.408749
Subsystem.java
starcoder
package pythagoras.d; /** * Various geometry utility methods. */ public class GeometryUtil { public static final double EPSILON = Math.pow(10, -14); public static int intersectLinesWithParams (double x1, double y1, double x2, double y2, double x3, double y3, ...
src/main/java/pythagoras/d/GeometryUtil.java
0.93175
0.791398
GeometryUtil.java
starcoder
package jav.util.long_; /** * */ public interface LongDeque extends LongQueue, LongStack { /** * Inserts the specified element at the front of this deque if it is * possible to do so immediately without violating capacity restrictions, * throwing an {@code IllegalStateException} if no space i...
src/main/java/jav/util/long_/LongDeque.java
0.955506
0.466056
LongDeque.java
starcoder
package org.anchoranalysis.image.io.stack.time; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import org.anchoranalysis.image.core.channel.Channel; // NOSONAR import org.anchoranalysis.image.core.stack.Stack; import org.an...
anchor-image-io/src/main/java/org/anchoranalysis/image/io/stack/time/TimeSeries.java
0.942062
0.452475
TimeSeries.java
starcoder
package org.zstack.utils; import java.util.Calendar; public class DateCountCache { private int startYear; private int[][][] counts; private int endYear; /** * call expandIfNeed(Integer newStartYear, Integer newEndYear) first, or you may encounter OutOfIndexException. * @param year * @p...
utils/src/main/java/org/zstack/utils/DateCountCache.java
0.76074
0.426441
DateCountCache.java
starcoder
package algorithms.imageProcessing; import algorithms.util.ResourceFinder; import algorithms.util.PairIntArray; import java.util.Arrays; import java.util.List; import java.util.Map; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; /** * * @author nichole */ ...
tests/algorithms/imageProcessing/ContourFinderTest.java
0.745028
0.505615
ContourFinderTest.java
starcoder
package binaryTree; import java.util.ArrayList; import java.util.Stack; public class KNodesFarFromANode { static class Node { int data; Node leftChild; Node rightChild; Node(int data, Node left, Node right) { this.data = data; this.leftChild = left; ...
binaryTree/KNodesFarFromANode.java
0.69451
0.402568
KNodesFarFromANode.java
starcoder
package io.kgraph.library.similarity; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import io.kgraph.EdgeWithValue; import io.kgraph.VertexWithValue; import io.kgraph.pregel.ComputeFunction; /** * * This class computes the Jaccard simil...
kafka-graphs-core/src/main/java/io/kgraph/library/similarity/Jaccard.java
0.943582
0.41739
Jaccard.java
starcoder
package no.uio.ifi.qure.bintree; import java.util.Comparator; import java.util.Arrays; import no.uio.ifi.qure.util.Pair; public class Block { // Total number of bits per block. private static int BLOCK_SIZE = Long.SIZE - 1; // Total number of bits for size meta information (how many bits needed to store the len...
src/no/uio/ifi/qure/bintree/Block.java
0.794146
0.474631
Block.java
starcoder
package sun.java2d.xr; import java.awt.*; import java.util.*; /** * We render non-antialiased geometry (consisting of rectangles) into a mask, * which is later used in a composition step. * To avoid mask-allocations of large size, MaskTileManager splits * geometry larger than MASK_SIZE into several tiles, * and ...
jdk11/java.desktop/sun/java2d/xr/MaskTileManager.java
0.790611
0.501587
MaskTileManager.java
starcoder
import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * This class represents a State in a markov decision process. */ class State { private final int reward; // A map where the key is an action a, state s. // For example, key "a1s2", value 0.5 means action 1 transitions to st...
src/State.java
0.941446
0.682184
State.java
starcoder
package organice.logic.commands; import static java.util.Objects.requireNonNull; import static organice.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; import static organice.logic.commands.MatchCommand.match; import java.util.ArrayList; import organice.model.Model; import organice.model.person.Donor; import o...
src/main/java/organice/logic/commands/DoneCommand.java
0.845974
0.407952
DoneCommand.java
starcoder
package com.omtia.algorithmsIlluminated.module3_greedy.week2; import java.io.File; import java.util.*; /* In this question your task is again to run the clustering algorithm from lecture, but on a MUCH bigger graph. So big, in fact, that the distances (i.e., edge costs) are only defined implicitly, rather than b...
src/main/java/com/omtia/algorithmsIlluminated/module3_greedy/week2/Clustering_big.java
0.659953
0.783616
Clustering_big.java
starcoder
package de.lksbhm.gdx.util; import java.util.HashMap; import java.util.Map; import com.badlogic.gdx.utils.Pool; /** * Least Recently Used Cache implementation. * * @author suluke * */ public class LRUCache<Key, Value> { private final Pool<DoubleLinkedNode<Pair<Key, Value>>> nodePool = new Pool<DoubleLinkedNod...
core/src/de/lksbhm/gdx/util/LRUCache.java
0.628749
0.447823
LRUCache.java
starcoder
* Coordinate System (CS) definitions as the set of coordinate system axes that spans the coordinate space. * An explanation for this package is provided in the {@linkplain org.opengis.referencing.cs OpenGIS® javadoc}. * The remaining discussion on this page is specific to the SIS implementation. * * <p>The root cl...
core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/package-info.java
0.915242
0.564459
package-info.java
starcoder
import java.math.BigInteger; /** * Represents a payment card number (such as a credit or debit card number). */ public class CardNumber { public final BigInteger issuerID; public final BigInteger accountID; public final int checkDigit; public CardNumber(BigInteger issuerID, BigInteger accountID) { ...
CardNumber.java
0.901151
0.655763
CardNumber.java
starcoder
package com.jme3.lwjgl3.utils; import org.lwjgl.BufferUtils; import org.lwjgl.PointerBuffer; import java.nio.ByteBuffer; import java.util.Arrays; import static org.lwjgl.system.Pointer.*; import static org.lwjgl.system.MathUtil.*; import org.lwjgl.system.MemoryUtil; import static org.lwjgl.system.MemoryUtil.*; /** ...
jme3-lwjgl3/src/main/java/com/jme3/lwjgl3/utils/APIBuffer.java
0.871119
0.428831
APIBuffer.java
starcoder
package org.apache.axiom.om; import javax.xml.namespace.QName; import org.apache.axiom.ext.stax.datahandler.DataHandlerProvider; /** Class OMFactory */ public interface OMFactory { /** * Get the {@link OMMetaFactory} from which this factory was obtained. More precisely, if the * {@link OMFactory} insta...
axiom-api/src/main/java/org/apache/axiom/om/OMFactory.java
0.82151
0.458652
OMFactory.java
starcoder
package org.redisson.api; import org.redisson.codec.JsonCodec; import java.util.List; /** * Redis JSON datatype interface. Data is stored as JSON object in Redis * * @author <NAME> * @param <V> the type of object */ public interface RJsonBucketAsync<V> extends RBucketAsync<V> { /** * Get Json object/o...
redisson/src/main/java/org/redisson/api/RJsonBucketAsync.java
0.926416
0.532182
RJsonBucketAsync.java
starcoder
package cz.seznam.euphoria.core.client.operator; import cz.seznam.euphoria.core.annotation.audience.Audience; import cz.seznam.euphoria.core.annotation.operator.Basic; import cz.seznam.euphoria.core.annotation.operator.StateComplexity; import cz.seznam.euphoria.core.client.dataset.Dataset; import cz.seznam.euphoria.co...
euphoria-core/src/main/java/cz/seznam/euphoria/core/client/operator/Union.java
0.892082
0.480783
Union.java
starcoder
package com.scottlogic.deg.generator.fieldspecs.whitelist; import com.scottlogic.deg.generator.utils.RandomNumberGenerator; import java.util.*; import java.util.stream.Collectors; public class FrequencyDistributedSet<T> implements DistributedSet<T> { private static final FrequencyDistributedSet<?> EMPTY = new F...
common/src/main/java/com/scottlogic/deg/generator/fieldspecs/whitelist/FrequencyDistributedSet.java
0.932507
0.558929
FrequencyDistributedSet.java
starcoder
package HomeworkSix; public class Grades { /* Compute Test Averages from 2 1D Arrays Your teacher has created two arrays, each holding the results of tests, say Test 1 and Test 2. You need to create a new array which holds the averages of these two tests. You may assume that the first element of the f...
CSC108/first/src/HomeworkSix/Grades.java
0.665084
0.906901
Grades.java
starcoder
package com.neverpile.eureka.plugin.audit.verification; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.Serializable; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Arrays; public class AuditHash i...
neverpile-eureka-plugin-audit/src/main/java/com/neverpile/eureka/plugin/audit/verification/AuditHash.java
0.803367
0.478102
AuditHash.java
starcoder
package go.graphics; import go.graphics.text.EFontSize; import go.graphics.text.TextDrawer; import java.nio.ByteBuffer; import java.nio.ShortBuffer; /** * This is the main OpenGL context * * @author michael */ public interface GLDrawContext { /** * Fills a quad. * * @param x1 * @param y1 * @param x...
go.graphics/src/main/java/go/graphics/GLDrawContext.java
0.895137
0.464719
GLDrawContext.java
starcoder
package sanctuary.util; import com.google.common.collect.Maps; import gnu.trove.TCollections; import gnu.trove.map.TObjectDoubleMap; import gnu.trove.map.hash.TObjectDoubleHashMap; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.Vec3i; import javax.ve...
src/main/java/sanctuary/util/VectorUtils.java
0.92149
0.449634
VectorUtils.java
starcoder
package problems; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** * https://leetcode.com/problems/unique-binary-search-trees-ii/ * <p> * Given an integer n, return all the structurally unique BST's (binary search trees), which has exactly n nodes of unique values from 1 to n. Retur...
src/main/java/problems/UniqueBinarySearchTrees2.java
0.942115
0.563438
UniqueBinarySearchTrees2.java
starcoder
package edu.jhu.bouncycastle.util.encoders; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; public class Hex { private static final Encoder encoder = new HexEncoder(); /** * encode the input data producing a Hex encoded byte array. * * @return a byte array conta...
Android/src/edu/jhu/bouncycastle/util/encoders/Hex.java
0.887911
0.548915
Hex.java
starcoder
package com.flowpowered.react.collision.shape; import com.flowpowered.react.math.Vector3; /** * Represents a bounding volume of type "Axis Aligned Bounding Box". It's a box where all the edges are always aligned with the world coordinate system. The AABB is defined by the minimum and maximum * world coordinates of ...
src/main/java/com/flowpowered/react/collision/shape/AABB.java
0.973075
0.598254
AABB.java
starcoder
public class BiTree { public Node root; public Node left; public Node right; public BiTree() { this.root = null; } public BiTree(Object object) { Node root = (Node) object; left = null; right = null; } //sub arbol public Node subBitree(Node left, ...
DataTypes/Java/Trees/BinaryTree/BinaryTree.java
0.751283
0.439567
BinaryTree.java
starcoder
package nz.ac.auckland.cs369.assignment1; import Jama.Matrix; import Jama.SingularValueDecomposition; import java.util.Arrays; /** * Represents the principal components analysis for a matrix. * * @author <NAME> */ public class PrincipalComponentsAnalysis { private final Matrix A; private final Matrix U; ...
a1/src/nz/ac/auckland/cs369/assignment1/PrincipalComponentsAnalysis.java
0.930189
0.566498
PrincipalComponentsAnalysis.java
starcoder
package uk.ac.ucl.robotisland.src.robot; import java.util.Arrays; import uk.ac.ucl.robotisland.src.loggers.CustomLevel; import uk.ac.ucl.robotisland.src.main.Driver; /** * Description: Class that stores all of the movement methods for the robot. * * @author Geraint and Lucas */ public class Movement { /** *...
Hard but flexible installation/src/uk/ac/ucl/robotisland/src/robot/Movement.java
0.797044
0.420659
Movement.java
starcoder
package de.uni_mannheim.informatik.dws.tnt.match.matchers; import de.uni_mannheim.informatik.dws.tnt.match.data.MatchableTableColumn; import de.uni_mannheim.informatik.dws.tnt.match.data.MatchableTableRow; import de.uni_mannheim.informatik.dws.tnt.match.recordmatching.blocking.TableRowTokenGenerator; import de.uni_man...
src/main/java/de/uni_mannheim/informatik/dws/tnt/match/matchers/CustomizableValueBasedMatcher.java
0.702326
0.422326
CustomizableValueBasedMatcher.java
starcoder
package com.midisheetmusic.sheets; import com.midisheetmusic.MidiNote; import java.util.*; /** @class ClefMeasures * The ClefMeasures class is used to report what Clef (Treble or Bass) a * given measure uses. */ public class ClefMeasures { private ArrayList<Clef> clefs; /** The clefs used for each measure (f...
app/src/main/java/com/midisheetmusic/sheets/ClefMeasures.java
0.758063
0.451931
ClefMeasures.java
starcoder
package ca.appostrophe.helpers; import java.util.ArrayList; import java.util.List; /** * Imported from CBC code on December 16th 2015 and extended since */ public class ArrayUtils { private static final Object[] EMPTY = new Object[0]; private static final int CACHE_SIZE = 73; private static final Object...
lib-utils/src/main/java/ca/appostrophe/helpers/ArrayUtils.java
0.836254
0.440229
ArrayUtils.java
starcoder
package com.opengamma.master; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import com.opengamma.core.change.ChangeManager; import com.opengamma.id.Obje...
projects/master/src/main/java/com/opengamma/master/AbstractDataTrackingMaster.java
0.884364
0.442215
AbstractDataTrackingMaster.java
starcoder
package uk.co.omegaprime.btreemap; import java.util.*; class NavigableMapKeySet<K> implements NavigableSet<K> { private final NavigableMap<K, ?> that; NavigableMapKeySet(NavigableMap<K, ?> that) { this.that = that; } @Override public String toString() { return Iterables.toString(...
src/main/java/uk/co/omegaprime/btreemap/NavigableMapKeySet.java
0.826852
0.489259
NavigableMapKeySet.java
starcoder
package com.opengamma.strata.math.impl.minimization; import java.util.Arrays; import java.util.BitSet; import java.util.Objects; import com.opengamma.strata.collect.ArgChecker; import com.opengamma.strata.collect.array.DoubleArray; import com.opengamma.strata.collect.array.DoubleMatrix; /** * For a set of <i>n</i> ...
modules/math/src/main/java/com/opengamma/strata/math/impl/minimization/UncoupledParameterTransforms.java
0.842798
0.710142
UncoupledParameterTransforms.java
starcoder
package camzup.core; /** * Organizes components of a 2D mesh into an edge with an origin and * destination. This is not used by a mesh internally; it is created upon * retrieval from a mesh. */ public class Edge2 implements Comparable < Edge2 > { /** * The destination vertex. */ public Vert2 dest; ...
src/camzup/core/Edge2.java
0.972844
0.625238
Edge2.java
starcoder
package ru.vasiliev.sandbox.camera.device.camera.camera2; import android.graphics.ImageFormat; import android.hardware.camera2.CameraCharacteristics; import android.hardware.camera2.CameraMetadata; import android.hardware.camera2.CaptureRequest; import android.hardware.camera2.params.StreamConfigurationMap; import an...
app/src/main/java/ru/vasiliev/sandbox/camera/device/camera/camera2/Camera2Config.java
0.891457
0.422445
Camera2Config.java
starcoder
package com.irurueta.algebra; /** * Class in charge of computing norms of arrays and matrices. * Norms can be computed in different ways depending on the desired norm * measure. For that purpose subclass implementations of this class attempt to * work on different norm types. * By default Frobenius norm is used f...
src/main/java/com/irurueta/algebra/NormComputer.java
0.948585
0.588771
NormComputer.java
starcoder
package de.htw.audioprocessor; import java.io.InputStream; import java.io.OutputStream; import java.io.PipedInputStream; import java.io.PipedOutputStream; import java.io.IOException; import java.io.InterruptedIOException; import java.nio.file.Path; import java.util.Arrays; import javax.sound.sampled.AudioInputStream; ...
radio-processor/src/de/htw/audioprocessor/AudioOutputStream.java
0.802401
0.439266
AudioOutputStream.java
starcoder
package org.newdawn.slick.geom; import java.util.ArrayList; /** * Triangulates a polygon into triangles - duh. Doesn't handle * holes in polys * * @author Based on Public Source from FlipCode */ public class BasicTriangulator implements Triangulator { /** The accepted error value */ private static...
BinoxxoSolver/lib/Slick2D/src/org/newdawn/slick/geom/BasicTriangulator.java
0.867892
0.482856
BasicTriangulator.java
starcoder
package io.deephaven.db.v2.sources.chunk; import io.deephaven.db.v2.utils.LongRangeConsumer; import io.deephaven.db.v2.utils.OrderedKeys; import org.jetbrains.annotations.NotNull; /** * * @param <ATTR> the attribute describing what kind of chunks are produced by this source * * @IncludeAll */ public interface Ch...
DB/src/main/java/io/deephaven/db/v2/sources/chunk/ChunkSource.java
0.806662
0.461745
ChunkSource.java
starcoder
package com.opengamma.strata.data.scenario; import java.io.Serializable; import java.lang.invoke.MethodHandles; import java.time.LocalDate; import java.util.Optional; import java.util.Set; import org.joda.beans.ImmutableBean; import org.joda.beans.JodaBeanUtils; import org.joda.beans.MetaBean; import org.joda.beans.T...
modules/data/src/main/java/com/opengamma/strata/data/scenario/CombinedScenarioMarketData.java
0.904896
0.423845
CombinedScenarioMarketData.java
starcoder
package tools.pathfinder; import java.util.ArrayList; import core.game.Observation; import core.game.StateObservation; import tools.Vector2d; /** * Created by dperez on 14/01/16. */ public class PathFinder { public AStar astar; public StateObservation state; public boolean VERBOSE = false; // Al...
gym_gvgai/envs/gvgai/src/tools/pathfinder/PathFinder.java
0.814607
0.403743
PathFinder.java
starcoder
package com.asakusafw.utils.java.internal.model.util; import java.math.BigInteger; /** * Analyzes Java literals. */ public final class LiteralAnalyzer { private static final BigInteger MAX_INT = BigInteger.valueOf(Integer.MAX_VALUE).add(BigInteger.ONE); private static final BigInteger MAX_LONG = BigInteger...
utils-project/java-dom/src/main/java/com/asakusafw/utils/java/internal/model/util/LiteralAnalyzer.java
0.958421
0.50415
LiteralAnalyzer.java
starcoder
package net.gegy1000.earth.server.world.data.source.reader; import net.gegy1000.terrarium.server.world.data.raster.IntegerRaster; import net.gegy1000.terrarium.server.world.data.raster.Raster; public enum RasterFilter { NONE { @Override public int apply(int x, int a, int b, int c) { re...
src/main/java/net/gegy1000/earth/server/world/data/source/reader/RasterFilter.java
0.859531
0.406803
RasterFilter.java
starcoder
package tech.tablesaw.api.ml.association; import it.unimi.dsi.fastutil.ints.IntRBTreeSet; import it.unimi.dsi.fastutil.objects.Object2DoubleOpenHashMap; import tech.tablesaw.api.DoubleColumn; import tech.tablesaw.api.NumberColumn; import smile.association.ARM; import smile.association.AssociationRule; import tech.tabl...
src/main/java/tech/tablesaw/api/ml/association/AssociationRuleMining.java
0.617859
0.438485
AssociationRuleMining.java
starcoder
import javax.imageio.ImageIO; import java.awt.*; import java.awt.color.ColorSpace; import java.awt.image.BufferedImage; import java.awt.image.ColorConvertOp; import java.io.*; import java.util.ArrayList; public class ImageAnalysis { // These two colors are used a lot of production of new imafes public static ...
src/ImageAnalysis.java
0.841435
0.526099
ImageAnalysis.java
starcoder
package pl.wozniaktomek.neural.service; import javafx.application.Platform; import pl.wozniaktomek.neural.NeuralNetwork; import pl.wozniaktomek.neural.structure.Connection; import pl.wozniaktomek.neural.structure.Layer; import pl.wozniaktomek.neural.structure.Neuron; import pl.wozniaktomek.neural.util.NeuralObject; i...
src/pl/wozniaktomek/neural/service/LearningService.java
0.551574
0.42919
LearningService.java
starcoder
package com.github.thorbenkuck.kai.neural.types; import com.github.thorbenkuck.kai.neural.ActivationFunction; import com.github.thorbenkuck.kai.neural.Connection; import com.github.thorbenkuck.kai.neural.Neuron; import java.util.ArrayList; import java.util.List; public abstract class AbstractNeuron implements Neuron...
src/main/java/com/github/thorbenkuck/kai/neural/types/AbstractNeuron.java
0.86813
0.522629
AbstractNeuron.java
starcoder
package net.simonvt.cathode.api.body; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; public class SyncItems { public static final String TIME_RELEASED = "released"; public static class Movie { @SerializedName("watched_at") String watchedAt; @Seria...
trakt-api/src/main/java/net/simonvt/cathode/api/body/SyncItems.java
0.869368
0.431105
SyncItems.java
starcoder
package at.tuwien.ifs.somtoolbox.layers.quality; import at.tuwien.ifs.somtoolbox.data.InputData; import at.tuwien.ifs.somtoolbox.layers.Layer; import at.tuwien.ifs.somtoolbox.layers.LayerAccessException; import at.tuwien.ifs.somtoolbox.layers.Unit; /** * Calculates the <i>Quantisation Error</i>, defined as the avera...
java_somtoolbox/src/core/at/tuwien/ifs/somtoolbox/layers/quality/QuantizationError.java
0.763043
0.52141
QuantizationError.java
starcoder
package io.improbable.keanu.tensor; import io.improbable.keanu.BaseFloatingPointTensor; import io.improbable.keanu.kotlin.DoubleOperators; import io.improbable.keanu.tensor.bool.BooleanTensor; import io.improbable.keanu.tensor.dbl.DoubleTensor; import io.improbable.keanu.tensor.intgr.IntegerTensor; public interface F...
keanu-project/src/main/java/io/improbable/keanu/tensor/FloatingPointTensor.java
0.911702
0.758645
FloatingPointTensor.java
starcoder
package org.apache.hedwig.jms.selector; import org.apache.hedwig.jms.message.MessageImpl; /** * Comparison of values .. */ public abstract class ValueComparisonFunction extends BinaryExprFunction { protected SelectorConstant evaluateImpl(SelectorConstant left, SelectorConstant right, ...
hedwig-client-jms/src/main/java/org/apache/hedwig/jms/selector/ValueComparisonFunction.java
0.869673
0.504639
ValueComparisonFunction.java
starcoder
package nova.peernet.core.queues; import peernet.core.Event; import peernet.core.Node; import peernet.transport.Address; class Slice { // ----------------------------------------------------------------------- // Constants // ----------------------------------------------------------------------- //...
src/nova/peernet/core/queues/Slice.java
0.670716
0.45744
Slice.java
starcoder
package ru.job4j.iterator; import java.util.*; import java.util.function.Predicate; /** * <h2>ListIterator [#438880]</h2> * Практическое применение интерфейса * {@code ListIterator} и его {@code fail-safe} поведения. * * @author ViktorJava (<EMAIL>) * @version 0.1 * @since 10.02.2021 */ public class ListUtils...
chapter_001/src/main/java/ru/job4j/iterator/ListUtils.java
0.546496
0.424889
ListUtils.java
starcoder
package de.schildbach.pte; import de.schildbach.pte.dto.Point; /** * @author <NAME> */ public final class LocationUtils { public static float computeDistance(final Point p1, final Point p2) { return computeDistance(p1.getLatAsDouble(), p1.getLonAsDouble(), p2.getLatAsDouble(), p2.getLonAsDouble()); ...
src/main/java/de/schildbach/pte/LocationUtils.java
0.842004
0.530966
LocationUtils.java
starcoder
package seedu.address.model; import java.util.Arrays; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.value.ObservableBooleanValue; import seedu.address.model.battleship.Battleship; import seedu.address.model.battleship.Orientation; import seedu.ad...
src/main/java/seedu/address/model/MapGrid.java
0.936721
0.460289
MapGrid.java
starcoder
package com.opengamma.financial.model.option.pricing.analytic.formula; import org.apache.commons.lang.Validate; import com.opengamma.math.function.Function1D; import com.opengamma.math.statistics.distribution.NormalDistribution; import com.opengamma.math.statistics.distribution.ProbabilityDistribution; import com.ope...
projects/OG-Analytics/src/com/opengamma/financial/model/option/pricing/analytic/formula/BlackPriceFunction.java
0.86806
0.671572
BlackPriceFunction.java
starcoder
package uk.gov.companieshouse.web.accounts.transformer.profitandloss.impl; import java.util.Objects; import java.util.stream.Stream; import org.springframework.stereotype.Component; import uk.gov.companieshouse.api.model.accounts.profitandloss.ProfitAndLossApi; import uk.gov.companieshouse.web.accounts.model.profitand...
src/main/java/uk/gov/companieshouse/web/accounts/transformer/profitandloss/impl/ProfitOrLossForFinancialYearTransformer.java
0.832645
0.406155
ProfitOrLossForFinancialYearTransformer.java
starcoder
package org.modelcatalogue.crf.model; import java.util.Arrays; public enum ResponseType { /** * Text is a rectangular box to enter information. */ TEXT("text"), /** * Textarea is a larger box where more information is visible to the person viewing the form with data. */ TEXTAREA...
crf-builder-model/src/main/java/org/modelcatalogue/crf/model/ResponseType.java
0.832475
0.49109
ResponseType.java
starcoder
import javax.swing.*; import java.util.HashMap; import java.util.Map; import java.util.Scanner; /** * For the task a menu is required to manage the products with the options: update, delete, create, list and exit. * For the class with the main method we are going to have a menu to select the type of operation, it ca...
07-flow-control-structures/src/Task4.java
0.648021
0.441372
Task4.java
starcoder
package com.thomasdiewald.pixelflow.java.utils; import java.util.Locale; import processing.core.PMatrix3D; /** * * computes the bounding-sphere of a given list of points. * algorithm: bouncing bubble * * @author <NAME>, http://thomasdiewald.com/blog/ * * @date 02.09.2013 * */ public class DwBoundingS...
src/com/thomasdiewald/pixelflow/java/utils/DwBoundingSphere.java
0.580709
0.483222
DwBoundingSphere.java
starcoder
package com.baz.app.lc.hard; public class BestTimeToBuyAndSellStockIII { /** * Say you have an array for which the ith element is the price of a given stock on day i. * Design an algorithm to find the maximum profit. You may complete at most two transactions. * Note: You may not engage in multiple ...
src/main/java/com/baz/app/lc/hard/BestTimeToBuyAndSellStockIII.java
0.808181
0.760006
BestTimeToBuyAndSellStockIII.java
starcoder
package net.floodlightcontroller.multicastmachine; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.IntStream; public class FlexBytes implements Iterator<Byte>, Iterable<Byte> { ...
src/main/java/net/floodlightcontroller/multicastmachine/FlexBytes.java
0.685213
0.597314
FlexBytes.java
starcoder