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.opengamma.financial.montecarlo; import org.apache.commons.lang.Validate; import com.opengamma.financial.interestrate.AbstractInterestRateDerivativeVisitor; import com.opengamma.financial.interestrate.InterestRateDerivative; import com.opengamma.financial.interestrate.payments.CapFloorIbor; import com.open...
projects/OG-Analytics/src/com/opengamma/financial/montecarlo/MonteCarloIborRateCalculator.java
0.851722
0.587411
MonteCarloIborRateCalculator.java
starcoder
package mb.flowspec.controlflow; import java.util.Set; public interface IControlFlowGraph { /** * @return The next nodes of a node in (one of) the control flow graph(s). */ Set<ICFGNode> nextNodes(ICFGNode from); /** * @return The previous nodes of a node in (one of) the control flow graph...
flowspec.runtime/src/main/java/mb/flowspec/controlflow/IControlFlowGraph.java
0.786787
0.608274
IControlFlowGraph.java
starcoder
package efficientSorts; import abstractions.AbstractSorting; import utility.Utility; /** * Quicksort is based on the divide-and-conquer paradigm. The algorithm chooses * a pivot element and rearranges the elements of the interval in such a way * that all elements lesser than the pivot go to the left part of the ar...
efficientSorts/QuickSort.java
0.871693
0.593609
QuickSort.java
starcoder
package uk.org.tombolo.importer; import com.vividsolutions.jts.geom.Geometry; import org.geotools.data.DataStore; import org.geotools.data.DataStoreFinder; import org.geotools.data.FeatureReader; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.operation.projection.ProjectionException; import org....
src/main/java/uk/org/tombolo/importer/AbstractGeotoolsDataStoreImporter.java
0.882124
0.466177
AbstractGeotoolsDataStoreImporter.java
starcoder
package org.avantssar.aslanpp.model; import java.util.ArrayList; import java.util.List; import org.avantssar.aslanpp.visitors.IASLanPPVisitor; public class LTLExpression extends AbstractExpression { public static final String GLOBALLY = "G"; public static final String HISTORICALLY = "H"; private final String op...
src/aslanpp-core/src/main/java/org/avantssar/aslanpp/model/LTLExpression.java
0.748444
0.41324
LTLExpression.java
starcoder
package com.yo.algorithm.practise.cig.chapter_01_stackandqueue.problem_01_getminstack.impl; import java.util.Stack; /** * 有getMin功能的栈(待压入的数据必须是已经实现了Comparable接口的类型,用于比较元素大小) * 所有操作的时间复杂度:O(1),即常数复杂度;空间复杂度:O(n) * 优缺点:push时稍省空间(因为当新压入元素比stackMin栈顶元素大时,不需要将其压入stackMin),pop时稍费时间(因为需要判断stackData弹出元素是否比stackMin栈顶元素小) *...
src/com/yo/algorithm/practise/cig/chapter_01_stackandqueue/problem_01_getminstack/impl/GetMinStackV1.java
0.680666
0.54256
GetMinStackV1.java
starcoder
package frc.team2412.robot.util; import edu.wpi.first.wpilibj.Timer; import org.frcteam2910.common.math.MathUtils; import org.frcteam2910.common.math.Vector2; import org.frcteam2910.common.math.Vector3; /** * Class for PFF controllers that provide P controllers but with the advantage of FeedForward * * @author <NA...
src/main/java/frc/team2412/robot/util/PFFController.java
0.924373
0.548613
PFFController.java
starcoder
package io.rtdi.bigdata.kafka.avro.datatypes; import java.util.Arrays; import java.util.List; import org.apache.avro.LogicalType; import org.apache.avro.LogicalTypes.LogicalTypeFactory; import org.apache.avro.Schema.Type; import org.apache.avro.Schema; import org.apache.avro.generic.GenericData.Record; import io.rtd...
src/main/java/io/rtdi/bigdata/kafka/avro/datatypes/AvroArray.java
0.830628
0.445168
AvroArray.java
starcoder
package algorithem.problem80; import algorithem.sortingalgorithm.SortingAlgorithm; /** * Given an array full of integers implement a quick sort algorithm to sort the content inside * the array. */ public class QuickSort extends SortingAlgorithm { /** * Quicksort (sometimes called partition-exchange sort) is an...
jb-app/jb-algorithem/src/main/java/algorithem/problem80/QuickSort.java
0.842378
0.534066
QuickSort.java
starcoder
package us.ihmc.robotics.geometry.shapes; import javax.vecmath.Matrix3d; import javax.vecmath.Point3d; import javax.vecmath.Point3f; import javax.vecmath.Quat4d; import javax.vecmath.Vector3d; import javax.vecmath.Vector3f; import javax.vecmath.Vector4d; import javax.vecmath.Vector4f; import us.ihmc.robotics.geometry...
IHMCRoboticsToolkit/src/us/ihmc/robotics/geometry/shapes/Shape3d.java
0.940044
0.646376
Shape3d.java
starcoder
package com.github.opennano.reflectionassert.comparers; import static com.github.opennano.reflectionassert.diffs.NullDiff.NULL_TOKEN; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.EnumSet; import java.util.Iterator; import java.util.LinkedHashSet; import java.util....
reflection-assert/src/main/java/com/github/opennano/reflectionassert/comparers/OrderedCollectionComparer.java
0.910558
0.605478
OrderedCollectionComparer.java
starcoder
package javax.realtime; /** * An object that represents a specific point in time given by * milliseconds plus nanoseconds past the epoch (January 1, 1970, * 00:00:00 GMT). This representation was designed to be compatible * with the standard Java representation of an absolute time in the * java.util.Date class. ...
src/javax/realtime/AbsoluteTime.java
0.926636
0.529932
AbsoluteTime.java
starcoder
package paint; // Ellipse.java // Class for an ellipse. // Helper methods written by THC for CS 5 Lab Assignment 3. // Modified by <NAME> for CS5 Lab Assignment #3 import java.awt.*; public class Ellipse extends Shape { private int x; // Leftmost x-coord of ellipse's bounding box private int y; // Leftmost y-...
paint/src/paint/Ellipse.java
0.907485
0.503174
Ellipse.java
starcoder
* Modified by the Sable Research Group and others 1997-1999. * See the 'credits' file distributed with Soot for the complete list of * contributors. (Soot is distributed at http://www.sable.mcgill.ca/soot) */ package soot.jimple.toolkits.annotation.arraycheck; import soot.options.*; import soot.* ; import soot...
Core/soot/src/main/java/soot/jimple/toolkits/annotation/arraycheck/ArrayBoundsCheckerAnalysis.java
0.65368
0.433862
ArrayBoundsCheckerAnalysis.java
starcoder
package net.imglib2.algorithm.hough; import java.util.List; import java.util.function.Predicate; import net.imglib2.Cursor; import net.imglib2.Dimensions; import net.imglib2.Point; import net.imglib2.RandomAccess; import net.imglib2.RandomAccessibleInterval; import net.imglib2.algorithm.localextrema.LocalExtrema; imp...
src/main/java/net/imglib2/algorithm/hough/HoughTransforms.java
0.922246
0.514156
HoughTransforms.java
starcoder
package org.pengfei.Lesson13_Common_Data_Structure.L13_S9_Maps_HashTables_SkipLists; import java.util.Map.Entry; public class L13_S9_SortedMaps { public static void main(String[] args){ /************************************************************************************************ * **********...
LearningJava/src/main/java/org/pengfei/Lesson13_Common_Data_Structure/L13_S9_Maps_HashTables_SkipLists/L13_S9_SortedMaps.java
0.748628
0.636014
L13_S9_SortedMaps.java
starcoder
package uk.co.norphos.crystallography.adaptor.apachemaths; import org.apache.commons.math3.linear.ArrayRealVector; import org.apache.commons.math3.linear.RealVector; import uk.co.norphos.crystallography.api.maths.Vector; public class ApacheVector implements Vector { private RealVector vector; publ...
apache-maths/src/main/java/uk/co/norphos/crystallography/adaptor/apachemaths/ApacheVector.java
0.889906
0.430806
ApacheVector.java
starcoder
package de.henku.computations; import de.henku.jpaillier.PublicKey; import java.math.BigInteger; /** * A class for securely computing the sum of the input from two or more parties. * <p> * For detailed usage instructions see {@link SecureComputationMaster}. * * @see AbstractSecureComputationSlave */ public cla...
core/src/main/java/de/henku/computations/SecureAddition.java
0.922075
0.482856
SecureAddition.java
starcoder
package io.github.solf.extra2.collection; import static io.github.solf.extra2.util.NullUtil.nn; import java.util.AbstractSet; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.stre...
src/main/java/io/github/solf/extra2/collection/RHashSet.java
0.941345
0.427397
RHashSet.java
starcoder
package core; /** * if-else 控制流 */ public class IfElseFlow extends Flow { private Datable conditionData; // 判断条件,因为是动态类型语言,所以每次运行时都要重新判定类型 private Flowable trueFlow; // 真值流 private Flowable falseFlow; // 假值流 private Flowable nextFlow; // 下一流 public IfElseFlow(Datable conditionData...
src/main/java/core/IfElseFlow.java
0.663015
0.440168
IfElseFlow.java
starcoder
package info.ephyra.questionanalysis.atype.extractor; import info.ephyra.questionanalysis.atype.minorthird.hierarchical.HierarchicalClassifier; import info.ephyra.util.Properties; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Patte...
lucida/questionanswering/OpenEphyra/src/info/ephyra/questionanalysis/atype/extractor/FeatureExtractor.java
0.774157
0.427905
FeatureExtractor.java
starcoder
package com.foolish.a2de.physics; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import android.graphics.RectF; import com.foolish.a2de.graphics.Rectangle; import com.foolish.a2de.graphics.Shape; public class SimpleRectanglePhysics implements IPhysics2D { private List<Rectangle> mPoss...
src/com/foolish/a2de/physics/SimpleRectanglePhysics.java
0.855987
0.503662
SimpleRectanglePhysics.java
starcoder
package com.adventofcode.year2017; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; public class Day16 { private static final Logger LOGGER = LoggerFact...
src/main/java/com/adventofcode/year2017/Day16.java
0.895842
0.448547
Day16.java
starcoder
package o6167656e74323431.stupidjava; import java.security.SecureRandom; /** * This class provides a probabilistic array searching algorithm. * * @author 6167656e74323431 * * @version 1.4 */ public final class BogoSearch { /** * Private default constructor to prevent the creation of instances of the ...
src/o6167656e74323431/stupidjava/BogoSearch.java
0.854521
0.441252
BogoSearch.java
starcoder
package co.edu.uniandes.csw.idiomas.ejb; import co.edu.uniandes.csw.idiomas.entities.ActividadEntity; import co.edu.uniandes.csw.idiomas.entities.GrupoDeInteresEntity; import co.edu.uniandes.csw.idiomas.exceptions.BusinessLogicException; import co.edu.uniandes.csw.idiomas.persistence.ActividadPersistence; import co.ed...
s2_idiomas-back/src/main/java/co/edu/uniandes/csw/idiomas/ejb/ActividadesGrupoDeInteresLogic.java
0.65379
0.423398
ActividadesGrupoDeInteresLogic.java
starcoder
package signalproc.converters; import org.trianacode.taskgraph.Unit; import triana.types.VectorType; /** * Converts a vector type into two double arrays * * @author <NAME> * @version $Revision: 2921 $ */ public class VectToDoubleArray extends Unit { /* * Called whenever there is data for the unit to ...
triana-toolboxes/signalproc/src/main/java/signalproc/converters/VectToDoubleArray.java
0.704465
0.433022
VectToDoubleArray.java
starcoder
package sb223ce_assign2.ex4; import static org.junit.Assert.fail; import static org.junit.jupiter.api.Assertions.*; import java.util.Iterator; import java.util.NoSuchElementException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; public class QueueTest { private QueueImpl<Integer> su...
src/sb223ce_assign2/ex4/QueueTest.java
0.777975
0.484258
QueueTest.java
starcoder
package edu.princeton.cs.exercise.chapter1_3; import edu.princeton.cs.algs4.Stack; import edu.princeton.cs.algs4.StdOut; /** * 1.3.45 Stack generability. Suppose that we have a sequence of intermixed push and pop operations * as with our test stack client, where the integers 0, 1, . . . , N-1 in that order (push *...
alg4/src/edu/princeton/cs/exercise/chapter1_3/E01_03_45.java
0.657428
0.531574
E01_03_45.java
starcoder
package org.foxlabs.common.text; public interface CharDecoder { int decode(CharSegment segment, int index, CharBuffer buffer); /** * An identity character decoder that does not apply any conversion to characters and appends * them to the buffer as is (1:1 mapping). */ CharDecoder IDENTITY = new CharDe...
src/main/java/org/foxlabs/common/text/CharDecoder.java
0.899568
0.439988
CharDecoder.java
starcoder
package q500; import org.junit.runner.RunWith; import util.runner.Answer; import util.runner.LeetCodeRunner; import util.runner.TestData; import util.runner.data.DataExpectation; /** * https://leetcode.com/problems/circular-array-loop/ * * You are given a circular array nums of positive and negative integers. If a...
src/main/java/q500/Q457_CircularArrayLoop.java
0.879043
0.575976
Q457_CircularArrayLoop.java
starcoder
package com.flightstats.analytics.tree.regression; import com.flightstats.analytics.tree.*; import java.util.*; import java.util.stream.Stream; import static com.google.common.collect.Iterables.concat; import static com.google.common.collect.Lists.newArrayList; import static java.util.stream.Collectors.toList; publ...
algorithms/src/main/java/com/flightstats/analytics/tree/regression/RegressionTreeTrainer.java
0.724091
0.552479
RegressionTreeTrainer.java
starcoder
package uk.ac.manchester.cs.hobo.model; import uk.ac.manchester.cs.mekon.model.*; import uk.ac.manchester.cs.hobo.*; /** * Interface implemented by all classes in the Object Model (OM). * Each such class will be bound to a {@link CFrame} object, * representing a concept-level frame in the Frames Model (F...
hobo/src/uk/ac/manchester/cs/hobo/model/DObject.java
0.831349
0.422147
DObject.java
starcoder
package org.eclipse.pde.internal.ui.editor.schema; import org.eclipse.pde.internal.core.ischema.*; import org.eclipse.pde.internal.core.schema.*; import org.eclipse.pde.internal.ui.util.PDELabelUtility; public class SchemaRearranger { private Schema fSchema; public SchemaRearranger(Schema schema) { ...
corpus/class/eclipse.pde.ui/698.java
0.590189
0.412294
698.java
starcoder
package jp.co.yahoo.yosegi.inmemory; import jp.co.yahoo.yosegi.spread.column.ColumnType; import org.apache.arrow.memory.BufferAllocator; import org.apache.arrow.vector.AddOrGetResult; import org.apache.arrow.vector.BigIntVector; import org.apache.arrow.vector.BitVector; import org.apache.arrow.vector.Float4Vector; im...
src/main/java/jp/co/yahoo/yosegi/inmemory/ArrowMemoryAllocatorFactory.java
0.60054
0.481515
ArrowMemoryAllocatorFactory.java
starcoder
package org.cryptimeleon.math.misc; import org.cryptimeleon.math.hash.ByteAccumulator; import org.cryptimeleon.math.prf.PrfImage; import org.cryptimeleon.math.prf.PrfKey; import org.cryptimeleon.math.prf.PrfPreimage; import org.cryptimeleon.math.random.RandomGenerator; import org.cryptimeleon.math.serialization.Repres...
src/main/java/org/cryptimeleon/math/misc/ByteArrayImpl.java
0.895294
0.42322
ByteArrayImpl.java
starcoder
package gov.va.med.imaging; import java.io.IOException; import java.io.Serializable; import java.net.InetAddress; import java.net.UnknownHostException; import org.apache.log4j.Logger; /** * @author <NAME> mailto:<EMAIL> * @since Oct 28, 2004 4:42:21 PM *<p> * Generate GUID based on:<br/> * <li>host ID</li> * ...
Source/Java/ImagingCommon/main/src/java/gov/va/med/imaging/GUID.java
0.574156
0.410934
GUID.java
starcoder
package frc.robot.tools.pathing; import frc.robot.subsystems.Drive; import frc.robot.subsystems.Peripherals; public class Odometry { private double left; private double currentLeft; private double dLeft; private double right; private double currentRight; private double dRight; private do...
src/main/java/frc/robot/tools/pathing/Odometry.java
0.751466
0.432782
Odometry.java
starcoder
package requriment_1; import java.util.stream.IntStream; public class TicTacToeAI { public boolean winning(String[] board, String player) { if((board[0] == player && board[1] == player && board[2] == player) || (board[3] == player && board[4] == player && board[5] == player) ...
src/main/java/requriment_1/TicTacToeAI.java
0.548674
0.457197
TicTacToeAI.java
starcoder
package com.amobee.freebee.bench.range; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Range { private static final String RANGE_REGEX = "[\\[\\(](\\d+),(\\d+)[\\]\\)]"; private static final Pattern RANGE_REGEX_PATTERN = Pattern.compile(RANGE_REGEX); private long lowerBoundI...
freebee-bench/src/main/java/com/amobee/freebee/bench/range/Range.java
0.90741
0.421135
Range.java
starcoder
import org.junit.Test; import static org.junit.Assert.*; public class CadenaMiaTest { @Test public void testFactoria() { System.out.println("factoria"); CadenaMia result = CadenaMia.factoria("no"); assertEquals(null, result); result = CadenaMia.factoria("nosotros"); ...
EDD/Examenes/EDex3/CadenaMiaTest.java
0.73173
0.41052
CadenaMiaTest.java
starcoder
package josch.persistency.interfaces; import josch.model.dto.CollectionDto; import josch.model.dto.SchemaDto; import josch.model.dto.ValidationDto; import java.time.LocalDate; import java.util.Iterator; import java.util.List; import java.util.Map; /** * This {@code IClient} interface encapsulates the functionality ...
josch/josch.persistency/josch.persistency.interfaces/src/main/java/josch/persistency/interfaces/IClient.java
0.875375
0.462048
IClient.java
starcoder
package boofcv.abst.feature.describe; import boofcv.struct.feature.TupleDesc; import boofcv.struct.image.ImageBase; import boofcv.struct.image.ImageType; /** * High level interface for describing the region around a point when given the pixel coordinate of the point, * the region's radius, and the regions orientati...
main/boofcv-feature/src/main/java/boofcv/abst/feature/describe/DescribePointRadiusAngle.java
0.907428
0.638694
DescribePointRadiusAngle.java
starcoder
package org.opensim.modeling; /** * This is a dataless rehash of the MatrixBase class to specialize it for Vectors.<br> * This mostly entails overriding a few of the methods. Note that all the MatrixBase<br> * operations remain available if you static_cast&lt;&gt; this up to a MatrixBase. */ public class Vector...
Gui/opensim/modeling/src/org/opensim/modeling/VectorBaseVec3.java
0.880976
0.416441
VectorBaseVec3.java
starcoder
package com.daasuu.library.drawer; import android.graphics.Canvas; import android.graphics.Paint; /** * drawer that can be drawn on the canvas without restrictions. */ public class CustomDrawer extends BaseDrawer { private CustomDraw mCustomDraw; public CustomDrawer(CustomDraw customDraw) { super(...
library/src/main/java/com/daasuu/library/drawer/CustomDrawer.java
0.942546
0.413596
CustomDrawer.java
starcoder
package com.carlsenbot.position; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; class PositionTest { @Test void setX() { Position pos = new Position(); pos.setX(0); assertEquals( 0, pos.getX()); pos.setX(128); assertEqua...
test/com/carlsenbot/position/PositionTest.java
0.925559
0.638427
PositionTest.java
starcoder
package com.wedeploy.android.query.filter; import com.wedeploy.android.query.BodyConvertible; import com.wedeploy.android.query.MapWrapper; import com.wedeploy.android.util.StringUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; impo...
src/main/java/com/wedeploy/android/query/filter/Filter.java
0.834306
0.517754
Filter.java
starcoder
package com.competitiveCodes.array; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; /** * Date 07/31/2016 * @author <NAME> * * Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? * Find all unique quadr...
src/com/competitiveCodes/array/FourSum.java
0.911842
0.444263
FourSum.java
starcoder
package org.coinor.opents; /** * <p> * This implementation of a tabu list uses the {@link Move}'s <code>hashCode()</code> * method to determine the move's identity. * <strong>It is imperative that you override the <code>hashCode()</code> * method with one that identifies the move appropriately for your prob...
src/org/coinor/opents/SimpleTabuList.java
0.914362
0.52074
SimpleTabuList.java
starcoder
package com.philips.research.regression.app; import com.philips.research.regression.primitives.Cholesky; import com.philips.research.regression.primitives.Hessian; import com.philips.research.regression.primitives.LocalLogLikelihoodPrime; import com.philips.research.regression.primitives.UpdateLearnedModel; import com...
src/main/java/com/philips/research/regression/app/FitLogisticModel.java
0.89367
0.453806
FitLogisticModel.java
starcoder
package org.yeastrc.experiment.stats; import org.yeastrc.experiment.File; import org.yeastrc.www.util.RoundingUtils; public class FileStats implements File, Comparable<FileStats>{ private final String filename; private final int id; private int totalCount; private int goodCount; private...
MSDaPl_Web_App/src/org/yeastrc/experiment/stats/FileStats.java
0.739893
0.410934
FileStats.java
starcoder
package barneshut; import edu.princeton.cs.StdDraw; /** * * @author orgho */ public class Quadrant { private double[] midpoint = new double[2]; private double length; /** * Create a New quadrant of Space * * @param midpoint The midpoint of the quadrant [x,y] * @param length The le...
barnesHut/src/barneshut/Quadrant.java
0.940654
0.406332
Quadrant.java
starcoder
package org.launchcode.capstonepracticetrack; import org.launchcode.capstonepracticetrack.models.*; import org.launchcode.capstonepracticetrack.models.data.InstrumentDao; import org.launchcode.capstonepracticetrack.models.data.PracticeSessionDao; import org.launchcode.capstonepracticetrack.models.data.SkillDao; import...
capstone-practice-track/src/main/java/org/launchcode/capstonepracticetrack/Helpers.java
0.84124
0.417746
Helpers.java
starcoder
package com.rtg.taxonomy; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.StringWriter; import java.util.ArrayList; import com.rtg.util.StringUtils; import com.rtg.util.diagnostic.Diagnostic; import com.rtg.util.io.FileUtils; import com.rtg.util.test.FileHelper; import ...
test/com/rtg/taxonomy/TaxonomyTest.java
0.845401
0.45308
TaxonomyTest.java
starcoder
package calculadora; import java.util.ArrayList; /** * Determina si la expresión está bien escrita * * @author <NAME> * Git: cristianecheverri * Tercer proyecto Estructuras de datos * Ingeniería en informática * Tercer semestre * Universidad de Caldas - Colombia * Docente: <NAME> * */ public class Ana...
src/calculadora/AnalizadorLexico.java
0.758421
0.423995
AnalizadorLexico.java
starcoder
package com.opengamma.strata.product; import java.util.HashMap; import java.util.Map; import com.opengamma.strata.basics.StandardId; import com.opengamma.strata.collect.ArgChecker; /** * Builder to create {@code PositionInfo}. * <p> * This builder allows a {@link PositionInfo} to be created. */ public final clas...
modules/product/src/main/java/com/opengamma/strata/product/PositionInfoBuilder.java
0.92924
0.460774
PositionInfoBuilder.java
starcoder
package ro.ubb.dp1819.panaite.dorinel.lab1.ex2; import ro.ubb.dp1819.panaite.dorinel.lab1.ex1.BaseCoffeeIngredients; import java.util.Objects; public class CompoundCoffeeIngredients extends BaseCoffeeIngredients { private BaseCoffeeIngredients firstCoffeeIngredients; private BaseCoffeeIngredients secondCoffe...
src/main/java/ro/ubb/dp1819/panaite/dorinel/lab1/ex2/CompoundCoffeeIngredients.java
0.711331
0.415729
CompoundCoffeeIngredients.java
starcoder
package avrora.core; import avrora.arch.legacy.LegacyInstr; import cck.util.Util; import java.util.*; /** * The <code>ControlFlowGraph</code> represents a control flow graph for an entire program, including all * basic blocks and all procedures. * * @author <NAME> * @see Program * @see ProcedureMap */ public c...
src/avrora/core/ControlFlowGraph.java
0.900565
0.472257
ControlFlowGraph.java
starcoder
package com.thalmic.myo; /** * A quaternion that can be used to represent a rotation. <br> * <br> * This type provides only very basic functionality to store quaternions that's sufficient to retrieve the data * to be placed in a full featured quaternion type. * */ public class Quaternion implements Cloneable { ...
Java/src/com/thalmic/myo/Quaternion.java
0.96108
0.782538
Quaternion.java
starcoder
package org.lwjgl.opengl; import static org.lwjgl.system.Checks.*; import static org.lwjgl.system.JNI.*; /** * Native bindings to the <a href="http://www.opengl.org/registry/specs/ARB/instanced_arrays.txt">ARB_instanced_arrays</a> extension. * * <p>A common use case in GL for some applications is to be able to dr...
Dependencies/opengl/src/org/lwjgl/opengl/ARBInstancedArrays.java
0.866853
0.639286
ARBInstancedArrays.java
starcoder
package com.idrsolutions.pdf.color.shading; import java.awt.Color; import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath; import java.awt.geom.Point2D; /** * Class to hold shading related utilities */ public class ShadingUtils { public static Point2D findIntersect(Point2D p1, Point...
OpenViewerFX/src/main/java/com/idrsolutions/pdf/color/shading/ShadingUtils.java
0.713132
0.435061
ShadingUtils.java
starcoder
package cgeo.geocaching.brouter.core; import cgeo.geocaching.brouter.mapaccess.OsmNode; import cgeo.geocaching.brouter.util.CheapRulerHelper; public class OsmNodeNamed extends OsmNode { public String name; public double radius; // radius of nogopoint (in meters) public double nogoWeight; // weight for no...
main/src/cgeo/geocaching/brouter/core/OsmNodeNamed.java
0.70477
0.501404
OsmNodeNamed.java
starcoder
package Make_Union_Find; import java.util.Arrays; /** * class DisjointForest */ public class DisjointForest { private int[] parent; // parent[i] points to parent of element i or to self. private int[] rank; // rank[i] holds the rank (cardinality) of root element i. private int numberElemen...
src/main/java/Make_Union_Find/DisjointForest.java
0.892082
0.41745
DisjointForest.java
starcoder
package rapaio.ml.model.bayes.nb; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import java.util.List; import org.junit.jupiter.api.Test; import rapaio.data.Frame; import rapaio.data.SolidFrame; import rapaio.data.VarBinary; import rapaio.da...
tst/rapaio/ml/model/bayes/nb/BernoulliEstimatorTest.java
0.847716
0.512632
BernoulliEstimatorTest.java
starcoder
package com.wh.lru; import java.util.HashMap; public class LRU3 { public static void main(String[] args) { LRUNodeCache<Integer,String> lru = new LRUNodeCache<Integer,String>(3); lru.put(1, "a"); // 1:a System.out.println(lru.toString()); lru.put(2, "b"); // 2:b 1:a ...
java/code/somecodes/src/main/java/com/wh/lru/LRU3.java
0.557845
0.514522
LRU3.java
starcoder
class BSTNode { public BSTNode left; public BSTNode right; public BSTNode parent; public int key; public BSTNode(int k, BSTNode l, BSTNode r, BSTNode p) { left = l; right = r; key = k; } } public class BST { static BSTNode treeRoot; public static BSTNode searc...
tree/BST.java
0.553626
0.636099
BST.java
starcoder
package com.github.zj.dreamly.guava.utils; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import org.junit.Test; import java.util.List; import java.util.Objects; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; import static org...
java/guava/src/main/java/com/github/zj/dreamly/guava/utils/PreconditionsTest.java
0.620162
0.432423
PreconditionsTest.java
starcoder
package ru.mephi.interpreter.robot; import java.util.*; /** * @author <NAME> */ class Maze { private final int width, height; private Map<MazeCell, List<MazeCell>> walls = new HashMap<>(); private Deque<MazeCell> teleports = new ArrayDeque<>(); private Set<MazeCell> exits = new HashSet<>(); pri...
src/ru/mephi/interpreter/robot/Maze.java
0.855489
0.427337
Maze.java
starcoder
package org.omg.dds.core.policy; /** * Controls the criteria used to determine the logical order among changes * made by {@link org.omg.dds.pub.Publisher} entities to the same instance of data (i.e., * matching Topic and key). The default kind is * {@link DestinationOrder.Kind#BY_RECEPTION_TIMESTAMP}. * * <b>...
srcJava/org/omg/dds/core/policy/DestinationOrder.java
0.768038
0.471527
DestinationOrder.java
starcoder
package com.google.api.ads.dfa.axis.v1_19; public class PricingSchedule implements java.io.Serializable { private int capCostOption; private java.util.Calendar endDate; private boolean flighted; private com.google.api.ads.dfa.axis.v1_19.PricingPeriod[] pricingPeriods; private int pricingType; ...
modules/dfa_axis/src/main/java/com/google/api/ads/dfa/axis/v1_19/PricingSchedule.java
0.741487
0.436682
PricingSchedule.java
starcoder
package com.nitrobox.keyvalueresolver; import java.util.Collection; import java.util.Objects; /** * Defines a value overridden for a specific domain. DomainSpecificValues are ordered according to the KeyValueResolver precedence rules for * resolution of domain values. DomainSpecificValues can belong to a changeSet...
src/main/java/com/nitrobox/keyvalueresolver/DomainSpecificValue.java
0.934073
0.417212
DomainSpecificValue.java
starcoder
package edu.vanderbilt.imagecrawler.platform; import java.util.HashMap; import java.util.function.BiConsumer; import java.util.function.Function; /** * A simple CacheMap implementation that wraps a HashMap collection and * uses synchronized functions to provide thread-safe access to the * wrapped HashMap. * * Th...
src/main/java/edu/vanderbilt/imagecrawler/platform/SynchronizedCacheMap.java
0.947284
0.505981
SynchronizedCacheMap.java
starcoder
package seedu.address.model.lesson; import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Collections; import java.util.Comparator; import java.util....
src/main/java/seedu/address/model/lesson/Lesson.java
0.96406
0.479321
Lesson.java
starcoder
package nsdlib.rendering.renderer; import nsdlib.elements.NSDElement; import nsdlib.rendering.Size; import nsdlib.rendering.parts.RenderPart; /** * Base class for NS diagram renderers. Subclasses are responsible for * implementing the methods for drawing to their respective medium or output. * * <p> * An implem...
src/main/java/nsdlib/rendering/renderer/NSDRenderer.java
0.933469
0.489564
NSDRenderer.java
starcoder
package com.interview.codechef.ccdsap_2.leetcode.arrays.KWayMerge; import java.util.PriorityQueue; //https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/ public class KthSmallestSortedMatrix { /* 1. Build a minHeap of elements from the first row. Do the following operations k-1 time...
src/com/interview/codechef/ccdsap_2/leetcode/arrays/KWayMerge/KthSmallestSortedMatrix.java
0.903974
0.411909
KthSmallestSortedMatrix.java
starcoder
package com.untamedears.realisticbiomes.model.ltree; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.bukkit.Location; import org.bukkit.util.Vector; public class LStepConfig { private List<LStepConfigChance> results; private double directionWeight; private List<BlockTra...
src/main/java/com/untamedears/realisticbiomes/model/ltree/LStepConfig.java
0.882479
0.557604
LStepConfig.java
starcoder
package com.google.common.collect; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableTable; import com.google.common.collect.Table; import com.google.errorprone.annotations.Immutable; import java.util.LinkedHashMap; import java.util.Map; @Immutable(containerOf = {"R", "C", "V"})...
src/sources/com/google/common/collect/SparseImmutableTable.java
0.847684
0.541894
SparseImmutableTable.java
starcoder
package me.javigs82.training.datastructure.strings; /** * Palindromes are strings that read the same from the left or right, for example madam or 0110. * <p> * You will be given a string representation of a number and a maximum number of changes you can make. * Alter the string, one digit at a time, to create the ...
src/main/java/me/javigs82/training/datastructure/strings/HighestValuePalindrome.java
0.623606
0.440168
HighestValuePalindrome.java
starcoder
package models.tikz; import parser.TikzFormatter; import constants.Models; /** * Implementation of the Rectangle Model (from the MVC architectural pattern) * This class represents a rectangle that is linked to a tikz code */ public class TikzRectangle extends TikzShape { private float width; private float ...
shared/src/models/tikz/TikzRectangle.java
0.944177
0.539408
TikzRectangle.java
starcoder
package de.embl.cba.morphometry.geometry.ellipsoids; import Jama.Matrix; import Jama.SingularValueDecomposition; import net.imglib2.Cursor; import net.imglib2.RandomAccessibleInterval; import net.imglib2.realtransform.AffineTransform3D; import net.imglib2.type.logic.BitType; import net.imglib2.view.Views; import stat...
src/main/java/de/embl/cba/morphometry/geometry/ellipsoids/EllipsoidsMLJ.java
0.543348
0.496033
EllipsoidsMLJ.java
starcoder
package training.linkedlist; import org.junit.jupiter.api.Test; import util.datastructure.function.TriFunction; import static training.linkedlist.ListNode.newList; import static org.junit.jupiter.api.Assertions.assertTrue; import static util.datastructure.SingleLinkedListNode.listEqual; import static util.datastruct...
src/training/linkedlist/E92_Medium_ReverseLinkedListII.java
0.552781
0.560794
E92_Medium_ReverseLinkedListII.java
starcoder
package net.imglib2.algorithm.morphology.distance; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.stre...
src/main/java/net/imglib2/algorithm/morphology/distance/DistanceTransform.java
0.914477
0.46952
DistanceTransform.java
starcoder
package com.github.mittyrobotics.autonomous.pathfollowing; public class Pose2D { /** * The {@link Point2D} and {@link Angle} associated with the pose */ private Point2D position; private Angle angle; /** * Create a new pose with a point (0, 0) and angle 0 */ public Pose2D() { ...
src/main/java/com/github/mittyrobotics/autonomous/pathfollowing/Pose2D.java
0.963257
0.81571
Pose2D.java
starcoder
package demo.org.powermock.examples.tutorial.staticmocking.impl.withoutpowermock; import demo.org.powermock.examples.tutorial.staticmocking.impl.ServiceRegistrator; import demo.org.powermock.examples.tutorial.staticmocking.osgi.BundleContext; import demo.org.powermock.examples.tutorial.staticmocking.osgi.ServiceRegist...
tutorial/src/solution/java/demo/org/powermock/examples/tutorial/staticmocking/impl/withoutpowermock/ServiceRegistratorTest.java
0.775009
0.42674
ServiceRegistratorTest.java
starcoder
package io.streamnative.pulsar.handlers.kop.utils.timer; import io.streamnative.pulsar.handlers.kop.utils.timer.TimerTaskList.TimerTaskEntry; import java.util.List; import java.util.concurrent.DelayQueue; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; import java.util.stream.IntS...
kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/utils/timer/TimingWheel.java
0.734596
0.504089
TimingWheel.java
starcoder
package org.jdesktop.swingx.decorator; import java.awt.Component; import java.util.regex.Pattern; /** * Pattern based HighlightPredicate. <p> * * Turns on the highlight of a single or all columns of the current row if * a match of the String representation of cell content against the given Pattern * is found.<p>...
IDE/src/main/java/org/jdesktop/swingx/decorator/PatternPredicate.java
0.91788
0.691481
PatternPredicate.java
starcoder
package org.com.clusterworker.core.support; /** * * Source Code Fragments From Spring Project * * Assertion utility class that assists in validating arguments. * * <p>Useful for identifying programmer errors early and clearly at runtime. * * <p>For example, if the contract of a public method states it does n...
cluster-worker-core/src/main/java/org/com/clusterworker/core/support/AssertSupport.java
0.918943
0.436682
AssertSupport.java
starcoder
package com.pg.creg; import com.pg.creg.expr.Expression; import static com.pg.creg.PatternUtils.*; import com.pg.creg.exception.CregException; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; /** * * @author <NAME> <<EMAIL>> */ public class Creg { ...
src/main/java/com/pg/creg/Creg.java
0.936923
0.433622
Creg.java
starcoder
package io.github.seggan.jyxal.runtime.math; /* MIT License Copyright (c) 2017 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights...
src/main/java/io/github/seggan/jyxal/runtime/math/BigComplex.java
0.947998
0.493226
BigComplex.java
starcoder
package DynamicProgramming; import java.util.Arrays; /** * Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. * Array is mutable * * Solved using segment tree */ public class RangeSumQueryMutable { public static void main(String[] args) { int arr[] =...
src/main/java/DynamicProgramming/RangeSumQueryMutable.java
0.712532
0.581897
RangeSumQueryMutable.java
starcoder
package com.sirbizio.utils; import org.lwjgl.util.vector.Matrix4f; import org.lwjgl.util.vector.Vector2f; import org.lwjgl.util.vector.Vector3f; import com.sirbizio.entities.Camera; /** * Math utilities. * @author fabrizio * */ public final class Maths { /**Private constructor assures the class ...
src/com/sirbizio/utils/Maths.java
0.829112
0.616806
Maths.java
starcoder
package io.github.fablabsmc.fablabs.api.fluidvolume.v1.volume.api; import java.util.Collection; import io.github.fablabsmc.fablabs.api.fluidvolume.v1.math.Fraction; import io.github.fablabsmc.fablabs.api.fluidvolume.v1.volume.ImmutableFluidVolume; import net.minecraft.text.Text; /** * the fluid counterpart to {@li...
src/main/java/io/github/fablabsmc/fablabs/api/fluidvolume/v1/volume/api/FluidContainer.java
0.868409
0.401688
FluidContainer.java
starcoder
package org.lambda4j.consumer.tri; import java.util.Objects; import javax.annotation.CheckForNull; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import javax.annotation.Nullable; import org.lambda4j.Lambda; import org.lambda4j.consumer.ByteConsumer; import org.lambda4j.consumer.bi.BiByteConsu...
lambda4j/src/main/java/org/lambda4j/consumer/tri/TriByteConsumer.java
0.936851
0.494629
TriByteConsumer.java
starcoder
import java.io.*; import java.util.Set; import java.util.HashSet; /** * Take the data given and find where the two wires cross. * * The size of the circuit board should have been obtained * correctly beforehand using something like CircuitSize or * TestPlotter. The algorithms which those programs use * could be...
AdventOfCode/2019/day3/part1/Verifier.java
0.514888
0.415788
Verifier.java
starcoder
package com.cedarsolutions.util; import static org.junit.Assert.assertEquals; import org.junit.Test; /** * Unit tests for MathUtils. * @author <NAME> <<EMAIL>> */ public class MathUtilsTest { /** Test the movingAverage() method. */ @Test public void testMovingAverage() throws Exception { ...
test/com/cedarsolutions/util/MathUtilsTest.java
0.893321
0.411406
MathUtilsTest.java
starcoder
package mil.dod.th.ose.controller.integration.core; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; import java.util.List; import javax.xml.datatype.DatatypeConfigurationException; import org.junit.Test; import mil.dod.th.core.observation.types.Observation; import mil.do...
mil.dod.th.ose.integration/src/mil/dod/th/ose/controller/integration/core/TestPersistedObservations.java
0.903895
0.651133
TestPersistedObservations.java
starcoder
class MyLinkedList { class ListNode { int val; ListNode next; ListNode prev; } private ListNode head; private ListNode tail; private int size; /** Initialize your data structure here. */ public MyLinkedList() { head = new ListNode(); tail = new L...
LinkedList/707.DesignLinkedList/designLinkedList.java
0.700075
0.403097
designLinkedList.java
starcoder
package jpl.fli; //----------------------------------------------------------------------/ // Prolog /** * This class consists only of constants (static finals) and static * native methods. The constants and methods defined herein are in * (almost) strict 1-1 correpsondence with the functions in the Prolog * FL...
sigma/src/java/jpl/fli/Prolog.java
0.50952
0.427456
Prolog.java
starcoder
package com.ayuayu.utils; public class RetrunOnInvestmentAnalysisUtils { /** * 計算總資產報酬率(%)=(稅後淨利+利息費用*(1-(所得稅費用/稅前淨利)))/(平均資產/2) * * @param profitLossFromContinuingOperations * 稅後淨利 * @param interestExpense * 利息費用 * @param incomeTaxExpenseContinuingOperations * 所得稅費用 ...
financialreport-proj/financialreport-core/src/main/java/com/ayuayu/utils/RetrunOnInvestmentAnalysisUtils.java
0.516839
0.540863
RetrunOnInvestmentAnalysisUtils.java
starcoder
package org.greenplum.pxf.plugins.hdfs.parquet; import com.fasterxml.jackson.databind.node.ArrayNode; import org.apache.parquet.example.data.Group; import org.apache.parquet.example.data.simple.NanoTime; import org.apache.parquet.io.api.Binary; import org.apache.parquet.schema.LogicalTypeAnnotation; import org.apache....
server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/parquet/ParquetTypeConverter.java
0.814201
0.430746
ParquetTypeConverter.java
starcoder
package org.apache.geode.internal.offheap; import org.apache.geode.annotations.Immutable; import org.apache.geode.internal.cache.RegionEntryContext; import org.apache.geode.internal.cache.Token; import org.apache.geode.internal.cache.entries.OffHeapRegionEntry; import org.apache.geode.internal.offheap.annotations.Rele...
geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapRegionEntryHelper.java
0.913411
0.422028
OffHeapRegionEntryHelper.java
starcoder