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 me.gorgeousone.netherview.threedstuff.viewfrustum; import me.gorgeousone.netherview.portal.Portal; import me.gorgeousone.netherview.threedstuff.AxisAlignedRect; import me.gorgeousone.netherview.threedstuff.Line; import me.gorgeousone.netherview.wrapping.Axis; import org.bukkit.entity.Player; import org.bukkit....
src/main/java/me/gorgeousone/netherview/threedstuff/viewfrustum/ViewFrustumFactory.java
0.656768
0.589687
ViewFrustumFactory.java
starcoder
package org.codelogger.utils; import static com.google.common.collect.Lists.newArrayList; import static java.util.Calendar.DAY_OF_MONTH; import static org.codelogger.utils.DateUtils.formatToStartOfDay; import com.google.common.collect.Lists; import org.codelogger.utils.beans.Range; import org.codelogger.utils.excepti...
src/main/java/org/codelogger/utils/RangeUtils.java
0.902787
0.51312
RangeUtils.java
starcoder
package com.yahoo.searchlib.rankingexpression.integration.tensorflow; import com.yahoo.searchlib.rankingexpression.RankingExpression; import com.yahoo.searchlib.rankingexpression.evaluation.TensorValue; import com.yahoo.searchlib.rankingexpression.evaluation.Value; import com.yahoo.searchlib.rankingexpression.integrat...
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/TensorFlowImporter.java
0.861887
0.451508
TensorFlowImporter.java
starcoder
package com.jozufozu.flywheel.core.model; import net.minecraft.core.Direction; import com.mojang.math.Vector3f; public class Readable { public static class ModelBox { private final TexturedQuad[] quads; public final float posX1; public final float posY1; public final float posZ1; public final float posX2; ...
src/main/java/com/jozufozu/flywheel/core/model/Readable.java
0.622345
0.613642
Readable.java
starcoder
package com.sleepycat.bind.tuple; import java.math.BigInteger; import com.sleepycat.util.FastOutputStream; import com.sleepycat.util.PackedInteger; import com.sleepycat.util.UtfOps; /** * An <code>OutputStream</code> with <code>DataOutput</code>-like methods for * writing tuple fields. It is used by <code>TupleBi...
examples/berkeleydb/com/sleepycat/bind/tuple/TupleOutput.java
0.914715
0.485966
TupleOutput.java
starcoder
package com.opengamma.opensimm.format; import static java.util.stream.Collectors.joining; import static java.util.stream.Collectors.toList; import java.io.PrintStream; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.u...
src/main/java/com/opengamma/opensimm/format/PrettyPrintOutputFormatter.java
0.923536
0.560794
PrettyPrintOutputFormatter.java
starcoder
package maspack.image.dicom; import java.nio.ByteBuffer; import java.util.Arrays; import maspack.image.VolumeImage; import maspack.image.dicom.DicomPixelBuffer.PixelType; import maspack.matrix.AffineTransform3d; import maspack.matrix.RigidTransform3d; import maspack.matrix.Vector3d; public class DicomImage implement...
src/maspack/image/dicom/DicomImage.java
0.806052
0.419172
DicomImage.java
starcoder
Copyright 2015, Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writi...
software/android/orp-android/app/src/main/java/orp/orp/crypto/EdwardsPair.java
0.930663
0.455804
EdwardsPair.java
starcoder
package paulscode.sound; /** * The listenerData class is used to store information about the * listener's position and orientation. A ListenerData object can be obtained * using SoundSystem's getListenerData() method. See * {@link paulscode.sound.Vector3D Vector3D} for more information about 3D * coordinate...
Dependencies/3DSound/3DSound/Core/src/paulscode/sound/ListenerData.java
0.937904
0.493897
ListenerData.java
starcoder
package com.google.location.lbs.gnss.gps.pseudorange; /** * Converts ECEF (Earth Centered Earth Fixed) Cartesian coordinates to LLA (latitude, longitude, * and altitude). * * <p> Source: reference from Mathworks: https://microem.ru/files/2012/08/GPS.G1-X-00006.pdf * http://www.mathworks.com/help/aeroblks/ecefposi...
GNSSLogger/pseudorange/src/main/java/com/google/location/lbs/gnss/gps/pseudorange/Ecef2LlaConverter.java
0.88594
0.62395
Ecef2LlaConverter.java
starcoder
package ol; import javax.annotation.Nullable; import jsinterop.annotations.JsType; import ol.gwt.TypedObject; import ol.proj.Projection; /** * An ol.View object represents a simple 2D view of the map. * * This is the object to act upon to change the center, resolution, and rotation * of the map. * * ### The v...
gwt-ol3-client/src/main/java/ol/View.java
0.908051
0.669897
View.java
starcoder
package tyRuBa.util; /** An ElementCollector collects and remembers elements from an element source. Theelement source is called upon when the collector needs to produce a new element. ElementCollectors work in a lazy wya and will not request element sources to produce an element until the elements in the Elem...
LSclipse_1.0.4/lsd/tyRuBa/util/ElementCollector.java
0.599954
0.426202
ElementCollector.java
starcoder
package com.genexus.db; import java.sql.*; public class BufferIFieldGetter implements IFieldGetter { private Object[] value; public BufferIFieldGetter(Object[] value) { this.value = value; } public Object[] getValue() { return value; } public boolean wasNull() throws SQLExcep...
common/src/main/java/com/genexus/db/BufferIFieldGetter.java
0.840848
0.460107
BufferIFieldGetter.java
starcoder
package blbutil; /** * Class {@code StringUtil} is a utility class with static methods * for counting and returning delimited fields in a string. * * @author <NAME> {@code <<EMAIL>>} */ public class StringUtil { /* Private constructor to prevent instantiation */ private StringUtil() { } /** ...
src/blbutil/StringUtil.java
0.959288
0.467332
StringUtil.java
starcoder
package section3.string1; /** * In general both method removes leading and trailing spaces from string. However the difference comes when we work with unicode charaters or multilingual features. * * trim() removes all leading and trailing character whose ASCII value is less than or equal to 32 (‘U+0020’ or space). ...
ProjectJavaSE11/src/section3/string1/TextTransform.java
0.865352
0.403391
TextTransform.java
starcoder
package java.io; import static javaemul.internal.InternalPreconditions.checkNotNull; /** * Provides a series of utilities to be reused between IO classes. * * TODO(chehayeb): move these checks to InternalPreconditions. */ final class IOUtils { /** * Validates the offset and the byte count for the given arra...
jre/java/java/io/IOUtils.java
0.821832
0.648063
IOUtils.java
starcoder
import java.util.HashMap; import java.util.LinkedList; import java.util.Queue; /** * Design a hit counter which counts the number of hits received in the past 5 minutes. * <p> * Each function accepts a timestamp parameter (in seconds granularity) and you may assume that calls are * being made to the system in chro...
src/main/java/HitCounter.java
0.890996
0.523542
HitCounter.java
starcoder
package com.opengamma.financial.model.option.pricing.analytic.formula; import org.apache.commons.lang.Validate; import com.opengamma.math.function.Function1D; import com.opengamma.math.statistics.distribution.NonCentralChiSquaredDistribution; /** * */ public class CEVPriceFunction implements OptionPriceFunction<C...
projects/OG-Analytics/src/com/opengamma/financial/model/option/pricing/analytic/formula/CEVPriceFunction.java
0.894398
0.467393
CEVPriceFunction.java
starcoder
package com.interview.technical.codility; import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** * * A DNA sequence can be represented as a string consisting of the letters A, C, * G and T, which correspond to the types of successive nucleotides in the * sequence. Each nucleotide ...
crackingthecodinginterview/src/main/java/com/interview/technical/codility/GenomicRange.java
0.819749
0.728096
GenomicRange.java
starcoder
package us.ihmc.quadrupedRobotics.controller.force.states; import us.ihmc.robotModels.FullQuadrupedRobotModel; import us.ihmc.robotics.partNames.JointRole; import us.ihmc.robotics.partNames.QuadrupedJointName; import us.ihmc.quadrupedRobotics.controller.ControllerEvent; import us.ihmc.quadrupedRobotics.controller.Quad...
IHMCQuadrupedRobotics/src/us/ihmc/quadrupedRobotics/controller/force/states/QuadrupedForceBasedFreezeController.java
0.824956
0.439928
QuadrupedForceBasedFreezeController.java
starcoder
package io.r2dbc.mssql.message.token; import io.netty.buffer.ByteBuf; import io.r2dbc.mssql.message.tds.Decode; import reactor.util.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Column info token. Describes the column information in browse mode. * * @a...
src/main/java/io/r2dbc/mssql/message/token/ColInfoToken.java
0.878158
0.430506
ColInfoToken.java
starcoder
package org.sosy_lab.cpachecker.cfa.parser.eclipse.c; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; import static com.google.common.truth.Truth.assert_; import com.google.common.collect.ImmutableList; import org.junit.Ignore; import org.junit.Te...
src/org/sosy_lab/cpachecker/cfa/parser/eclipse/c/ASTConverterTest.java
0.831006
0.456773
ASTConverterTest.java
starcoder
package org.apache.mahout.math; import java.util.Iterator; import java.util.NoSuchElementException; import org.apache.mahout.math.function.Functions; /** * <p> * Implements vector that only stores non-zero doubles as a pair of parallel arrays (OrderedIntDoubleMapping), * one int[], one double[]. If there are <b>...
math/src/main/java/org/apache/mahout/math/SequentialAccessSparseVector.java
0.836187
0.609408
SequentialAccessSparseVector.java
starcoder
package info.smart_tools.smartactors.morph_expressions.parser; import info.smart_tools.smartactors.morph_expressions.interfaces.parser.IFunction; import info.smart_tools.smartactors.morph_expressions.interfaces.parser.IParser; import info.smart_tools.smartactors.morph_expressions.interfaces.parser.IProperty; import in...
CoreFeatures/Parser/Parser/src/main/java/info/smart_tools/smartactors/morph_expressions/parser/ExpressionParser.java
0.926149
0.429728
ExpressionParser.java
starcoder
package arc.util.viewport; import arc.ApplicationListener; import arc.Core; import arc.graphics.Camera; import arc.graphics.g2d.ScissorStack; import arc.graphics.gl.HdpiUtils; import arc.math.Mat; import arc.math.geom.*; /** * Manages a {@link Camera} and determines how world coordinates are mapped to and from the s...
arc-core/src/arc/util/viewport/Viewport.java
0.926786
0.415195
Viewport.java
starcoder
package com.clawsoftware.agentsimulator.agent; import com.clawsoftware.agentsimulator.Misc.Point; import java.util.ArrayList; import com.clawsoftware.agentsimulator.lcs.Action; /** * Basic geometry class (lines, distances etc. * * @author <NAME>, clemens at lode.de, University Karlsruhe (TH) */ public class Geome...
AgentSimulator/src/com/clawsoftware/agentsimulator/agent/Geometry.java
0.825765
0.507202
Geometry.java
starcoder
package com.rapleaf.jack.queries.where_operators; import java.util.Collection; public class JackMatchers { public static <T> IWhereOperator<T> equalTo(T value) { if (value == null) { return new IsNull<T>(); } return new EqualTo<T>(value); } public static <T> IWhereOperator<T> notEqualTo(T va...
src/java/com/rapleaf/jack/queries/where_operators/JackMatchers.java
0.83612
0.716739
JackMatchers.java
starcoder
package eu.csaware.stix2.pattern; import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; /** * This class provides an empty implementation of {@link Stix2PatternVisitor}, * which can be extended to create a visitor which only needs to handle a subset * of the available methods. * * @param <T> The return type ...
stix2gson/src/main/java/eu/csaware/stix2/pattern/Stix2PatternBaseVisitor.java
0.903278
0.434281
Stix2PatternBaseVisitor.java
starcoder
package lsieun.crypto.sym.aes; /** * https://github.com/rishidewan33/Advanced-Encryption-Standard-Algorithm/blob/master/src/MCTables.java * @author <NAME> * @author <NAME> */ public class MCTables { /* * These are the look up tables used for MixColumns that were found on the Rijndael MixColumns Wikipedia ...
src/main/java/lsieun/crypto/sym/aes/MCTables.java
0.66072
0.461563
MCTables.java
starcoder
package com.graphhopper.routing.ev; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.graphhopper.storage.IntsRef; import java.util.*; /** * This class holds a List of up to {@link #maxValues} encountered Strings and stores * <i>index+1</i> to ind...
core/src/main/java/com/graphhopper/routing/ev/StringEncodedValue.java
0.938541
0.400896
StringEncodedValue.java
starcoder
package com.merakianalytics.datapipelines.sources; import java.util.Map; import java.util.Set; import com.merakianalytics.datapipelines.PipelineContext; import com.merakianalytics.datapipelines.PipelineElement; import com.merakianalytics.datapipelines.iterators.CloseableIterator; /** * A {@link com.merakianalytics....
src/main/java/com/merakianalytics/datapipelines/sources/DataSource.java
0.906604
0.49884
DataSource.java
starcoder
package org.ofdrw.core.graph.pathObj; import org.dom4j.Element; import org.ofdrw.core.OFDElement; import org.ofdrw.core.basicType.ST_Pos; import java.util.LinkedList; import java.util.List; /** * 图形轮廓数据 * <p> * 由一系列的紧缩的操作符和操作数构成 * <p> * 9.1 表 35 36 * * @author 权观宇 * @since 2019-10-16 09:09:15 */ public clas...
ofdrw-core/src/main/java/org/ofdrw/core/graph/pathObj/AbbreviatedData.java
0.602997
0.433442
AbbreviatedData.java
starcoder
package com.netposa.commonsdk.map; import androidx.annotation.FloatRange; import androidx.annotation.NonNull; import java.util.ArrayList; import java.util.List; import static com.netposa.commonsdk.map.LatLng.MAX_LATITUDE; import static com.netposa.commonsdk.map.LatLng.MAX_LONGITUDE; import static com.netposa.commons...
map/src/main/java/com/netposa/commonsdk/map/Point.java
0.957397
0.608652
Point.java
starcoder
package io.github.amrjlg.id; /** * the id composition and structure * <br> * 10 20 30 40 50 60 64<br> * 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
common-id/src/main/java/io/github/amrjlg/id/Snowflake.java
0.566258
0.406803
Snowflake.java
starcoder
package com.github.liblevenshtein.transducer; import lombok.AllArgsConstructor; import com.github.liblevenshtein.collection.AbstractIterator; /** * Iterates over the positions of a {@link State}. * @since 3.0.0 */ @AllArgsConstructor public class StateIterator extends AbstractIterator<Position> { /** * {@li...
src/main/java/com/github/liblevenshtein/transducer/StateIterator.java
0.911356
0.405272
StateIterator.java
starcoder
package org.apache.sis.internal.storage.csv; import java.util.Date; import java.util.Objects; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.function.Consumer; import java.lang.reflect.Array; import java.time.Instant; import org.apache.sis.math.Vector; import org.apache.sis.intern...
storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/MovingFeatureBuilder.java
0.940483
0.446736
MovingFeatureBuilder.java
starcoder
package org.apache.flink.api.common.functions; import org.apache.flink.annotation.Public; /** * A broadcast variable initializer can be used to transform a broadcast variable * into another format during initialization. The transformed variable is shared * among the parallel instances of a function inside one Task...
flink-core/src/main/java/org/apache/flink/api/common/functions/BroadcastVariableInitializer.java
0.909679
0.427038
BroadcastVariableInitializer.java
starcoder
package eisenwave.spatium.util; import org.jetbrains.annotations.NotNull; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.*; import java.util.function.Predicate; public final class Strings { private Strings() {} private final static NumberFormat STD_DEC_FORMA...
spatium-util/src/main/java/eisenwave/spatium/util/Strings.java
0.761184
0.415017
Strings.java
starcoder
package io.deephaven.engine.table.impl.sources; /** * Column sources that provide an array. */ public interface UngroupableColumnSource { /** * Does this particular instance of the column source support ungrouping? * * @return true if you can call the getUngrouped family of methods and get a vali...
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/UngroupableColumnSource.java
0.89275
0.550366
UngroupableColumnSource.java
starcoder
package pt.up.fc.dcc.asura.utils; public class Vector implements Cloneable { public static final double EPSILON = 0.00000001; private double x; private double y; private double z; public Vector(double x, double y) { this.x = x; this.y = y; this.z = 0; } public Vec...
lightning-pong/src/main/java/pt/up/fc/dcc/asura/utils/Vector.java
0.950111
0.751443
Vector.java
starcoder
package com.google.common.geometry; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.Lists; import com.google.common.collect.Multimap; import com.google.common.geometry.S2Polygon.Shape; import com.google.common.geometry.S2Shape.MutableEdge; import com.google.common.geometry.S2Shape....
tests/com/google/common/geometry/S2ShapeUtilTest.java
0.905155
0.817028
S2ShapeUtilTest.java
starcoder
package org.tensorflow; import java.util.LinkedHashMap; import java.util.Map; import org.tensorflow.Signature.TensorDescription; /** A function that can be called with tensors. */ public interface TensorFunction { /** Returns the signature of this function */ Signature signature(); /** * Invokes a function...
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFunction.java
0.934403
0.478163
TensorFunction.java
starcoder
package nl.mvdr.adventofcode.adventofcode2020.day11; import java.util.Comparator; import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.IntStr...
src/main/java/nl/mvdr/adventofcode/adventofcode2020/day11/WaitingArea.java
0.914706
0.450299
WaitingArea.java
starcoder
package us.ihmc.exampleSimulations.sphereICPControl.model; import java.util.Arrays; import java.util.List; import java.util.Map; import us.ihmc.euclid.matrix.Matrix3D; import us.ihmc.euclid.referenceFrame.ReferenceFrame; import us.ihmc.euclid.transform.RigidBodyTransform; import us.ihmc.euclid.tuple3D.Vector3D; impor...
example-simulations/src/main/java/us/ihmc/exampleSimulations/sphereICPControl/model/SphereRobotModel.java
0.861742
0.411466
SphereRobotModel.java
starcoder
package team.unnamed.hephaestus.util; import team.unnamed.creative.base.Vector3Float; import java.util.Objects; /** * Immutable representation of a 4-element quaternion * represented by a 64-bit floating point x, y, z and * w coordinates. * * <p>See <a href="https://en.wikipedia.org/wiki/Quaternion"> * Qua...
api/src/main/java/team/unnamed/hephaestus/util/Quaternion.java
0.948143
0.662912
Quaternion.java
starcoder
package com.jackvanlightly.rabbittesttool.comparer; public class Comparison { private String measurement; private Measurement measurement1; private Measurement measurement2; private double minValueDiff; private double minValueDiffPercent; private double maxValueDiff; private double maxValu...
src/main/java/com/jackvanlightly/rabbittesttool/comparer/Comparison.java
0.826537
0.547827
Comparison.java
starcoder
package jwave; import jwave.transforms.FastWaveletTransform; import jwave.transforms.WaveletPacketTransform; import jwave.transforms.wavelets.Wavelet; import jwave.transforms.wavelets.WaveletBuilder; import org.junit.Test; /** * Testing the stepping methods which allow to stop at a certain level of * decomposition...
test/jwave/SteppingTest.java
0.599837
0.688043
SteppingTest.java
starcoder
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; /** * PuzzleState defines a state for the nth-puzzle problem. The board is always * represented by a single dimensioned array. * In terms of the actual tiles, '0' represents the hole in the board, and 0 is * treated special when gen...
src/PuzzleState.java
0.891168
0.477067
PuzzleState.java
starcoder
package com.nathan2055.lab40ArraySort; /******************************************************************** * Class for sorting an array of Comparable objects from smallest to * largest. * ********************************************************************/ public class SortArrayInstrumented { private long ...
src/com/nathan2055/lab40ArraySort/SortArrayInstrumented.java
0.829388
0.45423
SortArrayInstrumented.java
starcoder
package com.opengamma.financial.model.option.pricing.analytic; import javax.time.calendar.ZonedDateTime; import org.apache.commons.lang.Validate; import com.opengamma.financial.model.interestrate.curve.YieldAndDiscountCurve; import com.opengamma.financial.model.option.definition.BatesGeneralizedJumpDiffusionModelDat...
projects/OG-Analytics/src/com/opengamma/financial/model/option/pricing/analytic/BatesGeneralizedJumpDiffusionModel.java
0.912549
0.85567
BatesGeneralizedJumpDiffusionModel.java
starcoder
package us.ihmc.robotics.math.trajectories.waypoints; import us.ihmc.euclid.referenceFrame.ReferenceFrame; import us.ihmc.euclid.referenceFrame.interfaces.FramePoint3DReadOnly; import us.ihmc.euclid.referenceFrame.interfaces.FrameVector3DReadOnly; import us.ihmc.euclid.transform.interfaces.Transform; import us.ihmc.ro...
ihmc-robotics-toolkit/src/main/java/us/ihmc/robotics/math/trajectories/waypoints/YoFrameEuclideanWaypoint.java
0.916321
0.469946
YoFrameEuclideanWaypoint.java
starcoder
package rigserver; import java.util.Random; import rigserver.Config.GlobalConfigManager; // TODO: Static or not?? /** * A utilities class in support of the {@link RigSys} object, providing * functionality to setup a rig. * * @author <NAME> */ public class RigUtils { public static Random rand = new Random(); ...
v1/rigserver/src/rigserver/RigUtils.java
0.579519
0.407569
RigUtils.java
starcoder
public class UnionFind { // stores the component's parent node for each element private int[] parent; // stores the depth of its tree at its corresponding parent node private byte[] rank; // number of components (trees) private int count; public UnionFind(int N) { // Initialize component ...
seam/UnionFind.java
0.687105
0.610599
UnionFind.java
starcoder
package Java_classesAndObject; /* Travel Details Create a class Person with the following private member variables String name char gender int age Include appropriate getters and setters method Create a class BusTicket with the following private member variables int ticketNo float ticketPrice ...
Java_classesAndObject/Traveldetails.java
0.58261
0.509032
Traveldetails.java
starcoder
package com.github.robtimus.os.windows.registry; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import com.sun.jna.platform.win32.WinNT; /** * A representation of binary registry values. * Instances of this ...
src/main/java/com/github/robtimus/os/windows/registry/BinaryValue.java
0.948775
0.430626
BinaryValue.java
starcoder
package riso.numerical; import java.io.*; /** Linear algebra computations. All the methods of this class are static * and operate on double[][] objects. This works for ordinary matrices; * however, it would be nice to (eventually) define special kinds of * matrices, e.g. IdentityMatrix or BlockDiagonalMatrix, a...
src/main/java/riso/numerical/Matrix.java
0.830353
0.514705
Matrix.java
starcoder
package mtr.model; import net.minecraft.client.model.ModelPart; import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.util.math.MatrixStack; public class ModelLightRail extends ModelTrainBase { private final ModelPart window; private final ModelPart window_exterior; private final ModelPar...
src/main/java/mtr/model/ModelLightRail.java
0.628293
0.424591
ModelLightRail.java
starcoder
package simulator; import java.util.ArrayList; import java.util.HashSet; import simulator.utils.EloLibrary; public class NGSTeam implements Team { private String name; private String abbrv; private ArrayList<ArrayList<NGSTeam>> results; //NOTE: This assumes each team plays each other team in at least 1 other matc...
src/simulator/NGSTeam.java
0.726814
0.481454
NGSTeam.java
starcoder
package one.proto; import java.util.Arrays; /** * Simplified implementation of Protobuf writer, capable of encoding * varints, doubles, ASCII strings and embedded messages */ public class Proto { private byte[] buf; private int pos; public Proto(int capacity) { this.buf = new byte[capacity]; ...
src/converter/one/proto/Proto.java
0.801081
0.465084
Proto.java
starcoder
package com.indoqa.lang.util; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; public final class CollectionUtils { private CollectionUtils() { // hide utility constructor } @SafeVarargs public static ...
src/main/java/com/indoqa/lang/util/CollectionUtils.java
0.939748
0.426083
CollectionUtils.java
starcoder
package dev.vality.newway.util; import dev.vality.damsel.domain.*; import dev.vality.geck.common.util.TypeUtil; import dev.vality.newway.domain.enums.AdjustmentCashFlowType; import dev.vality.newway.domain.enums.PaymentChangeType; import dev.vality.newway.domain.tables.pojos.CashFlow; import java.util.List; import ja...
src/main/java/dev/vality/newway/util/CashFlowUtil.java
0.614278
0.462776
CashFlowUtil.java
starcoder
public abstract class Pet implements Comparable<Pet> { private int health; private int attack; /** * 2-args constructor to be used on a super called by a child of Pet. * @param health int representing the health of the Pet * @param attack int representing the attack power of the Pet */ ...
HW04/Pet.java
0.939934
0.57332
Pet.java
starcoder
package ghidra.file.formats.android.util; import java.io.IOException; public class OverlayRange { private int overlayIndex; private byte[] overlayBytes; public OverlayRange(long overlayIndex, byte[] overlayBytes) { this((int) overlayIndex, overlayBytes); } public OverlayRange(int overlayIndex, byte[] overla...
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/util/OverlayRange.java
0.897373
0.400222
OverlayRange.java
starcoder
package com.fredhonorio.neu.op; import com.fredhonorio.neu.decoder.ResultDecoder; import com.fredhonorio.neu.query.Read; import com.fredhonorio.neu.query.Record; import com.fredhonorio.neu.query.Statement; import com.fredhonorio.neu.query.Write; import com.fredhonorio.neu.util.Assert; import com.fredhonorio.neu.util.T...
src/main/java/com/fredhonorio/neu/op/Ops.java
0.886181
0.419648
Ops.java
starcoder
import java.util.Arrays; public class Matrix { private int m; private int n; private double[][] nums; // Constructor, copies passed matrix to this.nums public Matrix(double[][] nums) { m = nums.length; n = nums[0].length; this.nums = new double[m][n]; for (int i = 0; i < m; i++) this.nums[i] = A...
BeOatmeal/src/Matrix.java
0.752195
0.613844
Matrix.java
starcoder
package swingingAround.Entities; import swingingAround.ThreeD.Vec3; import swingingAround.ThreeD.dMatrix; import java.awt.*; /** * A térbeli függvény reprezentációja. */ public abstract class Mathfunction { /** * Egy adott méretű mátrix, melyben a függvény egy * egy adott mennyiségű a függvénnyel elő...
swingingAround/Entities/Mathfunction.java
0.704465
0.451024
Mathfunction.java
starcoder
package io.vepo.kt.ui; import java.util.List; import java.util.function.BiConsumer; public interface ResizePolicy { static ResizePolicy fixedSize(int size) { return new FixedSizeResizePolicy(size); } class FixedSizeResizePolicy implements ResizePolicy { private final int size; p...
src/main/java/io/vepo/kt/ui/ResizePolicy.java
0.816662
0.414484
ResizePolicy.java
starcoder
package bgame.model; /** * This class represents a game piece (counter) that players can use to place on * a board. It also can be used by the different games to mark obstacles, etc. * Each piece has an identifier (String) that does not include whitespace. * Pieces with the same identifier are equal. Games usually...
src/bgame/model/Piece.java
0.870529
0.50653
Piece.java
starcoder
package org.nschmidt.ldparteditor.data; import java.io.Serializable; import org.lwjgl.opengl.GL11; import org.nschmidt.ldparteditor.enumtype.Colour; import org.nschmidt.ldparteditor.opengl.GL33HelperPrimitives; import org.nschmidt.ldparteditor.opengl.GLMatrixStack; /** * @author nils * */ public final class PGDat...
src/org/nschmidt/ldparteditor/data/PGData2.java
0.858081
0.488527
PGData2.java
starcoder
package com.opengamma.strata.measure.credit; import com.opengamma.strata.calc.Measure; /** * The standard set of credit measures that can be calculated by Strata. * <p> * A measure identifies the calculation result that is required. */ public final class CreditMeasures { /** * Measure representing the princ...
modules/measure/src/main/java/com/opengamma/strata/measure/credit/CreditMeasures.java
0.89123
0.503418
CreditMeasures.java
starcoder
package com.opengamma.financial.analytics.model.bondcurves.inflationbondcurves; import static com.opengamma.engine.value.ValuePropertyNames.CURRENCY; import static com.opengamma.engine.value.ValueRequirementNames.CURVE_BUNDLE; import static com.opengamma.engine.value.ValueRequirementNames.PRESENT_VALUE; import java.u...
projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/bondcurves/inflationbondcurves/InflationBondPresentValueFromCurvesFunction.java
0.859428
0.513059
InflationBondPresentValueFromCurvesFunction.java
starcoder
package org.tomitribe.churchkey.ec; import org.tomitribe.util.Hex; import java.math.BigInteger; import java.security.spec.ECPoint; import static org.tomitribe.churchkey.util.Bytes.trim; public class EcPoints { private EcPoints() { } public static ECPoint fromBytes(final byte[] bytes) { if (byte...
src/main/java/org/tomitribe/churchkey/ec/EcPoints.java
0.850841
0.495117
EcPoints.java
starcoder
package com.google.zetasql; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; import com.google.zetasql.FunctionProtos.FunctionSignatureOptionsProto; import com.google.zetasql.FunctionProtos.FunctionSignatureProto; import com.google.zetasql.ZetaSQLF...
javatests/com/google/zetasql/FunctionSignatureTest.java
0.812867
0.717804
FunctionSignatureTest.java
starcoder
package com.github.ykrank.androidtools.util; import androidx.annotation.Nullable; import org.apache.commons.lang3.StringUtils; public final class StringUtil { static final String TWO_SPACES = " "; private static final String NON_BREAKING_SPACE_ENTITY_NAME = "&nbsp;"; private StringUtil() { } ...
library/src/main/java/com/github/ykrank/androidtools/util/StringUtil.java
0.897838
0.40028
StringUtil.java
starcoder
package io.wcm.qa.glnm.sampling.transform.regex; import java.util.regex.Matcher; import java.util.regex.Pattern; import io.wcm.qa.glnm.sampling.Sampler; import io.wcm.qa.glnm.sampling.transform.base.RegexBasedSampler; /** * Samples a specific group from first match of regular expression. * * @param <S> type of in...
modules/sampling/src/main/java/io/wcm/qa/glnm/sampling/transform/regex/RegexSingleGroupSampler.java
0.91672
0.407274
RegexSingleGroupSampler.java
starcoder
package Model.SearchGameTree; import Model.AndantinoGameBoard; import Model.Tile; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; /** * Node in a search tree for the Andantino game. A node * corresponds to a configuration in the gameboard and must * contain...
src/Model/SearchGameTree/AndantinoNode.java
0.911551
0.453564
AndantinoNode.java
starcoder
package classes.factories; import com.badlogic.gdx.physics.box2d.*; public class ShapeCreator { private World world; private Body body; private Shape shape; private Fixture fixture; private FixtureDef fixtureDef; public ShapeCreator(World world) { this.world = world; } publi...
core/src/classes/factories/ShapeCreator.java
0.8575
0.535706
ShapeCreator.java
starcoder
package com.opengamma.analytics.financial.instrument.inflation; import org.apache.commons.lang.Validate; import org.threeten.bp.LocalDate; import org.threeten.bp.ZonedDateTime; import org.threeten.bp.temporal.TemporalAdjusters; import com.opengamma.OpenGammaRuntimeException; import com.opengamma.analytics.financial.i...
projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/inflation/CapFloorInflationZeroCouponMonthlyDefinition.java
0.877398
0.664493
CapFloorInflationZeroCouponMonthlyDefinition.java
starcoder
package org.rajawali3d.primitives; import org.rajawali3d.Object3D; /** * A cube primitive. The constructor takes two boolean arguments that indicate whether certain buffers should be * created or not. Not creating these buffers can reduce memory footprint. * <p> * When creating solid color cube both <code>createT...
rajawali/src/main/java/org/rajawali3d/primitives/Cube.java
0.748352
0.485051
Cube.java
starcoder
* Distributed under the MIT license (see LICENSE.txt or https://opensource.org/licenses/MIT). */ package org.wmn4j.representation.geometric; import org.wmn4j.mir.Pattern; import org.wmn4j.notation.Durational; import org.wmn4j.notation.Note; import java.util.ArrayList; import java.util.Collections; import java.util....
src/main/java/org/wmn4j/representation/geometric/PointPattern.java
0.951863
0.584153
PointPattern.java
starcoder
package es.usc.citius.hipster.algorithm; import es.usc.citius.hipster.model.node.Node; import es.usc.citius.hipster.util.Predicate; import java.util.*; /** * Abstract class implemented by each search algorithm. This class provides basic methods * to each algorithm for searching or printing detailed information ab...
hipster-core/src/main/java/es/usc/citius/hipster/algorithm/Algorithm.java
0.803906
0.506408
Algorithm.java
starcoder
package compiler.common.report; import compiler.common.logger.*; /** * Description of a location of a part of a source file. * * @author sliva */ public class Location implements Locatable, Loggable { /** * The line number of the first character of the specified part of the source * file. */ private fin...
PREV/prevNaloga2/srcs/compiler/common/report/Location.java
0.915202
0.514461
Location.java
starcoder
package java.util; /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. * Status: Believed complete and correct /** * Stack provides a Last In First Out (LIFO) data ty...
tools-src/gnu/gcc/libjava/java/util/Stack.java
0.911128
0.409988
Stack.java
starcoder
package edu.iu.dsc.tws.tsched.utils; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.logging.Logger; import edu.iu.dsc.tws.task.graph.DataFlowTaskGraph; import edu.iu.dsc.tws.task.graph.Vertex; /** * This class acts as a helper class for the...
twister2/twister2/taskscheduler/src/java/edu/iu/dsc/tws/tsched/utils/TaskVertexParser.java
0.874707
0.496643
TaskVertexParser.java
starcoder
package com.hyomee.collection.map.treemap; import java.util.*; public class TreeMapClass { TreeMap<Integer, String> map = new TreeMap<Integer, String>(); // TreeMap생성 : public TreeMapClass() { System.out.println("* TreeMapClass ================"); insertTreeMap(); getTreeMapK(); ...
Collection/src/com/hyomee/collection/map/treemap/TreeMapClass.java
0.562777
0.472501
TreeMapClass.java
starcoder
package org.w3c.dom; /** * The <code>Attr</code> interface represents an attribute in an * <code>Element</code> object. Typically the allowable values for the attribute * are defined in a schema associated with the document. * <p> * <code>Attr</code> objects inherit the <code>Node</code> interface, but since * t...
java/jcl/src/java/org/w3c/dom/Attr.java
0.908785
0.451206
Attr.java
starcoder
package a05_graphs_trees_heaps; public class RedBlackBST<Key extends Comparable<Key>, Value> { private static final boolean RED = true; private static final boolean BLACK = false; private Node root; // root of the BST private class Node { private Key key; private Value val; private Node left, right; priv...
src/main/java/a05_graphs_trees_heaps/RedBlackBST.java
0.860384
0.448668
RedBlackBST.java
starcoder
package gov.sandia.cognition.learning.algorithm.factor.machine; import gov.sandia.cognition.algorithm.MeasurablePerformanceAlgorithm; import gov.sandia.cognition.annotation.PublicationReference; import gov.sandia.cognition.annotation.PublicationReferences; import gov.sandia.cognition.annotation.PublicationType; import...
Components/LearningCore/Source/gov/sandia/cognition/learning/algorithm/factor/machine/FactorizationMachineStochasticGradient.java
0.88768
0.57338
FactorizationMachineStochasticGradient.java
starcoder
package org.bdgp.util; import java.util.*; import java.lang.reflect.*; /** * A collection of static methods for manipulating Vectors. * @see java.util.Vector */ public class VectorUtil { private final static ComparableComparator comparableComparator = new ComparableComparator(); private final static E...
src/java/org/bdgp/util/VectorUtil.java
0.938428
0.730506
VectorUtil.java
starcoder
package co.elastic.tealess.tls; /** * Created by jls on 5/1/2017. */ public enum CipherSuite { // curl -s https://www.iana.org/assignments/tls-parameters/tls-parameters-4.csv | ruby -rcsv -e 'CSV.parse(STDIN.read).each { |value, description, dtls, reference| next if description == "Unassigned"; puts "#{description...
core/src/main/java/co/elastic/tealess/tls/CipherSuite.java
0.543833
0.431884
CipherSuite.java
starcoder
package net.metricspace.crypto.math.ec.point; import javax.security.auth.Destroyable; import net.metricspace.crypto.math.ec.curve.EdwardsCurve; import net.metricspace.crypto.math.ec.ladder.MontgomeryLadder; import net.metricspace.crypto.math.field.PrimeField; /** * Extended Edwards curve points, as described in His...
src/main/java/net/metricspace/crypto/math/ec/point/ExtendedEdwardsDecafPoint.java
0.960979
0.526038
ExtendedEdwardsDecafPoint.java
starcoder
package uk.org.glendale.worldgen.civ; import uk.org.glendale.worldgen.WorldGen; import uk.org.glendale.worldgen.astro.planets.Planet; import uk.org.glendale.worldgen.astro.systems.StarSystem; import uk.org.glendale.worldgen.text.TextGenerator; import java.util.HashSet; import java.util.List; import java.util.Map; imp...
src/main/java/uk/org/glendale/worldgen/civ/CivilisationGenerator.java
0.819244
0.471892
CivilisationGenerator.java
starcoder
package datawave.query.postprocessing.tf; import datawave.query.jexl.functions.TermFrequencyList; import org.javatuples.Triplet; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.StringJoiner; /** * This encapsulates term frequencies information ...
warehouse/query-core/src/main/java/datawave/query/postprocessing/tf/TermOffsetMap.java
0.923756
0.433022
TermOffsetMap.java
starcoder
import java.util.Arrays; /* * There are two sorted arrays nums1 and nums2 of size m and n respectively. * * Find the median of the two sorted arrays. The overall run time complexity * should be O(log (m+n)). * * You may assume nums1 and nums2 cannot be both empty. * * Example 1: * nums1 = [1, 3] * nu...
Problems/Array/hard/4_median_of_two_sorted_arrays/MedianOfTwoSortedArrays.java
0.583085
0.584716
MedianOfTwoSortedArrays.java
starcoder
package org.eigenbase.rel.metadata; import java.util.*; import org.eigenbase.rel.*; import org.eigenbase.relopt.*; import org.eigenbase.rex.*; import org.eigenbase.sql.*; import org.eigenbase.stat.*; /** * RelMetadataQuery provides a strongly-typed facade on top of {@link * RelMetadataProvider} for the set of rel...
farrago/src/org/eigenbase/rel/metadata/RelMetadataQuery.java
0.947113
0.418816
RelMetadataQuery.java
starcoder
package nl.mwensveen.adventofcode.year_2019.day_13; import com.codepoetics.protonpack.StreamUtils; import java.math.BigInteger; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.OptionalInt; public class IntcodeProgram { private static final BigInt...
year_2019/src/main/java/nl/mwensveen/adventofcode/year_2019/day_13/IntcodeProgram.java
0.823364
0.525612
IntcodeProgram.java
starcoder
package org.talend.dataprep.dataset.store.metadata; import java.util.Collections; import java.util.stream.Stream; import javax.annotation.Nullable; import org.talend.dataprep.api.dataset.DataSetMetadata; import org.talend.dataprep.lock.DistributedLock; import org.talend.dataprep.util.SortAndOrderHelper.Order; impor...
dataprep-dataset/src/main/java/org/talend/dataprep/dataset/store/metadata/DataSetMetadataRepository.java
0.927108
0.491395
DataSetMetadataRepository.java
starcoder
package io.github.fablabsmc.fablabs.api.fluidvolume.v1.math; import java.util.stream.LongStream; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.math.LongMath; import com.mojang.datafixers.Dynamic; import com.mojang.datafixers.types.Dynamic...
src/main/java/io/github/fablabsmc/fablabs/api/fluidvolume/v1/math/Fraction.java
0.761538
0.421969
Fraction.java
starcoder
package edu.stanford.math.plex; import java.util.Iterator; import java.util.NoSuchElementException; /** * The <code>TmpStream</code> class. Test code. The <code>next()</code> * methods for instances of this class do <em>not</em> remove simplices * from the stream. * * @version $Id$ */ public class T...
src/java/edu/stanford/math/plex/TmpStream.java
0.716119
0.485661
TmpStream.java
starcoder
package com.opengamma.analytics.financial.commodity.definition; import org.apache.commons.lang.ObjectUtils; import org.threeten.bp.ZonedDateTime; import com.opengamma.analytics.financial.instrument.InstrumentDefinitionWithData; import com.opengamma.analytics.financial.interestrate.InstrumentDerivative; import com.ope...
projects/analytics/src/main/java/com/opengamma/analytics/financial/commodity/definition/CommodityForwardDefinition.java
0.916297
0.473596
CommodityForwardDefinition.java
starcoder