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.owera.xaps.dbi.report; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; public class Key implements Comparable<Key> { public static SimpleDateFormat MONTH_FORMAT = new SimpleDateFormat("yyyyMM"); public static SimpleDateFormat DAY_FORMAT = new...
src/com/owera/xaps/dbi/report/Key.java
0.658308
0.475362
Key.java
starcoder
package com.terraforged.core.cell; import com.terraforged.core.util.concurrent.ObjectPool; import com.terraforged.core.world.biome.BiomeType; import com.terraforged.core.world.terrain.Terrain; import me.dags.noise.util.NoiseUtil; public class Cell<T extends Tag> { private static final Cell EMPTY = new Cell() { ...
TerraForgedCore/src/main/java/com/terraforged/core/cell/Cell.java
0.894844
0.427695
Cell.java
starcoder
package ug.co.sampletracker.app.models; import com.orm.SugarRecord; import java.util.ArrayList; import java.util.List; public class TableRegionalPrices extends SugarRecord { private String regionCode = ""; private String regionName = ""; private String productName = ""; private String productPrice =...
Mobile App Source Code/app/src/main/java/ug/co/sampletracker/app/models/TableRegionalPrices.java
0.522446
0.42931
TableRegionalPrices.java
starcoder
package org.jenkinsci.plugins.workflow.multibranch.template.finder; /** * Finds a key's value from a string in many config formats (e.g. properties, yaml, json) */ public class ConfigurationValueFinder { private ConfigurationValueFinder() {} /** * This method will find the <b>first</b> given {@code ke...
src/main/java/org/jenkinsci/plugins/workflow/multibranch/template/finder/ConfigurationValueFinder.java
0.891687
0.418519
ConfigurationValueFinder.java
starcoder
package org.springframework.xd.shell.util; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; /** * Provide a basic concept of a table structure containing a map of column headers and a collection of rows. Used to * render text-based tables (console output). * * @s...
spring-xd-shell/src/main/java/org/springframework/xd/shell/util/Table.java
0.855444
0.423696
Table.java
starcoder
package randoop; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; import randoop.types.Type; import randoop.util.CheckpointingMultiMap; import randoop.util.CheckpointingSet; import randoop.util.IMultiMap; import randoop.util.ISimpleSet; import randoop.util.MultiMap; import randoop.ut...
randoop/src/main/java/randoop/SubTypeSet.java
0.803945
0.400808
SubTypeSet.java
starcoder
package ai.seventhsense.facedetection; import android.graphics.Bitmap; import android.graphics.Point; /** * Class representing a single face detection */ public class Detection { /** * Left x1 of the bounding box containing the face */ public int left; /** * Top y1 of the bounding box co...
app/src/main/java/ai/seventhsense/facedetection/Detection.java
0.882225
0.491456
Detection.java
starcoder
package com.cooldb.buffer; /** * BufferPool maintains a pool of PageBuffers that may be mapped onto physical * locations in the file system. A PageBuffer can be associated with a FilePage * through one of several 'pin' methods, which have corresponding 'unPin' * methods. A page may be pinned in one of two modes: S...
src/main/java/com/cooldb/buffer/BufferPool.java
0.819605
0.417153
BufferPool.java
starcoder
package org.eclipse.jgit.lib; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Time...
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java
0.722135
0.454714
ThreadSafeProgressMonitorTest.java
starcoder
package com.haaivda.gchess_tutorial.engine.board; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class BoardUtils { public static final boolean[] FIRST_COLUMN = initColumn(0); public static final boolean[] SECOND_COLUMN = initColumn(1); public static final boolean[] S...
_OLD/java/src/com/haaivda/gchess_tutorial/engine/board/BoardUtils.java
0.789153
0.433502
BoardUtils.java
starcoder
package org.firstinspires.ftc.teamcode.pathgen; import org.firstinspires.ftc.teamcode.utility.RotationUtil; import org.firstinspires.ftc.teamcode.utility.point; import static java.lang.Math.*; public class PathPoint extends point { PathPoint prev; PathPoint next; //control points do not move boolea...
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/pathgen/PathPoint.java
0.593727
0.45181
PathPoint.java
starcoder
package com.twu.biblioteca; import org.junit.AfterClass; import org.junit.Before; import org.junit.Test; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; import static org.hamcrest.core.Is.is; import ...
test/com/twu/biblioteca/FileIOTest.java
0.695855
0.404125
FileIOTest.java
starcoder
package com.facebook.buck.util.filesystem; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import com....
test/com/facebook/buck/util/filesystem/FileSystemMapTest.java
0.730963
0.582669
FileSystemMapTest.java
starcoder
package com.jogamp.nativewindow.util; /** * Mutable insets representing rectangular window decoration insets on all four edges * in window units. */ public class Insets implements Cloneable, InsetsImmutable { static final InsetsImmutable zeroInsets = new Insets(); public static final InsetsImmutable getZero...
JOGL/jogl-java-src/com/jogamp/nativewindow/util/Insets.java
0.929136
0.452838
Insets.java
starcoder
package model; import inference.State; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Random; import java.util.TreeMap; import java.util.Vector; import utils.MersenneTwister; import config.Parameters; import data.Data; import data.Instance; impo...
src/jp/tti_coin/main/java/model/DCDSSVMModel.java
0.520253
0.475849
DCDSSVMModel.java
starcoder
package pulse.io.export; import static java.io.File.separator; import static java.util.Arrays.asList; import static pulse.io.export.Exporter.getDefaultExportExtension; import static pulse.util.Group.contents; import static pulse.util.Reflexive.instancesOf; import java.io.File; import java.util.Objects; import javax....
src/main/java/pulse/io/export/ExportManager.java
0.925057
0.498657
ExportManager.java
starcoder
package maspack.spatialmotion.projections; import maspack.matrix.ImproperSizeException; import maspack.matrix.Point2d; import maspack.matrix.VectorNd; public class RectangularBoundary implements BoundaryCurve2D { VectorNd myParams; double EPSILON = 1e-14; public RectangularBoundary(VectorNd params) { ...
src/maspack/spatialmotion/projections/RectangularBoundary.java
0.611382
0.454291
RectangularBoundary.java
starcoder
import java.util.Arrays; import java.util.Comparator; import edu.princeton.cs.algs4.StdDraw; public class Point implements Comparable<Point> { private final int x; // x-coordinate of this point private final int y; // y-coordinate of this point // Initialize a new point public Point(int x, int y) { ...
Algorithms/Part I/Week 3/Solutions/Collinear Points/Point.java
0.910689
0.455259
Point.java
starcoder
package ssbit.glwzz.aimgproc; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Color; import android.util.Log; import java.util.Arrays; public class Algorithm { private static int[] px; public static boolean getQuality(OnePic pic) { /*true表示高质量,false表示低...
app/src/main/java/ssbit/glwzz/aimgproc/Algorithm.java
0.599602
0.421671
Algorithm.java
starcoder
package com.hhupark.util; import org.bytedeco.javacpp.BytePointer; /** * There are 3 kinds of convert functions: * 1. [float|double|int|long] to[Float|Double|Int|Long](BytePointer pointer) * 2. byte[] getBytes([float|double|int|long] value) * 3. [float|double|int|long] to[Float|Double|Int|Long](byte[] value) * ...
src/com/hhupark/util/Convert.java
0.857932
0.584508
Convert.java
starcoder
package com.datastax.driver.core; import java.nio.ByteBuffer; import java.util.List; import org.apache.cassandra.utils.MD5Digest; import org.apache.cassandra.transport.messages.ResultMessage; import com.datastax.driver.core.exceptions.DriverInternalError; /** * Represents a prepared statement, a query with bound v...
driver-core/src/main/java/com/datastax/driver/core/PreparedStatement.java
0.932103
0.415788
PreparedStatement.java
starcoder
package gulava; import gulava.testing.LogicAsserter; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import java.util.Arrays; @RunWith(JUnit4.class) public class OrderTest { private static final Var X = new Var(); private static final Var Y = new ...
javatests/gulava/OrderTest.java
0.613815
0.416915
OrderTest.java
starcoder
package jama2; import java.io.Serializable; import java.util.Arrays; import java.util.function.DoubleBinaryOperator; import java.util.function.DoubleUnaryOperator; import java.util.function.IntToDoubleFunction; /** * This class represents a diagonal matrix of a fixed square size. * * @author <NAME> * */ public c...
src/main/java/jama2/DiagonalMatrix.java
0.957457
0.696243
DiagonalMatrix.java
starcoder
package org.pegjs.java; import java.io.Serializable; /** * Класс для хранения информации о текущей позиции в разбираемых данных. * Используется генерируемым кодом парсера для хранения информации о текущем * месте разбора. Также содержит методы для разбора листовых правил - литералов * и шаблонов, а также любого с...
java/pegjs-java-core/src/org/pegjs/java/Position.java
0.577495
0.406921
Position.java
starcoder
package org.primefaces.model.charts.axes.cartesian.linear; import java.io.IOException; import org.primefaces.model.charts.axes.cartesian.CartesianTicks; import org.primefaces.util.ChartUtils; import org.primefaces.util.FastStringWriter; /** * Used to provide cartesian linear ticks. CartesianLinearTicks extends {@li...
src/main/java/org/primefaces/model/charts/axes/cartesian/linear/CartesianLinearTicks.java
0.957971
0.519095
CartesianLinearTicks.java
starcoder
package com.own.sort; /** * @author raihan on 1/05/2020 * Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first * find the maximum element and place the maximum element at the end. We repeat the same process for remaining element. * S...
sorting/HeapSort.java
0.736116
0.630486
HeapSort.java
starcoder
package org.anchoranalysis.plugin.image.bean.histogram.threshold; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.anchoranalysis.bean.annotation.BeanField; import org.anchoranalysis.core.exception.OperationFailed...
anchor-plugin-image/src/main/java/org/anchoranalysis/plugin/image/bean/histogram/threshold/OtsuWeighted.java
0.896521
0.407717
OtsuWeighted.java
starcoder
import java.util.*; public class HelperClass{ public static ArrayList<Integer> padLeadingZeros(ArrayList<Integer> a, int newLength){ if(a.size() == newLength) return a; ArrayList<Integer> result = new ArrayList<Integer>(a); int numZeros = newLength - result.size(); result.addAll(0, ...
01-ADT/implementation/HelperClass.java
0.500488
0.493042
HelperClass.java
starcoder
package jxtras.regex; import java.util.Iterator; /** * <p>The {@code CaptureCollection} object is immutable (read-only) and has no public constructor. * The {@code CaptureCollection} object contains one or more {@link Capture} objects.</p> * * <p>Instances of the {@code CaptureCollection} class are returned by th...
src/main/java/jxtras/regex/CaptureCollection.java
0.947563
0.583114
CaptureCollection.java
starcoder
package nl.xillio.xill.plugins.string.constructs; import nl.xillio.xill.api.components.MetaExpression; import nl.xillio.xill.api.construct.Argument; import nl.xillio.xill.api.construct.Construct; import nl.xillio.xill.api.construct.ConstructContext; import nl.xillio.xill.api.construct.ConstructProcessor; /** * * Re...
xill-processor/src/main/java/nl/xillio/xill/plugins/string/constructs/WordDistanceConstruct.java
0.901414
0.437283
WordDistanceConstruct.java
starcoder
package com.ycourlee.tranquil.web.domain; import java.util.HashMap; import java.util.Map; import java.util.UUID; /** * Return data Map. * @author yongjiang */ public class RtMap extends HashMap<String, Object> { public static final String TIMESTAMP = "timestamp"; public static final Strin...
tranquil-components/tranquil-web/src/main/java/com/ycourlee/tranquil/web/domain/RtMap.java
0.874533
0.408159
RtMap.java
starcoder
package us.ihmc.quadrupedRobotics.controller.position; import us.ihmc.quadrupedRobotics.controller.ControllerEvent; import us.ihmc.quadrupedRobotics.controller.QuadrupedController; import us.ihmc.quadrupedRobotics.controller.QuadrupedControllerManager; import us.ihmc.quadrupedRobotics.controller.position.states.Quadru...
IHMCQuadrupedRobotics/src/us/ihmc/quadrupedRobotics/controller/position/QuadrupedPositionControllerManager.java
0.787441
0.410402
QuadrupedPositionControllerManager.java
starcoder
package oracle.kv.impl.security.util; import java.util.Random; /** * A Bloom filter implementation reused from * {@link com.sleepycat.je.tree.BINDeltaBloomFilter}, whose JE logging methods * have been tailored here. As indicated in original doc, both space and * computation times are minimized in this implementat...
kv-3.5.2/src/oracle/kv/impl/security/util/BloomFilter.java
0.877608
0.536556
BloomFilter.java
starcoder
package burlap.oomdp.core.values; import java.util.Collection; import java.util.Set; import burlap.oomdp.core.Attribute; /** * A discrete value subclass in which discrete values are stored as int values. The int values correspond to the attributes * categorical list of discrete values, so the int values should al...
Assignment4/BURLAP/src/burlap/oomdp/core/values/DiscreteValue.java
0.863651
0.414425
DiscreteValue.java
starcoder
package pl.allegro.tech.opel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.CompletableFuture; class EqualOperatorExpressionNode extends BinaryOperationExpressionNode { private static final Logger logger = LoggerFactory.getLogger(EqualOperatorExpressionNode.class); pri...
src/main/java/pl/allegro/tech/opel/EqualOperatorExpressionNode.java
0.905604
0.411406
EqualOperatorExpressionNode.java
starcoder
package com.google.devtools.build.zip; import java.util.Arrays; /** * A holder class for extra data in a ZIP entry. */ public final class ExtraData { static final int ID_OFFSET = 0; static final int LENGTH_OFFSET = 2; static final int FIXED_DATA_SIZE = 4; private final int index; private final byte[] bu...
src/java_tools/singlejar/java/com/google/devtools/build/zip/ExtraData.java
0.844665
0.441974
ExtraData.java
starcoder
package model.neighborhoods.concrete; import controller.State; import controller.stateType.WaTorWorldState; import java.util.List; import java.util.Map; import model.ModelException; import model.NeighborPolicy; import model.Neighborhood; import model.neighborhoods.InfluentialNeighborhood; /*** * Neighborhood for WaT...
src/model/neighborhoods/concrete/WaTorWorldNeighborhood.java
0.675872
0.439567
WaTorWorldNeighborhood.java
starcoder
package net.sf.gogui.go; import java.util.Locale; import net.sf.gogui.util.StringUtil; /** Intersection on the Go board. This class is immutable and references to the same point are unique. Instances can be created with GoPoint.get(). Point coordinates start with 0, the point (0,0) corresponds to "A1" ...
game/src/main/java/net/sf/gogui/go/GoPoint.java
0.886887
0.648772
GoPoint.java
starcoder
package com.gemsrobotics.util.joy; import java.util.function.Supplier; import edu.wpi.first.wpilibj.GenericHID; import edu.wpi.first.wpilibj.buttons.Button; import edu.wpi.first.wpilibj.buttons.JoystickButton; import edu.wpi.first.wpilibj.command.Command; import com.gemsrobotics.util.command.Commands; import static ...
src/main/java/com/gemsrobotics/util/joy/Gembutton.java
0.853715
0.405861
Gembutton.java
starcoder
package de.fh.rosenheim.aline.model.dtos.seminar; import de.fh.rosenheim.aline.model.domain.Seminar; import de.fh.rosenheim.aline.util.SeminarUtil; /** * Generates and transforms all Seminar models & DTOs */ public class SeminarFactory { /** * Generates a SeminarDTO for the given seminar * * @re...
codebase/aline-server/src/main/java/de/fh/rosenheim/aline/model/dtos/seminar/SeminarFactory.java
0.809916
0.493592
SeminarFactory.java
starcoder
package hivemall.utils.geospatial; import static hivemall.utils.math.MathUtils.sec; import static java.lang.Math.PI; import static java.lang.Math.atan; import static java.lang.Math.atan2; import static java.lang.Math.cos; import static java.lang.Math.floor; import static java.lang.Math.log; import static java.lang.Mat...
core/src/main/java/hivemall/utils/geospatial/GeoSpatialUtils.java
0.881653
0.578567
GeoSpatialUtils.java
starcoder
package com.github.thorbenkuck.netcom2.interfaces; import com.github.thorbenkuck.netcom2.utility.NetCom2Utils; /** * This interface is created equally to the {@link java.util.function.Predicate}, but excepting 3 types as arguments * <p> * Its primary use is to enable the {@link com.github.thorbenkuck.netcom2.pipel...
core/src/main/java/com/github/thorbenkuck/netcom2/interfaces/TriPredicate.java
0.939088
0.416678
TriPredicate.java
starcoder
package org.rurik.geohash; import java.util.ArrayList; import java.util.List; import static java.lang.Math.*; /** * Created by <NAME> on 27.11.2016. */ public class GreatCircleArc { private double latitudeInRad1; private double longitudeInRad1; private double latitudeInRad2; private double longitu...
src/main/java/org/rurik/geohash/GreatCircleArc.java
0.894657
0.785555
GreatCircleArc.java
starcoder
package io.atomix.catalyst.buffer; import java.nio.ByteOrder; /** * Wrapped bytes. * * @author <a href="http://github.com/kuujo"><NAME></a> */ public class WrappedBytes extends AbstractBytes { protected final Bytes bytes; private final Bytes root; public WrappedBytes(Bytes bytes) { if (bytes == null) ...
buffer/src/main/java/io/atomix/catalyst/buffer/WrappedBytes.java
0.936923
0.408808
WrappedBytes.java
starcoder
package com.suman.matrix; import java.util.Iterator; public abstract class SprialMatrix implements Iterator<Integer> { private int[][] matrix; private int row; private int col; private Direction direction; private int itemsRemaining; private int[] limits = new int[Direction.values().length]; public SprialMatr...
src/main/java/com/suman/matrix/SprialMatrix.java
0.8488
0.473536
SprialMatrix.java
starcoder
package org.bkatwal.relevanceevaluator; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.function.Function; import java.util.stream.Collectors; import org.bkatwal.dto.DocRating; import org.bkatwal.dto.QueryResultsRating;...
src/main/java/org/bkatwal/relevanceevaluator/RelevanceEvaluator.java
0.914656
0.426023
RelevanceEvaluator.java
starcoder
package com.ciaoshen.leetcode; import java.util.*; class CourseScheduleTwo { /** * BFS Topological Sort */ public class SolutionV1 { public int[] findOrder(int numCourses, int[][] prerequisites) { // build degree table, and the prerequisites map Map<Integer,List<Intege...
java/src/main/java/com/ciaoshen/leetcode/CourseScheduleTwo.java
0.728459
0.512327
CourseScheduleTwo.java
starcoder
package upperboundmethods; import java.util.ArrayList; import bermudanswaptionframework.BermudanSwaption; import bermudanswaptionframework.BermudanSwaptionValueEstimatorInterface; import lowerboundmethods.AbstractLowerBoundEstimationInputForUpperBound; import net.finmath.exception.CalculationException; import net.fin...
src/main/java/upperboundmethods/AbstractUpperBoundEstimation.java
0.845592
0.401629
AbstractUpperBoundEstimation.java
starcoder
package pt.up.fe.specs.util.utilities; import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; import pt.up.fe.specs.util.SpecsCheck; /** * Implements the Buffer strategy, for an arbitrary number of buffers. * * @author JoaoBispo * * @param <T> */ public class Buffer<T> { p...
SpecsUtils/src/pt/up/fe/specs/util/utilities/Buffer.java
0.90875
0.405154
Buffer.java
starcoder
package com.clust4j; import java.util.Random; import java.util.concurrent.ForkJoinPool; import org.apache.commons.math3.util.FastMath; /** * A set of global config values used in multiple classes. Some values may * be set to the user's preference, while others are final. * * @author <NAME> */ public abstract c...
src/main/java/com/clust4j/GlobalState.java
0.750918
0.434401
GlobalState.java
starcoder
package team.creative.creativecore.common.util.math.transformation; import team.creative.creativecore.common.util.math.base.Axis; import team.creative.creativecore.common.util.math.base.Facing; import team.creative.creativecore.common.util.math.vec.Vec3d; public enum BooleanRotation { // one: y, two:...
src/main/java/team/creative/creativecore/common/util/math/transformation/BooleanRotation.java
0.79858
0.436022
BooleanRotation.java
starcoder
package ch.epfl.imhof.projection; import java.lang.Math; import ch.epfl.imhof.PointGeo; import ch.epfl.imhof.geometry.Point; /** * @author <NAME> (247216) * @author <NAME> (251769) * * La classe représentant la projection Ch1903. * */ public final class CH1903Projection implements Projection { /** * @para...
src/ch/epfl/imhof/projection/CH1903Projection.java
0.83957
0.457016
CH1903Projection.java
starcoder
package org.twak.utils.geom; import java.awt.geom.AffineTransform; import java.util.ArrayList; import java.util.HashSet; import java.util.IdentityHashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.vecmath.Point2d; import javax.vecmath.Vector2d; import ...
src/org/twak/utils/geom/HalfMesh2.java
0.643665
0.458591
HalfMesh2.java
starcoder
package org.uma.jmetal.util.measure.impl; import org.uma.jmetal.util.measure.Measure; import org.uma.jmetal.util.measure.MeasureListener; import org.uma.jmetal.util.measure.PullMeasure; import org.uma.jmetal.util.measure.PushMeasure; import org.uma.jmetal.util.naming.DescribedEntity; import org.uma.jmetal.util.naming....
jmetal-core/src/main/java/org/uma/jmetal/util/measure/impl/PullPushMeasure.java
0.923212
0.520192
PullPushMeasure.java
starcoder
package de.cau.cs.kieler.klay.layered.components; import java.util.Collections; import java.util.Comparator; import java.util.List; import de.cau.cs.kieler.core.math.KVector; import de.cau.cs.kieler.klay.layered.graph.LNode; import de.cau.cs.kieler.klay.layered.graph.LGraph; import de.cau.cs.kieler.klay.layered.prope...
src-external/de/cau/cs/kieler/klay/layered/components/SimpleRowGraphPlacer.java
0.863219
0.417271
SimpleRowGraphPlacer.java
starcoder
package org.lambda4j.runnable; import java.util.Objects; import java.util.function.Function; import javax.annotation.CheckForNull; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import javax.annotation.Nullable; import org.lambda4j.Lambda; import org.lambda4j.exception.ThrownByFunctionalInterf...
lambda4j/src/main/java/org/lambda4j/runnable/ThrowableRunnable.java
0.9462
0.402627
ThrowableRunnable.java
starcoder
package stax.compiler; import stax.compiler.Type.BaseType; public class Instruction { public enum InstructionType { DEFINE, DUP, DUPN, POP, POPN, SWAP, BUBBN, SINKN, EVAL, EVALIF, TYPEOF, FIRST, REST, LEN, CONCAT, NOT, OR, AND, ADD, SUB, MULT, DIV, DIVMOD, EQ, NEQ, LT, GT, LTE, GTE, PRINT, ...
compiler/src/main/java/stax/compiler/Instruction.java
0.591723
0.428652
Instruction.java
starcoder
package org.deeplearning4j.examples.recurrent.character; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Ma...
dl4j-examples/src/main/java/org/deeplearning4j/examples/recurrent/character/CharacterIterator.java
0.899875
0.402451
CharacterIterator.java
starcoder
package eightqueens; import java.util.ArrayList; import java.util.List; public class Queen extends ChessItem { List<ChessItem> movementPossibilities = new ArrayList<>(); public Queen(Tuple position, ChessItemType type, int chessSize) { super(position, type); findPossibilities(chessSize); } private void f...
Projetos/src/eightqueens/Queen.java
0.601477
0.73557
Queen.java
starcoder
package com.baz.app.lc.medium; import com.baz.app.Interface.Facebook.Facebook; public class UniquePathII implements Facebook { /** * A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). * * The robot can only move either down or right at any point in tim...
src/main/java/com/baz/app/lc/medium/UniquePathII.java
0.727782
0.471953
UniquePathII.java
starcoder
package com.google.enterprise.adaptor; import java.util.concurrent.atomic.AtomicReference; /** * Ensures that at most one thread is executing a particular runnable. The first * thread that issues {@code run()} will cause the execution of {@code * runnable}, but further simultaneous calls to {@code run()} will exe...
src/com/google/enterprise/adaptor/OneAtATimeRunnable.java
0.877628
0.437463
OneAtATimeRunnable.java
starcoder
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Set; im...
test/JunitTests.java
0.888287
0.570002
JunitTests.java
starcoder
package io.github.silvaren.easyrs.tools.base; import android.graphics.Bitmap; import java.nio.ByteBuffer; import java.nio.IntBuffer; import java.util.Arrays; import io.github.silvaren.easyrs.tools.Histogram; import io.github.silvaren.easyrs.tools.Nv21Image; public class Utils { public static Nv21Image generate...
easyrs/src/main/java/io/github/silvaren/easyrs/tools/base/Utils.java
0.769643
0.417746
Utils.java
starcoder
package io.rxmicro.examples.data.mongo.supported.types.model; import org.bson.types.Binary; import org.bson.types.Code; import java.math.BigDecimal; import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.List; import java.util.UUID; import ja...
examples/group-data-mongo/data-mongo-supported-types/src/main/java/io/rxmicro/examples/data/mongo/supported/types/model/SupportedTypesDocument.java
0.850934
0.413477
SupportedTypesDocument.java
starcoder
package at.favre.lib.armadillo; import java.security.SecureRandom; import java.util.Objects; import at.favre.lib.bytes.Bytes; /** * Simple wrapper for obfuscated in-memory byte array. The idea is to have some kind of data obfuscation * during runtime, to make it harder to read the content when instrumenting or doi...
armadillo/src/main/java/at/favre/lib/armadillo/ByteArrayRuntimeObfuscator.java
0.898819
0.44559
ByteArrayRuntimeObfuscator.java
starcoder
package ezbake.data.graph.blueprints.graphmgmt; import java.util.HashMap; import java.util.Map; import com.google.common.annotations.VisibleForTesting; import com.tinkerpop.blueprints.Graph; import com.tinkerpop.blueprints.impls.tg.TinkerGraph; /** * Graph management system that uses a graph management graph AKA 'G...
ezgraph/blueprints/src/main/java/ezbake/data/graph/blueprints/graphmgmt/TinkerGraphManager.java
0.931103
0.443661
TinkerGraphManager.java
starcoder
package be.kuleuven.cs.gametheory.evolutionary; import be.kuleuven.cs.gametheory.results.HeuristicSymmetricPayoffMatrix; import be.kuleuven.cs.gametheory.results.PayoffEntry; import be.kuleuven.cs.gametheory.stats.ConfidenceLevel; import com.google.common.collect.Lists; import org.apache.commons.math3.stat.descriptive...
games/src/main/java/be/kuleuven/cs/gametheory/evolutionary/EvolutionaryGameDynamics.java
0.901736
0.4206
EvolutionaryGameDynamics.java
starcoder
package dev.marksman.kraftwerk.choice; import com.jnape.palatable.lambda.adt.choice.Choice7; import com.jnape.palatable.lambda.adt.choice.Choice8; import dev.marksman.kraftwerk.Generator; import dev.marksman.kraftwerk.Generators; import dev.marksman.kraftwerk.ToGenerator; import dev.marksman.kraftwerk.Weighted; import...
src/main/java/dev/marksman/kraftwerk/choice/ChoiceBuilder7.java
0.888202
0.449151
ChoiceBuilder7.java
starcoder
package org.kissweb; import java.text.NumberFormat; /** * Author: <NAME> * Date: 10/24/20 */ public class NumberUtils { /** * Correctly compare two doubles. * * @param d1 * @param d2 * @param maxdiff * @return true if the two doubles are different by less than maxdiff */ ...
src/main/core/org/kissweb/NumberUtils.java
0.862265
0.511107
NumberUtils.java
starcoder
package frc.robot; import edu.wpi.first.wpilibj.GenericHID; import edu.wpi.first.wpilibj.Joystick; /** * @author <NAME> * @author mduong15 * @version Beta 1.0 * * Handle input from Logitech Gaming Pad devices connected to the Driver Station. * This class handles standard input that comes from the Driver Station...
src/main/java/frc/robot/LogitechGamingPad.java
0.773772
0.471649
LogitechGamingPad.java
starcoder
package de.ami.team1.trend.control; import de.ami.team1.trend.model.Chart; import de.ami.team1.trend.model.MapPoint; import de.ami.team1.trend.model.Region; import de.ami.team1.trend.model.State; import org.json.JSONArray; import org.json.JSONObject; import javax.enterprise.context.SessionScoped; import java.awt.*; i...
trend/src/main/java/de/ami/team1/trend/control/GeoDataProvider.java
0.846609
0.475849
GeoDataProvider.java
starcoder
package toxi.geom; import toxi.geom.mesh.Mesh3D; public abstract class AxisAlignedCylinder implements Shape3D { protected Vec3D pos; protected float radius; protected float radiusSquared; protected float length; protected AxisAlignedCylinder(ReadonlyVec3D pos, float radius, float length) { ...
libraries/toxiclibs/src/toxi/geom/AxisAlignedCylinder.java
0.949926
0.553867
AxisAlignedCylinder.java
starcoder
package androidx.constraintLayout.desktop.ui.adapters.vg; import java.util.Arrays; import java.util.logging.Level; import java.util.logging.Logger; public class SVGTree { private static Logger logger = Logger.getLogger(SVGTree.class.getSimpleName()); public float w; public float h; public float[] matrix; ...
desktop/ConstraintLayoutInspector/app/src/androidx/constraintLayout/desktop/ui/adapters/vg/SVGTree.java
0.565659
0.422803
SVGTree.java
starcoder
import java.util.Arrays; import java.util.List; public class Solution { // best solution public static int best(int[] nums) { int start = 0, end = nums.length - 1; while (start < end) { // We want the first element of the middle pair, // which should be at a...
540. Single Element in a Sorted Array/src/Solution.java
0.783616
0.429728
Solution.java
starcoder
package enginecrafter77.survivalinc.stats.impl; import java.util.HashMap; import java.util.Map; import enginecrafter77.survivalinc.config.ModConfig; import enginecrafter77.survivalinc.stats.effect.CalculatorFunction; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.mine...
src/main/java/enginecrafter77/survivalinc/stats/impl/ArmorModifier.java
0.897271
0.472257
ArmorModifier.java
starcoder
package org.mmarini.genesis.model3; import static java.lang.Math.log; import static java.lang.String.format; import static java.util.Objects.requireNonNull; /** * The reaction process transforms the resources by chemical reaction. * The reaction is activated only if the target resource has less than * the expected...
src/main/java/org/mmarini/genesis/model3/ReactionProcess.java
0.94783
0.526891
ReactionProcess.java
starcoder
package advent.twenty_fifteen.support; import java.util.Map; import java.util.Objects; public abstract class BinaryOperation { private static class InputOperation extends BinaryOperation { private final String output; private final String input; public InputOperation(String output, String...
java-advent-of-code/src/main/java/advent/twenty_fifteen/support/BinaryOperation.java
0.93417
0.55429
BinaryOperation.java
starcoder
package com.eegeo.mapapi.camera; import androidx.annotation.NonNull; import com.eegeo.mapapi.geometry.LatLng; import com.eegeo.mapapi.geometry.LatLngBounds; /** * Factory class for creating CameraUpdate objects. These can then be passed to * camera operations on the EegeoMap object. */ public final class CameraU...
sdk/src/main/java/com/eegeo/mapapi/camera/CameraUpdateFactory.java
0.954573
0.444444
CameraUpdateFactory.java
starcoder
package com.fiji.mvm; import java.util.*; import com.fiji.fivm.r1.*; /** * Defines interfaces for VM-to-VM gate-based communication. This class cannot * be instantiated; its main purpose is to contain the * @Export annotation, the Import interface, and the Message base class, which * you can use to enable VM-to-...
fivm/runtimej/src/com/fiji/mvm/Gate.java
0.745861
0.48377
Gate.java
starcoder
package com.github.teocci.algo.ai.javafx.base.model.dino; import com.github.teocci.algo.ai.javafx.base.connections.ConnectionGene; import com.github.teocci.algo.ai.javafx.base.model.dot.Vector2D; import java.util.ArrayList; import java.util.List; /** * Created by teocci. * * @author <EMAIL> on 2018-Aug-27 */ pub...
src/main/java/com/github/teocci/algo/ai/javafx/base/model/dino/Node.java
0.722527
0.431105
Node.java
starcoder
package net.contargo.types.truck; import java.util.Arrays; import java.util.List; /** * Can handle Romanian {@link LicensePlate}s. * * <p>Examples of Romanian license plates:</p> * * <ul> * <li>B 12 CTL</li> * <li>B 567 DHG</li> * <li>CT 12 BNG</li> * </ul> * * <p>Further information: <a href="https...
src/main/java/net/contargo/types/truck/RomanianLicensePlateHandler.java
0.840357
0.410225
RomanianLicensePlateHandler.java
starcoder
public class WeightedQuickUnion implements UnionFind { private final int id[]; private final int sizes[]; private int connectedComponents; /** * @param n init quick-find with n objects */ public WeightedQuickUnion(int n) { connectedComponents = n; id = new int[n]; ...
DynamicConnectivity/src/WeightedQuickUnion.java
0.787605
0.424949
WeightedQuickUnion.java
starcoder
package org.apache.sis.metadata; /** * Computes a hash code for the specified metadata. The hash code is defined as the sum of hash codes * of all non-empty properties, plus the hash code of the interface. This is a similar contract than * {@link java.util.Set#hashCode()} (except for the interface) and ensures tha...
core/sis-metadata/src/main/java/org/apache/sis/metadata/HashCode.java
0.953557
0.483892
HashCode.java
starcoder
package com.jogamp.common.nio; import java.nio.*; /** * @author <NAME>, et al. */ public class StructAccessor { private final ByteBuffer bb; public StructAccessor(final ByteBuffer bb) { // Setting of byte order is concession to native code which needs // to instantiate these this.b...
src/java/com/jogamp/common/nio/StructAccessor.java
0.902333
0.53692
StructAccessor.java
starcoder
package q1050; import java.util.Arrays; import org.junit.runner.RunWith; import util.runner.Answer; import util.runner.LeetCodeRunner; import util.runner.TestData; import util.runner.data.DataExpectation; /** * [Easy] 1005. Maximize Sum Of Array After K Negations * https://leetcode.com/problems/maximize-sum-of-arra...
src/main/java/q1050/Q1005_MaximizeSumOfArrayAfterKNegations.java
0.856992
0.509276
Q1005_MaximizeSumOfArrayAfterKNegations.java
starcoder
package com.billkalin.sourcecode.question27; import com.billkalin.sourcecode.common.Utils; import java.util.Arrays; public class Main { public static void main(String[] args) { int[] array = {1, 2, 3, 2, 2, 2, 5, 4, 2}; int num = findHalfNum(array); num = findHalfNum2(array); Sys...
sourcecode/src/main/java/com/billkalin/sourcecode/question27/Main.java
0.568416
0.456652
Main.java
starcoder
package model.patternIO; import model.Point; import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; import java.util.List; import static model.simulation.SimulationRule.DEFAULT_RULE_STRING; /** * This class is a parser implementation for .life and .lif files. ...
src/model/patternIO/LIFEParser.java
0.939685
0.415492
LIFEParser.java
starcoder
package chris.braunschweiler.touchngo.ai; /** * The description for the data we're pathfinding over. This provides the contract * between the data being searched (i.e. the in game map) and the path finding * generic tools * * @author <NAME> */ public interface TileBasedMap { /** * Get the width of the tile m...
TouchNGoFinal/chris/braunschweiler/touchngo/ai/TileBasedMap.java
0.897395
0.711055
TileBasedMap.java
starcoder
package com.pahimar.chitchat.reference; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; public class Reference { /* Equivalent character map for common character substitutions */ private static Map<String, List<String>> equivalentCharacterMap; /** * R...
src/main/java/com/pahimar/chitchat/reference/Reference.java
0.877221
0.427636
Reference.java
starcoder
import com.google.common.base.Charsets; import com.google.common.base.Objects; import com.google.common.io.Resources; import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.stream.Collectors; public clas...
src/main/java/Exercise24Part1.java
0.824885
0.407923
Exercise24Part1.java
starcoder
package io.smallrye.faulttolerance.core.util; import static io.smallrye.faulttolerance.core.util.Preconditions.checkNotNull; import java.util.Collections; import java.util.IdentityHashMap; import java.util.Set; public class SetBasedExceptionDecision implements ExceptionDecision { // @CircuitBreaker.failOn, @Fall...
implementation/core/src/main/java/io/smallrye/faulttolerance/core/util/SetBasedExceptionDecision.java
0.829837
0.423458
SetBasedExceptionDecision.java
starcoder
package de.m4rc3l.nova.core.utils; public final class PathUtils { private static final String EMPTY_PATH = "/"; private static final char SLASH = '/'; private PathUtils() { throw new UnsupportedOperationException(); } /** * Strips one or multiple path components from the beginning of a path. * <...
nova-core/src/main/java/de/m4rc3l/nova/core/utils/PathUtils.java
0.913685
0.401629
PathUtils.java
starcoder
package org.sbolstandard.core2; import static org.sbolstandard.core2.URIcompliance.createCompliantURI; import static org.sbolstandard.core2.URIcompliance.isChildURIcompliant; import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import jav...
core2/src/main/java/org/sbolstandard/core2/ComponentDefinition.java
0.754825
0.475788
ComponentDefinition.java
starcoder
package gov.sandia.cognition.learning.algorithm.perceptron.kernel; import gov.sandia.cognition.learning.data.DefaultInputOutputPair; import gov.sandia.cognition.learning.function.kernel.LinearKernel; import gov.sandia.cognition.math.matrix.mtj.Vector2; import gov.sandia.cognition.learning.function.categorization.Defau...
Components/LearningCore/Test/gov/sandia/cognition/learning/algorithm/perceptron/kernel/ProjectronTest.java
0.837786
0.642629
ProjectronTest.java
starcoder
package de.mrapp.android.adapter; import androidx.annotation.NonNull; import android.widget.AbsListView; import java.util.List; import java.util.NoSuchElementException; import de.mrapp.android.adapter.list.selectable.SelectableListAdapter; /** * Defines the interface, an adapter, whose underlying data is managed a...
library/src/main/java/de/mrapp/android/adapter/MultipleChoiceListAdapter.java
0.893353
0.450782
MultipleChoiceListAdapter.java
starcoder
package ro.hasna.ts.math.ml.distance; import org.apache.commons.math3.util.FastMath; /** * Calculates the distance between two vectors using Edit Distance with Real Penalty. * <p> * Reference: * <NAME>, <NAME> and <NAME> (2005) * <i>Robust and fast similarity search for moving object trajectories</i> * </p> * ...
src/main/java/ro/hasna/ts/math/ml/distance/RealPenaltyEditDistance.java
0.92394
0.500305
RealPenaltyEditDistance.java
starcoder
package org.apache.sis.internal.netcdf; import org.opengis.util.FactoryException; import org.opengis.geometry.DirectPosition; import org.opengis.parameter.ParameterDescriptor; import org.opengis.parameter.ParameterDescriptorGroup; import org.opengis.parameter.ParameterValueGroup; import org.opengis.referencing.operati...
storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/SatelliteGroundTrack.java
0.89033
0.613729
SatelliteGroundTrack.java
starcoder
import org.junit.Assert; import org.junit.Test; /** * Implement a trie with insert, search, and startsWith methods. * <p> * Note: * You may assume that all inputs are consist of lowercase letters a-z. * <p> * Tags: Design, Trie * Similar Problems: (M) Add and Search Word - Data structure design */ public class...
src/com/freetymekiyan/algorithms/level/Medium/ImplementTrie.java
0.857485
0.576155
ImplementTrie.java
starcoder
package org.bridje.sql; /** * An SQL expression. * * @param <T> The final java type of the expression. * @param <E> The result set read java type of the expression. */ public interface Expression<T, E> extends SQLWritable { /** * The SQL type for this expression. * * @return The SQLType for thi...
bridje-sql/src/main/java/org/bridje/sql/Expression.java
0.918247
0.595463
Expression.java
starcoder
package com.rainy.weahter_bg_plug.utils; import android.content.Context; import android.graphics.Color; import com.rainy.weahter_bg_plug.R; import java.util.HashMap; /** * create by Rainy on 2020/10/17. * email: <EMAIL> * github: Rainvy * describe: */ public class WeatherUtil { private static HashMap<St...
weather_bg/src/main/java/com/rainy/weahter_bg_plug/utils/WeatherUtil.java
0.542863
0.438665
WeatherUtil.java
starcoder