code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
package org.unitils.reflectionassert; import static java.util.Arrays.asList; import static java.util.Collections.emptySet; import static org.unitils.reflectionassert.ReflectionComparatorMode.IGNORE_DEFAULTS; import static org.unitils.reflectionassert.ReflectionComparatorMode.LENIENT_DATES; import static org.unitils.re...
reflection-comparator/src/main/java/org/unitils/reflectionassert/ReflectionComparatorFactory.java
0.89353
0.448547
ReflectionComparatorFactory.java
starcoder
package fr.xephi.authme.util.lazytags; import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.stream.Collectors; /** * Replaces tags lazily by first determining which tags are being used * and only applying those replacements afterwards. * * @param <A> the argument type ...
evaluation/github_authmreloaded_unsafe/src/main/java/fr/xephi/authme/util/lazytags/TagReplacer.java
0.929744
0.408159
TagReplacer.java
starcoder
package jat.coreNOSA.cm; import jat.coreNOSA.algorithm.integrators.Derivatives; import jat.coreNOSA.math.MatrixVector.data.VectorN; /** * <P> * The ThreeBody class provides the ability to propagate orbits for a general * three body problem * * @author <NAME> * @version 1.0 */ public class ThreeBody implements...
src/jat/coreNOSA/cm/ThreeBody.java
0.788705
0.640566
ThreeBody.java
starcoder
package net.aifusion.asn; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; /** * @author <NAME> * */ public class TagTest { @BeforeClass...
test/net/aifusion/asn/TagTest.java
0.640748
0.449876
TagTest.java
starcoder
package org.apache.ignite.internal.processors.cache.ratemetrics; import java.util.concurrent.atomic.AtomicLongArray; import org.apache.ignite.internal.util.typedef.internal.A; import org.apache.ignite.internal.util.typedef.internal.U; /** * Accumulates approximate hit rate statistics. * Calculates number of hits in...
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ratemetrics/HitRateMetrics.java
0.932415
0.464537
HitRateMetrics.java
starcoder
package ru.arturvasilov.sqlite.core; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import junit.framework.Assert; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import...
app/src/androidTest/java/ru/arturvasilov/sqlite/core/SQLiteTest.java
0.861378
0.484319
SQLiteTest.java
starcoder
package yevano.math.matrix; import java.util.Arrays; import lombok.NonNull; import lombok.val; import yevano.math.vector.NVector; import yevano.math.vector.Vector; public interface Matrix { public @NonNull double[] getComponents(); public double getComponent(int i); public int rowCount(); public int ...
src/main/java/yevano/math/matrix/Matrix.java
0.926611
0.553324
Matrix.java
starcoder
package com.finitejs.modules.plot.scales; import com.finitejs.modules.plot.Scale; /** * Abstract class representing a scale with numeric domain and range. */ public abstract class NumericScale implements Scale<Double, Double> { /** * Returns uniformly spaced human-readable tick values within * the extent of ...
src/main/java/com/finitejs/modules/plot/scales/NumericScale.java
0.903074
0.50952
NumericScale.java
starcoder
package com.artursworld.reactiontest.controller.analysis.outlierdetection; import org.apache.commons.math3.stat.descriptive.rank.Median; /** * Uses the S_n estimator introduced by Rousseeuw and Croux to detect outliers. * The straightforward algorithm for computing is used and need 0(n^2) computation time. * Howe...
ReactionTest/app/src/main/java/com/artursworld/reactiontest/controller/analysis/outlierdetection/SnEstimator.java
0.860355
0.759671
SnEstimator.java
starcoder
package io.github.goodudetheboy.worldholidaydates.holidayparser; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.ArrayList; import java.util.List; import javax.annotation.Nullable; public class Rule implements Comparable<Rule> { public static final int UND...
lib/src/main/java/io/github/goodudetheboy/worldholidaydates/holidayparser/Rule.java
0.938878
0.408926
Rule.java
starcoder
package ch.obermuhlner.math.statistics; import ch.obermuhlner.math.statistics.multivariate.stream.SampleCorrelationCalculator; import ch.obermuhlner.math.statistics.type.Histogram; import ch.obermuhlner.math.statistics.type.SkewnessKurtosis; import ch.obermuhlner.math.statistics.univariate.collection.MedianCalculator;...
ch.obermuhlner.math.statistics/src/main/java/ch/obermuhlner/math/statistics/StatisticsCollectors.java
0.90071
0.625209
StatisticsCollectors.java
starcoder
package _01FirstLastList; import com.google.common.collect.Lists; import java.util.*; public class FirstLastList<T extends Comparable<T>> implements IFirstLastList<T> { private ArrayList<T> elements; private Map<T, ArrayList<T>> elementCount; private Map<T, ArrayList<T>> elementCountReversed; public...
07AVLTreesAATrees/src/_01FirstLastList/FirstLastList.java
0.912726
0.485112
FirstLastList.java
starcoder
package magpie.csp; import java.util.*; import magpie.utility.interfaces.Printable; import org.apache.commons.lang3.tuple.Pair; /** * Holds data about the performance of a CSP algorithm. * * @author <NAME> */ public class CSPPerformanceStats implements Printable { /** * Position of correct prototype in ...
src/magpie/csp/CSPPerformanceStats.java
0.941674
0.443299
CSPPerformanceStats.java
starcoder
package ca.eandb.jmist.framework.measurement; import ca.eandb.jmist.framework.Material; import ca.eandb.jmist.framework.Medium; import ca.eandb.jmist.framework.Random; import ca.eandb.jmist.framework.ScatteredRay; import ca.eandb.jmist.framework.SurfacePoint; import ca.eandb.jmist.framework.SurfacePointGeometry; impor...
jmist-core/src/main/java/ca/eandb/jmist/framework/measurement/MaterialPhotometer.java
0.705075
0.558086
MaterialPhotometer.java
starcoder
package com.tetris.game.actions; import com.tetris.game.recordkeeping.GameRecordKeeping; import com.tetris.game.things.RowList; import com.tetris.game.things.ActiveBlock; import java.util.*; /** * `RowDeleter` deletes `Row`s from the playfield. (Crazy, right?) * Because row deletion happens only after one `RowLi...
src/com/tetris/game/actions/RowDeleter.java
0.796332
0.451568
RowDeleter.java
starcoder
package com.kuxhausen.huemore; import android.support.test.runner.AndroidJUnit4; import com.kuxhausen.huemore.net.BrightnessManager; import com.kuxhausen.huemore.net.BrightnessManager.BrightnessPolicy; import com.kuxhausen.huemore.net.MockNetBulb; import com.kuxhausen.huemore.net.NetworkBulb; import com.kuxhausen.hue...
mobile/src/androidTest/java/com/kuxhausen/huemore/BrightnessManagerTest.java
0.847242
0.462898
BrightnessManagerTest.java
starcoder
package com.rtg.util.array; /** */ public interface CommonIndex { /** * Swap the values at the two specified locations. * * @param index1 the first index to be swapped * @param index2 the second index to be swapped */ void swap(long index1, long index2); /** * Note: the length returned by t...
src/com/rtg/util/array/CommonIndex.java
0.896274
0.444987
CommonIndex.java
starcoder
package se.artheus.velosiped; import java.util.Arrays; public class DirectedCycle { private boolean[] marked; // marked[v] = has vertex v been marked? private int[] edgeTo; // edgeTo[v] = previous vertex on path to v private boolean[] onStack; // onStack[v] = is vertex on the stack? p...
src/main/java/se/artheus/velosiped/DirectedCycle.java
0.903576
0.4206
DirectedCycle.java
starcoder
package org.yawni.wordnet; import java.io.IOException; import java.util.Comparator; import java.util.regex.Matcher; import org.yawni.wordnet.FileManager.CharStream; /** * {@code FileManagerInterface} defines the interface between {@link WordNet} and the data file system. * {@code WordNet} invokes methods from this ...
api/src/main/java/org/yawni/wordnet/FileManagerInterface.java
0.914047
0.560674
FileManagerInterface.java
starcoder
package tree; public class BinaryTreeMaximumPathSum124 { private String name = "124. Binary Tree Maximum Path Sum"; private String url = "https://leetcode.com/problems/binary-tree-maximum-path-sum/"; public static int maxPathSum(TreeNode root) { return maxPathSumHelper(root).maxPathSum; } ...
src/tree/BinaryTreeMaximumPathSum124.java
0.931494
0.417331
BinaryTreeMaximumPathSum124.java
starcoder
package io.boodskap.hl7; import java.nio.file.Files; import java.nio.file.Paths; import org.json.JSONObject; import ca.uhn.hl7v2.HL7Exception; /** * Example code for parsing messages. * * @author <a href="mailto:<EMAIL>"><NAME></a> * @version $Revision: 1.1 $ updated on $Date: 2007-02-19 02:24:46 $ by $Author...
src/main/java/io/boodskap/hl7/ExampleParseMessages.java
0.533884
0.514766
ExampleParseMessages.java
starcoder
package com.github.kongpf8848.rx.observables; import com.github.kongpf8848.rx.math.operators.OperatorAverageDouble; import com.github.kongpf8848.rx.math.operators.OperatorAverageFloat; import com.github.kongpf8848.rx.math.operators.OperatorAverageInteger; import com.github.kongpf8848.rx.math.operators.OperatorAverageL...
src/main/java/com/github/kongpf8848/rx/observables/MathObservable.java
0.91359
0.465752
MathObservable.java
starcoder
package edu.neu.coe.info6205.life.custom; // Files must be named the same as the class they contain // Files can have multiple classes, but only one public class import edu.neu.coe.info6205.life.base.Point; import java.util.HashMap; import java.util.ArrayList; import java.util.List; public class World { private ...
src/main/java/edu/neu/coe/info6205/life/custom/World.java
0.891315
0.566019
World.java
starcoder
package pl.szetela.lukasz.WMS.utils; import java.time.LocalDate; import java.util.*; public class StringUtils { public static String[] getDate(LocalDate localDate) { String[] dates = new String[2]; int numberOfDay = localDate.getDayOfWeek().getValue(); switch (numberOfDay) { c...
src/main/java/pl/szetela/lukasz/WMS/utils/StringUtils.java
0.688783
0.475423
StringUtils.java
starcoder
package com.danielflower.crickam.scorer; import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.annotation.concurrent.Immutable; import java.util.Objects; /** * The trajectory of the ball coming off the bat */ @Immutable public final class Trajectory { private final Integer speedInKms; ...
src/main/java/com/danielflower/crickam/scorer/Trajectory.java
0.922805
0.577585
Trajectory.java
starcoder
package optic.lua.asm; import org.jetbrains.annotations.Nullable; import java.util.*; import static optic.lua.asm.VoidNode.assignArray; /** * Helper class to compile variable assignments. Create a new builder using {@link #AssignmentBuilder(VariableResolver)}, * set elements with {@link #setValues(ExprList)} and ...
src/optic/lua/asm/AssignmentBuilder.java
0.81841
0.448064
AssignmentBuilder.java
starcoder
import java.math.BigInteger; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.Executor; import java.util.concur...
cohort/week12/PerformanceExperiment.java
0.577495
0.400163
PerformanceExperiment.java
starcoder
package infodynamics.measures.discrete; import junit.framework.TestCase; public class MutualInformationTester extends TestCase { public void testFullyDependent() throws Exception { MutualInformationCalculatorDiscrete miCalc = new MutualInformationCalculatorDiscrete(2, 0); // X2 is a copy of X1 - MI should be...
artifacts/infodynamics-dist-1.3/java/unittests/infodynamics/measures/discrete/MutualInformationTester.java
0.679498
0.438785
MutualInformationTester.java
starcoder
package org.jooq.tools; import java.sql.Timestamp; import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java...
jOOQ/src/main/java/org/jooq/tools/DateTimeUtils.java
0.95403
0.507019
DateTimeUtils.java
starcoder
package com.opengamma.analytics.financial.model.interestrate.curve; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import org.apache.commons.lang.ArrayUtils; import com.opengamma.analytics.ShiftType; import com.opengamma.analytics.math.curve.AddCurveSpreadFunct...
projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/model/interestrate/curve/YieldCurveUtils.java
0.966116
0.598371
YieldCurveUtils.java
starcoder
package io.atomix.raft.cluster; import io.atomix.cluster.MemberId; import io.atomix.raft.RaftServer; import io.atomix.storage.StorageLevel; import java.util.Arrays; import java.util.Collection; import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; /** * Raft server cluster API. * * <p>...
atomix/cluster/src/main/java/io/atomix/raft/cluster/RaftCluster.java
0.888487
0.571169
RaftCluster.java
starcoder
package me.joan; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Solution { public static void appendResult(int a, int b, int c, List<List<Integer>> list) { /* Because the result is a List of Lists of Integers, we have to create * a temporal triplet to ad...
3Sum/Java/Solution.java
0.774413
0.484807
Solution.java
starcoder
package com.simolecule.centres.rules; import com.simolecule.centres.Edge; import com.simolecule.centres.Node; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * A simple insertion sort for ligands. The number of ligands is not likely to * be very larger as such doing a merge sor...
core/src/main/java/com/simolecule/centres/rules/Sort.java
0.76882
0.406685
Sort.java
starcoder
package openglsuperbible.glutils; import java.nio.FloatBuffer; import java.nio.ShortBuffer; import java.util.Map; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL20; /** * * @author andreban */ public class SimpleGLBatch implements GLBatch { p...
OpenGLSuperBible/src/openglsuperbible/glutils/SimpleGLBatch.java
0.812086
0.409339
SimpleGLBatch.java
starcoder
package ca.waterloo.dsg.graphflow.parser.query.expressions; import ca.waterloo.dsg.graphflow.datachunk.DataChunks; import ca.waterloo.dsg.graphflow.datachunk.vectors.VectorState; import ca.waterloo.dsg.graphflow.datachunk.vectors.property.Vector; import ca.waterloo.dsg.graphflow.parser.MalformedQueryException; import ...
GF-CL/src/main/java/ca/waterloo/dsg/graphflow/parser/query/expressions/ArithmeticExpression.java
0.832985
0.449936
ArithmeticExpression.java
starcoder
package com.wimi.tictactoe.client.game; import javafx.scene.control.Button; import org.json.simple.JSONArray; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; /** * @Description Contains the basic methods used for running a Tic Tac Toe game and utils. */ public class Structure { ...
src/main/java/com/wimi/tictactoe/client/game/Structure.java
0.892167
0.40928
Structure.java
starcoder
package io.gridgo.bean; import java.util.Optional; import lombok.NonNull; public interface BObjectOptional { BObject getBObject(); default Optional<BElement> get(@NonNull String field) { return Optional.ofNullable(this.getBObject().get(field)); } default Optional<BObject> getObject(@NonNul...
commons/gridgo-bean/src/main/java/io/gridgo/bean/BObjectOptional.java
0.886506
0.455804
BObjectOptional.java
starcoder
package leetcode.map; import java.util.ArrayList; import java.util.List; /** Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The ...
src/main/java/leetcode/map/WordSearchII5.java
0.837454
0.424472
WordSearchII5.java
starcoder
package org.chromium.chrome.browser.photo_picker; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.FileDescriptor; /** * A collection of utility functions for dealing with bitmaps. */ class BitmapUtils { /** * Takes a |bitmap| and returns a square thumbnail of |size|x...
app/src/main/java/org/chromium/chrome/browser/photo_picker/BitmapUtils.java
0.843638
0.562958
BitmapUtils.java
starcoder
package tech.uom.seshat; import java.util.Objects; import javax.measure.UnitConverter; /** * Linear converter with a scale factor of 1 and an offset of 0. We define a class for this special case * instead of using the more generic {@link LinearConverter} class because we want to avoid performing * any arithmetic ...
src/main/java/tech/uom/seshat/IdentityConverter.java
0.945418
0.491944
IdentityConverter.java
starcoder
import java.util.*; import java.io.*; /** * Assignment 5 Q3 VectorGraphics 2011 version * * @version 1.1 */ class VectorGraphics { private static final String RENDER = "W"; private static final String EXIT = "X"; private static final String ADD = "A"; private static final String MOVE = "M"; pri...
VectorGraphics.java
0.589716
0.423339
VectorGraphics.java
starcoder
package corescope.anomaly; import corescope.Pair; /** * Binary heap with a hash table for updating priorities * @author <NAME> */ public class HashIndexedMinHeap { /** * heap: array of keys */ private int[] array; /** * Number of objects in the heap */ private int size; /...
src/main/java/corescope/anomaly/HashIndexedMinHeap.java
0.839701
0.479686
HashIndexedMinHeap.java
starcoder
package com.gs.dmn.feel.analysis.semantics.type; import java.util.*; import java.util.stream.Collectors; import static com.gs.dmn.feel.analysis.semantics.type.AnyType.ANY; public class ContextType extends Type implements CompositeDataType { private final Map<String, Type> members = new LinkedHashMap(); publ...
dmn-core/src/main/java/com/gs/dmn/feel/analysis/semantics/type/ContextType.java
0.894185
0.435181
ContextType.java
starcoder
package seedu.address.ui.util; import java.util.Map; /** * A cache that maps postal codes to districts on the Singapore map */ public class MapDataUtil { public static final Map<String, Integer> POSTAL_CODE_CACHE = Map.ofEntries( Map.entry("01", 1), Map.entry("02", 1), Map.e...
src/main/java/seedu/address/ui/util/MapDataUtil.java
0.810366
0.614018
MapDataUtil.java
starcoder
package com.zephreo.reactorgen.location; import java.util.ArrayList; import java.util.HashSet; import org.json.simple.JSONObject; public class Location { public static final HashSet<Location> RELATIVE_X = new HashSet<Location>(); static { RELATIVE_X.add(new Location(1, 0, 0)); RELATIVE_X.add(new Location(-1,...
src/com/zephreo/reactorgen/location/Location.java
0.713831
0.444746
Location.java
starcoder
package ai.harmony.ravel.analysis; import ai.harmony.ravel.primitives.Model; import ai.harmony.ravel.primitives.Space; /** * A model tag is a tag applied to a variable meaning that either * * 1) the variable is a record of the given model created by the given * creator * 2) the variable is a context holding a...
src/ai/harmony/ravel/analysis/ModelTag.java
0.900229
0.411998
ModelTag.java
starcoder
package com.fillumina.performance.template; import com.fillumina.performance.consumer.PerformanceConsumer; import com.fillumina.performance.consumer.assertion.AssertPerformance; import com.fillumina.performance.consumer.assertion.PerformanceAssertion; import com.fillumina.performance.producer.InstrumentablePerformance...
performance-tools/src/main/java/com/fillumina/performance/template/AutoProgressionPerformanceTemplate.java
0.941748
0.4206
AutoProgressionPerformanceTemplate.java
starcoder
package org.openbooth.storage; import org.openbooth.storage.exception.StorageException; import org.openbooth.storage.exception.KeyValueStoreException; import org.openbooth.config.validation.ValidationException; /** * This interface represents a key-value store where data can be persisted. * Values are stored and r...
src/main/java/org/openbooth/storage/KeyValueStore.java
0.892899
0.450057
KeyValueStore.java
starcoder
package field; import java.awt.*; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; import move.MoveType; import static java.lang.Math.abs; import static java.lang.Math.min; /** * field.Field * * Stores all information about the playing field and * contains methods to perform calcu...
field/Field.java
0.695338
0.417746
Field.java
starcoder
package uk.ac.sussex.gdsc.core.ij.process; import ij.process.FloatProcessor; import java.awt.Image; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.DataBuffer; import java.awt.image.DataBufferByte; import java.awt.image.Raster; import java.awt.image.SampleModel; import uk.a...
gdsc-core-ij/src/main/java/uk/ac/sussex/gdsc/core/ij/process/AbstractMappedFloatProcessor.java
0.923463
0.444806
AbstractMappedFloatProcessor.java
starcoder
package geo.dataStructures; import java.util.ArrayList; import java.util.List; import java.util.Objects; /** * * @author Berry */ public class Trapezoid extends TrapezoidShape { // Coordinates private Vertex v1, v2, v3, v4; private Edge e1, e2, e3, e4; // Shape defined by private Vertex left, r...
GEO/src/geo/dataStructures/Trapezoid.java
0.754282
0.453867
Trapezoid.java
starcoder
package org.jscience.mathematics.internal.vector; import java.util.Comparator; import java.util.List; import javolution.util.FastTable; import javolution.util.Index; import javolution.xml.XMLFormat; import javolution.xml.XMLFormat.InputElement; import javolution.xml.XMLFormat.OutputElement; import javolution.xml.stre...
mathematics/src/main/java/org/jscience/mathematics/internal/linear/SparseMatrix.java
0.943165
0.546315
SparseMatrix.java
starcoder
public class LinkedList<T> { /** * Represents the head pointer of the LinkedList, also known as * the first ListNode. */ protected ListNode<T> head; /** * Represents the head pointer of the LinkedList, also known as * the last ListNode. */ protected ListNode<T> tail; ...
linkedlist/LinkedList.java
0.926312
0.688607
LinkedList.java
starcoder
package array_types_error; import static org.junit.Assert.*; import java.io.IOException; import org.junit.BeforeClass; import org.junit.Test; import test_utils.ZserioErrors; public class ArrayTypesErrorTest { @BeforeClass public static void readZserioErrors() throws IOException { zserioErrors =...
test/errors/array_types_error/java/array_types_error/ArrayTypesErrorTest.java
0.783326
0.493714
ArrayTypesErrorTest.java
starcoder
package base; import javafx.scene.shape.Polygon; /** * This class implements the square, triangle, and hexagon cell shapes, and returns Polygon object to be used * in the Cell class. * @author Brian */ public class CellShape { public static final double horizontalOffsetHexagon = 0.6; public static final double...
src/base/CellShape.java
0.883406
0.492981
CellShape.java
starcoder
package com.example.educationtools; import android.os.Parcel; import android.os.Parcelable; public class LinearFData implements Parcelable { private double x = 5; //X of the line. private double m = 0; //Slope of the line. private double A=0,B=0,C=0; ...
app/src/main/java/com/example/educationtools/LinearFData.java
0.665411
0.405743
LinearFData.java
starcoder
package org.apache.flink.util; import java.io.Serializable; import org.apache.flink.types.StringValue; /** * Utility class for efficient string operations on strings. All methods in this class are * written to be optimized for efficiency and work only on strings whose characters are * representable in a single <t...
flink-core/src/main/java/org/apache/flink/util/SimpleStringUtils.java
0.846292
0.415077
SimpleStringUtils.java
starcoder
package com.microsoft.z3; import com.microsoft.z3.enumerations.Z3_sort_kind; /** * A Model contains interpretations (assignments) of constants and functions. **/ public class Model extends Z3Object { /** * Retrieves the interpretation (the assignment) of {@code a} in * the model. * @param a A Co...
src/api/java/Model.java
0.944613
0.424472
Model.java
starcoder
package org.geotools.grid; import java.awt.Color; import java.net.URL; import java.util.List; import java.util.Map; import com.vividsolutions.jts.geom.Polygon; import java.util.Arrays; import org.geotools.data.FileDataStore; import org.geotools.data.FileDataStoreFinder; import org.geotools.data.simple.SimpleFeatureS...
modules/quickstart/src/main/main/java/org/geotools/grid/GridExamples.java
0.81626
0.422922
GridExamples.java
starcoder
package com.jme3.animation; import com.jme3.export.*; import com.jme3.math.Quaternion; import com.jme3.math.Vector3f; import com.jme3.util.TempVars; import com.jme3.util.clone.Cloner; import com.jme3.util.clone.JmeCloneable; import java.io.IOException; import java.util.BitSet; /** * Contains a list of transforms and...
jme3-core/src/main/java/com/jme3/animation/BoneTrack.java
0.951538
0.465387
BoneTrack.java
starcoder
package org.jasig.portal.portlet.marketplace; import org.jasig.portal.portlet.om.IPortletDefinition; import org.jasig.portal.portlet.om.PortletCategory; import org.jasig.portal.security.IPerson; import java.util.Set; /** * Marketplace service layer responsible for gathering and applying policy about what Marketplac...
uportal-war/src/main/java/org/jasig/portal/portlet/marketplace/IMarketplaceService.java
0.839208
0.414306
IMarketplaceService.java
starcoder
package boofcv.alg.feature.detect.intensity.impl; import boofcv.alg.InputSanityCheck; import boofcv.alg.filter.convolve.ConvolveImageNormalized; import boofcv.factory.filter.kernel.FactoryKernelGaussian; import boofcv.struct.convolve.Kernel1D_F32; import boofcv.struct.image.GrayF32; //CONCURRENT_INLINE import boofcv....
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/intensity/impl/ImplSsdCornerWeighted_F32.java
0.695131
0.446857
ImplSsdCornerWeighted_F32.java
starcoder
* Source: * http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/jsr166e/extra/AtomicDoubleArray.java?revision=1.5 * (Modified to adapt to guava coding conventions and * to use AtomicLongArray instead of sun.misc.Unsafe) */ package com.google.common.util.concurrent; import static java.lang.Double.doubleToRawL...
guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java
0.955142
0.564339
AtomicDoubleArray.java
starcoder
package org.calvin.__Book.epi; import epi.test_framework.EpiTest; import epi.test_framework.GenericTest; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class PickingUpCoins { @EpiTest(testDataFile = "picking_up_coins.tsv") public static int pickUpCoins(List<Integer> coin...
src/main/java/org/calvin/__Book/epi/PickingUpCoins.java
0.813275
0.425128
PickingUpCoins.java
starcoder
package com.peterabeles.regression; /** * A double array which can have its size changed * * @author <NAME> */ public class DGrowArray { public double[] data; public int length; public DGrowArray(int length ) { this.data = new double[length]; this.length = length; } public DGr...
tools/regression/src/main/java/com/peterabeles/regression/DGrowArray.java
0.874881
0.453988
DGrowArray.java
starcoder
import java.util.*; class Factor { public static List<Integer> factorize(int num) { int i = 2; List<Integer> result = new ArrayList<>(); while (num > i * i) { while (num % i == 0) { result.add(i); num /= i; } i++; } if (num > 1) { result.add(num); } ...
factor/Factor.java
0.628749
0.440349
Factor.java
starcoder
package com.opengamma.financial.currency; import java.util.Set; import com.google.common.collect.ImmutableSet; import com.opengamma.OpenGammaRuntimeException; import com.opengamma.core.security.Security; import com.opengamma.engine.ComputationTarget; import com.opengamma.engine.ComputationTargetType; import com.openg...
projects/OG-Financial/src/main/java/com/opengamma/financial/currency/YCNSPnLSeriesCurrencyConversionFunction.java
0.728362
0.481332
YCNSPnLSeriesCurrencyConversionFunction.java
starcoder
import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Point; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Optional; ...
src/main/java/Task4.java
0.825941
0.451206
Task4.java
starcoder
package org.apache.fineract.portfolio.savings.domain.interest; import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.organisation.monet...
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/QuarterlyCompoundingPeriod.java
0.839306
0.561095
QuarterlyCompoundingPeriod.java
starcoder
package shiver.me.timbers.data.random; import java.math.BigDecimal; import java.util.Random; import java.util.concurrent.Callable; import static java.lang.String.format; import static java.math.BigDecimal.ZERO; import static shiver.me.timbers.data.random.Retries.retry; /** * @author <NAME> */ class BigDecimalOpera...
smt-random-numbers/src/main/java/shiver/me/timbers/data/random/BigDecimalOperations.java
0.929864
0.432183
BigDecimalOperations.java
starcoder
package io.deephaven.engine.table.impl.sources; import io.deephaven.engine.table.ColumnSource; import io.deephaven.engine.table.WritableColumnSource; import io.deephaven.engine.table.impl.sources.immutable.*; import io.deephaven.engine.table.impl.sources.immutable.Immutable2DCharArraySource; import io.deephaven.engine...
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/InMemoryColumnSource.java
0.844858
0.413832
InMemoryColumnSource.java
starcoder
package de.edgelord.saltyengine.collision.collider; import de.edgelord.saltyengine.collision.CollisionDetectionResult; import de.edgelord.saltyengine.core.interfaces.TransformedObject; import de.edgelord.saltyengine.gameobject.GameObject; import de.edgelord.saltyengine.transform.Dimensions; import de.edgelord.saltyeng...
src/main/java/de/edgelord/saltyengine/collision/collider/CircleCollider.java
0.907911
0.439146
CircleCollider.java
starcoder
package io.vavr.collection; import io.vavr.Tuple2; import java.io.Serializable; import java.util.ArrayList; import java.util.Comparator; import java.util.Objects; import java.util.function.BiConsumer; import java.util.function.BinaryOperator; import java.util.function.Function; import java.util.function.Supplier; imp...
src/main/java/io/vavr/collection/LinkedHashMultimap.java
0.946411
0.428831
LinkedHashMultimap.java
starcoder
package org.apache.datasketches.theta; import static org.apache.datasketches.Family.idToFamily; import static org.apache.datasketches.HashOperations.count; import static org.apache.datasketches.Util.DEFAULT_UPDATE_SEED; import static org.apache.datasketches.Util.LONG_MAX_VALUE_AS_DOUBLE; import static org.apache.datas...
src/main/java/org/apache/datasketches/theta/Sketch.java
0.816223
0.603465
Sketch.java
starcoder
package leetcode.graph; import java.util.HashSet; import java.util.Scanner; import java.util.Stack; /** * Created by Joshua on 5/14/17. */ public class DFS { public static class Element { int x; int y; public Element(int x, int y) { this.x = x; this.y = y; ...
src/main/java/leetcode/graph/DFS.java
0.714728
0.411052
DFS.java
starcoder
package Tools; import org.apache.commons.math3.random.UnitSphereRandomVectorGenerator; public class Array { public static double[] getRandom(int d) { UnitSphereRandomVectorGenerator uvg = new UnitSphereRandomVectorGenerator(d); return uvg.nextVector(); } public static void set...
src/Tools/Array.java
0.642432
0.57093
Array.java
starcoder
package org.apache.lucene.search.suggest.fst; import java.io.Closeable; import java.io.IOException; import java.util.Comparator; import org.apache.lucene.search.suggest.InMemorySorter; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefBuilder; import org.apache.lucene.util.BytesRefIterator;...
lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionBuilder.java
0.899839
0.412648
FSTCompletionBuilder.java
starcoder
package com.opengamma.financial.analytics.model.equity.option; import java.util.Set; import org.threeten.bp.ZonedDateTime; import com.opengamma.OpenGammaRuntimeException; import com.opengamma.analytics.financial.equity.StaticReplicationDataBundle; import com.opengamma.analytics.financial.model.interestrate.curve.For...
projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/equity/option/EquityOptionBlackBasicFunction.java
0.84296
0.601711
EquityOptionBlackBasicFunction.java
starcoder
package oracle.kv.avro; import org.apache.avro.generic.GenericRecord; import org.apache.avro.specific.SpecificRecord; import oracle.kv.Value; import oracle.kv.Value.Format; import oracle.kv.ValueBinding; /** * The {@code AvroBinding} interface has the same methods as {@link * ValueBinding}, but adds semantics and ...
src/oracle/kv/avro/AvroBinding.java
0.933431
0.54825
AvroBinding.java
starcoder
package project.umami; public class MatrixNode implements Comparable<MatrixNode> { private Atom atom1; private Atom atom2; private float bondOrder; /** * */ public MatrixNode() { } /** * * @param atom1 * @param atom2 * @param bondOrder */ public MatrixNode(Atom atom1, Atom atom2, float ...
src/main/java/project/umami/MatrixNode.java
0.882028
0.468791
MatrixNode.java
starcoder
* @file IListenDataPacket.java * * @brief Interface a component will need to implement and export as * implemented interface in order to get data packet * * Interface a component will need to implement and export as * implemented interface in order to get data packet */ package org.opendaylight.controller.s...
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/packet/IListenDataPacket.java
0.753104
0.422683
IListenDataPacket.java
starcoder
package org.eclipse.gef.editparts; import org.eclipse.draw2d.PositionConstants; import org.eclipse.draw2d.Viewport; import org.eclipse.draw2d.geometry.Insets; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gef.AutoexposeHelper; import org.eclipse.gef.Graphic...
org.eclipse.gef/src/org/eclipse/gef/editparts/ViewportAutoexposeHelper.java
0.82251
0.420481
ViewportAutoexposeHelper.java
starcoder
package functionalj.stream.doublestream; import java.util.concurrent.atomic.AtomicInteger; import functionalj.function.IntDoubleConsumer; import functionalj.stream.markers.Eager; import functionalj.stream.markers.Terminal; import lombok.val; public interface AsDoubleStreamPlusWithForEach { public DoubleStr...
functionalj-core/src/main/java/functionalj/stream/doublestream/AsDoubleStreamPlusWithForEach.java
0.718693
0.404919
AsDoubleStreamPlusWithForEach.java
starcoder
package trading.economy; import trading.net.*; import org.json.*; import java.io.*; //TODO: /**Functional interface representing a function to calculate the price of a BuyListing given the BuyListing and a BackpackTFConnection, which can be used to make Backpack.tf API calls.<br> This interface contains static metho...
src/trading/economy/BuyListingPriceFunction.java
0.613815
0.487978
BuyListingPriceFunction.java
starcoder
package io.github.syst3ms.skriptparser.file; import io.github.syst3ms.skriptparser.log.SkriptLogger; import io.github.syst3ms.skriptparser.util.FileUtils; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * A class for parsing a plaintext file int...
src/main/java/io/github/syst3ms/skriptparser/file/FileParser.java
0.817174
0.47658
FileParser.java
starcoder
package leetcode3; import java.util.HashMap; import java.util.Map; public class ConstructBinaryTreeFromPreorderAndInorderTraversal { public static void main(String[] args) { Solution solution = new ConstructBinaryTreeFromPreorderAndInorderTraversal().new Solution(); } public class TreeNode { ...
bitkylin-algorithm/section-3/leetcode3/ConstructBinaryTreeFromPreorderAndInorderTraversal.java
0.834542
0.457016
ConstructBinaryTreeFromPreorderAndInorderTraversal.java
starcoder
package com.google.template.soy.types; import static java.util.Comparator.comparing; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Iterables; import...
java/src/com/google/template/soy/types/UnionType.java
0.921552
0.406626
UnionType.java
starcoder
package frc.robot.pure_pursuit; import java.util.ArrayList; import java.util.List; public class PurePursuitPathGenerator { private final List<PurePursuitWaypoint> mUpsampled; private final List<PurePursuitWaypoint> mSmoothed; /** * Constructor. * * @param aWaypoints * The ...
CoordinateGuiStandalone/src/main/java/frc/robot/pure_pursuit/PurePursuitPathGenerator.java
0.932269
0.682551
PurePursuitPathGenerator.java
starcoder
package org.im97mori.ble.characteristic.core; /** * Utility for Temperature Type (0x2A1D) characteristic */ public class TemperatureTypeUtils { /** * 1: Armpit */ public static final int TEMPERATURE_TEXT_DESCRIPTION_TYPE_ARMPIT = 1; /** * 2: Body (general) */ public static final...
characteristic/core/src/main/java/org/im97mori/ble/characteristic/core/TemperatureTypeUtils.java
0.920591
0.417331
TemperatureTypeUtils.java
starcoder
package jsat.distributions.multivariate; import java.util.ArrayList; import java.util.List; import java.util.Random; import jsat.classifiers.DataPoint; import jsat.linear.CholeskyDecomposition; import jsat.linear.DenseMatrix; import jsat.linear.DenseVector; import jsat.linear.LUPDecomposition; import jsat.linear.Matri...
jsat/src/main/java/jsat/distributions/multivariate/NormalM.java
0.944779
0.693666
NormalM.java
starcoder
package au.gov.asd.tac.constellation.graph.schema.analytic.attribute.objects; import au.gov.asd.tac.constellation.graph.GraphAttribute; import au.gov.asd.tac.constellation.graph.GraphWriteMethods; import au.gov.asd.tac.constellation.graph.processing.GraphRecordStore; import au.gov.asd.tac.constellation.graph.processin...
CoreAnalyticSchema/src/au/gov/asd/tac/constellation/graph/schema/analytic/attribute/objects/ExpandedCompositeNodeState.java
0.915152
0.508666
ExpandedCompositeNodeState.java
starcoder
package ladysnake.permafrozen.worldgen.terrain; import java.util.Random; /** * 2D OpenSimplexNoise */ public class OpenSimplexNoise extends RawOpenSimplexNoise { public OpenSimplexNoise(Random rand) { super(rand.nextLong()); this.xOffset = rand.nextDouble(); this.yOffset = rand.nextDouble(); } private fi...
src/main/java/ladysnake/permafrozen/worldgen/terrain/OpenSimplexNoise.java
0.685318
0.46794
OpenSimplexNoise.java
starcoder
package com.google.android.exoplayer.dash.mpd; import junit.framework.TestCase; /** * Unit test for {@link RangedUri}. */ public class RangedUriTest extends TestCase { private static final String BASE_URI = "http://www.test.com/"; private static final String PARTIAL_URI = "path/file.ext"; private static final...
library/src/androidTest/java/com/google/android/exoplayer/dash/mpd/RangedUriTest.java
0.90615
0.602442
RangedUriTest.java
starcoder
package algorithm.level1PrefixSum; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class FindWords { /** * @param str: the string * @param dict: the dictionary * @return: return words which are subsequences of the string */ public...
src/algorithm/level1PrefixSum/FindWords.java
0.864124
0.40592
FindWords.java
starcoder
package Utility; public class Utility { protected static final double MAXGAM = 171.624376956302725; protected static final double LOGPI = 1.14472988584940017414; protected static final double MACHEP = 1.11022302462515654042E-16; protected static final double MAXLOG = 7.09782712893383996732E2; ...
statistics/src/Utility/Utility.java
0.590071
0.436202
Utility.java
starcoder
package com.kepler.util.common; /** * 常用变量,主要解决魔法值问题 * * @author 杨水美 */ public class Constants { public static final String MD5 = "MD5"; public static final Integer DEFAULT_SCALE = 2; public static final String DATE_TIME_FORMAT_STR = "yyyy-MM-dd HH:mm:ss"; public static final String DATE_FORMAT...
util/common-util/src/main/java/com/kepler/util/common/Constants.java
0.529993
0.431285
Constants.java
starcoder
package com.ravram.nemesis.util.misc; import com.ravram.nemesis.Attempt; import com.ravram.nemesis.coerce.Convert; import io.lacuna.bifurcan.List; import io.lacuna.bifurcan.Map; import java.util.ArrayList; import java.util.HashMap; public class Collections { public static <E, K1, K2, A, B> Attempt<Map<K2, B>> t...
src/com/ravram/nemesis/util/misc/Collections.java
0.792946
0.400486
Collections.java
starcoder
package com.ys.f.g.h; /** * Created by Joy on 2020-04-10 */ public class E { public static E getInE() { return EHolder.e; } private static class EHolder { private static E e = new E(); } public int a11(int a) { return a; } public int a12(int a) { return a; } public int a13(int...
scalpellibrary/src/main/java/com/ys/f/g/h/E.java
0.76145
0.416085
E.java
starcoder
package com.vzome.core.algebra; public class RootTwoField extends AlgebraicField { public RootTwoField() { super( "rootTwo" ); // we start with 1/2 just because we did in the golden field defaultStrutScaling = createAlgebraicNumber( 1, 0, 2, -3 ); }; @Override pu...
src/main/java/com/vzome/core/algebra/RootTwoField.java
0.755547
0.400573
RootTwoField.java
starcoder
package org.joda.time; import java.io.Serializable; import org.joda.convert.FromString; import org.joda.time.base.BasePeriod; import org.joda.time.chrono.ISOChronology; import org.joda.time.field.FieldUtils; import org.joda.time.format.ISOPeriodFormat; import org.joda.time.format.PeriodFormatter; /** * An immutable...
Examples/Time-24/src/main/java/org/joda/time/Period.java
0.957148
0.683304
Period.java
starcoder