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.tencentcloudapi.live.v20180801.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class CommonMixLayoutParams extends AbstractModel{ /** * Input layer. Value range:...
src/main/java/com/tencentcloudapi/live/v20180801/models/CommonMixLayoutParams.java
0.92761
0.464112
CommonMixLayoutParams.java
starcoder
package com.moonymango.snareTest; import android.support.test.runner.AndroidJUnit4; import com.moonymango.snare.util.Geometry; import com.moonymango.snare.util.MatrixAF; import com.moonymango.snare.util.QuaternionAF; import com.moonymango.snare.util.VectorAF; import org.junit.Test; import org.junit.runner.RunWith; ...
snare/src/androidTest/java/com/moonymango/snareTest/GeometryTest.java
0.93885
0.725272
GeometryTest.java
starcoder
package com.google.android.gms.maps; public final class R { private R() {} public static final class attr { private attr() {} public static final int ambientEnabled = 0x7f03002f; public static final int cameraBearing = 0x7f030063; public static final int cameraMaxZoomPreferenc...
app/build/generated/not_namespaced_r_class_sources/debug/r/com/google/android/gms/maps/R.java
0.638723
0.475849
R.java
starcoder
package org.heatonresearch.mergelife; import org.heatonresearch.mergelife.util.LargestRect; import java.util.HashMap; import java.util.Map; public class CalculateObjectiveStats { /** * The mode age: How long has the merged matrix mode been at the same value. Measured in CA generations/updates. */ ...
java/evolve/src/main/java/org/heatonresearch/mergelife/CalculateObjectiveStats.java
0.892726
0.417984
CalculateObjectiveStats.java
starcoder
package com.nickww.finitefield.checksum; import static com.nickww.finitefield.FiniteByteField.*; import java.util.List; class DoubleChecksumVector extends ChecksumVector { private static final byte[] powerOfTwo = new byte[MAX_VALUE + 1]; private static final byte[][] A = new byte[MAX_VALUE + 1][MAX_VALUE ...
src/main/java/com/nickww/finitefield/checksum/DoubleChecksumVector.java
0.751192
0.494629
DoubleChecksumVector.java
starcoder
package jmini3d.geometry; import jmini3d.GpuObjectStatus; /** * Geometry for 2D HUDs */ public class SpriteGeometry extends Geometry { float[] vertex; float[] uvs; short[] faces; public int spriteCount; int vertexPointer = 0; int facePointer = 0; public SpriteGeometry(int spriteCount) { this.spriteCount ...
core/src/main/java/jmini3d/geometry/SpriteGeometry.java
0.721743
0.518485
SpriteGeometry.java
starcoder
package leetcode.biweekly_contests.biweekly_54; import java.util.ArrayDeque; import java.util.Deque; public class P_4 { private static final class Tree { private char op = '*'; private int val = -1; private Tree left, right; private Tree(char op) { this.op = op; ...
Java/leetcode/biweekly_contests/biweekly_54/P_4.java
0.898916
0.474631
P_4.java
starcoder
package com.alessandrognoatto.matrixDecompositions; import org.apache.commons.math3.complex.Complex; import org.apache.commons.math3.complex.ComplexField; import org.apache.commons.math3.linear.FieldMatrix; import org.apache.commons.math3.linear.FieldVector; import org.apache.commons.math3.linear.MatrixUtils; public ...
matrix-functions/src/com/alessandrognoatto/matrixDecompositions/HausHolderQR.java
0.586286
0.476762
HausHolderQR.java
starcoder
package pt.ulisboa.tecnico.socialsoftware.tutor.question.dto; import org.springframework.data.annotation.Transient; import pt.ulisboa.tecnico.socialsoftware.tutor.question.domain.Question; import pt.ulisboa.tecnico.socialsoftware.tutor.question.domain.Topic; import java.io.Serializable; import java.time.format.DateTi...
backend/src/main/java/pt/ulisboa/tecnico/socialsoftware/tutor/question/dto/QuestionDto.java
0.693992
0.401453
QuestionDto.java
starcoder
package com.liyangbin.cartrofit.flow; import java.util.ArrayList; import java.util.Objects; public abstract class LifeAwareHotFlowSource<T> implements FlowSource<T> { private ArrayList<Flow.Injector<T>> safeInjectors; private boolean isActive; @Override public void startWithInjector(Flow.Injector<T> ...
core/src/main/java/com/liyangbin/cartrofit/flow/LifeAwareHotFlowSource.java
0.888408
0.468426
LifeAwareHotFlowSource.java
starcoder
package fr.marcwrobel.jbanking.iban; import fr.marcwrobel.jbanking.IsoCountry; import java.io.Serializable; import java.util.Optional; import java.util.regex.Pattern; /** * An International Bank Account Number (IBAN) Code as specified by the <a * href="https://www.iso13616.org">ISO 13616:2007 standard</a>. * * <p...
src/main/java/fr/marcwrobel/jbanking/iban/Iban.java
0.939982
0.421671
Iban.java
starcoder
package caseengine.neural.node; import java.util.ArrayList; import java.util.HashMap; import java.util.Map.Entry; /** * A neural network node that accepts weighted input from other nodes to * determine its output. No guarantees are made about the use of the net * weighted input, especially in determining the outpu...
Case/src/caseengine/neural/node/ConnectableNode.java
0.922251
0.499573
ConnectableNode.java
starcoder
package boofcv.alg.fiducial.calib.circle; import boofcv.abst.filter.binary.InputToBinary; import boofcv.alg.fiducial.calib.circle.EllipseClustersIntoGrid.Grid; import boofcv.alg.shapes.ellipse.BinaryEllipseDetector; import boofcv.struct.image.GrayU8; import boofcv.struct.image.ImageGray; import georegression.struct.cu...
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/calib/circle/DetectCircleGrid.java
0.908287
0.624408
DetectCircleGrid.java
starcoder
package ayp2.clase08.divisionYConquista; import org.junit.Assert; import org.junit.Test; public class BuscadorTest { @Test public void probarUnaListaVacia() { int[] array = {}; Assert.assertEquals(-1, Buscador.busquedaBinaria(array, 1)); } @Test public void probarUnaListaConUnElementoEncontrado() { int...
src/ayp2/clase08/divisionYConquista/BuscadorTest.java
0.700792
0.754305
BuscadorTest.java
starcoder
package pl.themolka.arcade.region; import org.bukkit.util.BlockVector; import org.bukkit.util.Vector; import pl.themolka.arcade.config.Ref; import pl.themolka.arcade.game.Game; import java.util.Random; public class NegativeRegion extends AbstractRegion { private final UnionRegion region; public NegativeRegi...
src/main/java/pl/themolka/arcade/region/NegativeRegion.java
0.899403
0.417865
NegativeRegion.java
starcoder
package org.springframework.util; import java.lang.reflect.Array; /** * Miscellaneous object utility methods. Mainly for internal use within the * framework; consider Jakarta's Commons Lang for a more comprehensive suite * of object utilities. * * @author <NAME> * @author <NAME> * @author <NAME> * @since 19.0...
src/org/springframework/util/ObjectUtils.java
0.884352
0.416322
ObjectUtils.java
starcoder
package game.chunk; import engine.disk.PrimitiveChunkObject; import engine.disk.Disk; import engine.graphics.Mesh; import engine.settings.Settings; import engine.time.Delta; import game.blocks.BlockDefinitionContainer; import game.light.Light; import game.player.Player; import org.joml.Vector2i; import org.joml.Vector...
src/main/java/game/chunk/Chunk.java
0.560974
0.419172
Chunk.java
starcoder
package com.wang.datastructure.hashtable; /** * @author 王念 * @create 2019-09-10 20:32 * 平方探测实现散列表 */ public class QuadraticProbingHashTable<T> implements HashTable<T> { public QuadraticProbingHashTable() { this(DEFAULT_TABLE_SIZE); } public QuadraticProbingHashTable(int size) { allocat...
src/main/java/com/wang/datastructure/hashtable/QuadraticProbingHashTable.java
0.64646
0.436802
QuadraticProbingHashTable.java
starcoder
package it.unimi.dsi.law.stat; /* * Copyright (C) 2004-2015 <NAME>, <NAME> and <NAME> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your opti...
src/law/src/it/unimi/dsi/law/stat/CorrelationIndex.java
0.875721
0.419707
CorrelationIndex.java
starcoder
package com.chikeandroid.tutsplus_glide; import android.os.Parcel; import android.os.Parcelable; /** * Created by Chike on 2/11/2017. */ public class SpacePhoto implements Parcelable { private String mUrl; private String mTitle; public SpacePhoto(String url, String title) { mUrl = url; ...
app/src/main/java/com/chikeandroid/tutsplus_glide/SpacePhoto.java
0.573798
0.425307
SpacePhoto.java
starcoder
package com.conveyal.r5.analyst; import com.conveyal.r5.profile.FastRaptorWorker; import com.conveyal.r5.transit.path.Path; import com.conveyal.r5.transit.path.PatternSequence; import org.apache.commons.math3.util.FastMath; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import jav...
src/main/java/com/conveyal/r5/analyst/PathScorer.java
0.782164
0.494141
PathScorer.java
starcoder
DESCRIPTION The code sample demonstrates establishing a connection to Autonomous Database (ATP/ADW) using Oracle JDBC driver and Universal Connection Pool (UCP). It does the following. (a) Set the connection factory class name to oracle.jdbc.pool.OracleDataSource before getting a connection. (b) Set the c...
java/jdbc/ConnectionSamples/ADBQuickStart.java
0.603815
0.597197
ADBQuickStart.java
starcoder
package io.github.achacha.decimated.decimate; import java.util.Random; /** * Every iteration checks in RNG is less than or equals to threshold of this executor * Optionally triggers only once during a given interval, if doesn't trigger doesn't reset the interval */ public class ExecuteRandom extends AbstractExecut...
src/main/java/io/github/achacha/decimated/decimate/ExecuteRandom.java
0.9345
0.4917
ExecuteRandom.java
starcoder
package com.company; public class ChessBoard { private Chesspiece[][] board; public ChessBoard() { setupBoard(); } public ChessBoard(boolean makeEmpty) { if(makeEmpty) board = new Chesspiece[8][8]; else setupBoard(); } public Chesspiece getPiece(char column, byte row...
EU3/ChessBoard.java
0.643441
0.494202
ChessBoard.java
starcoder
package net.jini.discovery; import java.io.IOException; /** * This interface defines methods and constants related to the management of the sets of lookup * services that are to be discovered using the multicast discovery protocol; that is, lookup * services that are discovered by way of group discovery. The metho...
xap-core/xap-datagrid/src/main/java/net/jini/discovery/DiscoveryGroupManagement.java
0.911125
0.422683
DiscoveryGroupManagement.java
starcoder
package org.chromium.chrome.browser.omnibox; import android.util.Log; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.List; /** * Structured representation of the JSON payload of a suggestion with an answer. An answer has * exact...
app/src/main/java/org/chromium/chrome/browser/omnibox/SuggestionAnswer.java
0.8415
0.427337
SuggestionAnswer.java
starcoder
package com.google.jse4conf; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class Conf2JSTest extends ConfTestBase { // NOTE: to skip a test,...
javatests/com/google/jse4conf/Conf2JSTest.java
0.80784
0.404213
Conf2JSTest.java
starcoder
package io.jenetics; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import io.jenetics.internal.util.Equality; import io.jenetics.internal.util.Hash; import io.jenetics.internal.util.reflect; import io.jenetics.util.DoubleRange; import io....
jenetics/src/main/java/io/jenetics/DoubleChromosome.java
0.942002
0.59461
DoubleChromosome.java
starcoder
package org.jgrapht; import java.util.*; import org.jgrapht.alg.shortestpath.*; import org.jgrapht.alg.util.*; /** * Collection of methods which provide numerical graph information. * * @author <NAME> */ public abstract class GraphMetrics { /** * Compute the <a href="http://mathworld.wolfram.com/GraphD...
jgrapht-master/jgrapht-core/src/main/java/org/jgrapht/GraphMetrics.java
0.944498
0.809615
GraphMetrics.java
starcoder
package org.jzy3d.maths.algorithms; import org.jzy3d.maths.Array; import org.jzy3d.maths.Scale; import org.jzy3d.maths.Statistics; // warn : cast (float) public class OutlierRemover { public static int[] getOutlierIndices(double[] values, int nVariance) { Scale bounds = getInlierBounds(values, nVariance); ...
jzy3d-core/src/main/java/org/jzy3d/maths/algorithms/OutlierRemover.java
0.772874
0.567457
OutlierRemover.java
starcoder
package org.ugent.caagt.genestacker.search; import java.util.Map; import org.ugent.caagt.genestacker.exceptions.CrossingSchemeException; import org.ugent.caagt.genestacker.exceptions.ImpossibleCrossingException; /** * Special extension of a crossing node to model selfings. * * @author <a href="mailto:<EMAIL>"><N...
Genestacker/Genestacker-lib/src/main/java/org/ugent/caagt/genestacker/search/SelfingNode.java
0.887863
0.411406
SelfingNode.java
starcoder
package instruction.MultipleTurtleCommands; import java.util.List; import java.util.Set; import java.util.TreeSet; import instruction.InstructionData; import view.ActorView; /** * <p> * <b>SLogo Documentation:</b> Concrete Instruction subclass which takes two * SLogo arguments: 1) list of turtle ids 2) list of co...
src/instruction/MultipleTurtleCommands/Ask.java
0.843348
0.418756
Ask.java
starcoder
package de.pxlab.stat; import java.util.*; import java.io.PrintStream; import de.pxlab.util.StringExt; /** * A table which has an extensible number of rows and a fixed number of columns. * The columns of the table have names. * * @author <NAME> * @version 0.1.0 */ public class DataTable extends ...
pxlab/src/main/java/de/pxlab/stat/DataTable.java
0.676406
0.421671
DataTable.java
starcoder
package cz.siret.protein.utils.action.ligandselector.clustering; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * We start with each element in it's own cluster. * Then for each cluster we try to merge it with all other. * <p> * We start by wrapping up the e...
protein-utils/src/main/java/cz/siret/protein/utils/action/ligandselector/clustering/GridBasedClustering.java
0.846673
0.686859
GridBasedClustering.java
starcoder
package com.google.errorprone.bugpatterns; import static com.google.common.collect.ImmutableSet.toImmutableSet; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import java.util.Arrays; import java.util.Set; import java.util....
core/src/main/java/com/google/errorprone/bugpatterns/ArgumentParameterSimilarityMetrics.java
0.713232
0.404596
ArgumentParameterSimilarityMetrics.java
starcoder
import java.awt.Color; import java.util.Random; public class Particle { // All the default properties of a particle public static final int DEFAULT_MAX_VELOCITY = 3; public static final int DEFAULT_RADIUS = 10; public static final double DEFAULT_MASS = 250; public static final Color DEFAULT_COLOR =...
Particle.java
0.92348
0.531027
Particle.java
starcoder
public class SpeedConverter { private double milesPerHour; // The value in miles per hour private double milesPerMinute; // The value in miles per minute private double feetPerHour; // The value in feet per hour private double feetPerMinute; // The value in feet per minute private final int FEE...
Tests/Test1/SpeedConverter.java
0.898199
0.447883
SpeedConverter.java
starcoder
package gov.sandia.cognition.statistics.distribution; import gov.sandia.cognition.annotation.PublicationReference; import gov.sandia.cognition.annotation.PublicationReferences; import gov.sandia.cognition.annotation.PublicationType; import gov.sandia.cognition.math.matrix.Vector; import gov.sandia.cognition.math.matri...
Components/LearningCore/Source/gov/sandia/cognition/statistics/distribution/NormalInverseGammaDistribution.java
0.966781
0.691315
NormalInverseGammaDistribution.java
starcoder
package neureka.dtype; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.Iterator; /** * This interface enables "Polymorphic" utility by defining common functionalities * used for handling various numeric types. * Implementations of this interface are utility clas...
src/main/java/neureka/dtype/NumericType.java
0.894098
0.490602
NumericType.java
starcoder
package com.github.rinde.rinsim.core.model.road; import java.util.HashMap; import java.util.Map; import javax.measure.Measure; import javax.measure.converter.UnitConverter; import javax.measure.quantity.Duration; import javax.measure.quantity.Length; import javax.measure.quantity.Velocity; import javax.measure.unit.S...
core/src/main/java/com/github/rinde/rinsim/core/model/road/RoadUnits.java
0.950903
0.420362
RoadUnits.java
starcoder
package com.jwetherell.euler; /** * What is the greatest product of four adjacent numbers in any direction (up, down, left, right, or diagonally) in the * 20×20 grid? http://projecteuler.net/problem=11 * * @author <NAME> <<EMAIL>> */ public class Problem11 { public static final long solve(int[][] numbers) {...
src/com/jwetherell/euler/Problem11.java
0.834811
0.433082
Problem11.java
starcoder
class Demo { public static void main(String args[]) { int cost_1[][] = {{4, 7, 12}}; get_total_cost(1, cost_1); int cost_3[][] = {{5, 14, 73}, {1, 543, 875}, {231, 4, 531}, {7, 11, 14}}; get_total_cost(3,cost_3); int cost_2[][] = {{1, 2, 3}, {10, 11, 12}}; get_total...
src/DemoPractice2.java
0.516108
0.53522
DemoPractice2.java
starcoder
package controllers.scene; import model.graphics.Ray; import model.graphics.ScreenDimensions; import model.math.Point; import model.math.Vector; import model.graphics.Sample; /** * @author <NAME> * @version 1.0 * Class camera is reponsible for generating rays for the given corresponding pixel */ public class Came...
src/controllers/scene/Camera.java
0.892595
0.64072
Camera.java
starcoder
package com.widgetgrid.android.arimagesearch.zxing; public class PointProcessor { private final BitMatrix image; public PointProcessor(BitMatrix image) { this.image = image; } protected BitMatrix getImage() { return image; } /** * <p>Detects a QR Code in an image, simply.</p> ...
src/com/widgetgrid/android/arimagesearch/zxing/PointProcessor.java
0.898153
0.476945
PointProcessor.java
starcoder
public class Triangle { static Matrix IDENT = new Matrix(new double[][]{ {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0} }); final static int LEN = 9; final double[] tri; public Triangle(double[] coords) { tri = new double[LEN]; for (int i...
Triangle.java
0.66236
0.410047
Triangle.java
starcoder
package com.codahale.kmspass; import com.lambdaworks.crypto.SCrypt; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.security.GeneralSecurityException; import java.security.MessageDigest; import java.security.SecureRandom; import java.text.Normalizer; import java.util.Base64; import ja...
src/main/java/com/codahale/kmspass/PasswordHasher.java
0.92427
0.432663
PasswordHasher.java
starcoder
package com.github.glusk2.sprouts.core.comb; import java.util.Collections; import java.util.HashSet; import java.util.Set; import com.badlogic.gdx.graphics.Color; import com.github.glusk2.sprouts.core.geom.IsPointOnLineSegment; import com.github.glusk2.sprouts.core.geom.Polyline; import com.github.glusk2.sprouts.core...
core/src/main/java/com/github/glusk2/sprouts/core/comb/SproutsStateAfterSubmove.java
0.904056
0.466724
SproutsStateAfterSubmove.java
starcoder
package com.github.rkumsher.date; import static com.google.common.base.Preconditions.*; import static java.time.Month.FEBRUARY; import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import java.time.LocalDateTime; import java.time.LocalTime; import java...
src/main/java/com/github/rkumsher/date/DateUtils.java
0.919159
0.405096
DateUtils.java
starcoder
package dev.lazurite.rayon.impl.util; import com.jme3.math.Quaternion; import com.jme3.math.Vector3f; import dev.lazurite.rayon.api.PhysicsElement; import dev.lazurite.rayon.impl.bullet.math.Convert; import dev.lazurite.toolbox.api.math.QuaternionHelper; import dev.lazurite.toolbox.api.math.VectorHelper; /** * A {@l...
common/src/main/java/dev/lazurite/rayon/impl/util/Frame.java
0.887424
0.489809
Frame.java
starcoder
package org.optaweb.employeerostering.domain.tenant.view; import java.time.DayOfWeek; import javax.validation.constraints.NotNull; import org.optaplanner.core.api.score.buildin.hardmediumsoftlong.HardMediumSoftLongScore; import org.optaweb.employeerostering.domain.common.AbstractPersistable; public class RosterCons...
optaweb-employee-rostering-backend/src/main/java/org/optaweb/employeerostering/domain/tenant/view/RosterConstraintConfigurationView.java
0.817429
0.42668
RosterConstraintConfigurationView.java
starcoder
package edu.princeton.cs.exercise.chapter1_5; import edu.princeton.cs.algs4.StdOut; /** * 1.5.5 Estimate the minimum amount of time (in days) that would be required for quick-find to * solve a dynamic connectivity problem with 10^9 sites and 10^6 input pairs, on a computer capable * of executing 10^9 instructions ...
alg4/src/edu/princeton/cs/exercise/chapter1_5/e01_05_05.java
0.830044
0.578954
e01_05_05.java
starcoder
package org.lcsim.recon.cat; import java.util.*; import org.lcsim.event.*; /** * Simple data format for digitized (aka smeared, taking segmentation into account) * hits, either 2D or 3D, used within the Garfield track finding package for * calorimeter assisted tracking. This class will have to be re-written once ...
tracking/src/main/java/org/lcsim/recon/cat/GarfieldHit.java
0.785555
0.522446
GarfieldHit.java
starcoder
package cz.metacentrum.perun.core.api; import java.util.List; import java.util.Map; import java.util.Objects; /** * RoleManagementRules represents a set of rules which is used to determine principal's access rights for managing and reading a role. * Moreover, it contains allowed combinations of object and entity to...
perun-base/src/main/java/cz/metacentrum/perun/core/api/RoleManagementRules.java
0.850934
0.559952
RoleManagementRules.java
starcoder
package q1600; import org.junit.runner.RunWith; import util.runner.Answer; import util.runner.LeetCodeRunner; import util.runner.TestData; import util.runner.data.DataExpectation; /** * [Hard] 1559. Detect Cycles in 2D Grid * https://leetcode.com/problems/detect-cycles-in-2d-grid/ * * Given a 2D array of characte...
src/main/java/q1600/Q1559_DetectCyclesIn2dGrid.java
0.805861
0.500916
Q1559_DetectCyclesIn2dGrid.java
starcoder
package com.jaxfrank.main.voxelEngine.rendering.blockRenderers; import java.util.ArrayList; import com.base.engine.math.Vector2f; import com.base.engine.math.Vector3f; import com.base.engine.math.Vector3i; import com.base.engine.rendering.Vertex; import com.jaxfrank.main.voxelEngine.rendering.util.TextureUtil; import...
Workspace/EngineTest/src/com/jaxfrank/main/voxelEngine/rendering/blockRenderers/PlantRenderer.java
0.550849
0.458591
PlantRenderer.java
starcoder
package io.github.greyp9.arwo.core.value; import io.github.greyp9.arwo.core.lang.SystemU; public class Matrix { private final int rows; private final int columns; private final String[] rowLabels; private final String[] columnLabels; private final Object[][] values; public Matrix(final int ro...
src/main/core/java/io/github/greyp9/arwo/core/value/Matrix.java
0.871064
0.528594
Matrix.java
starcoder
package ismmBpt2015.model; import java.io.IOException; import java.util.Map; import com.jmatio.io.MatFileReader; import com.jmatio.types.MLArray; import com.jmatio.types.MLNumericArray; /** * This class represents a dictionary (bag) of the parameters needed to calculate the * kernel descriptors within the BPT. It i...
src/java/ismmBpt2015/model/KernelDescriptorDictionary.java
0.765593
0.439386
KernelDescriptorDictionary.java
starcoder
package org.openstreetmap.atlas.geography.atlas.raw; import org.openstreetmap.atlas.geography.atlas.Atlas; import org.openstreetmap.atlas.utilities.testing.CoreTestRule; import org.openstreetmap.atlas.utilities.testing.TestAtlas; import org.openstreetmap.atlas.utilities.testing.TestAtlas.Line; import org.openstreetmap...
src/integrationTest/java/org/openstreetmap/atlas/geography/atlas/raw/DynamicRawAtlasSectioningTestRule.java
0.778986
0.439326
DynamicRawAtlasSectioningTestRule.java
starcoder
package frc.robot.core; public final class Globals { public static boolean driveDirection; public static int ball_counter; public static double LEDoffset=-.06; public static int LEDmode = 22; public static boolean[] lineloopflag ={ false, false }; public static boole...
src/main/java/frc/robot/core/Globals.java
0.541894
0.412057
Globals.java
starcoder
package org.wcardinal.controller.data.internal; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.NavigableMap; import java.util.NavigableSet; import org.wcardinal.controller.data.SList.Update; public class SListPatchMaps { SListPatchMaps() {} sta...
src/main/java/org/wcardinal/controller/data/internal/SListPatchMaps.java
0.58522
0.405449
SListPatchMaps.java
starcoder
package com.google.firebase.messaging.directboot.threads; import com.google.errorprone.annotations.CompileTimeConstant; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ThreadFactory; /** * Factory to w...
firebase-messaging-directboot/src/main/java/com/google/firebase/messaging/directboot/threads/ExecutorFactory.java
0.877221
0.408926
ExecutorFactory.java
starcoder
package datastructure; import java.util.Arrays; public class IntSet { private static final int EMPTY = -1; private int size; private int[] indexToValue; private int[] valueToIndex; public IntSet(int capacity) { this.size = 0; indexToValue = new int[capacity]; valueToIndex ...
src/datastructure/IntSet.java
0.864725
0.581244
IntSet.java
starcoder
* Modified by the Sable Research Group and others 1997-2003. * 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.toolkits.graph; import java.util.*; import soot.*; /** * A CFG where the nodes are {...
ICC/SOOT-Nightly/soot-github/src/soot/toolkits/graph/ZonedBlockGraph.java
0.764892
0.413773
ZonedBlockGraph.java
starcoder
package com.hit.basmath.learn.others; /** * 831. Masking Personal Information * <p> * We are given a personal information string S, which may represent either an email address or a phone number. * <p> * We would like to mask this personal information according to the following rules: * <p> * 1. Email address: ...
codes/java/leetcodes/src/main/java/com/hit/basmath/learn/others/_831.java
0.816553
0.547041
_831.java
starcoder
package dhamith.me.numcalc; import java.util.ArrayList; import java.util.HashMap; import java.util.Stack; class Expression { private final ArrayList<Node> expression; private final HashMap<String, Integer> order; private final String input; private final int radix; private class Node { St...
NumCalc/app/src/main/java/dhamith/me/numcalc/Expression.java
0.825097
0.400632
Expression.java
starcoder
package com.rg.stream.sampler; import java.util.Random; /** * Implementation of <i>Algorithm X</i> in <b>Random Sampling with a Reservoir</b>. * <p> * * algorithms decide how many items to skip, rather than deciding whether or not to skip an item each time it is fed. * This property allows these algorithms to p...
src/main/java/com/rg/stream/sampler/AlgoXSampler.java
0.944919
0.500488
AlgoXSampler.java
starcoder
package io.inverno.mod.irt.compiler.spi; import java.util.Map; import java.util.Optional; /** * <p> * An option info corresponds to a template declaration in a template set source * file. * </p> * * <p> * A template specifies the rendering rules of one or more input data. It can * have a name to be able to d...
inverno-irt-compiler/src/main/java/io/inverno/mod/irt/compiler/spi/TemplateInfo.java
0.875081
0.5119
TemplateInfo.java
starcoder
package stats; import brightbodies.CartesianPoint; import brightbodies.Coordinate; /** * This class contains static methods that help with finding the moment, area, and centroid of a BrightBody within * a given image. * * @author <NAME> * @version 8 July 2016 * TODO(Major): Fix reversed y-axis bug */ public fi...
src/stats/MomentStats.java
0.793386
0.578686
MomentStats.java
starcoder
package ch.ethz.bhepp.hybridstochasticsimulation.simulators; import static com.google.common.base.Preconditions.checkArgument; import java.util.LinkedList; import java.util.List; import org.apache.commons.math3.random.RandomDataGenerator; import ch.ethz.bhepp.hybridstochasticsimulation.Utilities; import ch.ethz.bhe...
HybridStochasticSimulation/src/ch/ethz/bhepp/hybridstochasticsimulation/simulators/StochasticSimulator.java
0.581303
0.426441
StochasticSimulator.java
starcoder
package org.cp.elements.io; import java.io.File; import java.io.FileFilter; import java.util.regex.Pattern; import org.cp.elements.lang.Assert; import org.cp.elements.lang.Filter; import org.cp.elements.lang.annotation.NullSafe; /** * The RegexFileFilter class is a {@link FileFilter} and {@link Filter} implementati...
src/main/java/org/cp/elements/io/RegexFileFilter.java
0.933915
0.499146
RegexFileFilter.java
starcoder
package q1000; import org.junit.runner.RunWith; import util.runner.Answer; import util.runner.LeetCodeRunner; import util.runner.TestData; import util.runner.data.DataExpectation; /** * [Easy] 985. Sum of Even Numbers After Queries * https://leetcode.com/problems/sum-of-even-numbers-after-queries/ * * We have an ...
src/main/java/q1000/Q985_SumOfEvenNumbersAfterQueries.java
0.841598
0.494934
Q985_SumOfEvenNumbersAfterQueries.java
starcoder
package net.ninjacat.smooth.iterators; import java.util.*; /** * Iterable that can host multiple {@link java.lang.Iterable}s and provide an {@link java.util.Iterator} * to walk them all. */ public class MultiIterable<T> implements Iterable<T> { private final List<Iterable<T>> collections; public MultiIter...
src/main/java/net/ninjacat/smooth/iterators/MultiIterable.java
0.928846
0.436322
MultiIterable.java
starcoder
package org.apache.lucene.spatial.spatial4j; import org.apache.lucene.spatial3d.geom.GeoBBox; import org.apache.lucene.spatial3d.geom.GeoBBoxFactory; import org.apache.lucene.spatial3d.geom.GeoPoint; import org.apache.lucene.spatial3d.geom.GeoPointShapeFactory; import org.apache.lucene.spatial3d.geom.LatLonBounds; imp...
lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dRectangleShape.java
0.917585
0.446314
Geo3dRectangleShape.java
starcoder
package conceptnet.kb.graph; import conceptnet.kb.wordnet.PosType; import java.util.List; /** * ConceptNet Node Service. * * @author kaustubhdholé. */ public interface ICnNode { /** * Return all nodes connected one-hop away. * * @return display term for each node */ List<ConnectedNod...
src/main/java/conceptnet/kb/graph/ICnNode.java
0.856017
0.44077
ICnNode.java
starcoder
package org.sd.util; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Map from a key to multiple values with frequencies for each value. * <p> * @author <NAME> */ public class FrequencyMap<K, V> { ...
src/main/java/org/sd/util/FrequencyMap.java
0.883066
0.414484
FrequencyMap.java
starcoder
package com.wrapper.spotify.models; public class AudioFeature { private double danceability; private double energy; private int key; private double loudness; private int mode; private double speechiness; private double acousticness; private double instrumentalness; private double l...
src/main/java/com/wrapper/spotify/models/AudioFeature.java
0.840881
0.501465
AudioFeature.java
starcoder
package HxCKDMS.HxCBlocks.Client.Rendering.TileRenderer; import HxCKDMS.HxCBlocks.lib.Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraf...
src/main/java/HxCKDMS/HxCBlocks/Client/Rendering/TileRenderer/HxCTileRender.java
0.506591
0.400603
HxCTileRender.java
starcoder
import java.util.stream.Stream; import java.util.stream.IntStream; import java.util.stream.Collectors; import java.util.List; import java.util.ArrayList; import java.util.Arrays; import java.util.Optional; public class Main { private static boolean isPrime(int n) { return IntStream .iterate(2,...
Labs/Lab-7/Main.java
0.91611
0.556038
Main.java
starcoder
package org.omg.dds.sub; import java.io.Closeable; import java.util.Set; import org.omg.dds.core.Condition; /** * ReadCondition objects are conditions specifically dedicated to read * operations and attached to one {@link org.omg.dds.sub.DataReader}. * * ReadCondition objects allow an application to specify th...
srcJava/org/omg/dds/sub/ReadCondition.java
0.90137
0.644463
ReadCondition.java
starcoder
package com.davidsoergel.trees; import org.jetbrains.annotations.NotNull; import java.util.Collection; import java.util.List; /** * A node in a simple hierarchy, where a value of the given generic type is attached at each node. A node may have any * number of children, which are also HierarchyNodes of the same ge...
src/main/java/com/davidsoergel/trees/HierarchyNode.java
0.793786
0.415788
HierarchyNode.java
starcoder
package BTA; import ABP.*; import java.time.*; import java.time.temporal.ChronoUnit; /** * A stock (option functionality to be implemented in future versions) that is owned the {@link Portfolio}. Has basic * identification information, such as the name and stock symbol of the company, the sector (based on Hesiod F...
src/BTA/Asset.java
0.846165
0.452778
Asset.java
starcoder
package com.amyliascarlet.lib.datatable; import java.lang.reflect.Type; import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.ListIterator; import java.util.Vector; public class DataColumnCollection implements List<DataColumn> { // key值为列头小...
src/main/java/com/amyliascarlet/lib/datatable/DataColumnCollection.java
0.617974
0.511229
DataColumnCollection.java
starcoder
package com.revolsys.geometry.edgegraph; import com.revolsys.geometry.model.Point; /** * A {@link HalfEdge} which supports * marking edges with a boolean flag. * Useful for algorithms which perform graph traversals. * * @author <NAME> * */ public class MarkHalfEdge extends HalfEdge { /** * Tests whether t...
revolsys-core/src/main/java/com/revolsys/geometry/edgegraph/MarkHalfEdge.java
0.953253
0.483039
MarkHalfEdge.java
starcoder
package chessgame.model; import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; public class QueenPieceTest { private QueenPiece qTest; private QueenPiece qp; private ChessBoard cb; @Before public void setUp(){ qTest = new QueenPiece(); qTest.setColor(true); qTest.setxLocation(4...
junit/chessgame/model/QueenPieceTest.java
0.515376
0.590455
QueenPieceTest.java
starcoder
package AlgoBinarysearchSort; import java.util.PriorityQueue; public class SortAlmostSortedKArray_SORT { /* * Given an array of n elements, where each element is at most k away from its target position, devise an algorithm * that sorts in O(n log k) time. For example, let us consider k is 2, an element at ind...
leetcode/java/AlgoBinarysearchSort/SortAlmostSortedKArray_SORT.java
0.725746
0.504333
SortAlmostSortedKArray_SORT.java
starcoder
package com.latitude.xpression.core.el.ast; import java.math.BigDecimal; import java.util.List; import com.latitude.xpression.core.ExpressionException; import com.latitude.xpression.support.Preconditions; import com.latitude.xpression.support.conversion.exception.CannotConvertValueException; /** * Abstract definiti...
src/main/java/com/latitude/xpression/core/el/ast/AbstractFunction.java
0.895391
0.427456
AbstractFunction.java
starcoder
package gov.sandia.cognition.statistics.distribution; import gov.sandia.cognition.math.matrix.Vector; import gov.sandia.cognition.math.matrix.VectorFactory; import gov.sandia.cognition.statistics.MultivariateClosedFormComputableDistributionTestHarness; /** * Unit tests for DirichletDistributionTest. * * @author kr...
Components/LearningCore/Test/gov/sandia/cognition/statistics/distribution/DirichletDistributionTest.java
0.891224
0.632517
DirichletDistributionTest.java
starcoder
package org.pathwayeditor.businessobjects.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.jmock.Expectations; import org.jmock.Mockery; import org.jmock.integration.junit4.JUnit4Mockery; import org.junit.After; impo...
test/org/pathwayeditor/businessobjects/impl/LinkAttributeCopyFactoryTest.java
0.711832
0.42931
LinkAttributeCopyFactoryTest.java
starcoder
package com.brandon.snake.graphics; import static org.lwjgl.opengl.GL11.GL_TRUE; import static org.lwjgl.opengl.GL20.GL_COMPILE_STATUS; import static org.lwjgl.opengl.GL20.GL_FRAGMENT_SHADER; import static org.lwjgl.opengl.GL20.GL_VERTEX_SHADER; import static org.lwjgl.opengl.GL20.glAttachShader; import static org.lwj...
src/com/brandon/snake/graphics/Shader.java
0.62223
0.463869
Shader.java
starcoder
package dev.ytachi.hackerrank.interview.kit.sorting; import java.util.Arrays; /** * https://www.hackerrank.com/challenges/ctci-merge-sort/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=sorting * * Theory: https://www.geeksforgeeks.org/merge-sort/ * */ public class Merge...
src/main/java/dev/ytachi/hackerrank/interview/kit/sorting/MergeSortCountingInversions.java
0.713032
0.640172
MergeSortCountingInversions.java
starcoder
package net.ccmob.usbled.lib.dataTypes; import java.awt.Color; public class RGBColor { private int r = 0, g = 0, b = 0; public RGBColor() { this(0, 0, 0); } public RGBColor(RGBColor c) { this(c.getR(), c.getG(), c.getB()); } public RGBColor(int r, int g, int b) { th...
UsbLedLib/src/main/java/net/ccmob/usbled/lib/dataTypes/RGBColor.java
0.909204
0.416085
RGBColor.java
starcoder
package com.whiskytangofox.ptbadiscordbot.GoogleSheet; import com.google.api.services.sheets.v4.model.CellData; import com.google.api.services.sheets.v4.model.GridData; import com.whiskytangofox.ptbadiscordbot.App; import java.util.Collection; import java.util.HashMap; public class RangeWrapper { private final ...
src/main/java/com/whiskytangofox/ptbadiscordbot/GoogleSheet/RangeWrapper.java
0.791781
0.446314
RangeWrapper.java
starcoder
package org.apache.mahout.clustering.dirichlet; import java.util.List; import org.apache.mahout.clustering.Cluster; import org.apache.mahout.clustering.Model; import org.apache.mahout.clustering.ModelDistribution; import org.apache.mahout.math.DenseVector; import org.apache.mahout.math.Vector; import org.apache.mahou...
core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletClusterer.java
0.952264
0.676202
DirichletClusterer.java
starcoder
package spicy.utils; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import org.lwjgl.opengl.GL11; import static net.minecraft.client.renderer.G...
src/minecraft/spicy/utils/RenderingUtil.java
0.503906
0.418162
RenderingUtil.java
starcoder
package dk.itu.kelvin.util; // General utilities import java.util.List; // I/O utilities import java.io.Serializable; // Math import dk.itu.kelvin.math.Geometry; // Functional utilities import dk.itu.kelvin.util.function.Filter; /** * Spatial index interface. * * @param <E> The type of element stored within the...
src/main/java/dk/itu/kelvin/util/SpatialIndex.java
0.933172
0.472257
SpatialIndex.java
starcoder
package de.anddisa.adb.util; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.List; /** * Utility methods for arrays */ public class ArrayUtil { private ArrayUtil() { } /** * Build an array from the provided contents. ...
src/main/java/de/anddisa/adb/util/ArrayUtil.java
0.896987
0.473109
ArrayUtil.java
starcoder
package org.sheepy.lily.vulkan.extra.graphic.shape.adapter; import org.joml.Vector3d; import org.lwjgl.util.par.ParShapesMesh; import org.sheepy.lily.core.api.adapter.Dispose; import org.logoce.notification.api.DummyNotifier; import org.sheepy.lily.vulkan.extra.api.mesh.IMeshStructureAdapter; import org.sheepy.lily.vu...
org.sheepy.lily.vulkan.extra.graphic.shape/src/main/java/org/sheepy/lily/vulkan/extra/graphic/shape/adapter/AbstractShapeMeshAdapter.java
0.709523
0.407216
AbstractShapeMeshAdapter.java
starcoder
package mil.nga.geopackage.extension.related; import mil.nga.geopackage.contents.ContentsDataType; /** * Spec supported User-Defined Related Data Tables * * @author osbornb * @since 3.0.1 */ public enum RelationType { /** * Link features with other features */ FEATURES("features", ContentsDataType.FEATUR...
src/main/java/mil/nga/geopackage/extension/related/RelationType.java
0.730866
0.448547
RelationType.java
starcoder
package org.xiph.speex; /** * Abstract class that is the base for the various LTP (Long Term Prediction) * Quantisation and Unquantisation methods. */ public abstract class Ltp { /** * Quantification */ public abstract int quant(float[] target, float sw[], int sws, float[] ak, float[] awk1, float awk2[], ...
src/org/xiph/speex/Ltp.java
0.692018
0.440048
Ltp.java
starcoder
package org.uberfire.ext.wires.core.scratchpad.client.shapes.dynamic; import com.ait.lienzo.client.core.shape.Rectangle; import org.uberfire.ext.wires.core.api.controlpoints.ControlPoint; import org.uberfire.ext.wires.core.api.controlpoints.ControlPointMoveHandler; import org.uberfire.ext.wires.core.api.magnets.Magnet...
uberfire-extensions/uberfire-wires/uberfire-wires-core/uberfire-wires-core-scratchpad/src/main/java/org/uberfire/ext/wires/core/scratchpad/client/shapes/dynamic/WiresRectangle.java
0.869908
0.435541
WiresRectangle.java
starcoder