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.querydsl.sql.spatial; import static oracle.spatial.geometry.JGeometry.*; import org.geolatte.geom.*; import org.geolatte.geom.Point; import org.geolatte.geom.crs.CrsId; import oracle.spatial.geometry.JGeometry; final class JGeometryConverter { // to jgeometry public static JGeometry convert(Ge...
querydsl-sql-spatial/src/main/java/com/querydsl/sql/spatial/JGeometryConverter.java
0.702836
0.616734
JGeometryConverter.java
starcoder
package map_set; import java.util.HashSet; import java.util.List; import java.util.Set; public class ReplaceWords { //TAG: Uber //TAG: HashMap //Difficulty: Medium /** * 648. Replace Words * In English, we have a concept called root, which can be followed by some other words to form anothe...
src/map_set/ReplaceWords.java
0.790894
0.40072
ReplaceWords.java
starcoder
* ----------------------------------------------------------------------- * * Revision History: * Date Name Description * ------ --------- ------------------------------------------------- * 08/2015 <NAME> Created * 01/2017 <NAME> Refactored to provide more generic functionality * * ...
core/src/main/java/org/tinfour/common/TriangleCount.java
0.923562
0.422803
TriangleCount.java
starcoder
package classifying; import java.io.IOException; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import clustering.Cluster; import clustering.Clusters; import clu...
src/main/java/classifying/KNN.java
0.749821
0.415788
KNN.java
starcoder
* finds the shortest path through (n x n) hexadecimal mazes and * returns the path step-by-step as a set of coordinates. */ // Status: working/tested import java.util.LinkedList; import java.util.Stack; public class BFS { private int n; private int size; private int[] maze; private...
Breadth-First-Search/BFS.java
0.702938
0.404272
BFS.java
starcoder
package net.gecosi.dataframe; import java.util.Arrays; import net.gecosi.internal.SiMessage; /** * @author <NAME> * @since Mar 11, 2013 * */ public class Si5DataFrame extends SiAbstractDataFrame { private static final int SI5_TIMED_PUNCHES = 30; public Si5DataFrame(SiMessage message) { this.dataFrame = ex...
GecoSI/src/net/gecosi/dataframe/Si5DataFrame.java
0.694717
0.401864
Si5DataFrame.java
starcoder
package gov.nist.microanalysis.roentgen.physics; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.text.ParseException; import java.util.Set; import java.util.TreeSet; import org.apache.commons.math3.analysis.UnivariateFuncti...
Roentgen/src/gov/nist/microanalysis/roentgen/physics/IonizationCrossSection.java
0.759404
0.440529
IonizationCrossSection.java
starcoder
package com.google.javascript.rhino.jstype; import com.google.common.collect.ImmutableList; import java.util.function.Function; import java.util.function.Predicate; /** * {@code Stream}-like functions for efficient querying of collections of {@code JSType}s. * * <p>These methods are designed to minimize allocation...
src/com/google/javascript/rhino/jstype/JSTypeIterations.java
0.900311
0.428532
JSTypeIterations.java
starcoder
package models; import utils.Orientation; public class DataPoint { private Double norting; private Double easting; private Double speed; private Orientation orientation; private Double bearing; private Long miliseconds; public DataPoint(){ } public DataPoint(Double norting, Double easting, Orientation...
practica1/src/models/DataPoint.java
0.713132
0.449936
DataPoint.java
starcoder
package persistent.array; import java.util.ArrayDeque; import java.util.Deque; import java.util.Iterator; import java.util.NoSuchElementException; import persistent.PList; import persistent.PStack; import persistent.helper.Rev; import persistent.util.PCollections; /** * Paper: "Leaf Trees", <NAME>., & <NAME>., 1996...
jellyfish/src/persistent/array/TreeList.java
0.906259
0.427875
TreeList.java
starcoder
* Date: 10/04/2015 * * Hacker rank * Cisco challenge * Problem: Joining Byte Blocks * Status: accepted / terminated due timeout * * * Problem * * As you are probably aware, the Internet protocols specify a canonical byte order * convention for data transmitted over the network called network byte order...
java/hackerrank/src/main/java/com/vaani/hackerrank/hackathon/cisco/JoiningByteBlocks_AugmentingPath.java
0.771757
0.574693
JoiningByteBlocks_AugmentingPath.java
starcoder
package jif.types; import jif.types.label.Label; import polyglot.types.ArrayType; import polyglot.types.ClassType; import polyglot.types.NullType; import polyglot.types.PrimitiveType; import polyglot.types.ReferenceType; import polyglot.types.Resolver; import polyglot.types.Type; import polyglot.types.TypeObject; impo...
lib/jif-3.5.0/src/jif/types/LabeledType_c.java
0.833121
0.404507
LabeledType_c.java
starcoder
package org.magenta; import java.util.Collection; import java.util.List; import java.util.Set; import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.reflect.TypeToken; public interface DataSet<D> extends DataSupplier<D>{ /** * return this dataset as an array....
src/main/java/org/magenta/DataSet.java
0.870817
0.522324
DataSet.java
starcoder
package uk.ac.cam.eeci.energyagents; import java.time.Duration; import java.time.ZonedDateTime; import java.util.Arrays; import java.util.HashSet; import java.util.Optional; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.function.Function; /** * A simple energy model of a dwell...
energy-agents/src/main/java/uk/ac/cam/eeci/energyagents/Dwelling.java
0.883154
0.699918
Dwelling.java
starcoder
package org.abs_models.backend.autodeploy; import java.io.PrintWriter; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.abs_models.frontend.ast.DataConstructorExp; import org.abs_models.frontend.ast.FnApp; import org.abs_models.f...
frontend/src/main/java/org/abs_models/backend/autodeploy/DeployInformationClass.java
0.618896
0.402275
DeployInformationClass.java
starcoder
package site.alex_xu.dev.frameworks.awaengine.scene; import site.alex_xu.dev.frameworks.awaengine.exceptions.DuplicateAttachingNodeException; import site.alex_xu.dev.frameworks.awaengine.graphics.Renderable; import site.alex_xu.dev.utils.Vec2D; import java.awt.*; import java.util.HashSet; public class Node extends R...
src/main/java/site/alex_xu/dev/frameworks/awaengine/scene/Node.java
0.87405
0.444806
Node.java
starcoder
package mondrian.util; import mondrian.olap.Util; import java.util.*; /** * Pair of values. * * <p>Because a pair implements {@link #equals(Object)}, {@link #hashCode()} and * {@link #compareTo(Pair)}, it can be used in any kind of * {@link java.util.Collection}. * * @author jhyde * @since Apr 19, 2007 */ p...
semantic-mdx/mdx-mondrian/src/main/java/mondrian/util/Pair.java
0.963678
0.456713
Pair.java
starcoder
package il.ac.bgu.cs.bp.bpjs.myAbp; import java.util.EnumSet; import java.util.LinkedList; import java.util.Queue; import java.util.Stack; public class AbpInfra { @Override public String toString() { return "AbpInfra{" + "t2r=" + t2r.toString() + ", r2t=" + r2t.toStrin...
src/main/java/il/ac/bgu/cs/bp/bpjs/myAbp/AbpInfra.java
0.859369
0.403626
AbpInfra.java
starcoder
package com.opengamma.analytics.financial.credit.isdastandardmodel; import java.util.Arrays; import org.apache.log4j.Logger; import org.threeten.bp.LocalDate; import com.opengamma.financial.convention.daycount.DayCount; import com.opengamma.financial.convention.daycount.DayCounts; import com.opengamma.util.ArgumentC...
projects/analytics/src/main/java/com/opengamma/analytics/financial/credit/isdastandardmodel/BondAnalytic.java
0.951346
0.694803
BondAnalytic.java
starcoder
package edu.ucsb.cs56.w15.drawings.dcoffill.advanced; import java.awt.geom.GeneralPath; // combinations of lines and curves import java.awt.geom.AffineTransform; // translation, rotation, scale import java.awt.Shape; // general class for shapes // all imports below this line needed if you are implementing Shape import...
src/edu/ucsb/cs56/w15/drawings/dcoffill/advanced/Laptop.java
0.742702
0.469946
Laptop.java
starcoder
package com.believeyourself.leetcode.coinChange; /** * 322. Coin Change * You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the...
src/main/java/com/believeyourself/leetcode/coinChange/CoinChange.java
0.706596
0.57943
CoinChange.java
starcoder
package processor; import java.util.*; import java.awt.Color; import java.awt.image.*; import javax.swing.*; public abstract class Kernel { public static BufferedImage copy(BufferedImage input) { int width, height, xCount, yCount; width = input.getWidth(); height = input.getHeight(); // Construct deep co...
src/processor/Kernel.java
0.669313
0.419529
Kernel.java
starcoder
package org.nlogo.extensions.numanal; import org.nlogo.api.LogoException; import org.nlogo.api.ExtensionException; import org.nlogo.api.Argument; import org.nlogo.core.Syntax; import org.nlogo.core.SyntaxJ; import org.nlogo.api.Context; import org.nlogo.api.Reporter; import org.nlogo.api.AnonymousReporter; import org....
src/Newton.java
0.749546
0.553083
Newton.java
starcoder
package com.opengamma.financial.analytics.model.fixedincome.deprecated; import java.util.Collections; import java.util.Set; import com.opengamma.engine.ComputationTarget; import com.opengamma.engine.ComputationTargetType; import com.opengamma.engine.function.FunctionCompilationContext; import com.opengamma.engine.val...
projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/fixedincome/deprecated/InterestRateInstrumentDefaultCurveNameFunctionDeprecated.java
0.81899
0.427098
InterestRateInstrumentDefaultCurveNameFunctionDeprecated.java
starcoder
package KillProcess_582; import java.util.*; /** * Given n processes, each process has a unique PID (process id) * and its PPID (parent process id). * * Each process only has one parent process, * but may have one or more children processes. * This is just like a tree structure. * Only one process has PPID tha...
leetcode/src/KillProcess_582/Solution.java
0.777933
0.412648
Solution.java
starcoder
public class Solution { public int[][] directions = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; public void wallsAndGates(int[][] rooms) { // 4:12 - 4:25 Queue<Point> q = new LinkedList(); if(rooms == null || rooms.length == 0) return; int m = rooms.length, n = rooms[0].length; f...
Walls_and_Gates.java
0.743075
0.502441
Walls_and_Gates.java
starcoder
package io.github.seleniumquery; import org.hamcrest.Matcher; /** * Functions used in the waitUntil(). * * @param <T> The type returned by the getter and TYPE OF THE ARGUMENT used in the end function. * * @author acdcjunior * @since 0.9.0 * * @deprecated Use {@link SeleniumQueryFluentFunctionEvaluateIf} inste...
src/main/java/io/github/seleniumquery/SeleniumQueryWaitEvaluateUntil.java
0.883192
0.52543
SeleniumQueryWaitEvaluateUntil.java
starcoder
package com.netopyr.reduxfx.examples.todo.state; import com.netopyr.reduxfx.examples.todo.updater.Updater; import com.netopyr.reduxfx.examples.todo.view.MainView; import io.vavr.collection.Array; import io.vavr.collection.Seq; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.bui...
examples/todomvc/src/main/java/com/netopyr/reduxfx/examples/todo/state/AppState.java
0.723993
0.470493
AppState.java
starcoder
import java.awt.image.*; /** * Provides an interface to a picture as an array of Pixels */ public class PixelImage { private BufferedImage myImage; private int width; private int height; /** * Map this PixelImage to a real image * * @param bi * The image */ public PixelIma...
PixelImage.java
0.781038
0.404419
PixelImage.java
starcoder
public class Tiles { private static final byte[] O = { 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0 }; private static final byte[][] I = { { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0 } }; private static final byte[][] S = { { 0, 0, 0, 0, 0, 0, 1, ...
j2me/Tetris/src/Tiles.java
0.563378
0.743727
Tiles.java
starcoder
package tatc.architecture.specifications; import com.google.gson.annotations.SerializedName; /** * Configuration options to filter the output of TAT-C based on ranges of parameters such as time bounds, lat/long regions, and mission performance. * Used by: AnalysisSettings */ public class OutputBounds { @Seria...
src/main/java/tatc/architecture/specifications/OutputBounds.java
0.897695
0.533823
OutputBounds.java
starcoder
package cm.xxx.minos.data.struct; import java.io.IOException; import java.util.Random; /** * Description: 平衡树 * Author: lishangmin * Created: 2018-08-20 17:55 */ public class AVLTree<E extends Comparable> { private class TreeNode<E> { E element; TreeNode left,right; int factor; ...
minos-security-demo/src/main/java/cm/xxx/minos/data/struct/AVLTree.java
0.747063
0.473718
AVLTree.java
starcoder
package de.charite.compbio.jannovar.data; import de.charite.compbio.jannovar.impl.intervals.IntervalArray; import de.charite.compbio.jannovar.reference.GenomeInterval; import de.charite.compbio.jannovar.reference.TranscriptModel; import java.io.Serializable; /** * This class encapsulates a chromosome and all of the...
jannovar-core/src/main/java/de/charite/compbio/jannovar/data/Chromosome.java
0.886408
0.47725
Chromosome.java
starcoder
package com.network.k.a; import java.util.HashSet; import java.util.Set; import java.util.regex.Pattern; public final class a { public static final int[] A = {1 << f158a.intValue(), 1 << b.intValue(), 1 << c.intValue(), 1 << d.intValue(), 1 << e.intValue(), 1 << f.intValue(), 1 << g.intValue(), 1 << h.intValue(),...
sample5/recompiled_java/sources/com/network/k/a/a.java
0.82755
0.426202
a.java
starcoder
package uk.ac.sussex.gdsc.smlm.ij.utils; import ij.process.ImageProcessor; import java.awt.Rectangle; import uk.ac.sussex.gdsc.core.annotation.Nullable; import uk.ac.sussex.gdsc.smlm.utils.ImageConverter; /** * Contains methods for converting an image to float data. Simple wrapper around * uk.ac.sussex.gdsc.smlm.ut...
src/main/java/uk/ac/sussex/gdsc/smlm/ij/utils/ImageJImageConverter.java
0.922203
0.575528
ImageJImageConverter.java
starcoder
package org.xSakix.particle.neural.particle; import cern.jet.random.Uniform; import java.util.Arrays; public class Node { double constriction; int inputs; double w[]; private double Pw[]; private double Gw[]; private double V[]; private double inertia; private double c1,c2; publi...
ETF_CURVE_FITTING/src/main/java/org/xSakix/particle/neural/particle/Node.java
0.614972
0.506408
Node.java
starcoder
package io.github.boredmathematician.datastructures; import javafx.util.Pair; import java.util.*; /** * A data structure which maintains it's values in a tabular form. * Each element in the Table is associated with a Row and a Column. * Table supports {@code null}s for values. * <p> * All Column headers are uni...
src/main/java/io/github/boredmathematician/datastructures/PairedHashMapTable.java
0.955277
0.548734
PairedHashMapTable.java
starcoder
import org.junit.Test; import java.util.ArrayList; import java.util.List; import static org.junit.Assert.*; public class BinaryTreeTest { @Test public void test() { BinaryTree<String> sampleTree1 = sampleTree1(); BinaryTree<String> sampleTree2 = sampleTree2(); BinaryTree<String> samp...
lab08/BinaryTreeTest.java
0.694095
0.509642
BinaryTreeTest.java
starcoder
package app.packed.micro; import static java.util.Objects.requireNonNull; import java.util.Optional; /** * A test stub class. * */ class Letters { public static final A A0 = new A(); public static final A A1 = new A(); public static final A A2 = new A(); public static final B B0 = new B(); p...
modules/packed-base-micro/src/main/java/app/packed/micro/Letters.java
0.853242
0.543227
Letters.java
starcoder
package com.opengamma.financial.analytics.model.sabrcube.defaultproperties; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.InitializingBean; import com.opengamma.analytics.math.interpolation.Interpolator1DFactory; import com.opengamma.engine.function.c...
projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/sabrcube/defaultproperties/DefaultPropertiesFunctions.java
0.85984
0.435121
DefaultPropertiesFunctions.java
starcoder
import edu.princeton.cs.algs4.StdOut; import edu.princeton.cs.algs4.StdRandom; import edu.princeton.cs.algs4.StdStats; public class PercolationStats { private static final double CONFIDENCE_95 = 1.96; private final int n; private final int t; private final double[] fractions; // perform independe...
percolationAssignment/PercolationStats.java
0.716814
0.428891
PercolationStats.java
starcoder
package me.gorgeousone.tangledmaze.tools; import me.gorgeousone.tangledmaze.PlayerHolder; import me.gorgeousone.tangledmaze.clip.Clip; import me.gorgeousone.tangledmaze.clip.ClipShape; import me.gorgeousone.tangledmaze.utils.BlockUtils; import me.gorgeousone.tangledmaze.utils.Vec2; import org.bukkit.Location; import o...
src/main/java/me/gorgeousone/tangledmaze/tools/ClipTool.java
0.783947
0.470858
ClipTool.java
starcoder
package io.github.zebalu.aoc2021; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.PriorityQueue; import java.util.Queue; import java.util.Set; public class Day15 { public static void main(String[] args) { ...
src/main/java/io/github/zebalu/aoc2021/Day15.java
0.815049
0.435661
Day15.java
starcoder
package cascading.flow.planner.iso.transformer; import java.util.HashSet; import java.util.Set; import cascading.flow.FlowElement; import cascading.flow.planner.Scope; import cascading.flow.planner.graph.ElementGraph; import cascading.flow.planner.graph.ElementGraphs; import cascading.flow.planner.iso.expression.Elem...
cascading-core/src/main/java/cascading/flow/planner/iso/transformer/InsertionGraphTransformer.java
0.882554
0.439507
InsertionGraphTransformer.java
starcoder
package com.dremio.common.map; import java.util.Map; import java.util.Set; import org.checkerframework.checker.nullness.qual.Nullable; import com.google.common.collect.BiMap; import com.google.common.collect.ImmutableBiMap; /** * A special type of {@link ImmutableBiMap} with {@link String}s as keys, and the case ...
common/src/main/java/com/dremio/common/map/CaseInsensitiveImmutableBiMap.java
0.944035
0.410697
CaseInsensitiveImmutableBiMap.java
starcoder
package org.usfirst.frc.team2084.CMonster2015.drive; import edu.wpi.first.wpilibj.CANTalon; /** * Wheel controller that uses a CANTalon with an attached quadrature encoder to * regulate speed. * * @author <NAME> */ public class CANTalonEncoderWheelController extends EncoderWheelController<CANTalon> { publi...
src/org/usfirst/frc/team2084/CMonster2015/drive/CANTalonEncoderWheelController.java
0.955672
0.469216
CANTalonEncoderWheelController.java
starcoder
package art.cutils.function; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; import static java.util.Objects.requireNonNull; import java.io.Serializable; import java.util.Objects; import java.util.function.Supplier; import org.javatuples.Pair; import org.jetbrains.annotations.Contract...
src/main/java/art/cutils/function/Idler.java
0.918813
0.467271
Idler.java
starcoder
package edu.umd.marbl.mhap.sketch; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import edu.umd.marbl.mhap.utils.MersenneTwisterFast; import edu.umd.marbl.mhap.utils.Pair; import edu.umd.marbl.mhap.utils.Sorta...
src/main/java/edu/umd/marbl/mhap/sketch/BitVectorIndex.java
0.595257
0.484136
BitVectorIndex.java
starcoder
package energy.usef.agr.dto; import energy.usef.agr.model.PowerData; import java.beans.Transient; import java.math.BigInteger; /** * DTO to convey information related to the profile part of a PowerContainerDto. */ public class PowerDataDto { private BigInteger uncontrolledLoad; private BigInteger potentia...
usef-build/usef-workflow/usef-agr/src/main/java/energy/usef/agr/dto/PowerDataDto.java
0.931603
0.510741
PowerDataDto.java
starcoder
import java.util.HashMap; /** * maxContingousArea */ public class maxContingousArea { private static boolean[][] isVisited; private static int m_row, m_col; private static int maxArea, m_currentArea; private static int currentRegion = 0; private static HashMap<Integer, Integer> mListMaxRegion =...
Java/maxContingousArea.java
0.589835
0.489259
maxContingousArea.java
starcoder
package com.mercateo.demo.functionaljava; import org.openjdk.jmh.annotations.Benchmark; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; @SuppressWarnings(...
src/main/java/com/mercateo/demo/functionaljava/JavaBenchmark.java
0.863435
0.487734
JavaBenchmark.java
starcoder
package edu.osu.nlp.chartparser; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.SortedSet; import java.util.TreeSet; /** * The data structure that stores hypotheses about spans of the input string. * * @author <NAME> */ public class Edg...
java/src/main/java/edu/osu/nlp/chartparser/Edge.java
0.912906
0.546315
Edge.java
starcoder
package com.thomasdiewald.pixelflow.java.imageprocessing.filter; import com.jogamp.opengl.GL2; import com.thomasdiewald.pixelflow.java.DwPixelFlow; import com.thomasdiewald.pixelflow.java.dwgl.DwGLSLProgram; import com.thomasdiewald.pixelflow.java.dwgl.DwGLTexture; import com.thomasdiewald.pixelflow.java.utils.DwUtils...
src/com/thomasdiewald/pixelflow/java/imageprocessing/filter/DistanceTransform.java
0.547948
0.433442
DistanceTransform.java
starcoder
package rapaio.ml.regression.simple; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import rapaio.core.stat.Quantiles; import rapaio.data.Frame; import rapaio.data.VarDouble; import rapaio.data.filter.var.VToDouble; import rapaio.datasets.Datasets; import rapaio.ml.regression.RPrediction; im...
tst/rapaio/ml/regression/simple/SimpleRegressionTest.java
0.801392
0.482368
SimpleRegressionTest.java
starcoder
package de.viadee.xai.anchor.algorithm.execution; import de.viadee.xai.anchor.algorithm.ClassificationFunction; import de.viadee.xai.anchor.algorithm.DataInstance; import de.viadee.xai.anchor.algorithm.PerturbationFunction; import de.viadee.xai.anchor.algorithm.execution.sampling.SamplingFunction; import org.slf4j.Log...
src/main/java/de/viadee/xai/anchor/algorithm/execution/ParallelSamplingService.java
0.84241
0.439627
ParallelSamplingService.java
starcoder
package storage.table.stats; import operator.QueryPlan; import storage.SchemaRecord; import storage.datatype.DataBox; import storage.table.RecordSchema; import java.util.ArrayList; import java.util.List; /** * A wrapper class to represent the statistics for a partition table. * Note that statistics are an estimate...
state-engine/src/main/java/storage/table/stats/TableStats.java
0.923855
0.519765
TableStats.java
starcoder
package gov.opm.scrd.entities.application; import gov.opm.scrd.entities.lookup.AppointmentType; import gov.opm.scrd.entities.lookup.PayType; import gov.opm.scrd.entities.lookup.PeriodType; import gov.opm.scrd.entities.lookup.RetirementType; import gov.opm.scrd.entities.lookup.ServiceType; import java.math.BigDecimal;...
Code/FACES/src/java/core/gov/opm/scrd/entities/application/ServicePeriod.java
0.715225
0.415254
ServicePeriod.java
starcoder
package com.gallantrealm.myworld.android.renderer; import com.gallantrealm.myworld.android.renderer.GLSurface; import com.gallantrealm.myworld.model.WWMesh; import com.gallantrealm.myworld.model.WWObject; /** * Creates a primitive with a complex surface shape composed from a two dimensional array of rectangle...
src/com/gallantrealm/myworld/android/renderer/GLMesh.java
0.733547
0.482246
GLMesh.java
starcoder
package gov.nasa.worldwind.util.combine; /** * Interface for shapes that can be combined into a complex set of contours by using boolean operations. Combinable * shapes implement the single method combine(CombineContext). This method is typically called by a controller that * operates on one or more combinable shap...
src/gov/nasa/worldwind/util/combine/Combinable.java
0.939734
0.661738
Combinable.java
starcoder
package tv.floe.metronome.deeplearning.neuralnetwork.gradient; import java.io.DataInput; import java.io.DataInputStream; import java.io.DataOutput; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.OutputStream; import java.io.Seri...
src/main/java/tv/floe/metronome/deeplearning/neuralnetwork/gradient/NeuralNetworkGradient.java
0.854703
0.430327
NeuralNetworkGradient.java
starcoder
package org.jdraft.diff; import java.util.*; import com.github.javaparser.ast.NodeList; import com.github.javaparser.ast.expr.Expression; import org.jdraft.*; import static org.jdraft.diff.Feature.*; import org.jdraft.diff._diff.*; /** * * @author Eric */ public final class _enumDiff implements _differ<_enum, _...
src/main/java/org/jdraft/diff/_enumDiff.java
0.890431
0.581422
_enumDiff.java
starcoder
package io.lambdadepot.function; import io.lambdadepot.util.Result; import java.util.Objects; import java.util.function.Function; /** * Represents a function that accepts one argument and produces a result. * * <p>This is a <a href="package-summary.html">functional interface</a> * whose functional method is {@li...
src/main/java/io/lambdadepot/function/Function1.java
0.903774
0.625581
Function1.java
starcoder
package com.heatonresearch.aifh.dbnn; /** * Unsupervised training for DBNN's. This class trains a single layer at a time. */ public class UnsupervisedTrainDBN { /** * The network being trained. */ private final DeepBeliefNetwork network; /** * The level bring trained. */ private...
vol3/vol3-java-examples/src/main/java/com/heatonresearch/aifh/dbnn/UnsupervisedTrainDBN.java
0.93456
0.547222
UnsupervisedTrainDBN.java
starcoder
package com.google.android.gms.maps.model; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zzb; public class zza implements Creator<CameraPosition> { static void zza(CameraPosition cameraPosition, Parcel parcel, int i) { int zzav = z...
delivery/app-release_source_from_JADX/com/google/android/gms/maps/model/zza.java
0.732783
0.404919
zza.java
starcoder
package tic_tac_toe; import java.util.*; public class AI { private boolean winnable; /** * evaluate the weight of a cell (a potential placement) * * @param placement The placement array * @param i row number * @param j column number * @param who Indicate wh...
src/tic_tac_toe/AI.java
0.763396
0.410284
AI.java
starcoder
package expression; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; /** * @author <NAME> (<EMAIL>) */ public class Util { public static final Random RNG = new Random(61L); // Utility class private Util() {} private static int checks; pu...
Exception/src/expression/Util.java
0.825167
0.483405
Util.java
starcoder
package eu.atmosphere.tmaf.probe.util; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; /** * * @author <NAME> <<EMAIL>> */ public class Measurement { private final AtomicLong measurementIdSerial = new Ato...
development/probes/probe-client-java/src/main/java/eu/atmosphere/tmaf/probe/util/Measurement.java
0.946535
0.476214
Measurement.java
starcoder
package com.jack.leetcode.easy; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import org.junit.Test; /** Description Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Input: 3 / ...
algorithms/java/E637_EverageOfLevelsInBinaryTree.java
0.798069
0.53437
E637_EverageOfLevelsInBinaryTree.java
starcoder
package hitool.core.lang3.math.logic; import java.math.BigDecimal; /* * 由于Java的简单类型不能够精确的对浮点数进行运算,这个工具类提供精确的浮点数运算,包括加减乘除和四舍五入。 */ public class DoubleArith { // 默认除法运算精度 private static final int DEF_DIV_SCALE = 2; // 这个类不能实例化 private DoubleArith() {} /* * 功能介绍:提供精确的加法运算。 * @param v1被加数 * @param v2加数 *...
hitool-core/src/main/java/hitool/core/lang3/math/logic/DoubleArith.java
0.564819
0.413359
DoubleArith.java
starcoder
package org.bouncycastle.pqc.crypto.qtesla; class Polynomial { /** * Size of A Random Number (in Byte) */ public static final int RANDOM = 32; /** * Size of A Seed (in Byte) */ public static final int SEED = 32; /** * Size of Hash Value C (in Byte) in the Signature Packa...
core/src/main/java/org/bouncycastle/pqc/crypto/qtesla/Polynomial.java
0.87183
0.502869
Polynomial.java
starcoder
package roadgraph; import geography.GeographicPoint; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** * @author Prithvi * <p> * A class which represents a geographic point as a vertex * It also captures list of out edges from this vertex * The geographic point represents an inter...
src/roadgraph/MapVertex.java
0.944562
0.564999
MapVertex.java
starcoder
import org.junit.Assert; import org.junit.Test; public class ValueConverterTest { @Test public void testTemperature() { short testValue = 680; double expectedValue = 20; Assert.assertEquals("raw temperature to readable values", ValueConverter.temperature(testValue), expectedValue, ...
Tests/ValueConverterTest.java
0.888193
0.854035
ValueConverterTest.java
starcoder
package com.orsoncharts.graphics3d; import java.awt.Color; import java.awt.Dimension; import java.awt.geom.Dimension2D; import java.awt.geom.Point2D; import java.io.Serializable; /** * Specifies the location and orientation of the view point in 3D space. * Assumes the eye looks towards the origin in world coordin...
orson-charts-1.7/src/main/java/com/orsoncharts/graphics3d/ViewPoint3D.java
0.95321
0.620794
ViewPoint3D.java
starcoder
package seedu.deliverymans.model.restaurant; import static java.util.Objects.requireNonNull; import java.util.Objects; /** * Represents a Rating */ public class Rating { public static final String MESSAGE_CONSTRAINTS = "Rating should be an integer from 0 to 5"; public static final String VALID...
src/main/java/seedu/deliverymans/model/restaurant/Rating.java
0.929192
0.443118
Rating.java
starcoder
package com.github.dbmdz.pathfinder; import static java.util.Objects.requireNonNull; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.Optional; import ...
pathfinder/src/main/java/com/github/dbmdz/pathfinder/Pathfinder.java
0.925255
0.441733
Pathfinder.java
starcoder
package frc.robot.utilityClasses; import org.ejml.simple.SimpleMatrix; import java.util.List; public class CircleFitter { static List<VisionPoint> circlePoints; static double radius = 0; static double[] computerSums = new double[8]; static double totalX; static double totalY; static double to...
src/main/java/frc/robot/utilityClasses/CircleFitter.java
0.772445
0.416263
CircleFitter.java
starcoder
package io.github.kvverti.animation.format.sampler; import io.github.kvverti.animation.format.KeyframeList; /** * Samplers control interpolation over a list of keyframes */ public abstract class Sampler { /** * Keyframes. */ private final KeyframeList keyframes; /** * Number of elements...
src/main/java/io/github/kvverti/animation/format/sampler/Sampler.java
0.941115
0.564999
Sampler.java
starcoder
package com.google.zxing.qrcode.decoder; // compiled from: DataMask.java abstract class c { private static final c[] a; // compiled from: DataMask.java private static final class a extends c { private a() { super(); } final boolean a(int i, int i2) { return...
dex_src/com/google/zxing/qrcode/decoder/c.java
0.888541
0.580114
c.java
starcoder
package org.apache.spark; public class Partitioner$ implements scala.Serializable { /** * Static reference to the singleton instance of this Scala object. */ public static final Partitioner$ MODULE$ = null; public Partitioner$ () { throw new RuntimeException(); } /** * Choose a partitioner to use f...
core/target/java/org/apache/spark/Partitioner$.java
0.893623
0.4231
Partitioner$.java
starcoder
package models; import java.io.Serializable; import java.util.Objects; public class Date implements Serializable, Comparable<Date> { private int year; private int month; private int day; private boolean isLeapYear = false; public Date() {} public Date(int year, int month, int day) { ...
app/models/Date.java
0.794066
0.423279
Date.java
starcoder
package edu.usfca.cs272; import java.util.Arrays; import java.util.function.IntPredicate; import java.util.stream.IntStream; /** * Project Euler Problem 1 is stated as follows: * * <blockquote> If we list all the natural numbers below 10 that are multiples * of 3 or 5, we get 3, 5, 6 and 9. The sum of these multi...
StreamPipelines/src/main/java/edu/usfca/cs272/Problem1Revisited.java
0.836655
0.469581
Problem1Revisited.java
starcoder
package com.esferixis.gameengine.physics.plane.kinematics.mapper; import java.io.Serializable; import com.esferixis.gameengine.physics.plane.kinematics.mapper.rotation.Rotation; import com.esferixis.gameengine.physics.plane.kinematics.mapper.rotation.RotationPlaneKinematicMapper; import com.esferixis.gameengine.physi...
MasterProject/src/com/esferixis/gameengine/physics/plane/kinematics/mapper/PlaneKinematicMapper.java
0.833528
0.433622
PlaneKinematicMapper.java
starcoder
package tech.pegasys.artemis.datastructures.state; import com.google.common.primitives.UnsignedLong; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; impor...
ethereum/datastructures/src/main/java/tech/pegasys/artemis/datastructures/state/BeaconStateWithCache.java
0.710628
0.408749
BeaconStateWithCache.java
starcoder
package com.flowpowered.math.matrix; import java.io.Serializable; import java.util.Arrays; import com.flowpowered.math.GenericMath; import com.flowpowered.math.TrigMath; import com.flowpowered.math.imaginary.Complexd; import com.flowpowered.math.imaginary.Quaterniond; import com.flowpowered.math.vector.Vector3d; impo...
target/generated-sources/template/com/flowpowered/math/matrix/MatrixNd.java
0.93075
0.625552
MatrixNd.java
starcoder
package com.ibm.asyncutil.util; import java.util.Objects; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.CompletionStage; import java.util.concurrent.Executor; import java.util.function.BiConsumer; import java.util.function.BiFunction; import...
asyncutil/src/main/java/com/ibm/asyncutil/util/CompletedStage.java
0.926183
0.468243
CompletedStage.java
starcoder
package cz.cvut.fel.pjv.maps; import cz.cvut.fel.pjv.blocks.BlockType; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * Cave represents an empty area under the surface of the world. It is defined a List of Vectors. * An enemy NPC spawns in each cave at the start of the game. *...
src/main/java/cz/cvut/fel/pjv/maps/Cave.java
0.90557
0.644337
Cave.java
starcoder
package be.wmeeus.symmath.expression; import java.util.*; import be.wmeeus.symmath.util.Mexception; /** * Class Mexpression contains a mathematical expression * @author <NAME> * */ public class Mexpression extends Mnode { /** * Math operator */ String op; /** * Arguments */ ArrayList<Mnode> args = ...
src/be/wmeeus/symmath/expression/Mexpression.java
0.781247
0.547646
Mexpression.java
starcoder
package algolib.graphs; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.stream.Stream; class GraphRepresentation<VertexId, VertexProperty, EdgeProperty> { private final Map<Vertex<VertexId>, Set<Edge<VertexId>>> graphMap...
src/algolib/graphs/GraphRepresentation.java
0.909428
0.47792
GraphRepresentation.java
starcoder
package us.ihmc.euclid.shape.convexPolytope; import java.util.Collection; import us.ihmc.euclid.geometry.BoundingBox3D; import us.ihmc.euclid.shape.convexPolytope.impl.AbstractFace3D; import us.ihmc.euclid.tuple3D.Point3D; import us.ihmc.euclid.tuple3D.Vector3D; import us.ihmc.euclid.tuple3D.interfaces.Vector3DReadOn...
src/shape/java/us/ihmc/euclid/shape/convexPolytope/Face3D.java
0.948644
0.61422
Face3D.java
starcoder
package de.quantummaid.mapmaid.builder.resolving.disambiguator.normal; import de.quantummaid.mapmaid.builder.detection.serializedobject.SerializationFieldInstantiation; import de.quantummaid.mapmaid.builder.detection.serializedobject.SerializationFieldOptions; import de.quantummaid.mapmaid.builder.resolving.disambigua...
core/src/main/java/de/quantummaid/mapmaid/builder/resolving/disambiguator/normal/NormalDisambiguator.java
0.722233
0.428712
NormalDisambiguator.java
starcoder
package leetcode.binarysearch; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /* https://leetcode.com/problems/find-k-closest-elements/ Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending order. If there ...
src/leetcode/binarysearch/LT658_Find_Kth_Closest.java
0.824462
0.601272
LT658_Find_Kth_Closest.java
starcoder
package com.antigenomics.alisa.algebra.tensor; import com.antigenomics.alisa.algebra.IndexedValue; public final class IndexedTensorValue implements IndexedValue<IndexedTensorValue> { private final int rowIndex, columnIndex, firstCategoryIndex, secondCategoryIndex; private final double valu...
src/main/java/com/antigenomics/alisa/algebra/tensor/IndexedTensorValue.java
0.913522
0.467575
IndexedTensorValue.java
starcoder
package bio.singa.features.quantities; import bio.singa.features.units.UnitRegistry; import tech.units.indriya.AbstractQuantity; import tech.units.indriya.ComparableQuantity; import tech.units.indriya.quantity.Quantities; import tech.units.indriya.unit.ProductUnit; import javax.measure.Quantity; import javax.measure....
singa-features/src/main/java/bio/singa/features/quantities/MolarConcentration.java
0.874292
0.408985
MolarConcentration.java
starcoder
package com.opengamma.analytics.math.statistics.distribution; import java.util.Date; import org.apache.commons.lang.Validate; import cern.jet.random.Normal; import cern.jet.random.engine.MersenneTwister64; import cern.jet.random.engine.RandomEngine; import cern.jet.stat.Probability; import com.opengamma.analytics.m...
src/com/opengamma/analytics/math/statistics/distribution/NormalDistribution.java
0.867514
0.844537
NormalDistribution.java
starcoder
package org.enricogiurin.codingchallenges.leetcode.easy; import java.util.PriorityQueue; /* Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element. Your KthLargest class will have a constructor which accepts an integer k ...
src/main/java/org/enricogiurin/codingchallenges/leetcode/easy/KthLargest.java
0.837985
0.400515
KthLargest.java
starcoder
package stonering.entity; import com.badlogic.gdx.math.Vector2; import stonering.util.geometry.Position; import java.util.ArrayList; import java.util.List; /** * Side of a {@link TectonicPlate}. * * @author <NAME> on 22.02.2017. */ public class Edge { private Position point1; private Position point2; ...
core/src/stonering/entity/Edge.java
0.936742
0.558989
Edge.java
starcoder
package com.flipkart.flux.examples.benchmark; import com.flipkart.flux.client.model.Task; public class ArithmeticOperationsExtended { @Task(version = 1,retries = 3,timeout = 1000000) public EventTypeInteger addE(EventTypeInteger a , EventTypeInteger b){ return new EventTypeInteger(a.getValue()+b.get...
examples/src/main/java/com/flipkart/flux/examples/benchmark/ArithmeticOperationsExtended.java
0.644449
0.519095
ArithmeticOperationsExtended.java
starcoder
package org.sablecc.objectmacro.codegeneration.intermediate.macro; import java.util.*; public class MMacro { private final String pName; private final String pIsPublic; private final String pSelfRef; private final MMacro mMacro = this; private final List<Object> eParam = new LinkedList<Objec...
src/org/sablecc/objectmacro/codegeneration/intermediate/macro/MMacro.java
0.758242
0.493592
MMacro.java
starcoder
package io.improbable.keanu.vertices.dbl.probabilistic; import io.improbable.keanu.distributions.continuous.InverseGamma; import io.improbable.keanu.tensor.TensorShape; import io.improbable.keanu.tensor.dbl.DoubleTensor; import io.improbable.keanu.vertices.dbl.DoubleVertex; import io.improbable.keanu.vertices.dbl.Kean...
keanu-project/src/main/java/io/improbable/keanu/vertices/dbl/probabilistic/InverseGammaVertex.java
0.950801
0.800497
InverseGammaVertex.java
starcoder
package frozenbubble.net.library.jiga; import java.awt.Image; import java.awt.MediaTracker; import java.awt.image.PixelGrabber; import java.awt.image.MemoryImageSource; /** * An extention of <code>java.awt.Image</code> that allow features implemented in java 1.2+ (AffineTransform). * This class mainly include image...
Project/Java App (2017)/Sources/src/frozenbubble/net/library/jiga/EffectImage.java
0.850127
0.507324
EffectImage.java
starcoder