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.embulk.spi.unit;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.google.common.base.Preconditions;
import java.util.Locale;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ByteSize imp... | embulk-core/src/main/java/org/embulk/spi/unit/ByteSize.java | 0.909419 | 0.410461 | ByteSize.java | starcoder |
package dev.ornamental.sqlite.statement;
import java.util.ArrayList;
import java.util.List;
/**
* This class has no functionality of its own. It is destined for grouping the classes pertaining
* to the <code>CREATE INDEX</code> statement.
*/
public final class CreateIndex {
/**
* Represents the initial part of... | src/main/java/dev/ornamental/sqlite/statement/CreateIndex.java | 0.86891 | 0.431764 | CreateIndex.java | starcoder |
package org.javainaction.array;
import java.util.ArrayDeque;
import java.util.HashSet;
import java.util.Queue;
import java.util.Set;
/**
* You are given two jugs with capacities jug1Capacity and jug2Capacity liters.
* There is an infinite amount of water supply available. Determine whether it is possible to measure... | src/main/java/org/javainaction/array/WaterJugProblem.java | 0.81928 | 0.450843 | WaterJugProblem.java | starcoder |
package com.ruegnerlukas.simplemath.vectors.vec4;
import com.ruegnerlukas.simplemath.vectors.IVector;
import com.ruegnerlukas.simplemath.vectors.vec3.IVector3;
public interface IVector4 extends IVector {
/**
* Sets this vector from the given vector.
* @param v the vector
* @return this vector for chai... | src/main/java/com/ruegnerlukas/simplemath/vectors/vec4/IVector4.java | 0.935524 | 0.740562 | IVector4.java | starcoder |
package com.google.common.geometry;
import com.google.common.annotations.GwtIncompatible;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.geometry.PrimitiveArrays.Bytes;
import com.google.common.geometry.Prim... | src/com/google/common/geometry/S2LaxPolylineShape.java | 0.955786 | 0.578984 | S2LaxPolylineShape.java | starcoder |
package uk.dangrew.jwags.simulation.model;
import static uk.dangrew.jwags.simulation.model.DinosaurActions.Allosaurus_ArmorPiercingImpact;
import static uk.dangrew.jwags.simulation.model.DinosaurActions.Allosaurus_DefenseShatteringStrike;
import static uk.dangrew.jwags.simulation.model.DinosaurActions.Stegosaurus_Supe... | jwa-gs/src/uk/dangrew/jwags/simulation/model/DinosaurType.java | 0.538012 | 0.508361 | DinosaurType.java | starcoder |
package com.folkgeist.ui.models;
import com.folkgeist.util.math.Vec2f;
import com.folkgeist.util.math.Vec3f;
import java.nio.FloatBuffer;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.BufferUtils;
import static org.lwjgl.opengl.GL15.*;
/**
* A class representing a model's mesh, this is designed... | src/com/folkgeist/ui/models/Mesh.java | 0.643105 | 0.401101 | Mesh.java | starcoder |
package jsr166y.forkjoin;
import static jsr166y.forkjoin.Ops.*;
import java.util.*;
import java.util.concurrent.atomic.*;
import java.lang.reflect.Array;
/**
* An array of longs supporting parallel operations. This class
* provides methods supporting the same operations as {@link
* ParallelArray}, but spe... | forkjoin/trunk/jsr166y/src/main/java/jsr166y/forkjoin/ParallelLongArray.java | 0.91247 | 0.553807 | ParallelLongArray.java | starcoder |
package io.github.bestchanges.whoisclient;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.google.common.base.Optional;
final class WhoisDateParser {
private static int __parseOptionalInt(final String groupName, final Matcher matcher, final int default_) {
... | java/src/main/java/io/github/bestchanges/whoisclient/WhoisDateParser.java | 0.657868 | 0.459501 | WhoisDateParser.java | starcoder |
package proguard.evaluation.value;
/**
* This LongValue represents a specific long value.
*
* @author <NAME>
*/
abstract class SpecificLongValue extends LongValue
{
// Implementations of unary methods of LongValue.
public LongValue negate()
{
return new NegatedLongValue(this);
}
publi... | backdoor-apk/third-party/proguard5.2.1/src/proguard/evaluation/value/SpecificLongValue.java | 0.82734 | 0.482795 | SpecificLongValue.java | starcoder |
package org.openni;
/**
* The Recorder class is used to record streams to an ONI file.
*
* After a recorder is instantiated, it must be initialized with a specific filename where the
* recording will be stored. The recorder is then attached to one or more streams. Once this is
* complete, the recorder can be tol... | Wrappers/java/OpenNI.java/src/org/openni/Recorder.java | 0.884002 | 0.403684 | Recorder.java | starcoder |
package org.orekit.attitudes;
import java.io.NotSerializableException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.orekit.errors.OrekitException;
import org.orekit.frames.Frame;
import org.orekit.time.AbsoluteDate;
import org.orekit.utils.AngularDerivativesFilter;
import... | src/main/java/org/orekit/attitudes/TabulatedProvider.java | 0.899155 | 0.421611 | TabulatedProvider.java | starcoder |
package org.kiwiproject.jdbc;
import static java.util.Objects.isNull;
import static org.kiwiproject.base.KiwiPreconditions.checkArgumentNotNull;
import lombok.experimental.UtilityClass;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.... | src/main/java/org/kiwiproject/jdbc/KiwiJdbc.java | 0.942575 | 0.594434 | KiwiJdbc.java | starcoder |
package io.permazen;
/**
* {@link Session} modes.
*
* <p>
* The three {@link SessionMode} values correspond to the three layers of abstraction in Permazen.
* In order from bottom to top these are:
* <ul>
* <li>The key/value database layer, providing {@link io.permazen.kv.KVDatabase}
* and {@link io.perma... | permazen-main/src/main/java/io/permazen/SessionMode.java | 0.923983 | 0.594757 | SessionMode.java | starcoder |
package com.sep.timetracker;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.text.ParseException;
import java.util.Date;
import org.junit.Test;
public class TestUtil {
@Test
public void testGoodDurationPattern() {
assertEquals(Integer.valueOf(83), Util.getDur... | test/com/sep/timetracker/TestUtil.java | 0.833799 | 0.52074 | TestUtil.java | starcoder |
package com.speedment.common.codegen;
import java.util.Map;
import java.util.Set;
import java.util.function.Supplier;
/**
* Different {@link Transform} implementations can be <i>installed</i> in the
* <code>TransformFactory</code> to be instantiated when needed. The transforms
* are ordered in a graph-like manner ... | common-parent/codegen/src/main/java/com/speedment/common/codegen/TransformFactory.java | 0.903928 | 0.405272 | TransformFactory.java | starcoder |
package org.lwjgl.opengl;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
/**
* Native bindings to the <a href="http://www.opengl.org/registry/specs/AMD/interleaved_elements.txt">AMD_interleaved_elements</a> extension.
*
* <p>The glDrawElements function and its variants (instanced a... | 04lwjgl/code/lwjgl/org/lwjgl/opengl/AMDInterleavedElements.java | 0.843219 | 0.615059 | AMDInterleavedElements.java | starcoder |
package org.egov.ptis.bean.dashboard;
public class DayWiseCollection {
private String boundaryName;
private DemandCollectionMIS day1DCB;
private DemandCollectionMIS day2DCB;
private DemandCollectionMIS day3DCB;
private DemandCollectionMIS day4DCB;
private DemandCollectionMIS day5DCB;
priva... | egov/egov-ptis/src/main/java/org/egov/ptis/bean/dashboard/DayWiseCollection.java | 0.713731 | 0.564279 | DayWiseCollection.java | starcoder |
package info.debatty.java.graphs;
import info.debatty.java.util.BoundedPriorityQueue;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
/**
*
* @author tibo
*/
public class NeighborList<T> extends BoundedPriorityQueue<Neighbor<T... | src/main/java/info/debatty/java/graphs/NeighborList.java | 0.815563 | 0.408572 | NeighborList.java | starcoder |
package com.justinblank.classcompiler;
import com.justinblank.classcompiler.lang.*;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import static com.justinblank.classcompiler.lang.Literal.literal;
import static com.justinblank.classcompiler.lang.Void.VOID;
import static org.objectweb.asm.Opcodes.*;... | src/main/java/com/justinblank/classcompiler/Method.java | 0.801042 | 0.402862 | Method.java | starcoder |
package org.apache.mina.statemachine.transition;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import org.apache.mina.statemachine.State;
import org.apache.mina.statemachine.StateMachine;
import org.apache.mina.statemachine.StateMachineFactory;
import or... | src/mina-statemachine/src/main/java/org/apache/mina/statemachine/transition/MethodTransition.java | 0.9059 | 0.492493 | MethodTransition.java | starcoder |
package gnu.java.security.hash;
/**
* The basic visible methods of any hash algorithm.
* <p>
* A hash (or message digest) algorithm produces its output by iterating a basic
* compression function on blocks of data.
*/
public interface IMessageDigest
extends Cloneable
{
/**
* Returns the canonical name of... | classpath-0.98/gnu/java/security/hash/IMessageDigest.java | 0.915107 | 0.416441 | IMessageDigest.java | starcoder |
package de.lergin.sponge.crazytrees.trees.dendrology.cedrum;
import de.lergin.sponge.crazytrees.trees.CrazyTree;
import de.lergin.sponge.crazytrees.trees.dendrology.DendrologyTree;
import org.spongepowered.api.util.Direction;
import org.spongepowered.api.world.World;
import java.util.Random;
/**
* Generator Code: e... | src/main/java/de/lergin/sponge/crazytrees/trees/dendrology/cedrum/CedrumTree.java | 0.650911 | 0.578716 | CedrumTree.java | starcoder |
package io.flutter.utils.animation;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.*;
public class CurvesTest {
@Test
public void curveFlippedControl() {
final Curve ease = Curves.EASE;
final Curve flippedEase = ease.getFlipped();
assertTrue(... | testSrc/unit/io/flutter/utils/animation/CurvesTest.java | 0.881857 | 0.743354 | CurvesTest.java | starcoder |
package org.eclipse.microprofile.reactive.streams.operators.tck.spi;
import org.eclipse.microprofile.reactive.streams.operators.ProcessorBuilder;
import org.reactivestreams.Processor;
import org.testng.annotations.Test;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.co... | tck/src/main/java/org/eclipse/microprofile/reactive/streams/operators/tck/spi/FlatMapCompletionStageVerification.java | 0.891858 | 0.449574 | FlatMapCompletionStageVerification.java | starcoder |
package org.apache.river.fiddler;
import net.jini.admin.JoinAdmin;
import org.apache.river.admin.DestroyAdmin;
import java.rmi.RemoteException;
/**
* An administrative interface for the Fiddler implementation of the
* lookup discovery service (see {@linkplain org.apache.river.fiddler Fiddler}).
* The comments tha... | src/org/apache/river/fiddler/FiddlerAdmin.java | 0.870638 | 0.415551 | FiddlerAdmin.java | starcoder |
package leetcode.easy;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import utils.NthElement;
public class P_169 {
// HashMap -> O(n) time O(n) space
public int majorityElement1(int[] nums) {
final Map<Integer, Integer> count = new HashMap<>();
... | Java/leetcode/easy/P_169.java | 0.840095 | 0.417925 | P_169.java | starcoder |
package com.tomgibara.intgeom;
public final class IntCoords {
// statics
public static final IntCoords ORIGIN = new IntCoords(0, 0);
public static IntCoords at(int x, int y) {
return new IntCoords(x, y);
}
public static IntCoords atX(int x) {
return new IntCoords(x, 0);
}
public static IntCoords atY(in... | src/main/java/com/tomgibara/intgeom/IntCoords.java | 0.865167 | 0.55941 | IntCoords.java | starcoder |
package no.stelar7.api.r4j.basic.constants.types;
import no.stelar7.api.r4j.basic.utils.Pair;
import java.util.*;
public final class InhibitorLocationType implements CodedEnum
{
private InhibitorLocationType()
{
// empty constructor
}
private static final Map<MapType, Map<LaneType, Map<T... | src/main/java/no/stelar7/api/r4j/basic/constants/types/InhibitorLocationType.java | 0.77907 | 0.42185 | InhibitorLocationType.java | starcoder |
package com.fxgraph.graph;
import javafx.scene.paint.Color;
import java.util.Collection;
import java.util.Date;
import com.fxgraph.cells.CartesianPoint;
import com.fxgraph.cells.CartesianPoint.BulletType;
import com.fxgraph.edges.SimpleEdge;
import com.fxgraph.layout.FitToContentLayout;
import com.fxgraph.layout.Layo... | src/main/java/com/fxgraph/graph/CartesianGraph.java | 0.898236 | 0.458046 | CartesianGraph.java | starcoder |
package agents;
import hanabAI.*;
import java.util.Hashtable;
import java.util.Stack;
import java.util.Vector;
public class Agent21560466 implements Agent {
// Number of Player in the game
public int numberOfPlayers;
// Last state that I analised to know the state of the game
// My position on the... | src/hanabAI/Agent21560466.java | 0.541166 | 0.40807 | Agent21560466.java | starcoder |
package org.apache.geode.internal.logging;
import static org.apache.geode.internal.logging.Configuration.MAIN_LOGGER_NAME;
import static org.apache.geode.internal.logging.Configuration.SECURITY_LOGGER_NAME;
import static org.apache.geode.internal.logging.LogLevelUpdateOccurs.ALWAYS;
import static org.apache.geode.inte... | geode-core/src/integrationTest/java/org/apache/geode/internal/logging/ConfigurationIntegrationTest.java | 0.763748 | 0.408395 | ConfigurationIntegrationTest.java | starcoder |
Initial Thoughts:
We can keep a running closest obstacle
for each direction with relation to
our queen as we read in all the obstacles
then we can just calculate the squares covered
using the distance between two points for each
of the closest obstacles
Time Complexity: O(k) //We need to check every obstacle
Space Com... | Algorithms/Implementation/Queen's Attack II/Solution.java | 0.681727 | 0.427038 | Solution.java | starcoder |
package com.opengamma.strata.product.credit.type;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Map;
import java.util.NoSuchElementException;
import org.joda.beans.Bean;
import org.joda.beans.BeanBuilder;
import org.joda.beans.ImmutableBean;
import org.joda.beans.JodaBeanUtils;
import org.... | modules/product/src/main/java/com/opengamma/strata/product/credit/type/TenorCdsTemplate.java | 0.918779 | 0.402451 | TenorCdsTemplate.java | starcoder |
package seedu.recruit.model.joboffer;
import static java.util.Objects.requireNonNull;
import static seedu.recruit.commons.util.AppUtil.checkArgument;
/**
* Represents the desired age range of candidate for a job offer
*/
public class AgeRange {
public static final String MESSAGE_AGE_RANGE_CONSTRAINTS =
... | src/main/java/seedu/recruit/model/joboffer/AgeRange.java | 0.852568 | 0.486454 | AgeRange.java | starcoder |
package com.harvard.studyAppModule.custom;
import org.researchstack.backbone.step.QuestionStep;
import org.researchstack.backbone.ui.step.layout.SurveyStepLayout;
/**
* Created by <NAME> on 11/14/2016.
*/
public class QuestionStepCustom extends QuestionStep {
public AnswerFormatCustom answerFormat;
public S... | Android/app/src/main/java/com/harvard/studyAppModule/custom/QuestionStepCustom.java | 0.916213 | 0.454533 | QuestionStepCustom.java | starcoder |
package tetris;
import java.util.Random;
public class Tetris {
protected Cell[] cells;
private static final Random random = new Random();
public void moveDown() {
for (Cell cell : cells) cell.moveDown();
}
public void moveLeft() {
for (Cell cell : cells) cell.moveLeft();
}
public void moveRi... | src/tetris/Tetris.java | 0.837554 | 0.514888 | Tetris.java | starcoder |
package org.gitia.froog.transferfunction;
import org.ejml.dense.row.CommonOps_DDRM;
import org.ejml.simple.SimpleMatrix;
/**
*
* @author <NAME> <<EMAIL>>
*/
public class Softmax implements TransferFunction {
/**
*
* la salida será:<br>
* <table>
* <tr><td></td><td>[ 1
* ]</td><td></td... | src/main/java/org/gitia/froog/transferfunction/Softmax.java | 0.855972 | 0.430387 | Softmax.java | starcoder |
package guru.nidi.ramltester.model;
import java.util.*;
/**
*
*/
public final class Values implements Iterable<Map.Entry<String, List<Object>>> {
private final Map<String, List<Object>> values = new HashMap<>();
public Values() {
}
public Values(Map<String, String[]> values) {
for (final M... | src/main/java/guru/nidi/ramltester/model/Values.java | 0.920222 | 0.433142 | Values.java | starcoder |
package infodynamics.measures.continuous;
/**
* A basic interface for calculators computing measures on a multivariate <i>channel</i> from a
* source to a destination time-series (i.e. mutual information and transfer entropy).
* In the following, we refer to the abstract measure computed by this calculator
*... | artifacts/infodynamics-dist-1.3/java/source/infodynamics/measures/continuous/ChannelCalculatorMultiVariate.java | 0.93646 | 0.611643 | ChannelCalculatorMultiVariate.java | starcoder |
package com.brein.time.utils;
import org.apache.log4j.Logger;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
im... | src/com/brein/time/utils/TimeUtils.java | 0.944525 | 0.407628 | TimeUtils.java | starcoder |
package com.github.basking2.sdsai.itrex;
import static com.github.basking2.sdsai.itrex.iterators.Iterators.EMPTY_ITERATOR;
import java.util.Iterator;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import com.github.basking2.sdsai.itrex.functions.*;
import com.github.basking2.sdsai.itrex... | sdsai-itrex/src/main/java/com/github/basking2/sdsai/itrex/Evaluator.java | 0.875282 | 0.440529 | Evaluator.java | starcoder |
package com.irurueta.ar.epipolar;
import com.irurueta.geometry.CoordinatesType;
import com.irurueta.geometry.Line2D;
import com.irurueta.geometry.Point2D;
import com.irurueta.geometry.estimators.NotReadyException;
/**
* Fixes a single matched pair of points so that they perfectly follow a given
* epipolar geometry ... | src/main/java/com/irurueta/ar/epipolar/SampsonSingleCorrector.java | 0.937783 | 0.64225 | SampsonSingleCorrector.java | starcoder |
package joshua.decoder.phrase;
/***
* This class represents the future cost of a hypothesis. The future cost of a hypothesis is the
* cost of covering all uncovered words. The way this is computed is with a simple dynamic program
* that computes, for each span of the input, the best possible way to cover that span ... | src/joshua/decoder/phrase/Future.java | 0.864953 | 0.59884 | Future.java | starcoder |
package com.tomtom.speedtools.tilemap;
import com.tomtom.speedtools.geometry.GeoPoint;
import com.tomtom.speedtools.json.Json;
import com.tomtom.speedtools.utils.MathUtils;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import java.util.Arrays;
/**
*... | geo/src/main/java/com/tomtom/speedtools/tilemap/MercatorPoint.java | 0.944395 | 0.539832 | MercatorPoint.java | starcoder |
package datastructures;
/**
* Realization of a circular FIFO queue as an adaptation of a CircularlyLinkedList.
* This provides one additional method not part of the general Queue interface.
* A call to rotate() is a more efficient simulation of the combination
* enqueue(dequeue()). All operations are performed in ... | advancedDS/src/datastructures/LinkedCircularQueue.java | 0.953155 | 0.449574 | LinkedCircularQueue.java | starcoder |
package org.apache.commons.geometry.hull.euclidean.twod;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.apache.commons.geometry.core.precision.DoublePrecisionContext;
import org.apache.commons.geometry.euclidean.twod.Lines;
import org.apache.commons.geometry.euclidean.twod.... | subjects/components/code/commons-geometry/commons-geometry-hull/src/main/java/org/apache/commons/geometry/hull/euclidean/twod/MonotoneChain.java | 0.957248 | 0.653037 | MonotoneChain.java | starcoder |
import java.io.*;
import java.util.*;
public class MaximumOfMinimumSubarrays {
public static int[] findMaximumOfMinimums(int[] numArray, int n) {
//The next[] and prev[] arrays store the indices of next smaller
//and previous smaller integers for each element.
int[] next = new int[n]; ... | Java/cp/MaximumOfMinimumSubarrays.java | 0.695752 | 0.453443 | MaximumOfMinimumSubarrays.java | starcoder |
package fi.riissanen.gwent.engine.render;
/**
* Used to control the window viewport.
* @author Daniel
*/
public class Viewport {
private float targetLeft = -0.5f;
private float targetBottom = -0.5f;
private float targetWidth = 1.0f;
private float targetHeight = 1.0f;
private float srcLeft;
... | src/main/java/fi/riissanen/gwent/engine/render/Viewport.java | 0.93542 | 0.570451 | Viewport.java | starcoder |
package io.github.springroe.data.mybatis.domain.query;
import org.springframework.util.Assert;
import java.util.Arrays;
import java.util.List;
/**
* @description:
* @author: tl
* @date: 2020/6/12
*/
public class Conditions {
private final static String NOT_NULL = "%s not allow null";
public static Cond... | springroe-data-mybatis/src/main/java/io/github/springroe/data/mybatis/domain/query/Conditions.java | 0.799129 | 0.497925 | Conditions.java | starcoder |
package com.spartronics4915.lib.trajectory.timing;
import com.spartronics4915.lib.geometry.State;
import com.spartronics4915.lib.util.Util;
import java.text.DecimalFormat;
public class TimedState<S extends State<S>> implements State<TimedState<S>>
{
protected final S state_;
protected double t_; // Time we ... | src/main/java/com/spartronics4915/lib/trajectory/timing/TimedState.java | 0.93086 | 0.578627 | TimedState.java | starcoder |
package fitaview.automaton.traversing;
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.Queue;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import fitaview.tree.NodeHasParentException;
import fitaview.tree.StandardNode;
import fi... | test/fitaview/automaton/traversing/BottomUpBFSTest.java | 0.892934 | 0.575677 | BottomUpBFSTest.java | starcoder |
package math.rng;
/**
* The {@code L64X1024MixRandom} algorithm from JDK 17 which uses a linear
* congruential generator (LCG) as a first subgenerator and a Xor-based
* generator (xoroshiro1024) as a second subgenerator and then applies a 64-bit
* mixing function identified by Doug Lea.
* <p>
* This gene... | src/main/java/math/rng/Lcg64Xor1024Mix.java | 0.902631 | 0.445771 | Lcg64Xor1024Mix.java | starcoder |
package core.scene.stage.actor.drawable;
import core.framework.graphics.Form;
import core.framework.graphics.batch.Batch;
import core.framework.graphics.texture.Texture;
import core.framework.graphics.texture.TextureRegion;
/**
* {@link #draw(Batch, Form)}은 내부적으로 {@link #draw(Batch, float, float, float, float, boole... | CapitalismMobile/src_core/core/scene/stage/actor/drawable/TileDrawable.java | 0.705684 | 0.469216 | TileDrawable.java | starcoder |
package androidx.core.widget;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.e... | core/core/src/androidTest/java/androidx/core/widget/NestedScrollViewNestedScrollingParent3Test.java | 0.835718 | 0.452354 | NestedScrollViewNestedScrollingParent3Test.java | starcoder |
package com.opengamma.strata.market.amount;
import java.io.Serializable;
import java.util.Map;
import java.util.NoSuchElementException;
import org.joda.beans.Bean;
import org.joda.beans.ImmutableBean;
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.MetaBean;
import org.joda.beans.MetaProperty;
import org.j... | modules/market/src/main/java/com/opengamma/strata/market/amount/SwapLegAmount.java | 0.897707 | 0.433082 | SwapLegAmount.java | starcoder |
package com.villoren.java.dsp.fft;
/**
* Radix-2 Decimation in time FFT.
*
* @author <NAME>
*/
public class FourierTransformF {
/**
* Describes how to apply scaling for transforms.
*/
public enum Scale {
/** No scaling, just raw fft. */
NONE,
/** Forward transform only.... | uwCapstone/acoustic/src/main/java/com/villoren/java/dsp/fft/FourierTransformF.java | 0.94699 | 0.401219 | FourierTransformF.java | starcoder |
package org.apache.hadoop.hive.ql.parse;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.ql.parse.PartitionTransformSpec.TransformType;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import ... | ql/src/java/org/apache/hadoop/hive/ql/parse/PartitionTransform.java | 0.848314 | 0.435841 | PartitionTransform.java | starcoder |
package org.chocosolver.util.objects;
import java.util.Arrays;
/**
* A specific implementation for list of integers.
* Created by cprudhom on 20/10/2015.
* Project: choco.
*/
public class IntList {
/**
* Default initial capacity.
*/
private static final int DEFAULT_CAPACITY = 10;
/**
... | solver/src/main/java/org/chocosolver/util/objects/IntList.java | 0.924492 | 0.437403 | IntList.java | starcoder |
package org.opendatakit.briefcase.pull.central;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matcher... | test/java/org/opendatakit/briefcase/pull/central/PullFromCentralTest.java | 0.622574 | 0.565179 | PullFromCentralTest.java | starcoder |
package org.imzdong.study.msb.day_07_tank.model;
import org.imzdong.study.msb.day_07_tank.TankFrame;
import org.imzdong.study.msb.day_07_tank.util.ImageMgr;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.List;
public class Bullet {
private int x;
private int y;
private final st... | msb_study/src/main/java/org/imzdong/study/msb/day_07_tank/model/Bullet.java | 0.753376 | 0.408867 | Bullet.java | starcoder |
package com.opengamma.strata.pricer;
import java.io.Serializable;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.function.DoubleUnaryOperator;
import org.joda.beans.Bean;
import org.joda.beans.BeanBuilder;
import org.joda.beans.ImmutableBean;
import org.joda.beans.JodaBeanUtils;
impor... | modules/pricer/src/main/java/com/opengamma/strata/pricer/ZeroRateSensitivity.java | 0.963416 | 0.476823 | ZeroRateSensitivity.java | starcoder |
package org.bsim.dde;
import java.util.Vector;
import org.bsim.dde.BSimDdeSystem;
/**
* Solver routines for numerical simulation of DDEs (Fixed time-step).
* These make use of basic ODE solvers and so stability is not ensured
* in all cases. Be sure to run simulations with smaller time steps to
* check that the... | Xholon/src/org/bsim/dde/BSimDdeSolver.java | 0.602179 | 0.690122 | BSimDdeSolver.java | starcoder |
package Model;
import javafx.scene.paint.Color;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
class PercolationCellTest {
Cell blockedCell;
Cell openCell;
Cell percolatingCel... | src/Model/PercolationCellTest.java | 0.669637 | 0.407776 | PercolationCellTest.java | starcoder |
package com.tritondigital.net.streaming.proxy.utils;
import java.io.IOException;
import java.io.InputStream;
/**
* <p>Replacement for the PpipedInputStream / PipedOutputStream pair for the decoder.
*
* <p>On some platforms such as Android Api Level < 9, PipedInputStream are slow and have an unsettable buffer size... | streamingproxy/src/main/java/com/tritondigital/net/streaming/proxy/utils/QueueInputStream.java | 0.793466 | 0.636946 | QueueInputStream.java | starcoder |
package mtree;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Some pre-defined implementations of {@linkplain DistanceFunction distance
* functions}.
*/
public final class DistanceFunctions {
/**
* Don't let anyone instantiate this class.
*/
private DistanceFunctions(... | java/mtree/DistanceFunctions.java | 0.938843 | 0.643245 | DistanceFunctions.java | starcoder |
package org.apache.lucene.util.packed;
/**
* Efficient sequential read/write of packed integers.
*/
final class BulkOperationPacked3 extends BulkOperationPacked {
public BulkOperationPacked3() {
super(3);
}
@Override
public void decode(long[] blocks, int blocksOffset, int[] values, int valuesOffset, in... | lucene/core/src/java/org/apache/lucene/util/packed/BulkOperationPacked3.java | 0.821617 | 0.434341 | BulkOperationPacked3.java | starcoder |
package st1920.automaton;
import static org.junit.Assert.*;
import org.junit.Test;
import st1920.automaton.RegExpMatcher;
public class Task4 {
private RegExpMatcher reg;
@Test
public void test1() {
assertTrue(reg.matches("\n", "$"));
}
@Test
public void test2() {
assertTrue... | src/st1920/automaton/Task4.java | 0.819677 | 0.802091 | Task4.java | starcoder |
package gg.projecteden.nexus.utils;
import com.sk89q.worldedit.math.transform.AffineTransform;
import gg.projecteden.utils.EnumUtils.IteratableEnum;
import gg.projecteden.utils.MathUtils;
import lombok.Data;
import lombok.Getter;
import lombok.NonNull;
import lombok.experimental.Accessors;
import me.lexikiq.HasPlayer;... | src/main/java/gg/projecteden/nexus/utils/LocationUtils.java | 0.811377 | 0.504333 | LocationUtils.java | starcoder |
package org.apache.fop.render.intermediate;
import java.awt.Rectangle;
import java.awt.geom.AffineTransform;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FopFactory;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.util.DecimalFormatCache;
/**
* Utility functions for the intermedi... | src/java/org/apache/fop/render/intermediate/IFUtil.java | 0.935413 | 0.521715 | IFUtil.java | starcoder |
package proyecto_integradorajedrez;
/**
*
* @author ricky
*/
public class Peon extends Piezas {
String tipoP;
public Peon() {
super();
}
public Peon(String tipoP, String tipo) {
super(tipo);
this.tipoP = tipoP;
}
public String getTipoP() {
return tipoP;
... | Proyecto_IntegradorAjedrez/src/proyecto_integradorajedrez/Peon.java | 0.582135 | 0.475727 | Peon.java | starcoder |
package org.jmatrices.dbl.transformer;
import org.jmatrices.dbl.Matrix;
import org.jmatrices.dbl.MatrixFactory;
import org.jmatrices.dbl.Matrix;
import org.jmatrices.dbl.MatrixFactory;
/**
* MatrixEBETransformer is responsible for applying the <code>MatrixEBETransformation</code> to each element in a matrix
* <p>
... | concurrent-demo/src/main/java/org/jmatrices/dbl/transformer/MatrixEBETransformer.java | 0.934485 | 0.514644 | MatrixEBETransformer.java | starcoder |
package org.zstack.header.vm;
import org.apache.commons.collections.CollectionUtils;
import org.zstack.header.network.l3.L3NetworkInventory;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import static org.zstack.utils.CollectionDSL.list;
public class VmNicSpec implements Serializab... | header/src/main/java/org/zstack/header/vm/VmNicSpec.java | 0.694095 | 0.436622 | VmNicSpec.java | starcoder |
package org.logstash;
import java.util.Map;
public final class Accessors {
private Accessors() {
//Utility Class
}
public static Object get(final ConvertedMap data, final FieldReference field) {
final Object target = findParent(data, field);
return target == null ? null : fetch(t... | logstash-core/src/main/java/org/logstash/Accessors.java | 0.758153 | 0.48749 | Accessors.java | starcoder |
package org.javasimon;
import java.util.Iterator;
import java.util.Map;
import org.javasimon.clock.SimonClock;
import org.javasimon.utils.SimonUtils;
/**
* Represents single time split - one Stopwatch measurement. Object is obtained by {@link org.javasimon.Stopwatch#start()}
* and the measurement is ended using {@... | core/src/main/java/org/javasimon/Split.java | 0.911387 | 0.460956 | Split.java | starcoder |
package org.spongepowered.api.world.chunk;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.util.Direction;
import org.spongepowered.api.util.Ticks;
import org.spongepowered.api.util.annotation.DoNotStore;
import org.spongepowered.api.world.World;
import org.spongepowered.api.world.volume.entity.Entit... | src/main/java/org/spongepowered/api/world/chunk/Chunk.java | 0.881258 | 0.504516 | Chunk.java | starcoder |
package edu.ie3.datamodel.models.input.container;
import edu.ie3.datamodel.models.input.graphics.GraphicInput;
import edu.ie3.datamodel.models.input.graphics.LineGraphicInput;
import edu.ie3.datamodel.models.input.graphics.NodeGraphicInput;
import java.util.*;
import java.util.stream.Collectors;
/** Represents the ac... | src/main/java/edu/ie3/datamodel/models/input/container/GraphicElements.java | 0.924645 | 0.506164 | GraphicElements.java | starcoder |
package com.google.devtools.build.lib.collect;
/**
* A comparison function, which imposes an equivalence relation on some collection of objects.
*
* <p>The ordering imposed by an EquivalenceRelation <tt>e</tt> on a set of elements <tt>S</tt> is
* said to be <i>consistent with equals</i> if and only if <tt>(compar... | src/main/java/com/google/devtools/build/lib/collect/EquivalenceRelation.java | 0.7478 | 0.414484 | EquivalenceRelation.java | starcoder |
package se.miun.itm.input.tuning.sequential;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.math.BigDecimal;
import java.util.ArrayL... | Java/src/Tuning_Test/src/se/miun/itm/input/tuning/sequential/ISequentialTunerTest.java | 0.575588 | 0.491151 | ISequentialTunerTest.java | starcoder |
package smile.plot.swing;
import java.awt.Color;
/**
* A dendrogram is a tree diagram frequently used to illustrate the arrangement
* of the clusters produced by hierarchical clustering.
*
* @author <NAME>
*/
public class Dendrogram extends Plot {
/**
* The one end points of lines.
*/
private ... | plot/src/main/java/smile/plot/swing/Dendrogram.java | 0.939004 | 0.657916 | Dendrogram.java | starcoder |
package rx.leancloud.internal;
import io.reactivex.Single;
import io.reactivex.schedulers.Schedulers;
import java.util.function.Function;
import java.util.function.Supplier;
public class AVTaskQueue {
public static <T> void enqueue(Single<T> single) {
single.subscribeOn(Schedulers.computation()).observe... | src/core/src/main/java/rx/leancloud/internal/AVTaskQueue.java | 0.751283 | 0.435061 | AVTaskQueue.java | starcoder |
package frc.robot;
import java.util.ArrayList;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Translation2d;
public class FieldMap {
// Field marks, for reference
public static final double fieldWidth = 323 * Constants.inchToMeter... | src/main/java/frc/robot/FieldMap.java | 0.78964 | 0.765133 | FieldMap.java | starcoder |
package org.opengis.cite.cdb10.cdbStructure;
import java.io.IOException;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.... | src/main/java/org/opengis/cite/cdb10/cdbStructure/MModelGeometryStructureTests.java | 0.862468 | 0.404302 | MModelGeometryStructureTests.java | starcoder |
package com.github.androidproject.presentation.ui.models;
import android.os.Parcel;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;
public class HeroTest {
private Hero hero = new Hero(null, null, null, null, null, null, null);
@Test
public void heroParce... | app/src/androidTest/java/com/github/androidproject/presentation/ui/models/HeroTest.java | 0.78233 | 0.493409 | HeroTest.java | starcoder |
package net.silentchaos512.gear.gear.part;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import net.silentchaos512.gear.api.part.PartType;
import net.silentchaos512.gear.client.model.PartTextures;
import java.util.Collections;
import java.util.List;
import java.util.Ma... | src/main/java/net/silentchaos512/gear/gear/part/PartTextureSet.java | 0.655997 | 0.40439 | PartTextureSet.java | starcoder |
package org.xbib.netty.http.server.security;
import javax.security.auth.x500.X500Principal;
/**
* A distinguished name (DN) parser.
* This parser only supports extracting a string value from a DN.
* It doesn't support values in the hex-string style.
*
* Taken from okhttp
*/
public final class DistinguishedNameP... | netty-http-server/src/main/java/org/xbib/netty/http/server/security/DistinguishedNameParser.java | 0.675872 | 0.461381 | DistinguishedNameParser.java | starcoder |
package pl.edu.pjwstk.kaldi.files.julius;
import java.util.HashMap;
import java.util.Map;
import java.util.Stack;
import java.util.Vector;
import pl.edu.pjwstk.kaldi.utils.Log;
public class WordGraph {
public Map<Integer, LatticeNode> lattice;
public Map<Object, LatticeNode> nodes;
public WordGraph() {
lattic... | src/main/java/pl/edu/pjwstk/kaldi/files/julius/WordGraph.java | 0.577614 | 0.594169 | WordGraph.java | starcoder |
package problems.easy;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* This problem was asked by Twitter.
You run an e-commerce website and want to record the last N order ids in a log.
Implement a... | src/problems/easy/Ecommerce.java | 0.628749 | 0.439266 | Ecommerce.java | starcoder |
package org.dspace.workflow;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.validation.constraints.NotNull;
/**
* An association between a {@link org.dspace.curate.CurationTask curation task}
* and the workflow system. A single curation task may be a... | dspace-api/src/main/java/org/dspace/workflow/Task.java | 0.834441 | 0.483648 | Task.java | starcoder |
package org.simpleframework.xml.core;
import java.util.ArrayList;
import java.util.List;
/**
* The <code>ClassCreator</code> is responsible for instantiating
* objects using either the default no argument constructor or one
* that takes deserialized values as parameters. This also exposes
* the parameters and c... | CloudyMail/lib_src/org/simpleframework/xml/core/ClassCreator.java | 0.939975 | 0.41567 | ClassCreator.java | starcoder |
package me.linusdev.data.so;
import me.linusdev.data.AbstractData;
import me.linusdev.data.implemantations.DataListImpl;
import me.linusdev.data.implemantations.DataMapImpl;
import me.linusdev.data.parser.JsonParser;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import java.util... | src/main/java/me/linusdev/data/so/SOData.java | 0.845592 | 0.437343 | SOData.java | starcoder |
import edu.princeton.cs.algs4.Point2D;
import edu.princeton.cs.algs4.StdDraw;
import edu.princeton.cs.algs4.StdOut;
import edu.princeton.cs.algs4.StdRandom;
import java.awt.*;
public class Ex1_2_01 {
private static double CalcDistance(Point2D p0, Point2D p1) {
return Math.sqrt((p0.y() - p1.y()) * (p0.y()... | source/chapter1/section1_2/Ex1_2_01.java | 0.739986 | 0.41834 | Ex1_2_01.java | starcoder |
package org.monarchinitiative.vmvt.core.pssm;
import org.monarchinitiative.vmvt.core.except.VmvtRuntimeException;
import java.util.*;
/**
* A class to hold a two-dimensional matrix of double values, together with convenience methods to
* generate an information-content matrix representing binding sites as well as ... | vmvt-core/src/main/java/org/monarchinitiative/vmvt/core/pssm/DoubleMatrix.java | 0.913915 | 0.58602 | DoubleMatrix.java | starcoder |
package thread;
import java.util.concurrent.atomic.*;
import java.util.function.DoubleBinaryOperator;
import java.util.function.UnaryOperator;
public class TestAtomic {
public static void main(String[] args) {
testAtomicLong();
testAtomicBool();
testAtomicIntegerArray();
testAto... | src/main/java/thread/TestAtomic.java | 0.588534 | 0.511839 | TestAtomic.java | starcoder |
package org.javarosa.core.util;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Stack;
import java.util.Vector;
/**
* Directed A-cyclic (NOT ENFORCED) graph datatype.
*
* Genericized with three types: An unique index value (representing the node), a generic
* set of data to associate wi... | src/main/java/org/javarosa/core/util/DAG.java | 0.772531 | 0.545649 | DAG.java | starcoder |
package org.pathwayeditor.figure.geometry;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
/**
*
* ConvexHullCalculator is a class that is used to construct a convex hull from a set of points using the QuickHull
* algorithm.
*
* @author <NAME>
*
*/
public class ConvexHullCa... | src/org/pathwayeditor/figure/geometry/ConvexHullCalculator.java | 0.860193 | 0.60174 | ConvexHullCalculator.java | starcoder |
import java.util.Map;
import java.util.HashMap;
import java.util.LinkedHashSet;
// O(1) implementation of Least Frequently Used cache
// Based on: http://dhruvbird.com/lfu.pdf
public class LFUCache<K, V> {
// The mapping between a cache key and its corresponding cache value.
private Map<K, V> cache;
// Th... | LFUCache.java | 0.846609 | 0.562837 | LFUCache.java | starcoder |
package ru.devinside.drm.fairplay.ksm.spc;
import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
public enum SpcTag {
// A combination of values that the KSM will use to encrypt the content key and the CKC payload.
// The R1 value must be return... | src/main/java/ru/devinside/drm/fairplay/ksm/spc/SpcTag.java | 0.598312 | 0.427337 | SpcTag.java | starcoder |
package org.elasticsearch.painless;
import org.elasticsearch.painless.lookup.PainlessCast;
import org.elasticsearch.painless.lookup.PainlessLookupUtility;
import org.elasticsearch.painless.lookup.def;
import java.util.Objects;
/**
* Used during the analysis phase to collect legal type casts and promotions
* for ty... | modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerCaster.java | 0.827375 | 0.57827 | AnalyzerCaster.java | starcoder |
package com.opengamma.sesame;
import static com.opengamma.util.result.FailureStatus.ERROR;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.threeten.bp.LocalDate;
import org.threeten.bp.ZonedDateTime;
i... | sesame/sesame-function/src/main/java/com/opengamma/sesame/CurveBundleProviderFn.java | 0.929664 | 0.537406 | CurveBundleProviderFn.java | starcoder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.