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 mouse.transformed2D;
import processing.core.*;
import static processing.core.PApplet.*;
import java.util.ArrayDeque;
/**
* This is a processing library used to transform the mouse matrix
* and get the transformed mouse coordinates.
* <p>
* Note: for multiple sketch windows, multiple instances of the Mouse... | Mouse2DTransformations/src/template/library/MouseTransformed.java | 0.804943 | 0.445288 | MouseTransformed.java | starcoder |
package com.netflix.spectator.api;
/**
* Track the sample distribution of events. An example would be the response sizes for requests
* hitting and http server.
*
* The precise set of information maintained depends on the implementation. Most should try to
* provide a consistent implementation of {@link #count()}... | spectator-api/src/main/java/com/netflix/spectator/api/DistributionSummary.java | 0.94003 | 0.456591 | DistributionSummary.java | starcoder |
package com.hankcs.nlp.semantic.word2vec.base;
import com.hankcs.nlp.collection.heap.MaxHeap;
import java.util.*;
/**
* 抽象的向量模型,将抽象的对象映射为向量,对外提供可调用接口
*/
public abstract class AbstractVectorModel<K> {
protected Map<K, com.hankcs.nlp.semantic.word2vec.base.Vector> storage;
public AbstractVectorModel(Map<K, ... | src/com/hankcs/nlp/semantic/word2vec/base/AbstractVectorModel.java | 0.673192 | 0.436322 | AbstractVectorModel.java | starcoder |
package it.fvaleri.clrs3.data.basic;
import it.fvaleri.clrs3.algorithm.basic.RandomGenerator;
/**
* Much faster than linear search that takes O(n).
* For any node x, the keys in the left subtree are at most x.key,
* and the keys in the right subtree are at least x.key.
* Basic operations take time proportional to... | src/main/java/it/fvaleri/clrs3/data/basic/BinarySearchTree.java | 0.876463 | 0.482124 | BinarySearchTree.java | starcoder |
package com.gallantrealm.modsynth.module;
import java.io.StreamTokenizer;
import java.io.StringBufferInputStream;
public class Function extends Module {
private static final long serialVersionUID = 1L;
public String expressionString;
public double a, b, c;
transient double m, n, x, y, z, u, v;
public CC aCC, bC... | app/src/main/java/com/gallantrealm/modsynth/module/Function.java | 0.794305 | 0.411939 | Function.java | starcoder |
package rbtree;
import java.util.ArrayList;
import java.util.Comparator;
/**
* the class that represents the binaryTree
*
* @author Shiyu
* @param <T> the type of this RBTree
* @version 2013-10-8
*
*/
public abstract class RBTree<T> {
/** comparator use to see the way the binarayTree sorted */
publi... | Project_8/rbtree/RBTree.java | 0.904817 | 0.427516 | RBTree.java | starcoder |
package lwjgui.gl;
import static org.lwjgl.opengl.GL11.GL_FLOAT;
import static org.lwjgl.opengl.GL11.GL_TRIANGLES;
import static org.lwjgl.opengl.GL11.glDrawArrays;
import static org.lwjgl.opengl.GL15.GL_ARRAY_BUFFER;
import static org.lwjgl.opengl.GL15.GL_STATIC_DRAW;
import static org.lwjgl.opengl.GL15.glBindBuffer;... | src/main/java/lwjgui/gl/TexturedQuad.java | 0.517327 | 0.463687 | TexturedQuad.java | starcoder |
package org.apache.geode.pdx.internal;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.apache.geode.annotations.VisibleForTesting;
import org.apache.geode.cache.Region;
public class PeerTypeRegistrationReverseMap {
/**
* When a new pdxType or a new enumInfo is added to i... | geode-core/src/main/java/org/apache/geode/pdx/internal/PeerTypeRegistrationReverseMap.java | 0.775392 | 0.408926 | PeerTypeRegistrationReverseMap.java | starcoder |
package infodynamics.measures.continuous;
import infodynamics.utils.MatrixUtils;
import java.util.Vector;
/**
* <p>Base class for implementations of the transfer entropy (see Schreiber, PRL, 2000)
* and local transfer entropy (see Lizier et al, PRE, 2008).
* We use the term <i>apparent</i> transfer entropy to ... | MATLAB_functions/infodynamics/infodynamics-dist-0.1.3/java/source/infodynamics/measures/continuous/TransferEntropyCommon.java | 0.937361 | 0.53279 | TransferEntropyCommon.java | starcoder |
package com.github.rosjava.challenge.vision;
import java.awt.Color;
import com.github.rosjava.challenge.gui.Image;
/**
* Histogram functions for generating, normalizing, and overlaying
* a histogram in an image.
*
* @author unknown
* @author <NAME>
*/
public class Histogram {
/**
* <p>Gets an image with a... | src/challenge/vision/src/main/java/com/github/challenge/vision/Histogram.java | 0.866415 | 0.617743 | Histogram.java | starcoder |
package cgeo.geocaching.sensors;
import cgeo.geocaching.R;
import android.hardware.SensorManager;
/**
* Stores data related to (device) orientation sensor events.
* This data is used to calculate a device orientation and a (device) direction/heading. Result
* is also stored in this object.
*/
public class Direct... | main/src/cgeo/geocaching/sensors/DirectionData.java | 0.93302 | 0.605799 | DirectionData.java | starcoder |
package unisa.gps.etour.bean;
import java.io.Serializable;
import java.util.Date;
/ **
* Bean that contains the data for feedback to a refreshment
*
* @ Author <NAME>
* @ Version 0.1 2007 eTour Project - Copyright by SE @ SA Lab DMI University
* Of Salerno
* /
public class BeanVisitaPR implements Serializa... | benchmarking/traceability/datasets/italian/etour/[etour-raw-src]/BeanVisitaPR.java | 0.761006 | 0.404008 | BeanVisitaPR.java | starcoder |
package com.umeng.analytics.pro;
public class cd
{
public static final byte a(byte paramByte, int paramInt, boolean paramBoolean)
{
return (byte)a(paramByte, paramInt, paramBoolean);
}
public static final int a(int paramInt1, int paramInt2, boolean paramBoolean)
{
if (paramBoolean) {
return ... | java/classes2/com/umeng/analytics/pro/cd.java | 0.741861 | 0.487612 | cd.java | starcoder |
package com.gs.ep.docknight.model.transformer.tabledetection.process;
import java.sql.Timestamp;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.collections.api.block.predicate.Predicate;
import org.eclipse.collections.api... | src/main/java/com/gs/ep/docknight/model/transformer/tabledetection/process/Scratchpad.java | 0.925894 | 0.461623 | Scratchpad.java | starcoder |
package org.redisson.api;
import java.util.concurrent.Callable;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
* Redis based implementation of {@link java.util.concurrent.ScheduledExecutorService}
*
* @author <NAME>
*
*/
public interface RScheduledExecutorService... | redisson/src/main/java/org/redisson/api/RScheduledExecutorService.java | 0.942361 | 0.474814 | RScheduledExecutorService.java | starcoder |
package graph;
import java.io.InputStream;
import java.util.BitSet;
import java.util.LinkedList;
/**
* Created by <NAME> on 23.12.16.
* <p>
* Implementation of graph data structure
* based on adjacency matrix.
*/
public class MatrixGraph extends BaseGraph {
private BitSet adjacencyMatrix;
private int[] ... | src/graph/MatrixGraph.java | 0.920874 | 0.425486 | MatrixGraph.java | starcoder |
package Arrays;
import java.util.ArrayList;
import java.util.Arrays;
/**
* Given an array S of n integers, are there elements a, b, c, and d in S such that
* a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.
*/
public class FourSum {
public static void main(String[... | src/main/java/Arrays/FourSum.java | 0.751739 | 0.465752 | FourSum.java | starcoder |
package redis.clients.jedis.timeseries;
import static redis.clients.jedis.Protocol.toByteArray;
import static redis.clients.jedis.timeseries.TimeSeriesProtocol.MINUS;
import static redis.clients.jedis.timeseries.TimeSeriesProtocol.PLUS;
import static redis.clients.jedis.timeseries.TimeSeriesProtocol.TimeSeriesKeyword.... | src/main/java/redis/clients/jedis/timeseries/TSMRangeParams.java | 0.832373 | 0.419826 | TSMRangeParams.java | starcoder |
package graphs;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* You are given a static list of english words. You are supposed to build a
* data structure from the list of words which is both space efficient, and can
* also efficiently answer query to check ... | java/src/graphs/SpellChecker.java | 0.698741 | 0.435841 | SpellChecker.java | starcoder |
package dk.alexandra.fresco.framework.util;
import java.math.BigInteger;
import java.util.HashMap;
/**
* Helper class for computing suitable prime moduli for a given bit length.
*/
public class ModulusFinder {
/**
* Values pre-computed using {@link #compute(int)}.
*/
private static final HashMap<Integer,... | core/src/main/java/dk/alexandra/fresco/framework/util/ModulusFinder.java | 0.912562 | 0.532668 | ModulusFinder.java | starcoder |
package dev.marksman.collectionviews;
import com.jnape.palatable.lambda.adt.Maybe;
import dev.marksman.enhancediterables.FiniteIterable;
import dev.marksman.enhancediterables.NonEmptyFiniteIterable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Objects;
import static dev.marksman.collecti... | src/main/java/dev/marksman/collectionviews/EmptyVectorBuilder.java | 0.87982 | 0.430447 | EmptyVectorBuilder.java | starcoder |
package edu.umn.biomedicus.uima.copying;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.function.UnaryOperator;
import org.apache.uima.cas.CAS;
import org.apache.uima.cas.Feature;
import org.apache.uima.cas.FeatureStructure;
import org.apache.ui... | biomedicus-uima/src/main/java/edu/umn/biomedicus/uima/copying/FeatureCopiers.java | 0.916081 | 0.422743 | FeatureCopiers.java | starcoder |
package us.ihmc.humanoidRobotics.model;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import gnu.trove.map.TLongObjectMap;
import gnu.trove.map.hash.TLongObjectHashMap;
import us.ihmc.commons.lists.RecyclingArrayList;
import us.ihmc.euclid.interfaces.Settable;
import us.ihmc.euclid.r... | ihmc-humanoid-robotics/src/main/java/us/ihmc/humanoidRobotics/model/CenterOfPressureDataHolder.java | 0.892486 | 0.452536 | CenterOfPressureDataHolder.java | starcoder |
package com.flowpowered.commons.bit;
import com.flowpowered.commons.LogicUtil;
public class ByteBitSet implements ByteBitMask {
private byte flag;
public ByteBitSet() {
this.flag = 0;
}
public ByteBitSet(int flag) {
this.flag = (byte) flag;
}
public ByteBitSet(ByteBitMask fl... | src/main/java/com/flowpowered/commons/bit/ByteBitSet.java | 0.898508 | 0.491395 | ByteBitSet.java | starcoder |
package com.lightcrafts.mediax.jai;
import java.awt.RenderingHints;
import java.awt.image.renderable.ParameterBlock;
/**
* A class which is a node in a chain of operations. This interface
* aggregates the minimal set of methods which would be expected to be
* implemented by such a class.
*
* <p> Accessors and m... | lightcrafts/extsrc/com/lightcrafts/mediax/jai/OperationNode.java | 0.902583 | 0.503235 | OperationNode.java | starcoder |
package com.google.enterprise.adaptor;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import com.sun.net.httpserver.HttpExchange;
import org... | test/com/google/enterprise/adaptor/SessionManagerTest.java | 0.866217 | 0.501282 | SessionManagerTest.java | starcoder |
package com.github.sladecek.maze.jmaze.print3d.maze3dmodel;
//REV1
import com.github.sladecek.maze.jmaze.geometry.LeftRight;
import com.github.sladecek.maze.jmaze.print3d.generic3dmodel.MEdge;
/**
* Wall in 3D model.
* <p>
* Wall has 4 edges. The edges e1 and e3 (heads) are oriented towards pillars. Edges e2 and e4... | src/main/java/com/github/sladecek/maze/jmaze/print3d/maze3dmodel/MWall.java | 0.855263 | 0.570361 | MWall.java | starcoder |
package artisynth.core.mechmodels;
import java.awt.Color;
import java.io.IOException;
import java.util.Deque;
import java.util.Map;
import artisynth.core.modelbase.CompositeComponent;
import artisynth.core.modelbase.CopyableComponent;
import artisynth.core.modelbase.ModelComponent;
import artisynth.core.modelbase.Sca... | src/artisynth/core/mechmodels/RevoluteJoint.java | 0.910114 | 0.51562 | RevoluteJoint.java | starcoder |
package boofcv.processing;
import boofcv.alg.misc.ImageStatistics;
import boofcv.struct.flow.ImageFlow;
import boofcv.struct.image.GrayF32;
import boofcv.struct.image.GrayI;
import boofcv.struct.image.GrayS16;
import boofcv.struct.image.GrayS32;
import processing.core.PConstants;
import processing.core.PImage;
import... | src/boofcv/processing/VisualizeProcessing.java | 0.836321 | 0.580649 | VisualizeProcessing.java | starcoder |
package it.unisa.dia.gas.crypto.jlbc.fhe.bgv11.leveled.params;
import it.unisa.dia.gas.jpbc.Element;
import it.unisa.dia.gas.jpbc.Field;
import it.unisa.dia.gas.jpbc.Vector;
import it.unisa.dia.gas.plaf.jlbc.field.vector.VectorField;
import java.math.BigInteger;
/**
* @author <NAME> (<EMAIL>)
*/
public class BGV11... | post_quantum_cryptography/Java implementation/java_implementation/lib/jlbc-master/jlbc-crypto/src/main/java/it/unisa/dia/gas/crypto/jlbc/fhe/bgv11/leveled/params/BGV11LeveledParameters.java | 0.511717 | 0.411643 | BGV11LeveledParameters.java | starcoder |
package tarehart.rlbot.physics;
import tarehart.rlbot.input.CarData;
import tarehart.rlbot.math.DistanceTimeSpeed;
import tarehart.rlbot.math.SpaceTime;
import tarehart.rlbot.math.TimeUtil;
import tarehart.rlbot.planning.AccelerationModel;
import tarehart.rlbot.planning.StrikeProfile;
import java.time.Duration;
impor... | java/src/tarehart/rlbot/physics/DistancePlot.java | 0.885971 | 0.513607 | DistancePlot.java | starcoder |
package com.direwolf20.mininggadgets.client.renderer;
import com.direwolf20.mininggadgets.common.blocks.ModBlocks;
import com.direwolf20.mininggadgets.common.items.gadget.MiningCollect;
import com.direwolf20.mininggadgets.common.items.gadget.MiningProperties;
import com.direwolf20.mininggadgets.common.util.VectorHelpe... | src/main/java/com/direwolf20/mininggadgets/client/renderer/BlockOverlayRender.java | 0.707809 | 0.425725 | BlockOverlayRender.java | starcoder |
package org.wlld.imageRecognition;
import org.wlld.MatrixTools.Matrix;
import org.wlld.MatrixTools.MatrixOperation;
import org.wlld.config.Kernel;
import org.wlld.imageRecognition.border.Border;
import org.wlld.imageRecognition.border.Frame;
import org.wlld.imageRecognition.border.FrameBody;
import org.wlld.imageRecog... | src/main/java/org/wlld/imageRecognition/Convolution.java | 0.774242 | 0.488649 | Convolution.java | starcoder |
package com.opengamma.integration.tool.enginedebugger;
import java.util.Map;
import java.util.Set;
import com.opengamma.engine.depgraph.ResolutionFailure;
import com.opengamma.engine.depgraph.ResolutionFailureVisitor;
import com.opengamma.engine.value.ValueRequirement;
import com.opengamma.engine.value.ValueSpecifica... | projects/OG-Integration/src/main/java/com/opengamma/integration/tool/enginedebugger/ResolutionFailureChildCountVisitor.java | 0.851429 | 0.482063 | ResolutionFailureChildCountVisitor.java | starcoder |
package NO_0347_Top_K_Frequent_Elements;
import java.util.*;
class Solution {
private class Freq implements Comparable<Freq> {
/**
* 数值及其频次
*/
public int e, freq;
public Freq(int e, int freq) {
this.e = e;
this.freq = freq;
}
@Ov... | LeetCode/Java/src/main/java/NO_0347_Top_K_Frequent_Elements/Solution.java | 0.744563 | 0.407274 | Solution.java | starcoder |
package com.techshroom.unplanned.blitter.shapers;
import java.util.List;
import com.flowpowered.math.vector.Vector2d;
import com.google.common.collect.ImmutableList;
import com.techshroom.unplanned.blitter.textures.TextureData;
import com.techshroom.unplanned.blitter.textures.map.TextureAtlas;
import com.techshroom.u... | api/src/main/java/com/techshroom/unplanned/blitter/shapers/CubeLayout.java | 0.857634 | 0.427875 | CubeLayout.java | starcoder |
package com.opengamma.core.position;
import com.opengamma.DataNotFoundException;
import com.opengamma.core.change.ChangeProvider;
import com.opengamma.id.ObjectId;
import com.opengamma.id.UniqueId;
import com.opengamma.id.VersionCorrection;
import com.opengamma.util.PublicSPI;
/**
* A source of portfolios and positi... | projects/OG-Core/src/main/java/com/opengamma/core/position/PositionSource.java | 0.858941 | 0.459258 | PositionSource.java | starcoder |
package com.sun.javafx.scene.traversal;
import com.sun.javafx.application.PlatformImpl;
import com.sun.javafx.scene.NodeHelper;
import javafx.geometry.BoundingBox;
import javafx.geometry.Bounds;
import javafx.scene.Node;
import javafx.scene.Parent;
import java.util.ArrayList;
import java.util.List;
/**
* This is ab... | javafx-sdk-11.0.2/lib/src/javafx.graphics/com/sun/javafx/scene/traversal/TraversalEngine.java | 0.962778 | 0.417331 | TraversalEngine.java | starcoder |
package org.recast4j.demo.geom;
import static java.util.stream.Collectors.toList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.function.Predicate;
import org.recast4j.demo.geom.ChunkyTriMesh.ChunkyTriMeshNode;
import org.recast4j.recast.... | recast-demo/src/main/java/org/recast4j/demo/geom/DemoInputGeomProvider.java | 0.88113 | 0.48249 | DemoInputGeomProvider.java | starcoder |
import javafx.scene.paint.Color;
import java.util.*;
/**
*
* @author Group 12: <NAME>, <NAME>, <NAME>
* This class creates, populates, and updates a Scene representing the Wa-Tor predator/prey simulation
* The class populates a grid with fish, sharks, and empty space
* It applies rules about movement, eating, dyi... | cellsociety/src/Predator.java | 0.546496 | 0.487307 | Predator.java | starcoder |
package io.improbable.keanu.vertices.dbl;
import java.util.Map;
import java.util.function.Function;
import io.improbable.keanu.kotlin.DoubleOperators;
import io.improbable.keanu.tensor.dbl.DoubleTensor;
import io.improbable.keanu.vertices.Vertex;
import io.improbable.keanu.vertices.dbl.nonprobabilistic.ConstantDoubl... | keanu-project/src/main/java/io/improbable/keanu/vertices/dbl/DoubleVertex.java | 0.806243 | 0.666951 | DoubleVertex.java | starcoder |
package str.rad.util.audio;
public class FFTWindow {
private FFTWindow() { } // Allow only static access
public static double[] get2CoefWindowUniversalWithoutLimit(int arrayLen, int startIndexForWindowCalculation, double a0, double a1, int windowSize) {
double[] result = new double[arrayLen];
... | src/str/rad/util/audio/FFTWindow.java | 0.709724 | 0.454109 | FFTWindow.java | starcoder |
package io.improbable.keanu.vertices;
import io.improbable.keanu.tensor.Tensor;
import io.improbable.keanu.tensor.bool.BooleanTensor;
import io.improbable.keanu.tensor.dbl.DoubleTensor;
import io.improbable.keanu.tensor.generic.GenericTensor;
import io.improbable.keanu.tensor.intgr.IntegerTensor;
import io.improbable.... | keanu-project/src/main/java/io/improbable/keanu/vertices/ConstantVertex.java | 0.793306 | 0.772745 | ConstantVertex.java | starcoder |
package org.spongepowered.api.world.gen.populator;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.data.type.DoublePlantType;
import org.spongepowered.api.util.ResettableBuilder;
import org.spongepowered.api.util.weighted.VariableAmount;
import org.spongepowered.api.util.weighted.WeightedTable;
impor... | src/main/java/org/spongepowered/api/world/gen/populator/DoublePlant.java | 0.885464 | 0.408867 | DoublePlant.java | starcoder |
package org.opensmartgridplatform.dto.valueobjects.smartmetering;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Objects;
public class ConfigureDefinableLoadProfileRequestDto implements ActionRequestDto {
private final String deviceIdentific... | osgp/shared/osgp-dto/src/main/java/org/opensmartgridplatform/dto/valueobjects/smartmetering/ConfigureDefinableLoadProfileRequestDto.java | 0.879974 | 0.452354 | ConfigureDefinableLoadProfileRequestDto.java | starcoder |
package gov.nih.nci.rembrandt.domain;
/**
* A primary or secondary outcome that can be measured objectively to determine whether or not an intervention under study
* is beneficial. The endpoints of a clinical trial are usually included in the study objectives. Some examples of
* endpoints are survival, improvem... | src/gov/nih/nci/rembrandt/domain/Endpoint.java | 0.814754 | 0.527256 | Endpoint.java | starcoder |
package com.intenginetech.recorder.recording;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
/**
* An AudioChunk is a audio data wrapper.
*
* @time 2018/4/10.
*/
public interface AudioChunk {
double maxAmplitude();
byte[] toBytes();
short[] toShorts();
int readCount();
void readCou... | recorder/src/main/java/com/intenginetech/recorder/recording/AudioChunk.java | 0.930868 | 0.449634 | AudioChunk.java | starcoder |
package FeatureProperties;
import kaptainwutax.seedutils.mc.ChunkRand;
import kaptainwutax.seedutils.mc.pos.CPos;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicInteger;
public class StructureSeedThread implements Runnable{
private int offset, totalThreads;
private long start;
//Che... | MineAChunkSeedfinding/src/main/java/FeatureProperties/StructureSeedThread.java | 0.537041 | 0.406921 | StructureSeedThread.java | starcoder |
package org.andromda.translation.ocl.validation;
import org.apache.commons.lang.BooleanUtils;
/**
* Used to translate OCL expressions to their corresponding Java expressions.
*/
public final class OCLExpressions
{
/**
* @param first
* @param second
* @return first.equals(second)
... | translation-libraries/ocl/andromda-validation/src/main/java/org/andromda/translation/ocl/validation/OCLExpressions.java | 0.923446 | 0.431345 | OCLExpressions.java | starcoder |
package dna.updates.generators.sampling;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import dna.graph.Graph;
import dna.graph.nodes.Node;
import dna.updates.generators.sampling.startNode.StartNodeSelectionStrategy;
/**
* A sampling algorithm based on breadth first search
*
... | Dataset/JC/valid/bfs/java/204.java | 0.871693 | 0.422803 | 204.java | starcoder |
<p style="font-style: italic; font-size:larger">
<b>Note:</b> The declarations in this package have been superseded by those
in the package {@link jdk.javadoc.doclet}.
For more information, see the <i>Migration Guide</i> in the documentation for that package.
</p>
The Doclet API (also called the Javadoc API) provides ... | jdk11/jdk.javadoc/com/sun/javadoc/package-info.java | 0.82108 | 0.640355 | package-info.java | starcoder |
package io.jeffrey.vector.math;
import io.jeffrey.vector.VectorRegister1;
import io.jeffrey.vector.VectorRegister3;
import io.jeffrey.vector.VectorRegister6;
/**
* Easy math around dealing with lines
*
* @author jeffrey
*/
public class Lines {
/**
* are the three vectors colinear when written as a line [... | src/main/java/io/jeffrey/vector/math/Lines.java | 0.818338 | 0.641324 | Lines.java | starcoder |
package com.tinkerpop.blueprints;
import com.tinkerpop.blueprints.impls.GraphTest;
import java.util.List;
/**
* @author <NAME> (http://markorodriguez.com)
*/
public class QueryTestSuite extends TestSuite {
public QueryTestSuite() {
}
public QueryTestSuite(final GraphTest graphTest) {
super(gr... | blueprints-test/src/main/java/com/tinkerpop/blueprints/QueryTestSuite.java | 0.805403 | 0.55917 | QueryTestSuite.java | starcoder |
package org.opencds.cqf.cql.elm.execution;
import org.opencds.cqf.cql.execution.Context;
import org.opencds.cqf.cql.runtime.*;
/*
same precision or before(left DateTime, right DateTime) Boolean
same precision or before(left DateTime, right DateTime) Boolean
The same-precision-or before operator compares two date/tim... | cql-execution-service/cql_engine/cql-engine/src/main/java/org/opencds/cqf/cql/elm/execution/SameOrBeforeEvaluator.java | 0.912469 | 0.591576 | SameOrBeforeEvaluator.java | starcoder |
package calculator;
import java.util.Set;
import java.util.function.Function;
import java.util.HashMap;
import java.util.Map;
import java.lang.Math;
import java.util.ArrayList;
/**
* Class used to map identifiers composed of strings to functional objects.
*/
public class Functions {
private Map<String, ArrayList<M... | calculator/Functions.java | 0.829181 | 0.449695 | Functions.java | starcoder |
package ch.hslu.ad.sw10;
import java.util.Arrays;
import java.util.Random;
public class Sort {
public static void bubbleSort(final int[] a) {
ch.hslu.ad.sw09.ex04.Sort.bubbleSort(a);
}
/**
* Sorts an int-Array from a[1]
*
* @param a int-array
*/
public static void inserti... | src/main/java/ch/hslu/ad/sw10/Sort.java | 0.727589 | 0.487063 | Sort.java | starcoder |
package picard.metrics;
import htsjdk.samtools.SAMReadGroupRecord;
import htsjdk.samtools.SAMRecord;
import htsjdk.samtools.metrics.MetricBase;
import htsjdk.samtools.metrics.MetricsFile;
import htsjdk.samtools.reference.ReferenceSequence;
import picard.PicardException;
import picard.analysis.MetricAccumulationLevel;
... | src/main/java/picard/metrics/MultiLevelCollector.java | 0.774967 | 0.455138 | MultiLevelCollector.java | starcoder |
* <h2>Monitoring framework</h2>
*
* This package contains classes to allow the monitoring of a stream of
* documents with a set of queries.
*
* To use, instantiate a {@link org.apache.lucene.monitor.Monitor} object,
* register queries with it via
* {@link org.apache.lucene.monitor.Monitor#register(org.apache.lu... | lucene/monitor/src/java/org/apache/lucene/monitor/package-info.java | 0.938117 | 0.577912 | package-info.java | starcoder |
package KDTree;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import KDTree.Point3D;
import javafx.util.Pair;
public class KDTree {
public Node rootNode;
private int size = 0;
private ArrayList<Point3D> coordiantes;
public ArrayList<Point3D> range_... | src/KDTree/KDTree.java | 0.689306 | 0.518973 | KDTree.java | starcoder |
package net.jini.core.event;
import java.rmi.MarshalledObject;
/**
* The base class or superclass for remote events. <p> The abstract state contained in a RemoteEvent
* object includes a reference to the object in which the event occurred, a long which identifies
* the kind of event relative to the object in which... | xap-core/xap-common/src/main/java/net/jini/core/event/RemoteEvent.java | 0.872646 | 0.67882 | RemoteEvent.java | starcoder |
package de.ruhrunibochum.calendar;
import de.ruhrunibochum.lecture.LectureSeries;
import java.util.*;
/**
* Record Manager class (Singleton design pattern + facade)
*/
public class CustomCalender {
private static CustomCalender instance;
private final Map<Date, LectureSeries> lectureSeriesDates;
/**
... | src/main/java/de/ruhrunibochum/calendar/CustomCalender.java | 0.926794 | 0.462716 | CustomCalender.java | starcoder |
* String Rotation: Assume you have a method isSubstring which checks if _01one word is a substring
* of another. Given _02two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only _01one
* call to isSubstring (e.g.,"waterbottle" is a rotation of"erbottlewat").
* Hints: #34, #88, #104
* - If ... | chapter/_01one/IntQuest9.java | 0.795102 | 0.57678 | IntQuest9.java | starcoder |
package simulation;
import javafx.util.Pair;
import java.util.Map;
import java.util.Random;
/**
* Represents cell from Spreading of Fire Simulation.
*
* States:
* 0 = empty (empty ground or burnt tree)
* 1 = tree (tree that is not burning)
* 2 = burning (tree that is burning)
* Number after decimal point = Pro... | src/simulation/FireCell.java | 0.816443 | 0.527012 | FireCell.java | starcoder |
package de.micromata.opengis.kml.v_2_2_0.gx;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotati... | src/main/java/de/micromata/opengis/kml/v_2_2_0/gx/LatLonQuad.java | 0.85022 | 0.403626 | LatLonQuad.java | starcoder |
package org.apache.nifi.hazelcast.services.cache;
import java.util.function.Predicate;
/**
* Represents a cache storage. The API gives no restriction for the data structure used or to the Hazelcast setup. There
* can be multiple separate cache instances, sharing the same underlying Hazelcast. The cache instances wi... | nifi-nar-bundles/nifi-hazelcast-bundle/nifi-hazelcast-services-api/src/main/java/org/apache/nifi/hazelcast/services/cache/HazelcastCache.java | 0.903077 | 0.407451 | HazelcastCache.java | starcoder |
package org.yenbo.jp.com.rkt;
import java.math.BigInteger;
import org.junit.Assert;
import org.junit.Test;
public class Rectilinear {
@Test
public void test1() {
Assert.assertEquals(42, new Solution().solution(-4, 1, 2, 6, 0, -1, 4, 3));
}
@Test
public void test2() {
Assert.assertEquals... | src/main/java/org/yenbo/jp/com/rkt/Rectilinear.java | 0.767429 | 0.472805 | Rectilinear.java | starcoder |
package de.captaingoldfish.scim.sdk.common.tree;
import java.util.HashSet;
import java.util.Set;
/**
* this implementation represents a tree with several root-nodes and each node might have several parents and
* several children. This tree implementation is not thread-safe!
*
* @author <NAME>
* @since 25.03.202... | scim-sdk-common/src/main/java/de/captaingoldfish/scim/sdk/common/tree/GenericTree.java | 0.876278 | 0.504272 | GenericTree.java | starcoder |
package com.github.EmmanueleBollino.solcraft.soliditycomponents;
import java.util.*;
public class Contract implements Extendable {
private String name;
private Constructor constructor;
private final Map<Extendable, List<Value>> extendeds;
private final Set<Variable> attributes;
private final Set<F... | src/main/java/com/github/EmmanueleBollino/solcraft/soliditycomponents/Contract.java | 0.887003 | 0.41567 | Contract.java | starcoder |
package org.jenetics.engine;
import static java.lang.Math.round;
import static java.lang.String.format;
import static java.util.Objects.requireNonNull;
import static org.jenetics.Population.toPopulation;
import static org.jenetics.internal.util.require.probability;
import java.time.Clock;
import java.util.Iterator;
i... | org.jenetics/src/main/java/org/jenetics/engine/Engine.java | 0.832543 | 0.406626 | Engine.java | starcoder |
package steamcondenser.steam.packets;
import steamcondenser.PacketBuffer;
/**
* This module implements the basic functionality used by most of the packets
* used in communication with master, Source or GoldSrc servers.
*
* @author <NAME>
* @see SteamPacketFactory
*/
abstract public class SteamPacket {
publ... | src/main/java/steamcondenser/steam/packets/SteamPacket.java | 0.718594 | 0.430686 | SteamPacket.java | starcoder |
package LBJ2.infer;
import java.util.AbstractMap;
import java.util.Collection;
import java.util.Iterator;
import java.util.Vector;
/**
* A quantifier is a first order constraint parameterized by an object taken
* from a Java <code>Collection</code> of objects.
*
* @author <NAME>
**/
public abstract class Qu... | src/main/java/LBJ2/infer/Quantifier.java | 0.853562 | 0.429011 | Quantifier.java | starcoder |
package com.opengamma.web.security;
import com.opengamma.financial.security.FinancialSecurityVisitorSameValueAdapter;
import com.opengamma.financial.security.bond.CorporateBondSecurity;
import com.opengamma.financial.security.bond.GovernmentBondSecurity;
import com.opengamma.financial.security.bond.MunicipalBondSecuri... | projects/OG-Web/src/main/java/com/opengamma/web/security/SecurityTemplateNameProvider.java | 0.780035 | 0.572484 | SecurityTemplateNameProvider.java | starcoder |
package org.jeo.feature;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.vividsolutions.jts.geom.Geometry;
/**
* Feature utility class.
*
* @author <NAME>, OpenGeo
*/
public class Features {
/**
* Retypes a feature object to a new schema.
... | core/src/main/java/org/jeo/feature/Features.java | 0.874037 | 0.418935 | Features.java | starcoder |
package assignment2;
import java.util.ArrayList;
/**
* Models a simple game tree that can be used to test the Minimax and Alpha-Beta Pruning algorithms.
* @author <NAME> and <NAME>
*
*/
public class TestState implements State{
// Store the list of successors.
private ArrayList<State> successors;
// Store t... | The Mad King Artificial Intelligence/src/assignment2/TestState.java | 0.54952 | 0.509703 | TestState.java | starcoder |
package matrix;
/**
* <h3>Strassen matrix multiplier</h3>
* <p>
* This multiplier is implemented according to Strassen algorithm. Its time complexity is O(n^lg7).
* To simplify the implementation, we require the dimension of the input matrices must be a power of 2.
*/
public class StrassenMultiplier implements Ma... | src/matrix/StrassenMultiplier.java | 0.917714 | 0.65012 | StrassenMultiplier.java | starcoder |
package org.gavrog.joss.dsyms.derived;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.gavrog.box.collections.Pair;
import org.gavrog.jane.fpgroups.Alphabet;
import org.gavrog.jane.fpgroups.FiniteAlphabet;
import org.gavrog.jane.fpgroups.FreeWord;
import org.gavrog.joss.dsyms.basic.DSymb... | test/org/gavrog/joss/dsyms/derived/TestFundamentalGroup.java | 0.628293 | 0.423041 | TestFundamentalGroup.java | starcoder |
package com.actinarium.rhythm.layer;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.support.annotation.IntRange;
import com.actinarium.rhythm.AbstractSpecLayerGroup;
import com.actinarium.rhythm.RhythmInflationException;
import com.actinarium.rhythm.ArgumentsBundle;
import com.actinarium.... | rhythm/src/main/java/com/actinarium/rhythm/layer/Columns.java | 0.937397 | 0.488893 | Columns.java | starcoder |
package eu.yvka.shadersloth.share.context;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
public class AbstractContext implements Serializable {
/**
* Abstraction of a property in order to achieve type type safety.
* @param <T> the type of the property value
*/
private static ... | src/main/java/eu/yvka/shadersloth/share/context/AbstractContext.java | 0.870212 | 0.459137 | AbstractContext.java | starcoder |
package android.service.quickaccesswallet;
import android.annotation.NonNull;
import android.os.Parcel;
import android.os.Parcelable;
/**
* Represents a request to a {@link QuickAccessWalletService} for {@link WalletCard walletCards}.
* Wallet cards may represent anything that a user might carry in their wallet -- ... | android-31/src/android/service/quickaccesswallet/GetWalletCardsRequest.java | 0.940572 | 0.444685 | GetWalletCardsRequest.java | starcoder |
* I believe with my current implementation -- I cannot guarantee an optimal result,
* as is the nature of greedy algorithms, it can be optimal under the right circumstances.
* For some parameters such as [1,2,4,8,2^n], this implementation will guarantee the optimal
* result because the values are spaced out well en... | Greedy Algorithms/Currency Denominations/Java/MoneyDispenser.java | 0.665302 | 0.665227 | MoneyDispenser.java | starcoder |
package io.github.linuxforhealth.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Each expression defines how to extract the value for a field. The execute method defines the
* extraction process.
*
*
* @author pbhallam
*/
public interface Expressio... | src/main/java/io/github/linuxforhealth/api/Expression.java | 0.86012 | 0.405979 | Expression.java | starcoder |
package org.wso2.extension.siddhi.execution.extrema;
import io.siddhi.annotation.Example;
import io.siddhi.annotation.Extension;
import io.siddhi.annotation.Parameter;
import io.siddhi.annotation.ReturnAttribute;
import io.siddhi.annotation.util.DataType;
import io.siddhi.query.api.definition.Attribute;
import org.wso... | component/src/main/java/org/wso2/extension/siddhi/execution/extrema/BottomKTimeBatchStreamProcessorExtension.java | 0.861829 | 0.40248 | BottomKTimeBatchStreamProcessorExtension.java | starcoder |
package util.stream;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* Represents an object whose contents may be strea... | src/main/java/util/stream/Streamable.java | 0.948286 | 0.491334 | Streamable.java | starcoder |
package nlp.lowbow.eigenLowbow;
import algebra.LineGradient;
import algebra.LineLaplacian;
import algebra.Matrix;
import algebra.Vector;
import nlp.lowbow.simpleLowBow.BaseLowBow;
import nlp.segmentedBow.BaseSegmentedBow;
import nlp.segmentedBow.sub.SegmentedBowFactory;
import nlp.symbolSampler.SymbolSampler;
import ... | src/main/java/nlp/lowbow/eigenLowbow/EigenLowBow.java | 0.894525 | 0.532 | EigenLowBow.java | starcoder |
package domain;
import helpers.CustomArrayList;
import java.util.Random;
import helpers.Distance;
/**
* <h1>World</h1>
* This class provides the 2D tiled map that is used in the game. Currently the
* map has only corridors and walls.
*/
public class World {
int width;
int height;
int[][] map;
boo... | Tractus/src/main/java/domain/World.java | 0.851614 | 0.421909 | World.java | starcoder |
package walkingkooka.text;
import org.junit.jupiter.api.Test;
import walkingkooka.HashCodeEqualsDefinedTesting2;
import walkingkooka.ToStringTesting;
import walkingkooka.reflect.TypeNameTesting;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertSame;
imp... | src/main/java/walkingkooka/text/CharSequenceTesting.java | 0.89033 | 0.596874 | CharSequenceTesting.java | starcoder |
package algorithms.imageProcessing.features;
import algorithms.imageProcessing.FFTUtil;
import algorithms.imageProcessing.GreyscaleImage;
import algorithms.imageProcessing.ImageProcessor;
import algorithms.imageProcessing.LowPassFilter;
import algorithms.imageProcessing.NonMaximumSuppression;
import algorithms.imagePr... | src/algorithms/imageProcessing/features/PhaseCongruencyDetector2.java | 0.864539 | 0.499084 | PhaseCongruencyDetector2.java | starcoder |
package ImageFilters;
import java.security.InvalidParameterException;
public class Filter {
private final double[][] coefficients;
private final int sizeX;
private final int sizeY;
public Filter(double[][] coefficients) {
int sizeX = coefficients[0].length;
for (double[] line : coef... | Client-Server Filters/Server_for_ServerCalculatingSystem/src/ImageFilters/Filter.java | 0.801159 | 0.409693 | Filter.java | starcoder |
package dalclient;
/**
* Call a Simple Image Access (SIA) service and download a number of the
* images referenced in the query result table.
*
* Usage: siap4 ra dec size [format [maximages [serviceURL]]]
*
* Or call with no args for the built-in unit test.
*
* Original version - D.Tody August 2005
*/... | voclient/dalclient/examples/siap4.java | 0.772187 | 0.453504 | siap4.java | starcoder |
*
*/
package info.rmapproject.core.rdfhandler;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import info.rmapproject.core.exception.RMapDefectiveArgumentException;
import info.rmapproject.core.exception.RMapException;
import info.rmapproject.core.model.RMapTriple;
import info.rmap... | core/src/main/java/info/rmapproject/core/rdfhandler/RDFHandler.java | 0.808521 | 0.438905 | RDFHandler.java | starcoder |
package org.batfish.datamodel.collections;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
import java.util.SortedSet;
import org.batfish.role.OutliersHypothesis;
public class NamedStructureOutlierSet<T> extends AbstractOutlierSet
... | projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/collections/NamedStructureOutlierSet.java | 0.891941 | 0.406567 | NamedStructureOutlierSet.java | starcoder |
package ch.epfl.bbp.shaded.opennlp.tools.chunker;
import java.util.ArrayList;
import java.util.List;
import ch.epfl.bbp.shaded.opennlp.tools.util.Sequence;
/** Features based on chunking model described in Fei Sha and <NAME>. Shallow
* parsing with conditional random fields. In Proceedings of HLT-NAACL 2003. As... | modules/bluima_opennlp/src/main/java/ch/epfl/bbp/shaded/opennlp/tools/chunker/DefaultChunkerContextGenerator.java | 0.673621 | 0.429071 | DefaultChunkerContextGenerator.java | starcoder |
package com.iris.capability.util;
import java.util.Map;
import com.google.common.collect.ImmutableMap;
/**
* Currently the class only supports US phone number
* @author daniellep
*
*/
public class PhoneNumber implements Cloneable {
public static final String DEFAULT_COUNTRY_CODE = "1"; // default US countr... | common/arcus-model/src/main/java/com/iris/capability/util/PhoneNumber.java | 0.72487 | 0.41567 | PhoneNumber.java | starcoder |
package org.corpus_tools.hexatomic.grid.internal.data;
import static org.junit.Assert.assertNull;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.a... | tests/org.corpus_tools.hexatomic.grid.tests/src/main/java/org/corpus_tools/hexatomic/grid/internal/data/TestColumnHeaderDataProvider.java | 0.896302 | 0.490968 | TestColumnHeaderDataProvider.java | starcoder |
package us.ihmc.quadrupedRobotics.planning.bodyPath;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import controller_msgs.msg.dds.EuclideanTrajectoryPointMessage;
import controller_msgs.msg.dds.QuadrupedBodyPathPlanMessage;
import us.ihmc.communication.ROS2Tools;
import us.ihmc.communicat... | ihmc-quadruped-robotics/src/main/java/us/ihmc/quadrupedRobotics/planning/bodyPath/QuadrupedWaypointBasedBodyPathProvider.java | 0.845847 | 0.477432 | QuadrupedWaypointBasedBodyPathProvider.java | starcoder |
package com.numericalmethod.suanshu.stats.random.univariate.gamma;
import static com.numericalmethod.suanshu.misc.SuanShuUtils.assertArgument;
import com.numericalmethod.suanshu.stats.random.univariate.RandomLongGenerator;
import com.numericalmethod.suanshu.stats.random.univariate.normal.RandomStandardNormalNumberGene... | src/main/java/com/numericalmethod/suanshu/stats/random/univariate/gamma/MarsagliaTsang2000.java | 0.940973 | 0.612368 | MarsagliaTsang2000.java | starcoder |
package org.modeshape.jcr.query.optimize;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import javax.jcr.query.qom.Constraint;
import org.modeshape.common... | modeshape-jcr/src/main/java/org/modeshape/jcr/query/optimize/AddIndexes.java | 0.891705 | 0.413892 | AddIndexes.java | starcoder |
package gov.sandia.cognition.generator.matrix;
import gov.sandia.cognition.statistics.distribution.DataCountTreeSetBinnedMapHistogram;
import java.util.Map;
/**
* @TODO - add description
*
* @author zobenz
* @since 2.0
*/
public class SGMScoreDistribution
{
private DataCountTreeSetBinnedMapHistogram<SGMScore... | Source/gov/sandia/cognition/generator/matrix/SGMScoreDistribution.java | 0.632276 | 0.413536 | SGMScoreDistribution.java | starcoder |
package com.opengamma.strata.pricer.impl.credit.isda;
import java.time.LocalDate;
import java.time.Period;
import java.util.function.Function;
import com.opengamma.strata.basics.date.DayCount;
import com.opengamma.strata.basics.date.DayCounts;
import com.opengamma.strata.basics.schedule.StubConvention;
import com.ope... | modules/pricer/src/main/java/com/opengamma/strata/pricer/impl/credit/isda/IsdaCompliantCurveCalibrator.java | 0.765506 | 0.531513 | IsdaCompliantCurveCalibrator.java | starcoder |
package lang.java;
import norswap.utils.exceptions.Exceptional;
import org.testng.Assert;
import org.testng.annotations.Test;
import static norswap.lang.java.LexUtils.*;
import static org.testng.Assert.assertTrue;
public final class TestLexUtils
{
// --------------------------------------------------------------... | test/lang/java/TestLexUtils.java | 0.827793 | 0.721688 | TestLexUtils.java | starcoder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.