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.osgi.service.wireadmin; /** * Defines standard names for {@code Wire} properties, wire filter attributes, * Consumer and Producer service properties. * * @noimplement * @author $Id: e9406b56dedf5f46f76a4640dc3d6231553005cb $ */ public interface WireConstants { /** * {@code Wire} property key (nam...
org.osgi.service.wireadmin/src/org/osgi/service/wireadmin/WireConstants.java
0.90404
0.420064
WireConstants.java
starcoder
import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static int numberNeeded(String first, String second) { HashMap<Character, Integer> firstCount = new HashMap<Character, Integer>(); HashMap<Character, Integer> second...
MakingAnagrams.java
0.699152
0.632446
MakingAnagrams.java
starcoder
import org.jetbrains.annotations.NotNull; import java.util.List; /** * Represents a node in a multifurcating (non-binary) tree. * * Many methods of this class return objects of type T. T is the * concrete class; the node returns a reference to itself for * convenient method chaining. * * @param <T> The concret...
src/main/java/Node.java
0.86592
0.443721
Node.java
starcoder
import java.awt.List; import java.text.DecimalFormat; import java.util.Scanner; public class task2 { public static void main(String[] args) { start(); } public static boolean bad = true; public static class Location { public double row; public double column; public do...
Workshop 2/task2.java
0.63023
0.467453
task2.java
starcoder
package de.bwaldvogel.liblinear; class Blas { static double dnrm2_(int n, double[] x, MutableInt incx) { return dnrm2_(new MutableInt(n), x, incx); } private static double dnrm2_(MutableInt n, double[] x, MutableInt incx) { final double norm; double scale, absxi, ssq, temp; ...
src/main/java/de/bwaldvogel/liblinear/Blas.java
0.574275
0.461502
Blas.java
starcoder
package ray.math; /** * A ray is an origin and a direction. * * @author rcd */ public class Ray { /** * This quantity represents a "small amount" to handle comparisons in * floating point computations. It is often useful to have one global value * across the ray tracer that stands for a "small a...
src/ray/math/Ray.java
0.95845
0.477737
Ray.java
starcoder
package dataset; import util.LabelledParser; public class LabelledData extends AbstractDataset { /** * This class represents the data to train and test any of * the machine learning algorithms available. * <br> * The data is from "Optical Recognition of Handwritten Digits Data Set" and described as follows:...
src/dataset/LabelledData.java
0.787523
0.611092
LabelledData.java
starcoder
package b_stream; import java.util.*; class Reductions { static class Flight { String name; int passengers; Flight(String name, int passengers) { this.name = name; this.passengers = passengers; } } public static void main(String[] args) { /...
src/main/java/b_stream/13_reductions.java
0.775605
0.526099
13_reductions.java
starcoder
package org.omg.dds.topic; import java.util.List; /** * MultiTopic is a specialization of TopicDescription that allows subscriptions * to combine/filter/rearrange data coming from several * {@link org.omg.dds.topic.Topic}s. * <p> * MultiTopic allows a more sophisticated subscription that can select and * combin...
src/api/dcps/java5/common/java/code/org/omg/dds/topic/MultiTopic.java
0.905246
0.656837
MultiTopic.java
starcoder
package org.frost.math.data; import java.util.List; import org.frost.math.ray.Ray3d; import org.frost.math.ray.Ray3f; import org.frost.math.ray.Ray3i; /** * An octree is a tree data structure in which each internal node has exactly * eight children. Octrees are most often used to partition a three-dimensional * sp...
src/org/frost/math/data/Octree.java
0.977495
0.691823
Octree.java
starcoder
package org.apache.flink.runtime.managementgraph; import org.apache.flink.runtime.io.network.channels.ChannelType; /** * This class implements a directed edge of between two {@link ManagementGroupVertex} objects. The edge is derived from * a group edge of the actual execution graph. * <p> * This class is not thre...
flink-runtime/src/main/java/org/apache/flink/runtime/managementgraph/ManagementGroupEdge.java
0.936742
0.412944
ManagementGroupEdge.java
starcoder
package com.sleepycat.je.utilint; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import com.sleepycat.util.test.TestBase; /** Test the DoubleExpMovingAvg class. */ public class Double...
test/com/sleepycat/je/utilint/DoubleExpMovingAvgTest.java
0.853043
0.489748
DoubleExpMovingAvgTest.java
starcoder
package com.interview.codechef.ccdsapfoundation_1.binarysearch; import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class ABCDEF { //https://www.spoj.com/problems/ABCDEF/ public static void main( String[] args ) { try { Scanner scanner = new Scanner(System.in...
src/com/interview/codechef/ccdsapfoundation_1/binarysearch/ABCDEF.java
0.917164
0.41941
ABCDEF.java
starcoder
package org.java.epcGS1coder.adi; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.BitSet; import java.util.stream.Collectors; /** * <p>The variable-length Aerospace and Defense EPC identifier is designed for use by the aerospace and defense sector for the unique identification of parts or i...
src/main/java/org/java/epcGS1coder/adi/AdiVar.java
0.704668
0.515254
AdiVar.java
starcoder
package org.hsmak.datastructures.heap; import java.util.ArrayList; import java.util.List; public class MyHeap<E extends Comparable<E>> { List<E> data = new ArrayList<>(); private int leftIndex(int index) { return 2 * index + 1; } private int rightIndex(int index) { return 2 * index +...
custom-abstractions/src/main/java/org/hsmak/datastructures/heap/MyHeap.java
0.874037
0.497131
MyHeap.java
starcoder
package thrift.model.transaction; import static java.util.Objects.requireNonNull; import static thrift.commons.util.AppUtil.checkArgument; import java.text.DecimalFormat; import java.util.Map; import thrift.model.util.CurrencyUtil; /** * Represents a Transaction's monetary value in the Transactions list. * Guaran...
src/main/java/thrift/model/transaction/Value.java
0.922176
0.428951
Value.java
starcoder
package nbodysim; import java.lang.Math; public class Vector { private final double PI = Math.PI; private double magnitude; private double theta; // Measured in radians private double xComponent; private double yComponent; /** Constructor: the default vector.*/ public Vector(){ magnitude...
src/Vector.java
0.847684
0.585072
Vector.java
starcoder
package qub; public class MutableIndexableTests { public static void test(TestRunner runner, Function1<Integer,MutableIndexable<Integer>> creator) { runner.testGroup(MutableIndexable.class, () -> { IndexableTests.test(runner, creator::run); runner.testGroup("set(int,T)"...
tests/qub/MutableIndexableTests.java
0.892413
0.895705
MutableIndexableTests.java
starcoder
package seedu.fma.model.log; import static java.util.Objects.requireNonNull; import static seedu.fma.commons.util.CollectionUtil.requireAllNonNull; import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; import javafx.collections.FXCollections; import javafx.collections.ObservableList; ...
src/main/java/seedu/fma/model/log/UniqueLogList.java
0.921269
0.416915
UniqueLogList.java
starcoder
package org.jabref.logic.layout.format; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.regex.Pattern; import org.jabref.logic.layout.AbstractParamLayoutFormatter; import org.jabref.model.entry.Author; import org.jabref.model.entry.AuthorList; /** * Versatile author name...
src/main/java/org/jabref/logic/layout/format/Authors.java
0.747063
0.410579
Authors.java
starcoder
package net.recommenders.rival.evaluation.metric.ranking; import net.recommenders.rival.core.DataModelIF; import net.recommenders.rival.evaluation.metric.EvaluationMetric; import java.util.HashMap; import java.util.List; import java.util.Map; import net.recommenders.rival.evaluation.Pair; /** * Popularity-stratifie...
rival-evaluate/src/main/java/net/recommenders/rival/evaluation/metric/ranking/PopularityStratifiedRecall.java
0.920843
0.571288
PopularityStratifiedRecall.java
starcoder
class QuickSortTest { public static void asc(int[] array) { array = ascQuickSort(array, 0, array.length - 1); for (int i = 0; i < array.length; i++) { System.out.println(array[i]); } } public static void desc(int[] array) { array = descQuickSort(array, 0...
tests/Cases/fixtures/java/QuickSortTest.java
0.523908
0.585575
QuickSortTest.java
starcoder
package net.intertextueel.conceptnet; import java.util.regex.Pattern; import java.util.regex.Matcher; /** * A ConceptNetFilter instance can be created before creating a ConceptNet object and loading the database into memory. * This filter can be passed to the ConceptNet constructor and is used to reduce the memory ...
src/main/java/net/intertextueel/conceptnet/ConceptNetFilter.java
0.891407
0.601886
ConceptNetFilter.java
starcoder
package io.honeycomb.beeline.tracing.utils; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.StringTokenizer; /** * Utilities for String parsing and manipulation; primarily for use with {@link AntPathMatcher} and {@link io.honeycomb.beeline.tracing.propagation.BeelineS...
beeline-core/src/main/java/io/honeycomb/beeline/tracing/utils/StringUtils.java
0.913158
0.426979
StringUtils.java
starcoder
package co.robhendriks.dp1.circuit; import co.robhendriks.dp1.node.AbstractNode; import co.robhendriks.dp1.node.common.InputNode; import co.robhendriks.dp1.node.common.OutputNode; import java.util.HashMap; import java.util.Map; public class Circuit { private final Map<String, AbstractNode> nodes; private fin...
src/main/java/co/robhendriks/dp1/circuit/Circuit.java
0.841011
0.430267
Circuit.java
starcoder
package codesignal.setsOfFactors; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; /** *Write a function that takes an integer n and returns all of the ways that integers not greater than n can be multiplied together in order to equal n. *Do not repeat sets of...
codesignal/src/codesignal/setsOfFactors/SetsOfFactors.java
0.608478
0.551574
SetsOfFactors.java
starcoder
package org.biojava.bio.dp; import org.biojava.bio.dist.Distribution; import org.biojava.bio.symbol.Alphabet; import org.biojava.bio.symbol.FiniteAlphabet; import org.biojava.bio.symbol.IllegalAlphabetException; import org.biojava.bio.symbol.IllegalSymbolException; import org.biojava.utils.ChangeType; import org.bioja...
biojava/src/org/biojava/bio/dp/MarkovModel.java
0.881653
0.464112
MarkovModel.java
starcoder
package com.sisllc.mathformulas.ci.ch07; import java.util.ArrayList; import java.util.HashMap; public class Q76CountEquivalentLines { /* Count lines within an array of lines which are "equivalent" (slope and y-intercept are within an epsilon value) to a given line */ public static int countEquivalentLines(Ar...
src/main/java/com/sisllc/mathformulas/ci/ch07/Q76CountEquivalentLines.java
0.845241
0.540985
Q76CountEquivalentLines.java
starcoder
package javafx.scene.paint; import javafx.beans.NamedArg; import javafx.scene.image.Image; import com.sun.javafx.beans.event.AbstractNotifyListener; import com.sun.javafx.tk.Toolkit; /** * <p>The {@code ImagePattern} class fills a shape with an image pattern. The * user may specify the anchor rectangle, which defin...
JavaSourceLearn/javafx-src/javafx/scene/paint/ImagePattern.java
0.921477
0.519399
ImagePattern.java
starcoder
package com.splunk; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.io.*; import java.net.Socket; import java.text.DateFormat; import java.text.Simp...
tests/com/splunk/PivotTest.java
0.90219
0.437583
PivotTest.java
starcoder
package com.machinezoo.pmdata.bindings; import java.util.*; import java.util.function.*; import com.machinezoo.noexception.*; public abstract class DataBinding<T> implements Supplier<Optional<T>> { /* * Give callers an opportunity to provide fallback via Optional.orElse() or throw via Optional.get()/orElseThrow()....
src/main/java/com/machinezoo/pmdata/bindings/DataBinding.java
0.819352
0.433502
DataBinding.java
starcoder
package gov.sandia.cognition.learning.algorithm.clustering.cluster; import gov.sandia.cognition.math.matrix.MatrixFactory; import gov.sandia.cognition.statistics.distribution.MultivariateGaussian; import gov.sandia.cognition.math.matrix.Vector; import gov.sandia.cognition.math.matrix.mtj.Vector3; import java.util.Arra...
Components/LearningCore/Test/gov/sandia/cognition/learning/algorithm/clustering/cluster/GaussianClusterTest.java
0.936937
0.567817
GaussianClusterTest.java
starcoder
package org.apache.taverna.utility; /** * Equivalent to TreeModelListener for use with the TypedTreeModel * * @author <NAME> * * @see javax.swing.tree.TreeModelListener * * @param <NodeType> * Type of the node within the TypedTreeModel and used to * parameterize the typed version of t...
taverna-workflowmodel-api/src/main/java/org/apache/taverna/utility/TypedTreeModelListener.java
0.840684
0.427038
TypedTreeModelListener.java
starcoder
package com.acesoft.leetcode; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /* * https://leetcode.com/problems/finding-the-users-active-minutes * * You are given the logs for users' actions on LeetCode, and an integer k. The logs are represented * by a 2D integer ...
src/main/java/com/acesoft/leetcode/LeetCode1817.java
0.898422
0.55941
LeetCode1817.java
starcoder
package com.ramamosr.LinkedList; public class ReOrderList { /* Problem Description Given a singly linked list A A: A0 → A1 → … → An-1 → An reorder it to: A0 → An → A1 → An-1 → A2 → An-2 → … You must do this in-place without altering the nodes' values. Problem Constraints 1 <= |A| <= 106 Input Format The fir...
src/com/ramamosr/LinkedList/ReOrderList.java
0.757346
0.55429
ReOrderList.java
starcoder
package jhi.germinate.client.service; import com.google.gwt.core.shared.*; import com.google.gwt.user.client.rpc.*; import java.util.*; import jhi.germinate.shared.datastructure.*; import jhi.germinate.shared.datastructure.database.*; import jhi.germinate.shared.enums.*; import jhi.germinate.shared.exception.*; impo...
src/jhi/germinate/client/service/LocationService.java
0.921084
0.434641
LocationService.java
starcoder
package xal.app.orbitcorrect; import java.util.*; import xal.smf.*; import xal.smf.impl.BPM; import xal.tools.data.*; /** * BpmRecord * @author tap * @since Jul 09, 2004 */ public class BpmRecord extends BeamMarkerRecord<BPM> implements DataListener { /** label for data storage */ final static public Str...
apps/orbitcorrect/src/xal/app/orbitcorrect/BpmRecord.java
0.768907
0.529446
BpmRecord.java
starcoder
package coursera.graphs.week5; import java.util.Collections; import java.util.Comparator; import java.util.PriorityQueue; import java.util.Scanner; import java.util.stream.DoubleStream; public class BuildingRoads { private static class NodeComparator implements Comparator<Node> { double[] distances; ...
src/main/java/coursera/graphs/week5/BuildingRoads.java
0.90593
0.558628
BuildingRoads.java
starcoder
package com.example.alunoinfo.meutaxi; public class Diaria { private int horaInicial; private int horaFinal; private int dia; private float comissao; private float kmInicial; private float kmFinal; private float precoKm; private float combustivel; private int idDiaria; private C...
app/src/main/java/com/example/alunoinfo/meutaxi/Diaria.java
0.687735
0.429669
Diaria.java
starcoder
package maspack.matrix; import maspack.util.RandomGenerator; import maspack.util.TestException; import java.io.IOException; import maspack.matrix.Matrix.Partition; class SparseMatrixCRSTest extends MatrixTest { void add (Matrix MR, Matrix M1) { ((SparseMatrixCRS)MR).add ((SparseMatrixCRS)M1); } void...
src/maspack/matrix/SparseMatrixCRSTest.java
0.616359
0.521045
SparseMatrixCRSTest.java
starcoder
package Coords4; import Geom.Point3D; public class MyCoords implements coords_converter{ /** * This class has function on coordinate * @author <NAME> , <NAME> */ private Point3D pixel1; private Point3D pixel2; private Point3D gps1; private Point3D gps2; private double p2g; private double g2p; public...
src/Coords4/MyCoords.java
0.579995
0.505859
MyCoords.java
starcoder
package org.anddev.andengine.entity.shape.modifier; import org.anddev.andengine.entity.shape.IShape; import org.anddev.andengine.entity.shape.modifier.DoubleValueSpanShapeModifier; import org.anddev.andengine.entity.shape.modifier.IShapeModifier; import org.anddev.andengine.util.modifier.IModifier; import org.anddev.a...
decompiled_src/CFR/org/anddev/andengine/entity/shape/modifier/ScaleModifier.java
0.823151
0.416797
ScaleModifier.java
starcoder
package io.geekya.meow; import java.util.HashMap; import java.util.List; import java.util.function.Predicate; import static io.geekya.meow.Combinator.*; // grammar reference: https://github.com/antlr/grammars-v4/blob/master/json/JSON.g4 public class Grammar { // skip tail whitespace public static <T> Parser<...
src/main/java/io/geekya/meow/Grammar.java
0.855202
0.496338
Grammar.java
starcoder
package com.gorkasoft; /** * Data structure, ToyBlob, backed by plain java arrays(s), with the following methods: * - size which returns the number of elements in its collection * - add which adds an element to its middle when the ToyBlob's size is even or the end when odd. * - remove which removes and returns th...
src/main/java/com/gorkasoft/ToyBlob.java
0.936684
0.488344
ToyBlob.java
starcoder
package com.opengamma.financial.analytics.model.pnl; import static com.opengamma.engine.value.ValuePropertyNames.CURRENCY; import static com.opengamma.engine.value.ValuePropertyNames.SAMPLING_FUNCTION; import static com.opengamma.engine.value.ValuePropertyNames.SAMPLING_PERIOD; import static com.opengamma.engine.value...
projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/pnl/CreditDefaultSwapIndexCS01PnLFunction.java
0.848596
0.471284
CreditDefaultSwapIndexCS01PnLFunction.java
starcoder
package aurora.cesium.element.property; import cesiumlanguagewriter.CartographicExtent; import cesiumlanguagewriter.JulianDate; import cesiumlanguagewriter.advanced.ICesiumCartographicRectangleDegreesValuePropertyWriter; import java.util.List; /** * @author hanhaoran * @date 2020/8/31 */ class CartographicRectang...
src/main/java/aurora/cesium/element/property/CartographicRectangleDegreesPropertyImpl.java
0.863392
0.421909
CartographicRectangleDegreesPropertyImpl.java
starcoder
package org.apache.log4j.lbel; import junit.framework.TestCase; import java.io.IOException; import java.io.StringReader; public class TokenStreamTest extends TestCase { Token t; public TokenStreamTest(String arg0) { super(arg0); } protected void setUp() throws Exception { super.setUp(); } pro...
tests/src/java/org/apache/log4j/lbel/TokenStreamTest.java
0.853654
0.44071
TokenStreamTest.java
starcoder
package com.sri.ai.grinder.helper; import static com.sri.ai.expresso.helper.Expressions.apply; import java.util.List; import com.google.common.annotations.Beta; import com.sri.ai.expresso.api.Expression; import com.sri.ai.grinder.api.Context; import com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver; import ...
src/main/java/com/sri/ai/grinder/helper/MaximumExpressionStepSolver.java
0.929384
0.40925
MaximumExpressionStepSolver.java
starcoder
package org.elasticsearch.plan.a; /* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "Li...
src/main/java/org/elasticsearch/plan/a/Utility.java
0.916335
0.528412
Utility.java
starcoder
package net.soliddesign.iumpr.bus.j1939.packets; import static net.soliddesign.iumpr.IUMPR.NL; import static org.junit.Assert.assertEquals; import java.util.List; import org.junit.Test; import net.soliddesign.iumpr.bus.Packet; /** * Unit tests the {@link DiagnosticTroubleCodePacket} class * * @author <NAME> (<E...
src-test/net/soliddesign/iumpr/bus/j1939/packets/DiagnosticTroubleCodePacketTest.java
0.848612
0.559591
DiagnosticTroubleCodePacketTest.java
starcoder
package IncrementalAnytimeExactBeliefPropagation; import static com.sri.ai.util.Util.println; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.Queue; import java.util.Set; import IncrementalAnytimeExactBeliefPropagation.Model.Model; import...
src/main/java/IncrementalAnytimeExactBeliefPropagation/PartitionTree.java
0.68215
0.511656
PartitionTree.java
starcoder
package smile.netlib; import smile.math.matrix.Matrix; import smile.math.matrix.DenseMatrix; import com.github.fommil.netlib.LAPACK; import org.netlib.util.intW; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Cholesky decomposition is a decomposition of a symmetric, positive-definite * matrix into a...
netlib/src/main/java/smile/netlib/Cholesky.java
0.935324
0.647074
Cholesky.java
starcoder
package tberg.murphy.classifier; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import tberg.murphy.counter.CounterInterface; import tberg.murphy.counter.IntCounter; import tberg.murphy.tuple.Pair; import de.bwal...
src/tberg/murphy/classifier/LibLinearWrapper.java
0.54577
0.42662
LibLinearWrapper.java
starcoder
package org.firstinspires.ftc.teamcode.Utilities; import com.qualcomm.robotcore.util.Range; import org.firstinspires.ftc.teamcode.RobotHardware; /** * Created by Ashley on 12/18/2017. */ public class AutoDrive { private RobotHardware opMode; private MecanumNavigation mecanumNavigation; public AutoD...
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Utilities/AutoDrive.java
0.674372
0.436382
AutoDrive.java
starcoder
package com.iiitd.dsavisualizer.datastructures.graphs.algorithms; import com.iiitd.dsavisualizer.datastructures.graphs.Edge; import com.iiitd.dsavisualizer.datastructures.graphs.EdgePro; import com.iiitd.dsavisualizer.datastructures.graphs.Graph; import com.iiitd.dsavisualizer.datastructures.graphs.GraphAlgorithmType;...
app/src/main/java/com/iiitd/dsavisualizer/datastructures/graphs/algorithms/BFS.java
0.771843
0.557303
BFS.java
starcoder
package umontreal.ssj.probdist; import umontreal.ssj.util.Num; /** * Extends the class @ref ContinuousDistribution for the *normal* * distribution (e.g., @cite tJOH95a&thinsp; (page 80)). It has mean * @f$\mu@f$ and variance @f$\sigma^2@f$. Its density function is * @anchor REF_probdist_NormalDist_eq_fnormal * @...
src/main/java/umontreal/ssj/probdist/NormalDist.java
0.895905
0.497559
NormalDist.java
starcoder
package ragnardb.parser; import ragnardb.parser.ast.*; import ragnardb.plugin.ColumnDefinition; import java.sql.Types; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class SQLParser { /** * This is the parser for RagnarDB. This is an LR(1) parser using the grammar referred ...
ragnardb/src/main/java/ragnardb/parser/SQLParser.java
0.806967
0.473475
SQLParser.java
starcoder
package org.springframework.data.gemfire.support; import java.util.Optional; import org.apache.geode.cache.Cache; import org.apache.geode.cache.GemFireCache; import org.apache.geode.cache.Region; import org.apache.geode.cache.RegionService; import org.apache.geode.cache.client.ClientCache; import org.springframework...
spring-data-geode/src/main/java/org/springframework/data/gemfire/support/RegionServiceRegionResolver.java
0.93396
0.423279
RegionServiceRegionResolver.java
starcoder
package edu.gemini.pot.sp; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import java.util.logging.Level; import java.util.logging.Logger; /** * Encapsulates a rather expensive way of checking whether two arbitrary * objects are the same. We need a way of deter...
bundle/edu.gemini.pot/src/main/java/edu/gemini/pot/sp/DataObjectBlob.java
0.82478
0.418875
DataObjectBlob.java
starcoder
package com.epam.deltix.zstd; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import static com.epam.deltix.zstd.Preconditions.checkPositionIndexes; import static com.epam.deltix.zstd.ZstdFrameDecompressor.ByteBufferWrap; import static java.lang.Long.rotateLeft; import static java....
java/src/main/java/com/epam/deltix/zstd/XxHash64.java
0.791176
0.439447
XxHash64.java
starcoder
package com.intel.ruleengine.gearpump.tasks.storage; import com.intel.ruleengine.gearpump.data.RuleConditionsRepository; import com.intel.ruleengine.gearpump.tasks.messages.Rule; import com.intel.ruleengine.gearpump.tasks.messages.RulesWithObservation; import java.io.IOException; import java.util.List; import java.ut...
src/main/java/com/intel/ruleengine/gearpump/tasks/storage/RuleComponentsStorageManager.java
0.878145
0.48182
RuleComponentsStorageManager.java
starcoder
package ed25519final; import java.math.BigInteger; import java.security.GeneralSecurityException; import java.security.MessageDigest; import java.security.SecureRandom; import java.util.Arrays; /** * Print the flag. * * <p>Implements Ed25519 (https://ed25519.cr.yp.to/). The implementation is based on * https://ed...
2017/finals/2017-finals-crypto-ed25519finalchallenge/attachments/Ed25519Final.java
0.871925
0.641366
Ed25519Final.java
starcoder
package com.raytheon.uf.viz.kml.export; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.graphics.RGB; import org.geotools.coverage.grid.GeneralGridGeometry; import org.geotools.coverage.grid.GridGeometry2D; import org.opengis.referencing.FactoryException; import org.opengis.referencing.datum...
cave/com.raytheon.uf.viz.kml.export/src/com/raytheon/uf/viz/kml/export/KmlFeatureGenerator.java
0.846736
0.461199
KmlFeatureGenerator.java
starcoder
package unionfind; import java.util.*; /** * LeetCode 399. Evaluate Division * 0.0 < values[i] <= 20.0 * * Runtime: 1 ms, faster than 86.93% of Java online submissions for Evaluate Division. * Memory Usage: 37.8 MB, less than 6.23% of Java online submissions for Evaluate Division. */ public class EvaluateDivisi...
randomtries/src/unionfind/EvaluateDivision.java
0.909868
0.455501
EvaluateDivision.java
starcoder
package com.freetymekiyan.algorithms.level.medium; /** * 362. Design Hit Counter * <p> * Design a hit counter which counts the number of hits received in the past 5 minutes. * <p> * Each function accepts a timestamp parameter (in seconds granularity) and you may assume that calls are being made to * the system i...
src/main/java/com/freetymekiyan/algorithms/level/medium/DesignHitCounter.java
0.906705
0.472805
DesignHitCounter.java
starcoder
package frc.robot.commands.auto; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.Stack; import frc.robot.Robot; import frc.robot.util.BezierFunction; import frc.robot.util.BezierPoint; import frc.robot.util.CoordinatePair; public class TestBezier { private static Que...
src/main/java/frc/robot/commands/auto/TestBezier.java
0.602763
0.528047
TestBezier.java
starcoder
package fundamentals.tree.bfs.lc314_binarytreeverticalordertraversal; import fundamentals.tree.TreeNode; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Queue; import java.util.TreeMap; /** * Given a binary tree, return...
1-algorithm/13-leetcode/java/src/fundamentals/tree/bfs/lc314_binarytreeverticalordertraversal/Solution.java
0.924296
0.572424
Solution.java
starcoder
package in.itzmeanjan.filterit.filter; import in.itzmeanjan.filterit.segmentation.Image; import in.itzmeanjan.filterit.segmentation.Position; import java.awt.Color; import java.awt.image.BufferedImage; import java.util.ArrayList; /** * Worker to be thrown to threads available at thread pool at a given time, for com...
in/itzmeanjan/filterit/filter/ModeFilterWorker.java
0.932276
0.418162
ModeFilterWorker.java
starcoder
package tut.metalmethod.crappybird.gameobjects; import com.badlogic.gdx.math.Circle; import com.badlogic.gdx.math.Vector2; import tut.metalmethod.crappybird.helpers.AssetLoader; /** * Bird Animation: * Rotation is controlled using the Y velocity. * The bird accelerates downwards due to gravity (meaning that the ve...
core/src/tut/metalmethod/crappybird/gameobjects/Bird.java
0.851583
0.572364
Bird.java
starcoder
package matrix; public class BombEnemy { //TAG: Google //TAG: matrix //Difficulty: Medium /** * 361. Bomb Enemy * Given a 2D grid, each cell is either a wall 'W', an enemy 'E' or empty '0' (the number zero), return the maximum enemies you can kill using one bomb. The bomb kills all the...
src/matrix/BombEnemy.java
0.83346
0.61057
BombEnemy.java
starcoder
package org.barlom.domain.metamodel.impl.elements; import org.barlom.domain.metamodel.api.elements.IDirectedEdgeType; import org.barlom.domain.metamodel.api.elements.IEdgeType; import org.barlom.domain.metamodel.api.elements.IPackage; import org.barlom.domain.metamodel.api.elements.IVertexType; import org.barlom.infr...
barlom-server/domain/barlom-metamodel/src/main/java/org/barlom/domain/metamodel/impl/elements/DirectedEdgeType.java
0.876191
0.461017
DirectedEdgeType.java
starcoder
package org.lilyproject.repository.api.filter; import org.lilyproject.repository.api.CompareOp; import org.lilyproject.repository.api.QName; /** * Filters based on the value of a record field. * * <p>Only equals and not-equals comparisons are possible. This is because the comparison happens inside * the HBase reg...
cr/repository/api/src/main/java/org/lilyproject/repository/api/filter/FieldValueFilter.java
0.891369
0.437463
FieldValueFilter.java
starcoder
package io.opentelemetry.instrumentation.micrometer.v1_5; import static io.opentelemetry.instrumentation.micrometer.v1_5.Bridging.baseUnit; import static io.opentelemetry.instrumentation.micrometer.v1_5.Bridging.description; import static io.opentelemetry.instrumentation.micrometer.v1_5.Bridging.statisticInstrumentNam...
instrumentation/micrometer/micrometer-1.5/library/src/main/java/io/opentelemetry/instrumentation/micrometer/v1_5/OpenTelemetryMeter.java
0.840684
0.413773
OpenTelemetryMeter.java
starcoder
package com.company.yoyo.onsite; import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; public class MajorityElementVariant { /** * Leetcode 229. Majority Element II Variant Given an sorted in...
src/main/java/com/company/yoyo/onsite/MajorityElementVariant.java
0.765067
0.488344
MajorityElementVariant.java
starcoder
package org.xms.g.maps; /** * Defines an interface for providing location data, typically to a Map object.<br/> * Combination of com.huawei.hms.maps.LocationSource and com.google.android.gms.maps.LocationSource.<br/> * com.huawei.hms.maps.LocationSource: Defines a location source that provides location data.<br/> ...
xmsadapter/src/main/java/org/xms/g/maps/LocationSource.java
0.935413
0.412589
LocationSource.java
starcoder
package georegression.struct.so; import georegression.struct.point.Vector3D_F64; import java.io.Serializable; /** * <p> * Defines a 3D rotation based upon the axis of rotation and the angle of rotation in SO(3). * </p> * * <p> * R(&theta;) = e<sup>w*&theta;</sup><br> * R(&theta;) = 1 + w*sin(&theta;) + w<sup...
main/src/georegression/struct/so/Rodrigues_F64.java
0.900767
0.805517
Rodrigues_F64.java
starcoder
package com.olacabs.roadrunner.api; import java.util.Comparator; import java.util.function.Function; import com.olacabs.roadrunner.utils.Haversine; public final class GeoSpatialRecord implements Comparable<GeoSpatialRecord>{ public Record record; double distanceInMeters = Double.NaN; double latitude = ...
src/main/java/com/olacabs/roadrunner/api/GeoSpatialRecord.java
0.790571
0.468791
GeoSpatialRecord.java
starcoder
package com.github.rahulsom.cda; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * List of CCD Section Codes * * @author <NAME> */ public class CcdSections { public static final String DCM = "2.16.840.1.113883.10.20.6.1.1"; public static final String...
src/main/java/com/github/rahulsom/cda/CcdSections.java
0.710226
0.545588
CcdSections.java
starcoder
package org.terraform.data; import org.bukkit.block.BlockFace; import org.terraform.main.TerraformGeneratorPlugin; public class SimpleLocation { protected int x; protected int y; protected int z; public SimpleLocation(int x, int y, int z) { this.x = x; this.y = y; this.z = z;...
common/src/main/java/org/terraform/data/SimpleLocation.java
0.620737
0.430626
SimpleLocation.java
starcoder
package io.spokestack.spokestack.nlu.tensorflow.parsers; import io.spokestack.spokestack.nlu.tensorflow.SlotParser; import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; /** * This parser converts a string representation of a sequence of digits into the * corresponding sequence of digits....
src/main/java/io/spokestack/spokestack/nlu/tensorflow/parsers/DigitsParser.java
0.858467
0.479382
DigitsParser.java
starcoder
package org.cryptimeleon.incentive.crypto.proof.spend.leaf; import org.cryptimeleon.incentive.crypto.Util; import org.cryptimeleon.incentive.crypto.proof.spend.tree.SpendDeductLeafNode; import org.cryptimeleon.incentive.crypto.proof.spend.tree.SpendDeductTree; import org.cryptimeleon.math.structures.cartesian.Vector; ...
crypto/src/main/java/org/cryptimeleon/incentive/crypto/proof/spend/leaf/TokenUpdateLeaf.java
0.915729
0.493775
TokenUpdateLeaf.java
starcoder
package ru.job4j.tictactoe; import java.util.Arrays; import java.util.function.Predicate; import java.util.stream.Collectors; public class Logic3T { private final Figure3T[][] table; public Logic3T(Figure3T[][] table) { this.table = table; } /** * Проверяет по предикату наличие фигуры в...
tictactoe/src/main/java/ru/job4j/tictactoe/Logic3T.java
0.685002
0.459379
Logic3T.java
starcoder
package myamya.other.solver; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import myamya.other.solver.Common.Position; public abstract class HintPattern { public ...
src/main/java/myamya/other/solver/HintPattern.java
0.807574
0.41561
HintPattern.java
starcoder
package fr.insee.sabianedata.ws.model.massiveAttack; import java.util.List; import fr.insee.sabianedata.ws.model.pearl.Assignement; import fr.insee.sabianedata.ws.model.pearl.CampaignDto; import fr.insee.sabianedata.ws.model.pearl.SurveyUnitDto; import fr.insee.sabianedata.ws.model.queen.NomenclatureDto; import fr.in...
src/main/java/fr/insee/sabianedata/ws/model/massiveAttack/TrainingCourse.java
0.618665
0.526038
TrainingCourse.java
starcoder
package com.github.waikatoufdl.ufdl4j.core; import java.lang.reflect.Array; /** * General helper class. * * @author FracPete (fracpete at waikato dot ac dot nz) */ public class Utils { /** * Returns the dimensions of the given array. Even though the * parameter is of type "Object" one can hand over primi...
ufdl4j-core/src/main/java/com/github/waikatoufdl/ufdl4j/core/Utils.java
0.848941
0.463019
Utils.java
starcoder
package tech.pegasys.teku.reference.phase0.sanity; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static tech.pegasys.teku.reference.phase0.BlsSetting.IGNORED; import static tech.pegasys.teku.reference.phase0.TestDataUtils.loadSsz; imp...
eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/sanity/SanityBlocksTestExecutor.java
0.662906
0.434401
SanityBlocksTestExecutor.java
starcoder
package com.FalcoLabs.Fido.api.datastore; import java.util.ArrayList; import java.util.List; import com.FalcoLabs.Fido.api.datastore.Query.FilterOperator; import com.FalcoLabs.Fido.api.datastore.exceptions.DatastoreServiceException; import com.FalcoLabs.Fido.api.localization.messages; // Does an insert of complex (m...
src/com/FalcoLabs/Fido/api/datastore/ComplexInsertColumn.java
0.776835
0.431524
ComplexInsertColumn.java
starcoder
package toolbox; import com.badlogic.gdx.math.Vector2; import org.mariuszgromada.math.mxparser.Function; public class PhysicEngine { //some physic engine uses the same method t ocalculate the speed and the gravity of the ball on the curve static final float STEPSIZE = 0.01f; static final float GRAVITY = ...
src/toolbox/PhysicEngine.java
0.747247
0.574932
PhysicEngine.java
starcoder
package net.loevig.dlx; /** * ColumnNode represents a node in the first row. A ColumnNode contains * a size indicating the number of downwards links until the column node * is reached again. * * @author <NAME> */ class ColumnNode<E> extends Node<E> { /** * The number of nodes in the column linked list ...
src/main/java/net/loevig/dlx/ColumnNode.java
0.903395
0.410993
ColumnNode.java
starcoder
package cn.vorbote.core.time; import cn.vorbote.core.exceptions.TimeOutRangeException; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Objects; /** * {@code DateTime} class supports useful methods to times. The processing of date and...
src/main/java/cn/vorbote/core/time/DateTime.java
0.946621
0.579817
DateTime.java
starcoder
package us.ihmc.sensorProcessing.imu; import javax.vecmath.*; import org.ejml.data.DenseMatrix64F; import us.ihmc.sensorProcessing.stateEstimation.IMUSensorReadOnly; import us.ihmc.robotics.dataStructures.registry.YoVariableRegistry; import us.ihmc.robotics.dataStructures.variable.DoubleYoVariable; import us.ihmc.ro...
SensorProcessing/src/us/ihmc/sensorProcessing/imu/FusedIMUSensor.java
0.813535
0.622832
FusedIMUSensor.java
starcoder
package com.edmunds.zookeeper.treewatcher; import com.google.common.collect.ImmutableMap; import org.apache.commons.lang3.Validate; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.Properties; import static org.apache.commons.lang3.StringUtils.isEmpty; /** * Represents a node in th...
src/main/java/com/edmunds/zookeeper/treewatcher/ZooKeeperTreeNode.java
0.908426
0.568176
ZooKeeperTreeNode.java
starcoder
package hso.autonomy.util.geometry; import static org.junit.Assert.assertEquals; import org.apache.commons.math3.geometry.euclidean.threed.Rotation; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.junit.Test; public class Pose3DTest { /** * Test for {@link Pose3D#applyTo(IPose3D)}, ...
client/base/srcTest/hso/autonomy/util/geometry/Pose3DTest.java
0.895371
0.729231
Pose3DTest.java
starcoder
package com.github.czyzby.noise4j.map.generator.room; import com.github.czyzby.noise4j.map.Grid; import com.github.czyzby.noise4j.map.generator.room.AbstractRoomGenerator.Room; /** Represents a single room type. Determines how the room is carved in the map. * <p> * Note that even through some room types create non-...
core/addons/com/github/czyzby/noise4j/map/generator/room/RoomType.java
0.959847
0.513425
RoomType.java
starcoder
package MTV; import java.util.ArrayList; import java.util.List; public class TemperatureDataHandler { private List<MonthTemperatureData> topVariances = new ArrayList<MonthTemperatureData>(); public List getVariances() { return topVariances; } /** * * adds entry to variance list i...
src/main/java/MTV/TemperatureDataHandler.java
0.852706
0.491151
TemperatureDataHandler.java
starcoder
import java.io.*; import java.util.*; /** * Driver class. * <p> * Usage: * > add 1 2 * > remove 1 2 * > is linked 1 2 * <p> * <p> * Assumption: * 1. The implementation assumes that there would not be multiple links between 2 same nodes as there is no concept of weights in this situation. If we need to accomo...
GraphImpl.java
0.881958
0.472257
GraphImpl.java
starcoder
package de.viadee.xai.framework.explanation_calculation.explanation; import de.viadee.xai.framework.data.Feature.CategoricalFeature; import de.viadee.xai.framework.data.tabular_data.LabelColumn; import de.viadee.xai.framework.data.tabular_data.TabularDataset; import de.viadee.xai.framework.explanation_calculation.calc...
src/main/java/de/viadee/xai/framework/explanation_calculation/explanation/RuleExplanationSet.java
0.848628
0.567577
RuleExplanationSet.java
starcoder
package speedith.core.lang.export; import speedith.core.lang.SpiderDiagram; import java.util.Locale; import java.util.Map; import java.util.SortedSet; /** * This is the base of the classes that provide actual exporters for the * mechanism for exporting {@link SpiderDiagram spider diagrams}. <p>See {@link SDExporti...
Speedith.Core/src/main/java/speedith/core/lang/export/SDExportProvider.java
0.919539
0.425307
SDExportProvider.java
starcoder
package mds.data.descriptor_s; import java.nio.ByteBuffer; import mds.data.DTYPE; public final class Float32 extends FLOAT<Float> { public static final Float32 F(final float value) { return new Float32(DTYPE.F, value); } public static final Float32 FS(final float value) { return new Float32(DTYPE.FS, value)...
java/mdsplus-api/src/main/java/mds/data/descriptor_s/Float32.java
0.830181
0.407923
Float32.java
starcoder
package com.ojcoleman.ahni.util; import java.io.BufferedReader; import java.io.IOException; import java.text.DecimalFormat; import java.util.ArrayList; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.math.NumberUtils; /** * Storage for results data. */ public class Results { private s...
17-05-2017/neuralturingmachines-master/src/com/ojcoleman/ahni/util/Results.java
0.901588
0.546073
Results.java
starcoder