hexsha stringlengths 40 40 | size int64 8 1.04M | content stringlengths 8 1.04M | avg_line_length float64 2.24 100 | max_line_length int64 4 1k | alphanum_fraction float64 0.25 0.97 |
|---|---|---|---|---|---|
844b981b422a0fcd1cd06542e46108efff555a06 | 29,688 | /**
* Copyright (c) 2012 Selventa.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* Contributors:
* Selventa - in... | 26.866968 | 82 | 0.560496 |
1d5f253e14bba64e8b098bbfd47b21ea2dda280b | 390 | package io.wilson.basic.concurrent;
import java.util.concurrent.locks.ReentrantLock;
/**
* TempLock
*
* @author Wilson
* @date 2020/8/14
*/
public class TempLock {
private static final ReentrantLock FAIR_LOCK = new ReentrantLock(true);
public static void main(String[] args) {
FAIR_LOCK.lock();
... | 19.5 | 75 | 0.664103 |
0cb7f7583c1bc52c2ecd0482a51482544a8a87a3 | 923 | package com.deskera.sdk.common.util.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
/**
* The ConflictException.
*
*/
@ResponseStatus(value = HttpStatus.CONFLICT)
public class ConflictException extends ServiceException {
/**
* The Constant... | 22.512195 | 68 | 0.729144 |
6ef260b2e20bbcfec95736e7766a803181830861 | 563 | package org.saatsch.framework.base.swt.widgets;
import org.eclipse.swt.widgets.Shell;
import org.junit.Test;
import org.saatsch.framework.base.swt.MinimalParentShell;
import org.saatsch.framework.base.swt.Openable;
public class LoadingDialogDemo extends MinimalParentShell implements Openable<Void> {
@T... | 20.851852 | 86 | 0.724689 |
22a3f5358c9b7fdd9990f5774db65e73712208a1 | 1,003 | package org.knowm.xchange.bleutrade.service;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.bleutrade.BleutradeAuthenticated;
import org.knowm.xchange.service.BaseExchangeService;
import org.knowm.xchange.service.BaseService;
import si.mazi.rescu.ParamsDigest;
import si.mazi.rescu.RestProxyFactory;
publ... | 31.34375 | 148 | 0.801595 |
e69f4745532972681f48c363b3e8cb2237b6c9d5 | 1,183 | package org.conggroup.vizard.comparsion.config.kafka;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import java.util.HashMap;
import java.util.Map;
public class KafkaConsumerConfigTemplate {
public static Map<String, Object> GenerateConfig(String bootstrapServer, String groupId) {
M... | 43.814815 | 95 | 0.725275 |
530ad533a94eb6fd0ce3ed08c4fae3ab8420b20a | 1,501 | package com.zhcs.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import com.zhcs.dao.SignDao;
import com.zhcs.entity.SignEntity;
im... | 21.140845 | 79 | 0.662225 |
afb87d5b4f117cf7519d44907f991ee914b7f4a7 | 837 | /**
*
*/
package com.mudit.SideWall.Configurations;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
/**
* @author Mudit
* @since Dec 26, 2016
*/
public class MyEntityManagerFactory {
private static EntityManagerFactory myEntityManagerFactory;
private MyEnti... | 25.363636 | 84 | 0.756272 |
41618b8155174bac6f3d74ba6ac09712e4e1f1af | 1,682 | package com.webcheckers.model;
import com.webcheckers.appl.MasterEnum;
import org.junit.Before;
import org.junit.Test;
import spark.Request;
import spark.Session;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
import static org.mockit... | 20.765432 | 63 | 0.612961 |
8cb566986ecb3f3b52ccc391b35d285b1c93770b | 631 | package fr.romainmoreau.epaper.jaxb.api.table;
import javax.xml.bind.annotation.XmlAttribute;
import fr.romainmoreau.epaper.client.api.Color;
public class Border {
private int size;
private Color color;
public fr.romainmoreau.epaper.client.api.table.Border toBorder() {
return new fr.romainmoreau.epaper.client... | 18.558824 | 73 | 0.730586 |
93cdc1da4c6a3e5c44ca4c91eee56fe164d5c2cb | 111 | package almost;
/**
*
* @author ArNoB
*/
public class brick {
public int exist;
public int x, y;
}
| 10.090909 | 21 | 0.585586 |
3b50cb2bf40d0ddfbacfddac2a67045374582696 | 1,405 | /*
* Copyright 2013-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 42.575758 | 104 | 0.785053 |
abc45e5ae8dc072873657c714c9e4eb32f2268f6 | 449 | package gov.healthit.chpl.web.controller;
import java.util.List;
public class CertificationIdVerificationBody {
private List<String> ids;
public CertificationIdVerificationBody() {
}
public CertificationIdVerificationBody(final List<String> ids) {
this.ids = ids;
}
public List<Stri... | 17.96 | 68 | 0.659243 |
b41f9abe8f8c5b03c1ec64147b15c7be03ae5151 | 675 | package com.oodexamples.patterns.creational.factory;
import com.oodexamples.modules.BoeingStandardEngine;
import com.oodexamples.patterns.creational.builder.models.PassengerWings;
import com.oodexamples.modules.BoeingEngine;
import lombok.Data;
@Data
public class BoeingPlane {
private String model;
private Pa... | 24.107143 | 73 | 0.697778 |
f29e128d04c287b54160ee3a2647a782c68487e9 | 7,359 | package me.cthorne.kioku.statistics;
import android.content.Context;
import android.graphics.Color;
import android.util.Log;
import com.github.mikephil.charting.charts.Chart;
import com.github.mikephil.charting.charts.RadarChart;
import com.github.mikephil.charting.components.XAxis;
import com.github.mikephil.chartin... | 35.897561 | 105 | 0.671015 |
c9cf6abd448accb609c32435cbfb65f70debe917 | 1,547 | package com.msgilligan.bitcoin.rpc;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Utility class with default connection information for Bitcoin/Mastercoin JSON-RPC
*/
public class RPCURL {
public static final String rpcproto = "http";
public static final String rpcssl = "https";
publ... | 29.188679 | 84 | 0.641888 |
7bcfdb3bbebd5be739805bf85438b32881aec772 | 1,870 | package website.skylorbeck.minecraft.ghostmod.client;
import net.minecraft.client.render.entity.BipedEntityRenderer;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.render.entity.feature.ArmorFeatureRenderer;
import net.minecraft.client.render.entity.model.EntityModelLayer;... | 53.428571 | 170 | 0.806417 |
8ab18c58146c836533e94eafe4d0e853e2e90cb3 | 154 | package creationalPatterns.factoryMethod;
public class WhiteCar extends Car {
@Override
void setColor() {
color = "white";
}
}
| 14 | 41 | 0.62987 |
8683c7418399244e191d27cbce4e8fea06df7b3f | 443 | package edu.psu.compbio.seqcode.gse.datasets.seqdata;
import java.util.Comparator;
public class SeqAnalysisResultEnrichmentComparator implements Comparator<SeqAnalysisResult> {
public boolean equals(Object o) {
return o instanceof SeqAnalysisResultEnrichmentComparator;
}
public int compare(SeqAna... | 31.642857 | 93 | 0.769752 |
41cd967fc4eb3b4919275686fc6c64c551a69b15 | 507 | package chapter03.section01.thread_3_1_11.pro_3_stack_1;
/**
* Project Name:java-multi-thread-programming <br/>
* Package Name:chapter03.section01.thread_3_1_11.pro_3_stack_1 <br/>
* Date:2019/11/23 14:35 <br/>
*
* @author <a href="turodog@foxmail.com">chenzy</a><br/>
*/
public class C {
private MyStack myS... | 21.125 | 69 | 0.646943 |
0a2f65b060ef8fb270c10e162f19bff2cfc33778 | 2,483 | package com.midtrans.sdk.corekit.models;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
/**
* Contains information required to execute BCA KlikPay request.
*
* @author rakawm
*/
public class BCAKlikPayModel extends TransactionModel {
public static final String PAYMENT_TYPE = "... | 36.514706 | 102 | 0.697141 |
5dc1ee329d908d2d993a1d9b200f0a70e5501f7d | 710 | package com.zyb.coolweather.utils;
import java.util.List;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;
public class MyAdapter extends FragmentPagerAdapter {
private... | 20.882353 | 64 | 0.76338 |
9b079b0f0e8462e4d5cafe6cf768f361213505e5 | 2,351 | package com.github.cc3002.finalreality.model.character.player;
import com.github.cc3002.finalreality.model.character.Enemy;
import com.github.cc3002.finalreality.model.weapon.IWeapon;
import com.github.cc3002.finalreality.model.weapon.StaffWeapon;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.T... | 32.652778 | 86 | 0.670778 |
b64171d68625ad53624f7ce382d0ce68e8379792 | 2,092 | package sam.io.serilizers;
import static java.nio.file.StandardOpenOption.APPEND;
import static java.nio.file.StandardOpenOption.CREATE;
import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING;
import static java.nio.file.StandardOpenOption.WRITE;
import java.io.IOException;
import java.nio.ByteBuffer;
impor... | 30.318841 | 116 | 0.784417 |
137b9e08882135eb9d324686f2bbdd18a348d279 | 8,511 | package cc.mrbird.common.util;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
public class Constant {
static final String XLSX_SUFFIX = ".xlsx";
static final String XLSX_CONTENT_TYPE = "... | 19.040268 | 130 | 0.69745 |
a3675abd3cb84bc875e96968f30253ec5dd9b4b6 | 1,512 | package org.group.jcommon.protobuf.jackson.buildin.deserializers;
import java.io.IOException;
import java.text.ParseException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.... | 32.869565 | 118 | 0.738757 |
614bb639258adb7f5e4a40cadf035d1fde315a54 | 7,775 | // Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/saved_object_graph.proto
package org.tensorflow.proto.framework;
public interface SavedObjectOrBuilder extends
// @@protoc_insertion_point(interface_extends:tensorflow.SavedObject)
com.google.protobuf.MessageOrBuil... | 35.99537 | 127 | 0.717042 |
fab56007e04c9c6f6ccccefeb33c95c823c6f281 | 11,455 | /*
* Copyright (C) 2014 - 2016 Softwaremill <https://softwaremill.com>
* Copyright (C) 2016 - 2020 Lightbend Inc. <https://www.lightbend.com>
*/
package akka.kafka.testkit.internal;
import akka.annotation.InternalApi;
import com.github.dockerjava.api.DockerClient;
import org.rnorth.ducttape.unreliables.Un... | 36.022013 | 101 | 0.62907 |
f80b389414418d00052e8d0a6f61425a02f94727 | 3,904 | /**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
* <a href="http://www.apache... | 36.148148 | 131 | 0.786629 |
13a3945037404b842a13cb009ffe4338b50d5de2 | 705 | package io.nbs.ipfs.mm.ui.listener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
/**
* @Package : com.nbs.ui.listener
* @Description : <p></p>
* @Author : lambor.c
* @Date : 2018/6/24-8:44
* Copyright (c) 2018, NBS , lambor.c<lanbery@gmail.com>.
* All rights reserved.
*/
public class ... | 17.625 | 61 | 0.660993 |
8776e684e9b1d9547251a67a6657ae2446c85819 | 7,367 | package com.mapswithme.maps.widget.placepage;
import android.content.res.Resources;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Image... | 26.124113 | 93 | 0.714809 |
42e2576486abb5294aaa2bc795e77fee1894d2c6 | 357 | package com.kornos.lint.demo.other;
import com.android.tools.lint.detector.api.Detector;
import java.util.List;
/**
* 避免混淆产生的实体类问题
* 实体类必须加@Keep
*/
public class EntityDetector extends Detector implements Detector.UastScanner{
@Override
public List<String> getApplicableMethodNames() {
return super... | 19.833333 | 77 | 0.742297 |
e5ad6ad40295f871eb82c95c34facd85aa3f4894 | 2,734 | package gov.nasa.pds.registry.common.meta;
import java.util.HashSet;
import java.util.Set;
import gov.nasa.pds.registry.common.es.dao.dd.DataDictionaryDao;
import gov.nasa.pds.registry.common.es.dao.schema.SchemaDao;
/**
* A cache of field names in Elasticsearch schema for the registry index.
* @author karpenko
*... | 24.630631 | 73 | 0.642648 |
ede008bde18c48ca01fa033485dc1f32071fbabd | 640 | package com.gb.rental.service;
import com.gb.rental.model.reservation.VehicleReservationType;
public class InvoiceServiceFactory {
public InvoiceService getInvoiceService(VehicleReservationType vehicleReservationType) {
switch (vehicleReservationType) {
case FOUR_HOURS:
case EIGHT_... | 30.47619 | 92 | 0.621875 |
6eeb94a414fa8250470c5741f65a196142502ff0 | 331 | package org.activitymgr.ui.web.logic;
import org.activitymgr.ui.web.logic.IExternalContentDialogLogic.View;
public interface IExternalContentDialogLogic extends ILogic<View> {
public interface View extends ILogic.IView<IExternalContentDialogLogic> {
void setTitle(String title);
void setContentUrl(String ur... | 20.6875 | 74 | 0.797583 |
3dabaae6db7bea3fb270b4cf5cfafa9a21a99da1 | 4,147 | /* %%
*
* JEvolve
*
* Copyright 2007 Jeff Ridder
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | 29.834532 | 89 | 0.649144 |
4745eb4870ea3be6ccfcec1b566cefc47148c607 | 16,472 | package rr.snowhack.snow.event;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.Base64;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiChat;
import net.... | 44.639566 | 215 | 0.728205 |
50577025da59952f4471e75907a44a81afc8c26c | 1,616 | package mda.generator.beans;
import mda.generator.exceptions.MdaGeneratorException;
/**
* Domain representing a type in the model file with some constraints :
* - maxLength
* - precision
*
* @author Fabien Crapart
*/
public class UmlDomain {
private String name;
private String typeName;
privat... | 20.987013 | 80 | 0.626238 |
6fa124222d981b8b609de3a0b077270e214a9bac | 1,840 | package com.mastertheboss.model;
import java.io.Serializable;
import javax.persistence.*;
@Entity
public class Info implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="id")
private int id;
... | 23.896104 | 303 | 0.610326 |
15149226c6e98302702d7bc09242e15caebe12db | 2,425 | package appleoctopus.lastword;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextVi... | 34.15493 | 108 | 0.693608 |
a3698d1e08e9f96c6cddb44ee96ad3b0c644ef9a | 2,165 | /*
* Copyright 2013-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 40.092593 | 96 | 0.785219 |
1db50aeebe451710ab8624ccd49895ff5fa602aa | 1,615 | package de.digitalcollections.iiif.model.jackson.serialization;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import de.digitalcollections.iiif.model.Profil... | 38.452381 | 102 | 0.765325 |
d93d2df6eb1ca1aa646da5d439fa669cc3a48032 | 106,841 | package com.hbm.main;
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.apache.logging.log4j.Logger;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockCrate;
import com.hbm.b... | 84.526108 | 237 | 0.811411 |
3639fd09232a3b13b478d7d77499d42dcddf6833 | 1,552 | /*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | 30.431373 | 93 | 0.765464 |
bf1b2d51f5c7ab3a9a8a58ac07327250d456863f | 651 | import java.util.Scanner;
public class IndexPatternOfBestIndex
{
public static void main(String... args)
{
int n;
int terms = 0;
int i, j , k;
Scanner scan = new Scanner(System.in);
n = scan.nextInt();
for(i = 0 ; i < n ; i++)
{
... | 25.038462 | 77 | 0.379416 |
f83d1bec1bb71aa143d9bef503eb0dbbda23d6f6 | 13,812 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 37.129032 | 111 | 0.540327 |
83009de22d85254fa7889356f31c15938980c1e1 | 3,049 | package org.apache.maven.plugin;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Ve... | 34.647727 | 121 | 0.71958 |
26d6721211ec01a8f4d8dfeb12b4453203a3c535 | 2,114 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 33.555556 | 96 | 0.720435 |
3e3da7394198f8665acbbfbf352f4454e7a4a7e3 | 1,246 | package allbegray.slack.webapi.method.files;
import java.util.Map;
import allbegray.slack.webapi.method.AbstractPagingMethod;
import allbegray.slack.webapi.SlackWebApiConstants;
public class FileListMethod extends AbstractPagingMethod {
protected String user;
protected String ts_from;
protected String ts_to;
pr... | 19.46875 | 66 | 0.714286 |
0f89f390e51796acb77e55af449bdff8b6e67c25 | 6,064 | package com.wya.uikit.popupwindow;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater... | 32.778378 | 114 | 0.670515 |
263aa6874f6159425742cd5f234a0fd749a1a624 | 5,270 | package com.peralex.utilities.ui.table;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.text.ParseException;
import java.util.EventObject;
import javax.swing.AbstractAction;
import javax.swing.DefaultCellEditor;
import javax.swing.JFormattedTextField;
i... | 29.116022 | 142 | 0.712524 |
c9665b8d7de4fc17c9045372c3ecfc5ee83c7785 | 1,904 | package com.poc.urlshortener.config;
import java.util.List;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.cassandra.config.AbstractCassandraConfiguration;
import org.springframework.data.cassandra.config.SchemaAc... | 28 | 92 | 0.788866 |
85289086bdfae3a28346f46c392d592d4cb5db56 | 389 | package items.weapons;
import items.tools.Tool;
import util.Constants;
public class BoneAxe extends Tool {
private static final long serialVersionUID = 1L;
public BoneAxe() {
super();
this.setHarvestRate(Constants.BONE_TOOL_UNITS_PER_SECOND);
setWeight(Constants.BONE_TOOL_WEIGHT);
setIsAxe(true);
this.s... | 16.913043 | 60 | 0.737789 |
21ada3de2bc4c9ae6c04ffc2e4fce40b16a49c24 | 1,295 | package clertonleal.com.nubank.util;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class FormatUtil {
private static final SimpleDateFormat shortDateFormat = new SimpleDateFormat("dd MMM", new Locale("pt", "BR"));
private static final... | 34.078947 | 116 | 0.708108 |
519f45768973f1571fe2d59442a69b76fc17baa0 | 2,067 | /*
* @(#)module-scraper --- PushMail.java
*/
package com.codebelief.app.pushupdate;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.codebel... | 29.112676 | 107 | 0.732463 |
7339514504fd97258a9b91200a05d9d99bb34d84 | 13,300 | /*
* Copyright 2016 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 43.464052 | 139 | 0.68812 |
cfc0d2f24638f7db9c1c1d70cc4b6fad42807e8b | 1,387 | /*
* Copyright © 2015 www.raisecom.com and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package com.hashc... | 37.486486 | 99 | 0.806777 |
2b71e9dbeeef8637285151b40804d2914ba809c2 | 849 | //Luis Guzman
//Homework 3
//3/21/10
/*PSEUDOCODE: Display dialog that asks the user for the retail price of
circuit board and save it to the input variable. Convert input
to a double and save it to RetailPrice variable. Multiply
RetailPrice by .4 and save result in the profit variable.
Diplay dialo... | 33.96 | 71 | 0.71967 |
75efdfaa556dcab97da0244c8853464c95181dd5 | 6,544 | package com.gempukku.swccgo.cards.set13.dark;
import com.gempukku.swccgo.cards.AbstractLostInterrupt;
import com.gempukku.swccgo.cards.GameConditions;
import com.gempukku.swccgo.common.Icon;
import com.gempukku.swccgo.common.Side;
import com.gempukku.swccgo.common.Uniqueness;
import com.gempukku.swccgo.filters.Filter;... | 64.156863 | 241 | 0.471883 |
df9b14ddf45ace32a66ce90885097cec8f74fbe0 | 4,484 | package seedu.address.logic.commands;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;
import static seedu.address.logic.commands.CommandTestUtil.showGroupAtIndex;
impo... | 40.035714 | 104 | 0.753568 |
5bca586398cef1f914344c9a1a50aa8e28080c83 | 4,014 | package unquietcode.tools.esm;
import org.junit.Test;
import unquietcode.tools.esm.sequences.Pattern;
import unquietcode.tools.esm.sequences.PatternBuilder;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import static org.junit.Assert.assertEquals;
/**
* @author B... | 27.682759 | 99 | 0.736173 |
9ebc3daf95390d1f8ae625965873090d22e622f1 | 1,543 | package com.k.multithread.chapter04;
import com.k.multithread.util.Debug;
import java.io.Closeable;
import java.io.IOException;
import java.nio.ByteBuffer;
public class DownloadBuffer implements Closeable {
/**
* 当前Buffer中缓冲的数据相对于整个存储文件的位置偏移
*/
private long globaloffset;
private long upperBound... | 28.054545 | 86 | 0.624109 |
9f93b4b65eea85e6a4a8a99e8c7d52cbdcd0ac0a | 1,103 | package db.entity;
import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
/**
* The persistent class for the persistent_logins database table.
*
*/
@Entity
@Table(name="persistent_logins")
@NamedQuery(name="PersistentLogin.findAll", query="SELECT p FROM PersistentLogin p")
public cla... | 17.507937 | 84 | 0.733454 |
a694bcfcb3e98c9b64683a23b8e00dea1326bc6d | 207 | package lk.ijse.dep.MostWantedCabs.DAO.custom;
import lk.ijse.dep.MostWantedCabs.DAO.CrudDAO;
import lk.ijse.dep.MostWantedCabs.Entity.Return;
public interface ReturnDAO extends CrudDAO<Return,String> {
}
| 25.875 | 59 | 0.816425 |
ffdef91c7104d3f01720619d4c60f3de69eb36e0 | 444 | package example_14_replace_inheritance_with_delegation;
import java.util.Random;
public class Congress {
private boolean consent;
private final int bound = 10;
private boolean isConsent() {
return consent;
}
private void setConsent() {
Random random = new Random();
if(random.nextInt(bound)<6) {
consent... | 17.76 | 55 | 0.709459 |
5d4c071e9eec50e8e88226260c0914b9b355b19a | 2,249 | /*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | 36.868852 | 128 | 0.771009 |
24d8367b00c8366307ca2361f379c544ca9e0330 | 2,115 | /*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.reporting;
import org.mockito.invocation.Invocation;
import org.mockito.invocation.MatchableInvocation;
import java.util.ArrayList;
import java.util.Collections;
import... | 35.25 | 153 | 0.734752 |
34e9788431419bd0b82c1f5e8fa07bde438d1415 | 1,222 | package racingcar;
public class InputValidator {
private static final int LIMIT_OF_NAME_LENGTH = 5;
public void validateNamesWithComma(String namesWithComma) throws IllegalArgumentException {
if (namesWithComma.endsWith(",")) {
throw new IllegalArgumentException("[ERROR] 이름이 ,로 끝나서는 안됩니다."... | 34.914286 | 95 | 0.628478 |
fb0f886e45f03aa453e6af97f54da3f476b305bd | 2,484 | package com.liveramp.captain.example.internals;
import java.util.Map;
import java.util.Optional;
import com.liveramp.captain.status.CaptainStatus;
import com.liveramp.commons.collections.map.MapBuilder;
import static com.liveramp.captain.example.ExampleCaptainWorkflow.APP1;
import static com.liveramp.captain.example... | 37.636364 | 135 | 0.730274 |
bdc36797cc80b90f94e648ae90237773b3598901 | 2,643 | /*
* Copyright 2003-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | 26.69697 | 115 | 0.754067 |
5faaedec516ba4773653bd469ff7844043a7db43 | 711 | package com.csl.factory;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* @author MaoLongLong
* @date 2021-03-17 14:38:10
*/
class OperationFactoryTest {
@Test
void testOperationFactory() {
testOperation(3, 1, '+', 2);
testOperation(2, ... | 25.392857 | 82 | 0.64557 |
8f057c5022461f07fa9161cdd1da2037a2c77dbd | 2,853 | /*
* package : com.antsoft.ant.debugger
* source : LoadedClassesTreeCellRenderer.java
* date : 1999.8.9
*
* Ant ( JDK wrapper Java IDE )
* Version 1.0
* Copyright (c) 1998-1999 Antsoft Co. All rights reserved.
* This program and source file is protected by Korea and international
* Copyright law... | 29.112245 | 137 | 0.711532 |
262fa9f01af147121c2d583354ac90dae3c4b207 | 850 | package net.oschina.app.improve.bean;
import java.io.Serializable;
/**
* 启动页数据
* Created by huanghaibin on 2017/11/25.
*/
public class Launcher implements Serializable {
private boolean isAd;//是否是广告
private String imgUrl;//图片连接
private String href;//打开链接
private boolean isExpired;//是否过期
publi... | 17.708333 | 47 | 0.608235 |
36c683a8e3d44155d4054f6fe77c051a4c5b1508 | 282 | package com.ratingfund.app.util;
import java.util.Comparator;
import com.ratingfund.app.model.Fund;
public class IndexComparator implements Comparator<Fund>{
@Override
public int compare(Fund f1, Fund f2) {
return f1.getIndex().compareTo(f2.getIndex());
}
}
| 18.8 | 58 | 0.719858 |
7b1f91aa7ffd1851e8e468208e1e041b3c21dad6 | 1,090 | package cloud.artik.lwm2m.enums;
/**
* Java enum representing the result of a Firmware download/update.
*
* @author maneesh.sahu
*/
public enum FirmwareUpdateResult {
DEFAULT(0), // 0: Default value. Once the updating process is initiated, this Resource SHOULD be reset to default value.
... | 36.333333 | 142 | 0.623853 |
9254a6637c6266cf2f513a3ccf9d405012b7cbcf | 7,943 | /*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 34.385281 | 116 | 0.759411 |
d8e10920cb62c8ef36410c41d509c7248baf0a09 | 8,872 | package components;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
public class OthelloBoard extends Board {
/**
* The data structure containing the actual contents/configuration of the board
*/
public OthelloBoard() {
super(8); // Ha, film
contents = new Color... | 23.286089 | 141 | 0.569657 |
479dc0643716e94503c48a960349547c13af6bc1 | 3,462 | /*
* The MIT License
* Copyright © 2014-2021 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy... | 29.092437 | 95 | 0.670999 |
ab2389c0a80ff0e583fd6fc4a81e874d6468e6ec | 11,684 | /*******************************************************************************
* * Copyright 2015 Impetus Infotech.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
*... | 33.00565 | 111 | 0.601763 |
acdf786eebbdf92fdb26c55974b45f0529170109 | 2,807 | package net.geekstools.floatshort;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.AsyncTask;
import java.io.File;
import java.io.FileOutputStream;
import jav... | 24.622807 | 98 | 0.705379 |
ae472c557d5a951f04d0ec5cf0e106c9c4f72a96 | 214 | package cottee.myproperty;
/**
* Created by Administrator on 2018/3/18.
*/
public class TestTest {
@org.junit.Test
public void test1() throws Exception {
System.out.println("月数格式不正确");
}
} | 15.285714 | 42 | 0.64486 |
486fcde84623ca36ebc59c2e2cc99f6db9aa8a99 | 9,908 | /*
* This file is part of CubicChunksConverter, licensed under the MIT License (MIT).
*
* Copyright (c) 2017-2021 contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wi... | 48.097087 | 223 | 0.645236 |
40f0f49a196bd6011b573e350ca6e5188333a5c9 | 4,615 | package projeto_1.user;
import at.favre.lib.crypto.bcrypt.BCrypt;
import com.google.inject.Inject;
import projeto_1.Repository;
import projeto_1.exceptions.InternalServerErrorException;
import projeto_1.user.beans.User;
import javax.inject.Singleton;
import java.sql.*;
@Singleton
public class UserRepository extends ... | 34.962121 | 107 | 0.55753 |
e952312580e49bf83e27969d36ab42f96e160b07 | 2,151 | package com.twu.biblioteca.utils;
import com.twu.biblioteca.beans.User;
import com.twu.biblioteca.beans.Role;
import java.io.*;
public class UserFileUtil {
private boolean write(String filepath, String text) {
BufferedWriter bw = null;
try {
bw = new BufferedWriter(new FileWriter(fi... | 27.576923 | 96 | 0.489075 |
90004ab626b39573bb34c0a14ff17f5af6ddf4b9 | 4,412 | package io.github.artislong.core.ali;
import cn.hutool.core.text.CharPool;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.extra.spring.SpringUtil;
import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.OSSClientBuilder;
import io.github.artislong.constant.OssConstant;
import io.gith... | 45.484536 | 116 | 0.701496 |
5a6cb4788f5b2585240194d3c7920093130471cf | 3,104 | package org.mycompany.myname.model.dao.implement;
import org.mycompany.myname.model.dao.INoteDao;
import org.mycompany.myname.model.entity.Note;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
public class JDBCNoteDao implements INoteDao {
private Connection connection;
public JDBCNote... | 31.673469 | 95 | 0.604704 |
1a19b29b2c0fe6f8d15f1d788fd8afdd81a7f1c2 | 4,299 | package uk.ac.imperial.lsds.crossbow;
import java.io.File;
import uk.ac.imperial.lsds.crossbow.cli.CommandLine;
import uk.ac.imperial.lsds.crossbow.cli.Options;
import uk.ac.imperial.lsds.crossbow.kernel.Noop;
import uk.ac.imperial.lsds.crossbow.kernel.conf.NoopConf;
import uk.ac.imperial.lsds.crossbow.types.Learning... | 33.325581 | 137 | 0.694115 |
f2d91827ce73fd405b511e67444627d011c47ed0 | 3,034 | package info.seleniumcucumber.userStepDefintions;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import cucumber.api.Pendi... | 31.936842 | 98 | 0.713579 |
1b849835212556cab0da61edda4ea7a24f16e257 | 5,380 | package com.garowing.gameexp.game.rts.skill.model;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.x... | 21.349206 | 96 | 0.717658 |
cae4d852e9cfe0d1c0e37d4bc51b84d891ff00e1 | 1,303 | package com.cooey.maya;
import android.app.Activity;
import chatkit.Message;
import chatkit.events.OptionSelectedEvent;
import com.google.gson.GsonBuilder;
class ContentManager$2 implements Runnable {
final /* synthetic */ ContentManager this$0;
final /* synthetic */ OptionSelectedEvent val$optionSelectedEven... | 35.216216 | 182 | 0.678434 |
3b1c39d4c1924900fa7427ca42ced938dbafbfa8 | 1,013 | package com.eSports.system.data.dao;
import com.eSports.system.data.entity.GameInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface GameInfoDao {
/**
* 新增
*
* @param gameInfo
* @return
*/
... | 17.77193 | 74 | 0.584403 |
b5375de7c6309b4e004451ac65031f32e273b8fa | 536 | package com.deleidos.rtws.systemcfg.composers;
import java.io.InputStream;
import javax.xml.bind.MarshalException;
import com.deleidos.rtws.systemcfg.beans.SystemConfig;
public class ServiceDefinitionComposer implements DefinitionComposer {
public void initialize() {
}
public void writeFile(String version,... | 17.290323 | 72 | 0.755597 |
4c1550898c6f1238bcefe14b65a6e60792ed9dfc | 5,081 | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
package com.microsoft.azure.toolkit.intellij.appservice;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.project.Project;
import com.intel... | 38.78626 | 115 | 0.668176 |
51d5b22f614c436dcad64a43ef5b665319f7be3e | 435 | package com.silent.leetcode;
import java.util.HashMap;
import java.util.Map;
public class CheckDoubbeTest {
public boolean containsDuplicate(int[] nums) {
int length=nums.length;
Map<Integer,Integer> hashmap=new HashMap<>(length);
for (int i=0;i<length;i++){
hashmap.put(nums[i]... | 21.75 | 59 | 0.618391 |
548806c741ac5680d5616be4b78c6a6245944e3b | 1,492 | package com.zk.module_article.ui;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.zk.common_base.base.activity.BaseActivity;
import com.zk.common_ba... | 22.268657 | 63 | 0.669571 |
7890720f8a7eb13ae05d9cfc0618c9e22cdf5689 | 3,830 | /*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2020 The ZAP Development Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo... | 40.315789 | 99 | 0.675196 |
5c11f1eaca7985b4042fcd06a3adcc7bbc7eefb0 | 298 | package config;
import java.time.Duration;
public interface IServerProperties {
public int get_LOGIN_SERVER_PORT();
public int get_GAME_SERVER_PORT();
public int get_LOGIN_TOKEN_LENGTH();
public int get_MAX_USERNAME_LENGTH();
public Duration get_LOGIN_TOKEN_DURATION();
}
| 18.625 | 47 | 0.761745 |
be41fe9a9e099772d07be5d99542e14432a7173d | 301 | package me.philippheuer.twitch4j.exceptions;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ChannelDoesNotExistException extends RuntimeException {
private Long channelId;
public ChannelDoesNotExistException(Long channelId) {
super();
setChannelId(channelId);
}
}
| 17.705882 | 68 | 0.803987 |
8028295832514105705934c089f7693d4481685c | 1,246 | package org.bocogop.shared.model.voter;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
@JsonAutoDetect(fieldVisibility = NONE, getterVisibility... | 23.961538 | 105 | 0.686998 |
7c36f7d21f260a4b88db5165764db8372f8eef63 | 1,733 | package com.zulip.android.satchat.util;
/**
* List of all Constants used in the projects
*/
public class Constants {
public final static String IS_CONTENT_EDIT_PARAM_SAVED = "isContentEditParamSaved";
public final static String IS_EDITING_ALLOWED = "isEditingAllowed";
public final static String MAXIMUM_... | 50.970588 | 104 | 0.766301 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.