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 |
|---|---|---|---|---|---|---|
goerlitz/rdffederator | src/de/uni_koblenz/west/splendid/optimizer/AbstractFederationOptimizer.java | [
"public abstract class AbstractCostEstimator extends QueryModelVisitorBase<RuntimeException> implements ModelEvaluator {\n\t\n\tprotected double cost;\n\t\n\tprotected AbstractCardinalityEstimator cardEst;\n\t\n\tpublic AbstractCardinalityEstimator getCardinalityEstimator() {\n\t\treturn cardEst;\n\t}\n\n\tpublic v... | import org.slf4j.LoggerFactory;
import de.uni_koblenz.west.splendid.estimation.AbstractCostEstimator;
import de.uni_koblenz.west.splendid.estimation.ModelEvaluator;
import de.uni_koblenz.west.splendid.helpers.AnnotatingTreePrinter;
import de.uni_koblenz.west.splendid.helpers.FilterConditionCollector;
import de.uni_kobl... | /*
* This file is part of RDF Federator.
* Copyright 2011 Olaf Goerlitz
*
* RDF Federator 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) a... | protected AbstractCostEstimator costEstimator; | 0 |
Semx11/Autotip | src/main/java/me/semx11/autotip/api/RequestHandler.java | [
"@Mod(modid = Autotip.MOD_ID, name = Autotip.NAME, version = Autotip.VERSION, acceptedMinecraftVersions = Autotip.ACCEPTED_VERSIONS, clientSideOnly = true)\npublic class Autotip {\n\n public static final Logger LOGGER = LogManager.getLogger(\"Autotip\");\n\n static final String MOD_ID = \"autotip\";\n stat... | import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParseException;
import me.semx11.autotip.Autotip;
import me.semx11.autotip.api.reply.Reply;
import me.semx11.autotip.api.request.Request;
import me.semx11.autotip.gson.adapter.impl.LocaleAdapter;
import me.semx11.autotip.gson.ad... | package me.semx11.autotip.api;
public class RequestHandler {
private static final Gson GSON = new GsonBuilder()
.registerTypeAdapter(Locale.class, new LocaleAdapter())
.registerTypeAdapter(Pattern.class, new PatternAdapter())
.registerTypeAdapter(SessionKey.class, new Session... | public static Optional<Reply> getReply(Request request, URI uri) { | 2 |
ferstl/depgraph-maven-plugin | src/main/java/com/github/ferstl/depgraph/ReactorGraphMojo.java | [
"public final class DependencyNode {\n\n private final Artifact artifact;\n private final String effectiveVersion;\n private final NodeResolution resolution;\n private final Set<String> scopes;\n private final Set<String> classifiers;\n private final Set<String> types;\n\n\n public DependencyNode(Artifact ar... | import java.util.Set;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import com.github.ferstl... | package com.github.ferstl.depgraph;
/**
* Creates a dependency graph of the Maven rector in a multi-module project.
*
* @since 4.0.0
*/
@Mojo(
name = "reactor",
aggregator = true,
defaultPhase = LifecyclePhase.NONE,
requiresDependencyCollection = ResolutionScope.NONE,
threadSafe = true)
public... | GraphBuilder<DependencyNode> graphBuilder = createGraphBuilder(graphStyleConfigurer, nodeIdRenderer); | 0 |
meltzow/tonegodgui | src/tonegod/gui/core/SubScreen.java | [
"public abstract class ComboBox extends TextField {\r\n\tprotected ButtonAdapter btnArrowDown;\r\n\tprivate Menu DDList = null;\r\n\tfloat btnHeight;\r\n\tString ddUID;\r\n\tprivate int selectedIndex = -1;\r\n\tprivate Object selectedValue;\r\n\tprivate String selectedCaption;\r\n\t\r\n\tprivate int hlIndex;\r\n\tp... | import tonegod.gui.style.Style;
import com.jme3.app.Application;
import com.jme3.collision.CollisionResult;
import com.jme3.collision.CollisionResults;
import com.jme3.export.JmeExporter;
import com.jme3.export.JmeImporter;
import com.jme3.font.BitmapFont;
import com.jme3.input.KeyInput;
import com.jme3.input.e... | package tonegod.gui.core;
/**
*
* @author t0neg0d
*/
public class SubScreen implements ElementManager, Control {
private String UID;
private Screen screen;
private Application app;
private SubScreenBridge bridge;
private Geometry geom;
protected Spatial spatial;
private Map<String, Element>... | private Map<Integer,Borders> eventElementResizeDirections = new HashMap();
| 2 |
wavesoftware/java-eid-exceptions | src/main/java/pl/wavesoftware/eid/impl/ConfigurationImpl.java | [
"public interface Configuration {\n /**\n * Gets a Eid formatter\n *\n * @return a formatter of Eid\n */\n Formatter getFormatter();\n\n /**\n * Gets a Eid unique ID generator\n *\n * @return unique ID generator\n */\n UniqueIdGenerator getIdGenerator();\n\n /**\n ... | import pl.wavesoftware.eid.api.Configuration;
import pl.wavesoftware.eid.api.ConfigurationBuilder;
import pl.wavesoftware.eid.api.Formatter;
import pl.wavesoftware.eid.api.UniqueIdGenerator;
import pl.wavesoftware.eid.api.Validator;
import javax.annotation.Nullable;
import java.util.Locale;
import java.util.TimeZone;
i... | /*
* Copyright (c) 2018 Wave Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | private Validator validator; | 4 |
bingoogolapple/Android-Training | MyMoment/src/com/bingoogol/mymoment/ui/WriteActivity.java | [
"public class Moment {\n\tprivate int id;\n\tprivate String content;\n\tprivate String imgPath;\n\tprivate String publishTime;\n\n\tpublic Moment() {\n\t}\n\t\n\tpublic Moment(int id, String content, String imgPath, String publishTime) {\n\t\tthis.id = id;\n\t\tthis.content = content;\n\t\tthis.imgPath = imgPath;\n... | import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.app.Dialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android... | package com.bingoogol.mymoment.ui;
public class WriteActivity extends GenericActivity {
private Button backBtn = null;
private ImageView addImgIv = null;
private Button publishBtn = null;
private EditText contentEt = null;
private String imgRealPath = "";
private MomentService momentService = null;
private ... | Moment moment = momentService.getMoment(id); | 0 |
JoeSteven/BiBi | app/src/main/java/com/joe/bibi/receiver/MyPushReceiver.java | [
"public class CommentDetailActivity extends AppCompatActivity {\n\n private Comment mComment;\n private BBUser mComUser;\n private TextView mLiked;\n private boolean isLiked;//判断该评论是否被当前用户赞了\n private boolean isClickLiked;//判断用户当前是否有点赞动作\n @Override\n protected void onCreate(Bundle savedInstanc... | import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.os.PowerManager;
import android.text.SpannableString;
... | package com.joe.bibi.receiver;
/**
* Created by Joe on 2016/2/27.
*/
public class MyPushReceiver extends BroadcastReceiver {
private Context context; | private BBApplication application; | 2 |
JoshuaKissoon/DOSNA | src/dosna/DOSNA.java | [
"public interface DataManager\n{\n\n /**\n * Put data onto the network.\n * This will put the data onto the network based on the routing protocol.\n * It may or may not store data locally.\n *\n * @param content The content to be stored on the network\n *\n * @return How many nodes wa... | import dosna.dhtAbstraction.DataManager;
import dosna.dhtAbstraction.DosnaDataManager;
import dosna.gui.AnanciUI;
import dosna.gui.LoginFrame;
import dosna.gui.SignupFrame;
import dosna.osn.actor.Actor;
import dosna.osn.actor.ActorManager;
import java.awt.event.ActionEvent;
import java.io.IOException;
import j... | package dosna;
/**
* The main DOSNA launch file
*
* @author Joshua Kissoon
* @since 20140326
*/
public class DOSNA
{
private DataManager dataManager = null;
private PeriodicNotificationsChecker notificationsChecker;
public DOSNA()
{
}
/**
* Launch the main no... | final Actor u = new Actor(actorId);
| 3 |
AEminium/AeminiumRuntime | src/aeminium/runtime/futures/codegen/ForHelper.java | [
"public interface Body {\n\t/**\n\t * This method contains the code of the body, that is executed by the task. \n\t * \n\t * @param current Reference to the associated task object.\n\t */\n public void execute(final Runtime rt, final Task current) throws Exception;\n}",
"public final class Hints {\n\tprivate H... | import java.util.ArrayList;
import java.util.function.BiFunction;
import java.util.function.Function;
import aeminium.runtime.Body;
import aeminium.runtime.Hints;
import aeminium.runtime.Runtime;
import aeminium.runtime.Task;
import aeminium.runtime.futures.Future;
import aeminium.runtime.futures.FutureWrapper;
import ... |
public static void forContinuousLong(long start, long end, Function<Long, Void> fun, short hint, int units) {
if (!compilerRange) {
forContinuousLong(start, end, fun, hint);
return;
}
final int nTasks = Math.min(units, 2*java.lang.Runtime.getRuntime().availableProcessors());
Task[] tasks = new Task[nTa... | (short) (Hints.RECURSION | Hints.LOOPS)); | 1 |
jonghough/ArtisteX | app/src/main/java/jgh/artistex/engine/DrawingEngine.java | [
"public class DataUtils {\n\n /**\n * Base 64 encodes the given bitmap. The compression format is given by\n * <code>format</code>.\n *\n * @param image the bitmap.\n * @param format compression format\n * @return String representation of base64 encoding of bitmap\n */\n public st... | import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.Log;
import android.view.MotionEvent;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IO... | package jgh.artistex.engine;
/**
* Drawing engine. Singleton object containing the draw and motion event calls to
* all the <code>ILayer</code> objects. Calls to manipulate / edit layers go through
* <code>DrawingEngine</code>
*/
public class DrawingEngine {
/**
* the instance of the Drawing Engine
... | StrokeThicknessVisitor stv = new StrokeThicknessVisitor(thickness); | 6 |
jordw/heftydb | src/main/java/com/jordanwilliams/heftydb/read/TableReader.java | [
"public class Key implements Comparable<Key> {\n\n private final ByteBuffer data;\n private final long snapshotId;\n\n public Key(ByteBuffer data, long snapshotId) {\n this.data = data;\n this.snapshotId = snapshotId;\n }\n\n public ByteBuffer data() {\n return data;\n }\n\n ... | import com.codahale.metrics.Histogram;
import com.jordanwilliams.heftydb.data.Key;
import com.jordanwilliams.heftydb.data.Tuple;
import com.jordanwilliams.heftydb.metrics.CacheHitGauge;
import com.jordanwilliams.heftydb.metrics.Metrics;
import com.jordanwilliams.heftydb.state.Tables;
import com.jordanwilliams.heftydb.t... | /*
* Copyright (c) 2014. Jordan Williams
*
* 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 ag... | public CloseableIterator<Tuple> refresh(Key key, long snapshotId) { | 0 |
eckig/graph-editor | demo/src/main/java/de/tesis/dynaware/grapheditor/demo/customskins/titled/TitledNodeSkin.java | [
"public class Commands\n{\n\n private static final Logger LOGGER = LoggerFactory.getLogger(Commands.class);\n\n private static final EReference NODES = GraphPackage.Literals.GMODEL__NODES;\n private static final EReference CONNECTIONS = GraphPackage.Literals.GMODEL__CONNECTIONS;\n\n private static final... | import java.util.ArrayList;
import java.util.List;
import de.tesis.dynaware.grapheditor.Commands;
import de.tesis.dynaware.grapheditor.GConnectorSkin;
import de.tesis.dynaware.grapheditor.GNodeSkin;
import de.tesis.dynaware.grapheditor.GraphEditor;
import de.tesis.dynaware.grapheditor.demo.utils.AwesomeIcon;
import de.... | /*
* Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH
*/
package de.tesis.dynaware.grapheditor.demo.customskins.titled;
/**
* A grey node with a navy title-bar for the 'titled-skins' theme.
*/
public class TitledNodeSkin extends GNodeSkin {
private static final String TITLE_TEXT = "Node "; //$NON-NLS-1$
... | private final List<GConnectorSkin> inputConnectorSkins = new ArrayList<>(); | 1 |
Uphie/ONE-Unofficial | app/src/main/java/studio/uphie/one/abs/AbsBaseActivity.java | [
"public class HttpClient {\n private static Context context;\n private static AsyncHttpClient asyncHttpClient = new AsyncHttpClient();\n\n public static void init(Context ctx) {\n context = ctx;\n //最大重连2次\n asyncHttpClient.setMaxConnections(2);\n }\n\n public static void postByF... | import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MotionEvent;
i... | package studio.uphie.one.abs;
/**
* Created by Uphie on 2015/9/5.
* Email: uphie7@gmail.com
*/
public abstract class AbsBaseActivity extends Activity implements IInit, IHttp, OnNetConnChangeListener {
private InputMethodManager softManager;
private NetworkStateChangeReceiver mNetworkStateChangeReceiver... | boolean isAvailable = NetworkUtil.getInstance() | 6 |
xushaomin/apple-config | apple-config-starter/apple-config-starter-apollo/src/main/java/com/appleframework/config/PropertyConfigurerFactory.java | [
"public class PropertyConfigurer extends AbstractPropertyConfigurer {\r\n\r\n\tprivate static Logger logger = LoggerFactory.getLogger(PropertyConfigurer.class);\r\n\r\n\tprivate static String configInfo;\r\n\r\n\tpublic static Properties getProps() {\r\n\t\treturn getProps(DEFAULT_KEY);\r\n\t}\r\n\r\n\tpublic stati... | import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.ServiceLoader;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.ctrip.framework.apollo.Config;
import com.ctrip.f... | package com.appleframework.config;
public class PropertyConfigurerFactory extends BaseConfigurerFactory implements ConfigurerFactory {
private static Logger logger = LoggerFactory.getLogger(PropertyConfigurerFactory.class);
private static String KEY_DEPLOY_META_URL = "apollo.meta";
private static Strin... | ServiceLoader<NamespaceLoadSpi> serviceLoader = ServiceLoader.load(NamespaceLoadSpi.class); | 3 |
AstroGypsophila/TryGank | TryGank/app/src/main/java/com/gypsophila/trygank/business/gank/model/GankBusinessImpl.java | [
"public abstract class BaseActivity extends AppCompatActivity {\n\n protected RequestManager requestManager = null;\n private Context mContext;\n\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n mContext = this;\n requestManager = new RequestManager();\n super.... | import com.gypsophila.commonlib.activity.BaseActivity;
import com.gypsophila.commonlib.net.RequestCallback;
import com.gypsophila.commonlib.net.RequestParameter;
import com.gypsophila.trygank.business.gank.GankJsonUtils;
import com.gypsophila.trygank.db.GankDataBaseManager;
import com.gypsophila.trygank.business.Remote... | package com.gypsophila.trygank.business.gank.model;
/**
* Description :
* Author : AstroGypsophila
* GitHub : https://github.com/AstroGypsophila
* Date : 2016/10/4
*/
public class GankBusinessImpl implements IGankBusiness {
@Override
public void loadBeans(BaseActivity activity,
... | GankPlusBean gankPlusBean = GankJsonUtils.readJsonGankPlusBean(content); | 7 |
a750183047/MobileSafe | app/src/main/java/com/yan/mobilesafe/activity/AppManagerActivity.java | [
"public class AppInfo {\n private Drawable icon; //图片\n private String apkName; //app名字\n private long apkSize; //app大小\n private boolean isRom; //安装位置\n\n public boolean isRom() {\n return isRom;\n }\n\n public void setIsRom(boolean isRom) {\n this.isRom = isRom;\n }\n\n /*... | import android.annotation.TargetApi;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import androi... | package com.yan.mobilesafe.activity;
public class AppManagerActivity extends AppCompatActivity implements View.OnClickListener {
@ViewInject(R.id.view_rec)
private RecyclerView recyclerView;
@ViewInject(R.id.tv_rom)
private TextView tvRom;
@ViewInject(R.id.tv_sd)
private TextView tvSD;
... | private AppManagerHeadersAdapter appManagerHeadersAdapter; | 2 |
enguerrand/xdat | src/main/java/org/xdat/actionListeners/clusterDialog/ClusterDialogActionListener.java | [
"public class Main extends JFrame {\n\tpublic static final long serialVersionUID = 10L;\n\tprivate MainMenuBar mainMenuBar;\n\tprivate Session currentSession;\n\tprivate List<ChartFrame> chartFrames = new LinkedList<>();\n\tprivate final BuildProperties buildProperties;\n\tprivate final ClusterFactory clusterFactor... | import org.xdat.Main;
import org.xdat.data.Cluster;
import org.xdat.data.DataSheet;
import org.xdat.gui.dialogs.ClusterDialog;
import org.xdat.gui.tables.ClusterTableModel;
import java.awt.event.ActionEvent;
import java.util.List; | /*
* Copyright 2014, Enguerrand de Rochefort
*
* This file is part of xdat.
*
* xdat 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 v... | private final ClusterDialog dialog; | 3 |
inovex/zax | src/main/java/com/inovex/zabbixmobile/activities/ChecksActivity.java | [
"public class ChecksApplicationsFragment extends BaseServiceConnectedFragment\n\t\timplements OnItemsLoadedListener {\n\n\tpublic static final String TAG = ChecksApplicationsFragment.class\n\t\t\t.getSimpleName();\n\n\tprivate Host mHost;\n\tprivate boolean mApplicationsProgressBarVisible = true;\n\tprivate boolean... | import com.inovex.zabbixmobile.activities.fragments.ChecksItemsFragment;
import com.inovex.zabbixmobile.listeners.OnApplicationsLoadedListener;
import com.inovex.zabbixmobile.listeners.OnChecksItemSelectedListener;
import com.inovex.zabbixmobile.listeners.OnHostsLoadedListener;
import com.inovex.zabbixmobile.model.Host... | /*
This file is part of ZAX.
ZAX 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.
ZAX is distributed in the hope that it will be useful... | public void onItemSelected(int position, Item item, boolean showItemDetails) { | 5 |
abstractj/kalium | src/main/java/org/abstractj/kalium/crypto/Box.java | [
"public class NaCl {\n\n public static Sodium sodium() {\n Sodium sodium = SingletonHolder.SODIUM_INSTANCE;\n checkVersion(sodium);\n return sodium;\n }\n\n private static final String LIBRARY_NAME = libraryName();\n\n private static String libraryName() {\n switch (Platform.... | import static org.abstractj.kalium.crypto.Util.removeZeros;
import org.abstractj.kalium.NaCl;
import org.abstractj.kalium.encoders.Encoder;
import org.abstractj.kalium.keys.PrivateKey;
import org.abstractj.kalium.keys.PublicKey;
import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_BOXZER... | /**
* Copyright 2013 Bruno Oliveira, and individual 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
*
* Unless required by... | return removeZeros(CRYPTO_BOX_CURVE25519XSALSA20POLY1305_BOXZEROBYTES, ct); | 8 |
12315jack/j1st-mqtt | j1st-mqtt-authenticator-dummy/src/main/java/com/github/j1stiot/mqtt/authenticator/charger/ChargerAuthenticator.java | [
"@SuppressWarnings(\"unused\")\npublic interface Authenticator {\n\n /**\n * Init the authenticator\n *\n * @param config Authenticator Configuration\n */\n void init(AbstractConfiguration config);\n\n /**\n * Destroy the authenticator\n */\n void destroy();\n\n /**\n * Au... | import com.github.j1stiot.mqtt.api.auth.Authenticator;
import com.github.j1stiot.mqtt.api.auth.AuthorizeResult;
import io.j1st.power.storage.mongo.MongoStorage;
import io.j1st.power.storage.mongo.entity.ProductStatus;
import io.j1st.power.storage.mongo.entity.ServiceType;
import io.j1stiot.mqtt.authenticator.power.Powe... | package com.github.j1stiot.mqtt.authenticator.charger;
/**
* validate charger gateway
* @author jackyoung
*/
public class ChargerAuthenticator implements Authenticator {
protected MongoStorage mongoStorage;
Logger logger = LoggerFactory.getLogger(PowerAuthenticator.class);
private boolean allowDollar... | public AuthorizeResult authConnect(String clientId, String userName, String password) { | 1 |
dcodecasa/CTBNCToolkit | CTBNCToolkit/performances/ZJTESTClusteringExternalPerformances.java | [
"public class CTBNClassifier extends DiscreteModel<Double,CTDiscreteNode> implements ICTClassifier<Double, CTDiscreteNode> {\n\t\n\tprivate int nGeneratedTrajectories = 0;\n\tprivate String ext = \".csv\";\n\n\t/**\n\t * Base constructor\n\t * \n\t * @param nodeIndexing global node indexing\n\t * @param modelName ... | import static org.junit.Assert.*;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.Vector;
import org.junit.Test;
import CTBNCToolkit.CTBNClassifier;
import CTBNCToolkit.CTTrajectory;
import CTBNCToolkit.ClassificationResul... | /**
* Copyright (c) 2012-2013, Daniele Codecasa <codecasa.job@gmail.com>,
* Models and Algorithms for Data & Text Mining (MAD) laboratory of
* Milano-Bicocca University, and all the CTBNCToolkit contributors
* that will follow.
* All rights reserved.
*
* @author Daniele Codecasa and all the CTBNCToolkit contribu... | CTBNClassifier model1 = new CTBNClassifier(NodeIndexing.getNodeIndexing("generateClusteringResults"), "model1"); | 0 |
horrorho/LiquidDonkey | src/main/java/com/github/horrorho/liquiddonkey/cloud/data/Cores.java | [
"@Immutable\n@ThreadSafe\npublic final class DataClient {\n\n public static DataClient create() {\n return instance;\n }\n\n private static final Logger logger = LoggerFactory.getLogger(DataClient.class);\n\n private static final DataClient instance\n = new DataClient(ResponseHandlerFa... | import org.apache.http.client.HttpClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.dd.plist.NSDictionary;
import com.github.horrorho.liquiddonkey.cloud.client.DataClient;
import static com.github.horrorho.liquiddonkey.cloud.data.PropertyLists.get;
import static com.github.horrorho.liquiddonke... | /*
* The MIT License
*
* Copyright 2015 Ahseya.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, ... | byte[] data = propertyListClient.get(client, auth.dsPrsID(), auth.mmeAuthToken(), SETUP_URL); | 1 |
dmfs/xmlobjects | src/org/dmfs/xmlobjects/builder/ListObjectBuilder.java | [
"public final class ElementDescriptor<T>\n{\n\tpublic final static XmlContext DEFAULT_CONTEXT = new XmlContext()\n\t{\n\t};\n\n\t/**\n\t * The {@link QualifiedName} of this element.\n\t */\n\tpublic final QualifiedName qualifiedName;\n\n\t/**\n\t * An {@link IObjectBuilder} for elements of this type.\n\t */\n\tpubl... | import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.dmfs.xmlobjects.ElementDescriptor;
import org.dmfs.xmlobjects.QualifiedName;
import org.dmfs.xmlobjects.XmlContext;
import org.dmfs.xmlobjects.pull.ParserContext;
import org.dmfs.xmlobjects.pull.XmlObjectPull... | /*
* Copyright (C) 2014 Marten Gajda <marten@dmfs.org>
*
* 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 appli... | if (mListElementDescriptor == null && element instanceof QualifiedName) | 1 |
messaginghub/pooled-jms | pooled-jms/src/test/java/org/messaginghub/pooled/jms/JmsPoolConnectionTest.java | [
"public class MockJMSConnection implements Connection, TopicConnection, QueueConnection, AutoCloseable {\n\n private static final Logger LOG = LoggerFactory.getLogger(MockJMSConnection.class);\n\n private final MockJMSConnectionStats stats = new MockJMSConnectionStats();\n private final Map<String, MockJMS... | import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNotSame;
import static org.junit.jupiter.api.Assertions.assertSame;
import static or... | connection.close();
cf.stop();
}
LOG.debug("Test finished.");
}
/**
* Tests the behavior of the sessionPool of the PooledConnectionFactory when
* maximum number of sessions are reached.
*
* @throws Exception
*/
@Test
public void testCrea... | public void onDeleteTemporaryQueue(MockJMSTemporaryQueue queue) throws JMSException { | 3 |
carryxyh/Electrons | electrons/src/main/java/com/ziyuan/chain/ListenerChainBuilderNew.java | [
"public final class ElectronsHolder {\n\n /**\n * 电子\n */\n private Electron electron;\n\n /**\n * 要执行的监听器,这里已经排好序了\n */\n private List<ElectronsListener> listeners;\n\n public Electron getElectron() {\n return electron;\n }\n\n public void setElectron(Electron electron) ... | import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.dsl.Disruptor;
import com.ziyuan.ElectronsHolder;
import com.ziyuan.ElectronsListener;
import com.ziyuan.Listener;
import com.ziyuan.channel.AbstractChannel;
import com.ziyuan.channel.SpecChannel;
import com.ziyuan.exceptions.SpecChannelBreakException;
i... | package com.ziyuan.chain;
/**
* ListenerChainBuilderNew 构建监听器链的工具类,旧版的废弃了,存在bug,思路不对
*
* @author ziyuan
* @since 2017-03-20
*/
public final class ListenerChainBuilderNew {
/**
* logger
*/
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractChannel.class);
/**
* 不允许初... | public final static void buildChain(SpecChannel specChannel, List<ElectronsListener> electronsListeners) { | 1 |
ni3po42/traction.mvc | Demo/src/main/java/ni3po42/android/tractiondemo/views/SwipeEntryView.java | [
"public class UIProperty<T>\nimplements IUIElement<T>\n{\t\t\t\t\n\tprotected String path;\n protected T tempValue;\n\n\tprivate IUIElement.IUIUpdateListener<T> updateListener;\t\t\n\t\n\tprivate boolean _isUpdating;\n\t\n\tprotected String pathAttribute = null;\n\tprotected final IViewBinding parentViewBinding;... | import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import traction.mvc.implementations.ui.UIProperty;
import traction.mvc.implementations.ui.viewbinding.ViewBindingHelper;
import traction.mvc.i... | /* Copyright 2013 Tim Stratton
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 writing... | public IViewBinding getProxyViewBinding() { | 4 |
neoremind/navi-pbrpc | src/test/java/com/baidu/beidou/navi/pbrpc/client/PooledPbrpcClientMainTest.java | [
"public static final class DemoBatchRequest extends\n com.google.protobuf.GeneratedMessage\n implements DemoBatchRequestOrBuilder {\n // Use DemoBatchRequest.newBuilder() to construct.\n private DemoBatchRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknow... | import java.util.Random;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.bai... | package com.baidu.beidou.navi.pbrpc.client;
public class PooledPbrpcClientMainTest {
private static final Logger LOG = LoggerFactory.getLogger(PooledPbrpcClientMainTest.class);
public static void main(String[] args) throws Exception {
PooledPbrpcClientMainTest test = new PooledPbrpcClientMainTest(... | PbrpcMsg msg; | 4 |
pnoker/mybatisGenerator | src/main/java/org/mybatis/generator/codegen/ibatis2/dao/DAOGenerator.java | [
"public interface CommentGenerator {\n\n /**\n * Adds properties for this instance from any properties configured in the\n * CommentGenerator configuration.\n * \n * <p>This method will be called before any of the other methods.\n * \n * @param properties\n * All properties... | import static org.mybatis.generator.internal.util.StringUtility.stringHasValue;
import static org.mybatis.generator.internal.util.messages.Messages.getString;
import java.util.ArrayList;
import java.util.List;
import org.mybatis.generator.api.CommentGenerator;
import org.mybatis.generator.api.FullyQualifiedTable;
impor... | /**
* Copyright 2006-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unle... | public List<CompilationUnit> getCompilationUnits() { | 2 |
rockihack/Stud.IP-FileSync | src/de/uni/hannover/studip/sync/views/OverviewController.java | [
"public class Main extends Application {\n\n\t/**\n\t * App name (titlebar).\n\t */\n\tpublic static final String APP_NAME = \"Stud.IP FileSync\";\n\n\t/**\n\t * Views.\n\t */\n\tpublic static final String OVERVIEW = \"Overview\";\n\tpublic static final String NEW_DOCUMENTS = \"NewDocuments\";\n\tpublic static fina... | import java.io.IOException;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import de.uni.ha... | package de.uni.hannover.studip.sync.views;
/**
*
* @author Lennart Glauer
*
*/
public class OverviewController extends AbstractController {
private static final Logger LOG = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
private static final Config CONFIG = Config.getInstance();
private static final OAuth OA... | SimpleAlert.error("Kein Ziel Ordner gewählt."); | 4 |
DHager/jhllib | src/test/java/com/technofovea/hllib/AttributeReadingTest.java | [
"public class Attribute extends Structure implements Structure.ByReference {\n\n public static class AttributeUnion extends Union {\n /*\n public boolean Boolean = false;\n public int Integer = 0; \n public int UnsignedInteger = 0;\n public float Float = 0;\n publ... | import com.technofovea.hllib.datatypes.Attribute;
import com.technofovea.hllib.enums.PackageAttribute;
import com.technofovea.hllib.enums.PackageType;
import com.technofovea.hllib.masks.FileMode;
import com.technofovea.hllib.methods.ManagedLibrary;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
im... | package com.technofovea.hllib;
/**
*
* @author Darien Hager
*/
public class AttributeReadingTest {
private static final String TEST_GCF_FILE = "root\\readme.txt";
private static final String TEST_BSP = "utest.bsp";
static ManagedLibrary fixture;
@BeforeClass
public static void BeforeCl... | PackageType pt = lib.getPackageType(target); | 2 |
AwaisKing/Linked-Words | app/src/main/java/awais/backworddictionary/helpers/TextProcessHelper.java | [
"public static TextToSpeech tts;",
"public static final String LW_BUBBLES_CHANNEL_ID = \"LinkedWordsBubbles\";",
"public static final String LW_BUBBLES_CHANNEL_NAME = \"Linked Words Bubbles\";",
"public static final String LW_BUBBLES_CONVO_ID = \"LinkedWordsFloatingDict\";",
"public static NotificationManag... | import static awais.backworddictionary.Main.tts;
import static awais.backworddictionary.helpers.BubbleHelper.LW_BUBBLES_CHANNEL_ID;
import static awais.backworddictionary.helpers.BubbleHelper.LW_BUBBLES_CHANNEL_NAME;
import static awais.backworddictionary.helpers.BubbleHelper.LW_BUBBLES_CONVO_ID;
import static awais.ba... |
//// this is if the app is started with MAIN action, that means it just starts normally
if (Intent.ACTION_MAIN.equals(action)) {
Context context = super.getBaseContext();
if (context == null) context = this.context;
if (context == null) context = ... | awaisomeDialog = new AwaisomeDialogBuilder(styledContext) | 7 |
mjuhasz/BDSup2Sub | src/main/java/bdsup2sub/gui/conversion/ConversionDialogModel.java | [
"public final class Configuration {\n\n public static final Color OK_BACKGROUND = UIManager.getColor(\"TextField.background\");\n public static final Color WARN_BACKGROUND = new Color(0xffffffc0);\n public static final Color ERROR_BACKGROUND = new Color(0xffe1acac);\n\n public static final boolean CONVE... | import bdsup2sub.core.Configuration;
import bdsup2sub.core.Core;
import bdsup2sub.core.ForcedFlagState;
import bdsup2sub.core.Resolution;
import bdsup2sub.utils.SubtitleUtils; | /*
* Copyright 2014 Miklos Juhasz (mjuhasz)
*
* 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... | private ForcedFlagState forcedState; | 2 |
Lambda-3/DiscourseSimplification | src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/ReferenceFinalAdverbialExtractor.java | [
"public enum Relation {\n\n UNKNOWN,\n\n // Coordinations\n UNKNOWN_COORDINATION, // the default for coordination\n CONTRAST,\n CAUSE_C,\n RESULT_C,\n LIST,\n DISJUNCTION,\n TEMPORAL_AFTER_C,\n TEMPORAL_BEFORE_C,\n\n // Subordinations\n UNKNOWN_SUBORDINATION, // the default for s... | import org.lambda3.text.simplification.discourse.utils.parseTree.ParseTreeExtractionUtils;
import org.lambda3.text.simplification.discourse.utils.words.WordsUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import edu.stanford.nlp.ling.Word;
import edu.stanfor... | /*
* ==========================License-Start=============================
* DiscourseSimplification : ReferenceExtractor3
*
* Copyright © 2017 Lambda³
*
* GNU General Public License 3
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as... | public Optional<Extraction> extract(Leaf leaf) throws ParseTreeException { | 1 |
Nantes1900/Nantes-1900 | src/test/fr/nantes1900/AllTests.java | [
"public class MeshDecimationTest extends TestCase {\r\n\r\n @Test\r\n public final static void testDecimation() {\r\n ParserSTL parser = new ParserSTL(\"files/tests/testDecim.stl\");\r\n\r\n try {\r\n MeshDecimation mesh = new MeshDecimation(parser.read());\r\n\r\n // 1. Co... | import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import test.fr.nantes1900.decimation.MeshDecimationTest;
import test.fr.nantes1900.models.EdgeTest;
import test.fr.nantes1900.models.MeshTest;
import test.fr.nantes1900.models.PointTest;
import test.fr.n... | package test.fr.nantes1900;
/**
* Class to test every class tests of the project.
* @author Daniel Lefevre
*/
@RunWith(Suite.class)
@SuiteClasses(value = {EdgeTest.class, PointTest.class, TriangleTest.class,
| PolygonTest.class, MeshTest.class, MatrixMethodTest.class,
| 2 |
dazraf/vertx-futures | src/main/java/io/dazraf/vertx/futures/filters/SuccessFilter.java | [
"@FunctionalInterface\npublic interface Consumer2<T1, T2> extends ConsumerN {\n void accept(T1 t1, T2 t2);\n}",
"@FunctionalInterface\npublic interface Consumer3<T1, T2, T3> extends ConsumerN {\n void accept(T1 t1, T2 t2, T3 t3);\n}",
"@FunctionalInterface\npublic interface Consumer4<T1, T2, T3, T4> extends C... | import java.util.function.Consumer;
import io.dazraf.vertx.consumer.Consumer2;
import io.dazraf.vertx.consumer.Consumer3;
import io.dazraf.vertx.consumer.Consumer4;
import io.dazraf.vertx.consumer.Consumer5;
import io.dazraf.vertx.tuple.Tuple2;
import io.dazraf.vertx.tuple.Tuple3;
import io.dazraf.vertx.tuple.Tuple4;
i... | package io.dazraf.vertx.futures.filters;
/**
* Filters the state of a Future for successful completion, calling a handler function
*/
public interface SuccessFilter<T> extends Handler<AsyncResult<T>> {
static <T> SuccessFilter<T> success(Consumer<T> consumer) {
return result -> {
if (result.succeeded()... | static <T1, T2, T3, T4, T5> Handler<AsyncResult<Tuple5<T1, T2, T3, T4, T5>>> success(Consumer5<T1, T2, T3, T4, T5> consumer) { | 7 |
ebolwidt/cassowary-java | src/main/java/org/klomp/cassowary/layout/LayoutConstraint.java | [
"public class CL {\n protected final static boolean fDebugOn = false;\n public static boolean fTraceOn = false; // true;\n protected final static boolean fTraceAdded = false;\n protected final static boolean fGC = false;\n\n protected static void debugprint(String s) {\n System.err.println(s);... | import java.awt.Component;
import org.klomp.cassowary.CL;
import org.klomp.cassowary.ClLinearExpression;
import org.klomp.cassowary.ClSimplexSolver;
import org.klomp.cassowary.ClVariable;
import org.klomp.cassowary.clconstraint.ClConstraint;
import org.klomp.cassowary.clconstraint.ClLinearEquation;
import org.klomp.cas... | package org.klomp.cassowary.layout;
public class LayoutConstraint {
private Component left;
private Attribute leftAttribute;
private Relation relation;
private double rightFactor;
private Component right;
private Attribute rightAttribute;
private double rightConstant;
private ClVari... | private ClLinearExpression rightExpression() { | 1 |
azeckoski/reflectutils | src/main/java/org/azeckoski/reflectutils/transcoders/JSONTranscoder.java | [
"public class ArrayUtils {\n\n /**\n * Resize an array and return the new one,\n * this will truncate an array or expand it depending on the size given\n * \n * @param <T>\n * @param array any array\n * @param newSize the new size for the array\n * @return the resized array\n */\n... | import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Li... | * Convert an object into a well-formed, element-normal XML string.
* @param object any object
* @return the JSON string version of the object
*/
public static String makeJSON(Object object) {
return makeJSON(object, null, false, true, false, 10, null);
}
/**
* Convert an ob... | map = ReflectUtils.getInstance().getObjectValues(object, FieldsFilter.SERIALIZABLE, includeClassField); | 3 |
manuelsc/Raven-Messenger | Raven App/src/main/java/at/flack/SMSMainActivity.java | [
"public class KeyEntity implements Serializable{\n\n\tprivate static final long serialVersionUID = 1L;\n\t\n\tprivate byte [] key;\n\tprivate byte [] key2;\n\tprivate byte version;\n\tprivate long timestamp;\n\t\n\t// Format: HASH_ENCRYPTION_ENCRYPTION_VERSION\n\tpublic static final byte BLAKE_AES_NONE_1 \t\t= \t0x... | import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import safe.KeyEntity;
import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bund... | /*
Copyright 2015 Philipp Adam, Manuel Caspari, Nicolas Lukaschek
contact@ravenapp.org
This file is part of Raven.
Raven 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
... | ContactAdapter arrayAdapter = new ContactAdapter(activity, MainActivity.getListItems(), 0); | 6 |
spring-cloud/spring-cloud-zookeeper | spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperConfigServerBootstrapper.java | [
"public abstract class CuratorFactory {\n\n\tprivate static final Log log = LogFactory.getLog(ZookeeperAutoConfiguration.class);\n\n\tpublic static CuratorFramework curatorFramework(ZookeeperProperties properties, RetryPolicy retryPolicy,\n\t\t\tSupplier<Stream<CuratorFrameworkCustomizer>> optionalCuratorFrameworkC... | import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.x.discovery.ServiceDiscovery;
import org.apache.curator.x.discovery.ServiceDiscoveryBuilder;
import org.apache.curator.x.discovery.details.InstanceSerializer;
import org.apache.curator.x.discovery.details.JsonInstanceSerializer;
import org.... | /*
* Copyright 2015-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | CuratorFactory.registerCurator(registry, null, true, bootstrapContext -> isEnabled(bootstrapContext.get(Binder.class))); | 0 |
tticoin/JointER | src/jp/tti_coin/main/java/inference/State.java | [
"public class Parameters {\n\tstatic class CustomConstructor extends Constructor {\n\t\t@Override\n\t\tprotected List<Object> createDefaultList(int initSize) {\n\t\t\treturn new Vector<Object>();\n\t\t}\n\t\t\n\t\t@Override\n\t\tprotected Map<Object, Object> createDefaultMap() {\n\t\t\treturn new TreeMap<Object, Ob... | import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import java.util.Vector;
import java.util.concurrent.Callable;
import config.Parameters;
import data.Instance;
import data.Label;
import data.LabelUnit;
import m... | package inference;
public class State implements Comparable<State> {
protected Parameters params;
protected Instance instance;
protected Label label;
protected double score;
protected int index;
protected double margin;
protected boolean correct;
protected boolean test;
protected SparseFeatureVector diffFv;... | SCWModel scwModel = (SCWModel)model; | 4 |
neo4j-contrib/neo4j-jdbc | neo4j-jdbc-bolt/src/test/java/org/neo4j/jdbc/bolt/BoltNeo4jDriverTest.java | [
"public abstract class Neo4jDriver implements java.sql.Driver {\n\n\t/**\n\t * JDBC prefix for the connection url.\n\t */\n\tprotected static final String JDBC_PREFIX = \"jdbc:neo4j:\";\n\n\t/**\n\t * Driver prefix for the connection url.\n\t */\n\tprivate final String driverPrefix;\n\n\t/**\n\t * Constructor for e... | import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.neo4j.driver.AuthTokens;
import org.neo4j.driver.Config;
import org.neo4j.driver.internal.async.pool.PoolSettings;
import org.neo4j.jdbc.Neo4jDriver;
import org.neo4j.jdbc.bolt.utils.JdbcConn... | /*
* Copyright (c) 2016 LARUS Business Automation [http://www.larus-ba.it]
* <p>
* This file is part of the "LARUS Integration Framework for Neo4j".
* <p>
* The "LARUS Integration Framework for Neo4j" is licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complian... | assertEquals(AuthTokens.basic(USERNAME, PASSWORD), authToken); | 4 |
calipho-sib/sparql-playground | src/main/java/swiss/sib/sparql/playground/controller/QueriesController.java | [
"@SpringBootApplication\npublic class Application {\n\n\tprivate static final Log logger = LogFactory.getLog(Application.class);\n\n\tpublic static String FOLDER = \"default\";\n\n\tpublic static void main(String[] args) {\n\n\t\tlogger.info(\"SPARQL Playground\\n\");\n\n\n\t\tif (args.length > 0) {\n\t\t\tString f... | import java.io.IOException;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.ann... | package swiss.sib.sparql.playground.controller;
/**
* Controller used to server the SPARQL queries
*
* @author Daniel Teixeira http://github.com/ddtxra
*
*/
@RestController
public class QueriesController {
@Autowired
QueryDictionary queryDictionary;
@Autowired | PageService pageService; | 3 |
arantius/TiVo-Commander | src/com/arantius/tivocommander/ShowList.java | [
"public enum MindRpc {\n INSTANCE;\n\n private static class AlwaysTrustManager implements X509TrustManager {\n public void checkClientTrusted(X509Certificate[] cert, String authType)\n throws CertificateException {\n }\n\n public void checkServerTrusted(X509Certificate[] cert, String authType)\n ... | import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Locale;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.ListActivity;
import android.content.Context;
import android.content.DialogInterface;
imp... | /*
DVR Commander for TiVo allows control of a TiVo Premiere device.
Copyright (C) 2011 Anthony Lieuallen (arantius@gmail.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 ... | MindRpc.addRequest(req, mDetailCallback); | 0 |
usethesource/capsule | src/main/java/io/usethesource/capsule/core/PersistentTrieMap.java | [
"public interface ArrayView<T> extends Iterable<T> {\n\n int size();\n\n default boolean isEmpty() {\n return size() == 0;\n }\n\n T get(int index);\n\n default void set(int index, T item) {\n throw new UnsupportedOperationException();\n }\n\n default void set(int index, T item, AtomicReference<?> writ... | import java.text.DecimalFormat;
import java.util.AbstractCollection;
import java.util.AbstractSet;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.Iterator;
import java.util.Map;
import... | /**
* Copyright (c) Michael Steindorfer <Centrum Wiskunde & Informatica> and Contributors.
* All rights reserved.
*
* This file is licensed under the BSD 2-Clause License, which accompanies this project
* and is available under https://opensource.org/licenses/BSD-2-Clause.
*/
package io.usethesource.capsule.core;... | public boolean containsKeyEquivalent(final Object o, final EqualityComparator<Object> cmp) { | 3 |
UBOdin/jsqlparser | testsrc/net/sf/jsqlparser/test/select/SpeedTest.java | [
"public class JSQLParserException extends Exception {\r\n\tprivate Throwable cause = null;\r\n\r\n\tpublic JSQLParserException() {\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic JSQLParserException(String arg0) {\r\n\t\tsuper(arg0);\r\n\t}\r\n\r\n\tpublic JSQLParserException(Throwable arg0) {\r\n\t\tthis.cause = arg0;\r\n\... | import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.StringReader;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import junit.framework.TestCase;
import junit.textui.TestRunner;
import net.sf.jsqlparser.JS... | package net.sf.jsqlparser.test.select;
public class SpeedTest extends TestCase {
private final static int NUM_REPS = 500;
private CCJSqlParserManager parserManager = new CCJSqlParserManager();
public SpeedTest(String arg0) {
super(arg0);
}
public void testSpeed() throws Exception {
// all the... | if (parsedStm instanceof Select) {
| 2 |
alistairdickie/BlueFlyVario_Android | src/com/bfv/view/component/BFVViewComponent.java | [
"public class DistanceUtil {\r\n //Compute the dot product AB . AC\r\n public static double dotProduct(Point2d pointA, Point2d pointB, Point2d pointC) {\r\n Point2d AB = new Point2d();\r\n Point2d BC = new Point2d();\r\n AB.x = pointB.x - pointA.x;\r\n AB.y = pointB.y - pointA.y;\r... | import android.graphics.*;
import android.util.Log;
import android.widget.FrameLayout;
import com.bfv.util.DistanceUtil;
import com.bfv.util.Line2d;
import com.bfv.util.Point2d;
import com.bfv.view.ParamatizedComponent;
import com.bfv.view.VarioSurfaceView;
import com.bfv.view.ViewComponentParameter;
import ja... | canvas.drawRect(rect, paint);
break;
case SELECTED_TOP:
canvas.drawLine(rect.left, rect.top, rect.right, rect.top, paint);
break;
case SELECTED_LEFT:
canvas.drawLine(rect.left, rect.... | public double distance(Point2d point) {
| 2 |
google/exposure-notifications-internals | exposurenotification/src/main/java/com/google/samples/exposurenotification/storage/ContactRecordDataStore.java | [
"public class Log {\n private static final String TAG = \"ExposureNotification\";\n public static final Log log = new Log();\n\n public Logger atVerbose() {\n return new Logger(android.util.Log::v);\n }\n\n public Logger atFine() {\n return new Logger(android.util.Log::d);\n }\n\n ... | import android.content.Context;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.google.common.collect.Iterables;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.samples.exposurenotification.Log;
import com.... | /*
* Copyright 2020 Google 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 i... | ArrayList<ScannedPacketContent> scannedPacketContents = new ArrayList<>(); | 3 |
liuling07/QiQuYingServer | src/com/lling/qiqu/controllers/admin/MeiTuAdminController.java | [
"@Entity\n@Table(name = \"t_joke\")\npublic class Joke implements Serializable{\n\n\tprivate static final long serialVersionUID = 4646260119535165219L;\n\n\t//type标记\n\tpublic static final int TYPE_QUSHI = 1;\n\tpublic static final int TYPE_QUTU = 2;\n\tpublic static final int TYPE_MEITU = 3;\n\tpublic static final... | import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springfr... | package com.lling.qiqu.controllers.admin;
/**
* @ClassName: MeiTuAdminController
* @Description: 美图管理控制器
* @author lling
* @date 2015-5-30
*/
@Controller
@RequestMapping("/meituadmin")
public class MeiTuAdminController {
@Resource
private IJokeService jokeService;
@Resource
private IUserService userSe... | new GetImgSizeThread(newJoke, jokeService).start(); | 5 |
gallir/SpokenPic | src/com/spokenpic/ViewLogin.java | [
"public static class LoginResult extends JsonData {\n\tpublic String email;\n\tpublic String key;\n\tpublic String username;\n\tpublic String password;\n\tpublic Integer pk = null; // An integer key\n\n}",
"public static class RegisterData extends JsonData {\n\tpublic String email;\n\tpublic String username;\n\tp... | import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionb... | /**
* SpokenPic Java source code
* @author Ricardo Galli (gallir@gmail.com)
* @copyright: Menéame & APSL, 2012
* @license: GPL3
*/
package com.spokenpic;
public class ViewLogin extends SherlockActivity implements RestClientListener {
private ProgressDialog pd = null;
@Override
public void onCreate(Bundle ... | RegisterData data = new RegisterData(); | 1 |
CodeCrafter47/BungeeTabListPlus | bungee/src/main/java/codecrafter47/bungeetablistplus/command/CommandBungeeTabListPlus.java | [
"public class BungeeTabListPlus {\n\n /**\n * Holds an INSTANCE of itself if the plugin is enabled\n */\n private static BungeeTabListPlus INSTANCE;\n @Getter\n private final Plugin plugin;\n\n public PlayerProvider playerProvider;\n @Getter\n private EventExecutor mainThreadExecutor;\n... | import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import codecrafter47.bungeetablistplus.BungeeTabListPlus;
import codecrafter47.bungeetablistplus.bridge.BukkitBridge;
import codecrafter47.bungeetablistplus.command.util.CommandBase;
import codecrafter47.bungeetablistplus.command.uti... | /*
* Copyright (C) 2020 Florian Stober
*
* 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 version.
*
*... | if (dataHolder != null && dataHolder.get(BTLPDataKeys.REGISTERED_THIRD_PARTY_VARIABLES) != null) { | 4 |
jcgay/send-notification | send-notification/src/test/java/NotifySendExample.java | [
"@AutoValue\npublic abstract class Application {\n\n /**\n * Uniquely identify an application. <br>\n * In order to ensure your application's signature is unique, the recommendation is to follow the Internet Media\n * type (also known as MIME content type) format as defined in IETF <a href=\"http://t... | import fr.jcgay.notification.Application;
import fr.jcgay.notification.Icon;
import fr.jcgay.notification.Notification;
import fr.jcgay.notification.Notifier;
import fr.jcgay.notification.SendNotification;
import java.net.URL;
import java.util.concurrent.TimeUnit; |
class NotifySendExample {
public static void main(String[] args) {
URL icon = NotifySendExample.class.getResource("/image/dialog-clean.png");
Application application = Application.builder()
.id("notify-send-example")
.name("Notify Send Example")
.icon(Icon.cr... | Notifier notifier = new SendNotification() | 4 |
Wokdsem/Kinject | compiler/src/main/java/com/wokdsem/kinject/codegen/ModuleAdapterSpec.java | [
"public class Dependency {\n\n\tpublic final String canonicalClassName;\n\tpublic final String named;\n\n\tpublic Dependency(String canonicalClassName, String named) {\n\t\tthis.canonicalClassName = canonicalClassName;\n\t\tthis.named = named;\n\t}\n\n}",
"public class Module {\n\n\tpublic final String canonicalM... | import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeSpec;
import com.wokdsem.kinject.annotations.Provides;
import com.wokdsem.kinject.codegen.domains.Dependency;
import com.wokdsem.kinject.codegen.domains.M... | package com.wokdsem.kinject.codegen;
class ModuleAdapterSpec {
static TypeSpec getModuleAdapterSpec(Module module, String adapterName) {
List<MethodSpec> methods = getMethods(module.canonicalModuleName, module.provides);
return TypeSpec
.classBuilder(adapterName)
.addModifiers(PUBLIC, FINAL)
.addMeth... | return SimpleBinder.class; | 6 |
apache/creadur-rat | apache-rat-core/src/test/java/org/apache/rat/report/xml/XmlReportTest.java | [
"public class SimpleXmlClaimReporter extends AbstractReport {\n private static final String RAT_REPORT = \"rat-report\";\n private static final String TIMESTAMP = \"timestamp\";\n private static final String LICENSE_APPROVAL_PREDICATE = \"license-approval\";\n private static final String LICENSE_FAMILY_... | import org.apache.rat.analysis.DefaultAnalyserFactory;
import org.apache.rat.analysis.IHeaderMatcher;
import org.apache.rat.analysis.RatHeaderAnalysisException;
import org.apache.rat.api.Document;
import org.apache.rat.document.IDocumentAnalyser;
import org.apache.rat.report.AbstractReport;
import org.apache.rat.report... | /*
* Licensed to the Apache Software Foundation (ASF) under one *
* or more contributor license agreements. See the NOTICE file *
* distributed with this work for additional information *
* regarding copyright ownership. The ASF licenses this file *
* to you under the Apache License, Version 2.0 (the ... | private void report(DirectoryWalker directory) throws Exception { | 4 |
XDean/Java-EX | src/main/java/cn/xdean/jex/json/JsonPrinter.java | [
"public class ExceptionUtil {\n public static <T extends Throwable, R> R throwIt(T t) throws T {\n throw t;\n }\n\n @SuppressWarnings(\"unchecked\")\n public static <T extends Throwable, R> R throwAsUncheck(Throwable t) throws T {\n throw (T) t;\n }\n\n public static void uncheck(ActionE0<?> task) {\n ... | import cn.xdean.jex.lang.ExceptionUtil;
import cn.xdean.jex.lang.collection.Either;
import cn.xdean.jex.lang.collection.Pair;
import cn.xdean.jex.reflect.PrimitiveTypeUtil;
import cn.xdean.jex.reflect.ReflectUtil;
import com.google.common.base.Charsets;
import com.google.common.collect.Multimap;
import com.google.commo... | package cn.xdean.jex.json;
public class JsonPrinter {
@SuppressWarnings("unchecked")
public static JsonPrinter getDefault() {
return getJava()
.printIdPolicy(PrintIdPolicy.ONLY_REFERENCED)
.addObjectClassHandler(Either.class, e -> e.unify(a -> a, b -> b))
.addObjectClassHandler(Multim... | return ExceptionUtil.uncheck(() -> toString(o, Charsets.UTF_8)); | 0 |
amao12580/BookmarkHelper | app/src/main/java/pro/kisscat/www/bookmarkhelper/converter/support/impl/qq/QQBrowserAble.java | [
"public class BasicBrowser extends App implements BrowserAble {\n @Setter\n protected int bookmarkSum;\n @Setter\n protected boolean installed;\n\n public boolean isInstalled(Context context, BasicBrowser browser) {\n setInstalled(AppListUtil.isInstalled(context, browser.getPackageName()));\n ... | import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import lombok.Getter;
import lombok.Setter;
import pro.kisscat.www.bookmarkhelper.co... | package pro.kisscat.www.bookmarkhelper.converter.support.impl.qq;
/**
* Created with Android Studio.
* Project:BookmarkHelper
* User:ChengLiang
* Mail:stevenchengmask@gmail.com
* Date:2016/12/12
* Time:16:11
*/
public class QQBrowserAble extends BasicBrowser {
protected String TAG = null;
private fi... | ExternalStorageUtil.copyFile(targetFilePath, tmpFilePath, this.getName()); | 7 |
cejug/hurraa | src/main/java/org/cejug/hurraa/controller/UpdateOccurrenceController.java | [
"@Entity\npublic class Occurrence implements Serializable {\n\t\n\tprivate static final long serialVersionUID = -9182122904967670112L;\n\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\tprivate Long id;\n\t\n\t@Temporal(TemporalType.TIMESTAMP)\n\tprivate Date dateOfOpening;\n\t\n\tprivate String ser... | import org.cejug.hurraa.model.bean.UserBean;
import org.cejug.hurraa.model.bean.exception.NoChangeInOccurrenceException;
import org.cejug.hurraa.producer.ValidationMessages;
import br.com.caelum.vraptor.Controller;
import br.com.caelum.vraptor.Get;
import br.com.caelum.vraptor.Path;
import br.com.caelum.vraptor.Post;
i... | /*
* Hurraa is a web application conceived to manage resources
* in companies that need manage IT resources. Create issues
* and purchase IT materials. Copyright (C) 2014 CEJUG.
*
* Hurraa is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* th... | Occurrence occurrence = occurrenceBean.findById(occurrenceId); | 0 |
rm3l/maoni | maoni/src/main/java/org/rm3l/maoni/ui/MaoniActivity.java | [
"public static class CallbacksConfiguration {\n\n @Nullable\n private static CallbacksConfiguration SINGLETON = null;\n\n @Nullable\n private Validator validator;\n\n @Nullable\n private Listener listener;\n\n @Nullable\n private UiListener uiListener;\n\n private CallbacksConfiguration(@... | import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import andr... | /*
* Copyright (c) 2016 Armel Soro
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish,... | final CallbacksConfiguration maoniConfiguration = CallbacksConfiguration.getInstance(this); | 0 |
BoD/android-contentprovider-generator | etc/sample-generated-code/org/jraf/androidcontentprovidergenerator/sample/provider/SampleSQLiteOpenHelper.java | [
"public class BaseSQLiteOpenHelperCallbacks {\n private static final String TAG = BaseSQLiteOpenHelperCallbacks.class.getSimpleName();\n\n /**\n * Called when the database has been opened.\n * @see android.database.sqlite.SQLiteOpenHelper#onOpen(SQLiteDatabase) onOpen\n */\n public void onOpen(... | import android.database.sqlite.SQLiteOpenHelper;
import android.os.Build;
import android.util.Log;
import org.jraf.androidcontentprovidergenerator.sample.provider.base.BaseSQLiteOpenHelperCallbacks;
import org.jraf.androidcontentprovidergenerator.sample.provider.SampleSQLiteOpenHelperCallbacks;
import org.jraf.androidc... | /*
* This source is part of the
* _____ ___ ____
* __ / / _ \/ _ | / __/___ _______ _
* / // / , _/ __ |/ _/_/ _ \/ __/ _ `/
* \___/_/|_/_/ |_/_/ (_)___/_/ \_, /
* /___/
* repository.
*
* Copyright (C) 2012-2017 Benoit 'BoD' Lubek (BoD@JRAF.org)
*
* This program is fre... | + CompanyColumns.TABLE_NAME + " ( " | 2 |
Piasy/BigImageViewer | BigImageViewer/src/main/java/com/github/piasy/biv/view/BigImageView.java | [
"public final class BigImageViewer {\n private static volatile BigImageViewer sInstance;\n\n private final ImageLoader mImageLoader;\n\n private BigImageViewer(ImageLoader imageLoader) {\n mImageLoader = imageLoader;\n }\n\n public static void initialize(ImageLoader imageLoader) {\n sIn... | import android.Manifest;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.Handl... | /*
* The MIT License (MIT)
*
* Copyright (c) 2018 Piasy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, ... | mInternalCallback = ThreadedCallbacks.create(ImageLoader.Callback.class, this); | 6 |
Samourai-Wallet/sentinel-android | app/src/main/java/com/samourai/sentinel/SamouraiSentinel.java | [
"public class AESUtil\t{\n\n// private static Logger mLogger = LoggerFactory.getLogger(AESUtil.class);\n\n public static final int DefaultPBKDF2Iterations = 5000;\n\n private static byte[] copyOfRange(byte[] source, int from, int to) {\n byte[] range = new byte[to - from];\n System.arraycopy(... | import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
import com.samourai.sentinel.crypto.AESUtil;
import com.samourai.sentinel.segwit.P2SH_P2WPKH;
import com.samourai.sentinel.segwit.SegwitAddress;
import com.samourai.sentinel.util.AddressFactory;
import com.samourai.sentin... | package com.samourai.sentinel;
//import android.util.Log;
public class SamouraiSentinel {
private static NetworkParameters networkParams = null;
private static HashMap<String,String> xpubs = null;
private static HashMap<String,String> legacy = null;
private static HashMap<String,String> bip49 = n... | PrefsUtil.getInstance(context).setValue(PrefsUtil.TESTNET, obj.getBoolean("testnet")); | 6 |
tupilabs/tap4j | src/main/java/org/tap4j/representer/Tap13Representer.java | [
"public class BailOut extends TapResult {\n\n /**\n * Serial Version UID.\n */\n private static final long serialVersionUID = -354950715195034445L;\n\n /**\n * Reason to Bail Out.\n */\n private final String reason;\n\n /**\n * Constructor with parameter.\n *\n * @param re... | import org.tap4j.model.Footer;
import org.tap4j.model.Header;
import org.tap4j.model.Plan;
import org.tap4j.model.TapElement;
import org.tap4j.model.TestResult;
import org.tap4j.model.TestSet;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.DumperOptions.LineBreak;
import org.yaml.snakeyaml.Yaml;
imp... | /*
* The MIT License
*
* Copyright (c) 2010 tap4j team (see AUTHORS)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* t... | protected void printFooter(PrintWriter pw, Footer footer) { | 2 |
ghjansen/cas | cas-control/src/main/java/com/ghjansen/cas/control/simulation/SimulationController.java | [
"public class SimulationAlreadyActiveException extends Exception {\n\n /**\n * Serialization management\n */\n private static final long serialVersionUID = 3256836960787368903L;\n\n}",
"public class SimulationBuilderException extends Exception {\n\n /**\n * Serialization management\n */\n... | import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.ghjansen.cas.control.exception.SimulationAlreadyActiveException;
import com.ghjansen.cas.control.exception.SimulationBuilderException;
import com.ghjansen.cas.control.task.CompleteTask;
import com.ghjansen.cas.control.task.It... | /*
* CAS - Cellular Automata Simulator
* Copyright (C) 2016 Guilherme Humberto Jansen
*
* 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 y... | public SimulationController(M simulationBuilder, TaskNotification notification) throws SimulationBuilderException { | 1 |
freenet/plugin-FlogHelper | src/main/java/plugins/floghelper/ui/FlogListToadlet.java | [
"public class DataFormatter {\n\n\t/**\n\t * RFC3339-compliant dates are used in Atom feeds.\n\t */\n\tpublic static final SimpleDateFormat RFC3339 = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'\", java.util.Locale.US);\n\t/**\n\t * Our date format used in the flog (is UTC).\n\t */\n\tpublic static final ... | import plugins.floghelper.data.Activelink;
import plugins.floghelper.data.Flog;
import plugins.floghelper.data.pluginstore.PluginStoreFlog;
import plugins.floghelper.ui.flog.FlogFactory;
import freenet.pluginmanager.PluginNotFoundException;
import plugins.floghelper.data.DataFormatter;
import freenet.client.HighLevelSi... | /* FlogHelper, Freenet plugin to create flogs
* Copyright (C) 2009 Romain "Artefact2" Dalmaso
*
* 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 yo... | row.addChild("td").addChild("pre", DataFormatter.toString(flog.getID())); | 0 |
alphagov/locate-api | locate-api-service/src/test/uk/gov/gds/locate/api/resources/AddressResourceTest.java | [
"@Provider\n@Produces(MediaType.APPLICATION_JSON)\npublic class LocateExceptionMapper implements javax.ws.rs.ext.ExceptionMapper<Throwable> {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(LocateExceptionMapper.class);\n\n protected static final String CONTENT_TYPE = \"application/json; char... | import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.sun.jersey.api.client.GenericType;
import com.sun.jersey.api.client.UniformInterfaceException;
import com.yammer.dropwizard.auth.AuthenticationException;
import com.yammer.dropwizard.auth.Authenticator;
import com.yammer.... | package uk.gov.gds.locate.api.resources;
public class AddressResourceTest extends ResourceTest {
private AddressDao dao = mock(AddressDao.class);
private UsageDao usageDao = mock(UsageDao.class);
private LocateApiConfiguration configuration = mock(LocateApiConfiguration.class);
private String allD... | private Address address = new Address("gssCode", "uprn", "postcode", "country", new Date(), new PresentationBuilder("test").build(), validAddress, new Location(), ordering, "iv"); | 7 |
cattaka/AdapterToolbox | example/src/main/java/net/cattaka/android/adaptertoolbox/example/SpinnerTreeItemAdapterExampleActivity.java | [
"public class ForwardingListener<A extends RecyclerView.Adapter<? extends VH>, VH extends RecyclerView.ViewHolder>\n implements IForwardingListener<A, VH>,\n View.OnClickListener,\n View.OnLongClickListener,\n RadioGroup.OnCheckedChangeListener,\n CompoundButton.OnCheckedChangeLis... | import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.w... | package net.cattaka.android.adaptertoolbox.example;
/**
* Created by cattaka on 16/05/02.
*/
public class SpinnerTreeItemAdapterExampleActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener {
ClassicListenerRelay mListenerRelay = new ClassicListenerRelay() {
@Override
... | List<MyTreeItem> items = ExampleDataGenerator.generateMyTreeItem(Arrays.asList(5, 3, 2), 0); | 7 |
x7hub/Calendar_lunar | src/edu/bupt/calendar/event/AttendeesView.java | [
"public static class Attendee implements Serializable {\n @Override\n public int hashCode() {\n return (mEmail == null) ? 0 : mEmail.hashCode();\n }\n\n @Override\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (!(obj instanceo... | import edu.bupt.calendar.CalendarEventModel.Attendee;
import edu.bupt.calendar.ContactsAsyncHelper;
import edu.bupt.calendar.R;
import edu.bupt.calendar.Utils;
import edu.bupt.calendar.event.EditEventHelper.AttendeeItem;
import com.android.common.Rfc822Validator;
import android.content.AsyncQueryHandler;
import android... | /*
* Copyright (C) 2010 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 ap... | private View constructAttendeeView(AttendeeItem item) { | 3 |
basgren/railways | src/net/bitpot/railways/gui/MainPanel.java | [
"public class UpdateRoutesListAction extends AnAction {\n // Presentation is stored to be used when asynchronous action icon needs to be updated.\n private static Presentation updateBtnPresentation = null;\n\n\n @Override\n public void actionPerformed(@NotNull AnActionEvent e) {\n Project project... | import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.ui.DocumentAdapter;
import com.intellij.ui.HyperlinkLabel;
import com.intellij.ui.JBSplitter;
import com.intellij.ui.SearchTextField;
import com.intellij.ui.compone... | });
actionLbl.addHyperlinkListener(e -> {
if (currentRoute != null)
currentRoute.navigate(false);
});
}
/**
* Navigates to a route in specified viewRow, if row exists.
* @param viewRow Row index which contains route to navigate to.
*/
pri... | UpdateRoutesListAction.updateIcon(project); | 0 |
bhatti/PlexRBAC | src/main/java/com/plexobject/rbac/service/impl/ServerStatusServiceImpl.java | [
"public class CacheFlusher {\n private List<CacheFlushable> caches = new ArrayList<CacheFlushable>();\n private static final CacheFlusher INSTANCE = new CacheFlusher();\n\n private CacheFlusher() {\n }\n\n public static CacheFlusher getInstance() {\n return INSTANCE;\n }\n\n public synch... | import java.util.Date;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import org.apache.log4j.Logger;
import org.codehaus.jetti... | package com.plexobject.rbac.service.impl;
@Path("/status")
@Component("serverStatusService")
@Scope("singleton")
public class ServerStatusServiceImpl implements ServerStatusService {
private static final Logger LOGGER = Logger
.getLogger(ServerStatusServiceImpl.class);
@Context
UriInfo uri... | mbean = JMXRegistrar.getInstance().register(getClass()); | 2 |
offa/NBCndUnit | src/test/java/bv/offa/netbeans/cnd/unittest/cpputest/CppUTestErrorHandlerTest.java | [
"public class CndTestCase extends Testcase\n{\n private final TestFramework framework;\n private FailureInfo failureInfo;\n \n \n public CndTestCase(String name, TestFramework framework, TestSession session)\n {\n super(name, framework.getName(), session);\n this.framework = framewor... | import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import static org.mockito.Mockito.*;
import org.netbeans.modules.gsf.testrunner.api.TestSession;
import org.netbeans.modules.gsf.testrunner.api.Trouble;
import bv.offa.netbeans.cnd.unittest.api.CndTestCase;
import bv.offa.netbeans.cnd.unittest.api.Fai... | /*
* NBCndUnit - C/C++ unit tests for NetBeans.
* Copyright (C) 2015-2021 offa
*
* This file is part of NBCndUnit.
*
* NBCndUnit 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... | private static final TestFramework FRAMEWORK = TestFramework.CPPUTEST; | 3 |
wavesoftware/java-eid-exceptions | src/main/java/pl/wavesoftware/eid/utils/EidPreconditions.java | [
"public interface Eid extends Serializable {\n /**\n * Getter for constant Exception ID\n *\n * @return ID of exception\n */\n String getId();\n\n /**\n * Get an external reference passed to Exception ID\n *\n * @return an external reference, or null if not set\n */\n @Nu... | import pl.wavesoftware.eid.api.Eid;
import pl.wavesoftware.eid.exceptions.EidIllegalArgumentException;
import pl.wavesoftware.eid.exceptions.EidIllegalStateException;
import pl.wavesoftware.eid.exceptions.EidIndexOutOfBoundsException;
import pl.wavesoftware.eid.exceptions.EidNullPointerException;
import pl.wavesoftware... | /*
* Copyright (c) 2015 Wave Software
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | throw new EidRuntimeException( | 5 |
carlanton/mpd-tools | parser/src/test/java/io/lindstrom/mpd/data/DataTypeTest2.java | [
"public class GenericDescriptor extends Descriptor {\n @JacksonXmlProperty(isAttribute = true, localName = \"value\")\n private final String value;\n\n public GenericDescriptor(String schemeIdUri, String value, String id) {\n super(schemeIdUri, id);\n this.value = value;\n }\n\n public ... | import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.lindstrom.mpd.data.descriptor.GenericDescriptor;
import io.lindstrom.mpd.data.descriptor.Role;
import io.lindstrom.mpd.data.descriptor.protection.Mp4Protection;
import io.lindstrom.mpd.data.descriptor.protection.PlayReadyContentProtection;
impo... | package io.lindstrom.mpd.data;
public class DataTypeTest2 {
private Class<?> clazz;
private Class<?> builderClazz;
private Class<?> setClazz(Class<?> clazz) {
this.clazz = clazz;
return builderClass(clazz);
}
@ParameterizedTest
@MethodSource("params")
public void build... | Mp4Protection.class, | 2 |
Jarlakxen/eclipse-sbt-plugin | com.github.jarlakxen.scala.sbt/src/com/github/jarlakxen/scala/sbt/jobs/CreateSbtProjectJob.java | [
"public class SbtPlugin extends AbstractUIPlugin {\r\n\r\n\tpublic static final String[] PROJECT_NATURES_IDS = new String[] { \r\n\t\tScalaPlugin.plugin().natureId(), \r\n\t\t\"org.eclipse.jdt.core.javanature\",\r\n\t\tSbtPlugin.NATURE_ID \r\n\t};\r\n\r\n\t/** The plug-in ID */\r\n\tpublic static final String PLUGI... | import org.apache.commons.io.IOUtils;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.WorkspaceJob;
import org.eclipse.core.runtime.CoreException;
import org.ecl... | package com.github.jarlakxen.scala.sbt.jobs;
/**
* Job that create the SBT project.
*
* @see SbtWizard
* @author Facundo Viale
*/
public class CreateSbtProjectJob extends WorkspaceJob {
private CreateSbtProjectConfiguration configuration;
public CreateSbtProjectJob(CreateSbtProjectConfiguration configurati... | SbtProjectConfiguration config = new SbtProjectConfiguration(project, configuration.getSbtVersion(), configuration.getScalaVersion()); | 1 |
Team254/FRC-2015 | src/com/team254/frc2015/subsystems/controllers/ElevatorSqueezeController.java | [
"public class Constants extends ConstantsBase {\n public static double kDriveSensitivity = .75;\n public static double kNegativeInertiaScalar = 5.0;\n\n // Operator controls\n public static double kElevatorJogFastPwm = 1.0;\n public static double kElevatorJogMediumPwm = .7;\n public static double ... | import com.team254.frc2015.Constants;
import com.team254.frc2015.HardwareAdaptor;
import com.team254.frc2015.subsystems.TopCarriage;
import com.team254.lib.util.CheesySpeedController;
import com.team254.lib.util.Controller; | package com.team254.frc2015.subsystems.controllers;
public class ElevatorSqueezeController extends Controller {
TopCarriage m_top_carriage = HardwareAdaptor.kTopCarriage; | CheesySpeedController m_bottom_carriage_motor = HardwareAdaptor.kBottomCarriageMotor; | 3 |
NicolaasWeideman/RegexStaticAnalysis | src/main/java/preprocessor/OperatorExpansionRule.java | [
"static class GroupFactor extends RegexFactor<List<RegexToken>> {\n\t\t\n\t\t\n\tprivate int level;\n\tpublic int getLevel() {\n\t\treturn level;\n\t}\n\n\tpublic GroupFactor(List<RegexToken> factorContent, GroupType groupType) {\n\t\tsuper(factorContent);\n\t\tthis.groupType = groupType;\n\t}\n\n\tpublic GroupFact... | import java.util.List;
import preprocessor.ParsingPreprocessor.GroupFactor;
import preprocessor.ParsingPreprocessor.RegexFactor;
import preprocessor.ParsingPreprocessor.RegexOperator;
import preprocessor.ParsingPreprocessor.RegexOperator.OperatorType;
import preprocessor.ParsingPreprocessor.RegexToken;
import preproces... | package preprocessor;
public abstract class OperatorExpansionRule implements PreprocessorRule {
protected abstract void expandOperator(StringBuilder resultBuilder, RegexToken factor, RegexToken operator);
protected abstract RegexOperator getOperator();
| protected abstract OperatorType getOperatorType(); | 3 |
cbartosiak/bson-codecs-jsr310 | src/test/java/io/github/cbartosiak/bson/codecs/jsr310/zoneddatetime/ZonedDateTimeCodecsTests.java | [
"public abstract class AbstractCodecsTests {\n\n protected AbstractCodecsTests() {}\n\n protected static final <T> void testCodec(Codec<T> codec, T value) {\n try (BasicOutputBuffer output = new BasicOutputBuffer()) {\n\n encode(output, codec, value);\n\n T decoded = decode(wrap(o... | import io.github.cbartosiak.bson.codecs.jsr310.zoneoffset.ZoneOffsetAsInt32Codec;
import io.github.cbartosiak.bson.codecs.jsr310.zoneoffset.ZoneOffsetAsStringCodec;
import static java.time.ZonedDateTime.now;
import static java.time.ZonedDateTime.of;
import static org.junit.jupiter.api.Assertions.assertThrows;
import ja... | /*
* Copyright 2018 Cezary Bartosiak
*
* 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 agree... | new ZoneOffsetAsStringCodec(), | 4 |
supaldubey/storm | src/test/java/in/cubestack/android/lib/storm/criteria/ProjectionTest.java | [
"public class StormException extends Exception {\r\n\r\n\tprivate static final long serialVersionUID = -563476450614494464L;\r\n\r\n\tpublic StormException(Throwable throwable) {\r\n\t\tsuper(throwable);\r\n\t}\r\n\t\r\n\tpublic StormException(String msg) {\r\n\t\tsuper(msg);\r\n\t}\r\n\r\n\tpublic StormException(S... | import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import in.cubestack.android.lib.storm.core.StormException;
import in.cubestack.android.lib.storm.core.StormRuntimeException;
import in.cubestack.android.lib.storm.criteria.Projection;
import in.cubestack.android.lib.storm.criteria.StormProje... | /**
*
*/
package in.cubestack.android.lib.storm.criteria;
/**
* A core Android SQLite ORM framework build for speed and raw execution.
* Copyright (c) 2014 CubeStack. Version built for Flash Back..
* <p/>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this sof... | public void init() throws StormException {
| 0 |
yyxhdy/ManyEAs | src/jmetal/operators/crossover/HUXCrossover.java | [
"public class Solution implements Serializable {\n\t/**\n\t * Stores the problem\n\t */\n\tprivate Problem problem_;\n\n\t/**\n\t * Stores the type of the encodings.variable\n\t */\n\tprivate SolutionType type_;\n\n\t/**\n\t * Stores the decision variables of the solution.\n\t */\n\tprivate Variable[] variable_;\n\... | import java.util.HashMap;
import java.util.List;
import jmetal.core.Solution;
import jmetal.encodings.solutionType.BinaryRealSolutionType;
import jmetal.encodings.solutionType.BinarySolutionType;
import jmetal.encodings.variable.Binary;
import jmetal.util.Configuration;
import jmetal.util.JMException;
import jmetal.uti... | // HUXCrossover.java
//
// Author:
// Antonio J. Nebro <antonio@lcc.uma.es>
// Juan J. Durillo <durillo@lcc.uma.es>
//
// Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Publi... | Configuration.logger_.severe("HUXCrossover.doCrossover: Cannot perfom " + | 4 |
RacZo/Smarty-Streets-AutoCompleteTextView | src/main/java/com/oscarsalguero/smartystreetsautocomplete/history/DefaultAutocompleteHistoryManager.java | [
"public class Constants {\n\n public static final String MAGIC_HISTORY_VALUE_PRE = \"____history____=\";\n public static final boolean DEBUG = false;\n\n}",
"public enum BackgroundExecutorService {\n INSTANCE, BackgroundExecutorService;\n\n private static final String LOG_TAG = BackgroundExecutorServi... | import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.util.AtomicFile;
import android.text.TextUtils;
import android.util.Log;
import com.oscarsalguero.smartystreetsautocomplete.Constants;
import com.oscarsalguero.smartystreetsau... | /***
* Copyright (c) 2017 Oscar Salguero www.oscarsalguero.com
* 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 la... | BackgroundExecutorService.INSTANCE.enqueue(new BackgroundJob<List<Address>>() { | 1 |
android-notes/SwissArmyKnife | saklib/src/main/java/com/wanjian/sak/system/canvas/compact/HardwareCanvasV29Impl.java | [
"public final class FrameInfo {\n\n public void markDrawStart() {\n }\n\n\n}",
"public abstract class HardwareRenderer {\n protected RenderNode mRootNode;\n\n public int syncAndDrawFrame(FrameInfo frameInfo) {\n return 0;\n }\n}",
"public class RecordingCanvas extends Canvas {\n private static final in... | import android.graphics.Canvas;
import android.graphics.FrameInfo;
import android.graphics.HardwareRenderer;
import android.graphics.RecordingCanvas;
import android.graphics.RenderNode;
import android.view.Choreographer;
import android.view.ThreadedRenderer;
import android.view.View;
import android.view.ViewRootImpl;
i... | package com.wanjian.sak.system.canvas.compact;
class HardwareCanvasV29Impl extends HardwareCanvasV26Impl {
private RenderNode mRootNode;
private RecordingCanvas canvas;
private int saveCount;
HardwareCanvasV29Impl(ViewRootImpl viewRootImpl) {
super(viewRootImpl);
}
@Override
protected Canvas inne... | Field mRootNodeF = HardwareRenderer.class.getDeclaredField("mRootNode"); | 1 |
pdsoftplan/zap-maven-plugin | zap-maven-plugin-core/src/main/java/br/com/softplan/security/zap/maven/ZapMojo.java | [
"public class AnalysisInfo {\n\n\tprivate static final long DEFAULT_ANALYSIS_TIMEOUT_IN_MINUTES = 480;\n\tprivate static final AnalysisType DEFAULT_ANALYSIS_TYPE = AnalysisType.WITH_SPIDER;\n\tprivate static final boolean DEFAULT_SHOULD_START_NEW_SESSION = true;\n\t\n\tprivate String targetUrl;\n\tprivate String sp... | import java.io.File;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Parameter;
import br.com.softplan.security.zap.api.model.AnalysisInfo;
import br.com.softplan.security... | package br.com.softplan.security.zap.maven;
/**
* Abstract Mojo used as a base for the other ZAP Mojos.
*
* @author pdsec
*/
public abstract class ZapMojo extends AbstractMojo {
// Common
/**
* Disables the plug-in execution.
*/
@Parameter(property = "zap.skip", defaultValue = "false") priva... | protected void saveReport(ZapReport zapReport) { | 4 |
mitmel/Locast-Android | src/edu/mit/mobile/android/locast/ver2/itineraries/ItineraryDetail.java | [
"public class Constants {\n\n\t/**\n\t * General debugging flag. This needs to be a constant so that the compiler will remove any debugging code.\n\t */\n\tpublic static final boolean DEBUG = false;\n\t/**\n\t * If true, the user can create casts.\n\t */\n\tpublic static final boolean CAN_CREATE_CASTS = true;\n\n\t... | import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.o... | package edu.mit.mobile.android.locast.ver2.itineraries;
/*
* Copyright (C) 2011 MIT Mobile Experience Lab
*
* 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 Licen... | private static final String[] ITINERARY_PROJECTION = new String[]{Itinerary._ID, Itinerary._DESCRIPTION, Itinerary._TITLE, Itinerary._CASTS_COUNT, Itinerary._PATH}; | 3 |
pulsarIO/druid-kafka-ext | kafka-eight-ex/src/main/java/com/ebay/pulsar/druid/firehose/kafka/support/SimpleConsumerController.java | [
"public interface KafkaConsumer {\n\t/**\n\t * get consumer id which register to zookeeper.\n\t * \n\t * @return\n\t */\n\tpublic ConsumerId getConsumerId() ;\n\n\t/**\n\t * handle all the partition reader exception.\n\t */\n\tvoid handlePartitionReaderException(PartitionReader reader,KafkaPartitionReaderException ... | import static com.google.common.base.Preconditions.checkArgument;
import java.io.UnsupportedEncodingException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import java.util.... | /*******************************************************************************
* Copyright © 2012-2015 eBay Software Foundation
* This program is licensed under the Apache 2.0 licenses.
* Please see LICENSE for more information.
*******************************************************************************/
packa... | public SimpleConsumerController(KafkaConsumerConfig config) { | 3 |
centralperf/centralperf | src/main/java/org/centralperf/service/BootstrapService.java | [
"public class Configuration {\n\tpublic static final String INITIALIZED = \"initialized\";\n\t\n\tprivate String keyLabel;\n\tprivate String keyToolTip;\n\tprivate String keyName;\n\tprivate String keyValue;\n\tprivate boolean readOnly;\n\tprivate boolean fromDb;\n\tprivate boolean booleanValue;\n\tprivate String t... | import org.centralperf.model.Configuration;
import org.centralperf.model.dao.Project;
import org.centralperf.model.dao.Run;
import org.centralperf.repository.RunRepository;
import org.centralperf.sampler.driver.jmeter.JMeterSampler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.bea... | /*
* Copyright (C) 2014 The Central Perf authors
*
* 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 version.
*
* T... | List<Run> incompleteRuns = runRepository.findByRunning(true); | 2 |
oaqa/baseqa | src/main/java/edu/cmu/lti/oaqa/baseqa/eval/calculator/RetrievalEvalCalculator.java | [
"public static double calculateAveragePrecision(List<String> resultArray, Set<String> gsSet) {\n int[] relIndices = IntStream.range(0, resultArray.size())\n .filter(i -> gsSet.contains(resultArray.get(i))).toArray();\n double sumPrec = IntStream.range(0, relIndices.length)\n .mapToDouble(i -> (i... | import static edu.cmu.lti.oaqa.baseqa.eval.EvalCalculatorUtil.calculateAveragePrecision;
import static edu.cmu.lti.oaqa.baseqa.eval.EvalCalculatorUtil.calculateF1;
import static edu.cmu.lti.oaqa.baseqa.eval.EvalCalculatorUtil.calculatePrecision;
import static edu.cmu.lti.oaqa.baseqa.eval.EvalCalculatorUtil.calculateRec... | package edu.cmu.lti.oaqa.baseqa.eval.calculator;
public class RetrievalEvalCalculator<T extends SearchResult> extends ConfigurableProvider
implements EvalCalculator<T> {
@Override
public Map<Measure, Double> calculate(JCas jcas, Collection<T> resultEvaluatees,
Collection<T> gsEvaluatees, Co... | .exp(sumOfLogMeasurementValues(measure2values.get(AVERAGE_PRECISION)) / count); | 5 |
guillaume-alvarez/ShapeOfThingsThatWere | core/src/com/galvarez/ttw/ThingsThatWereGame.java | [
"public final class SessionSettings implements Cloneable {\n\n /** List different colors that are easy to recognize on-screen. */\n public static final List<Color> COLORS = Arrays.asList(Color.RED, Color.GREEN, Color.BLUE, Color.PURPLE,\n Color.YELLOW, Color.TEAL, Color.WHITE, Color.BLACK, Color.GRAY, Color.... | import com.artemis.World;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.galvarez.ttw.model.data.SessionSettings;
import com.galvarez.ttw.rendering.ColorAnimationSystem;
import com.galvarez.ttw.rendering.ScaleAnimationSystem;
import com.galvarez.t... | package com.galvarez.ttw;
public class ThingsThatWereGame extends Game {
public int windowWidth;
public int windowHeight;
public Assets assets;
private World world;
private SpriteBatch batch;
private CustomizeGameMenuScreen customScreen;
private MainMenuScreen menuScreen;
| private SessionSettings settings; | 0 |
saltedge/saltedge-android | saltedge-library/src/main/java/com/saltedge/sdk/connector/CustomerConnector.java | [
"public interface CreateCustomerResult {\n\n /**\n * Callback method is invoked when Create Customer operation finished with success\n *\n * @param secret unique String of newly created customer\n */\n void onSuccess(String secret);\n\n /**\n * Callback method is invoked when Create Cus... | import retrofit2.Response;
import com.saltedge.sdk.interfaces.CreateCustomerResult;
import com.saltedge.sdk.model.request.CreateCustomerRequest;
import com.saltedge.sdk.model.response.CreateCustomerResponse;
import com.saltedge.sdk.network.SERestClient;
import com.saltedge.sdk.utils.SEErrorTools;
import com.saltedge.sd... | /*
Copyright © 2019 Salt Edge. https://saltedge.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... | else callback.onFailure(SEJsonTools.getErrorMessage(response.errorBody())); | 5 |
shunjikonishi/sendgrid4j | src/test/java/jp/co/flect/sendgrid/ProfileTest.java | [
"public class Profile extends AbstractModel {\n\t\n\tpublic Profile(Map<String, Object> map) {\n\t\tsuper(map);\n\t}\n\t\n\tpublic String getUserName() { return doGetString(\"username\");}\n\tpublic String getEmail() { return doGetString(\"email\");}\n\t\n\tpublic boolean isActive() { return doGetBoolean(\"active\"... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import org.junit.Test;
import org.junit.BeforeClass;
import java.io.File;
import java.io.FileInputStream;... | package jp.co.flect.sendgrid;
public class ProfileTest {
@Test
public void getAndSet() throws Exception {
SendGridClient client = new SendGridClient(USERNAME, PASSWORD);
| Profile profile = client.getProfile(); | 0 |
RyanTheAllmighty/AllmightyBot---Java | src/main/java/me/ryandowling/allmightybot/utils/TwitchAPI.java | [
"public class AllmightyBot {\n public final static Gson GSON = new GsonBuilder().setPrettyPrinting().create();\n private static final Logger logger = LogManager.getLogger(App.class.getName());\n private static final String DATE = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\n private Setting... | import me.ryandowling.allmightybot.AllmightyBot;
import me.ryandowling.allmightybot.data.twitch.api.ChannelPutRequest;
import me.ryandowling.allmightybot.data.twitch.api.StreamResponse;
import me.ryandowling.allmightybot.data.twitch.api.TwitchChannel;
import me.ryandowling.allmightybot.data.twitch.api.TwitchChatPropert... | /*
* Allmighty Bot - https://github.com/RyanTheAllmighty/AllmightyBot
* Copyright (C) 2014 Ryan Dowling
*
* 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, o... | TwitchChatProperties response = AllmightyBot.GSON.fromJson(request.get(), TwitchChatProperties.class); | 4 |
cymcsg/UltimateRecyclerView | UltimateRecyclerView/app/src/main/java/com/marshalchen/ultimaterecyclerview/demo/loadmoredemo/BasicFunctions.java | [
"public abstract class DragDropTouchListener implements RecyclerView.OnItemTouchListener {\n private static final String LOG_TAG = \"DRAG-DROP\";\n private static final int MOVE_DURATION = 150;\n\n private RecyclerView recyclerView;\n private Activity activity;\n private Drawable dragHighlight;\n ... | import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
impo... | package com.marshalchen.ultimaterecyclerview.demo.loadmoredemo;
/**
* Created by hesk on 19/2/16.
*/
public abstract class BasicFunctions extends AppCompatActivity {
protected UltimateRecyclerView ultimateRecyclerView;
protected void enableParallaxHeader() {
ultimateRecyclerView.setParallaxHeade... | ItemTouchListenerAdapter itemTouchListenerAdapter = new ItemTouchListenerAdapter(ultimateRecyclerView.mRecyclerView, | 1 |
jpush/jmessage-api-java-client | src/main/java/cn/jmessage/api/user/UserClient.java | [
"public class FriendNote implements IModel {\n\n private static final String NOTE_NAME = \"note_name\";\n private static final String OTHERS = \"others\";\n private static final String USERNAME = \"username\";\n\n private String note_name;\n private String others;\n private String username;\n p... | import cn.jiguang.common.connection.*;
import cn.jmessage.api.common.model.*;
import cn.jmessage.api.common.model.friend.FriendNote;
import cn.jmessage.api.common.model.friend.FriendNotePayload;
import cn.jmessage.api.common.model.group.GroupShieldPayload;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import... | package cn.jmessage.api.user;
public class UserClient extends BaseClient {
private static final Logger LOG = LoggerFactory.getLogger(UserClient.class);
private String userPath;
private String adminPath;
/**
* Create a User Client with default parameters.
*
* @param appkey Th... | this(appkey, masterSecret, null, JMessageConfig.getInstance()); | 4 |
aaronjwood/PortAuthority | app/src/main/java/com/aaronjwood/portauthority/activity/HostActivity.java | [
"public class Database extends SQLiteOpenHelper {\n\n public static final String DATABASE_NAME = \"PortAuthority\";\n private static final int DATABASE_VERSION = 2;\n private static final String OUI_TABLE = \"ouis\";\n private static final String PORT_TABLE = \"ports\";\n private static final String ... | import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.util.SparseArray;
import android.view.View;
import android.view.ani... | package com.aaronjwood.portauthority.activity;
public abstract class HostActivity extends AppCompatActivity implements HostAsyncResponse {
protected int layout;
protected ArrayAdapter<String> adapter;
protected ListView portList;
protected final List<String> ports = Collections.synchronizedList(ne... | Host.scanPorts(ip, startPort, stopPort, timeout, activity); | 2 |
wwfdoink/jolokia-web | src/main/java/prj/jolokiaweb/task/DashboardUpdate.java | [
"public class AgentInfo {\n public enum JolokiaPermission {\n NONE,READ,WRITE,EXECUTE\n }\n\n private String url;\n private boolean isLocalAgent = false;\n private boolean requireAuth = false;\n private String agentUsername;\n private String agentPassword;\n\n private String webUserna... | import org.jolokia.client.exception.J4pException;
import org.jolokia.client.request.J4pReadRequest;
import org.jolokia.client.request.J4pReadResponse;
import org.jolokia.client.request.J4pRequest;
import org.jolokia.client.request.J4pResponse;
import org.json.simple.JSONObject;
import org.springframework.beans.factory.... | package prj.jolokiaweb.task;
@Component
public class DashboardUpdate {
@Autowired
private WsHandler ws;
@Scheduled(fixedDelay=1000)
public void dashboardUpdateTick(){
if (ws.getClientNum() < 1) {
return;
}
// tick all clients and check who need to be updated
... | List<Message> dashboardMessageList = getDashboardUpdateMessages(); | 5 |
flexgp/flexgp | mrgp-flexgp/src/evogpj/operator/SubtreeMutate.java | [
"public class Tree extends Genotype {\n private static final long serialVersionUID = -3871767863867101731L;\n\n // A TreeNode with the root of the Tree as its only child (effectively a\n // pointer to the root of the tree). This level of indirection allows the\n // entire tree to change (meaning we can ... | import evogpj.genotype.Tree;
import evogpj.genotype.TreeGenerator;
import evogpj.genotype.TreeNode;
import evogpj.gp.GPException;
import evogpj.gp.Individual;
import evogpj.gp.MersenneTwisterFast;
import java.util.ArrayList;
import java.util.Properties;
import evogpj.algorithm.Parameters; | /**
* Copyright (c) 2011-2013 Evolutionary Design and Optimization Group
*
* Licensed under the MIT License.
*
* See the "LICENSE" file for a copy of the license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHAN... | if (props.containsKey(Parameters.Names.TREE_MUTATE_MAX_DEPTH)) | 6 |
minio/minio-java | examples/MinioClientWithLdapIdentityProvider.java | [
"public class MinioClient extends S3Base {\n private MinioClient(\n HttpUrl baseUrl,\n String region,\n boolean isAwsHost,\n boolean isAcceleratedHost,\n boolean isDualStackHost,\n boolean useVirtualStyle,\n Provider provider,\n OkHttpClient httpClient) {\n super(\n ... | import io.minio.MinioClient;
import io.minio.StatObjectArgs;
import io.minio.StatObjectResponse;
import io.minio.credentials.LdapIdentityProvider;
import io.minio.credentials.Provider; | /*
* MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
... | StatObjectResponse stat = | 2 |
hoijui/JavaOSC | modules/core/src/test/java/com/illposed/osc/DebugClient.java | [
"public class OSCBundle implements OSCPacket {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate OSCTimeTag64 timestamp;\n\tprivate List<OSCPacket> packets;\n\n\t/**\n\t * Create a new empty OSCBundle with a timestamp of immediately.\n\t * You can add packets to the bundle with addPacket()\n\t */\n... | import com.illposed.osc.OSCBundle;
import com.illposed.osc.OSCMessage;
import com.illposed.osc.OSCPacket;
import com.illposed.osc.argument.OSCTimeTag64;
import com.illposed.osc.transport.NetworkProtocol;
import com.illposed.osc.transport.OSCPortOut;
import com.illposed.osc.transport.OSCPortOutBuilder;
import java.net.I... | // SPDX-FileCopyrightText: 2021 Robin Vobruba <hoijui.quaero@gmail.com>
//
// SPDX-License-Identifier: BSD-3-Clause
package com.illposed.osc;
// To run from the command line:
//
// cd modules/core
//
// mvn test-compile exec:java \
// -Dexec.mainClass=com.illposed.osc.DebugClient \
// -Dexec.classpathScope=test \... | List<OSCPacket> packets = new ArrayList<OSCPacket>(); | 2 |
jeasonlzy/okhttp-OkGo | okgo/src/main/java/com/lzy/okgo/adapter/CacheCall.java | [
"public class DefaultCachePolicy<T> extends BaseCachePolicy<T> {\n\n public DefaultCachePolicy(Request<T, ? extends Request> request) {\n super(request);\n }\n\n @Override\n public void onSuccess(final Response<T> success) {\n runOnUiThread(new Runnable() {\n @Override\n ... | import com.lzy.okgo.cache.CacheEntity;
import com.lzy.okgo.cache.policy.CachePolicy;
import com.lzy.okgo.cache.policy.DefaultCachePolicy;
import com.lzy.okgo.cache.policy.FirstCacheRequestPolicy;
import com.lzy.okgo.cache.policy.NoCachePolicy;
import com.lzy.okgo.cache.policy.NoneCacheRequestPolicy;
import com.lzy.okgo... | /*
* Copyright 2016 jeasonlzy(廖子尧)
*
* 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... | policy = new DefaultCachePolicy<>(request); | 0 |
EBISPOT/webulous | populous-oppl/src/main/java/uk/ac/ebi/spot/webulous/entity/UrigenEntityFactory.java | [
"public class PreferenceBean {\n\n private int preferenceId =-1;\n private String ontologyName;\n private AutoIDGenerator autoIDGenerator;\n private String ontologyUri;\n private String ontologyPhysicalUri;\n private String baseUri;\n private String separator;\n private String prefix;\n ... | import org.semanticweb.owlapi.model.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import uk.ac.ebi.spot.webulous.entity.urigen.PreferenceBean;
import uk.ac.ebi.spot.webulous.entity.urigen.UrigenEntityBean;
... | package uk.ac.ebi.spot.webulous.entity;
/**
* @author Simon Jupp
* @date 31/03/2015
* Samples, Phenotypes and Ontologies Team, EMBL-EBI
*/
public class UrigenEntityFactory extends CustomOWLEntityFactory
{
private Logger logger = LoggerFactory.getLogger(getClass());
private String urigenServer;
priv... | private PreferenceBean preferenceBean; | 0 |
JoostvDoorn/GlutenVrijApp | app/src/main/java/com/joostvdoorn/glutenvrij/scanner/core/oned/Code39Reader.java | [
"public final class BarcodeFormat {\n\n // No, we can't use an enum here. J2ME doesn't support it.\n\n private static final Hashtable VALUES = new Hashtable();\n\n /** Aztec 2D barcode format. */\n public static final BarcodeFormat AZTEC = new BarcodeFormat(\"AZTEC\");\n\n /** CODABAR 1D format. */\n public s... | import com.joostvdoorn.glutenvrij.scanner.core.BarcodeFormat;
import com.joostvdoorn.glutenvrij.scanner.core.ChecksumException;
import com.joostvdoorn.glutenvrij.scanner.core.FormatException;
import com.joostvdoorn.glutenvrij.scanner.core.NotFoundException;
import com.joostvdoorn.glutenvrij.scanner.core.Result;
import ... | /*
* Copyright 2008 ZXing 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 agreed ... | BarcodeFormat.CODE_39); | 0 |
PeterCxy/BlackLight | src/us/shandian/blacklight/ui/directmessage/DirectMessageUserFragment.java | [
"public class DirectMessagesUserApiCache\n{\n\tpublic DirectMessageUserListModel mUsers = new DirectMessageUserListModel();\n\tprivate DataBaseHelper mHelper;\n\t\n\tpublic DirectMessagesUserApiCache(Context context) {\n\t\tmHelper = DataBaseHelper.instance(context);\n\t}\n\t\n\tpublic void loadFromCache() {\n\t\tC... | import us.shandian.blacklight.R;
import us.shandian.blacklight.cache.directmessages.DirectMessagesUserApiCache;
import us.shandian.blacklight.ui.common.SwipeUpAndDownRefreshLayout;
import us.shandian.blacklight.support.AsyncTask;
import us.shandian.blacklight.support.Settings;
import us.shandian.blacklight.support.Util... | /*
* Copyright (C) 2014 Peter Cai
*
* This file is part of BlackLight
*
* BlackLight 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 ve... | private class Refresher extends AsyncTask<Boolean, Void, Boolean> { | 2 |
BFergerson/Chronetic | src/test/java/io/chronetic/evolution/pool/ChronotypeTest.java | [
"public class ChronoSeries {\n\n private final static Logger logger = LoggerFactory.getLogger(ChronoSeries.class);\n\n private final Cache<ChronoRange, Integer> cachePatternCount = CacheBuilder.newBuilder()\n .expireAfterAccess(5, TimeUnit.MINUTES)\n .build();\n private final Cache<In... | import static org.junit.Assert.*;
import io.chronetic.data.ChronoSeries;
import io.chronetic.data.measure.ChronoScaleUnit;
import io.chronetic.evolution.pool.allele.ChronoAllele;
import io.chronetic.evolution.pool.allele.ChronoFrequency;
import io.chronetic.evolution.pool.allele.ChronoPattern;
import org.jenetics.util.... | package io.chronetic.evolution.pool;
public class ChronotypeTest {
@Test
public void invalidChronotype1() {
ChronoSeries chronoSeries = testChronoSeries();
ISeq<ChronoAllele> alleleSeq = ISeq.of(
new ChronoFrequency(ChronoUnit.SECONDS, 0, 1, 1, Instant.now()), | new ChronoPattern(ChronoScaleUnit.asFactual(chronoSeries, ChronoUnit.SECONDS), 0, 49), | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.