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.im97mori.rbt.ble.characteristic.mds; import android.bluetooth.BluetoothGattCharacteristic; import android.os.Parcel; import org.junit.Test; import static org.im97mori.ble.BLEConstants.BASE_UUID; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; public class M...
ble-characteristic/characteristic-mds/src/androidTest/java/org/im97mori/rbt/ble/characteristic/mds/MemoryIndexInformationTest.java
0.804483
0.487063
MemoryIndexInformationTest.java
starcoder
package com.tomersela.lightex.runtime; import com.tomersela.lightex.types.ExpressionType; import com.tomersela.lightex.types.values.LightexValue; import java.text.MessageFormat; import java.util.Arrays; import static com.tomersela.lightex.types.ExpressionType.ANY; public class ArgumentsValidator { public stati...
src/main/java/com/tomersela/lightex/runtime/ArgumentsValidator.java
0.802942
0.42185
ArgumentsValidator.java
starcoder
package com.twu.biblioteca; import com.twu.biblioteca.managers.BibliotecaManager; import org.junit.Before; import org.junit.Test; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.List; import static org.junit.Assert.assertEquals; public class BookListTest { private ByteArrayOut...
test/com/twu/biblioteca/BookListTest.java
0.758689
0.404066
BookListTest.java
starcoder
package code.engine.graphics; import java.awt.image.BufferedImage; import code.engine.graphics.Font.FontChar; import code.engine.math.Vector2f; import code.engine.math.Vector4f; import code.engine.window.Window; public abstract class Renderer { public long window; public int height; public int width; abstract ...
LDEngine/src/code/engine/graphics/Renderer.java
0.594551
0.536799
Renderer.java
starcoder
package us.ihmc.ihmcPerception.fiducialDetector; import java.awt.image.BufferedImage; import javax.vecmath.Matrix3d; import javax.vecmath.Point3d; import javax.vecmath.Quat4d; import javax.vecmath.Vector3d; import boofcv.abst.fiducial.FiducialDetector; import boofcv.factory.fiducial.ConfigFiducialBinary; import boof...
IHMCPerception/src/us/ihmc/ihmcPerception/fiducialDetector/FiducialDetectorFromCameraImages.java
0.839306
0.578359
FiducialDetectorFromCameraImages.java
starcoder
package com.vladium.utils; // ---------------------------------------------------------------------------- /** * The main interface for exploring an object profile tree. See individual methods * for details. * * @see ObjectProfiler#profile(Object) * * @author (C) <a href="http://www.javaworld.com/columns/jw-q...
lru_cache/src/main/java/com/vladium/utils/IObjectProfileNode.java
0.90933
0.401864
IObjectProfileNode.java
starcoder
package publy.io.settings.legacy; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; import static org.junit.Assert.*; import org.junit.Test; import publy.data.PublicationStatus; import publy.data.category.OutputCategory; import publy.data...
test/publy/io/settings/legacy/SettingsReaderV0_8Test.java
0.791821
0.422237
SettingsReaderV0_8Test.java
starcoder
package de.hybris.platform.sap.productconfig.frontend.util; import de.hybris.platform.sap.productconfig.facades.CsticData; import de.hybris.platform.sap.productconfig.facades.CsticStatusType; import de.hybris.platform.sap.productconfig.facades.CsticValueData; import de.hybris.platform.sap.productconfig.facades.GroupSt...
core-customize/hybris/bin/custom/yb2bacceleratorstorefront/web/addonsrc/ysapproductconfigaddon/de/hybris/platform/sap/productconfig/frontend/util/CSSClassResolver.java
0.736116
0.412826
CSSClassResolver.java
starcoder
package edu.sdsc.mmtf.spark.interactions; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; import org.apache.spark.sql.SparkSession; import org.rcsb.mmtf.api.S...
src/main/java/edu/sdsc/mmtf/spark/interactions/GroupInteractionExtractor.java
0.932798
0.415788
GroupInteractionExtractor.java
starcoder
package com.indix.mlflow_gocd.utils; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class Lists { public static <T, K> void foreach(List<T> originalList, Function<T, Void> function) { for (T item : originalList) { function.appl...
material/src/main/java/com/indix/mlflow_gocd/utils/Lists.java
0.774242
0.483344
Lists.java
starcoder
package com.google.privacy.differentialprivacy.example; import java.time.DayOfWeek; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; /** * Static utils that bo...
examples/java/ContributionBoundingUtils.java
0.722429
0.460895
ContributionBoundingUtils.java
starcoder
package androidx.paging; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.common.util.concurrent.ListenableFuture; import java.util.List; /** * Incremental data loader for paging keyed content, where loaded content uses previously loaded * items as input to future loads. ...
paging/common/src/main/java/androidx/paging/ListenableItemKeyedDataSource.java
0.903747
0.454714
ListenableItemKeyedDataSource.java
starcoder
package nsga2; import java.util.ArrayList; import java.util.List; import java.util.Random; public class Generation { private int populationSize; private Population existingPopulation; // Corresponds to Pt private Population population; // Corresponds to P(t+1) private List<Individual> matingPool; private List...
src/nsga2/Generation.java
0.662578
0.477371
Generation.java
starcoder
package gov.sandia.cognition.learning.performance.categorization; import gov.sandia.cognition.learning.data.DefaultTargetEstimatePair; import gov.sandia.cognition.learning.data.DefaultWeightedTargetEstimatePair; import gov.sandia.cognition.learning.data.TargetEstimatePair; import gov.sandia.cognition.util.Pair; import...
Components/LearningCore/Test/gov/sandia/cognition/learning/performance/categorization/DefaultBinaryConfusionMatrixTest.java
0.838316
0.404125
DefaultBinaryConfusionMatrixTest.java
starcoder
package com.moonymango.snare.physics; import com.moonymango.snare.ui.scene3D.BaseCamera; import com.moonymango.snare.util.MatrixAF; public class SimpleCylinderBoundingVolume extends BaseSimpleBoundingVolume { private AxisOrientation mOrientation = AxisOrientation.Y; private float mRadius = 1; private flo...
snare/src/main/java/com/moonymango/snare/physics/SimpleCylinderBoundingVolume.java
0.91292
0.513729
SimpleCylinderBoundingVolume.java
starcoder
package com.brainy.command.http; import com.brainy.Session; import com.brainy.MessageObject; import com.brainy.NodeEvent; import com.brainy.command.CommandNode; import com.brainy.net.Hook; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; impor...
src/main/java/com/brainy/command/http/GoogleCommandNode.java
0.601945
0.46721
GoogleCommandNode.java
starcoder
import java.lang.Math; public class PoseComparison { int num_poses; PoseComparison(){ this.num_poses = 1; } /** * Function for comparing the pose. * * @param angle_list Specify the angles of the various body parts in the * following order: left hand, righ...
code/PoseComparison.java
0.781289
0.516839
PoseComparison.java
starcoder
package org.apache.spark.sql.catalyst.expressions.aggregate; /** * Compute the covariance between two expressions. * When applied on empty data (i.e., count is zero), it returns NULL. */ public abstract class Covariance extends org.apache.spark.sql.catalyst.expressions.aggregate.DeclarativeAggregate implements org.a...
sql/catalyst/target/java/org/apache/spark/sql/catalyst/expressions/aggregate/Covariance.java
0.832747
0.471527
Covariance.java
starcoder
package net.falappa.utils; import java.awt.geom.Point2D; /** * Utility class for working with GIS related stuff. * <p> * Includes static methods for manipulating and converting lists of coordinates, a geodetic distance routine, etc. */ public final class GisUtils { /** * Private constructor to prevent i...
af-toolkit/src/main/java/net/falappa/utils/GisUtils.java
0.771327
0.513607
GisUtils.java
starcoder
package com.jiggawatt.jt.oddl; import org.junit.Test; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.*; import static org.junit.Assert.assertEquals; public class ODDLReaderTest { // custom structures //======================================================================...
test/com/jiggawatt/jt/oddl/ODDLReaderTest.java
0.877556
0.543893
ODDLReaderTest.java
starcoder
package us.ihmc.ekf.filter.sensor.implementations; import java.util.ArrayList; import java.util.List; import org.ejml.data.DMatrix1Row; import org.ejml.data.DMatrixRMaj; import org.ejml.dense.row.CommonOps_DDRM; import us.ihmc.ekf.filter.FilterTools; import us.ihmc.ekf.filter.RobotState; import us.ihmc.ekf.filter.se...
src/main/java/us/ihmc/ekf/filter/sensor/implementations/BodyVelocitySensor.java
0.936044
0.616965
BodyVelocitySensor.java
starcoder
package ru.job4j.condition; import static java.lang.Math.sqrt; /** * Вычисляет площадь треугольника по формуле Герона. * Треугольник образуется соединением отрезками трех точек, не лежащих на одной прямой. * При этом точки называются вершинами треугольника, а отрезки - его сторонами. * Площадь тругольника по форму...
chapter_001/src/main/java/ru/job4j/condition/Triangle.java
0.573678
0.536252
Triangle.java
starcoder
package gov.sandia.cognition.math.matrix.mtj; import gov.sandia.cognition.math.matrix.Matrix; import gov.sandia.cognition.math.matrix.MatrixFactory; import java.util.Random; /** * An {@code MatrixFactory} that produces {@code DiagonalMatrixMTJ} matrices. * * @author <NAME> * @since 2.1 */ public class DiagonalM...
Components/CommonCore/Source/gov/sandia/cognition/math/matrix/mtj/DiagonalMatrixFactoryMTJ.java
0.968886
0.680148
DiagonalMatrixFactoryMTJ.java
starcoder
package com.kiancross.mandelbrot; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import javafx.scene.paint.Color; /** * Manages the creation of the mandelbrot image, allowing parame...
src/main/java/com/kiancross/mandelbrot/ImageGenerator.java
0.964839
0.468973
ImageGenerator.java
starcoder
package org.orekit.utils; import java.util.NavigableSet; import java.util.TreeSet; import java.util.function.Consumer; import org.orekit.time.AbsoluteDate; import org.orekit.time.ChronologicalComparator; import org.orekit.time.TimeStamped; /** Container for objects that apply to spans of time. * <p> * Time span ma...
src/main/java/org/orekit/utils/TimeSpanMap.java
0.95025
0.62912
TimeSpanMap.java
starcoder
package com.pump.geom; import java.awt.geom.GeneralPath; /** * This writes path data to an underlying <code>GeneralPath</code>. * <P> * This also omits redundant path information, such as two consecutive calls to * lineTo() that go to the same point. * <P> * Also this is safe to make several consecutive calls t...
src/main/java/com/pump/geom/GeneralPathWriter.java
0.844537
0.450843
GeneralPathWriter.java
starcoder
package linkedlist; import java.util.Objects; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; public class Node<T> { private Node<T> next; private T data; public Node(Node<T> head, T data) { this.next = head; this.data = data; } public Node(T da...
data-structure/src/main/java/linkedlist/Node.java
0.756627
0.485173
Node.java
starcoder
* MuhaiGenerator * Code-Beispiel zum Buch Patterns Kompakt, Verlag Springer Vieweg * Copyright 2014 <NAME> * * 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...
src/main/java/de/calamanari/pk/muhai/MuhaiGenerator.java
0.899641
0.447581
MuhaiGenerator.java
starcoder
package org.odata4j.edm; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import org.odata4j.core.ImmutableList; /** * A CSDL Schema element. * * <p>The Schema element is the root element of a conceptual model definition. It contains definitions * for the o...
src/main/java/org/odata4j/edm/EdmSchema.java
0.854672
0.432063
EdmSchema.java
starcoder
package com.bn.csgStruct; import android.opengl.Matrix; import com.bn.Main.Constant; import java.util.List; public class Bound { public float xMax; public float xMin; public float yMax; public float yMin; public float zMax; public float zMin; public Bound(Vector3f p1, Vector3f p2, Ve...
app/src/main/java/com/bn/csgStruct/Bound.java
0.558086
0.458652
Bound.java
starcoder
public class xxx { protected Pair<List<Long>, Map<Long, Double>> listClustersByCapacity(long id, int requiredCpu, long requiredRam, ExcludeList avoid, boolean isZone) { //look at the aggregate available cpu and ram per cluster //although an aggregate value may be false indicator that a cluster can h...
LACCPlus/Cloudstack/2553_2.java
0.572125
0.426859
2553_2.java
starcoder
package net.es.oscars.topo.beans; import lombok.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import javax.persistence.Embeddable; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @Data @NoArgsConstructor @AllArgsConstructor @Builder @Embeddable...
backend/src/main/java/net/es/oscars/topo/beans/IntRange.java
0.754282
0.406567
IntRange.java
starcoder
package assignment6; /** * Project6_Tickets * Created by <NAME> on Apr 2016. */ public class Seat implements Comparable<Seat> { private int seatNumber; private String rowLetter; private String seatNo; private boolean isAvailable = true; /** * Creates a default seat with row letter, cha...
Project6_Tickets/src/assignment6/Seat.java
0.910336
0.401043
Seat.java
starcoder
package main.com.huburt.list; /** * 在链表类中实现这些功能: * get(index):获取链表中第 index 个节点的值。如果索引无效,则返回-1。 * addAtHead(val):在链表的第一个元素之前添加一个值为 val 的节点。插入后,新节点将成为链表的第一个节点。 * addAtTail(val):将值为 val 的节点追加到链表的最后一个元素。 * addAtIndex(index,val):在链表中的第 index 个节点之前添加值为 val 的节点。如果 index 等于链表的长度,则该节点将附加到链表的末尾。如果 index 大于链表长度,则不会插入节点。 *...
src/main/com/huburt/list/MyLinkedList.java
0.532425
0.489259
MyLinkedList.java
starcoder
package org.lwjgl.opengl; /** * Native bindings to the <a href="http://www.opengl.org/registry/specs/EXT/texture_snorm.txt">EXT_texture_snorm</a> extension. * * <p>Fixed-point textures in unextended OpenGL have integer components, but those values are taken to represent floating-point values in the range * [0.0,1...
04lwjgl/code/lwjgl/org/lwjgl/opengl/EXTTextureSnorm.java
0.83868
0.428592
EXTTextureSnorm.java
starcoder
package com.github.panpf.tools4j.ranges; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** * Range tool method */ @SuppressWarnings("ManualMinMaxCalculation") public class Rangex { private Rangex() { } /* ******************************************* Byte Range **...
tools4j-ranges/src/main/java/com/github/panpf/tools4j/ranges/Rangex.java
0.839898
0.458894
Rangex.java
starcoder
import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.NoSuchElementException; /** * Implementation of a Binary Search Tree. * The tree holds Node objects that have key,value structure. */ public class BSTree<T> implements IDupTree<T> { private BSTNode root; //BST T...
BSTree/BSTree.java
0.752922
0.419886
BSTree.java
starcoder
package JavaFXPathElements; import LetterTamplates.Templateletter; import javafx.geometry.Point2D; import javafx.scene.shape.CubicCurveTo; //C (absolute) //c (relative) //curveto (x1 y1 x2 y2 x y)+ //Draws a cubic Bézier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning //of...
src/JavaFXPathElements/MySVGCubicCurveTo.java
0.641759
0.491761
MySVGCubicCurveTo.java
starcoder
package api.web.gw2.mapping.core; /** * The dimensions of the map, given as the coordinates of the lower-left (SW) and upper-right (NE) corners. * @author <NAME> * @see MapRect */ public final class MapBounds { /** * The empty singleton instance. */ private static final MapBounds EMPTY = new Map...
src/api/web/gw2/mapping/core/MapBounds.java
0.972688
0.512571
MapBounds.java
starcoder
package javax.accessibility; import java.awt.Rectangle; /** * The {@code AccessibleExtendedText} interface contains additional methods not * provided by the {@code AccessibleText} interface. * <p> * Applications can determine if an object supports the * {@code AccessibleExtendedText} interface by first obtaining...
src/jdk14-source/java.desktop/javax/accessibility/AccessibleExtendedText.java
0.935663
0.412412
AccessibleExtendedText.java
starcoder
package edu.berkeley.cs.succinct.buffers; import edu.berkeley.cs.succinct.StorageMode; import edu.berkeley.cs.succinct.SuccinctTable; import edu.berkeley.cs.succinct.util.container.Range; import java.io.DataInputStream; import java.nio.ByteBuffer; import java.util.*; public class SuccinctTableBuffer extends Succinct...
spark/src/main/java/edu/berkeley/cs/succinct/buffers/SuccinctTableBuffer.java
0.905852
0.493287
SuccinctTableBuffer.java
starcoder
package com.spikhalskiy.futurity; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; public final class Futurity { private Futurity() {} /** * Wrap a {@code future} with a {@link CompletableFuture} using common settings.<br> * Co...
futurity-core/src/main/java/com/spikhalskiy/futurity/Futurity.java
0.922857
0.616099
Futurity.java
starcoder
package com.wildbeeslabs.sensiblemetrics.diffy.generator.interfaces; import com.wildbeeslabs.sensiblemetrics.diffy.generator.service.Generator; import com.wildbeeslabs.sensiblemetrics.diffy.generator.service.SourceOfRandomness; import java.lang.reflect.Field; import java.lang.reflect.Parameter; /** * An access poin...
generator/src/main/java/com/wildbeeslabs/sensiblemetrics/diffy/generator/interfaces/Generators.java
0.9064
0.495911
Generators.java
starcoder
package com.android.server.wifi.util; import android.annotation.Nullable; import java.util.Collection; import java.util.Objects; /** * Copied over from frameworks/base/core/java/com/android/internal/util/ArrayUtils.java */ public class ArrayUtils { private ArrayUtils() { /* cannot be instantiated */ } /**...
Android/android-30/android30_code_view/src/com/company/source/com/android/server/wifi/util/ArrayUtils.java
0.933302
0.540378
ArrayUtils.java
starcoder
package com.theicenet.cryptography.keyagreement; import com.theicenet.cryptography.keyagreement.pake.srp.v6a.SRP6ServerValuesB; /** * A SRP6ServerService instance is a component which implements the required to support * the server end to verify a client's sign in using SRP6 v6a protocol * * @see <a href="https:/...
theicenet-cryptography-module/src/main/java/com/theicenet/cryptography/keyagreement/SRP6ServerService.java
0.897215
0.401131
SRP6ServerService.java
starcoder
package ch.epfl.dlab.quootstrap; import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; /** * This class defines a pattern used for representing regular expressions. * In this context, a valid regular e...
quootstrap/src/main/java/ch/epfl/dlab/quootstrap/Pattern.java
0.899387
0.429071
Pattern.java
starcoder
import java.math.BigInteger; import java.util.Arrays; import java.util.HashSet; import java.util.Set; public class Problem62 { /** * Data variables to store cube of numbers as per the length of the cube number */ private static Set<String> threeDigit = new HashSet<>(); private static Set<String>...
Problem 62/Problem62.java
0.902565
0.613815
Problem62.java
starcoder
package cc.mallet.util.search; import java.util.Iterator; import java.util.logging.Logger; import cc.mallet.util.MalletLogger; /** * Created by IntelliJ IDEA. * User: pereira * Date: Jun 19, 2005 * Time: 1:38:28 PM * A* search iterator over an underlying graph. The iterator returns * search nodes for final st...
src/cc/mallet/util/search/AStar.java
0.822368
0.454775
AStar.java
starcoder
package main.game_objects; /** * GameObject is the abstract base class for all game objects. * This class encapsulates the icon in character and the {@link Position} of a game object. * * @author kphilemon */ public abstract class GameObject { private final char icon; private Position position; /** ...
src/main/game_objects/GameObject.java
0.956624
0.422505
GameObject.java
starcoder
package autocomplete.dna; import java.util.AbstractCollection; import java.util.Iterator; /** * Generates all (<i>length - 1</i>) suffixes of the given sequence of characters and presents them in a collection. */ class SuffixCollection extends AbstractCollection<CharSequence> { private final CharSequence data; ...
src/autocomplete/dna/SuffixCollection.java
0.935243
0.537223
SuffixCollection.java
starcoder
package com.lqb.leetcode.mark; import org.junit.Test; import java.util.Arrays; /** * 给定一些标记了宽度和高度的信封,宽度和高度以整数对形式 (w, h) 出现。 * 当另一个信封的宽度和高度都比这个信封大的时候,这个信封就可以放进另一个信封里,如同俄罗斯套娃一样。 * 请计算最多能有多少个信封能组成一组“俄罗斯套娃”信封(即可以把一个信封放到另一个信封里面)。 * * 说明: * 不允许旋转信封。 * * 示例: * * 输入: envelopes = [[5,4},[6,4},[6,7},[2,3]] * 输出: 3 ...
src/com/lqb/leetcode/mark/RussianDollEnvelopes.java
0.642657
0.407216
RussianDollEnvelopes.java
starcoder
package edu.uiowa.cs.clc.kind2.lustre; import java.util.ArrayList; import java.util.List; import edu.uiowa.cs.clc.kind2.Assert; /** * This class provides helper functions for constructing a lustre program. */ public class ProgramBuilder { private List<TypeDef> types = new ArrayList<>(); private List<Constant> c...
src/main/java/edu/uiowa/cs/clc/kind2/lustre/ProgramBuilder.java
0.88521
0.422922
ProgramBuilder.java
starcoder
package org.elkoserver.json; import java.util.HashMap; import java.util.Map; import java.util.Set; /** * A parsed JSON object. * * This class represents a JSON object that has been received or is being * constructed. It provides random access to the properties of the object. */ public class JSONObject { /**...
ServerCore/java/org/elkoserver/json/JSONObject.java
0.943478
0.466785
JSONObject.java
starcoder
package artisynth.core.modelbase; /** * Interface for a model component that can contain state and can save and * restore this state to a ComponentState object. */ public interface HasState { /** * Set the state of this component. * * @param state * state to be copied * @throws IllegalArgum...
src/artisynth/core/modelbase/HasState.java
0.863751
0.525673
HasState.java
starcoder
package com.monotonic.digits.parser; import org.antlr.v4.runtime.tree.ParseTreeVisitor; /** * This interface defines a complete generic visitor for a parse tree produced * by {@link DigitsParser}. * * @param <T> The return type of the visit operation. Use {@link Void} for * operations with no return type. */ pub...
app/gen/com/monotonic/digits/parser/DigitsParserVisitor.java
0.878588
0.52074
DigitsParserVisitor.java
starcoder
package ca.waterloo.dsg.graphflow.storage.graph.adjlistindex.defaultadjlistindex.iterators; import ca.waterloo.dsg.graphflow.storage.graph.Graph; import ca.waterloo.dsg.graphflow.storage.graph.Graph.Direction; import ca.waterloo.dsg.graphflow.tuple.value.flat.NodeVal; public abstract class DefaultAdjListSliceNodeIter...
GF-RV/src/main/java/ca/waterloo/dsg/graphflow/storage/graph/adjlistindex/defaultadjlistindex/iterators/DefaultAdjListSliceNodeIterator.java
0.670824
0.421611
DefaultAdjListSliceNodeIterator.java
starcoder
package org.openstreetmap.atlas.geography.atlas.change; import java.util.Map; import java.util.Set; import java.util.function.Function; import org.openstreetmap.atlas.geography.PolyLine; import org.openstreetmap.atlas.geography.atlas.items.AtlasEntity; import org.openstreetmap.atlas.geography.atlas.items.Edge; import...
src/main/java/org/openstreetmap/atlas/geography/atlas/change/ChangeEdge.java
0.91091
0.438304
ChangeEdge.java
starcoder
public class BinarySearchRevertList { public int search(int[] nums, int target) { if (nums == null) { return -1; } return searchStep(nums, 0, nums.length - 1, target); } private int searchStep(int[] nums, int left, int right, int target) { if (left > right) { ...
leetcode/src/main/java/BinarySearchRevertList.java
0.689515
0.520801
BinarySearchRevertList.java
starcoder
package de.lmu.ifi.dbs.elki.math.statistics.distribution; import java.util.Random; import de.lmu.ifi.dbs.elki.utilities.optionhandling.OptionID; import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization; import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.DoubleParameter; import...
elki-0.7.5/sources/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/LogGammaDistribution.java
0.927351
0.463201
LogGammaDistribution.java
starcoder
package net.jolikit.bwd.api.graphics; import net.jolikit.lang.LangUtils; /** * A graphical transform, as a rotation multiple of 90 degrees, * plus an integer translation. * * The rotation is the one to obtain frame 2 orientation from frame 1, * and the translation is the position of frame 2 origin in frame 1. ...
src/main/java/net/jolikit/bwd/api/graphics/GTransform.java
0.947998
0.738186
GTransform.java
starcoder
package ca.phon.orthography; /** * A word in an orthographic phrase. * Words may have prefix and/or suffix * codes. */ public class OrthoWord extends AbstractOrthoElement { private final WordPrefix prefix; private final WordSuffix suffix; private final UntranscribedType untranscribed; private final St...
orthography/src/main/java/ca/phon/orthography/OrthoWord.java
0.787605
0.420064
OrthoWord.java
starcoder
package com.koodipuukko.twintilt; import android.util.Log; public class Quad { private static final String TAG = "Twintilt"; // Game tag in logs private static final boolean DEBUG = false; private int textureId = 0; // texture id to be used in rendering private Buffers buffers = new Buffers(); //...
twintilt/app/src/main/java/com/koodipuukko/twintilt/Quad.java
0.904428
0.458349
Quad.java
starcoder
package net.jgp.labs.spark.l600_ml.l100_spark_distributions; // $example on$ import java.util.Arrays; import org.apache.spark.ml.linalg.Vector; import org.apache.spark.ml.linalg.Vectors; import org.apache.spark.ml.regression.GeneralizedLinearRegression; import org.apache.spark.ml.regression.GeneralizedLinearRegressio...
src/main/java/net/jgp/labs/spark/l600_ml/l100_spark_distributions/GeneralizedLinearRegressionApp.java
0.836955
0.474936
GeneralizedLinearRegressionApp.java
starcoder
package org.schmivits.dynonskyview; import java.lang.reflect.Field; import junit.framework.TestCase; public class FormatTest extends TestCase { private void assertFloatEquals(String msg, float expected, float actual) { float error = (actual - expected) / expected; if (error > 0.0001f) { fail(msg + "...
DynonSkyviewFormatTest/src/org/schmivits/dynonskyview/FormatTest.java
0.752013
0.428592
FormatTest.java
starcoder
package org.kynosarges.tektosyne.geometry; /** * Specifies the shifting of rows or columns in a {@link PolygonGrid}. * Valid choices depend on the underlying {@link RegularPolygon}. Specifies how * even-numbered rows or columns are shifted, relative to odd-numbered ones. For * this purpose, counting starts a...
tektosyne/src/main/java/org/kynosarges/tektosyne/geometry/PolygonGridShift.java
0.938294
0.711055
PolygonGridShift.java
starcoder
package dev.thatcherclough.stegembed; import java.util.Random; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class ImageUtils { /** * Gets matrix of pixels from image with name {@link file}. * * @param file name of image * @return ...
src/main/java/dev/thatcherclough/stegembed/ImageUtils.java
0.930946
0.410461
ImageUtils.java
starcoder
package dawj.ch06; import org.apache.commons.math3.linear.*; public class Example5 { static double[] x = {10, 9, 12, 10, 9, 10, 8, 11}; static double[] y = {59, 57, 61, 52, 48, 55, 51, 62}; static double[] z = {71, 68, 76, 56, 57, 77, 55, 67}; static int n = z.length; // 8 public sta...
_src/Chapter06/Example5.java
0.599133
0.54577
Example5.java
starcoder
package com.opengamma.strata.examples.blog.multicurve1; import static com.opengamma.strata.product.swap.type.FixedIborSwapConventions.GBP_FIXED_6M_LIBOR_6M; import java.time.LocalDate; import java.time.Period; import java.util.Arrays; import java.util.Map; import com.opengamma.strata.basics.ReferenceData; import com...
examples/src/main/java/com/opengamma/strata/examples/blog/multicurve1/CalibrationPVPerformanceExample.java
0.782205
0.61581
CalibrationPVPerformanceExample.java
starcoder
package com.matthewmichelotti.collider; import com.matthewmichelotti.collider.geom.Shape; import com.matthewmichelotti.collider.geom.Vec2d; /** * Description of position, shape, and velocities of a hitbox * used for testing collision with other HitBoxes. * Methods for creating HitBoxes can be found in the {@link C...
collider/src/main/java/com/matthewmichelotti/collider/Hitbox.java
0.746416
0.513912
Hitbox.java
starcoder
package net.ssehub.kernel_haven.pss_divergence_detector.divergences; import java.util.Collection; import java.util.HashSet; import java.util.Set; import net.ssehub.kernel_haven.code_model.CodeElement; import net.ssehub.kernel_haven.code_model.SourceFile; import net.ssehub.kernel_haven.util.io.ITableRow; import net.ss...
src/net/ssehub/kernel_haven/pss_divergence_detector/divergences/Divergence.java
0.931447
0.5144
Divergence.java
starcoder
package io.github.imsejin.common.assertion.primitive; import io.github.imsejin.common.assertion.Asserts; import io.github.imsejin.common.assertion.object.AbstractObjectAssert; import java.math.BigDecimal; import java.math.BigInteger; import java.util.Objects; public class NumberAssert< SELF extends NumberAss...
src/main/java/io/github/imsejin/common/assertion/primitive/NumberAssert.java
0.933188
0.606819
NumberAssert.java
starcoder
package entities; import java.util.ArrayList; import java.util.List; /** * Represents the week planning of an employee * @author Vavou * */ public class WeekSchedule { // The begining hour of the employee in the week private double beginHour; // The remaining hours of the employee private double remainingH...
src/main/java/entities/WeekSchedule.java
0.835215
0.511839
WeekSchedule.java
starcoder
package com.heretere.hac.core.util.math.vector; import org.jetbrains.annotations.NotNull; /** * This vector is completely mutable and represents a point in 2d space. */ public final class MutableVector2F { /** * The x location in 2d space. */ private float x; /** * The y location in 2d sp...
hac-core/core-proxy/src/main/java/com/heretere/hac/core/util/math/vector/MutableVector2F.java
0.94766
0.761317
MutableVector2F.java
starcoder
package cz.tomkren.utils; import net.fishtron.utils.Checker; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.BiFunction; import java.util.function.Function; /** * Vector čísel pro vektorový operace na číslech.. */ public class Vec { public static void main...
src/main/java/cz/tomkren/utils/Vec.java
0.518302
0.42937
Vec.java
starcoder
import java.util.Arrays; public class CircularQueue<E> { private static final int DEFAULT_CAPACITY = 4; private int size; private int capacity; private E[] arr; private int startIndex; private int endIndex; @SuppressWarnings("unchecked") public CircularQueue() { this.capacity...
src/main/java/CircularQueue.java
0.853608
0.404625
CircularQueue.java
starcoder
package com.kcwongjoe.joelib; import java.util.List; public class JMathUtils { // region Max /** * Max * * @param array Array * @return Return max */ public static int max(int[] array) { // Exception if (array == null) throw new NullPointerException("arry can't be null."); if (array.length =...
joelib/src/main/java/com/kcwongjoe/joelib/JMathUtils.java
0.84891
0.493103
JMathUtils.java
starcoder
package org.apache.beam.sdk.util.common; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.base.Strings; import java.util.concurrent.atomic.AtomicReference; /** * The name of a counter identifies the user-specified name, as well as the origin, * the step the counter is asso...
sdks/java/core/src/main/java/org/apache/beam/sdk/util/common/CounterName.java
0.926295
0.414958
CounterName.java
starcoder
package org.apache.spark.sql.delta.storage; /** * General interface for all critical file system operations required to read and write the * {@link DeltaLog}. The correctness of the {@link DeltaLog} is predicated on the atomicity and * durability guarantees of the implementation of this interface. Specifically, * <...
delta/target/java/org/apache/spark/sql/delta/storage/LogStore.java
0.934932
0.467149
LogStore.java
starcoder
package org.apache.geode.internal.cache.eviction; import static org.apache.geode.distributed.ConfigurationProperties.OFF_HEAP_MEMORY_SIZE; import static org.assertj.core.api.Assertions.assertThat; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Map; import org.junit.Befo...
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/eviction/EvictionIntegrationTest.java
0.749087
0.466663
EvictionIntegrationTest.java
starcoder
package org.afree.chart; import org.afree.graphics.PaintType; import org.afree.graphics.SolidColor; import android.graphics.Color; /** * Class to extend the number of Colors available to the charts. This extends * the java.awt.Color object and extends the number of final Colors publically * accessible. */ public ...
afreechart/src/main/java/org/afree/chart/ChartColor.java
0.808332
0.460289
ChartColor.java
starcoder
package jsat.classifiers.linear; import jsat.SingleWeightVectorModel; import jsat.classifiers.BaseUpdateableClassifier; import jsat.classifiers.CategoricalData; import jsat.classifiers.CategoricalResults; import jsat.classifiers.DataPoint; import jsat.distributions.Normal; import jsat.exceptions.FailedToFitException; ...
jsat/src/main/java/jsat/classifiers/linear/SCW.java
0.939796
0.563558
SCW.java
starcoder
package ru.codebattle.client.api; import lombok.AllArgsConstructor; import lombok.Data; import java.util.Objects; @AllArgsConstructor @Data public class BoardPoint { private int x; private int y; public static BoardPoint of(int x, int y) { return new BoardPoint(x, y); } public static Bo...
src/main/java/ru/codebattle/client/api/BoardPoint.java
0.916883
0.404155
BoardPoint.java
starcoder
package ncsa.hdf.object; import java.util.List; /** * Datatype is an abstract class that defines datatype characteristics and APIs * for a data type. * <p> * A datatype has four basic characteristics: class, size, byte order and sign. * These charactertics are defeined in the <a * href="http://hdfgroup.org/HDF5...
src/main/java/ncsa/hdf/object/Datatype.java
0.877785
0.429908
Datatype.java
starcoder
package com.epi; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; public class MaximumSubarrayInCircularArray { // @include public static int maxSubarraySumInCircular(List<Integer> A) { return Math.max(findMaxSubarray(A), findCircularMaxSubarray(A)); ...
java/src/main/java/com/epi/MaximumSubarrayInCircularArray.java
0.908196
0.499146
MaximumSubarrayInCircularArray.java
starcoder
package gov.dot.fhwa.saxton.carma.geometry.geodesic; /** * A point in the WGS-84 coordinate system. A location has a latitude, longitude, and altitude. */ public class Location { protected double latitude; protected double longitude; protected double altitude; // As radians (updated in setter functions); p...
carmajava/geometry/src/main/java/gov/dot/fhwa/saxton/carma/geometry/geodesic/Location.java
0.946399
0.643581
Location.java
starcoder
package alphabet; import static org.junit.Assert.*; import java.util.ArrayList; import java.util.Collection; import java.util.TreeSet; import org.junit.Before; import org.junit.Test; import symbol.Symbol; /** * <h2>AlphabetTest</h2> * * @author <NAME> * @company University Of La Laguna * @date 17/10/2018 ...
src/alphabet/AlphabetTest.java
0.778733
0.476032
AlphabetTest.java
starcoder
package org.springframework.integration.ip.dsl; import java.util.function.Function; import org.springframework.messaging.Message; /** * Factory methods for UDP. * * @author <NAME> * * @since 5.0 * */ public final class Udp { private Udp() { } /** * Create an inbound unicast channel adapter using the su...
spring-integration-ip/src/main/java/org/springframework/integration/ip/dsl/Udp.java
0.88199
0.446857
Udp.java
starcoder
package com.jetbrains.ther.parser; import com.intellij.testFramework.ParsingTestCase; import com.intellij.testFramework.TestDataPath; import com.jetbrains.ther.parsing.TheRParserDefinition; @TestDataPath("/testData/psi/") public class TheRParsingTest extends ParsingTestCase { private static final String DATA_PATH =...
test/com/jetbrains/ther/parser/TheRParsingTest.java
0.777258
0.414958
TheRParsingTest.java
starcoder
package com.opencsv.validators; import com.opencsv.exceptions.CsvValidationException; import java.util.function.Function; /** * This validator is best used to validate a specific property of the row - either about a specific * element or information about the array itself. * <p>An empty or null first row is consi...
src/main/java/com/opencsv/validators/RowFunctionValidator.java
0.910501
0.453141
RowFunctionValidator.java
starcoder
package org.wycliffeassociates.usfmtools; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.wycliffeassociates.usfmtools.models.ConvertToMarkerResult; import org.wycliffeassociates.usfmtools.models.markers.*; import tangible.StringHelper; /** * Parses a USFM file into a ...
src/main/java/org/wycliffeassociates/usfmtools/USFMParser.java
0.789802
0.438304
USFMParser.java
starcoder
package info.rlwhitcomb.heart; /** * Demonstration program to use bitmaps to display character pictures. * Inspired by a question I answered on Quora: * <a href="https://www.quora.com/I-have-to-use-6-rows-and-7-columns-for-a-heart-pattern-in-Java-programming-Can-you-help-me">I have to use 6 rows and 7 columns for a...
java/info/rlwhitcomb/heart/Heart.java
0.838548
0.650467
Heart.java
starcoder
package com.orientechnologies.teleporter.model.graphmodel; import java.util.List; /** * It represents an Orient class of a specific type that extends the Orient Edge Class. It's a * simple edge-type in the graph model. * * @author <NAME> * @email <g.ponzi--at--orientdb.com> */ public class OEdgeType extends OEl...
src/main/java/com/orientechnologies/teleporter/model/graphmodel/OEdgeType.java
0.891031
0.567517
OEdgeType.java
starcoder
package sim.util; import java.util.Arrays; import java.util.stream.IntStream; public class DoublePoint extends NdPoint { private static final long serialVersionUID = 1L; public final double[] c; public DoublePoint(final double c[]) { super(c.length); this.c = Arrays.copyOf(c, nd); } public DoublePoint(fin...
contrib/distributed/src/main/java/sim/util/DoublePoint.java
0.696784
0.810929
DoublePoint.java
starcoder
package model; /** * Word.java - A model of a word. Contains the {@link String} definition, the {@link String} word and it's {@link * WordPlacement}. * * @author - <NAME> * @version - 14/Feb/2017 */ public class Word implements Comparable { /** The {@link String} that this word represents. Loaded from a {@lin...
src/model/Word.java
0.927486
0.509459
Word.java
starcoder
package hr.fer.zemris.java.raytracer; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.function.Consumer; import hr.fer.zemris.java.raytracer.model.GraphicalObject; import hr.fer.zemris.java.raytracer.model.LightSource; import hr.fer.zemris.java.raytracer.model.Point3D; imp...
Java/HW09/src/hr/fer/zemris/java/raytracer/Tracer.java
0.933089
0.402803
Tracer.java
starcoder
package com.obtuse.util; import java.io.Serializable; import java.util.*; /** * Provide a way to sort data while automatically dealing with duplicate keys. * Analogous to a {@link TreeMap} except that the key-value associates are one-to-many. * For example, a single tree sorter can contain both <tt>fred</tt>-><tt>...
src/com/obtuse/util/TreeSorter.java
0.943867
0.432363
TreeSorter.java
starcoder
package org.lingcloud.molva.ocl.util; import java.io.Serializable; import java.util.Locale; import org.apache.oro.text.perl.Perl5Util; /** * This class contains basic methods for performing validations. */ public class GenericValidator implements Serializable { private static final long serialVersionUID = -450670...
common/tags/lingcloud-common-0.8/src/ocl/org/lingcloud/molva/ocl/util/GenericValidator.java
0.926694
0.428592
GenericValidator.java
starcoder
package gov.sandia.cognition.learning.function.vector; import gov.sandia.cognition.math.matrix.Vector; import gov.sandia.cognition.math.matrix.VectorFactory; import java.util.Random; import junit.framework.TestCase; /** * Unit tests for class SubVectorEvaluator. * * @author <NAME> * @since 3.0 */ public class...
Components/LearningCore/Test/gov/sandia/cognition/learning/function/vector/SubVectorEvaluatorTest.java
0.877464
0.557966
SubVectorEvaluatorTest.java
starcoder
package com.aspose.slides.examples.Charts; import com.aspose.slides.*; import com.aspose.slides.examples.Utils; import java.awt.*; public class ChartEntities { public static void main(String[] args) throws Exception { // The path to the documents directory. String dataDir = Utils.getDataDir(C...
Examples/src/main/java/com/aspose/slides/examples/Charts/ChartEntities.java
0.671255
0.412353
ChartEntities.java
starcoder
package main; import card.Card; import card.Rank; import card.Suit; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; /** * The class...
src/main/java/main/CribbageHand.java
0.944842
0.477493
CribbageHand.java
starcoder