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 com.thomsonreuters.upa.codec;
/**
* UPA entry for {@link Array} that can house only simple primitive types
* such as {@link Int}, {@link Real}, or {@link Date}.
*
* @see Array
*/
public interface ArrayEntry
{
/**
* Clears {@link ArrayEntry} object. Useful for object reuse during encoding.
*... | Java/Eta/Core/src/main/java/com/thomsonreuters/upa/codec/ArrayEntry.java | 0.952684 | 0.51501 | ArrayEntry.java | starcoder |
package frc.robot;
/**
* The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean
* constants. This class should not be used for any other purpose. All constants should be declared
* globally (i.e. public static). Do not put anything functional in this class.
*
* <p>It is... | src/main/java/frc/robot/Constants.java | 0.862352 | 0.557424 | Constants.java | starcoder |
package de.dennisguse.opentracks.viewmodels;
import android.content.Context;
import androidx.test.core.app.ApplicationProvider;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import de.dennisguse.opentracks.R;
import de.dennisguse.opentracks.content.data.Track;
import de.de... | src/androidTest/java/de/dennisguse/opentracks/viewmodels/AggregatedStatisticsTest.java | 0.903163 | 0.509581 | AggregatedStatisticsTest.java | starcoder |
package org.spongycastle.crypto.digests;
import org.spongycastle.crypto.ExtendedDigest;
import org.spongycastle.crypto.engines.ThreefishEngine;
import org.spongycastle.crypto.params.SkeinParameters;
import org.spongycastle.util.Memoable;
/**
* Implementation of the Skein parameterised hash function in 256, 512 and 1... | core/src/main/java/org/spongycastle/crypto/digests/SkeinDigest.java | 0.884975 | 0.400075 | SkeinDigest.java | starcoder |
package com.github.vlsi.pru.plc110;
public class JumpInstruction extends Format2Instruction implements Jump {
public final Register dstRegister;
public int op2;
public final boolean op2IsRegister;
public final Label target;
private JumpInstruction(
Operation op,
boolean op2IsRegister, int op2,
... | src/main/java/com/github/vlsi/pru/plc110/JumpInstruction.java | 0.766818 | 0.487185 | JumpInstruction.java | starcoder |
package org.sosy_lab.java_smt.solvers.mathsat5;
import static org.sosy_lab.java_smt.solvers.mathsat5.Mathsat5NativeApi.msat_make_equal;
import static org.sosy_lab.java_smt.solvers.mathsat5.Mathsat5NativeApi.msat_make_fp_cast;
import static org.sosy_lab.java_smt.solvers.mathsat5.Mathsat5NativeApi.msat_make_fp_div;
impo... | src/org/sosy_lab/java_smt/solvers/mathsat5/Mathsat5FloatingPointFormulaManager.java | 0.768386 | 0.424293 | Mathsat5FloatingPointFormulaManager.java | starcoder |
package se.kodapan.util.geography.gausskruger;
/**
* @author kalle
* @since 2013-11-05 03:26
*/
public abstract class Projection {
public abstract double getCentralMeridian();
public abstract double getFlattening();
public abstract double getAxis();
public abstract double getScale();
public abstract ... | src/main/java/se/kodapan/util/geography/gausskruger/Projection.java | 0.815159 | 0.464173 | Projection.java | starcoder |
package com.xt.leetcode;
import java.util.HashMap;
import java.util.Map;
/**
* 2049. 统计最高分的节点数目
* 每日一题:2022.03.11
* 完成日期:2022.03.11
* 链接:https://leetcode-cn.com/problems/count-nodes-with-the-highest-score/
* 描述:
* 给你一棵根节点为 0 的 二叉树 ,它总共有 n 个节点,节点编号为 0 到 n - 1 。同时给你一个下标从 0 开始的整数数组 parents 表示这棵树,其中 parents[i] 是节点 ... | src/com/xt/leetcode/Solution2049.java | 0.685213 | 0.467028 | Solution2049.java | starcoder |
package no.uib.cipr.matrix;
/**
* Upper triangular dense matrix. It has the same storage layout as the
* {@link no.uib.cipr.matrix.DenseMatrix DenseMatrix}, but only refers to
* elements above or on the main diagonal. The remaining elements are assumed to
* be zero, but since they are never accessed, they need no... | libs/matrix-toolkits-java-mtj-1.0.1/src/main/java/no/uib/cipr/matrix/UpperTriangDenseMatrix.java | 0.952408 | 0.77535 | UpperTriangDenseMatrix.java | starcoder |
package org.md2k.mcerebrumapi.core.data.point;
import android.os.Parcel;
import androidx.test.filters.SmallTest;
import org.junit.Before;
import org.junit.Test;
import org.md2k.mcerebrumapi.core.datakitapi.TestingConstants;
import org.md2k.mcerebrumapi.core.data.MCData;
import static org.hamcrest.core.Is.is;
import ... | core/src/androidTest/java/org/md2k/mcerebrumapi/core/data/point/DataBooleanTest.java | 0.841631 | 0.628479 | DataBooleanTest.java | starcoder |
package com.samrash.tools.parser;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
class ArgumentList {
private final int originalSize;
private final List<Argument> arguments;
ArgumentList(List<String... | tools/src/main/java/com/samrash/tools/parser/ArgumentList.java | 0.909118 | 0.402245 | ArgumentList.java | starcoder |
package io.debezium.relational.mapping;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.function.Predicate;
import org.apache.kafka.connect.errors.ConnectException;
import io.debezium.annotation.Immutable;
import io.debezium.config.Configuration;
import io.debezium.func... | debezium-core/src/main/java/io/debezium/relational/mapping/ColumnMappers.java | 0.926212 | 0.491273 | ColumnMappers.java | starcoder |
package javax.swing;
import java.util.*;
/**
* This class provides the validation mechanism for Swing components. GUIs often
* need to ensure that the components are in a valid state before allowing the
* user to navigate the input focus. To do this, clients create a subclass of
* {@code InputVerifier} and, using... | classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/InputVerifier.java | 0.93779 | 0.527377 | InputVerifier.java | starcoder |
package javax.crypto.spec;
import java.security.InvalidKeyException;
/** {@collect.stats}
* This class specifies a DES-EDE ("triple-DES") key.
*
* @author <NAME>
*
* @since 1.4
*/
public class DESedeKeySpec implements java.security.spec.KeySpec {
/** {@collect.stats}
* The constant which defines the l... | java-api/javax/crypto/spec/DESedeKeySpec.java | 0.960473 | 0.452959 | DESedeKeySpec.java | starcoder |
package com.interview.companies.amazon;
import java.util.*;
public class TopNBuzzWords {
//https://leetcode.com/discuss/interview-question/460127/
//Return a list of strings of the most popular N toys in order of most to least frequently mentioned
/*
Input:
numToys = 6
topToys = 2
toys =... | src/com/interview/companies/amazon/TopNBuzzWords.java | 0.79542 | 0.507141 | TopNBuzzWords.java | starcoder |
package org.ow2.asmdex.structureCommon;
import java.util.ArrayList;
import org.ow2.asmdex.instruction.Instruction;
/**
* A label represents a position in the bytecode of a method. Labels are used
* for jump, goto, and switch instructions, and for try catch blocks. A label
* designates the <i>instruction</i> that ... | app/src/main/java/org/ow2/asmdex/structureCommon/Label.java | 0.834508 | 0.42668 | Label.java | starcoder |
package io.github.ititus.aoc.aoc19.day16;
import io.github.ititus.aoc.common.Aoc;
import io.github.ititus.aoc.common.AocInput;
import io.github.ititus.aoc.common.AocSolution;
import io.github.ititus.math.time.DurationFormatter;
import io.github.ititus.math.time.StopWatch;
import java.time.Duration;
@Aoc(year = 2019,... | src/main/java/io/github/ititus/aoc/aoc19/day16/Day16.java | 0.829112 | 0.566258 | Day16.java | starcoder |
package io.atomix.copycat.server.storage;
import io.atomix.catalyst.buffer.*;
import io.atomix.catalyst.serializer.Serializer;
import io.atomix.catalyst.util.Assert;
import io.atomix.copycat.server.storage.entry.Entry;
import io.atomix.copycat.server.storage.util.OffsetIndex;
import io.atomix.copycat.server.storage.ut... | server/src/main/java/io/atomix/copycat/server/storage/Segment.java | 0.918885 | 0.567218 | Segment.java | starcoder |
package org.jsapar.parse;
import org.jsapar.schema.SchemaCellFormat;
/**
* This class is used as a way for the parser to report back parsing errors. The
* class contains error information about a cell that failed to parse.
*
*/
public final class CellParseException extends LineParseException {
pri... | src/main/java/org/jsapar/parse/CellParseException.java | 0.892246 | 0.421314 | CellParseException.java | starcoder |
package io.micronaut.oraclecloud.atp.wallet;
import oracle.security.pki.OracleWallet;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
/** Services for reading Oracle {@code cwallet.sso} ... | oraclecloud-atp/src/main/java/io/micronaut/oraclecloud/atp/wallet/Wallets.java | 0.835785 | 0.480905 | Wallets.java | starcoder |
package dev.lyze.retro.utils;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.maps.tiled.TiledMap;
import com.badlogic.gdx.maps.tiled.TiledMapTile;
import com.badlogic.gdx.maps.tiled.TiledMapTileLayer;
import com.badlogic.gdx.maps.tiled.renderers.Orth... | core/src/main/java/dev/lyze/retro/utils/OrthogonalTiledMapRendererBleeding.java | 0.791902 | 0.422147 | OrthogonalTiledMapRendererBleeding.java | starcoder |
package org.jdesktop.swingx.graphics;
import java.awt.Composite;
import java.awt.CompositeContext;
import java.awt.RenderingHints;
import java.awt.image.ColorModel;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
/**
* <p>A blend composite defines the rule according to which a drawing primitive
... | batik/src/main/java/org/jdesktop/swingx/graphics/BlendComposite.java | 0.896455 | 0.485661 | BlendComposite.java | starcoder |
package org.deeplearning4j.nn.layers.convolution.upsampling;
import lombok.extern.slf4j.Slf4j;
import org.deeplearning4j.exception.DL4JInvalidInputException;
import org.deeplearning4j.nn.conf.CNN2DFormat;
import org.deeplearning4j.nn.conf.NeuralNetConfiguration;
import org.deeplearning4j.nn.conf.layers.BaseUpsamplingL... | deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/convolution/upsampling/Upsampling1D.java | 0.873781 | 0.440168 | Upsampling1D.java | starcoder |
package au.gov.asd.tac.constellation.views.attributecalculator.panes;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author twilight_sparkle
*/
public class DefaultCalculatorTemplateCategoryDescriptions extends AbstractCalculatorTemplateCategoryDescriptions {
private static final Map<String, String[... | CoreAttributeCalculatorView/src/au/gov/asd/tac/constellation/views/attributecalculator/panes/DefaultCalculatorTemplateCategoryDescriptions.java | 0.876595 | 0.570391 | DefaultCalculatorTemplateCategoryDescriptions.java | starcoder |
package com.google.common.collect;
import com.google.common.annotations.GwtIncompatible;
/**
* "Overrides" the {@link ImmutableMap} static methods that lack {@link ImmutableSortedMap}
* equivalents with deprecated, exception-throwing versions. See {@link
* ImmutableSortedSetFauxverideShim} for details.
*
* @auth... | android/guava/src/com/google/common/collect/ImmutableSortedMapFauxverideShim.java | 0.92222 | 0.414129 | ImmutableSortedMapFauxverideShim.java | starcoder |
package io.github.utk003.util.math.solve;
import io.github.utk003.util.math.complex.ComplexDouble;
import io.github.utk003.util.math.complex.ComplexFloat;
import io.github.utk003.util.math.complex.ComplexNumber;
import io.github.utk003.util.misc.annotations.ScheduledForRelease;
import org.jetbrains.annotations.ApiStat... | src/main/java/io/github/utk003/util/math/solve/QuadraticSolution.java | 0.942566 | 0.5425 | QuadraticSolution.java | starcoder |
package org.mapstruct.ap.internal.model.common;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import org.mapstruct.ap.internal.util.JavaTimeConstants;
import org.mapstruct.ap.internal.util.JodaTimeConstants;
import org.mapstruct.ap.internal.uti... | processor/src/main/java/org/mapstruct/ap/internal/model/common/DateFormatValidatorFactory.java | 0.91804 | 0.407923 | DateFormatValidatorFactory.java | starcoder |
package de.katzenpapst.amunra.world.anubis;
import micdoodle8.mods.galacticraft.api.galaxies.CelestialBody;
import micdoodle8.mods.galacticraft.api.vector.Vector3;
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraft.world.chunk.IChunkProvider;
import de.katzenpapst.amunra.AmunRa;
import de.katzenp... | src/main/java/de/katzenpapst/amunra/world/anubis/AnubisWorldProvider.java | 0.860208 | 0.471649 | AnubisWorldProvider.java | starcoder |
package ethics;
/**
* Class for doing axis-aligned bounding box collision logic.
* @author <NAME>
*/
public class BoundingBox {
private int x;
private int y;
private int width;
private int height;
/**
* Creates a new bounding box.
*
* @param x X coordinate of the top left corner of the box
* @param y... | src/ethics/BoundingBox.java | 0.944957 | 0.489564 | BoundingBox.java | starcoder |
package shinylearner.helper;
import java.util.*;
/** This class contains helper methods for dealing with Java collections and lists. Many of these implement functionality that circumvents some of the awkwardness and verbostity of dealing with lists in Java.
* @author <NAME>
*/
public class ListUtilities
{
/** C... | JavaCode/src/shinylearner/helper/ListUtilities.java | 0.885415 | 0.509337 | ListUtilities.java | starcoder |
public class PercolationStats {
private double[] results;
private int percSideLength;
public PercolationStats(int N, int T) // perform T independent computational experiments on an N-by-N grid
{
if (N <= 0 || T <= 0) { throw new IllegalArgumentException(); }
results = new double[T];... | Percolation/PercolationStats.java | 0.881124 | 0.5564 | PercolationStats.java | starcoder |
package android.graphics;
import java.io.PrintWriter;
public class Matrix {
public static final int MSCALE_X = 0; // !< use with getValues/setValues
public static final int MSKEW_X = 1; // !< use with getValues/setValues
public static final int MTRANS_X = 2; // !< use with getValues/setValues
public ... | android/graphics/Matrix.java | 0.905484 | 0.49048 | Matrix.java | starcoder |
package com.javaer.study.algs;
/**
* The {@code TopM} class provides a client that reads a sequence of
* transactions from standard input and prints the <em>m</em> largest ones
* to standard output. This implementation uses a {@link MinPQ} of size
* at most <em>m</em> + 1 to identify the <em>M</em> largest tra... | algs/src/main/java/com/javaer/study/algs/TopM.java | 0.875926 | 0.553928 | TopM.java | starcoder |
package org.apache.juneau.assertions;
import java.io.*;
import java.time.*;
import java.util.*;
import org.apache.juneau.*;
import org.apache.juneau.internal.*;
/**
* Main class for creation of assertions for testing.
*/
public class Assertions {
/**
* Used for assertion calls against {@link Date} objects.
*... | juneau-core/juneau-marshall/src/main/java/org/apache/juneau/assertions/Assertions.java | 0.901444 | 0.61202 | Assertions.java | starcoder |
package org.ldbcouncil.snb.driver.temporal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
import static java.lang.String.format;
public class TemporalUtil
{
private final SimpleDateFormat timeFormat;
private final SimpleDateFormat d... | src/main/java/org/ldbcouncil/snb/driver/temporal/TemporalUtil.java | 0.80329 | 0.42483 | TemporalUtil.java | starcoder |
package net.fabricmc.fabric.api.renderer.v1.mesh;
import net.fabricmc.fabric.api.renderer.v1.material.RenderMaterial;
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
import net.minecraft.client.texture.Sprite;
import net.minecraft.client.util.math.Vector3f;
import net.minecraft.util.math.Direction;
im... | fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadEmitter.java | 0.908226 | 0.462412 | QuadEmitter.java | starcoder |
package common.order;
import common.NotImplementedException;
import common.datastore.Pair;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;
// ホールドがある状態で開始したとき
public class CountStackOrderStartsWithAny implements StackOrderWithHoldCount<Integer> {
p... | src/main/java/common/order/CountStackOrderStartsWithAny.java | 0.695648 | 0.415492 | CountStackOrderStartsWithAny.java | starcoder |
package com.jstarcraft.ai.jsat.distributions;
import com.jstarcraft.ai.jsat.linear.Vec;
/**
*
* @author <NAME>
*/
public class Uniform extends ContinuousDistribution {
private static final long serialVersionUID = 2479606544724378610L;
private double a, b;
public Uniform(double a, double b) {
... | jstarcraft-ai-jsat/src/main/java/com/jstarcraft/ai/jsat/distributions/Uniform.java | 0.927569 | 0.414069 | Uniform.java | starcoder |
package com.zeoflow.material.datepicker;
import androidx.annotation.Nullable;
import java.util.Calendar;
import java.util.TimeZone;
/** Provider for the current date and time. */
class TimeSource {
private static final TimeSource SYSTEM_TIME_SOURCE = new TimeSource(null, null);
@Nullable private final Long fixe... | lib/java/com/zeoflow/material/datepicker/TimeSource.java | 0.913106 | 0.465023 | TimeSource.java | starcoder |
Initialize a stack, S that we will be using for
* our implementation.
Split the input string using / as the delimiter.
* This step is really important because no matter what,
* the given input is a valid path and we simply have
* to shorten it. So, that means that whatever we
* have between two / characters is either a... | src/strings/SimplyfyPaths.java | 0.628521 | 0.665964 | SimplyfyPaths.java | starcoder |
package com.opengamma.financial.analytics.model.pnl;
import java.util.Collections;
import java.util.Set;
import com.opengamma.engine.ComputationTarget;
import com.opengamma.engine.ComputationTargetType;
import com.opengamma.engine.function.FunctionCompilationContext;
import com.opengamma.engine.value.ValuePropertyNam... | projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/pnl/PositionPnLDefaults.java | 0.870184 | 0.413181 | PositionPnLDefaults.java | starcoder |
package ddf.minim.ugens;
import ddf.minim.UGen;
/**
* A UGen which provides <a href="http://en.wikipedia.org/wiki/Waveshaper">waveshaping distortion</a>.
* The incoming "audio" signal is used as an index to a Waveform containing a
* "mapping" function and the output of the waveshaper is the value in the
... | src/libraries/minim/src/ddf/minim/ugens/WaveShaper.java | 0.742515 | 0.41182 | WaveShaper.java | starcoder |
package com.google.api.ads.adwords.jaxws.extensions.report.model.util;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.LocalDateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Date;
im... | aw-report-model/src/main/java/com/google/api/ads/adwords/jaxws/extensions/report/model/util/DateUtil.java | 0.92267 | 0.436022 | DateUtil.java | starcoder |
package array;
/**
* Created by gouthamvidyapradhan on 29/03/2019 A Tic-Tac-Toe board is given as a string array
* board. Return True if and only if it is possible to reach this board position during the course
* of a valid tic-tac-toe game.
*
* <p>The board is a 3 x 3 array, and consists of characters " ", "X", ... | JAVASCRIPT/DS-and-Algorithms-Prac/Resources/leetcode-/problems/src/array/ValidTicTacToeState.java | 0.899127 | 0.61086 | ValidTicTacToeState.java | starcoder |
package no.ecc.vectortile;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.... | src/main/java/no/ecc/vectortile/VectorTileDecoder.java | 0.88306 | 0.425754 | VectorTileDecoder.java | starcoder |
import java.util.HashSet;
import java.util.Set;
import java.util.ArrayList;
public class Solver {
private ArrayList< ArrayList< Set<Integer> >> testedNumbers = new ArrayList< ArrayList< Set<Integer> >>(Board.SIZE);
private Board board;
private int current_x = 0;
private int current_y = 0;
priva... | Solver.java | 0.798344 | 0.563078 | Solver.java | starcoder |
package de.jollyday.util;
import de.jollyday.Holiday;
import de.jollyday.HolidayType;
import java.time.LocalDate;
import java.time.chrono.ChronoLocalDate;
import java.time.chrono.Chronology;
import java.util.Set;
import static java.time.DayOfWeek.SATURDAY;
import static java.time.DayOfWeek.SUNDAY;
/**
* Utility cl... | jollyday-api/src/main/java/de/jollyday/util/CalendarUtil.java | 0.908002 | 0.49231 | CalendarUtil.java | starcoder |
package com.opengamma.analytics.financial.instrument.index;
import org.apache.commons.lang.ObjectUtils;
import org.threeten.bp.ZonedDateTime;
import com.opengamma.analytics.financial.instrument.future.SwapFuturesPriceDeliverableSecurityDefinition;
import com.opengamma.analytics.financial.instrument.future.SwapFutures... | projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/index/GeneratorSwapFuturesDeliverable.java | 0.910273 | 0.408867 | GeneratorSwapFuturesDeliverable.java | starcoder |
package seedu.address.logic.parser;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/**
* Contains utility methods used for providing suggestions for wrongly typed words.
* Computed using the Levenshtein distance, which is the minimum number of single-character ed... | src/main/java/seedu/address/logic/parser/WordSuggestion.java | 0.943413 | 0.533823 | WordSuggestion.java | starcoder |
package org.fife.util;
import java.io.Serializable;
import java.util.Arrays;
/**
* Similar to a <code>java.util.ArrayList</code>, but specifically for
* <code>int</code>s. This is basically an array of integers that resizes
* itself (if necessary) when adding new elements.
*
* @author <NAME>
* @version 0.8
*... | src/main/javaopen/org/fife/util/DynamicIntArray.java | 0.844953 | 0.530966 | DynamicIntArray.java | starcoder |
package com.ineunet.knife.qlmap.criteria;
import java.util.List;
import com.ineunet.knife.util.collect.ISimpleMap;
import com.ineunet.knife.util.collect.SortedMap;
/**
* 约束条件操作静态工厂,包括等于,不等于,大于,小于等@see {@link RestrictType}
* <p>
*
* 具体操作还包括 and , or等
*
* @author 王旭
*
* @since 2010-7-2
*
*/
public class ... | knife-commons-qlmap/src/main/java/com/ineunet/knife/qlmap/criteria/Restrictors.java | 0.548432 | 0.447219 | Restrictors.java | starcoder |
package org.andresoviedo.app.model3D.model;
import android.opengl.Matrix;
import org.andresoviedo.app.model3D.animation.Animation;
import org.andresoviedo.app.model3D.services.collada.entities.Joint;
import java.nio.FloatBuffer;
/**
*
* This class represents an entity in the world that can be animated... | Application/src/main/java/org/andresoviedo/app/model3D/model/AnimatedModel.java | 0.832679 | 0.441854 | AnimatedModel.java | starcoder |
package com.baz.app.lc.medium;
import com.baz.app.Interface.Facebook.Facebook;
import java.util.*;
public class TopKFrequentWords implements Facebook {
/**
* Given a non-empty list of words, return the k most frequent elements.
* Your answer should be sorted by frequency from highest to lowest. If two... | src/main/java/com/baz/app/lc/medium/TopKFrequentWords.java | 0.864511 | 0.476092 | TopKFrequentWords.java | starcoder |
package algs4.graphs;
import algs4.edu.StdOut;
/**
* The {@code Topological} class represents a data type for determining a
* topological order of a directed acyclic graph (DAG). Recall, a digraph has a
* topological order if and only if it is a DAG. The <em>hasOrder</em> operation
* determines whether the digrap... | java/src/algs4/graphs/Topological.java | 0.923321 | 0.762313 | Topological.java | starcoder |
package com.anguel.dissertation.ml.smile.data.vector;
import com.anguel.dissertation.ml.smile.data.measure.Measure;
import com.anguel.dissertation.ml.smile.data.type.DataType;
import com.anguel.dissertation.ml.smile.data.type.StructField;
import java.io.Serializable;
import java.util.stream.BaseStream;
/**
* Base i... | src/app/app/src/main/java/com/anguel/dissertation/ml/smile/data/vector/BaseVector.java | 0.885471 | 0.470068 | BaseVector.java | starcoder |
package com.github.attemper.common.util;
public class FormatUtils {
/**
* Binary prefixes, used in IEC Standard for naming bytes.
* (http://en.wikipedia.org/wiki/International_Electrotechnical_Commission)
*
* Should be used for most representations of bytes
*/
private static final lon... | attemper-common/src/main/java/com/github/attemper/common/util/FormatUtils.java | 0.927273 | 0.492615 | FormatUtils.java | starcoder |
package sgl.opengl.texture;
import sgl.image.raster.Raster2D;
import sgl.opengl.OpenGL;
import sgl.opengl.OpenGL.Feature;
import sgl.opengl.error.UnsupportedFeatureException;
import sgl.opengl.error.UnsupportedProfileException;
import java.nio.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.... | src/sgl/opengl/texture/GLTexture2D.java | 0.832849 | 0.482734 | GLTexture2D.java | starcoder |
package org.apache.flink.table.expressions.resolver.rules;
import org.apache.flink.annotation.Internal;
import org.apache.flink.table.api.ValidationException;
import org.apache.flink.table.expressions.Expression;
import org.apache.flink.table.expressions.ExpressionUtils;
import org.apache.flink.table.expressions.Unres... | flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ExpandColumnFunctionsRule.java | 0.875295 | 0.474814 | ExpandColumnFunctionsRule.java | starcoder |
package net.sanjayts.educative.acejava.ds;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
/*
https://leetcode.com/problems/subarray-product-less-than-k/
https://www.educative.io/module/lesson/data-structures-in-java/R1XgYW2PZzK
*/
@Slf4j
public cla... | src/main/java/net/sanjayts/educative/acejava/ds/SubarrayProductLessK.java | 0.840521 | 0.435241 | SubarrayProductLessK.java | starcoder |
package org.apache.spark.sql.execution;
/**
* An append-only array for {@link UnsafeRow}s that strictly keeps content in an in-memory array
* until {@link numRowsInMemoryBufferThreshold} is reached post which it will switch to a mode which
* would flush to disk after {@link numRowsSpillThreshold} is met (or before i... | sql/core/target/java/org/apache/spark/sql/execution/ExternalAppendOnlyUnsafeRowArray.java | 0.902396 | 0.436382 | ExternalAppendOnlyUnsafeRowArray.java | starcoder |
package org.tensorflow.op.image;
import org.tensorflow.Operand;
import org.tensorflow.Operation;
import org.tensorflow.OperationBuilder;
import org.tensorflow.Output;
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
import org.tensorflow.op.annotation.Opera... | tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/image/NearestNeighbors.java | 0.915741 | 0.565539 | NearestNeighbors.java | starcoder |
package com.company.dao.pojo;
import java.util.Date;
public class Journey {
private Integer id;
private Integer journeyfrom;
private Integer journeyto;
private Integer permile;
private Integer number;
private Date creattime;
private Date updatatime;
private String creatuser;
... | src/main/java/com/company/dao/pojo/Journey.java | 0.746324 | 0.455622 | Journey.java | starcoder |
package org.netbeans.editor;
import java.util.Comparator;
/**
* Utilities over object array.
*
* @author <NAME>
* @version 1.00
*/
public class ObjectArrayUtilities {
private ObjectArrayUtilities() {
// no instances
}
/**
* Searches the specified object array for the specified object ... | ide/editor.lib/src/org/netbeans/editor/ObjectArrayUtilities.java | 0.936146 | 0.428831 | ObjectArrayUtilities.java | starcoder |
package crypto.algorithm.util;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.BitSet;
public class FluentBitSet implements Cloneable {
private BitSet bitset;
public FluentBitSet() {
bitset = new BitSet();
}
public FluentBitSet(int nbits) {
bitset = new BitSe... | src/main/java/crypto/algorithm/util/FluentBitSet.java | 0.800926 | 0.404037 | FluentBitSet.java | starcoder |
package org.elasticsearch.index.shard;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable;
import java.io.IOException;
import java.util.Objects;
/**
* Class representing an (inclusive) range of {@code lon... | server/src/main/java/org/elasticsearch/index/shard/ShardLongFieldRange.java | 0.937476 | 0.426083 | ShardLongFieldRange.java | starcoder |
package model.shape;
import java.awt.Color;
/**
* This class represents a line. This line is denoted with a start 2d point and an end 2d point,
* both with Cartesian coordinates as (x,y).
*/
public class Line {
protected Color color;
protected Point2D startPoint;
protected Point2D endPoint;
protected Strin... | src/model/shape/Line.java | 0.940783 | 0.612252 | Line.java | starcoder |
package org.threeten.extra.scale;
import java.io.Serializable;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.threeten.bp.DateTimeException;
import org.threeten.bp.Duration;
import org.threeten.bp.Instant;
import org.threeten.bp.format.DateTimeParseException;
impo... | src/main/java/org/threeten/extra/scale/TAIInstant.java | 0.946082 | 0.453564 | TAIInstant.java | starcoder |
package org.epics.util.array;
/**
* An ordered collection of numeric (primitive) elements. This class allows to implement
* a single binding for a list of primitive values of six different
* binding. If the original type is required, instanceof can be used to
* differentiate between {@link ListDouble}, {@lin... | epics-util/src/main/java/org/epics/util/array/ListNumber.java | 0.932315 | 0.559591 | ListNumber.java | starcoder |
package com.mparticle.internal;
import android.content.Context;
import android.content.SharedPreferences;
import com.mparticle.AccessUtils;
import com.mparticle.MParticle;
import com.mparticle.MParticleOptions;
import com.mparticle.internal.database.tables.SessionTable;
import com.mparticle.internal.messages.BaseMPMe... | android-core/src/androidTest/java/com/mparticle/internal/MessageManagerTests.java | 0.702632 | 0.439326 | MessageManagerTests.java | starcoder |
package com.raywenderlich.facespotter;
import android.graphics.PointF;
/**
* Created by joey on 3/11/17.
*/
public class FaceData {
private static final String TAG = "FaceData";
private int mId;
// Face dimensions
private PointF mPosition;
private float mWidth;
private float mHeight;
// Head orie... | FaceSpotter-starter/app/src/main/java/com/raywenderlich/facespotter/FaceData.java | 0.722037 | 0.610482 | FaceData.java | starcoder |
package evolith.helpers;
import java.awt.Point;
import static java.lang.Math.sqrt;
import java.util.ArrayList;
/**
* @author <NAME>
* @author <NAME>
* @author <NAME>
* @author <NAME>
*/
public class SwarmMovement implements Commons {
private static final int randomness = 70; //The amount of randomness i... | Evolith/src/evolith/helpers/SwarmMovement.java | 0.916203 | 0.480722 | SwarmMovement.java | starcoder |
package api.speedtest.models;
public class TestResult {
private String user;
private Integer device;
private Long timestamp;
Data data;
public String getUser() {
return user;
}
public Integer getDevice() {
return device;
}
public Long getTimestamp() {
retu... | speedtest-api/src/main/java/api/speedtest/models/TestResult.java | 0.792424 | 0.419707 | TestResult.java | starcoder |
package com.biblioteca;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import java.util.ArrayList;
public class LibraryTest {
private ArrayList<Book> testBooksArray;
private ArrayList<Movie> testMoviesArray;
private ArrayLi... | test/com/biblioteca/LibraryTest.java | 0.689096 | 0.514705 | LibraryTest.java | starcoder |
package com.opengamma.master.security.impl;
import static com.google.common.collect.Maps.newHashMap;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.opengamma.core.change.AggregatingChangeManager;
import com.opengamma.core.change.ChangeManager;
import com.opengamma.id.ObjectIdent... | projects/OG-Master/src/main/java/com/opengamma/master/security/impl/DelegatingSecurityMaster.java | 0.854521 | 0.405802 | DelegatingSecurityMaster.java | starcoder |
package org.etools.j1939_84.bus.j1939;
import static org.etools.j1939_84.model.Outcome.FAIL;
import static org.etools.j1939_84.model.Outcome.PASS;
import static org.etools.j1939_84.model.Outcome.WARN;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
/**
* Unit Tests the {@link Lookup} c... | src-test/org/etools/j1939_84/bus/j1939/LookupTest.java | 0.782288 | 0.412767 | LookupTest.java | starcoder |
package gov.sandia.cognition.math.matrix.custom;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* This package-private class simplifies parallelizing Matrix operations. It
* uses generic... | Components/CommonCore/Source/gov/sandia/cognition/math/matrix/custom/ParallelMatrixFunction.java | 0.910035 | 0.659501 | ParallelMatrixFunction.java | starcoder |
package chapter6.eventdrivensimulation;
import edu.princeton.cs.algs4.StdDraw;
import edu.princeton.cs.algs4.StdRandom;
/**
* Created by <NAME> on 27/04/18.
*/
public class Particle implements ParticleInterface {
double positionX;
double positionY;
double velocityX;
double velocityY;
double ra... | src/chapter6/eventdrivensimulation/Particle.java | 0.897639 | 0.612889 | Particle.java | starcoder |
package com.netflix.spectator.impl.matcher;
import com.netflix.spectator.impl.PatternMatcher;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
/**
* Matcher that checks a sequence of sub-matchers.
... | spectator-api/src/main/java/com/netflix/spectator/impl/matcher/SeqMatcher.java | 0.929983 | 0.401453 | SeqMatcher.java | starcoder |
package org.jtrim2.collections;
import java.util.ArrayDeque;
import java.util.Collections;
import java.util.Comparator;
import java.util.PriorityQueue;
import org.jtrim2.utils.ExceptionHelper;
/**
* Defines factory methods for {@link ReservablePollingQueue}.
*
* <P>
* This class cannot be instantiated or inherite... | subprojects/jtrim-collections/src/main/java/org/jtrim2/collections/ReservablePollingQueues.java | 0.966616 | 0.443841 | ReservablePollingQueues.java | starcoder |
package com.github.simkuenzi.oneegg;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.Normalizer;
import java.util.Arrays;
import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Stream;
public class TextIngredients implemen... | src/main/java/com/github/simkuenzi/oneegg/TextIngredients.java | 0.755637 | 0.406185 | TextIngredients.java | starcoder |
package com.github.ambry.utils;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Arrays;
/**
* An "open" BitSet implementation that allows direct access to the arrays of words
* storing the bits. Derived from Lucene's OpenBitSet, but with a paged backing array
* (... | ambry-utils/src/main/java/com/github/ambry/utils/OpenBitSet.java | 0.873053 | 0.574574 | OpenBitSet.java | starcoder |
package net.sf.jasperreports.engine;
import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum;
/**
* Interface representing a data set that can be used in a report.
* <p/>
* A dataset is a concept that lies somewhere between a data source and a subreport.
* Datasets allow the engine to iterate through ... | src/visao/jasperreports-6.15.0/src/net/sf/jasperreports/engine/JRDataset.java | 0.756717 | 0.625838 | JRDataset.java | starcoder |
package edu.pnu.stem.geometry.jts;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.MultiPolygon;
/**
* @author <NAME> (<EMAIL>, Pusan National University)
*
*/
public class GeometryFactory3D extends GeometryFactory {
/**
* Constructs a <code>Polygon</code> with the given ... | igml-feature/src/main/java/edu/pnu/stem/geometry/jts/GeometryFactory3D.java | 0.868882 | 0.508239 | GeometryFactory3D.java | starcoder |
package com.google.blockly.android.control;
import org.junit.Before;
import org.junit.Test;
import static com.google.common.truth.Truth.assertThat;
/**
* Tests for {@link NameManager}.
*/
public class NameManagerTest {
private NameManager mNameManager;
@Before
public void setUp() throws... | blocklytest/src/androidTest/java/com/google/blockly/android/control/NameManagerTest.java | 0.798933 | 0.408395 | NameManagerTest.java | starcoder |
package com.jenkov.db.itf;
import com.jenkov.db.itf.mapping.IObjectMapping;
import java.sql.Connection;
import java.util.Collection;
/**
* The interface represents all the functions made available by the object writer of Butterfly Persistence.
* The object writer is responsible for all writing functions in the dat... | src/main/java/com/jenkov/db/itf/IObjectWriter.java | 0.887327 | 0.561636 | IObjectWriter.java | starcoder |
package com.dd.plist;
import java.io.IOException;
/**
* The NSNumber class wraps a numeric value. The value can be an integer a floating point number or a boolean value.
* @see <a href="https://developer.apple.com/reference/foundation/nsnumber" target="_blank">Foundation NSNumber documentation</a>
* @author <NAME>... | src/main/java/com/dd/plist/NSNumber.java | 0.946138 | 0.455683 | NSNumber.java | starcoder |
package com.opengamma.strata.market.curve.interpolator;
import com.opengamma.strata.collect.array.DoubleArray;
/**
* A curve extrapolator that has been bound to a specific curve.
* <p>
* A bound extrapolator is created from a {@link CurveExtrapolator}.
* The bind process takes the definition of the extrapolator a... | modules/market/src/main/java/com/opengamma/strata/market/curve/interpolator/BoundCurveExtrapolator.java | 0.949517 | 0.821903 | BoundCurveExtrapolator.java | starcoder |
package pl.raspberry.box.core.model;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import pl.raspberry.box.core.util.MatrixUtil;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.f... | src/main/java/pl/raspberry/box/core/model/Matrix.java | 0.844762 | 0.534491 | Matrix.java | starcoder |
package org.decimal4j.arithmetic;
import org.decimal4j.truncate.DecimalRounding;
import org.decimal4j.truncate.TruncatedPart;
/**
* Utility class to calculate rounding increments in different situations;
* utilizes functionality provided by {@link DecimalRounding} and
* {@link TruncatedPart}.
*/
final class Roun... | src/main/java/org/decimal4j/arithmetic/Rounding.java | 0.929448 | 0.686331 | Rounding.java | starcoder |
package de.mennomax.astikorcarts.client.renderer.entity.model;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import de.mennomax.astikorcarts.entity.AbstractDrawnEntity;
import net.minecraft.client.renderer.entity.model.EntityModel;
import net.minecraft.client.renderer.m... | src/main/java/de/mennomax/astikorcarts/client/renderer/entity/model/CartModel.java | 0.85959 | 0.404449 | CartModel.java | starcoder |
import java.math.BigInteger;
/**
* This program generates a factorial with parallel processing!
* @author <NAME>
* @version 2.0.0-alpha
*/
public class Factorial {
private BigInteger result;
private int number, threadCount;
/**
* Empty-argument constructor that sets everything to 0 to denote that nothing... | src/Factorial.java | 0.83508 | 0.479199 | Factorial.java | starcoder |
package comparison;
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
public class Sequence {
public static List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
/*get*/
Integer third = list.get(2);
public interface Function0<A> {
void apply(A a);
}
public ... | _/play2-book-chapters-play2.1/chap9/play-jbook/app/comparison/Sequence.java | 0.53437 | 0.452173 | Sequence.java | starcoder |
package com.bluegosling.collections;
import static com.bluegosling.testing.MoreAsserts.assertThrows;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util... | test/com/bluegosling/collections/MoreCollectionsTest.java | 0.913476 | 0.622058 | MoreCollectionsTest.java | starcoder |
package com.github.fmjsjx.libcommons.json;
import java.io.OutputStream;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
/**
* A JSON encode/decode library.
*
* @param <JSON> the type of dynamic JSON object
*
* @since 1.0
*
* @author <NAME>
*/
public interface JsonLibrary<JSON> {
... | libcommons-json/src/main/java/com/github/fmjsjx/libcommons/json/JsonLibrary.java | 0.919263 | 0.408837 | JsonLibrary.java | starcoder |
package org.thymeleaf.util;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
*
* @author <NAME>
*
* @since 1.0
*
*/
public final class ArrayUtils {
public... | src/main/java/org/thymeleaf/util/ArrayUtils.java | 0.796925 | 0.516413 | ArrayUtils.java | starcoder |
package com.a6raywa1cher.imageprocessingspring.util;
import com.a6raywa1cher.imageprocessingspring.service.dto.DoubleRectangle;
import com.a6raywa1cher.imageprocessingspring.service.dto.Rectangle;
import javafx.scene.image.*;
import static com.a6raywa1cher.imageprocessingspring.util.JavaFXUtils.*;
public class Algor... | src/main/java/com/a6raywa1cher/imageprocessingspring/util/AlgorithmUtils.java | 0.613005 | 0.492493 | AlgorithmUtils.java | starcoder |
package cell;
import java.util.List;
/**
* Super class that represents the basic discrete grid location or "cell" that has its own state.
*/
public abstract class Cell {
public static final int STATE_PARAMETER_INDEX = 0;
public static final int X_PARAMETER_INDEX = 1;
public static final int Y_PARAMETER... | src/cell/Cell.java | 0.940654 | 0.411466 | Cell.java | starcoder |
package Lab5;
// A test program for the Tape class that creates a window containing
// a graphical representation of the tape with an arrow pointing to
// the current cell. There are buttons for moving the current cell to
// the left and to the right. A text-input box shows the content of
// the current cell. This... | src/main/java/Lab5/TestTapeGUI.java | 0.601359 | 0.42674 | TestTapeGUI.java | starcoder |
package blf.library.types;
import blf.core.exceptions.ExceptionHandler;
import blf.core.state.ProgramState;
import io.reactivex.functions.BiFunction;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
/**
* ListOperations
*/
public class ListOperatio... | src/main/java/blf/library/types/ListOperations.java | 0.876806 | 0.549399 | ListOperations.java | starcoder |
package com.analog.lyric.collect;
import java.util.Comparator;
/**
* Provides efficient implementations of variants of the <em>selection</em> problem.
* <p>
* The selection problem involves efficiently finding the nth element in a set of unordered
* elements for some ordering relation. Obviously this can be done... | solvers/java/src/main/java/com/analog/lyric/collect/Selection.java | 0.877975 | 0.718841 | Selection.java | starcoder |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.