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 physics.external;
import java.util.ArrayList;
import java.util.List;
/**
* Abstract class of an object affected by physics forces
*
* @author skm44
* @author jrf36
*/
public abstract class PhysicsObject {
protected double myMass;
protected List<PhysicsVector> currentForces = new ArrayList<>();
... | src/main/java/com.yeet.physics/src/physics/external/PhysicsObject.java | 0.901153 | 0.517266 | PhysicsObject.java | starcoder |
package org.simpleframework.util;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Set;
/**
* The <code>KeyMap</code> object is used to represent a map of values
* keyed using a known string. This also ensures... | org/simpleframework/util/KeyMap.java | 0.897639 | 0.583856 | KeyMap.java | starcoder |
package io.github.xebecproject.bls;
import com.google.common.base.Preconditions;
import java.util.Arrays;
public class Signature extends BLSObject {
protected Signature(long cPtr, boolean cMemoryOwn) {
super(cPtr, cMemoryOwn);
}
protected static long getCPtr(Signature obj) {
return (obj == null) ? 0 ... | bls/src/main/java/io.github/xebecproject/bls/Signature.java | 0.806891 | 0.424233 | Signature.java | starcoder |
package de.bitbrain.braingdx.graphics.postprocessing.filters;
import de.bitbrain.braingdx.util.ShaderLoader;
public final class Convolve1D extends Filter<Convolve1D> {
public int length;
public float[] weights;
public float[] offsets;
public Convolve1D(int length) {
this(length, new float[length], n... | core/src/main/java/de/bitbrain/braingdx/graphics/postprocessing/filters/Convolve1D.java | 0.922861 | 0.453625 | Convolve1D.java | starcoder |
package org.apache.geode.redis.internal.executor.set;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.Exe... | geode-redis/src/integrationTest/java/org/apache/geode/redis/internal/executor/set/SetsIntegrationTest.java | 0.854141 | 0.548976 | SetsIntegrationTest.java | starcoder |
package co.elastic.apm.agent.matcher;
import org.stagemonitor.util.StringUtils;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
/*
* Alternatives:
*
* Spring's AntPathMatcher:
* This provides a more powerful glob-syntax to specify URL patterns.
* The downside is that it allo... | apm-agent-core/src/main/java/co/elastic/apm/agent/matcher/WildcardMatcher.java | 0.913628 | 0.442215 | WildcardMatcher.java | starcoder |
package org.apache.phoenix.end2end;
import static org.apache.phoenix.util.TestUtil.A_VALUE;
import static org.apache.phoenix.util.TestUtil.B_VALUE;
import static org.apache.phoenix.util.TestUtil.C_VALUE;
import static org.apache.phoenix.util.TestUtil.E_VALUE;
import static org.apache.phoenix.util.TestUtil.ROW4;
import... | phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateQueryIT.java | 0.674372 | 0.500977 | AggregateQueryIT.java | starcoder |
package javax.crypto;
import java.nio.ByteBuffer;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security... | third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/javax/crypto/CipherSpi.java | 0.913552 | 0.417153 | CipherSpi.java | starcoder |
package eventloop.api;
import java.util.Optional;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer;
/**
* Provides support for time scheduled operations in the event loop.
... | src/main/java/eventloop/api/TimerEventLoop.java | 0.90989 | 0.60542 | TimerEventLoop.java | starcoder |
package org.bouncycastle.pqc.crypto.mceliece;
import org.bouncycastle.pqc.math.linearalgebra.GF2Matrix;
import org.bouncycastle.pqc.math.linearalgebra.GF2mField;
import org.bouncycastle.pqc.math.linearalgebra.Permutation;
import org.bouncycastle.pqc.math.linearalgebra.PolynomialGF2mSmallM;
public class McEliecePriva... | core/src/main/java/org/bouncycastle/pqc/crypto/mceliece/McEliecePrivateKeyParameters.java | 0.894222 | 0.55097 | McEliecePrivateKeyParameters.java | starcoder |
public class Toroidal {
public static void main(String[] args) {
System.out.println(toroidalMatrix("1"));
System.out.println(toroidalMatrix("1 38"));
System.out.println(toroidalMatrix("1 38 11 63"));
System.out.println(toroidalMatrix("1 2 3 4 5 6 7 8 9"));
System.out.println(... | Toroidal.java | 0.692642 | 0.500488 | Toroidal.java | starcoder |
package problems;
/**
* https://leetcode.com/problems/search-for-a-range/description/
*
* * algorithms
* * Medium (31.71%)
* * Total Accepted: 196.9K
* * Total Submissions: 620.9K
* * Testcase Example: '[5,7,7,8,8,10]\n8'
*
* Given an array of integers nums sorted in ascending order, find the starting and... | src/main/java/problems/SearchForARange.java | 0.947149 | 0.461138 | SearchForARange.java | starcoder |
package io.github.hakkelt.ndarrays.internal;
import io.github.hakkelt.ndarrays.*;
import java.util.function.BiFunction;
import java.util.function.BiPredicate;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;
/**
* General N-dimensional arrays holding real values.
*
* The aim of this ... | src/main/java/io/github/hakkelt/ndarrays/internal/RealNDArray.java | 0.908587 | 0.456955 | RealNDArray.java | starcoder |
package org.cugos.wkg;
import java.nio.ByteBuffer;
/**
* Write GeoPackage encoded Geometry
* @author <NAME>
*/
public class GeoPackageWriter implements Writer<byte[]> {
/**
* The GeoPackage version
*/
private int version = 0;
/**
* The GeoPackage binary type
*/
private GeoPack... | src/main/java/org/cugos/wkg/GeoPackageWriter.java | 0.890485 | 0.400163 | GeoPackageWriter.java | starcoder |
package com.opengamma.analytics.financial.interestrate.bond.calculator;
import com.opengamma.analytics.financial.interestrate.InstrumentDerivativeVisitorAdapter;
import com.opengamma.analytics.financial.interestrate.bond.definition.BondTotalReturnSwap;
import com.opengamma.analytics.financial.provider.calculator.issue... | projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/bond/calculator/BondTrsPresentValueCalculator.java | 0.88799 | 0.578329 | BondTrsPresentValueCalculator.java | starcoder |
package edu.wpi.first.wpilibj;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import edu.wpi.first.wpilibj.fixtures.MotorEncoderFixture;
import edu.wpi.first.wpilibj.test.AbstractComsSetup;
import edu.wpi.first.wpilibj.test.TestBench;
import java.util.Arrays;
import java.util.... | wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/MotorInvertingTest.java | 0.901669 | 0.468122 | MotorInvertingTest.java | starcoder |
package com.example.zhbj;
public final class R {
public static final class attr {
/** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>".
Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred fo... | gen/com/example/zhbj/R.java | 0.734596 | 0.495422 | R.java | starcoder |
package corviolis.athena.services.claims;
import corviolis.athena.interfaces.PlayerEntityInf;
import corviolis.athena.services.data.KingdomsData;
import corviolis.athena.util.Parser;
import net.minecraft.particle.DustParticleEffect;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.wo... | src/main/java/corviolis/athena/services/claims/ClaimRenderer.java | 0.790571 | 0.404625 | ClaimRenderer.java | starcoder |
package io.pravega.common.util;
import io.pravega.common.hash.HashHelper;
/**
* Byte Array Wrapper that provides a {@link Object#hashCode()} and {@link Object#equals(Object)} method.
* Suitable for using as {@link java.util.HashMap} key.
*/
public class HashedArray extends ByteArraySegment {
private static fin... | common/src/main/java/io/pravega/common/util/HashedArray.java | 0.951267 | 0.570092 | HashedArray.java | starcoder |
package eu.barkmin.processing.scratch;
import java.awt.Point;
import java.awt.Polygon;
import java.awt.geom.Area;
public class ScratchHitbox {
private Polygon originalPolygon;
private Polygon polygon;
public ScratchHitbox(int[] xPoints, int[] yPoints) {
this.originalPolygon = new Polygon(xPoints,... | src/eu/barkmin/processing/scratch/ScratchHitbox.java | 0.905356 | 0.640172 | ScratchHitbox.java | starcoder |
package org.apache.flink.runtime.io.network.partition;
import org.apache.flink.util.IOUtils;
import javax.annotation.Nullable;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.file.Path;
import static org.apache.flink.util.Preconditions.checkArgument;
imp... | flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/PartitionedFile.java | 0.884763 | 0.568476 | PartitionedFile.java | starcoder |
package org.jbasics.math;
import org.jbasics.types.tuples.Pair;
import java.math.BigDecimal;
import java.math.BigInteger;
public class NumberConverter {
public static BigRational toBigRational(final Number number) {
return BigRational.valueOf(number);
}
public static BigDecimal toBigDecimal(final Number numbe... | src/main/java/org/jbasics/math/NumberConverter.java | 0.654895 | 0.568895 | NumberConverter.java | starcoder |
package cgeo.geocaching.models;
import static org.assertj.core.api.Assertions.assertThat;
import cgeo.CGeoTestCase;
import cgeo.geocaching.utils.FileUtils;
import android.net.Uri;
import android.os.Parcel;
import java.io.File;
/**
* ImageTest unit tests
*/
public class ImageTest extends CGeoTestCase {
privat... | tests/src-android/cgeo/geocaching/models/ImageTest.java | 0.772788 | 0.695978 | ImageTest.java | starcoder |
package org.apache.shiro.mgt;
import org.apache.shiro.subject.Subject;
/**
* A Default {@code SessionStorageEvaluator} that provides reasonable control over if and how Sessions may be used for
* storing Subject state. See the {@link #isSessionStorageEnabled(org.apache.shiro.subject.Subject)}
* method for exact be... | core/src/main/java/org/apache/shiro/mgt/DefaultSessionStorageEvaluator.java | 0.842118 | 0.42913 | DefaultSessionStorageEvaluator.java | starcoder |
package com.vztekoverflow.lospiratos.util;
import javafx.geometry.Point2D;
/**
* Hexagonal grid Axial Coordinate, as defined on https://www.redblobgames.com/grids/hexagons/#coordinates
*/
public class AxialCoordinate {
public AxialCoordinate(int q, int r) {
Q = q;
R = r;
}
... | src/main/java/com/vztekoverflow/lospiratos/util/AxialCoordinate.java | 0.926145 | 0.425128 | AxialCoordinate.java | starcoder |
* Package containing supporting classes, derived from the OXPath model (which itself extends the XPath model).
* This subpackage includes classes and interface relating to the OXPath language.
*/
package uk.ac.ox.cs.diadem.oxpath.model.language;
/**
* Class for encoding aggregated simple steps, which are construct... | oxpath-core/src/main/java/uk/ac/ox/cs/diadem/oxpath/model/language/AggregatedXPathStep.java | 0.959649 | 0.655481 | AggregatedXPathStep.java | starcoder |
package uk.ac.ed.inf.graph.compound.newimpl;
import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import uk.ac.ed.inf.graph.compound.ICompoundGraphElement;
import uk.ac.ed.inf.graph.compound.ISubCompoundGraph;
import uk.ac.ed.inf.graph.compound.ISubCom... | integrationTest/uk/ac/ed/inf/graph/compound/newimpl/SubCompoundGraphFactoryNodeOnlyIntegrationTest.java | 0.666605 | 0.649849 | SubCompoundGraphFactoryNodeOnlyIntegrationTest.java | starcoder |
package com.nephest.jhclife;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.BitSet;
import java.util.stream.IntStream;
public class Generation
{
public static final byte[] MAGIC_BYTES = new byte[]{0xE, 0xA, 0xE, 0x1};
private final int[][] population;
private final long id;
pr... | src/main/java/com/nephest/jhclife/Generation.java | 0.797083 | 0.46563 | Generation.java | starcoder |
package com.shinoow.abyssalcraft.common.world;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.BiomeCache;
import net.minecraft.world.biome.Bio... | src/main/java/com/shinoow/abyssalcraft/common/world/WorldChunkManagerDreadlands.java | 0.791741 | 0.407864 | WorldChunkManagerDreadlands.java | starcoder |
package com.graphicsfuzz.common.ast.expr;
import com.graphicsfuzz.common.ast.IAstNode;
import com.graphicsfuzz.common.ast.visitors.IAstVisitor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
public class TypeConstructorExpr... | ast/src/main/java/com/graphicsfuzz/common/ast/expr/TypeConstructorExpr.java | 0.909913 | 0.459743 | TypeConstructorExpr.java | starcoder |
package gms.shared.mechanisms.objectstoragedistribution.coi.emerging.processingcontrol.commonobjects;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
/**
* Value object holding provenance information identifying where in the processing workflow an
* automatic, interactive, or interactive... | gms-common/java/gms/shared/mechanisms/object-storage-distribution/osd-commonobjects/src/main/java/gms/shared/mechanisms/objectstoragedistribution/coi/emerging/processingcontrol/commonobjects/ProcessingContext.java | 0.937911 | 0.507202 | ProcessingContext.java | starcoder |
package com.tohsoft.airquality.data.models.breezometer;
public class HealthRecommend {
/**
* general_population : Reduce the intensity of your outdoor activities or postpone them to the early morning when ozone levels tend to be lower. In addition, consider reducing the time you spend near busy roads, constr... | app/src/main/java/com/tohsoft/airquality/data/models/breezometer/HealthRecommend.java | 0.731442 | 0.575051 | HealthRecommend.java | starcoder |
package org.opensha.commons.calc.magScalingRelations;
/**
* <b>Title:</b>MagLengthRelationship<br>
*
* <b>Description:</b> This is an abstract class that gives the median and standard
* deviation of magnitude as a function of length (km) or visa versa. The
* values can also be a function of rake. Note that t... | src/main/java/org/opensha/commons/calc/magScalingRelations/MagLengthRelationship.java | 0.837952 | 0.510192 | MagLengthRelationship.java | starcoder |
package org.apache.hadoop.hive.ql.plan;
import org.apache.hadoop.hive.ql.exec.vector.ColumnVector.Type;
import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpression;
/**
* VectorGroupByAggregationInfo.
*
* A convenience data structure that has information needed to vectorize reduce sink.
*
* It is c... | ql/src/java/org/apache/hadoop/hive/ql/plan/VectorPTFInfo.java | 0.795181 | 0.66946 | VectorPTFInfo.java | starcoder |
package edu.lewisu.cs.cpsc41000.common.motioncontrollers;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
import edu.lewisu.cs.cpsc41000.common.ImageBasedScreenObject;
import edu.lewisu.cs.cpsc41000.common.MobileImageBasedScreenObject;
/**
* Tracker allows a chaser to follow a target i... | common_game_classes/src/edu/lewisu/cs/cpsc41000/common/motioncontrollers/Tracker.java | 0.857619 | 0.498657 | Tracker.java | starcoder |
package org.qcri.rheem.core.util;
import java.util.ArrayList;
import java.util.List;
/**
* Iterates all combinations, i.e., the Cartesian product, of given {@link Iterable}s.
*/
public class CrossProductIterable<T> implements Iterable<List<T>> {
public final List<? extends Iterable<T>> iterables;
public C... | rheem-core/src/main/java/org/qcri/rheem/core/util/CrossProductIterable.java | 0.894781 | 0.491883 | CrossProductIterable.java | starcoder |
package org.json;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import junit.framework.TestCase;
/**
* This black box test was written without inspecting the non-free org.json sourcecode.
*/
public class JSONArrayTest extends TestCase {
public void testEmptyArray() throws JSONEx... | android-api/org/json/JSONArrayTest.java | 0.865793 | 0.646335 | JSONArrayTest.java | starcoder |
package org.opengis.cite.iso19136.general;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
import org.apache.xerces.xs.XSComplexTypeDefinition;
import org.apache.xerces.xs.XSElementDeclaration;
/**
* Provides information about the types of objects declared in a G... | src/main/java/org/opengis/cite/iso19136/general/AppSchemaInfo.java | 0.847968 | 0.48621 | AppSchemaInfo.java | starcoder |
package models;
import view.Arrow;
import view.JPanelAutomate;
public class MutantCircle {
private double xCenter;
private double yCenter;
private double radius;
public MutantCircle(double xCenter, double yCenter, double radius) {
this.xCenter = xCenter;
this.yCenter = yCenter;
this.radius = radius;
}
... | src/models/MutantCircle.java | 0.630116 | 0.49762 | MutantCircle.java | starcoder |
package org.encog.mathutil.randomize;
/**
* Generally, you will not want to use this randomizer as a pure neural network
* randomizer. More on this later in the description.
*
* Generate random numbers that fall within a Gaussian curve. The mean
* represents the center of the curve, and the standard deviation he... | src/org/encog/mathutil/randomize/GaussianRandomizer.java | 0.917652 | 0.468487 | GaussianRandomizer.java | starcoder |
package org.apache.sis.geometry;
import java.util.Objects;
import java.awt.geom.Rectangle2D;
import org.opengis.geometry.Envelope;
import org.opengis.geometry.DirectPosition;
import org.opengis.geometry.MismatchedDimensionException;
import org.opengis.metadata.extent.GeographicBoundingBox;
import org.opengis.referenci... | core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java | 0.906529 | 0.612744 | Envelope2D.java | starcoder |
package com.tailoredshapes.underbar.ocho;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import static com.tailoredshapes.underbar.ocho.UnderBar.*;
/**
* Created by tmarsh on 11/3/16.
*/
public interface Maths {
static boolean xor(boolean a, boolean b) {
return (a || b) ... | underbar.ocho/src/main/java/com/tailoredshapes/underbar/ocho/Maths.java | 0.866217 | 0.430327 | Maths.java | starcoder |
package simulation.objects;
import engine.objects.RenderableItem;
import engine.rendering.Mesh;
import engine.rendering.Texture;
import org.joml.Vector4i;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL13C;
import settings.SettingsInterface;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.u... | src/simulation/objects/RenderableWorld.java | 0.853012 | 0.453746 | RenderableWorld.java | starcoder |
package org.bytedeco.opencv.opencv_core;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;
import static org.bytedeco.openblas.global.openblas_nolapack.*;
import static org.bytedeco.openblas.global.openblas.*;
import static org.bytedeco.opencv.global.opencv_core.*;
/** \b... | opencv/src/gen/java/org/bytedeco/opencv/opencv_core/DownhillSolver.java | 0.840161 | 0.483648 | DownhillSolver.java | starcoder |
package traz_aqui;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class Historico implements Serializable {
private final Map<String, Registos> accepted;
... | ats_50_refactored/src/main/java/traz_aqui/Historico.java | 0.840946 | 0.437463 | Historico.java | starcoder |
package java.sql;
/**
* The mapping in the Java programming language for the SQL type
* {@code ARRAY}.
* By default, an {@code Array} value is a transaction-duration
* reference to an SQL {@code ARRAY} value. By default, an {@code Array}
* object is implemented using an SQL LOCATOR(array) internally, which
* me... | src/java.sql/share/classes/java/sql/Array.java | 0.958567 | 0.68297 | Array.java | starcoder |
package semexe.tables.lambdadcs;
import semexe.*;
import semexe.tables.lambdadcs.LambdaDCSException.Type;
import semexe.basic.Pair;
import java.util.*;
/**
* Utilities for denotations.
* <p>
* Handle aggregation, superlative, and arithmetic operations on different types of values.
*
* @author ppasupat
*/
publ... | src/main/java/semexe/tables/lambdadcs/DenotationUtils.java | 0.830937 | 0.463505 | DenotationUtils.java | starcoder |
package org.ode4j.ode;
import org.ode4j.math.DVector3;
import org.ode4j.math.DVector3C;
/**
* Convenience class for operations on AABB (Axis-aligned bounding boxes).
* <p>
* Axes are numbered from 0 to 2.
* @see DAABBC
*
* @author <NAME>
*/
public class DAABB implements DAABBC {
private final DVector3 _min ... | ode4j/src/org/ode4j/ode/DAABB.java | 0.85741 | 0.533154 | DAABB.java | starcoder |
package fistcomefistseved;
import java.util.ArrayList;
/**
*
* @author felipe
*/
public class proceso {
private String nombre;
private float tiempo_llegada;
private float rafaga;
private float rafagaV;
//tiempo de ejecucion
private float tiempo_ejecucion;
private float tiempo_comienzo;
... | src/fistcomefistseved/proceso.java | 0.609757 | 0.407039 | proceso.java | starcoder |
package org.xbib.elasticsearch.common.termlist.math;
/** Class used to compute the classical functions tables.
*/
class FastMathCalc {
/**
* 0x40000000 - used to split a double into two parts, both with the low order bits cleared.
* Equivalent to 2^30.
*/
private static final long HEX_40000000... | src/main/java/org/xbib/elasticsearch/common/termlist/math/FastMathCalc.java | 0.807423 | 0.416263 | FastMathCalc.java | starcoder |
package aula6.e1;
public class LinkedList<E extends Comparable<E>> {
private Node<E> first = null;
private Node<E> last = null;
private int size = 0;
/**
* {@code LinkedList} constructor, empty so far.
*/
public LinkedList() { }
/** Returns the number of elements in the list.
* @return Number o... | A6 - Lambdas/e1/LinkedList.java | 0.916335 | 0.492676 | LinkedList.java | starcoder |
package com.azure.ai.metricsadvisor.administration.models;
import com.azure.ai.metricsadvisor.models.DimensionKey;
import com.azure.core.annotation.Immutable;
/**
* Defines scope for anomaly alert. An alert can be scoped to whole
* series of a metric, a specific time series group of a metric
* or a metric TopN ti... | sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/MetricAnomalyAlertScope.java | 0.960333 | 0.431944 | MetricAnomalyAlertScope.java | starcoder |
package org.apache.commons.math4.transform;
import java.io.Serializable;
import org.apache.commons.math4.analysis.FunctionUtils;
import org.apache.commons.math4.analysis.UnivariateFunction;
import org.apache.commons.math4.complex.Complex;
import org.apache.commons.math4.exception.DimensionMismatchException;
import org... | src/main/java/org/apache/commons/math4/transform/FastFourierTransformer.java | 0.86241 | 0.42913 | FastFourierTransformer.java | starcoder |
package org.gibello.zql.data;
import java.util.Hashtable;
import java.util.StringTokenizer;
import java.util.Vector;
public class ZTuple {
/**
* the names of the attributes
*/
private Vector attributes_;
/**
* hashtable to locate attribute names more easily
*/
private Hashtable searchTable_;
/**
* the... | source/ZqlParserDemo/src/org/gibello/zql/data/ZTuple.java | 0.780244 | 0.449151 | ZTuple.java | starcoder |
package nl.mvdr.adventofcode.adventofcode2019.day06;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Stream;
/**
* Representation of a celestial object.
*
* @author <NAME>
*/
class CelestialObject {
/**
* The celesti... | src/main/java/nl/mvdr/adventofcode/adventofcode2019/day06/CelestialObject.java | 0.920433 | 0.416322 | CelestialObject.java | starcoder |
package android.hardware.camera2.utils;
import android.annotation.UnsupportedAppUsage;
/**
* Provide hashing functions using the Modified Bernstein hash
*/
public final class HashCodeHelpers {
/**
* Hash every element uniformly using the Modified Bernstein hash.
*
* <p>Useful to implement a {@li... | core/java/android/hardware/camera2/utils/HashCodeHelpers.java | 0.950915 | 0.421135 | HashCodeHelpers.java | starcoder |
package org.apache.sling.api.resource.observation;
import java.util.List;
import javax.annotation.Nonnull;
import org.osgi.annotation.versioning.ConsumerType;
/**
* Listener for resource change events.
*
* <p>
* {@code ResourceChangeListener} objects are registered with the Framework service
* registry and are... | src/main/java/org/apache/sling/api/resource/observation/ResourceChangeListener.java | 0.889277 | 0.418935 | ResourceChangeListener.java | starcoder |
package org.openstreetmap.atlas.geography.atlas.pbf;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
import org.junit.Assert;
import org.junit.Test;
import org.openstreetmap.atlas.exception.CoreException;
import org.openstreetmap.atlas.geography.Location;
import org.openstreetmap.a... | src/integrationTest/java/org/openstreetmap/atlas/geography/atlas/pbf/OsmPbfLoaderIntegrationTest.java | 0.816297 | 0.525186 | OsmPbfLoaderIntegrationTest.java | starcoder |
package kazmath;
import java.nio.FloatBuffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
public class jkazmath {
static {
System.loadLibrary("Jkazmath");
}
public static FloatBuffer kmCreateFloatBuffer(int size) {
return ByteBuffer.allocateDirect(size*4).order(ByteOrder.nativeO... | java/kazmath/jkazmath.java | 0.846609 | 0.476884 | jkazmath.java | starcoder |
package boofcv.alg.feature.orientation.impl;
import boofcv.alg.feature.describe.SurfDescribeOps;
import boofcv.alg.feature.orientation.OrientationIntegralBase;
import boofcv.struct.image.ImageGray;
import boofcv.struct.sparse.GradientValue;
import boofcv.struct.sparse.SparseGradientSafe;
import boofcv.struct.sparse.Sp... | main/feature/src/boofcv/alg/feature/orientation/impl/ImplOrientationAverageGradientIntegral.java | 0.869825 | 0.571886 | ImplOrientationAverageGradientIntegral.java | starcoder |
package org.apache.geode.internal.cache;
import static org.apache.geode.test.dunit.VM.getVM;
import static org.assertj.core.api.Assertions.assertThat;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Set;
import org.jun... | geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PRCustomPartitioningDistributedTest.java | 0.874399 | 0.432363 | PRCustomPartitioningDistributedTest.java | starcoder |
package org.bouncycastle.math.ec.custom.sec;
import javax.math.BigInteger;
import org.bouncycastle.math.ec.ECFieldElement;
import org.bouncycastle.math.raw.Nat;
import org.bouncycastle.math.raw.Nat448;
import org.bouncycastle.util.Arrays;
public class SecT409FieldElement extends ECFieldElement
{
protected long[]... | SimpleSDK/src/org/bouncycastle/math/ec/custom/sec/SecT409FieldElement.java | 0.790449 | 0.469581 | SecT409FieldElement.java | starcoder |
package de.kjEngine.scene.physics.sph;
import java.util.ArrayList;
import java.util.List;
import de.kjEngine.math.Real;
import de.kjEngine.math.Vec3;
/**
* @author konst
*
*/
public class CPUSPH {
private static class Particle extends SPHParticle {
public Vec3 fPressure = Vec3.create(), fViscosity = Vec3.crea... | de.kjEngine.scene.physics/src/de/kjEngine/scene/physics/sph/CPUSPH.java | 0.759493 | 0.459015 | CPUSPH.java | starcoder |
package com.opengamma.util.timeseries.date.time;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
import com.opengamma.util.timeseries.DateTimeConverter;
import com.opengamma.util.timeseries.ObjectTimeSeries;
import com.opengamma.util.timeseries.fast.DateTimeNumericEncoding;
import com.opengam... | projects/OG-Util/src/main/java/com/opengamma/util/timeseries/date/time/ListDateTimeObjectTimeSeries.java | 0.921552 | 0.73994 | ListDateTimeObjectTimeSeries.java | starcoder |
package org.antfarmer.ejce.util;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Provider;
import org.antfarmer.ejce.encoder.Base64Encoder;
import org.antfarmer.ejce.encoder.TextEncod... | src/main/java/org/antfarmer/ejce/util/MessageDigestUtil.java | 0.895283 | 0.481881 | MessageDigestUtil.java | starcoder |
import java.util.LinkedList;
import java.util.Set;
public final class PathExtractor {
private PathExtractor() {
}
public static String extract(final DiGraph diGraph,
final Instance instance) {
DepNode causeNode = diGraph.getNodeMatching(instance.getCause());
DepNode effe... | java/bootstrapping/src/main/2_pathPattern/PathExtractor.java | 0.855187 | 0.418637 | PathExtractor.java | starcoder |
package com.google.cloud.backend.core;
import android.util.Base64;
import com.google.cloud.backend.mobilebackend.model.QueryDto;
import com.google.gson.Gson;
/**
* A query object to execute it with {@link CloudBackend}. See
* {@link CloudBackendTest#testList()} for detailed usage.
*/
public class CloudQuery {
... | mobile-backend-starter-android-client-core/src/main/java/com/google/cloud/backend/core/CloudQuery.java | 0.942175 | 0.415907 | CloudQuery.java | starcoder |
package info.openmods.calc.math;
public class Complex {
public static final Complex ZERO = new Complex(0, 0);
public static final Complex ONE = new Complex(1, 0);
public static final Complex I = new Complex(0, 1);
public final double re;
public final double im;
private Complex(double real, double imaginary) ... | src/main/java/info/openmods/calc/math/Complex.java | 0.924692 | 0.704097 | Complex.java | starcoder |
package org.apache.geode.management.internal.rest;
import static org.apache.geode.test.junit.assertions.ClusterManagementResultAssert.assertManagementResult;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import java.util.List;
import org.j... | geode-assembly/src/distributedTest/java/org/apache/geode/management/internal/rest/RegionManagementDunitTest.java | 0.804406 | 0.435301 | RegionManagementDunitTest.java | starcoder |
package libSB.collections.primitiveSet;
import java.util.Arrays;
import java.util.stream.IntStream;
/**
*
* @author <NAME>
*/
final public class ImmutableIntSet {
private static final ImmutableIntSet EMPTY = new ImmutableIntSet();
// Sorted Array of elements contained by this set - Immutable
priv... | src/libSB/collections/primitiveSet/ImmutableIntSet.java | 0.901496 | 0.497498 | ImmutableIntSet.java | starcoder |
package pl.cba.reallygrid.lbc.phys.model;
import pl.cba.reallygrid.lbc.phys.math.Vector2D;
import pl.cba.reallygrid.util.ShapePosition;
import pl.cba.reallygrid.util.ShapeSize;
import java.awt.Point;
import java.awt.geom.Point2D;
import java.util.Objects;
public class DynamicBall implements ShapePosition, ShapeSize ... | phys/src/main/java/pl/cba/reallygrid/lbc/phys/model/DynamicBall.java | 0.768125 | 0.621196 | DynamicBall.java | starcoder |
package org.valkyrienskies.mod.common.tileentity;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.joml.Vector3d;
import org.joml.Vector3dc;
import org.valkyrienskies.mod.common.block.B... | src/main/java/org/valkyrienskies/mod/common/tileentity/TileEntityBoatChair.java | 0.816113 | 0.415254 | TileEntityBoatChair.java | starcoder |
package eu.hoefel.unit.constant;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import eu.hoefel.jatex.LatexPackage;
import eu.hoefel.jatex.LatexPreambl... | src/main/java/eu/hoefel/unit/constant/Constant.java | 0.939318 | 0.485722 | Constant.java | starcoder |
package java.util.zip;
class DeflaterEngine implements DeflaterConstants
{
private static final int TOO_FAR = 4096;
private int ins_h;
/**
* Hashtable, hashing three characters to an index for window, so
* that window[index]..window[index+2] have this hash code.
* Note that the array should really b... | llvm-gcc-4.2-2.9/libjava/classpath/java/util/zip/DeflaterEngine.java | 0.513912 | 0.501038 | DeflaterEngine.java | starcoder |
package de.matthiasmann.twl.renderer.lwjgl;
import de.matthiasmann.twl.Color;
import de.matthiasmann.twl.renderer.AnimationState;
import de.matthiasmann.twl.renderer.Image;
import org.lwjgl.opengl.GL11;
/**
* A tiled area inside a OpenGL texture used as UI image
*
* @author <NAME>
*/
public class TextureAreaTiled... | src/main/java/de/matthiasmann/twl/renderer/lwjgl/TextureAreaTiled.java | 0.787931 | 0.411052 | TextureAreaTiled.java | starcoder |
package deepboof.impl.forward.standard;
import deepboof.forward.ConfigConvolve2D;
import deepboof.forward.SpatialConvolve2D;
import deepboof.forward.SpatialPadding2D_F64;
import deepboof.tensors.Tensor_F64;
import java.util.List;
import static deepboof.misc.TensorOps.WI;
/**
* Implementation of {@link SpatialConvo... | modules/main/src/main/java/deepboof/impl/forward/standard/SpatialConvolve2D_F64.java | 0.872211 | 0.573559 | SpatialConvolve2D_F64.java | starcoder |
package gms.shared.utilities.signalprocessing.snr;
import gms.shared.mechanisms.objectstoragedistribution.coi.waveforms.commonobjects.Waveform;
import gms.shared.utilities.signalprocessing.normalization.DeMeaner;
import gms.shared.utilities.signalprocessing.normalization.Transform;
import java.time.Duration;
import ja... | gms-common/java/gms/shared/utilities/signal-processing-utility/src/main/java/gms/shared/utilities/signalprocessing/snr/SignalNoiseRatio.java | 0.942095 | 0.468426 | SignalNoiseRatio.java | starcoder |
package org.javainaction.bst;
/**
* Given the root of a binary search tree, and an integer k, return the kth (1-indexed) smallest element in the tree.
*
*
*
* Example 1:
*
*
* Input: root = [3,1,4,null,2], k = 1
* Output: 1
* Example 2:
*
*
* Input: root = [5,3,6,2,4,null,null,1], k = 3
* Output: 3
* @s... | src/main/java/org/javainaction/bst/FindKSmallestBST.java | 0.916503 | 0.573798 | FindKSmallestBST.java | starcoder |
package chapter17_hard;
import java.util.*;
/**
* Created by <NAME> on 23/05/20.
*/
public class Exercise18_ShortestSupersequence {
public static class Range {
private int start;
private int end;
public Range(int start, int end) {
this.start = start;
this.end = ... | src/chapter17_hard/Exercise18_ShortestSupersequence.java | 0.884495 | 0.414603 | Exercise18_ShortestSupersequence.java | starcoder |
package fr.minibilles.basics.xml;
import java.math.BigDecimal;
public class XML {
/**
* Transforms a <b>Enum</b> attribute to {@link String}.
* @param value attribute value
* @return the {@link String}.
*/
public static String enumToString(Enum<?> value) {
return value == null ? null : value.name();
}
... | basics-core/src/main/java/fr/minibilles/basics/xml/XML.java | 0.919566 | 0.602617 | XML.java | starcoder |
package org.springframework.jdbc.core;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.Map;
import org.springframework.jdbc.support.JdbcUtils;
import org.springframework.util.LinkedCaseInsensitiveMap;
/**
* {@link RowMapper} implementation that creates a ... | spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java | 0.874667 | 0.430267 | ColumnMapRowMapper.java | starcoder |
package com.yahoo.tensor.functions;
import com.yahoo.tensor.DimensionSizes;
import com.yahoo.tensor.IndexedTensor;
import com.yahoo.tensor.Tensor;
import com.yahoo.tensor.TensorType;
import com.yahoo.tensor.evaluation.EvaluationContext;
import com.yahoo.tensor.evaluation.Name;
import com.yahoo.tensor.evaluation.TypeCo... | vespajlib/src/main/java/com/yahoo/tensor/functions/Generate.java | 0.902765 | 0.444806 | Generate.java | starcoder |
package org.primefaces.model.charts.axes.cartesian.category;
import java.io.IOException;
import java.util.List;
import org.primefaces.model.charts.axes.cartesian.CartesianAxes;
import org.primefaces.util.ChartUtils;
import org.primefaces.util.FastStringWriter;
/**
* If global configuration is used, labels are drawn... | src/main/java/org/primefaces/model/charts/axes/cartesian/category/CartesianCategoryAxes.java | 0.936503 | 0.485173 | CartesianCategoryAxes.java | starcoder |
package info.ata4.bsplib.vector;
/**
* An immutable fluent interface four-dimensional vector class for float values.
*
* @author Sandern
*/
public final class Vector4f {
// frequently used pre-defined vectors
public static final Vector4f NULL = new Vector4f(0, 0, 0, 0);
public static final Vector4f MA... | src/info/ata4/bsplib/vector/Vector4f.java | 0.944957 | 0.711706 | Vector4f.java | starcoder |
package derivatives;
import org.apache.commons.math3.util.FastMath;
import meshmethods.StochasticMesh;
import stochprocess.MarketVector;
import stochprocess.MarketVectorProcess;
public abstract class Derivative {
private double[][] derivativeCVArray;
public double[][] derivativeValueArray;
private do... | src/derivatives/Derivative.java | 0.694303 | 0.47993 | Derivative.java | starcoder |
package com.lb.wallpaper_picker_library;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.os.Build;
import android.util.FloatMath;
import an... | WallpaperPickerLibrary/src/main/java/com/lb/wallpaper_picker_library/BitmapUtils.java | 0.853745 | 0.50592 | BitmapUtils.java | starcoder |
package com.android.systemui.glwallpaper;
import static android.opengl.GLES20.GL_FLOAT;
import static android.opengl.GLES20.GL_LINEAR;
import static android.opengl.GLES20.GL_TEXTURE0;
import static android.opengl.GLES20.GL_TEXTURE_2D;
import static android.opengl.GLES20.GL_TEXTURE_MAG_FILTER;
import static android.ope... | android-31/src/com/android/systemui/glwallpaper/ImageGLWallpaper.java | 0.82755 | 0.540924 | ImageGLWallpaper.java | starcoder |
package com.ofergivoli.ojavalib.data_structures.tree;
import java.util.*;
/**
* A generic tree with immutable structure. The children of a node are ordered.
* Multiple trees can share the same nodes.
* The link from each node to its parent is contained by the tree (not by the nodes).
* Contract: All nodes... | lib/ojavalib/src/main/java/com/ofergivoli/ojavalib/data_structures/tree/Tree.java | 0.876502 | 0.488405 | Tree.java | starcoder |
package fi.solita.utils.functional;
public class Tuple3<T1, T2, T3> extends Tuple implements Tuple.Tailable<Pair<T2,T3>>, Tuple._1<T1>, Tuple._2<T2>, Tuple._3<T3> {
public final T1 _1;
public final T2 _2;
public final T3 _3;
public Tuple3(T1 _1, T2 _2, T3 _3) {
this._1 = _1;
this... | src/main/java/fi/solita/utils/functional/Tuple3.java | 0.881449 | 0.561275 | Tuple3.java | starcoder |
package com.revolsys.geometry.planargraph;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import com.revolsys.geometry.model.Point;
/**
* Represents a directed graph which is embeddable in a planar surface.
... | revolsys-core/src/main/java/com/revolsys/geometry/planargraph/PlanarGraph.java | 0.937247 | 0.589214 | PlanarGraph.java | starcoder |
package com.interview.codingblocks.week10DivideAndConquer;
import java.util.Scanner;
public class DominoFilling {
private static int[][] board;
private static int cnt, holeX, holeY;
public static void main( String[] args ) {
System.out.println("Enter board size in 2 ^ N :");
Scanner sca... | src/com/interview/codingblocks/week10DivideAndConquer/DominoFilling.java | 0.541651 | 0.405508 | DominoFilling.java | starcoder |
package com.bis.web.models;
import java.util.ArrayList;
import java.util.List;
public class AccuracyTableModel
{
private String sEcho;
private int iColumns;
private int iDisplayStart;
private int iDisplayLength;
private String mDataProp0;
private String mDataProp1;
private String mDa... | src/main/java/web/com/bis/web/models/AccuracyTableModel.java | 0.737442 | 0.524821 | AccuracyTableModel.java | starcoder |
package edu.neu.coe.info6205.lab_1;
import java.util.Objects;
import java.util.Random;
/**
* Wheel of Fortune class which will yield a value of T according to a probability distribution
* given by the set of events.
* <p>
* In order to pass all of the unit tests, you will also have to implement code in FrequencyC... | src/main/java/edu/neu/coe/info6205/lab_1/WheelOfFortune.java | 0.929148 | 0.520314 | WheelOfFortune.java | starcoder |
package com.esri.core.geometry;
import com.esri.core.geometry.Operator.Type;
/**
* Finds closest vertices of the Geometry.
*/
public abstract class OperatorProximity2D extends Operator {
@Override
public Type getType() {
return Type.Proximity2D;
}
/**
* Returns the nearest coordinate o... | src/main/java/com/esri/core/geometry/OperatorProximity2D.java | 0.967271 | 0.814311 | OperatorProximity2D.java | starcoder |
package io.improbable.keanu.vertices.tensor.number.floating.dbl.nonprobabilistic.diff;
import io.improbable.keanu.tensor.TensorShape;
import io.improbable.keanu.tensor.dbl.DoubleTensor;
import java.util.Arrays;
public class ForwardModePartialDerivative {
private final long[] wrtShape;
public static final F... | keanu-project/src/main/java/io/improbable/keanu/vertices/tensor/number/floating/dbl/nonprobabilistic/diff/ForwardModePartialDerivative.java | 0.902796 | 0.602149 | ForwardModePartialDerivative.java | starcoder |
* Based on java.util.concurrent.TimeUnit, which is
* Written by <NAME> with assistance from members of JCP JSR-166
* Expert Group and released to the public domain, as explained at
* http://creativecommons.org/publicdomain/zero/1.0/
*/
package net.openhft.chronicle.algo;
import java.util.concurrent.TimeUnit;
/*... | src/main/java/net/openhft/chronicle/algo/MemoryUnit.java | 0.920562 | 0.523542 | MemoryUnit.java | starcoder |
package de.uros.citlab.errorrate.util;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class HeatMapUtil {
private static List<Color> colorMap2 = new ArrayList<>();
... | src/main/java/de/uros/citlab/errorrate/util/HeatMapUtil.java | 0.805632 | 0.400398 | HeatMapUtil.java | starcoder |
package org.rajawali3d.math.vector;
import android.support.annotation.NonNull;
import android.support.annotation.Size;
import org.rajawali3d.math.Matrix4;
import org.rajawali3d.math.Quaternion;
/**
* Encapsulates a 3D point/vector.
* <p/>
* This class borrows heavily from the implementation.
*
* @author dennis.i... | rajawali/src/main/java/org/rajawali3d/math/vector/Vector3.java | 0.962036 | 0.559862 | Vector3.java | starcoder |
package Model;
import javafx.scene.paint.Color;
/**
* Class representing a tile.
*/
public final class Tile
{
/**
* Determines if the operation system is windows.
*/
private boolean OS=System.getProperty("os.name").contains("Windows");
/**
* The numerical value of this tile.
*/
... | src/main/java/Model/Tile.java | 0.933688 | 0.541954 | Tile.java | starcoder |
package com.hazelcast.sql.impl.expression.predicate;
import com.hazelcast.sql.impl.expression.Expression;
import com.hazelcast.sql.impl.expression.ExpressionEvalContext;
import com.hazelcast.sql.impl.row.Row;
/**
* Implements ternary boolean logic according to SQL standard.
* <p>
* SQL BOOLEAN type is represented ... | hazelcast/src/main/java/com/hazelcast/sql/impl/expression/predicate/TernaryLogic.java | 0.949259 | 0.475605 | TernaryLogic.java | starcoder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.