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 mara.mybox.data;
import java.util.HashMap;
import java.util.Map;
import mara.mybox.tools.FloatTools;
import mara.mybox.value.AppValues;
/**
* @Author Mara
* @CreateDate 2021-10-4
* @License Apache License Version 2.0
*/
public class FloatStatistic {
private String name;
private int count;
pri... | released/MyBox/src/main/java/mara/mybox/data/FloatStatistic.java | 0.743447 | 0.485844 | FloatStatistic.java | starcoder |
package org.javainaction.sort;
import java.util.Arrays;
/**
* Implement heap sort
*
* Throughout the algorithm we are going to have two sub arrays one sorted and one not sorted.
* Idea is to build a heap and then move our (min/max) element to the end and sift down rest of the sub array to make
* them as a heap
... | src/main/java/org/javainaction/sort/HeapSort.java | 0.791821 | 0.493836 | HeapSort.java | starcoder |
package org.phoenix.leetcode.challenges;
import java.util.Comparator;
import java.util.PriorityQueue;
/**
* On an N x N grid, each square grid[i][j] represents the elevation at that point (i,j).
* <p>
* Now rain starts to fall. At time t, the depth of the water everywhere is t. You can swim from a square to anothe... | june-2021-leetcode-challenge/src/main/java/org/phoenix/leetcode/challenges/Problem20_SwimInRisingWater.java | 0.834778 | 0.489809 | Problem20_SwimInRisingWater.java | starcoder |
package net.hydromatic.morel.ast;
/** Visits syntax trees. */
public class Visitor {
/** For use as a method reference. */
protected <E extends AstNode> void accept(E e) {
e.accept(this);
}
// expressions
protected void visit(Ast.Literal literal) {
}
protected void visit(Ast.Id id) {
}
prote... | src/main/java/net/hydromatic/morel/ast/Visitor.java | 0.614163 | 0.522629 | Visitor.java | starcoder |
package facecat.topin.plot;
import facecat.topin.core.*;
import facecat.topin.chart.*;
/**
* 百分比线
*/
public class Percent extends FCPlot {
/**
* 创建百分比线
*/
public Percent() {
setPlotType("PERCENT");
}
/**
* 获取动作类型
*/
@Override
public ActionType getAction() {
... | facecat_java/src/facecat/topin/plot/Percent.java | 0.600188 | 0.405213 | Percent.java | starcoder |
package hive.helpers.pathfinding;
import hive.helpers.BoardState;
import hive.helpers.HexCoordinate;
import hive.helpers.Move;
import hive.helpers.Unit;
import hive.helpers.statevalidators.ContinuousContactValidator;
import hive.helpers.statevalidators.SingleSwarmValidator;
import hive.interfaces.Validatable;
import ... | src/main/java/hive/helpers/pathfinding/PathFinder.java | 0.902518 | 0.420005 | PathFinder.java | starcoder |
package org.apache.drill.exec.physical.impl.scan.v3.schema;
import org.apache.drill.common.exceptions.CustomErrorContext;
import org.apache.drill.exec.physical.impl.scan.v3.file.ImplicitColumnMarker;
import org.apache.drill.exec.physical.resultSet.ResultSetLoader;
import org.apache.drill.exec.physical.resultSet.impl.P... | exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/scan/v3/schema/ScanSchemaTracker.java | 0.904728 | 0.589687 | ScanSchemaTracker.java | starcoder |
package packt.java9.by.example.mastermind;
import java.util.Arrays;
/**
* One row on the table. It contains the guesses at position and also the
* number of matching colors and position.
*/
public class Row {
final Color[] positions;
protected int matchedPositions;
protected int matchedColors;
publ... | Module 1/Chapter04/src/main/java/packt/java9/by/example/mastermind/Row.java | 0.900149 | 0.490236 | Row.java | starcoder |
package org.apache.flink.statefun.flink.common.protopath;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
final class ProtobufPathParser {
private static final Pattern REPEATED_FIELD_PATTERN = Pattern.compile("(\\w+)\\[(\\d+)]");
private static fi... | statefun-flink/statefun-flink-common/src/main/java/org/apache/flink/statefun/flink/common/protopath/ProtobufPathParser.java | 0.923949 | 0.462473 | ProtobufPathParser.java | starcoder |
package com.mohanathas.spiffer.algorithm;
import com.mohanathas.spiffer.util.BinaryMinHeap;
import com.mohanathas.spiffer.util.DynamicArray;
import java.util.List;
/**
* PathFinder implementation of the Jump Point Search algorithm, which behaves similarly to A*
* except that it avoids traversing "unnecessary" neigh... | spiffer/src/main/java/com/mohanathas/spiffer/algorithm/JumpPointPathFinder.java | 0.879742 | 0.571886 | JumpPointPathFinder.java | starcoder |
package dk.itu.kelvin.model;
// Regex utilities
import java.util.regex.Matcher;
import java.util.regex.Pattern;
// I/O utilities
import java.io.Serializable;
// Utilities
import dk.itu.kelvin.util.StringPool;
/**
* Address class for recognising address patterns and parsing as objects.
*
* <p>
* The class define... | src/main/java/dk/itu/kelvin/model/Address.java | 0.908445 | 0.426979 | Address.java | starcoder |
package me.salturbone.rwg.noise_c;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.util.Vector;
import org.spongepowered.noise.module.source.Perlin;
/**
* Worm
*/
public class Worm {
public Location startPos;
... | src/me/salturbone/rwg/noise_c/Worm.java | 0.78316 | 0.469703 | Worm.java | starcoder |
package lambdas;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;
import java.util.logging.Logger;
import java.util.stream.IntStream;
import java.util.stream.Stream;
public class CompositionDemo {
private static i... | src/main/java/lambdas/CompositionDemo.java | 0.726717 | 0.50891 | CompositionDemo.java | starcoder |
package master.flame.danmaku.gl.glview.view;
import android.graphics.Bitmap;
import android.opengl.GLES20;
import android.opengl.Matrix;
import android.os.SystemClock;
import android.util.Log;
import java.util.concurrent.atomic.AtomicBoolean;
import master.flame.danmaku.gl.Constants;
import master.flame.danmaku.gl.g... | DanmakuFlameMaster/src/main/java/master/flame/danmaku/gl/glview/view/GLTextureImgProvider.java | 0.503174 | 0.417034 | GLTextureImgProvider.java | starcoder |
package com.splunk;
import java.io.File;
import java.util.Arrays;
import java.util.List;
/**
* The {@code Util} class contains string utilities.
*/
class Util {
/**
* Joins the strings in {@code joinees}, separated by {@code joiner}.
*
* For example, {@code list} contains the strings {@code "a"},... | splunk/com/splunk/Util.java | 0.898123 | 0.486454 | Util.java | starcoder |
package trading.economy;
import org.json.JSONObject;
import org.json.JSONException;
import trading.net.*;
//TODO: Consider renaming this class and its subclasses.
/**Abstract class representing a Listing for an unusual hat.<br>
Subclasses must override methods which provide a JSON representation for storage and a JS... | src/trading/economy/Listing.java | 0.637934 | 0.456531 | Listing.java | starcoder |
package org.apache.drill.exec.vector.accessor;
import org.apache.drill.exec.record.metadata.ColumnMetadata;
import org.apache.drill.exec.vector.accessor.ScalarWriter.ColumnWriterListener;
import org.apache.drill.exec.vector.accessor.TupleWriter.TupleWriterListener;
/**
* Represents a column within a tuple. A column ... | exec/vector/src/main/java/org/apache/drill/exec/vector/accessor/ObjectWriter.java | 0.945776 | 0.47591 | ObjectWriter.java | starcoder |
package us.ihmc.humanoidBehaviors.behaviors.complexBehaviors;
import javax.vecmath.Point2d;
import javax.vecmath.Point3d;
import us.ihmc.humanoidBehaviors.behaviors.complexBehaviors.WalkToPickObjectOffGroundLocationBehavior.WalkState;
import us.ihmc.humanoidBehaviors.behaviors.primitives.AtlasPrimitiveActions;
import... | IHMCHumanoidBehaviors/src/us/ihmc/humanoidBehaviors/behaviors/complexBehaviors/WalkToPickObjectOffGroundLocationBehavior.java | 0.821546 | 0.419529 | WalkToPickObjectOffGroundLocationBehavior.java | starcoder |
package tec.uom.se.quantity;
import java.util.Objects;
import javax.measure.Quantity;
import tec.uom.se.ComparableQuantity;
import tec.uom.se.spi.Range;
/**
* A Quantity Range is a pair of {@link Quantity} items that represent a range of values.
* <p>
* Range limits MUST be presented in the same scale and have t... | src/main/java/tec/uom/se/quantity/QuantityRange.java | 0.927256 | 0.460532 | QuantityRange.java | starcoder |
package org.openstack4j.api.compute;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
import java.util.HashMap;
import java.util.List;
import... | core-test/src/main/java/org/openstack4j/api/compute/ServerTests.java | 0.733833 | 0.428771 | ServerTests.java | starcoder |
package com.durafficpark.road;
import com.durafficpark.traffic.Car;
import org.json.simple.JSONObject;
import java.util.ArrayList;
// the distance to a specific node with the distance for it, start node is the node that holds this
public class Road {
private Node startNode; // the start node which the road begi... | src/main/java/com/durafficpark/road/Road.java | 0.782953 | 0.588416 | Road.java | starcoder |
package redstorm.autonomous;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import redstorm.Robot.Robot;
@Autonomous(name="TwoStoneBlueSide")
public class TwoStoneBlueSide extends LinearOpMode {
public Robot snacktime = new Robot(); //... | TeamCode/src/main/java/redstorm/autonomous/TwoStoneBlueSide.java | 0.594316 | 0.417568 | TwoStoneBlueSide.java | starcoder |
package JLexPHP.Utility;
import JLexPHP.Math.Accept;
import JLexPHP.Math.DTrans;
import JLexPHP.Math.SparseBitSet;
import JLexPHP.Spec;
import java.util.Vector;
public class Minimize {
Spec spec;
Vector <Vector <DTrans> > group;
int inGroup[];
public Minimize() {
reset();
}
/**... | src/JLexPHP/Utility/Minimize.java | 0.543833 | 0.421671 | Minimize.java | starcoder |
package us.ihmc.quadrupedRobotics.planning;
import us.ihmc.commons.MathTools;
import us.ihmc.euclid.referenceFrame.FramePoint3D;
import us.ihmc.euclid.referenceFrame.FramePose2D;
import us.ihmc.euclid.referenceFrame.FramePose3D;
import us.ihmc.euclid.referenceFrame.ReferenceFrame;
import us.ihmc.euclid.tuple3D.interfa... | ihmc-quadruped-robotics/src/main/java/us/ihmc/quadrupedRobotics/planning/QuadrupedXGaitPlanner.java | 0.869839 | 0.629063 | QuadrupedXGaitPlanner.java | starcoder |
package com.pump.showcase.chart;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*;
/**
* Given a span/range of numbers this identifies the tickmarks that should be
* used.
*/
public class BasicTickLabeler {
/**
*
* @param min
* The minimum of the range ... | src/main/java/com/pump/showcase/chart/BasicTickLabeler.java | 0.907723 | 0.451629 | BasicTickLabeler.java | starcoder |
package androidx.benchmark;
import android.util.Log;
import java.util.concurrent.TimeUnit;
/**
* Used to detect when a benchmark has warmed up, given time taken for each iteration.
*
* Uses emperically determined constants, primarily looking for the convergence of two
* exponential moving averages.
*
* Tuned t... | benchmark/src/main/java/androidx/benchmark/WarmupManager.java | 0.927372 | 0.413122 | WarmupManager.java | starcoder |
package org.nschmidt.ldparteditor.helper.composite3d;
import java.math.BigDecimal;
/**
* @author nils
*
*/
public class PathTruderSettings {
private BigDecimal maxPathSegmentLength = new BigDecimal(100000);
private BigDecimal transitionCurveControl = BigDecimal.TEN;
private BigDecimal transitionCurveC... | src/org/nschmidt/ldparteditor/helper/composite3d/PathTruderSettings.java | 0.854566 | 0.40987 | PathTruderSettings.java | starcoder |
package org.broadinstitute.hellbender.tools.coveragemodel.cachemanager;
import com.google.common.annotations.VisibleForTesting;
import org.broadinstitute.hellbender.tools.coveragemodel.cachemanager.ImmutableComputableGraphUtils.ImmutableComputableGraphBuilder;
import org.broadinstitute.hellbender.utils.Utils;
import ... | src/main/java/org/broadinstitute/hellbender/tools/coveragemodel/cachemanager/ImmutableComputableGraph.java | 0.94064 | 0.694293 | ImmutableComputableGraph.java | starcoder |
package org.eclipse.microprofile.fault.tolerance.tck.metrics.util;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.instanceOf;
import java.util.Optional;
import org.eclipse.microprofile.metrics.Counter;
import org.eclipse.microprofile.metrics.Gauge;
import org.eclipse.micropr... | tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/metrics/util/GaugeMetric.java | 0.897975 | 0.405066 | GaugeMetric.java | starcoder |
package View;
import Controller.GameState;
import Model.Type;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
public class imageButton extends Button{
public final BufferedImage image;
public final Type type;
public final ButtonAction action;
/**
* thi... | src/main/java/View/imageButton.java | 0.775987 | 0.432063 | imageButton.java | starcoder |
package org.joda.time.field;
import org.joda.time.DurationFieldType;
/**
* Duration field class representing a field with a fixed unit length.
* <p>
* PreciseDurationField is thread-safe and immutable.
*
* @author <NAME>
* @author <NAME>
* @since 1.0
*/
public class PreciseDurationField extends BaseDurationF... | src/main/java/org/joda/time/field/PreciseDurationField.java | 0.933643 | 0.401336 | PreciseDurationField.java | starcoder |
package com.example.android.customnotifications;
public final class R {
public static final class attr {
/** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>",
"<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>".
<p>This may also be a reference t... | Application/build/generated/source/r/debug/com/example/android/customnotifications/R.java | 0.741861 | 0.486941 | R.java | starcoder |
package br.org.jext;
import java.math.BigDecimal;
import java.math.BigInteger;
/**
* Classe utilitária contendo métodos para manipulação de arrays.
*
* @author thiago-amm (<NAME>)
* @version v1.0.0 26/03/2018
* @version v1.0.1 26/06/2018
* @since v1.0.0
*/
public class ArrayUtil {
public static final... | src/main/java/br/org/jext/ArrayUtil.java | 0.68721 | 0.411347 | ArrayUtil.java | starcoder |
package org.theta4j.ptp.type;
import org.theta4j.util.Validators;
import java.math.BigInteger;
/**
* A base class PTP integer classes.
*/
public abstract class PtpInteger extends Number implements Comparable<PtpInteger> {
private final byte[] bytes;
private final BigInteger bigInteger;
// Constructor
... | v1/src/main/java/org/theta4j/ptp/type/PtpInteger.java | 0.898229 | 0.617974 | PtpInteger.java | starcoder |
import java.util.ArrayList;
// A little helper class to store x,y values.
class ArmStateNode {
int ID;
double x, y;
}
public class ArmState extends State {
// Note: for comparisons, we're using something that's larger
// than the tolerance.
double epsilon = 1;
// Store node... | assignment03/src/ArmState.java | 0.673084 | 0.402392 | ArmState.java | starcoder |
package revert.shredsheets.enums;
public enum Keys {
C(0, "C"), C_Sharp(1, "C♯"),
D_Flat(1,"D♭"), D(2,"D"), D_Sharp(3,"D♯"),
E_Flat(3,"E♭"), E(4,"E"),
F_Flat(4,"F♭"), E_Sharp(5,"E♯"), F(5,"F"), F_Sharp(6,"F♯"),
G_Flat(6, "G♭"), G(7, "G"), G_Sharp(8, "G♯"),
A_Flat(8, "A♭"), A(9, "A"), A_Sharp(10... | Android App - Shredsheets 2/app/src/main/java/revert/shredsheets/enums/Keys.java | 0.788705 | 0.447038 | Keys.java | starcoder |
package org.houseofbadger.sudoku.model;
import org.houseofbadger.sudoku.solutions.SolutionsSeeker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class VectorContainer {
private static final Logger logger = Lo... | src/main/java/org/houseofbadger/sudoku/model/VectorContainer.java | 0.78083 | 0.436562 | VectorContainer.java | starcoder |
package org.jembi.bsis.dto;
import java.util.Objects;
import org.jembi.bsis.model.donationtype.DonationType;
import org.jembi.bsis.model.location.Location;
import org.jembi.bsis.model.util.Gender;
public class CollectedDonationDTO {
private DonationType donationType;
private Gender gender;
private String bloo... | src/main/java/org/jembi/bsis/dto/CollectedDonationDTO.java | 0.685107 | 0.531027 | CollectedDonationDTO.java | starcoder |
package Vectors;
import java.awt.Color;
/**
* Represents a polar vector
*
* @author <NAME>
*
*/
public class PolarVector extends Vector {
/**
* Creates a polar vector with a random color
* @param length The length of the vector
* @param theta The angle in radians (from the positive x-axis) of the vector... | Vectors/PolarVector.java | 0.936351 | 0.745422 | PolarVector.java | starcoder |
package com.google.maps.model;
/**
* Result from a Geocoding API call.
*/
public class GeocodingResult {
/**
* {@code addressComponents} is an array containing the separate address components.
*/
public AddressComponent[] addressComponents;
/**
* {@code formattedAddress} is the human-readable addres... | src/main/java/com/google/maps/model/GeocodingResult.java | 0.910331 | 0.440048 | GeocodingResult.java | starcoder |
package com.compomics.mascotdatfile.util.mascot.index;
import com.compomics.mascotdatfile.util.interfaces.QueryToPeptideMapInf;
import com.compomics.mascotdatfile.util.mascot.ModificationList;
import com.compomics.mascotdatfile.util.mascot.PeptideHit;
import com.compomics.mascotdatfile.util.mascot.ProteinHit;
import c... | src/main/java/com/compomics/mascotdatfile/util/mascot/index/QueryToPeptideMap_Index.java | 0.810779 | 0.479382 | QueryToPeptideMap_Index.java | starcoder |
package general;
import common.ArrayUtils;
/**
* Young's tableau is an m x n matrix such that the entries of each row are in
* sorted order from left to right and the entries of each column are in sorted
* order from top to bottom. Some of the entries of a Young tableau may be null,
* which we treat as nonexisten... | java/src/general/YoungsTableau.java | 0.799442 | 0.546496 | YoungsTableau.java | starcoder |
package org.im97mori.ble.service.cts.peripheral;
import android.os.SystemClock;
import android.text.format.DateUtils;
import com.google.gson.Gson;
import org.im97mori.ble.characteristic.u2a14.ReferenceTimeInformation;
import org.junit.Test;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.A... | service/cts/peripheral/src/androidTest/java/org/im97mori/ble/service/cts/peripheral/ReferenceTimeInformationCharacteristicDataTest.java | 0.892217 | 0.475666 | ReferenceTimeInformationCharacteristicDataTest.java | starcoder |
package bme280;
/**
* Sensor data oversampling.
* Oversampling Table:
* |-------|-------------------------------------|
* | Value | Humidity/Temp/Pressure oversampling |
* |-------|-------------------------------------|
* | 000 | Skipped (output set to 0x8000) |
* | 001 | oversampling x 1 ... | src/main/java/bme280/Bme280Oversampling.java | 0.910218 | 0.424352 | Bme280Oversampling.java | starcoder |
package org.opengis.cite.ogcapiedr10.collections;
import static io.restassured.http.ContentType.JSON;
import static io.restassured.http.Method.GET;
import static org.opengis.cite.ogcapiedr10.EtsAssert.assertFalse;
import static org.opengis.cite.ogcapiedr10.EtsAssert.assertTrue;
import static org.opengis.cite.ogcapiedr... | src/main/java/org/opengis/cite/ogcapiedr10/collections/CorridorCollections.java | 0.692434 | 0.561906 | CorridorCollections.java | starcoder |
package qub;
/**
* A type that can be used to attempt a function multiple times.
*/
public class Retry
{
private Function2<Integer,Throwable,Boolean> shouldRetryFunction;
private Retry()
{
this.setShouldRetryFunction(3);
}
/**
* Create a new {@link Retry} object.
* @return The... | sources/qub/Retry.java | 0.949295 | 0.589539 | Retry.java | starcoder |
package ru.r2cloud.jradio.fec;
import java.util.ArrayList;
import java.util.List;
import ru.r2cloud.jradio.fec.ccsds.UncorrectableException;
public class Bch15 {
private static final int[] exp_table = new int[] { 8, 4, 2, 1, 12, 6, 3, 13, 10, 5, 14, 7, 15, 11, 9 }; // exp_table[k] = a^k
private static final int[]... | src/main/java/ru/r2cloud/jradio/fec/Bch15.java | 0.665411 | 0.494263 | Bch15.java | starcoder |
package org.quartz.triggers;
import java.util.Calendar;
import java.util.TimeZone;
import org.quartz.core.Scheduler;
/**
* The public interface for inspecting settings specific to a CronTrigger, . which is used to fire a
* <code>{@link org.quartz.Job}</code> at given moments in time, defined with Unix 'cron-like'
... | src/main/java/org/quartz/triggers/CronTrigger.java | 0.878197 | 0.524943 | CronTrigger.java | starcoder |
package com.salesforce.dataloader.model;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* Basically a Row is a set of column names and column values which can come from a CSV file, a database
* or any other data source.
*
* A ro... | src/java/com/salesforce/dataloader/model/Row.java | 0.913096 | 0.473414 | Row.java | starcoder |
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
class BSTNode<T> {
public T data;
public BSTNode<T> left, right;
public BSTNode(T data) {
this.data = data;
}
}
public class KLargestInBST {
public static List<Integer> findKLargestInBST(BSTNode<Integer> tree, Int... | Tree/KLargestInBST.java | 0.813979 | 0.704186 | KLargestInBST.java | starcoder |
package org.sosy_lab.cpachecker.cpa.smg.graphs;
import java.util.Iterator;
import org.sosy_lab.common.collect.PathCopyingPersistentTreeMap;
import org.sosy_lab.common.collect.PersistentMap;
import org.sosy_lab.cpachecker.cpa.smg.graphs.edge.SMGEdgePointsTo;
import org.sosy_lab.cpachecker.cpa.smg.graphs.edge.SMGEdgePo... | src/org/sosy_lab/cpachecker/cpa/smg/graphs/SMGPointsToMap.java | 0.80784 | 0.48871 | SMGPointsToMap.java | starcoder |
package com.company.sourcecode;
import java.io.IOException;
import java.util.Scanner;
/**
* Abstract base class for graphs. A graph is a set
* of vertices and a set of edges. Vertices are
* represented by integers from 0 to n - 1. Edges
* are ordered pairs of vertices.
* @author Koffman and Wolfgang
... | HW7/src/com/company/sourcecode/AbstractGraph.java | 0.93289 | 0.499268 | AbstractGraph.java | starcoder |
package colecciones.lista;
/**
* La interface {@code Lista} representa una secuencia de objetos. El usuario de esta interface tiene control de acceso, inserción, y eliminación indexada de elementos.
*
* Las operaciones ofrecidas por cualquier implementación de esta clase son:
* <ul>
* <li> agregar : Agrega un nuevo... | src/colecciones/lista/Lista.java | 0.810891 | 0.651459 | Lista.java | starcoder |
package us.ihmc.robotics.hyperCubeTree;
import us.ihmc.euclid.geometry.LineSegment3D;
import us.ihmc.euclid.tuple2D.Point2D;
public class LineSegmentSearchVolume extends HyperVolume
{
final int dim;
final private double[] pointA;
final private double[] pointB;
final private double[] scale;
public LineS... | ihmc-robotics-toolkit/src/main/java/us/ihmc/robotics/hyperCubeTree/LineSegmentSearchVolume.java | 0.679604 | 0.412944 | LineSegmentSearchVolume.java | starcoder |
package core.comp3111;
import java.io.Serializable;
/**
* DataColumn - A column of data. This class will be used by DataTable. It
* stores the data values (data) and the its type (typeName). String constants
* of type name are defined in DataType.
*
* @author cspeter
*
*/
public class DataColumn implements Se... | src/core/comp3111/DataColumn.java | 0.731155 | 0.548492 | DataColumn.java | starcoder |
package com.arisosoftware.fsm;
import java.util.HashMap;
import java.util.Map;
/**
* @author <EMAIL> License : MIT
*
* @param <State> The state of the entity
* @param <EventType> The event type to be handled
*/
public class StateMachineBuilder<State extends Enum<State>, EventType extends Enum<EventType>> {
... | src/main/java/com/arisosoftware/fsm/StateMachineBuilder.java | 0.891882 | 0.493775 | StateMachineBuilder.java | starcoder |
package com.terrier.utilities.automation.bundles.boxcryptor.objects;
import java.util.HashMap;
import java.util.Map;
/**
* Class of a directory in inventory
* @author vzwingma
*
*/
public class BCInventaireRepertoire extends AbstractBCInventaireStructure {
/**
* Constructeur pour YML
*/
public BCInventaire... | src/main/java/com/terrier/utilities/automation/bundles/boxcryptor/objects/BCInventaireRepertoire.java | 0.755457 | 0.425904 | BCInventaireRepertoire.java | starcoder |
import java.util.HashSet;
import java.util.LinkedList;
/**
* Detect cycle in directed graph using colors.
*
* Given a directed graph, write an algorithm to find our whether graph contains cycle or not.
* resources/CycleInDirectedGraphUsingColors.png
*
* Approach:
*
* Graph contains cycle if there is any back e... | src/DetectCycleInDirectedGraphUsingColors.java | 0.907603 | 0.551211 | DetectCycleInDirectedGraphUsingColors.java | starcoder |
package au.com.codeka.common.model;
import java.util.ArrayList;
import java.util.List;
import au.com.codeka.common.Vector2;
import au.com.codeka.common.protobuf.Messages;
/**
* A \c Sector represents a "section" of space, with corresponding stars, planets and so on.
*/
public abstract class BaseSector {
protec... | common/src/au/com/codeka/common/model/BaseSector.java | 0.788461 | 0.447279 | BaseSector.java | starcoder |
package nc.util;
import java.util.Random;
import net.minecraft.util.math.MathHelper;
public class NCMath {
private static Random rand = new Random();
public static int square(int number) {
return number*number;
}
public static double square(double number) {
return number*number;
}
public static int... | src/main/java/nc/util/NCMath.java | 0.64713 | 0.635024 | NCMath.java | starcoder |
package net.imglib2.loops;
import net.imglib2.FinalInterval;
import net.imglib2.Interval;
import net.imglib2.util.IntervalIndexer;
import net.imglib2.util.Intervals;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class IntervalChunks
{
/**
* Returns a list of disjoint intervals... | src/main/java/net/imglib2/loops/IntervalChunks.java | 0.813683 | 0.466785 | IntervalChunks.java | starcoder |
package com.googlecode.catchexception.throwable.apis;
import org.hamcrest.Matcher;
import org.junit.matchers.JUnitMatchers;
import com.googlecode.catchexception.throwable.apis.internal.hamcrest.ThrowableMessageMatcher;
import com.googlecode.catchexception.throwable.apis.internal.hamcrest.ThrowableNoCauseMatcher... | catch-throwable/src/main/java/com/googlecode/catchexception/throwable/apis/CatchThrowableHamcrestMatchers.java | 0.879043 | 0.435121 | CatchThrowableHamcrestMatchers.java | starcoder |
package net.teamio.taam.rendering;
import net.minecraft.util.EnumFacing;
import net.teamio.taam.content.IRotatable;
/**
* Utility methods used in the {@link TaamRenderer}
*
* @author <NAME>
*/
public final class RenderUtil {
private RenderUtil() {
// Util Class
}
/**
* Maps the given enum facing to full 9... | common/net/teamio/taam/rendering/RenderUtil.java | 0.898034 | 0.457864 | RenderUtil.java | starcoder |
package com.opengamma.analytics.financial.model.option.pricing.tree;
import com.opengamma.util.ArgumentChecker;
/**
*
*/
public class CashDividendFunctionProvider extends DividendFunctionProvider {
/**
* @param dividendTimes
* The dividend times
* @param dividends
* The cash dividen... | projects/analytics/src/main/java/com/opengamma/analytics/financial/model/option/pricing/tree/CashDividendFunctionProvider.java | 0.921282 | 0.512388 | CashDividendFunctionProvider.java | starcoder |
package neuralnet.neural.networks.training.propagation.manhattan;
import neuralnet.EncogError;
import neuralnet.ml.data.MLDataSet;
import neuralnet.neural.networks.ContainsFlat;
import neuralnet.neural.networks.training.LearningRate;
import neuralnet.neural.networks.training.propagation.Propagation;
import neuralnet.n... | app/neuralnet/neural/networks/training/propagation/manhattan/ManhattanPropagation.java | 0.847369 | 0.68924 | ManhattanPropagation.java | starcoder |
package edu.psu.compbio.seqcode.gse.conservation;
import java.util.*;
import java.io.*;
import java.text.*;
import edu.psu.compbio.seqcode.gse.utils.io.parsing.affyexpr.*;
/**
* @author tdanford
*/
public class AffyExperimentAnalysis {
private AffyExperiment expt;
public AffyExperimentAnalysis(AffyEx... | src/edu/psu/compbio/seqcode/gse/conservation/AffyExperimentAnalysis.java | 0.700383 | 0.415254 | AffyExperimentAnalysis.java | starcoder |
package org.orekit.rugged.los;
import java.util.stream.Stream;
import org.hipparchus.analysis.differentiation.DerivativeStructure;
import org.hipparchus.geometry.euclidean.threed.FieldRotation;
import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
import org.hipparchus.geometry.euclidean.threed.Rotation;
imp... | src/main/java/org/orekit/rugged/los/FixedRotation.java | 0.953013 | 0.425784 | FixedRotation.java | starcoder |
package org.chromium.chromecast.base;
/**
* Represents a structure containing an instance of both A and B.
*
* In algebraic type theory, this is the Product type.
*
* This is useful for representing many objects in one without having to create a new class.
* The type itself is composable, so the type parameters... | chromecast/base/java/src/org/chromium/chromecast/base/Both.java | 0.955454 | 0.627138 | Both.java | starcoder |
package com.jgalilee.hadoop.kmeans.writable;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Arrays;
import org.apache.hadoop.io.ArrayPrimitiveWritable;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Writable;
/**
* Composite writable to repres... | src/com/jgalilee/hadoop/kmeans/writable/Point.java | 0.861465 | 0.518912 | Point.java | starcoder |
package com.tokelon.toktales.core.game.model.entity;
import com.tokelon.toktales.core.game.model.IRectangle2f;
import com.tokelon.toktales.core.game.model.IPoint2f.IMutablePoint2f;
import com.tokelon.toktales.core.game.model.IRectangle2f.IMutableRectangle2f;
public interface IGameEntityProps {
// TODO: Add *back ver... | tokTales-core/tokTales-core-library/src/main/java/com/tokelon/toktales/core/game/model/entity/IGameEntityProps.java | 0.509764 | 0.544801 | IGameEntityProps.java | starcoder |
package com.conveyal.gtfs.loader;
import static com.conveyal.gtfs.loader.JdbcGtfsLoader.POSTGRES_NULL_TEXT;
/**
* Wrapper class that provides access to row values and line context (e.g., line number) for a particular row of GTFS
* data.
*/
public class LineContext {
public final Table table;
private final ... | src/main/java/com/conveyal/gtfs/loader/LineContext.java | 0.884314 | 0.425009 | LineContext.java | starcoder |
package com.google.security.zynamics.zylib.general.memmanager;
import com.google.common.base.Preconditions;
/**
* Used to store a contiguous chunk of memory.
*
*/
public class MemoryChunk implements Comparable<MemoryChunk> {
/**
* The address of the memory chunk.
*/
private final long m_address;
/**
... | src/main/java/com/google/security/zynamics/zylib/general/memmanager/MemoryChunk.java | 0.944511 | 0.59134 | MemoryChunk.java | starcoder |
package game.module.math;
/**
* The <code>Rational</code> class is a helper class to represent rational numbers.
* It also provides mathematical utility
*
* @author Marco
*/
public class Rational implements Comparable<Rational> {
private static Rational zero = new Rational(0, 1);
// numerator
pr... | client/LaserPiratesClient/src/game/module/math/Rational.java | 0.942988 | 0.45847 | Rational.java | starcoder |
package multiverse.server.pathing;
import java.util.*;
import multiverse.server.math.*;
import multiverse.server.util.*;
public class PathSearchNode {
// Close enough, in millimeters
protected static int closeEnough = 100;
// Only the first and last states are locations; all other states
// are ... | multiverse server/multiverse-server/multiverse/src/multiverse/server/pathing/PathSearchNode.java | 0.856137 | 0.567697 | PathSearchNode.java | starcoder |
package de.uni_hamburg.informatik.swt.se2.mediathek.services.kundenstamm;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.ArrayList;
imp... | src/de/uni_hamburg/informatik/swt/se2/mediathek/services/kundenstamm/KundenstammServiceImplTest.java | 0.645455 | 0.422386 | KundenstammServiceImplTest.java | starcoder |
package aobtk.ui.element;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import aobtk.oled.Display;
import aobtk.ui.measurement.Size;
public class TableLayout extends UIElement {
private int spacingY;
private int spacingX;
private List<List<UIElement>> tableElements = new Arr... | src/main/java/aobtk/ui/element/TableLayout.java | 0.910624 | 0.434341 | TableLayout.java | starcoder |
package com.ssynhtn.contest;
import java.util.*;
import java.util.concurrent.Phaser;
public class MaximalNetworkRank {
public int maximalNetworkRank(int n, int[][] roads) {
List<Set<Integer>> neis = new ArrayList<>(n);
for (int i = 0; i < n; i++) {
neis.add(new HashSet<>());
... | src/com/ssynhtn/contest/MaximalNetworkRank.java | 0.693369 | 0.412944 | MaximalNetworkRank.java | starcoder |
package org.eclipse.rdf4j.query.algebra.evaluation.function.geosparql;
import java.util.Arrays;
import java.util.Collections;
import org.locationtech.spatial4j.shape.Point;
import org.locationtech.spatial4j.shape.Shape;
import org.locationtech.spatial4j.shape.ShapeCollection;
import org.locationtech.spatial4j.shape.S... | core/queryalgebra/geosparql/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/function/geosparql/DefaultSpatialAlgebra.java | 0.852935 | 0.417568 | DefaultSpatialAlgebra.java | starcoder |
package org.diirt.datasource.formula.array;
import static org.diirt.vtype.ValueFactory.*;
import java.util.Arrays;
import java.util.List;
import org.diirt.datasource.formula.StatefulFormulaFunction;
import org.diirt.datasource.util.NullUtils;
import org.diirt.util.array.ArrayInt;
import org.diirt.util.array.ListNumbe... | pvmanager/datasource-formula/src/main/java/org/diirt/datasource/formula/array/Histogram2DOfFormulaFunction.java | 0.809953 | 0.441793 | Histogram2DOfFormulaFunction.java | starcoder |
package com.terraforged.app.mesh;
public class Mesh {
private final Mesh inner;
private final float x0;
private final float y0;
private final float x1;
private final float y1;
private final float quality;
public Mesh(Mesh inner, float x0, float y0, float x1, float y1, float quality) {
... | TerraForgedApp/src/main/java/com/terraforged/app/mesh/Mesh.java | 0.907412 | 0.541106 | Mesh.java | starcoder |
package nl.knaw.dans.coar.geo;
import java.util.Arrays;
public class RDPoint
{
// bron: https://nl.wikipedia.org/wiki/Rijksdriehoeksco%C3%B6rdinaten
public static final int X_MIN_M = -7000;
public static final int X_MAX_M = 300000;
public static final int Y_MIN_M = 289000;
public static final int ... | src/main/java/nl/knaw/dans/coar/geo/RDPoint.java | 0.854019 | 0.609292 | RDPoint.java | starcoder |
package org.jumpmind.symmetric.statistic;
import java.util.Date;
public class ChannelStats extends AbstractNodeHostStats {
private String channelId;
private long dataRouted;
private long dataUnRouted;
private long dataExtracted;
private long dataBytesExtracted;
private long dataExtractedError... | SymmetricDS/symmetric-core/src/main/java/org/jumpmind/symmetric/statistic/ChannelStats.java | 0.635788 | 0.488161 | ChannelStats.java | starcoder |
import org.apache.commons.math3.dfp.Dfp;
import org.apache.commons.math3.dfp.DfpField;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.linear.SingularMatrixException;
/**
* Implementierung des Algorithmus $\verb!bandet1!$ von Martin und Wilkinson (
* Numer. Math.... | FieldBlockDecomposition.java | 0.595845 | 0.571587 | FieldBlockDecomposition.java | starcoder |
package org.bondolo.tictactoe;
import java.util.Optional;
import org.bondolo.tiles.rect.RectTileCoord;
import org.bondolo.tiles.rect.RectTileMap;
import java.util.Set;
import static org.bondolo.tictactoe.TicTacTile.TileState.BLANK;
import static org.bondolo.tictactoe.TicTacTile.TileState.O;
import static org.bondolo.t... | src/main/java/org/bondolo/tictactoe/TicTacMap.java | 0.884919 | 0.40028 | TicTacMap.java | starcoder |
package boofcv.abst.feature.detdesc;
import boofcv.BoofDefaults;
import boofcv.abst.feature.orientation.OrientationIntegral;
import boofcv.alg.feature.describe.DescribePointSurf;
import boofcv.alg.feature.detect.interest.FastHessianFeatureDetector;
import boofcv.alg.transform.ii.GIntegralImageOps;
import boofcv.struct... | main/boofcv-feature/src/main/java/boofcv/abst/feature/detdesc/WrapDetectDescribeSurf.java | 0.898123 | 0.496643 | WrapDetectDescribeSurf.java | starcoder |
package lab4.data;
import java.util.Arrays;
import java.util.Observable;
/**
* Represents the 2-d game grid
*/
public class GameGrid extends Observable{
private int[][] grid;
private int INROW = 5;
public final int OTHER = -1;
public final int EMPTY = 0;
public final int ME = 1;
/**
* Constructor
*
... | src/lab4/data/GameGrid.java | 0.723895 | 0.406391 | GameGrid.java | starcoder |
package com.amplifyframework.core.model;
import androidx.annotation.NonNull;
import androidx.core.util.ObjectsCompat;
import com.amplifyframework.core.model.annotations.BelongsTo;
import java.util.Objects;
/**
* Represents an association of the {@link Model} class.
* This class encapsulates the information provid... | core/src/main/java/com/amplifyframework/core/model/ModelAssociation.java | 0.943647 | 0.408572 | ModelAssociation.java | starcoder |
package com.mygdx.game.utilities;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector3;
/**
* Class containing some geometry algorithms.
* Note that the implementation of some algorithms is not thread-safe.
*
* @author jsjolund
* @author davebaol
*/
public final class GeometryUtils {
... | core/src/com/mygdx/game/utilities/GeometryUtils.java | 0.882212 | 0.637073 | GeometryUtils.java | starcoder |
package com.chillimport.server;
import java.time.ZonedDateTime;
import java.util.List;
import de.fraunhofer.iosb.ilt.sta.model.Datastream;
import de.fraunhofer.iosb.ilt.sta.model.MultiDatastream;
import de.fraunhofer.iosb.ilt.sta.model.Observation;
public class ObservationCreator {
/**
* Creates a new obs... | src/main/java/com/chillimport/server/ObservationCreator.java | 0.902163 | 0.459743 | ObservationCreator.java | starcoder |
package com.github.subh0m0y.datastructures.utils;
import java.util.Comparator;
import java.util.Random;
/**
* A utility class that performs operation on arrays.
*
* @author <NAME>
* @version 2017.02.15
*/
public class ArrayUtil {
/**
* Reverses the elements of the given array within the specified range.... | src/main/java/com/github/subh0m0y/datastructures/utils/ArrayUtil.java | 0.904654 | 0.508788 | ArrayUtil.java | starcoder |
package br.com.concretesolutions.canarinho.sample;
import android.os.Build;
import android.support.test.espresso.UiController;
import android.support.test.espresso.ViewAction;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.view.View;
import android.w... | sample/src/androidTest/java/br/com/concretesolutions/canarinho/sample/DemoWatchersInstrumentationTest.java | 0.599133 | 0.406803 | DemoWatchersInstrumentationTest.java | starcoder |
package com.wineguesser.deductive.viewmodel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.Transformations;
import androidx.lifecycle.ViewModel;
import com.wineguesser.deductive.model.ConclusionRecord;
public class HistoryRecordViewModel extends ViewModel {
... | app/src/main/java/com/wineguesser/deductive/viewmodel/HistoryRecordViewModel.java | 0.84626 | 0.40031 | HistoryRecordViewModel.java | starcoder |
package res.boardStructures;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import static res.Board.CellLength;
public class Table extends HashMap<Pos, Cell> {
/* Field */
// フィールド無しか?
/* Constructor */
privat... | src/res/boardStructures/Table.java | 0.538498 | 0.41478 | Table.java | starcoder |
package br.com.objectos.core.array;
import br.com.objectos.core.object.Checks;
/**
* <p>
* This class provides {@code static} methods for operating on {@code char}
* arrays.
*
* @since 2
*/
public final class CharArrays {
static final char[] EMPTY_CHAR_ARRAY = new char[0];
private CharArrays() {}
/**
... | core/core-array/src/main/java/br/com/objectos/core/array/CharArrays.java | 0.948905 | 0.588889 | CharArrays.java | starcoder |
package org.locationtech.geomesa.api;
import com.vividsolutions.jts.geom.Geometry;
import org.apache.hadoop.classification.InterfaceStability;
import java.util.Date;
import java.util.Map;
/**
* GeoMesaIndex is an API for utilizing GeoMesa as a spatial index
* without bringing in the Geotools SimpleFeature data mod... | geomesa-native-api/src/main/java/org/locationtech/geomesa/api/GeoMesaIndex.java | 0.905719 | 0.419707 | GeoMesaIndex.java | starcoder |
package org.splabs.vocabulary.iR.info;
import cern.colt.matrix.tdouble.DoubleMatrix1D;
import cern.colt.matrix.tdouble.DoubleMatrix2D;
import cern.colt.matrix.tdouble.impl.DenseDoubleMatrix2D;
import cern.colt.matrix.tdouble.impl.SparseDoubleMatrix2D;
import cern.colt.matrix.tdouble.algo.DenseDoubleAlgebra;
import cer... | TopicViewer/src/org/splabs/vocabulary/iR/info/LSIInfo.java | 0.771499 | 0.598283 | LSIInfo.java | starcoder |
package jenjinn.bitboards;
import jenjinn.base.Square;
import jenjinn.pieces.Piece;
/**
* Exposes API methods for accessing cached bitboards.
*
* @author TB
* @date 21 Jan 2017
*/
public final class Bitboards
{
public static long universal()
{
return BitboardsImpl.UNIVERSAL_BITBOARD;
}
// Section 1 - Basi... | Jenjinn2/src/main/java/jenjinn/bitboards/Bitboards.java | 0.80213 | 0.404243 | Bitboards.java | starcoder |
package com.android.mail.providers;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.common.collect.ImmutableList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Simple class to encapsulate an immutable list of {@link Folder} objects, and handle ser... | apps/UnifiedEmail/src/com/android/mail/providers/FolderList.java | 0.895551 | 0.41567 | FolderList.java | starcoder |
package org.oryxeditor.server.diagram;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Represents a rectangular space within a canvas.
* Defined by the upper left and lower right points
*
* @author <NAME>
*/
public class Bounds {
Point lowerRight;
Point upperLeft;
/**
* Creates... | src/org/oryxeditor/server/diagram/Bounds.java | 0.901206 | 0.504883 | Bounds.java | starcoder |
package org.recast4j.detour.crowd.debug;
import static org.recast4j.detour.DetourCommon.clamp;
public class ObstacleAvoidanceDebugData {
int m_nsamples;
int m_maxSamples;
float[] m_vel;
float[] m_ssize;
float[] m_pen;
float[] m_vpen;
float[] m_vcpen;
float[] m_spen;
float[] m_tpen;... | detour-crowd/src/main/java/org/recast4j/detour/crowd/debug/ObstacleAvoidanceDebugData.java | 0.656108 | 0.420421 | ObstacleAvoidanceDebugData.java | starcoder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.