repo_name stringlengths 7 104 | file_path stringlengths 11 238 | context list | import_statement stringlengths 103 6.85k | code stringlengths 60 38.4k | next_line stringlengths 10 824 | gold_snippet_index int32 0 8 |
|---|---|---|---|---|---|---|
JamesNorris/Ablockalypse | src/com/github/jamesnorris/ablockalypse/aspect/Claymore.java | [
"public class Ablockalypse extends JavaPlugin {\n private static Ablockalypse instance;\n private static DataContainer data = new DataContainer();\n private static MainThread mainThread;\n private static External external;\n private static BaseCommand commandInstance;\n private static Tracker trac... | import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.block.data.Lightable;
import com.githu... | package com.github.jamesnorris.ablockalypse.aspect;
public class Claymore extends SpecificGameAspect {
private Location beamLoc = null;
private Location location;
private Game game;
private ZAPlayer placer;
private ClaymoreActionTask trigger = null;
private UUID uuid = UUID.random... | warning = AblockalypseUtility.scheduleNearbyWarning(location, ChatColor.GRAY + "Press " + ChatColor.AQUA + "SHIFT" + ChatColor.GRAY + " to pick up claymore.", 2, 2, 2, 10000);
| 4 |
Tristan971/EasyFXML | easyfxml-samples/easyfxml-sample-form-user/src/test/java/moe/tristan/easyfxml/samples/form/user/view/userform/fields/birthday/BirthdayComponentTest.java | [
"static final String ERROR_EMPTY_BIRTHDATE = \"You must provide an email address\";",
"static final String ERROR_LESS_13YO_BIRTHDATE = \"You must be at least 13 years old\";",
"public interface EasyFxml {\n\n /**\n * Loads a {@link FxmlComponent} as a Pane (this is the safest base class for all sorts of ... | import javafx.scene.layout.Pane;
import moe.tristan.easyfxml.EasyFxml;
import moe.tristan.easyfxml.junit.SpringBootComponentTest;
import moe.tristan.easyfxml.model.fxml.FxmlLoadResult;
import static moe.tristan.easyfxml.samples.form.user.view.userform.fields.birthday.BirthdayController.ERROR_EMPTY_BIRTHDATE;
import sta... | /*
* Copyright 2017 - 2019 EasyFXML project and contributors
*
* 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
*
* Unl... | .isEqualTo(ERROR_EMPTY_BIRTHDATE); | 0 |
mitdbg/AdaptDB | src/test/java/core/upfront/build/IndexBuilderTest.java | [
"public class ConfUtils {\n\tprivate Properties p;\n\n\tpublic ConfUtils(String propertiesFile) {\n\t\tp = new Properties();\n\t\ttry {\n\t\t\tp.load(new FileInputStream(propertiesFile));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"could not read the properties file!\");\n\t\t} catc... | import core.utils.ConfUtils;
import core.utils.HDFSUtils;
import junit.framework.TestCase;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import perf.benchmark.BenchmarkSettings;
import perf.benchmark.CreateTableInfo;
import perf.benchmark.RunIndexBuilder;
import java.io.IOException;
import j... | package core.upfront.build;
/**
* Created by anil on 12/18/15.
*/
public class IndexBuilderTest extends TestCase {
ConfUtils cfg;
FileSystem fs;
public void createTableInfo(String[] args) {
CreateTableInfo cti = new CreateTableInfo();
cti.loadSettings(args);
cti.createTableInfo... | BenchmarkSettings.loadSettings(args); | 2 |
commonsguy/cwac-netsecurity | demo/src/main/java/com/commonsware/cwac/netsecurity/demo/QuestionsFragment.java | [
"public class CertificateNotMemorizedException extends MemorizationException {\n CertificateNotMemorizedException(X509Certificate[] chain, String host) {\n super(chain, host);\n }\n}",
"public class MemorizationException extends CertificateException {\n public final X509Certificate[] chain;\n public final ... | import android.app.ListFragment;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.text.Html;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import... | /***
Copyright (c) 2013-2017 CommonsWare, LLC
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 in w... | StrongOkHttpClientBuilderEx | 5 |
Drusy/Wisper | wisper-libgdx/core/src/java/fr/wisper/Game/WisperGame.java | [
"public class MultipleVirtualViewportBuilder {\n\n\tprivate final float minWidth;\n\tprivate final float minHeight;\n\tprivate final float maxWidth;\n\tprivate final float maxHeight;\n\n\tpublic MultipleVirtualViewportBuilder(float minWidth, float minHeight, float maxWidth, float maxHeight) {\n\t\tthis.minWidth = m... | import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.FPSLogger;
import fr.wisper.camera.MultipleVirtualViewportBuilder;
import fr.wisper.camera.OrthographicCameraWithV... | package fr.wisper.Game;
public class WisperGame extends Game {
// Fps
private FPSLogger fps;
// Preferences
public static Preferences preferences;
// Loader
private LoadingScreen loader;
// Camera
static public OrthographicCameraWithVirtualViewport Camera;
static public Multiple... | preferences = Gdx.app.getPreferences(Config.GAME_NAME); | 6 |
52North/sos-importer | wizard/src/main/java/org/n52/sos/importer/controller/DateAndTimeController.java | [
"public abstract class Component {\n\n\t/**\n\t * returns a panel to complete the component\n\t * in case it is missing\n\t * @param c\n\t * @return\n\t */\n\tpublic abstract MissingComponentPanel getMissingComponentPanel(Combination c);\n}",
"public class ModelStore {\n\t\n\tprivate static final Logger logger = ... | import java.text.ParseException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.n52.sos.importer.model.Component;
import org.n52.sos.importer.model.ModelStore;
import org.n52.sos.importer.model.dateAndTime.DateAndTime;
import org.n52.sos.importer.model.dateAndTime.Day;
import o... | /**
* Copyright (C) 2011-2015 52°North Initiative for Geospatial Open Source
* Software GmbH
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*
* If the program is linked with... | public void setMissingComponents(final List<Component> components) { | 0 |
PaulNoth/saral | src/main/java/com/pidanic/saral/domain/block/Function.java | [
"public class ReturnStatement implements Statement {\n\n private Expression expression;\n\n public ReturnStatement(Expression variable) {\n this.expression = variable;\n }\n\n @Override\n public void accept(StatementGenerator generator) {\n ((ReturnStatementGenerator) generator).generat... | import com.pidanic.saral.domain.ReturnStatement;
import com.pidanic.saral.domain.Statement;
import com.pidanic.saral.generator.CallableStatementGenerator;
import com.pidanic.saral.generator.StatementGenerator;
import com.pidanic.saral.scope.Scope;
import com.pidanic.saral.util.Type;
import java.util.ArrayList;
import j... | package com.pidanic.saral.domain.block;
public class Function extends CallableStatement {
private String name;
private List<Argument> arguments;
private List<Statement> statements;
private ReturnStatement retStatement; | private Type returnType; | 5 |
R2RML-api/R2RML-api | r2rml-api-jena-binding/src/test/java/jenaTest/RDFSyntax2_Test.java | [
"public class JenaR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static JenaR2RMLMappingManager INSTANCE = new JenaR2RMLMappingManager(new JenaRDF());\n\n private JenaR2RMLMappingManager(JenaRDF rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod... | import eu.optique.r2rml.api.model.RefObjectMap;
import eu.optique.r2rml.api.model.SubjectMap;
import eu.optique.r2rml.api.model.Template;
import eu.optique.r2rml.api.model.TriplesMap;
import java.io.InputStream;
import java.util.Collection;
import java.util.Iterator;
import eu.optique.r2rml.api.binding.jena.Jena... | /*******************************************************************************
* Copyright 2013, the Optique Consortium
* 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... | JenaR2RMLMappingManager mm = JenaR2RMLMappingManager.getInstance();
| 0 |
kollerlukas/Camera-Roll-Android-App | app/src/main/java/us/koller/cameraroll/ui/SettingsActivity.java | [
"public abstract class Theme {\n\n static final int BASE_DARK = 0;\n static final int BASE_LIGHT = 1;\n\n public abstract int getBaseTheme();\n\n public boolean isBaseLight() {\n return getBaseTheme() == BASE_LIGHT;\n }\n\n /*flags*/\n public abstract boolean darkStatusBarIcons();\n\n ... | import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v14.preference.SwitchPreference;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
impor... | Math.abs(screenSize[3] - rootView.getBottom())};
Log.d("MainActivity", "windowInsets: " + Arrays.toString(windowInsets));
toolbar.setPadding(toolbar.getPaddingStart(),
... | Settings settings = Settings.getInstance(getContext()); | 1 |
damianbrunold/jbead | src/ch/jbead/ui/ColorPalette.java | [
"public class BeadPainter {\n\n private CoordinateCalculator coord;\n private Model model;\n private View view;\n private boolean forceColors = false;\n private boolean drawBorder = true;\n private Font symbolfont;\n\n private static Map<Color, Color> contrastingColors = new HashMap<Color, Colo... | import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.AbstractAction;
import javax.swing.JCo... | /** jbead - http://www.jbead.ch
Copyright (C) 2001-2012 Damian Brunold
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any la... | Point pt = new Point(i % 16, i / 16); | 3 |
x-hansong/EasyChat | Server/src/main/java/com/easychat/controller/UserController.java | [
"public class BadRequestException extends BasicException{\n public BadRequestException(String error, String description) {\n super(error, description);\n }\n}",
"public class UserDTO {\n private String name;\n\n private String password;\n\n public String getPassword() {\n return passw... | import com.easychat.exception.BadRequestException;
import com.easychat.model.dto.input.UserDTO;
import com.easychat.model.dto.output.UserDetailDTO;
import com.easychat.model.entity.User;
import com.easychat.model.error.ErrorType;
import com.easychat.model.msg.FriendInviteMsg;
import com.easychat.service.UserService;
im... | package com.easychat.controller;
/**
* Created by yonah on 15-10-18.
*/
@RestController
@RequestMapping("/v1/users")
public class UserController {
private UserService userService;
private SimpMessagingTemplate simpMessagingTemplate;
@InitBinder("userDTO")//这里要填需要校验的变量名
protected void initBinder(... | FriendInviteMsg friendInviteMsg = new FriendInviteMsg(name, friendName, (String) data.get("content")); | 5 |
marcosbarbero/spring-cloud-zuul-ratelimit | spring-cloud-zuul-ratelimit-tests/bucket4j-ignite/src/test/java/com/marcosbarbero/tests/it/Bucket4jIgniteApplicationTestIT.java | [
"public static final String HEADER_LIMIT = \"X-RateLimit-Limit\";",
"public static final String HEADER_QUOTA = \"X-RateLimit-Quota\";",
"public static final String HEADER_REMAINING = \"X-RateLimit-Remaining\";",
"public static final String HEADER_REMAINING_QUOTA = \"X-RateLimit-Remaining-Quota\";",
"public ... | import static com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.support.RateLimitConstants.HEADER_LIMIT;
import static com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.support.RateLimitConstants.HEADER_QUOTA;
import static com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.support.RateLimitConstants.HEADER_REM... | package com.marcosbarbero.tests.it;
/**
* @author Liel Chayoun
* @since 2018-04-07
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class Bucket4jIgniteApplicationTestIT {
@Autowired
private TestRestTemplate restTemplate;
@Autowired
private RateLimiter rateLim... | String limit = headers.getFirst(HEADER_LIMIT + key); | 0 |
bafomdad/realfilingcabinet | com/bafomdad/realfilingcabinet/utils/MobUtils.java | [
"public class CapabilityFolder implements INBTSerializable<NBTTagCompound>\n{\n // The ItemStack instance you're working within (REFERENCE PURPOSES ONLY!)\n private final ItemStack rootStack;\n \n private String displayName = \"\";\n private Object contents;\n private long count = 0;\n private ... | import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import com.bafomdad.realfilingcabinet.items.capabilities.CapabilityFolder;
import com.bafomdad.realfilingcabinet.items.capabilities.CapabilityProviderFolder;
import net.minecraft.entity.Entity;
import net.minecraft.en... | package com.bafomdad.realfilingcabinet.utils;
public class MobUtils {
public static boolean canPlayerChangeStuffHere(World world, EntityPlayer player, ItemStack stack, BlockPos pos, EnumFacing facing) {
if (!world.isBlockModifiable(player, pos))
return false;
if (!player.canPlayerEdit(pos, facing, s... | if (ItemFolder.getFileSize(stack) > 0) { | 4 |
ericleong/forceengine | Force Engine/src/forceengine/demo/objects/ForceCircle_opt.java | [
"public interface Freezable {\n\tpublic void setFrozen(boolean frozen);\n\tpublic boolean isFrozen();\n}",
"public class CircleMath {\n\t/**\n\t * checks whether or not 2 circles have collided with each other\n\t * \n\t * @param circle1\n\t * the first circle\n\t * @param circle2\n\t * the s... | import java.util.LinkedList;
import java.util.ListIterator;
import forceengine.game.Freezable;
import forceengine.math.CircleMath;
import forceengine.math.VectorMath;
import forceengine.objects.ForceCircle;
import forceengine.objects.Point;
import forceengine.objects.PointVector;
import forceengine.objects.RectVector;
... | package forceengine.demo.objects;
/**
* A <code>ForceCircle</code> with some flexibility.
*
* @author Eric
*
*/
public class ForceCircle_opt extends ForceCircle implements Freezable {
protected boolean alive = true;
protected boolean frozen;
protected boolean collide = true;
protected boolean responsive =... | public Vector responsiveAcceleration(PointVector pv, double t, Point b){ | 7 |
chudooder/FEMultiplayer | src/net/fe/overworldStage/context/ItemCmd.java | [
"public class AudioPlayer {\n\n\tstatic Camera camera;\n\tstatic float globalGain;\n\n\tpublic static void setCamera(Camera c) {\n\t\tcamera = c;\n\t\tglobalGain = 0f;\n\t}\n\n\tpublic static void playAudio(String name, float pitch, float gain, float x,\n\t\t\tfloat y, float z, float fade) {\n\t\tAudio audio = FERe... | import chu.engine.anim.AudioPlayer;
import net.fe.overworldStage.Healthbar;
import net.fe.overworldStage.InventoryMenu;
import net.fe.overworldStage.MenuContext;
import net.fe.overworldStage.OverworldContext;
import net.fe.overworldStage.ClientOverworldStage;
import net.fe.unit.HealingItem;
import net.fe.unit.It... | package net.fe.overworldStage.context;
public class ItemCmd extends MenuContext<ItemDisplay>{
private Unit unit;
public ItemCmd(ClientOverworldStage stage, OverworldContext prev, Unit u) {
super(stage, prev, new InventoryMenu(u));
unit = u;
}
@Override
public void onSelect(ItemDisplay selectedItem)... | AudioPlayer.playAudio("select", 1, 1);
| 0 |
BurstProject/burstcoin | src/java/nxt/at/AT_Controller.java | [
"public final class AT extends AT_Machine_State {\n\n\tstatic {\n\t\tNxt.getBlockchainProcessor().addListener(new Listener<Block>() {\n\t\t\t@Override\n\t\t\tpublic void notify(Block block) {\n\t\t\t\tfor(Long id : pendingFees.keySet()) {\n\t\t\t\t\tAccount atAccount = Account.getAccount(id);\n\t\t\t\t\tatAccount.a... | import java.nio.BufferUnderflowException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
im... |
b.put( creation );
b.clear();
AT_Constants instance = AT_Constants.getInstance();
short version = b.getShort();
if ( version != instance.AT_VERSION( height ) )
{
throw new AT_Exception( AT_Error.INCORRECT_VERSION.getDescription() );
}
short reserved = b.getShort(); //future: reserved fo... | List< Long > orderedATs = AT.getOrderedATs(); | 0 |
eriq-augustine/jocr | src/com/eriqaugustine/ocr/drivers/GenerateFontList.java | [
"public class WrapImage {\n private static Logger logger = LogManager.getLogger(WrapImage.class.getName());\n\n private MagickImage internalImage;\n\n private int imageWidth;\n private int imageHeight;\n\n private Pixel[] cachePixels;\n // {<threshold>: discretePixels}\n private Map<Integer, boolean[]... | import com.eriqaugustine.ocr.image.WrapImage;
import com.eriqaugustine.ocr.utils.FontUtils;
import com.eriqaugustine.ocr.utils.ImageUtils;
import com.eriqaugustine.ocr.utils.ListUtils;
import com.eriqaugustine.ocr.utils.Props;
import java.util.ArrayList;
import java.util.List; | package com.eriqaugustine.ocr.drivers;
/**
* General a single image that has one line for each font listed.
*/
public class GenerateFontList {
private static final String SAMPLE_CHARACTERS = "あいうえおかきくけこ。アイウエオカキクケコ。日一大年中会人本月。‘”?!";
private static final int SAMPLE_WIDTH = 5000;
private static final int SAM... | baseImage = ImageUtils.overlayImage(baseImage, labelImage, SAMPLE_HEIGHT * i, 0); | 2 |
agolinko/pdfparse | pdfparse-lib/src/main/java/org/pdfparse/cos/COSDictionary.java | [
"public class PDFRectangle implements COSObject {\n /** lower left x */\n private float llx;\n\n /** lower left y */\n private float lly;\n\n /** upper right x */\n private float urx;\n\n /** upper right y */\n private float ury;\n\n // constructors\n\n /**\n * Constructs a <CODE>P... | import java.util.LinkedHashMap;
import org.pdfparse.cds.PDFRectangle;
import org.pdfparse.exception.EParseError;
import org.pdfparse.parser.ObjectRetriever;
import org.pdfparse.parser.PDFParser;
import org.pdfparse.parser.PDFRawData;
import org.pdfparse.parser.ParserSettings;
import org.pdfparse.utils.DateConverter;
im... | /*
* Copyright (c) 2013 Anton Golinko
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This librar... | if (ParserSettings.PRETTY_PRINT) | 4 |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/networkbuilder/PMBInteractionNetworkBuildTaskFactory.java | [
"public class UniProtEntry extends Protein {\n\n\tprivate final LinkedHashSet<String> accessions;\n\tprivate final String geneName;\n\tprivate final Set<String> synonymGeneNames;\n\tprivate final String proteinName;\n\tprivate final String ecNumber;\n\tprivate final boolean reviewed;\n\tprivate final GeneOntologyTe... | import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.data.protein.UniProtEntry;
import ch.picard.ppimapbuilder.data.protein.UniProtEntrySet;
import ch.picard.ppimapbuilder.networkbuilder.network.PMBCreateNetworkTask;
import ch.picard.ppimapbuilder.networkbuilder.query.PMBInteractionQuer... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | private Set<UniProtEntry> proteinOfInterestPool; // not the same as user input | 0 |
cloudera/director-aws-plugin | provider/src/main/java/com/cloudera/director/aws/ec2/ebs/EBSAllocator.java | [
"public static <T> T retryUntil(Callable<T> func)\n throws InterruptedException, RetryException, ExecutionException {\n return retryUntil(func, DEFAULT_TIMEOUT);\n}",
"public class AWSExceptions {\n\n private static final Logger LOG = LoggerFactory.getLogger(AWSExceptions.class);\n\n /**\n * Error code su... | import static com.cloudera.director.aws.ec2.EC2Retryer.retryUntil;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;
import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.services.ec2.AmazonEC2Client;
... | // (c) Copyright 2016 Cloudera, 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 t... | public List<InstanceEbsVolumes> createVolumes(EC2InstanceTemplate template, | 3 |
dvorka/shifts-solver | src/com/mindforger/shiftsolver/client/ui/buttons/ChangeAssignmentButton.java | [
"public class RiaContext implements ShiftSolverConstants {\n\n\t// RIA\n\tprivate Ria ria;\n\t\n\t// i18n and l10n\n\tprivate RiaMessages i18n;\n\t\n\t// server\n\tprivate ShiftSolverServiceAsync service;\n\t\n\t// solver\n\tprivate ShiftSolver solver;\n\t\n\t// validation\n\tprivate FieldVerifier fieldVerifier;\n\... | import java.util.List;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.mindforger.shiftsolver.client.RiaContext;
import com.mindforger.shiftsolver.client.solver.ShiftSolver;
import com.mindforger.shiftsolver.... | package com.mindforger.shiftsolver.client.ui.buttons;
public class ChangeAssignmentButton extends Button implements ShiftSolverConstants {
private Holder<String> employeeHolder;
private RiaContext ctx;
private List<Employee> employees; | private ChangeAssignmentDialog dialog; | 3 |
abashev/vfs-s3 | src/test/java/com/intridea/io/vfs/provider/s3/AclHandlingTest.java | [
"public class Acl {\n public enum Permission {\n READ, WRITE\n }\n\n public enum Group {\n OWNER, AUTHORIZED, EVERYONE\n };\n\n /**\n * Number of available groups\n */\n private int groupsCount = Group.values().length;\n\n /**\n * Number of available rules\n */\n ... | import com.github.vfss3.operations.Acl;
import com.github.vfss3.operations.Acl.Group;
import com.github.vfss3.operations.Acl.Permission;
import com.github.vfss3.operations.IAclGetter;
import com.github.vfss3.operations.IAclSetter;
import com.github.vfss3.operations.PlatformFeatures;
import com.intridea.io.vfs.support.A... | package com.intridea.io.vfs.provider.s3;
public class AclHandlingTest extends AbstractS3FileSystemTest {
private static final String FOLDER = "/acl";
FileObject file;
FileObject folder;
Acl fileAcl;
@Test
public void checkGet() throws FileSystemException {
file = resolveFile(FOLDER... | if (!((PlatformFeatures) file.getFileOperations().getOperation(PlatformFeatures.class)).supportsAcl()) { | 5 |
googlegsa/sharepoint | test/com/google/enterprise/adaptor/sharepoint/SharePointAdaptorTest.java | [
"interface ADServer {\n /*\n * Resolves input SID to user account name. Returns null if SID is not \n * available.\n */\n public String getUserAccountBySid(String sid) throws IOException;\n \n /*\n * Initializes LDAP Context and verifies that successful connection can\n * established with AD server ... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static com.google.common.base.Preconditions.checkNotNul... | }
@Test
public void testIssueGetRequestWithRelativeRedirect() throws Exception {
HttpClient client = new SharePointAdaptor.HttpClientImpl() {
@Override
public HttpURLConnection getHttpURLConnection(URL url)
throws IOException {
String urlToServe = url.toString();
if ("ht... | adaptor.new SharePointUrl(null, "", ""); | 4 |
marcelothebuilder/webpedidos | src/main/java/com/github/marcelothebuilder/webpedidos/controller/CidadeEstadoBean.java | [
"@Entity\n@Table(name=\"cidade\")\npublic class Cidade implements Serializable {\n\tprivate static final long serialVersionUID = 1L;\n\tprivate Integer codigo;\n\tprivate String nome;\n\tprivate Estado estado;\n\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\tpublic Integer getCodigo() {\n\t\tretur... | import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import com.github.marcelothebuilder.webpedidos.model.endereco.Cidade;
import com.github.marcelothebuilder.webpedidos.model.ende... | /**
*
*/
package com.github.marcelothebuilder.webpedidos.controller;
/**
* @author Marcelo Paixao Resende
*
*/
@Named
@ViewScoped
public class CidadeEstadoBean implements Serializable {
private static final long serialVersionUID = 1L;
private @Inject Estados estados;
private @Inject Cidades cidades;
priv... | private Cidade cidade; | 0 |
patrickzib/SFA | src/test/java/sfa/SFABulkLoadTest.java | [
"public class SFATrie implements Serializable {\n private static final long serialVersionUID = 8983404060948074333L;\n\n protected SFANode root;\n\n // The queryLength of the approximations\n protected int wordLength;\n public SFA quantization = null;\n\n // The number of elements until a leaf node is split\n... | import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import sfa.index.SFATrie;
import sfa.index.SFATrieTest;
import sfa.index.SortedListMap;
import sfa.timeseries.TimeSeries;
import sfa.timeseries.TimeSeriesLoa... | // Copyright (c) 2016 - Patrick Schäfer (patrick.schaefer@zib.de)
// Distributed under the GLP 3.0 (See accompanying file LICENSE)
package sfa;
@RunWith(JUnit4.class)
public class SFABulkLoadTest {
static File tempDir = null;
static ExecutorService serializerExec = Executors.newFixedThreadPool(2); // serialize ... | private TimeSeries getTimeSeries(int i, int n) { | 3 |
AngelaFabregues/dipGame | dip/src/es/csic/iiia/fabregues/dip/comm/GameBuilder.java | [
"public class Game {\n\n\tprivate Hashtable<String, Province> provinces;\n\tprivate Hashtable<String, Power> powers;\n\tprivate Hashtable<String, Region> regions;\n\n\tprivate int year;\n\tprivate Phase phase;\n\n\tprivate HashMap<Region,Dislodgement> dislodgedRegions;\n\t\n\tprivate List<Power> nonDeadPowers;\n\t\... | import java.util.Hashtable;
import es.csic.iiia.fabregues.dip.board.Game;
import es.csic.iiia.fabregues.dip.board.Phase;
import es.csic.iiia.fabregues.dip.board.Power;
import es.csic.iiia.fabregues.dip.board.Province;
import es.csic.iiia.fabregues.dip.board.Region; | package es.csic.iiia.fabregues.dip.comm;
/**
* Builds a game from scratch or from a MDF
*
* @author Angela Fabregues, IIIA-CSIC, fabregues@iiia.csic.es
*/
public class GameBuilder {
public final static String DEFAULT_MAP = "'STANDARD'";
public final static String[] DEFAULT_HOMES = {"SCO", "(", "AUS", "BUD",... | protected Hashtable<String, Province> provinces; | 3 |
briangormanly/4dflib | src/test/java/com/fdflib/Basic4dfTest.java | [
"public class FdfEntity<S extends CommonState> {\n public S current;\n public List<S> history;\n public long entityId = -1;\n\n public FdfEntity() {\n current = null;\n history = new ArrayList<>();\n }\n\n public FdfEntity(S currentState, List<S> historyStates) {\n entityId = ... | import com.fdflib.model.entity.FdfEntity;
import com.fdflib.model.state.FdfSystem;
import com.fdflib.persistence.database.DatabaseUtil;
import com.fdflib.service.FdfServices;
import com.fdflib.service.FdfSystemServices;
import com.fdflib.util.FdfSettings;
import org.junit.Test;
import java.util.ArrayList;
import java.u... | package com.fdflib;
/**
* Created by brian.gormanly on 9/25/15.
*/
public class Basic4dfTest {
@Test
public void basicSystemTest() {
// get the 4dflib settings singleton | FdfSettings fdfSettings = FdfSettings.getInstance(); | 5 |
MikeFot/java-lib-annotated-validator | src/test/com/michaelfotiadis/validator/annotated/validators/numeric/doublenum/ProcessorDoubleMaxValueValidatorTest.java | [
"public class ValidationResultsContainer {\n\n private final Map<String, List<ValidationStatus>> resultsMap;\n\n public ValidationResultsContainer() {\n resultsMap = new HashMap<>();\n }\n\n public Map<String, List<ValidationStatus>> getResults() {\n return resultsMap;\n }\n\n public... | import com.michaelfotiadis.validator.annotated.ValidationResultsContainer;
import com.michaelfotiadis.validator.annotated.annotations.numeric.doublenum.DoubleMaxValue;
import com.michaelfotiadis.validator.annotated.model.ValidationStatus;
import com.michaelfotiadis.validator.annotated.processor.AnnotatedValidatorProces... | package com.michaelfotiadis.validator.annotated.validators.numeric.doublenum;
/**
*
*/
public class ProcessorDoubleMaxValueValidatorTest {
private AnnotatedValidatorProcessor processor;
@Before
public void setUp() throws Exception {
processor = new AnnotatedValidatorProcessor();
}
... | assertEquals(result.getFailedStatuses().iterator().next(), ValidationStatus.DOUBLE_OUT_OF_RANGE); | 1 |
SpongeBobSun/Prodigal | app/src/main/java/bob/sun/bender/fragments/MainMenuFragment.java | [
"public class MainActivity extends AppCompatActivity implements OnButtonListener {\n private FragmentManager fragmentManager;\n private MainMenuFragment mainMenu;\n private SimpleListFragment songsList;\n private SimpleListFragment artistsList;\n private SimpleListFragment albumsList;\n private Co... | import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;... | package bob.sun.bender.fragments;
/**
* Created by sunkuan on 2015/4/23.
*/
public class MainMenuFragment extends TwoPanelFragment implements OnTickListener {
RecyclerView theList;
int currentItemIndex;
ImageView imageView;
FrameLayout rightPanelContent;
LinearLayout nowPlayingPage;
Linear... | dumper = AIDLDumper.getInstance((MainActivity) getActivity()); | 0 |
mfornos/humanize | humanize-icu/src/main/java/humanize/icu/spi/context/DefaultICUContext.java | [
"public static final String EMPTY = \"\";",
"public class MessageFormat extends com.ibm.icu.text.MessageFormat\n{\n\n private static final long serialVersionUID = -5384364921909539710L;\n\n public MessageFormat(String pattern)\n {\n\n super(pattern);\n\n }\n\n public MessageFormat(String pat... | import static humanize.util.Constants.EMPTY;
import humanize.icu.spi.MessageFormat;
import humanize.spi.cache.CacheProvider;
import humanize.spi.context.Context;
import humanize.text.MaskFormat;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.ServiceLoader;
import java.... | package humanize.icu.spi.context;
/**
* Default implementation of {@link Context}.
*
* @author mfornos
*
*/
public class DefaultICUContext implements Context, ICUContext
{
private static final String DURATION_FORMAT = "icu.duration.format";
private static final String CURRENCY = "icu.currency";
... | this.messageFormat = new MessageFormat(EMPTY, locale); | 0 |
calrissian/flowmix | src/test/java/org/calrissian/flowmix/core/storm/bolt/AggregatorBoltIT.java | [
"public class Flow implements Serializable{\n\n String id;\n String name;\n String description;\n\n Map<String,StreamDef> streams = new HashMap<String, StreamDef>();\n\n public String getId() {\n return id;\n }\n\n public String getName() {\n return name;\n }\n\n public Stri... | import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import backtype.storm.Config;
import backtype.storm.LocalCluster;
import backtype.storm.generated.StormTopology;
import org.calrissian.flowmix.api.Flow;
import org.calrissian.flowmix.api.FlowTestCase;
import org.calrissian.flowmix.... | /*
* Copyright (C) 2014 The Calrissian 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | conf.registerSerialization(Event.class, EventSerializer.class); | 4 |
blinkfox/zealot | src/main/java/com/blinkfox/zealot/config/scanner/XmlScanner.java | [
"public enum XmlContext {\n\n /**\n * 唯一实例.\n */\n INSTANCE {\n\n /** 所有zealots XML文档的缓存上下文的map,key是文件命名空间标识,value是xml文件资源路径. */\n private final Map<String, String> xmlPathMap = new ConcurrentHashMap<String, String>();\n\n /**\n * 添加xml命名空间和文件路径到`ConcurrentHashMap`中.\n ... | import com.blinkfox.zealot.config.entity.XmlContext;
import com.blinkfox.zealot.consts.ZealotConst;
import com.blinkfox.zealot.helpers.CollectionHelper;
import com.blinkfox.zealot.helpers.StringHelper;
import com.blinkfox.zealot.helpers.XmlNodeHelper;
import com.blinkfox.zealot.log.Log;
import java.io.IOException;
impo... | package com.blinkfox.zealot.config.scanner;
/**
* zealot的XML文件包的扫描类,将扫描到的所有zealot xml文件添加到XmlContext中,供后续配置使用.
*
* @author blinkfox on 2018/4/24.
*/
public final class XmlScanner implements Scanner {
private static final Log log = Log.get(XmlScanner.class);
/** 存放所有扫描位置下的XML文件资源路径Set集合. */
private ... | String nameSpace = XmlNodeHelper.getZealotXmlNameSpace(xmlPath); | 4 |
idega/com.idega.documentmanager | src/java/com/idega/documentmanager/business/Document.java | [
"public interface Container extends Component {\n\n\tpublic abstract Component getComponent(String component_id);\n\t\n\tpublic abstract List<String> getContainedComponentsIdList();\n\t\n\tpublic abstract Component addComponent(String component_type, String component_after_this_id) throws NullPointerException;\n\t\... | import java.util.List;
import org.w3c.dom.Element;
import com.idega.documentmanager.business.component.Container;
import com.idega.documentmanager.business.component.Page;
import com.idega.documentmanager.business.component.PageThankYou;
import com.idega.documentmanager.business.component.properties.ParametersManager;
... | package com.idega.documentmanager.business;
/**
* @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a>
* @version $Revision: 1.13 $
*
* Last modified: $Date: 2008/10/28 10:33:33 $ by $Author: civilis $
*/
public interface Document extends Container {
/**
* <p>
* Creates new form page... | public abstract LocalizedStringBean getFormTitle(); | 6 |
saalfeldlab/bigcat | src/main/java/bdv/bigcat/BigCatDvidViewer.java | [
"public class ConfirmSegmentController\n{\n\tfinal protected ViewerPanel viewer;\n\tfinal protected SelectionController selectionController;\n\tfinal protected FragmentSegmentAssignment assignment;\n\tfinal protected SegmentAssignment completeSegments;\n\tfinal protected AbstractARGBStream colorStream;\n\tfinal pro... | import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import org.scijava.ui.behaviour.io.InputTriggerConfig;
import org.scijava.ui.behaviour.io.InputTriggerDescription;
import org.scijava.ui.behaviour.io.yaml.YamlConfigIO;
import org.scijava.ui.behaviour.util.TriggerBehav... | package bdv.bigcat;
public class BigCatDvidViewer extends BigCatViewer< BigCatDvidViewer.Parameters >
{
static public class Parameters extends BigCatViewer.Parameters
{
@Option( names = { "--url" }, description = "URL" )
public String url = "";
@Option( names = { "--uuid" }, description = "UUID" )
public... | completeSegments = new SegmentAssignment(); | 4 |
bkueng/clash_of_balls | src/com/sapos_aplastados/game/clash_of_balls/menu/MenuItemString.java | [
"public class Font2D implements IDrawable {\n\n\tprivate static final String LOG_TAG = \"Font2D\";\n\t\n\tprivate Texture m_texture;\n\tprivate Vector m_text_field_size;\n\t\n\tprivate Typeface m_typeface;\n\tprivate String m_string;\n\tprivate int m_font_size;\n\tprivate TextAlign m_align;\n\tprivate float m_color... | import com.sapos_aplastados.game.clash_of_balls.R;
import com.sapos_aplastados.game.clash_of_balls.Font2D;
import com.sapos_aplastados.game.clash_of_balls.Texture;
import com.sapos_aplastados.game.clash_of_balls.TextureManager;
import com.sapos_aplastados.game.clash_of_balls.VertexBufferFloat;
import com.sapos_aplastad... | /*
* Copyright (C) 2012-2013 Hans Hardmeier <hanshardmeier@gmail.com>
* Copyright (C) 2012-2013 Andrin Jenal
* Copyright (C) 2012-2013 Beat Küng <beat-kueng@gmx.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* ... | private Texture m_normal_texture; | 1 |
Kindrat/cassandra-client | src/main/java/com/github/kindrat/cassandra/client/ui/window/editor/main/filter/FilterTextField.java | [
"public enum Combiner {\n OR, AND\n}",
"@Getter\n@RequiredArgsConstructor\npublic enum Operator {\n EQ(\"=\"), GT(\">\"), GE(\">=\"), LT(\"<\"), LE(\"<=\"), NE(\"!=\"), LIKE(\"LIKE\");\n\n private final String value;\n\n public static Operator fromValue(String value) {\n return stream(Operator.... | import com.datastax.driver.core.ColumnMetadata;
import com.datastax.driver.core.TableMetadata;
import com.github.kindrat.cassandra.client.filter.Combiner;
import com.github.kindrat.cassandra.client.filter.Operator;
import com.github.kindrat.cassandra.client.filter.condition.*;
import com.github.kindrat.cassandra.client... | package com.github.kindrat.cassandra.client.ui.window.editor.main.filter;
@Slf4j
public class FilterTextField extends TextField {
private final List<StateCondition> stateConditions = new ArrayList<>();
private final ContextMenu context = new ContextMenu();
private Map<String, ColumnMetadata> columnsByNa... | columnsByName = toMap(metadata.getColumns(), ColumnMetadata::getName); | 4 |
izumin5210/Sunazuri | app/src/main/java/info/izumin/android/sunazuri/Sunazuri.java | [
"@DataScope\n@Component(\n dependencies = {\n InfrastructureComponent.class\n },\n modules = {\n ActionModule.class,\n DataModule.class\n }\n)\npublic interface DataComponent {\n RootStore rootStore();\n OauthParams oauthParams();\n\n ... | import android.app.Application;
import android.content.Context;
import android.support.annotation.VisibleForTesting;
import com.squareup.leakcanary.LeakCanary;
import com.squareup.picasso.Picasso;
import info.izumin.android.sunazuri.data.DaggerDataComponent;
import info.izumin.android.sunazuri.data.DataComponent;
impor... | package info.izumin.android.sunazuri;
/**
* Created by izumin on 5/13/2016 AD.
*/
public class Sunazuri extends Application {
public static final String TAG = Sunazuri.class.getSimpleName();
public static Sunazuri get(Context context) {
return (Sunazuri) context.getApplicationContext();
}
... | .apiModule(new ApiModule(BuildConfig.ESA_API_ENDPOINT, getOauthParams(), getResponseEnvelopeKeys())) | 4 |
timeforcoffee/timeforcoffee-android | wear/src/main/java/ch/liip/timeforcoffee/activity/WearActivity.java | [
"public class TabsAdapter extends FragmentPagerAdapter {\n\n private final List fragments;\n private final int[] titles;\n private Context context;\n\n public TabsAdapter(Context context, FragmentManager fm, int[] titlesRes, List fragments) {\n super(fm);\n this.context = context;\n ... | import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.support.wearable.view.DismissOverlayView;
import android.support.wearable.view.DotsPageIndicator;
import android.view.GestureDetector;
import android.view.Menu;
import android.view.MotionEve... | package ch.liip.timeforcoffee.activity;
public class WearActivity extends Activity {
private FragmentViewPager mFragmentViewPager;
private TabsAdapter mTabsAdapter;
private DotsPageIndicator mDotsPageIndicator;
private StationListFragment mStationListFragment;
private DepartureListFragment mDe... | private RefreshActionFragment mRefreshActionFragment; | 5 |
amao12580/BookmarkHelper | app/src/main/java/pro/kisscat/www/bookmarkhelper/converter/support/impl/Default/impl/Flyme5Browser.java | [
"public final class R {\n public static final class anim {\n public static final int abc_fade_in=0x7f050000;\n public static final int abc_fade_out=0x7f050001;\n public static final int abc_grow_fade_in_from_bottom=0x7f050002;\n public static final int abc_popup_enter=0x7f050003;\n ... | import android.content.Context;
import android.support.v4.content.ContextCompat;
import java.util.LinkedList;
import java.util.List;
import pro.kisscat.www.bookmarkhelper.R;
import pro.kisscat.www.bookmarkhelper.converter.support.impl.Default.DefaultBrowserAble;
import pro.kisscat.www.bookmarkhelper.entry.app.Bookmark;... | package pro.kisscat.www.bookmarkhelper.converter.support.impl.Default.impl;
/**
* Created with Android Studio.
* Project:BookmarkHelper
* User:ChengLiang
* Mail:stevenchengmask@gmail.com
* Date:2016/10/9
* Time:15:38
*/
public class Flyme5Browser extends DefaultBrowserAble {
private String TAG = "Flyme5... | ExternalStorageUtil.mkdir(filePath_cp, this.getName()); | 7 |
sivaprasadreddy/jblogger | src/main/java/com/sivalabs/jblogger/web/controllers/BlogController.java | [
"@Data\n@Builder\npublic class PostDTO {\n private Long id;\n private String title;\n private String url;\n private String content;\n private String shortDescription;\n private String createdByUserName;\n private LocalDateTime createdOn;\n private LocalDateTime updatedOn;\n private Long v... | import com.sivalabs.jblogger.domain.PostDTO;
import com.sivalabs.jblogger.domain.PostsResponse;
import com.sivalabs.jblogger.entities.Comment;
import com.sivalabs.jblogger.entities.PageView;
import com.sivalabs.jblogger.entities.Post;
import com.sivalabs.jblogger.mappers.PostsResponseMapper;
import com.sivalabs.jblogge... | package com.sivalabs.jblogger.web.controllers;
@Controller
public class BlogController extends BaseController
{
private static final String viewsDir = "blog/";
private final PostService postService;
@Autowired
public BlogController(PostService postService) {
this.postService = postService;
}
@GetMapping(... | Post postEntity = new Post(); | 4 |
numenta/htm.java | src/test/java/org/numenta/nupic/model/ComputeCycleTest.java | [
"public class Parameters implements Persistable {\n /** keep it simple */\n private static final long serialVersionUID = 1L;\n \n private static final Map<KEY, Object> DEFAULTS_ALL;\n private static final Map<KEY, Object> DEFAULTS_TEMPORAL;\n private static final Map<KEY, Object> DEFAULTS_SPATIAL;... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
import ja... | package org.numenta.nupic.model;
public class ComputeCycleTest {
@Test
public void testConversionConstructor() {
Column column = new Column(10, 0);
List<Cell> cells = IntStream.range(0, 10)
.mapToObj(i -> new Cell(column, i))
.collect(Collectors.toList());
... | TemporalMemory tm = new TemporalMemory(); | 2 |
derohimat/FirebaseAuthExample | app/src/main/java/net/derohimat/firebasebasemvp/view/login/LoginActivity.java | [
"public class LoginEvent {\n @Nullable\n private final boolean mSuccess;\n @Nullable\n private final String message;\n\n public LoginEvent(boolean mSuccess, @Nullable String message) {\n this.mSuccess = mSuccess;\n this.message = message;\n }\n\n @Nullable\n public boolean isSu... | import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.ProgressBar;
import com.facebook.CallbackManager;
import com.facebook.FacebookCallback;
import com.facebook.FacebookExce... | package net.derohimat.firebasebasemvp.view.login;
/**
* Created by derohimat on 23/05/2016.
*/
public class LoginActivity extends FireAuthBaseActivity implements LoginView {
@Bind(R.id.inpEmail)
EditText mInpEmail;
@Bind(R.id.inpPassword)
EditText mInpPassword;
@Bind(R.id.login_button)
... | public void onEvent(LoginEvent event) { | 0 |
greatman/craftconomy3 | src/main/java/com/greatmancode/craftconomy3/storage/StorageEngine.java | [
"public enum Cause implements Serializable {\n VAULT,\n USER,\n PLUGIN,\n SPOUT,\n BANK_CREATION,\n CONVERT,\n EXCHANGE,\n PAYMENT,\n BANK_DEPOSIT,\n BANK_WITHDRAW,\n BANK_DELETE,\n PAYDAY_TAX,\n PAYDAY_WAGE,\n UNKNOWN;\n\n}",
"public class Account {\n private int id;\... | import java.sql.Timestamp;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import com.greatmancode.craftconomy3.Cause;
import com.greatmancode.craftconomy3.LogInfo;
import com.greatmancode.craftconomy3.account.Account;
import com.greatmancode.craftconomy3.account.AccountACLValue;
import com.greatman... | /**
* This file is part of Craftconomy3.
*
* Copyright (c) 2011-2016, Greatman <http://github.com/greatman/>
*
* Craftconomy3 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of t... | public abstract List<Balance> getAllBalance(Account account); | 3 |
GoogleCloudPlatform/endpoints-codelab-android | todoTxtTouch/src/instrumentTest/java/com/todotxt/todotxttouch/test/RemoteClientManagerStub.java | [
"public class TodoApplication extends Application {\n private final static String TAG = TodoApplication.class.getSimpleName();\n public TodoPreferences m_prefs;\n private boolean m_pulling = false;\n private boolean m_pushing = false;\n private int pushQueue = 0;\n private TaskBag taskBag;\n pr... | import com.todotxt.todotxttouch.remote.PullTodoResult;
import com.todotxt.todotxttouch.remote.RemoteClient;
import com.todotxt.todotxttouch.remote.RemoteClientManager;
import com.todotxt.todotxttouch.remote.RemoteFolder;
import java.io.File;
import java.util.List;
import com.todotxt.todotxttouch.TodoApplication;
import... | /**
* This file is part of Todo.txt for Android, an app for managing your todo.txt file (http://todotxt.com).
*
* Copyright (c) 2009-2013 Todo.txt for Android contributors (http://todotxt.com)
*
* LICENSE:
*
* Todo.txt for Android is free software: you can redistribute it and/or modify it under the terms of the ... | public RemoteClientManagerStub(TodoApplication todoApplication) { | 0 |
rpgmakervx/slardar | src/main/java/org/easyarch/slardar/cache/factory/TemplateCacheFactory.java | [
"abstract public class AbstractCacheFactory<T extends Cache> {\n\n abstract public T createCache(CacheEntity entity);\n\n\n}",
"public class TemplateCache implements Cache<String,String>{\n\n private Cache<String,String> cache;\n\n public TemplateCache(Cache<String, String> cache) {\n this.cache =... | import org.easyarch.slardar.cache.AbstractCacheFactory;
import org.easyarch.slardar.cache.TemplateCache;
import org.easyarch.slardar.cache.mode.DefaultCache;
import org.easyarch.slardar.cache.mode.FIFOCache;
import org.easyarch.slardar.cache.mode.LRUCache;
import org.easyarch.slardar.cache.mode.TimeOutCache;
import org... | package org.easyarch.slardar.cache.factory;
/**
* Description :
* Created by xingtianyu on 17-2-23
* 上午12:18
* description:
*/
public class TemplateCacheFactory extends AbstractCacheFactory<TemplateCache> {
private static TemplateCacheFactory templateCacheFactory;
private TemplateCache templateCache;
... | templateCache = new TemplateCache(new FIFOCache<>(entity.getSize())); | 3 |
Mignet/Inspiration | core/src/com/v5ent/game/hud/DialogUI.java | [
"public class Conversation {\n private String id;\n private String dialog = \"\";\n\n public Conversation(){\n }\n\n public String getId() {\n return id;\n }\n\n public void setId(String id){\n this.id = id;\n }\n\n public String getDialog(){\n return dialog;\n }\n... | import java.util.ArrayList;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.List;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import ... | package com.v5ent.game.hud;
public class DialogUI extends Window {
private static final String TAG = DialogUI.class.getSimpleName();
private Label talkText;
private List items;
private ConversationGraph graph; | private HUDScreen hudScreen; | 4 |
RamuRChenchaiah/SpringSecurity-registration-login | src/main/java/com/login/spring/SetupDataLoader.java | [
"public interface PrivilegeRepository extends JpaRepository<Privilege, Long> {\n\n Privilege findByName(String name);\n\n @Override\n void delete(Privilege privilege);\n\n}",
"public interface RoleRepository extends JpaRepository<Role, Long> {\n\n Role findByName(String name);\n\n @Override\n vo... | import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.security.crypto.password.Password... | package com.login.spring;
@Component
public class SetupDataLoader implements ApplicationListener<ContextRefreshedEvent> {
private boolean alreadySetup = false;
@Autowired
private UserRepository userRepository;
@Autowired
private RoleRepository roleRepository;
@Autowired
private Privi... | final Privilege readPrivilege = createPrivilegeIfNotFound("READ_PRIVILEGE"); | 3 |
ngageoint/geowave-osm | src/main/java/mil/nga/giat/osm/parser/OsmPbfParser.java | [
"public class OSMCommandArgs {\n\n protected OSMCommandArgs(){}\n\n protected OSMCommandArgs(String zookeepers, String instanceName, String user, String pass, String osmNamespace, String visibility, Boolean dropOSMData, String ingestDirectory, String hdfsBasePath, String nameNode){\n this.zookeepers = ... | import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import j... | package mil.nga.giat.osm.parser;
public class OsmPbfParser
{
private static Logger LOGGER = org.slf4j.LoggerFactory.getLogger(OsmPbfParser.class);
public void stageData(OSMCommandArgs args) throws IOException {
final OSMCommandArgs arg = args;
final Configuration conf = new Configuration();
conf.set("fs.d... | wayWriter.create(Way.getClassSchema(), wayOut); | 5 |
byoutline/CachedField | ottocachedfield/src/main/java/com/byoutline/ottocachedfield/OttoCachedEndpointWithArg.java | [
"public interface ProviderWithArg<RETURN_TYPE, ARG_TYPE> {\n\n RETURN_TYPE get(ARG_TYPE arg);\n}",
"public class CachedEndpointWithArgImpl<RETURN_TYPE, ARG_TYPE>\n implements CachedEndpointWithArg<RETURN_TYPE, ARG_TYPE> {\n\n private final CachedValue<RETURN_TYPE, ARG_TYPE> value;\n private final ... | import com.byoutline.cachedfield.ProviderWithArg;
import com.byoutline.cachedfield.cachedendpoint.CachedEndpointWithArgImpl;
import com.byoutline.cachedfield.cachedendpoint.StateAndValue;
import com.byoutline.eventcallback.IBus;
import com.byoutline.ibuscachedfield.events.ResponseEventWithArg;
import com.byoutline.ibus... | package com.byoutline.ottocachedfield;
/**
* {@link OttoCachedField} like API for making non GET calls.
*
* @param <RETURN_TYPE> Type of value returned by endpoint on success.
* @param <ARG_TYPE> Type of argument that needs to be passed to make a call.
* @author Sebastian Kacprzak <sebastian.kacprzak at byou... | @Nonnull ResponseEventWithArg<StateAndValue<RETURN_TYPE, ARG_TYPE>, ARG_TYPE> event, | 2 |
JosuaKrause/NBTEditor | src/nbt/gui/brush/Brush.java | [
"public interface ClickReceiver {\n\n /**\n * Is called when a click occured.\n * \n * @param x The center x position.\n * @param z The center z position.\n */\n void clicked(int x, int z);\n\n /**\n * Getter.\n * \n * @return The name of the click receiver.\n */\n String name();\n\n /**\n ... | import nbt.gui.ClickReceiver;
import nbt.gui.MapViewer;
import nbt.map.Chunk;
import nbt.map.ChunkEdit;
import nbt.map.pos.InChunkPosition;
import nbt.map.pos.ScreenPosition; | package nbt.gui.brush;
/**
* Brushes paint on the map.
*
* @author Joschi <josua.krause@googlemail.com>
*/
public abstract class Brush implements ClickReceiver {
private final MapViewer viewer;
| private final ChunkEdit edit; | 3 |
NiceSystems/hrider | src/main/java/hrider/export/FileExporter.java | [
"public class ColumnQualifier implements Serializable {\n\n //region Constants\n public final static ColumnQualifier KEY = new ColumnQualifier(\"key\", ColumnType.BinaryString.getConverter());\n //endregion\n\n //region Variables\n private static final Log logger = Log.getLogger(ColumnQual... | import hrider.data.ColumnQualifier;
import hrider.data.DataCell;
import hrider.data.DataRow;
import hrider.format.CharacterDelimitedFormatter;
import hrider.format.Formatter;
import java.io.IOException;
import java.io.OutputStream; | package hrider.export;
/**
* Copyright (C) 2012 NICE Systems ltd.
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
*... | public void write(DataRow row, Iterable<ColumnQualifier> columns) throws IOException { | 2 |
webdriverextensions/webdriverextensions | src/main/java/com/github/webdriverextensions/internal/ObjectPool.java | [
"public class WebDriverExtensionFieldDecorator extends DefaultFieldDecorator {\n\n private final WebDriver driver;\n private final ObjectPool pool;\n private final WebComponentFactory webComponentFactory;\n private final WebComponentListFactory webComponentListFactory;\n private ParameterizedType gen... | import com.github.webdriverextensions.WebDriverExtensionFieldDecorator;
import java.lang.reflect.Field;
import java.util.HashMap;
import com.github.webdriverextensions.WebPage;
import com.github.webdriverextensions.WebRepository;
import com.github.webdriverextensions.WebSite;
import static com.github.webdriverextension... | package com.github.webdriverextensions.internal;
public class ObjectPool {
private final WebDriver driver;
private final HashMap<Class<?>, WebSite> siteObjects = new HashMap<>();
private final HashMap<ClassGeneric, WebPage> pageObjects = new HashMap<>(); | private final HashMap<ClassGeneric, WebRepository> repositoryObjects = new HashMap<>(); | 2 |
RomRaider/RomRaider | src/main/java/com/romraider/io/j2534/api/J2534ConnectionISO9141.java | [
"public interface ConnectionManager {\n /**\n * Use the open method when communications to a Module requires a\n * StartCommunication sequence, such as Five Baud or Fast Init.\n * Include the StopCommunication sequence in the open so that\n * if something fails, the stop sequence is pre-loaded fo... | import com.romraider.io.j2534.api.J2534Impl.Flag;
import com.romraider.io.j2534.api.J2534Impl.Protocol;
import com.romraider.io.j2534.api.J2534Impl.TxFlags;
import com.romraider.logger.ecu.comms.manager.PollingState;
import static com.romraider.io.protocol.ssm.iso9141.SSMChecksumCalculator.calculateChecksum;
import sta... | /*
* RomRaider Open-Source Tuning, Logging and Reflashing
* Copyright (C) 2006-2022 RomRaider.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (... | api = new J2534Impl(Protocol.ISO9141, library); | 3 |
ixa-ehu/ixa-pipe-pos | src/main/java/eus/ixa/ixa/pipe/lemma/eval/LemmaEvaluate.java | [
"public class LemmaSample {\n\n private List<String> tokens;\n\n private List<String> tags;\n \n private final List<String> lemmas;\n\n /**\n * Represents one lemma sample.\n * @param tokens the token\n * @param tags the postags\n * @param lemmas the lemmas\n */\npublic LemmaSample(String[] tokens, String[] ... | import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import opennlp.tools.util.ObjectStream;
import eus.ixa.ixa.pipe.lemma.LemmaSample;
import eus.ixa.ixa.pipe.lemma.LemmaSampleStream;
import eus.ixa.ixa.pipe.lemma.LemmatizerEvaluator;
import eus.ixa.ixa.pipe.lemma.LemmatizerME;
impor... | /*
* Copyright 2014 Rodrigo Agerri
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 in ... | final LemmatizerEvaluator evaluator = new LemmatizerEvaluator(this.lemmatizer); | 2 |
KDE/kdeconnect-android | src/org/kde/kdeconnect/Plugins/MousePadPlugin/SendKeystrokesToHostActivity.java | [
"public class BackgroundService extends Service {\n private static final int FOREGROUND_NOTIFICATION_ID = 1;\n\n private static BackgroundService instance;\n\n public interface DeviceListChangedCallback {\n void onDeviceListChanged();\n }\n\n public interface PluginCallback<T extends Plugin> ... | import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.widget.Toast;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import org.kde.kdeconnect.Backgro... | /*
* SPDX-FileCopyrightText: 2021 Daniel Weigl <DanielWeigl@gmx.at>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
package org.kde.kdeconnect.Plugins.MousePadPlugin;
public class SendKeystrokesToHostActivity extends AppCompatActivity {
// text with these lengt... | ThemeUtil.setUserPreferredTheme(this); | 5 |
ToroCraft/Minecoprocessors | src/main/java/net/torocraft/minecoprocessors/processor/Processor.java | [
"@Mod(modid = Minecoprocessors.MODID, version = Minecoprocessors.VERSION, name = Minecoprocessors.MODNAME)\npublic class Minecoprocessors {\n\n public static final String MODID = \"minecoprocessors\";\n public static final String VERSION = \"1.12.2-5\";\n public static final String MODNAME = \"Minecoprocessors\"... | import java.util.ArrayList;
import java.util.List;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagByteArray;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.torocraft.minecoprocessors.Minecoprocessors;
import net.torocraft.minecoprocessors.gui.GuiMinecoprocesso... | package net.torocraft.minecoprocessors.processor;
public class Processor implements IProcessor {
private static final int MEMORY_SIZE = 64;
private static final String NBT_STACK = "stack";
private static final String NBT_REGISTERS = "registers";
private static final String NBT_PROGRAM = "program";
private ... | flags = ByteUtil.setShort(flags, ip, 3); | 2 |
otale/tale | src/main/java/com/tale/controller/admin/AuthController.java | [
"public class TaleConst {\n\n public static final String CLASSPATH = new File(AdminApiController.class.getResource(\"/\").getPath()).getPath() + File.separatorChar;\n\n public static final String REMEMBER_IN_COOKIE = \"remember_me\";\n public static final String LOGIN_ERROR_COUNT = \"login_error... | import com.blade.exception.ValidatorException;
import com.blade.kit.DateKit;
import com.blade.kit.EncryptKit;
import com.blade.kit.StringKit;
import com.blade.mvc.RouteContext;
import com.blade.mvc.annotation.Path;
import com.blade.mvc.annotation.PostRoute;
import com.blade.mvc.ui.RestResponse;
import com.tale.annotati... | package com.tale.controller.admin;
/**
* 登录,退出
* <p>
* Created by biezhi on 2017/2/21.
*/
@Slf4j
@Path(value = "admin", restful = true)
public class AuthController extends BaseController {
@SysLog("登录后台")
@PostRoute("login")
public RestResponse<?> doLogin(LoginParam loginParam, RouteContext context)... | TaleUtils.setCookie(context, user.getUid()); | 4 |
shibing624/crf-seg | src/main/java/org/xm/xmnlp/seg/Segment.java | [
"public class Xmnlp {\n /**\n * 日志组件\n */\n private static Logger logger = LogManager.getLogger();\n\n public static final class Config {\n /**\n * 默认关闭调试\n */\n public static boolean DEBUG = false;\n /**\n * 字符类型对应表\n */\n public static S... | import org.xm.xmnlp.Xmnlp;
import org.xm.xmnlp.dictionary.other.CharTable;
import org.xm.xmnlp.seg.domain.Term;
import org.xm.xmnlp.util.SentencesUtil;
import org.xm.xmnlp.util.TextUtil;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import static org.xm.xmnlp.util.Static.logger; | package org.xm.xmnlp.seg;
/**
* 分词器(分词服务)<br>
* 是所有分词器的基类(Abstract)<br>
* 分词器的分词方法是线程安全的,但配置方法则不保证
* <p/>
* Created by xuming on 2016/7/22.
*/
public abstract class Segment {
/**
* 分词器配置
*/
protected TokenizerConfig tokenizerConfig;
/**
* 构造一个分词器
*/
public Segment() {
... | List<String> sentenceList = SentencesUtil.toSentenceList(charArray); | 3 |
BottleRocketStudios/Android-GroundControl | GroundControl/groundcontrol/src/main/java/com/bottlerocketstudios/groundcontrol/convenience/ExecutionBuilder.java | [
"public interface Agent<ResultType, ProgressType> extends Runnable {\n /**\n * Provide a globally unique string to identify this agent. All identical agents will\n * be executed one at a time. If available, cached values for Agents with the same unique\n * identifier will be delivered.\n */\n ... | import com.bottlerocketstudios.groundcontrol.agent.Agent;
import com.bottlerocketstudios.groundcontrol.executor.JobPriority;
import com.bottlerocketstudios.groundcontrol.listener.AgentListener;
import com.bottlerocketstudios.groundcontrol.policy.AgentPolicy;
import com.bottlerocketstudios.groundcontrol.tether.AgentTeth... | /*
* Copyright (c) 2016. Bottle Rocket LLC
* 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 ... | AgentTether execute(); | 4 |
abego/treelayout | org.abego.treelayout.demo/src/main/java/org/abego/treelayout/demo/svg/SVGDemo.java | [
"public interface TreeForTreeLayout<TreeNode> {\n\n\t/**\n\t * Returns the the root of the tree.\n\t * <p>\n\t * Time Complexity: O(1)\n\t * \n\t * @return the root of the tree\n\t */\n\tTreeNode getRoot();\n\n\t/**\n\t * Tells if a node is a leaf in the tree.\n\t * <p>\n\t * Time Complexity: O(1)\n\t * \n\t * @par... | import org.abego.treelayout.TreeLayout;
import org.abego.treelayout.demo.SampleTreeFactory;
import org.abego.treelayout.demo.TextInBox;
import org.abego.treelayout.demo.TextInBoxNodeExtentProvider;
import org.abego.treelayout.util.DefaultConfiguration;
import org.abego.treelayout.TreeForTreeLayout; | /*
* [The "BSD license"]
* Copyright (c) 2011, abego Software GmbH, Germany (http://www.abego.org)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code ... | TextInBoxNodeExtentProvider nodeExtentProvider = new TextInBoxNodeExtentProvider(); | 4 |
gruter/utogen | src/main/java/generator/engine/db/Generator.java | [
"public class DBGeneratorDefinition\r\n{\r\n private String scenario;\r\n private String description;\r\n private String filename; \r\n private String dbDriver;\r\n private String dbURL;\r\n private String user;\r\n private String password;\r\n private List<DBTableGenerator> dbTab... | import generator.db.DBGeneratorDefinition;
import generator.engine.ProgressUpdateObserver;
import generator.extenders.IRandomiserFunctionality;
import generator.extenders.RandomiserInstance;
import generator.db.DBFieldGenerator;
import generator.db.DBTableGenerator;
import generator.misc.ApplicationContext;
impo... | /*
* Generator.java
*
* Created on 11 November 2007, 21:41
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package generator.engine.db;
/**
*
* @author Administrator
*/
public class Generator
{
private Vector<RandomiserType> vRand... | private Vector<RandomiserInstance> vRandomiserInstances;
| 1 |
ZhangJiupeng/AgentX | src/main/java/cc/agentx/wrapper/WrapperFactory.java | [
"public class FakedHttpRequestResolver extends XRequestResolver {\n private FakedHttpWrapper wrapper;\n\n public FakedHttpRequestResolver() {\n this.wrapper = new FakedHttpWrapper(true);\n }\n\n @Override\n public byte[] wrap(XRequest.Channel channel, final byte[] bytes) {\n if (channel... | import cc.agentx.protocol.request.FakedHttpRequestResolver;
import cc.agentx.protocol.request.ShadowsocksRequestResolver;
import cc.agentx.protocol.request.XRequestResolver;
import cc.agentx.security.AesCipher;
import cc.agentx.security.BlowfishCipher;
import cc.agentx.security.Cipher; | new AesCipher(password, AesCipher.AES_256_CFB)
);
case "aes-192-cfb":
return new CipherWrapper(
new AesCipher(password, AesCipher.AES_192_CFB),
new AesCiphe... | public static XRequestResolver newShadowsocksRequestWrapperInstance() { | 2 |
ArcadiaPlugins/Arcadia-Spigot | src/main/java/me/redraskal/arcadia/runnable/PreGameRunnable.java | [
"public class Arcadia extends JavaPlugin {\n\n private ArcadiaAPI api;\n public Configuration mainConfiguration;\n\n public void onEnable() {\n this.api = new ArcadiaAPI(this);\n new File(this.getDataFolder().getPath() + \"/translations/\").mkdirs();\n if(new File(this.getDataFolder().... | import me.redraskal.arcadia.Arcadia;
import me.redraskal.arcadia.ArcadiaAPI;
import me.redraskal.arcadia.Utils;
import me.redraskal.arcadia.api.game.event.GameLoadEvent;
import me.redraskal.arcadia.api.scoreboard.defaults.ScoreSidebar;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.entity.Playe... | package me.redraskal.arcadia.runnable;
public class PreGameRunnable {
public PreGameRunnable() { | final ArcadiaAPI api = Arcadia.getPlugin(Arcadia.class).getAPI(); | 1 |
digitalpetri/ethernet-ip | cip-core/src/main/java/com/digitalpetri/enip/cip/services/ForwardOpenService.java | [
"public class CipResponseException extends Exception {\n\n private final int generalStatus;\n private final int[] additionalStatus;\n\n public CipResponseException(int generalStatus, int[] additionalStatus) {\n this.generalStatus = generalStatus;\n this.additionalStatus = additionalStatus;\n ... | import com.digitalpetri.enip.cip.CipResponseException;
import com.digitalpetri.enip.cip.epath.EPath.PaddedEPath;
import com.digitalpetri.enip.cip.epath.LogicalSegment.ClassId;
import com.digitalpetri.enip.cip.epath.LogicalSegment.InstanceId;
import com.digitalpetri.enip.cip.structs.ForwardOpenRequest;
import com.digita... | package com.digitalpetri.enip.cip.services;
public class ForwardOpenService implements CipService<ForwardOpenResponse> {
public static final int SERVICE_CODE = 0x54;
private static final PaddedEPath CONNECTION_MANAGER_PATH = new PaddedEPath( | new ClassId(0x06), | 2 |
ismartx/summer | summer-demo/src/main/java/org/smartx/summer/controller/UserController.java | [
"public class CombineRequest {\n\n private String url;\n\n private String method;\n\n private String requestId;\n\n private String version;\n\n private Map<String, Object> param;\n\n private Map<String, Object> header;\n\n private String eTag;\n\n public String getETag() {\n return eT... | import org.apache.commons.io.IOUtils;
import org.smartx.summer.annotation.EnableCache;
import org.smartx.summer.bean.CombineRequest;
import org.smartx.summer.bean.Pageable;
import org.smartx.summer.bean.User;
import org.smartx.summer.bean.XUserAgent;
import org.smartx.summer.exception.BaseServiceException;
import org.s... | package org.smartx.summer.controller;
/**
* Created by binglin on 2016/10/20.
*
* @author binglin
*/
@RestController
@RequestMapping("/users")
public class UserController {
@ApiOperation(value = "测试 EnableCache ", notes = "支持缓存")
@GetMapping
@EnableCache
public User get() {
User user =... | public String xUserAgent(@RequestHeader("X-User-Agent") XUserAgent userAgent) { | 3 |
jchampemont/WTFDYUM | src/test/java/com/jeanchampemont/wtfdyum/web/UserControllerTest.java | [
"public class Event {\n\n public Event() {\n // left deliberately empty\n }\n\n public Event(final EventType type, final String additionalData) {\n this.type = type;\n this.additionalData = additionalData;\n }\n\n private EventType type;\n\n private String additionalData;\n\n ... | import com.jeanchampemont.wtfdyum.dto.Event;
import com.jeanchampemont.wtfdyum.dto.Feature;
import com.jeanchampemont.wtfdyum.dto.Principal;
import com.jeanchampemont.wtfdyum.dto.User;
import com.jeanchampemont.wtfdyum.dto.type.EventType;
import com.jeanchampemont.wtfdyum.service.*;
import com.jeanchampemont.wtfdyum.ut... | /*
* Copyright (C) 2015, 2016 WTFDYUM
*
* This file is part of the WTFDYUM project.
*
* 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
*... | final User u = new User(); | 3 |
thshdw/lixia-javardp | src/com/lixia/rdp/loader/JRdpLoader.java | [
"public class Common {\r\n\r\n public static boolean underApplet = false;\r\n\tpublic static Rdp5JPanel rdp;\r\n\tpublic static Secure secure;\r\n\tpublic static MCS mcs;\r\n\tpublic static RdesktopJFrame frame;\r\n\t\r\n /**\r\n * Quit the application\r\n */\r\n\tpublic static void exit(){\r\n\t\tRde... | import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.StringTokenizer;
import com.lixia.rdp.Common;
import com.lixia.rdp.OrderException;
import com.lixia.rdp.RdesktopException;
import com.lixia.rdp.RdesktopSwing;
import com.lixia.rdp.Utilities_Localised;
| /* JRdpLoader.java
* Component: ProperJavaRDP
*
* Revision: $Revision: 1.1.1.1 $
* Author: $Author: suvarov $
* Date: $Date: 2007/03/08 00:26:42 $
*
* Copyright (c) 2005 Propero Limited
*
* Purpose: Launch ProperJavaRDP with settings from a config file
*/
package com.lixia.rdp.loader;
//impor... | catch (OrderException e) { e.printStackTrace(); System.exit(-1); }
| 1 |
Jdoing/myweb | myweb/src/main/java/com/myweb/service/imp/RoleServiceImp.java | [
"public interface OperationDao extends JpaRepository<Operation, Long> {\n\n}",
"public interface PermissionDao extends JpaRepository<Permission, Long> {\n\n}",
"public interface ResourceDao extends JpaRepository<Resource, Long> {\n List<Resource> findByIdentity(String identity);\n}",
"public interface Role... | import java.util.List;
import java.util.Set;
import javax.inject.Inject;
import org.springframework.stereotype.Service;
import com.myweb.dao.OperationDao;
import com.myweb.dao.PermissionDao;
import com.myweb.dao.ResourceDao;
import com.myweb.dao.RoleDao;
import com.myweb.entity.Operation;
import com.myweb.entity.Permis... | package com.myweb.service.imp;
@Service
public class RoleServiceImp implements RoleService {
@Inject
private RoleDao roleDao;
@Inject
private ResourceDao resourceDao;
@Inject
private OperationDao operationDao;
@Inject
private PermissionDao permissionDao;
@Override
public... | Role r = roleDao.findOne(roleId); | 7 |
scauwe/Generic-File-Driver-for-IDM | shim/src/main/java/info/vancauwenberge/filedriver/filereader/csv/CSVFileReader.java | [
"public abstract class AbstractStrategy implements IStrategy{\n\n\tpublic interface IStrategyParameters{\n\t\tpublic String getParameterName();\n\t\tpublic String getDefaultValue();\n\t\tpublic DataType getDataType();\n\t\tpublic Constraint[] getConstraints();\n\t}\n\t\n\tpublic static String getStringValueFor(ISt... | import info.vancauwenberge.filedriver.api.AbstractStrategy;
import info.vancauwenberge.filedriver.api.IFileReadStrategy;
import info.vancauwenberge.filedriver.exception.ReadException;
import info.vancauwenberge.filedriver.filepublisher.IPublisher;
import info.vancauwenberge.filedriver.filereader.RecordQueue;
import inf... | /*******************************************************************************
* Copyright (c) 2007, 2018 Stefaan Van Cauwenberge
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0 (the "License"). If a copy of the MPL was not distributed with this
* file, You can obtain on... | public void init(final Trace trace, final Map<String, Parameter> driverParams, final IPublisher publisher) | 3 |
portablejim/VeinMiner | src/main/java/portablejim/veinminer/configuration/client/ConfigGuiScreen.java | [
"@Mod(modid = ModInfo.MODID, acceptedMinecraftVersions = \"[1.9,1.11)\",\n canBeDeactivated = true, guiFactory = \"portablejim.veinminer.configuration.client.ConfigGuiFactory\")\npublic class VeinMiner {\n\n @Mod.Instance(ModInfo.MODID)\n public static VeinMiner instance;\n\n @SidedProxy(clientSide ... | import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import net.minecraft.client.Minecraft;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import ... | /* This file is part of VeinMiner.
*
* VeinMiner is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* Vein... | settings.setPreferredMode((settings.getPreferredMode() + 1) % PreferredMode.length()); | 6 |
alda-lang/alda-client-java | src/alda/repl/commands/ReplDownUp.java | [
"public class AldaScore {\n @SerializedName(\"chord-mode\")\n public Boolean chordMode;\n @SerializedName(\"current-instruments\")\n public Set<String> currentInstruments;\n\n public Map<String, Set<String>> nicknames;\n\n /**\n * Returns the current instruments if possible\n * @return null if not possibl... | import alda.AldaResponse.AldaScore;
import alda.AldaServer;
import alda.error.AlreadyUpException;
import alda.error.InvalidOptionsException;
import alda.error.NoResponseException;
import alda.error.SystemException;
import alda.repl.AldaRepl;
import java.util.function.Consumer;
import jline.console.ConsoleReader; | package alda.repl.commands;
public class ReplDownUp implements ReplCommand {
@Override
public void act(String args, StringBuffer history, AldaServer server,
ConsoleReader reader, Consumer<AldaScore> newInstrument)
throws NoResponseException {
server.setQuiet(false);
try {
serve... | } catch (InvalidOptionsException | AlreadyUpException | SystemException e) { | 2 |
gjhutchison/pixelhorrorjam2016 | core/src/com/kowaisugoi/game/interactables/scenic/Container.java | [
"public enum SoundId {\n DOOR_CREAK, DOOR_LOCKED, SNOW_CRUNCH, FLOOR_STEP, CLICK, UNCLE_GASP,\n ENGINE_START, SCARE\n}",
"public interface Interactable {\n // TODO: In a perfect world, the interaction box should probably be private.\n public Rectangle getInteractionBox();\n\n public void draw(Sprit... | import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Rectangle;
import com.kowaisugoi.game.audio.SoundId;
import com.kowaisugoi.game.interactables.Interactable;
import com.kowaisugoi.game.inter... | package com.kowaisugoi.game.interactables.scenic;
public class Container implements Interactable {
private Rectangle _interactionBox;
private Sprite[] _sprites;
private int _state;
private boolean _unlocked = true;
private boolean _itemInteractable = false;
private PickupableItem _item;
... | public void registerListener(InteractionListener listener) { | 2 |
jGleitz/JUnit-KIT | src/final2/subtests/PraktomatPublicTest.java | [
"public class Input {\n\tprivate static HashMap<String, String[]> filesMap = new HashMap<>();\n\tprivate static HashMap<String[], String> reverseFileMap = new HashMap<>();\n\n\t/**\n\t * This class is not meant to be instantiated.\n\t */\n\tprivate Input() {\n\t}\n\n\t/**\n\t * Returns a path to a file containing t... | import static org.hamcrest.CoreMatchers.is;
import org.junit.Test;
import test.Input;
import test.SystemExitStatus;
import test.runs.LineRun;
import test.runs.NoOutputRun;
import test.runs.Run;
| package final2.subtests;
/**
* Simulates the Praktomat's public test.
*
* @author Martin Löper
*/
public class PraktomatPublicTest extends LangtonSubtest {
public PraktomatPublicTest() {
setAllowedSystemExitStatus(SystemExitStatus.WITH_0);
}
/**
* "Fundamental tests with ordinary ant" A... | new NoOutputRun("create e,0,0"),
| 3 |
concentricsky/android-viewer-for-khan-academy | src/com/concentricsky/android/khanacademy/app/HomeActivity.java | [
"public class KADataService extends Service {\n \n\tpublic final String LOG_TAG = getClass().getSimpleName();\n\t\n\tpublic static final int RESULT_SUCCESS = 0;\n\tpublic static final int RESULT_ERROR = 1;\n\tpublic static final int RESULT_CANCELLED = 2;\n\t\n\tprivate KADataBinder mBinder = new KADataBinder(thi... | import static com.concentricsky.android.khanacademy.Constants.ACTION_BADGE_EARNED;
import static com.concentricsky.android.khanacademy.Constants.ACTION_LIBRARY_UPDATE;
import static com.concentricsky.android.khanacademy.Constants.ACTION_TOAST;
import static com.concentricsky.android.khanacademy.Constants.EXTRA_BADGE;
i... | /*
Viewer for Khan Academy
Copyright (C) 2012 Concentric Sky, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later... | requestDataService(new ObjectCallback<KADataService>() { | 4 |
KasperFranz/BetterChunkLoader | src/main/java/guru/franz/mc/bcl/datastore/DatabaseDataStore.java | [
"@Plugin(id = BetterChunkLoaderPluginInfo.ID,\n name = BetterChunkLoaderPluginInfo.NAME,\n description = BetterChunkLoaderPluginInfo.DESCRIPTION,\n version = BetterChunkLoaderPluginInfo.VERSION,\n authors = BetterChunkLoaderPluginInfo.AUTHORS\n)\npublic class BetterChunkLoader {\n\n p... | import guru.franz.mc.bcl.BetterChunkLoader;
import guru.franz.mc.bcl.config.Config;
import guru.franz.mc.bcl.datastore.database.DatabaseInterface;
import guru.franz.mc.bcl.datastore.exceptions.MySQLConnectionException;
import guru.franz.mc.bcl.exception.Exception;
import guru.franz.mc.bcl.exception.NegativeValueExcepti... | package guru.franz.mc.bcl.datastore;
public abstract class DatabaseDataStore extends AHashMapDataStore {
protected DatabaseInterface database;
public void load() throws MySQLConnectionException {
String serverName = Config.getInstance().getServerName();
try {
database.setupTable... | public void setAlwaysOnChunksLimit(UUID playerId, int amount) throws NegativeValueException { | 5 |
BoD/bikey | wear/src/main/java/org/jraf/android/bikey/wearable/app/display/DisplayActivity.java | [
"public class CommConstants {\n /*\n * Ride.\n */\n\n public static final String PATH_RIDE = \"/ride\";\n\n /**\n * Indicates whether a ride is currently ongoing ({@code boolean}).\n */\n public static final String PATH_RIDE_ONGOING = PATH_RIDE + \"/ongoing\";\n\n /**\n * Measurem... | import android.databinding.DataBindingUtil;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import com.google.android.gms.wearable.DataApi;
import ... | /*
* This source is part of the
* _____ ___ ____
* __ / / _ \/ _ | / __/___ _______ _
* / // / , _/ __ |/ _/_/ _ \/ __/ _ `/
* \___/_/|_/_/ |_/_/ (_)___/_/ \_, /
* /___/
* repository.
*
* Copyright (C) 2014 Benoit 'BoD' Lubek (BoD@JRAF.org)
*
* This program is free s... | private TotalDistanceDisplayFragment mTotalDistanceDisplayFragment; | 6 |
yangyong915/app | MyApplication/app/src/main/java/com/example/administrator/myapplication/p/NewsPresenter.java | [
"public class Base<T> {\n private boolean result;\n private Object message;\n private T data;\n private String nonce_str;\n private double time_spend;\n\n public boolean isResult() {\n return result;\n }\n\n public void setResult(boolean result) {\n this.result = result;\n }... | import android.util.Log;
import com.example.administrator.myapplication.model.Base;
import com.example.administrator.myapplication.model.NewsList;
import com.example.administrator.myapplication.utils.AesUtil;
import com.example.administrator.myapplication.utils.Constant;
import com.example.administrator.myapplication.u... | package com.example.administrator.myapplication.p;
/**
* Created by yy on 2016/12/22.
*/
public class NewsPresenter extends BasePresenter<INewsView> {
private static final String TAG = "NewsPresenter";
private INewsView mINewsView;
private CompositeSubscription compositeSubscription;
public N... | Base<List<NewsList>> data = gson.fromJson(s, | 0 |
tomaswolf/gerrit-gitblit-plugin | src/main/java/com/googlesource/gerrit/plugins/gitblit/GitBlitServletModule.java | [
"@Singleton\npublic class RawServlet extends HttpServlet {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate transient Logger logger = LoggerFactory.getLogger(RawServlet.class);\n\n\tprivate final IRuntimeManager runtimeManager;\n\n\tprivate final IRepositoryManager repositoryManager;\n\n\t@Inject\... | import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.gitblit.AvatarGenerator;
import com.gitblit.GravatarGenerator;
import com.gitblit.IStoredSettings;
import com.gitblit.guice.IPublicKeyManagerProvider;
import com.gitblit.guice.WorkQueueProvider;
import com.gitblit.manager.FederationManager;
import com.... | // Copyright (C) 2012 The Android Open Source Project
//
// 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 ... | serve('/' + WrappedRawFilter.SERVLET_RELATIVE_PATH + '*').with(RawServlet.class); | 0 |
cmu-db/peloton-test | src/main/java/edu/cmu/cs/db/peloton/test/generate/defn/Select.java | [
"public final class DatabaseDefinition {\n private final Map<String, Map<String, ColumnInfo>> tables;\n\n public static final class ColumnInfo {\n private final JDBCType type;\n\n ColumnInfo(JDBCType type) {\n this.type = type;\n }\n\n public JDBCType getType() {\n ... | import com.google.common.collect.ImmutableList;
import com.google.common.collect.Sets;
import edu.cmu.cs.db.peloton.test.common.DatabaseDefinition;
import edu.cmu.cs.db.peloton.test.generate.ast.Ast;
import edu.cmu.cs.db.peloton.test.generate.ast.Context;
import edu.cmu.cs.db.peloton.test.generate.ast.ListElem;
import ... | package edu.cmu.cs.db.peloton.test.generate.defn;
/**
* Created by tianyuli on 4/1/17.
*/
public class Select extends ProductElem {
public static void main(String[] args) {
DatabaseDefinition db = new DatabaseDefinition.Builder()
.table("foo")
.column("id", JDBCType.INT... | new SearchCondition(Sets.union(EnumSet.allOf(SqlBinaryOperator.class), | 5 |
jhsx/GoJetPlugin | src/io/github/jhsx/jet/JetParserDefinition.java | [
"public class JetFileElementType extends IStubFileElementType<JetFileStub> {\n public static IFileElementType INSTANCE = new JetFileElementType();\n\n public JetFileElementType() {\n super(JetLanguage.INSTANCE);\n }\n}",
"public class JetLexer extends MergingLexerAdapter {\n public JetLexer() {... | import io.github.jhsx.jet.lang.parser.JetParser;
import io.github.jhsx.jet.lang.psi.JetFile;
import org.jetbrains.annotations.NotNull;
import static io.github.jhsx.jet.lang.JetTypes.Factory;
import com.intellij.lang.ASTNode;
import com.intellij.lang.ParserDefinition;
import com.intellij.lang.PsiParser;
import com.intel... | /*
*
* * Copyright 2016 José Santos
* *
* * 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 ap... | return new JetLexer(); | 1 |
Tanaguru/Contrast-Finder | contrast-finder-webapp/src/main/java/org/opens/color/finder/webapp/controller/IndexController.java | [
"public class ColorModel {\n\n private static final String DEFAULT_FOREGROUND = \"#468847\";\n private static final String DEFAULT_BACKGROUND = \"#DFF0D8\";\n private static final String DEFAULT_RATIO = \"4.5\";\n private String foreground = DEFAULT_FOREGROUND;\n private boolean highratio = false;\n ... | import java.awt.Color;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import org.apache.log4j.Logger;
import org.opens.color.finder.webapp.model.ColorModel;
import org.opens.color.finder.webapp.validator.ColorModelValidator;
import org.opens.colorfinder.ColorFinder;
import org.opens.colorf... | /*
* Contrast Finder
* Copyright (C) 2008-2013 Open-S Company
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later ve... | ColorConverter.hex2Rgb(colorModel.getForeground()); | 5 |
paritytrading/philadelphia | examples/acceptor/src/main/java/com/paritytrading/philadelphia/acceptor/Session.java | [
"public class FIX42Enumerations {\n\n /**\n * Values for AdvSide(4).\n */\n public static class AdvSideValues {\n\n public static final char Buy = 'B';\n public static final char Sell = 'S';\n public static final char Trade = 'T';\n public static final char Cross = 'X';\... | import static com.paritytrading.philadelphia.fix42.FIX42Enumerations.*;
import static com.paritytrading.philadelphia.fix42.FIX42MsgTypes.*;
import static com.paritytrading.philadelphia.fix42.FIX42Tags.*;
import com.paritytrading.philadelphia.FIXConfig;
import com.paritytrading.philadelphia.FIXConnection;
import com.par... | /*
* Copyright 2015 Philadelphia 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | private final FIXConnection connection; | 4 |
googlesamples/glass-enterprise-samples | WebRTCSample/app/src/org/appspot/apprtcstandalone/BaseCallActivity.java | [
"public enum AudioDevice { SPEAKER_PHONE, WIRED_HEADSET, EARPIECE, BLUETOOTH, NONE }",
"public interface AudioManagerEvents {\n // Callback fired once audio device is changed or list of available audio devices changed.\n void onAudioDeviceChanged(\n AudioDevice selectedAudioDevice, Set<AudioDevice> availab... | import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.media.projection.MediaProjection;
import android.media.project... | package org.appspot.apprtcstandalone;
public abstract class BaseCallActivity extends Activity implements AppRTCClient.SignalingEvents,
PeerConnectionClient.PeerConnectionEvents,
GlassCallFragment.OnCallEvents {
private static final String TAG = "CallRTCClient";
public static final String EXTR... | private RoomConnectionParameters roomConnectionParameters; | 2 |
graywolf336/CasinoSlots | src/main/java/com/craftyn/casinoslots/actions/impl/PotionAction.java | [
"public class CasinoSlots extends JavaPlugin {\r\n private Economy economy = null;\r\n private PluginManager pm = null;\r\n private Towny towny = null;\r\n private WorldGuardPlugin worldGuard = null;\r\n private Update update;\r\n private int updateCheckTask;\r\n\r\n public boolean useTowny = f... | import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import com.craftyn.casinoslots.CasinoSlots;
import com.craftyn.casinoslots.actions.Action;
import com.craftyn.casinoslots.classes.Reward;
import com.craftyn.casinoslots.classes.SlotType;
import com.craftyn... | package com.craftyn.casinoslots.actions.impl;
/**
* The potion action.
*
* Usage:
* <ul>
* <li>potion effect
* <li>
* <li>potion effect amplifier</li>
* <li>potion effect amplifier duration</li>
* <li>potion effect:amplifier</li>
* <li>potion effect:amplifier:duration</li>
* </ul>
*
* @author graywolf33... | public PotionAction(CasinoSlots plugin, String... args) throws ActionLoadingException { | 0 |
RestNEXT/restnext | restnext-security/src/main/java/org/restnext/security/Security.java | [
"public static boolean isPathParamUri(final String uri) {\n return uri != null && PATH_PARAM_URI.matcher(uri).matches();\n}",
"public static String normalize(String uri) {\n return Optional.ofNullable(uri)\n .map(UriUtils::addFirstSlash)\n .map(UriUtils::removeLastSlash)\n .orElse(uri);\n}",
"p... | import org.slf4j.LoggerFactory;
import static org.restnext.util.UriUtils.isPathParamUri;
import static org.restnext.util.UriUtils.normalize;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.TreeMap;
import java.util.function.Function;
import org.restnext.core.http.Request;
imp... | /*
* Copyright (C) 2016 Thiago Gutenberg Carvalho da Costa
*
* 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 ... | public static boolean checkAuthorization(final Request request) { | 2 |
beerbong/com_beerbong_zipinst | src/com/beerbong/zipinst/cloud/DriveStorage.java | [
"public interface Core extends Serializable {\n\n public static final String PLUGIN_UI = \"UIPlugin\";\n public static final String PLUGIN_SUPERUSER = \"SuperUserPlugin\";\n public static final String PLUGIN_RECOVERY = \"RecoveryPlugin\";\n public static final String PLUGIN_STORAGE = \"StoragePlugin\";\... | import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import android.accounts.AccountManager;
import android.app.Activity;
import android.content.Intent;
import com.beerbong.zipinst.R;
import com.beerbong.zip... | /*
* Copyright 2014 ZipInstaller Project
*
* This file is part of ZipInstaller.
*
* ZipInstaller is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) a... | RecoveryPlugin rPlugin = (RecoveryPlugin) core.getPlugin(Core.PLUGIN_RECOVERY); | 2 |
jayqqaa12/jbase | jbase-cache/src/main/java/com/jayqqaa12/jbase/cache/notify/rocketmq/RocketMqNotify.java | [
"@Data\npublic class CacheConfig {\n\n /**\n * 缓存提供者 可选\n * <p>\n * com.jayqqaa12.jbase.cache.provider.NullCacheProvider com.jayqqaa12.jbase.cache.provider.caffeine.CaffeineCacheProvider\n * com.jayqqaa12.jbase.cache.provider.lettuce.LettuceCacheProvider\n * <p>\n * 根据加入顺序确定缓存级别 可自定义CacheProvider 进行扩展\... | import com.jayqqaa12.jbase.cache.core.CacheConfig;
import com.jayqqaa12.jbase.cache.core.JbaseCache;
import com.jayqqaa12.jbase.cache.notify.Command;
import com.jayqqaa12.jbase.cache.notify.Notify;
import com.jayqqaa12.jbase.cache.serializer.CacheSerializer;
import com.jayqqaa12.jbase.cache.util.CacheException;
import ... | // Copyright 2020 Leyantech Ltd. All Rights Reserved.
package com.jayqqaa12.jbase.cache.notify.rocketmq;
/**
* @author 12, {@literal <shuai.wang@leyantech.com>}
* @date 2020-10-29.
*/
@Slf4j
public class RocketMqNotify implements Notify, MessageListenerConcurrently {
private JbaseCache cache;
private String... | private CacheSerializer cacheSerializer; | 4 |
elminsterjimmy/PSN-API | RESTfulShell/src/main/java/com/elminster/psn/restful/controller/PSNApiController.java | [
"public interface IUserGameService {\n\n public List<PSNUserGame> getUserGameList(String username) throws ServiceException;\n}",
"public interface IUserGameTrophyService {\n\n List<PSNUserTrophy> getUserGameTrophyList(String username, String gameId) throws ServiceException;\n}",
"public class PSNUserGame exte... | import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod... | package com.elminster.psn.restful.controller;
/**
* The PSN api RESTful controller.
*
* @author jgu
* @version 1.0
*/
@Controller
public class PSNApiController {
/** the PSN API. */
private static final IPSNApi API = new PSNApiImpl();
private final IUserGameTrophyService userGameTrophyService;
priv... | public @ResponseBody List<PSNUserGame> getUserGameList( | 2 |
tvportal/android | app/src/main/java/com/mitechlt/tvportal/play/fragments/RecentFragment.java | [
"public class RobotoCheckBox extends CheckBox {\n\n /**\n * Simple constructor to use when creating a widget from code.\n *\n * @param context The Context the widget is running in, through which it can\n * access the current theme, resources, etc.\n */\n public RobotoCheckBo... | import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.support.v4.app.LoaderManager;
import android.supp... | @Override
public void onDestroyActionMode(android.view.ActionMode actionMode) {
}
});
} else {
//Todo: Just use the context menus
}
mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Over... | RobotoCheckBox checkBox = (RobotoCheckBox) view.findViewById(R.id.checkBox1); | 0 |
eroshenkoam/htmlelements | src/main/java/io/qameta/htmlelements/annotation/FindBy.java | [
"public class Context {\n\n public static final String DESCRIPTION_KEY = \"description\";\n\n public static final String LISTENERS_KEY = \"listeners\";\n\n public static final String PROPERTIES_KEY = \"properties\";\n\n public static final String PARAMETERS_KEY = \"parameters\";\n\n public static fin... | import io.qameta.htmlelements.context.Context;
import io.qameta.htmlelements.extension.ContextEnricher;
import io.qameta.htmlelements.extension.HandleWith;
import io.qameta.htmlelements.extension.MethodHandler;
import io.qameta.htmlelements.handler.WebBlockMethodHandler;
import io.qameta.htmlelements.proxy.Proxies;
imp... | package io.qameta.htmlelements.annotation;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@HandleWith(FindBy.Extension.class)
public @interface FindBy {
String value();
@SuppressWarnings("unchecked") | class Extension implements MethodHandler<Object> { | 2 |
cscotta/deschutes | src/main/java/com/cscotta/deschutes/example/app/App.java | [
"public interface OutputListener<Input> {\n\n public void update(List<Long> remove,\n Map<Long, Map<String, ConcurrentRollup<Input>>> insert);\n\n}",
"public class WebsocketApi extends WebSocketServlet {\n public final Set<OLAPWebSocket> users = Collections.synchronizedSet(new HashSet<... | import java.io.File;
import java.io.FileInputStream;
import java.io.BufferedInputStream;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.yammer.dropwizard.Service;
import com.yammer.dropwizard.config.Boots... | package com.cscotta.deschutes.example.app;
/**
* Main application entry point.
*/
public class App extends Service<Config> {
public static final MetricRegistry metrics = new MetricRegistry();
private static final Logger log = LoggerFactory.getLogger(App.class);
private static final ScheduledThreadPoo... | OutputListener<RequestEvent> output = new WebsocketRollupListener(websocketApi.users); | 0 |
xuyunqiang/MeiziAPP | app/src/main/java/com/yunq/gankio/ui/activity/MainActivity.java | [
"public class GankApp extends Application {\n\n private RefWatcher refWatcher;\n\n ApplicationComponent mApplicationComponent;\n\n @Override\n public void onCreate() {\n super.onCreate();\n refWatcher = LeakCanary.install(this);\n\n if (BuildConfig.DEBUG) {\n //警告在主线程中执行耗... | import android.os.Bundle;
import android.support.annotation.CheckResult;
import android.support.design.widget.Snackbar;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.MenuItem;
import android.view.View;
import com.yunq.gankio.GankApp;
impo... | package com.yunq.gankio.ui.activity;
public class MainActivity extends BaseSwipeRefreshActivity implements IMainView<Girl>, MainListAdapter.IClickItem {
private static final String TAG = MainActivity.class.getSimpleName();
@Bind(R.id.rcv_index_content)
RecyclerView mRcvIndexContent;
private Ma... | .activityModule(new ActivityModule(this)) | 2 |
ryanramage/couch-audio-recorder | src/main/java/com/googlecode/eckoit/audio/ui/SimpleTrayRecorder.java | [
"public class SplitAudioRecorderConfiguration {\n\n\n private boolean stream = false;\n\n private float wavSampleRate = 16000.0F;\n private int wavSampleSize = 16;\n\n private long mp3Bitrate = 24000L;\n private long mp3Frequency = 16000L;\n\n private long oggBitrate = 24000L;\n private long og... | import com.github.couchapptakeout.events.ExitApplicationMessage;
import com.googlecode.eckoit.audio.SplitAudioRecorderConfiguration;
import com.googlecode.eckoit.audio.SplitAudioRecorderManager;
import com.googlecode.eckoit.audio.couch.CouchDBRecording;
import com.googlecode.eckoit.events.RecorderJustStartedWithARecord... | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.googlecode.eckoit.audio.ui;
/**
*
* @author ryan
*/
public class SimpleTrayRecorder {
private TrayIcon trayIcon;
private CouchDbConnector connector;
private File workingDir;
SplitAudio... | SplitAudioRecorderConfiguration config = new SplitAudioRecorderConfiguration(); | 0 |
martinschaef/jar2bpl | src/main/java/org/joogie/Dispatcher.java | [
"public class SootRunner extends Runner {\r\n\r\n\t/**\r\n\t * stderr print stream\r\n\t */\r\n\tprivate PrintStream stderr;\r\n\r\n\t/**\r\n\t * stdout print stream\r\n\t */\r\n\tprivate PrintStream stdout;\r\n\r\n\t/**\r\n\t * Runs Soot by using a JAR file\r\n\t * \r\n\t * @param jarFile\r\n\t * JAR fi... | import java.io.File;
import org.joogie.runners.SootRunner;
import org.joogie.soot.SootPrelude;
import org.joogie.util.Log;
import org.joogie.util.MhpInfo;
import org.joogie.util.StopWatch;
import boogie.ProgramFactory;
| /*
* jimple2boogie - Translates Jimple (or Java) Programs to Boogie
* Copyright (C) 2013 Martin Schaeaeaef and Stephan Arlt
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either ... | MhpInfo.resetInstance();
| 3 |
imadcn/idworker | src/main/java/com/imadcn/framework/idworker/register/AbstractWorkerRegister.java | [
"public class NodeInfo implements Serializable {\n\n private static final long serialVersionUID = 1L;\n\n private String nodeId;\n private String groupName;\n private Integer workerId;\n private String ip;\n private String hostName;\n private Date updateTime;\n private Date createTime;\n ... | import java.io.File;
import java.io.IOException;
import java.net.UnknownHostException;
import java.nio.charset.StandardCharsets;
import java.util.Date;
import java.util.UUID;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.imadcn.framework.idworker.register.zo... | package com.imadcn.framework.idworker.register;
/**
* Worker注册
*
* @author imadcn
* @since 1.6.0
*/
public abstract class AbstractWorkerRegister implements WorkerRegister {
protected Logger logger = LoggerFactory.getLogger(getClass());
/**
* 最大机器数
*/
public static final long MAX_WORKER... | private CoordinatorRegistryCenter regCenter; | 2 |
flyhero/flyapi | src/main/java/cn/iflyapi/blog/service/CarouselService.java | [
"public interface CarouselMapper {\n long countByExample(CarouselExample example);\n\n int deleteByExample(CarouselExample example);\n\n int deleteByPrimaryKey(Long id);\n\n int insert(Carousel record);\n\n int insertSelective(Carousel record);\n\n List<Carousel> selectByExample(CarouselExample ex... | import cn.iflyapi.blog.dao.CarouselMapper;
import cn.iflyapi.blog.entity.Carousel;
import cn.iflyapi.blog.entity.CarouselExample;
import cn.iflyapi.blog.util.FastValidator;
import cn.iflyapi.blog.util.SnowflakeIdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype... | package cn.iflyapi.blog.service;
/**
* @author flyhero
* @date 2018-12-31 11:14 AM
*/
@Service
public class CarouselService {
@Autowired
private CarouselMapper carouselMapper;
@Autowired
private SnowflakeIdWorker idWorker;
public List<Carousel> listCarousel() { | CarouselExample carouselExample = new CarouselExample(); | 2 |
grum/Ashley | benchmarks/src/main/java/com/badlogic/ashley/benchmark/ashley/systems/MovementSystem.java | [
"public class MovementComponent extends Component {\n public final Vector2 velocity = new Vector2();\n public final Vector2 accel = new Vector2();\n}",
"public final class ComponentMapper<T extends Component> {\n private final ComponentType componentType;\n\n /**\n * @param componentClass Componen... | import com.badlogic.ashley.benchmark.ashley.components.MovementComponent;
import com.badlogic.ashley.benchmark.ashley.components.PositionComponent;
import com.badlogic.ashley.core.ComponentMapper;
import com.badlogic.ashley.core.Entity;
import com.badlogic.ashley.core.Family;
import com.badlogic.ashley.systems.Iteratin... | /*******************************************************************************
* Copyright 2014 See AUTHORS file.
*
* 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.apa... | private ComponentMapper<PositionComponent> pm = ComponentMapper.getFor(PositionComponent.class); | 1 |
CBSkarmory/AWGW | src/main/java/cbskarmory/units/air/JSF.java | [
"public class Player {\n\n public static int numberOfPlayers;\n public final CO CO;\n public final int id;\n private ArrayList<Unit> unitsControlled;\n private int money;\n private ArrayList<Property> propertiesOwned;\n private int commTowers;\n private Color teamColor;\n\n /**\n * Co... | import cbskarmory.Player;
import cbskarmory.terrain.Terrain;
import cbskarmory.units.Stealth;
import cbskarmory.units.Unit;
import cbskarmory.weapons.WeaponType; | /*
* Copyright(c) 2017 CBSkarmory (https://github.com/CBSkarmory)
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful,
* but WI... | public boolean couldTarget(Unit toCheck, Terrain hypothetical) { | 1 |
JessYanCoding/MVPArt | demo/src/main/java/me/jessyan/mvpart/demo/mvp/model/UserRepository.java | [
"public interface IModel {\n\n /**\n * 在框架中 {@link BasePresenter#onDestroy()} 时会默认调用 {@link IModel#onDestroy()}\n */\n void onDestroy();\n}",
"public interface IRepositoryManager {\n\n /**\n * 根据传入的 Class 创建对应的仓库\n *\n * @param repository 仓库 class\n * @param <T> 仓库 类型\n ... | import java.util.List;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.Function;
import io.rx_cache2.DynamicKey;
import io.rx_cache2.EvictDynamicKey;
import me.jessyan.art.mvp.IModel;
import me.jessyan.art.mvp.IRepositoryManage... | /*
* Copyright 2017 JessYan
*
* 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 in ... | .createRetrofitService(UserService.class) | 3 |
neva-dev/felix-search-webconsole-plugin | src/main/java/com/neva/felix/webconsole/plugins/search/rest/BundleClassesServlet.java | [
"public class SearchPaths {\n\n\tpublic static final String APP_NAME = \"search\";\n\n\tprivate static final String APP_ROOT_PROP = \"felix.webconsole.manager.root\";\n\n\tprivate static final String APP_ROOT_DEFAULT = \"/system/console\";\n\n\tprivate final BundleContext context;\n\n\tpublic SearchPaths(BundleCont... | import com.neva.felix.webconsole.plugins.search.core.SearchPaths;
import com.neva.felix.webconsole.plugins.search.core.OsgiExplorer;
import com.neva.felix.webconsole.plugins.search.core.BundleScanner;
import com.neva.felix.webconsole.plugins.search.utils.JsonUtils;
import com.google.common.collect.ImmutableMap;
import ... | package com.neva.felix.webconsole.plugins.search.rest;
public class BundleClassesServlet extends RestServlet {
public static final String ALIAS_NAME = "bundle-classes";
public static final String BUNDLE_ID = "bundleId";
private final OsgiExplorer osgiExplorer;
public BundleClassesServlet(BundleContext bundl... | JsonUtils.writeMessage(response, MessageType.ERROR, String.format("Bundle '%s' not be found.", bundleId)); | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.