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
ldbc-dev/ldbc_snb_datagen_deprecated2015
src/main/java/ldbc/socialnet/dbgen/serializer/CSVSerializer/PostResolver.java
[ "public class BrowserDictionary {\n\t\n private static final String SEPARATOR = \" \";\n \n Vector<String> vBrowser;\n\tVector<Double> \tvBrowserCummulative; \n\n\tString fileName;\n\t\n\tdouble probAnotherBrowser;\n\t/**\n\t * Creator.\n\t * \n\t * @param fileName: The file which contains the brows...
import ldbc.socialnet.dbgen.dictionary.BrowserDictionary; import ldbc.socialnet.dbgen.dictionary.IPAddressDictionary; import ldbc.socialnet.dbgen.dictionary.LanguageDictionary; import ldbc.socialnet.dbgen.generator.DateGenerator; import ldbc.socialnet.dbgen.objects.Post; import ldbc.socialnet.dbgen.vocabulary.SN; impor...
package ldbc.socialnet.dbgen.serializer.CSVSerializer; /** * Created by aprat on 4/14/14. */ public class PostResolver implements EntityFieldResolver<Post> { private IPAddressDictionary ipDic; private LanguageDictionary languageDic;
private BrowserDictionary browserDic;
0
guillaume-alvarez/ShapeOfThingsThatWere
core/src/com/galvarez/ttw/rendering/DestinationRenderSystem.java
[ "public final class Destination extends Component {\n\n public final Set<Terrain> forbiddenTiles;\n\n public MapPosition target;\n\n public List<MapPosition> path;\n \n public final int turnsToMove;\n\n /** Turns spent moving to next tile. */\n public int progress;\n\n public Destination(Set<Terrain> forbid...
import com.artemis.Aspect; import com.artemis.ComponentMapper; import com.artemis.Entity; import com.artemis.EntitySystem; import com.artemis.annotations.Wire; import com.artemis.utils.ImmutableBag; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.OrthographicCamera;...
package com.galvarez.ttw.rendering; @Wire public final class DestinationRenderSystem extends EntitySystem { private ComponentMapper<Empire> empires;
private ComponentMapper<Destination> destinations;
0
gantonious/ViewCellAdapter
sample-app/src/main/java/ca/antonious/sample/ComplexDecoratorCompositionSample.java
[ "public class SampleModel {\n private String name;\n\n public SampleModel(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n}", "public class EmptyViewCell extends GenericViewCell<EmptyViewCell.ViewHolder, String> {\n\n public EmptyViewCell(St...
import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.support.v7.widget.LinearLayoutManager; import android.view.Menu; import android.view.MenuItem; import java.util.Arrays; import java.util.Locale; import ca.antonious.sample.models.SampleModel; import ca.antonious.sample.viewcells.E...
package ca.antonious.sample; /** * Created by George on 2017-01-08. */ public class ComplexDecoratorCompositionSample extends BaseActivity { private ViewCellAdapter viewCellAdapter;
private HomogeneousSection<SampleModel, SampleModelViewCell> section1;
6
tony-Shx/Swface
app/src/main/java/com/henu/swface/activity/SignInActivity.java
[ "public class DatabaseAdapter {\n\tprivate static final String TAG = \"DatabaseAdapter\";\n\tprivate static final String Sql_findUserByFaceToken = \"SELECT * FROM UserHasSigned WHERE face_token1 = ? OR face_token2 = ? OR face_token3 = ? OR face_token4 = ? OR face_token5 = ?;\";\n\tprivate Context context;\n\tprivat...
import android.annotation.SuppressLint; import android.content.DialogInterface; import android.graphics.Bitmap; import android.graphics.ImageFormat; import android.graphics.Matrix; import android.graphics.Rect; import android.graphics.YuvImage; import android.hardware.Camera; import android.hardware.Camera.CameraInfo; ...
package com.henu.swface.activity; /** * 离线视频流检测 */ public class SignInActivity extends BaseVideoActivity { private final static String TAG = SignInActivity.class.getSimpleName(); private AlertDialog dialog = null; private Button button_take_photos; private ImageView testImageView; @Override protected v...
final UserHasSigned userHasSigned = db.findUserByFaceToken(faceSignIn, myhandler);
6
situx/SemanticDictionary
src/main/java/com/github/situx/cunei/dict/semdicthandler/ConceptMatcher.java
[ "public abstract class LangChar implements Comparable<LangChar>{\n /**The character as String.*/\n protected String character;\n /**The length of the character as Integer.*/\n protected Integer charlength;\n /**Left and right accessor variety.*/\n protected Double leftaccessorvariety,rightaccessor...
import com.github.situx.cunei.akkad.dict.chars.LangChar; import com.github.situx.cunei.akkad.dict.chars.cuneiform.CuneiChar; import com.github.situx.cunei.akkad.dict.corpusimport.util.DictToLemon; import com.github.situx.cunei.akkad.dict.importhandler.cuneiform.ImportHandler; import com.github.situx.cunei.akkad.dict.ut...
package com.github.situx.cunei.akkad.dict.semdicthandler; /** * Created by timo on 24.05.16. * Class to match possible concepts in nouns in recognized words of a given text. * LOD Cloud */ public class ConceptMatcher { private static final String ENDPOINT=""; private static ConceptMatcher instance; ...
public static void createCharacterMapsJS(CharTypes chartype, Map<String,CuneiChar> dict, Map<String,CuneiChar> charmap) throws IOException {
4
Neutrinet/ISP-ng
src/main/java/be/neutrinet/ispng/vpn/api/RestletServlet.java
[ "public class SessionManager {\n private static SessionManager instance = new SessionManager();\n\n public static SessionToken createSessionToken(User user, String address) {\n return new SessionToken(user.id, address);\n }\n\n public static boolean validateToken(String token, String address) {\n...
import be.neutrinet.ispng.security.SessionManager; import be.neutrinet.ispng.security.SessionToken; import be.neutrinet.ispng.security.SessionTokens; import be.neutrinet.ispng.vpn.User; import be.neutrinet.ispng.vpn.Users; import be.neutrinet.ispng.vpn.admin.Registration; import be.neutrinet.ispng.vpn.admin.Registratio...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package be.neutrinet.ispng.vpn.api; /** * @author wannes */ public class RestletServlet extends HttpServlet { private Servlet...
Registration reg = Registrations.dao.queryForEq("id", id).get(0);
6
caseydavenport/biermacht
src/com/biermacht/brews/frontend/IngredientActivities/AddMiscActivity.java
[ "public class IngredientSpinnerAdapter extends ArrayAdapter<Ingredient> {\n\n // Fields\n private Context context;\n private List<Ingredient> list;\n private String title;\n private boolean isListAdapter;\n\n // Constructor\n public IngredientSpinnerAdapter(Context context, List<Ingredient> list, String titl...
import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.Spinner; import com.biermacht.brews.R; imp...
package com.biermacht.brews.frontend.IngredientActivities; public class AddMiscActivity extends AddEditIngredientActivity { // Holds the currently selected misc, and misc being edited public Misc misc; // Editable rows to display public Spinner typeSpinner; public Spinner useSpinner; public Spinner un...
ingredientList = new ArrayList<Ingredient>();
2
apache/commons-fileupload
src/main/java/org/apache/commons/fileupload2/disk/DiskFileItem.java
[ "public interface FileItem extends FileItemHeadersSupport {\n\n // ------------------------------- Methods from javax.activation.DataSource\n\n /**\n * Returns an {@link java.io.InputStream InputStream} that can be\n * used to retrieve the contents of the file.\n *\n * @return An {@link java.i...
import static java.lang.String.format; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.UncheckedIOException; import java.io.UnsupportedEncodingException; import java.nio.file.Files; import java.util.Ma...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
throw new FileUploadException(
2
opticod/Opti-Movies
app/src/main/java/work/technie/popularmovies/asyntask/FetchSeasonDetail.java
[ "public static final class TVEpisode implements BaseColumns {\n\n public static final String TABLE_NAME = \"tv_episode\";\n\n public static final String SEASON_ID = \"season_id\";\n public static final String AIR_DATE = \"air_date\";\n public static final String EPISODE_NUMBER = \"episode_number\";\n ...
import android.content.ContentValues; import android.content.Context; import android.net.Uri; import android.os.AsyncTask; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStre...
/* * Copyright (C) 2017 Anupam Das * * 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...
String name = guest.getString(TVEpisodeGuestStar.NAME);
2
GoogleCloudPlatform/point-of-sale
point-of-sale-app/api-server/src/main/java/com/google/abmedge/apiserver/ApiServerController.java
[ "public class PayRequest {\n\n private List<PurchaseItem> items;\n private PaymentType type;\n private Number paidAmount;\n\n public List<PurchaseItem> getItems() {\n return items;\n }\n\n public void setItems(List<PurchaseItem> items) {\n this.items = items;\n }\n\n public PaymentType getType() {\n ...
import com.google.abmedge.apiserver.dto.PayRequest; import com.google.abmedge.dto.Item; import com.google.abmedge.dto.Payment; import com.google.abmedge.dto.PaymentType; import com.google.abmedge.dto.PaymentUnit; import com.google.abmedge.dto.PurchaseItem; import com.google.gson.Gson; import com.google.gson.reflect.Typ...
// Copyright 2021 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 in ...
public ResponseEntity<String> pay(@RequestBody PayRequest payRequest) {
0
magnifikus/modPLC
src/minecraft/de/squig/plc/logic/objects/LogicCounter.java
[ "public abstract class Circuit implements Serializable, ITickNotified {\n\tprotected List<CircuitObject> objects;\n\n\tprotected CircuitMap map;\n\n\tprotected TileController controller;\n\tprotected CircuitSimulator simulator;\n\n\tprotected List<CircuitElement> simulationList = null;\n\tprotected List<Object> com...
import java.util.ArrayList; import java.util.List; import de.squig.plc.logic.Circuit; import de.squig.plc.logic.Signal; import de.squig.plc.logic.elements.functions.ElementFunction; import de.squig.plc.logic.helper.LogHelper; import de.squig.plc.logic.objects.guiFunctions.GuiFunction; import de.squig.plc.logic.objects....
package de.squig.plc.logic.objects; public class LogicCounter extends CircuitObject implements ICircuitObjectInputPinListener { public static List<Class> dataTypes = new ArrayList<Class>() { { add(Short.class); // value add(Short.class); // low add(Short.class); // mid add(Short.class); // high a...
add(new GuiFunctionIntValue((short) dataMap.LOW.ordinal(),
6
lukaspili/Volley-Ball
samples/src/main/java/com/siu/android/volleyball/samples/activity/scenarios/Scenario5Activity.java
[ "@SuppressWarnings(\"rawtypes\")\npublic class BallRequestQueue { //extends RequestQueue {\n\n /**\n * Used for generating monotonically-increasing sequence numbers for requests.\n */\n private AtomicInteger mSequenceGenerator = new AtomicInteger();\n\n /**\n * Staging area for requests that al...
import com.siu.android.volleyball.BallRequestQueue; import com.siu.android.volleyball.samples.volley.fake.FakeCache; import com.siu.android.volleyball.samples.volley.fake.FakeNetwork; import com.siu.android.volleyball.samples.volley.request.ScenarioRequest; import com.siu.android.volleyball.toolbox.VolleyBall; import c...
package com.siu.android.volleyball.samples.activity.scenarios; /** * Scenario 5 * <p/> * 1. Start the request * 2. Local thread returns valid response -> post an intermediate response * 3. Cache thread misses * 4. Network thread returns error response -> post an error response * 5. End */ public class Scenari...
.network(new FakeNetwork(false, false, 0))
2
Simperium/simperium-android
Simperium/src/support/java/com/simperium/util/RemoteChangesUtil.java
[ "public class Change {\n\n public static final String TAG=\"Simperium.Change\";\n\n public interface OnRetryListener {\n public void onRetry(Change change);\n }\n\n public interface OnAcknowledgedListener {\n public void onAcknowledged(Change change);\n }\n\n public interface OnCompl...
import com.simperium.client.Change; import com.simperium.client.Channel; import com.simperium.client.RemoteChange; import com.simperium.client.Syncable; import com.simperium.util.JSONDiff; import com.simperium.util.Uuid; import org.json.JSONArray; import org.json.JSONObject; import org.json.JSONException;
package com.simperium.util; public class RemoteChangesUtil { public static JSONObject operation(String id, String client, String cv, String ccid) throws JSONException { JSONObject change = new JSONObject(); change.put(RemoteChange.CHANGE_IDS_KEY, new JSONArray("[\"" + ccid + "\"]")); ...
String id = change.getString(Change.ID_KEY);
0
Aurilux/Cybernetica
src/main/java/com/vivalux/cyb/block/BlockIntegrationTable.java
[ "@Mod(modid = CYBModInfo.MOD_ID,\n name = CYBModInfo.MOD_NAME,\n guiFactory = CYBModInfo.GUI_FACTORY,\n version = CYBModInfo.MOD_VERSION)\npublic class Cybernetica {\n\t@Instance(CYBModInfo.MOD_ID)\n\tpublic static Cybernetica instance;\n\n\t@SidedProxy(clientSide = CYBModInfo.CLIENT_PROXY, serverSide = CY...
import com.vivalux.cyb.Cybernetica; import com.vivalux.cyb.handler.GuiHandler; import com.vivalux.cyb.init.CYBBlocks; import com.vivalux.cyb.tileentity.TileEntityIntegrationTable; import com.vivalux.cyb.util.MiscUtils; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.bl...
package com.vivalux.cyb.block; /** * This is the block for the (eventually) bed-like table where the player can change, upgrade, or add implants */ public class BlockIntegrationTable extends Block implements ITileEntityProvider { //extends BlockContainer TODO instead? @SideOnly(Side.CLIENT) public IIcon top...
player.openGui(Cybernetica.instance, GuiHandler.GUI_ID_INTEG, world, x, y, z);
0
NudgeApm/nudge-elasticstack-connector
src/main/java/org/nudge/elasticstack/service/impl/NudgeAPIServiceImpl.java
[ "public class NudgeApiConnection {\n\n\tprivate static final Logger LOG = Logger.getLogger(NudgeApiConnection.class);\n\tprivate final String url;\n\tprivate final String apiKeyParam;\n\tprivate Configuration config = Configuration.getInstance();\n\n\tpublic NudgeApiConnection(String url, String apiKey) {\n\t\tthis...
import org.apache.commons.lang.StringUtils; import org.nudge.elasticstack.connection.NudgeApiConnection; import org.nudge.elasticstack.context.nudge.api.bean.App; import org.nudge.elasticstack.context.nudge.api.bean.Service; import org.nudge.elasticstack.exception.NudgeApiException; import org.nudge.elasticstack.servic...
package org.nudge.elasticstack.service.impl; /** * Created by fred on 13/07/17. */ public class NudgeAPIServiceImpl implements NudgeAPIService { NudgeApiConnection apiConnection; public NudgeAPIServiceImpl(NudgeApiConnection apiConnection) { this.apiConnection = apiConnection; } @Overrid...
public String retrieveAppName(String appId) throws NudgeApiException {
3
caarmen/scrumchatter
app/src/main/java/ca/rmen/android/scrumchatter/meeting/detail/MeetingFragment.java
[ "public class MeetingChartActivity extends AppCompatActivity {\n\n public static void start(Context context, long meetingId) {\n Intent intent = new Intent(context, MeetingChartActivity.class);\n intent.putExtra(Meetings.EXTRA_MEETING_ID, meetingId);\n context.startActivity(intent);\n }\n...
import android.app.Activity; import android.content.Context; import android.database.ContentObserver; import android.database.Cursor; import android.databinding.DataBindingUtil; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.SystemClock; import android.support.annotation....
/* * Copyright 2013-2017 Carmen Alvarez * * This file is part of Scrum Chatter. * * Scrum Chatter 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) ...
if (shareItem != null) shareItem.setVisible(mMeeting != null && mMeeting.getState() == State.FINISHED);
6
gustavkarlsson/rocketchat-jira-trigger
src/main/java/se/gustavkarlsson/rocketchat/jira_trigger/App.java
[ "public class ConfigurationModule extends AbstractModule {\n\tprivate static final String DEFAULTS_FILE_NAME = \"defaults.toml\";\n\n\tprivate final File configFile;\n\n\tpublic ConfigurationModule(String... args) {\n\t\tif (args.length > 0) {\n\t\t\tconfigFile = new File(args[0]);\n\t\t} else {\n\t\t\tconfigFile =...
import com.google.inject.Guice; import com.google.inject.Injector; import org.slf4j.Logger; import se.gustavkarlsson.rocketchat.jira_trigger.configuration.ConfigurationModule; import se.gustavkarlsson.rocketchat.jira_trigger.jira.JiraModule; import se.gustavkarlsson.rocketchat.jira_trigger.messages.MessageModule; impor...
package se.gustavkarlsson.rocketchat.jira_trigger; public class App { private static final Logger log = getLogger(App.class); private final Server server; public static void main(String... args) { try { new App(args).server.start(); } catch (Exception e) { log.error("Fatal error", e); System.exit(1...
new MessageModule(),
2
teivah/TIBreview
src/main/java/com/tibco/exchange/tibreview/processor/processrule/IfProcessor.java
[ "public class TIBProcess {\n\tprivate String filePath;\n\tprivate String fullProcessName;\n\tprivate String processName;\n\tprivate String packageName;\n\tprivate List<PartnerLinkModel> partners;\n\tprivate static final String PROCESSES_PACKAGE = \"Processes\";\n\tprivate static final String PROCESS_EXTENSION = \"....
import java.util.List; import com.tibco.exchange.tibreview.common.TIBProcess; import com.tibco.exchange.tibreview.engine.Context; import com.tibco.exchange.tibreview.exception.ProcessorException; import com.tibco.exchange.tibreview.model.pmd.Violation; import com.tibco.exchange.tibreview.model.rules.If; import com.tibc...
package com.tibco.exchange.tibreview.processor.processrule; public final class IfProcessor implements PRProcessable, PRConditionProcessable { @Override
public List<Violation> process(Context context, TIBProcess process, Rule rule, Object impl) throws ProcessorException {
2
yassirh/digitalocean-swimmer
DigitalOceanSwimmer/src/main/java/com/yassirh/digitalocean/service/FloatingIPService.java
[ "public class DatabaseHelper extends SQLiteOpenHelper {\n\n\tprivate static final int DATABASE_VERSION = 17;\n\tprivate static final String DATABASE_NAME = \"digital_ocean\";\n\t\n\tprivate TableHelper imageTable = new ImageTable();\n\tprivate TableHelper regionTable = new RegionTable();\n\tprivate TableHelper size...
import android.content.Context; import android.content.SharedPreferences; import android.util.Log; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.AsyncHttpResponseHandler; import com.loopj.android.http.SyncHttpClient; import com.yassirh.digitalocean.data.DatabaseHelper; import com.yassirh....
package com.yassirh.digitalocean.service; public class FloatingIPService { private Context context; private boolean isRefreshing; private boolean refreshing; public FloatingIPService(Context context) { this.context = context; } public FloatingIP findById(long id) { Float...
Account currentAccount = ApiHelper.getCurrentAccount(context);
1
FTC7393/EVLib
sample/v3/SampleStateMachineBuilder.java
[ "public class TwoMotors extends NMotors {\n public TwoMotors(Motor leftMotor, Motor rightMotor, boolean useSpeedMode, Velocity maxRobotSpeed) {\n super(ImmutableList.of(leftMotor, rightMotor), useSpeedMode, maxRobotSpeed);\n }\n\n public void runMotorsNormalized(double leftValue, double rightValue) ...
import ftc.electronvolts.statemachine.StateMachineBuilder; import ftc.electronvolts.statemachine.StateName; import ftc.electronvolts.util.units.Distance; import ftc.evlib.hardware.motors.TwoMotors; import ftc.evlib.hardware.servos.ServoControl; import ftc.evlib.hardware.servos.ServoName; import ftc.evlib.hardware.servo...
package org.firstinspires.ftc.teamcode.sample.v3; /** * This file was made by the electronVolts, FTC team 7393 * Date Created: 10/18/16 * * A sample extension of the StateMachineBuilder. * This subclass adds convenience methods for autonomous opmodes. */ public class SampleStateMachineBuilder extends StateMach...
ServoControl servoControl = servos.getServoMap().get(servoName);
1
gizwits/Gizwits-WaterHeater_Android
src/zxing/CaptureActivity.java
[ "public final class CameraManager {\n\n private static final String TAG = CameraManager.class.getSimpleName();\n\n private static final int MIN_FRAME_WIDTH = 240;\n private static final int MIN_FRAME_HEIGHT = 240;\n private static final int MAX_FRAME_WIDTH = 480;\n private static final int MAX_FRAME_HEIGHT = 3...
import java.io.IOException; import java.util.Vector; import zxing.camera.CameraManager; import zxing.decoding.CaptureActivityHandler; import zxing.decoding.InactivityTimer; import zxing.view.ViewfinderView; import android.content.Intent; import android.graphics.Bitmap; import android.media.AudioManager; import android....
package zxing; public class CaptureActivity extends BaseActivity implements Callback { private CaptureActivityHandler handler; private ViewfinderView viewfinderView; private boolean hasSurface; private Vector<BarcodeFormat> decodeFormats; private String characterSet; private InactivityTimer inactivityTimer; ...
CameraManager.init(getApplication());
0
renatoathaydes/LogFX
src/main/java/com/athaydes/logfx/ui/LogViewPane.java
[ "public interface Cancellable {\n\n /**\n * Cancel the task.\n */\n void cancel();\n\n}", "public class TaskRunner {\n\n private static final Logger log = LoggerFactory.getLogger( TaskRunner.class );\n\n private static final TaskRunner globalInstance = new TaskRunner( true ) {\n @Overri...
import com.athaydes.logfx.concurrency.Cancellable; import com.athaydes.logfx.concurrency.TaskRunner; import com.athaydes.logfx.config.HighlightGroups; import com.athaydes.logfx.data.LogFile; import javafx.application.Platform; import javafx.beans.InvalidationListener; import javafx.beans.property.BooleanProperty; impor...
package com.athaydes.logfx.ui; /** * A container of {@link LogView}s. */ public final class LogViewPane { private static final Logger log = LoggerFactory.getLogger( LogViewPane.class ); private final TaskRunner taskRunner; private final HighlightGroups highlightGroups; private final SplitPane p...
private final AtomicReference<Cancellable> previousDividerSettingTask = new AtomicReference<>();
0
saltedge/saltedge-android
saltedge-library/src/main/java/com/saltedge/sdk/network/SERefreshService.java
[ "public class ConnectionInteractiveCredentialsConnector extends BasePinnedConnector implements Callback<ConnectionResponse> {\n\n private FetchConnectionResult callback;\n private Call<ConnectionResponse> call;\n\n public ConnectionInteractiveCredentialsConnector(FetchConnectionResult callback) {\n ...
import java.util.List; import java.util.Map; import java.util.Timer; import java.util.TimerTask; import com.saltedge.sdk.connector.ConnectionInteractiveCredentialsConnector; import com.saltedge.sdk.connector.ConnectionRefreshConnector; import com.saltedge.sdk.connector.ConnectionsConnector; import com.saltedge.sdk.inte...
@Override public void onFailure(String errorMessage) { if (callback != null) callback.onConnectionStateFetchError(errorMessage); } }; /** * Start refresh connectionData process * * @param customerSecret - current customer secret * @param connectionData -...
private void askInteractiveData(SEStage lastStage) {
7
davidmoten/rxjava2-extras
src/test/java/com/github/davidmoten/rx2/internal/flowable/FlowableCollectWhileTest.java
[ "public final class BiFunctions {\n\n private BiFunctions() {\n // prevent instantiation\n }\n\n @SuppressWarnings(\"unchecked\")\n public static <A, B, C> BiFunction<A, B, C> throwing() {\n return (BiFunction<A, B, C>) ThrowingHolder.INSTANCE;\n }\n\n private static final class Thro...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import org.junit.Test; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; imp...
package com.github.davidmoten.rx2.internal.flowable; public final class FlowableCollectWhileTest { private static final BiPredicate<List<Integer>, Integer> BUFFER_TWO = new BiPredicate<List<Integer>, Integer>() { @Override public boolean test(List<Integer> list, Integer t) throws Exception {...
.compose(Transformers. //
6
cthiemann/SPaTo_Visual_Explorer
src/net/spato/sve/prelude/UpdateInstaller.java
[ "public class StdXMLBuilder {\n /**\n * This stack contains the current element and its parents.\n */\n private Stack<XMLElement> stack;\n\n\n /**\n * The root element of the parsed XML tree.\n */\n private XMLElement root;\n\n private XMLElement parent;\n\n /**\n * Creates the builder.\n...
import processing.xml.XMLValidator; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.util.Date; import processing.core.PApplet; import processing.xml.StdXMLBuilder; import processing.xml.StdXMLParser; import processing.xml.StdXMLReader; import processing.xml.XMLElement;
/* * Copyright 2011 Christian Thiemann <christian@spato.net> * Developed at Northwestern University <http://rocs.northwestern.edu> * * This file is part of the SPaTo Visual Explorer (SPaTo). * * SPaTo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License a...
parser.setBuilder(new StdXMLBuilder()); // from XMLElement.parse()
0
criticalmaps/criticalmaps-android
app/src/main/java/de/stephanlindauer/criticalmaps/fragments/SettingsFragment.java
[ "public class App extends Application {\n\n private static AppComponent appComponent;\n\n public static AppComponent components() {\n return appComponent;\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n\n if (BuildConfig.DEBUG) {\n Timber.plant(new T...
import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.provider.OpenableColumns; import android.text.format.Formatter; import android.view.LayoutInflat...
package de.stephanlindauer.criticalmaps.fragments; public class SettingsFragment extends Fragment { @Inject
StorageLocationProvider storageLocationProvider;
3
pimps/ysoserial-modified
src/main/java/ysoserial/payloads/Jdk7u21.java
[ "public class CmdExecuteHelper {\n\t\n\tprivate String terminalType;\n\t\n\tprivate String[] commandArray;\n\t\n\tprivate String command;\n\n\tpublic CmdExecuteHelper(String terminalType, String command) {\n\t\tsuper();\n\t\tthis.terminalType = terminalType;\n\t\tthis.command = command;\n\t\t\n\t\tswitch (terminalT...
import java.lang.reflect.InvocationHandler; import java.util.HashMap; import java.util.LinkedHashSet; import javax.xml.transform.Templates; import ysoserial.payloads.annotation.Dependencies; import ysoserial.payloads.annotation.PayloadTest; import ysoserial.payloads.util.CmdExecuteHelper; import ysoserial.payloads.util...
package ysoserial.payloads; /* Gadget chain that works against JRE 1.7u21 and earlier. Payload generation has the same JRE version requirements. See: https://gist.github.com/frohoff/24af7913611f8406eaf3 Call tree: LinkedHashSet.readObject() LinkedHashSet.add() ... TemplatesImpl.hashCode() (X) Lin...
InvocationHandler tempHandler = (InvocationHandler) Reflections.getFirstCtor(Gadgets.ANN_INV_HANDLER_CLASS).newInstance(Override.class, map);
4
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/business/DocumentManager.java
[ "public final class ConstComponentCategory {\n\n\tpublic static final String BASIC = \"basic\";\n\tpublic static final String BUTTONS = \"buttons\";\n\tpublic static final String NON_DISPLAY = \"non-display\";\n\tpublic static final String PLAIN = \"plain\";\n\tpublic static final String AUTOFILL = \"autofill\";\n\...
import java.util.List; import org.chiba.xml.xslt.TransformerService; import org.w3c.dom.Document; import com.idega.documentmanager.business.component.ConstComponentCategory; import com.idega.documentmanager.component.beans.LocalizedStringBean; import com.idega.documentmanager.component.datatypes.ComponentType; import c...
package com.idega.documentmanager.business; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.8 $ * * Last modified: $Date: 2008/04/11 01:26:25 $ by $Author: civilis $ */ public interface DocumentManager { public abstract com.idega.documentmanager.business.Document...
public abstract List<ComponentType> getComponentsByDatatype(ConstComponentDatatype category);
2
Condroidapp/android
Condroid/src/main/java/cz/quinix/condroid/ui/listeners/DrawerItemClickListener.java
[ "@Singleton\r\npublic class DataProvider {\r\n\r\n\tpublic static int ITEMS_PER_PAGE = 40;\r\n\r\n\t@Inject\r\n\tprivate CondroidDatabase mDatabase;\r\n\r\n\tprivate Convention con;\r\n\r\n\tprivate List<Integer> favorited;\r\n\r\n\tprivate Map<Integer, ProgramLine> programLines = null;\r\n\r\n\tprivate List<Place>...
import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.net.Uri; import android.view.View; import java.util.List; import java.util.Locale; import cz.quinix.condroid.R; import cz.quinix.condroid.database.DataProvider; import cz.quinix.condro...
package cz.quinix.condroid.ui.listeners; /** * Created by Jan on 1. 6. 2014. */ public class DrawerItemClickListener implements View.OnClickListener { private MainActivity parentActivity; private DataProvider provider; public DrawerItemClickListener(MainActivity parentActivity, DataProvider pr...
Intent in = new Intent(parentActivity, ReminderList.class);
4
caprica/picam
src/main/java/uk/co/caprica/picam/CameraConfiguration.java
[ "public enum AutomaticWhiteBalanceMode {\n\n OFF(0),\n AUTO(1),\n SUNLIGHT(2),\n CLOUDY(3),\n SHADE(4),\n TUNGSTEN(5),\n FLUORESCENT(6),\n INCANDESCENT(7),\n FLASH(8),\n HORIZON(9),\n MAX(0x7fffffff);\n\n private final int value;\n\n AutomaticWhiteBalanceMode(int value) {\n ...
import static uk.co.caprica.picam.enums.Encoding.PNG; import uk.co.caprica.picam.enums.AutomaticWhiteBalanceMode; import uk.co.caprica.picam.enums.DynamicRangeCompressionStrength; import uk.co.caprica.picam.enums.Encoding; import uk.co.caprica.picam.enums.ExposureMeteringMode; import uk.co.caprica.picam.enums.ExposureM...
/* * This file is part of picam. * * picam 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. * * picam is distributed in the hope...
private Mirror mirror;
6
jprante/elasticsearch-knapsack
src/test/java/org/xbib/elasticsearch/plugin/knapsack/tar/KnapsackTarTests.java
[ "public class KnapsackExportRequestBuilder extends ActionRequestBuilder<KnapsackExportRequest, KnapsackExportResponse, KnapsackExportRequestBuilder> {\n\n public KnapsackExportRequestBuilder(ElasticsearchClient client) {\n super(client, KnapsackExportAction.INSTANCE, new KnapsackExportRequest());\n }\n...
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.index.qu...
package org.xbib.elasticsearch.plugin.knapsack.tar; public class KnapsackTarTests extends NodeTestUtils { private final static ESLogger logger = ESLoggerFactory.getLogger(KnapsackTarTests.class.getName()); @Test public void testTar() throws Exception { File exportFile = File.createTempFile("kn...
KnapsackStateRequestBuilder knapsackStateRequestBuilder =
4
IncQueryLabs/smarthome-cep-demonstrator
runtime/com.incquerylabs.smarthome.eventbus.api/src/main/java/com/incquerylabs/smarthome/eventbus/api/IEventSubscriber.java
[ "public class GroupItemStateChangedEvent extends ItemStateChangedEvent {\n\n\tpublic GroupItemStateChangedEvent(Item item, State newState, State oldState) {\n\t\tsuper(item, newState, oldState);\n\t}\n\t\n @Override\n public String toString() {\n return String.format(\"%s group state changed from %s to...
import java.util.Collection; import org.eclipse.smarthome.core.items.Item; import com.incquerylabs.smarthome.eventbus.api.events.GroupItemStateChangedEvent; import com.incquerylabs.smarthome.eventbus.api.events.ItemAddedEvent; import com.incquerylabs.smarthome.eventbus.api.events.ItemCommandEvent; import com.incqueryla...
package com.incquerylabs.smarthome.eventbus.api; public interface IEventSubscriber { public void stateUpdated(ItemStateEvent event);
public void stateChanged(ItemStateChangedEvent event);
4
tliron/scripturian
components/scripturian/source/com/threecrickets/scripturian/parser/LiteralParser.java
[ "public class Executable\n{\n\t//\n\t// Constants\n\t//\n\n\t/**\n\t * Prefix prepended to on-the-fly scriptlets stored in the document source.\n\t */\n\tpublic static final String ON_THE_FLY_PREFIX = \"_ON_THE_FLY_\";\n\n\t//\n\t// Static operations\n\t//\n\n\t/**\n\t * If the executable does not yet exist in the ...
import java.util.Collection; import java.util.Collections; import com.threecrickets.scripturian.Executable; import com.threecrickets.scripturian.ExecutableSegment; import com.threecrickets.scripturian.Parser; import com.threecrickets.scripturian.ParsingContext; import com.threecrickets.scripturian.exception.DocumentExc...
/** * Copyright 2009-2017 Three Crickets LLC. * <p> * The contents of this file are subject to the terms of the LGPL version 3.0: * http://www.gnu.org/copyleft/lesser.html * <p> * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly f...
public Collection<ExecutableSegment> parse( String sourceCode, ParsingContext parsingContext, Executable executable ) throws ParsingException, DocumentException
1
integeruser/jgltut
src/integeruser/jgltut/tut10/FragmentAttenuation.java
[ "public class MousePoles {\n public enum MouseButtons {\n MB_LEFT_BTN,\n MB_RIGHT_BTN,\n MB_MIDDLE_BTN\n }\n\n public enum MouseModifiers {\n MM_KEY_SHIFT,\n MM_KEY_CTRL,\n MM_KEY_ALT\n }\n\n ////////////////////////////////\n public static class ObjectDat...
import integeruser.jglsdk.glutil.MousePoles.*; import integeruser.jgltut.Tutorial; import integeruser.jgltut.commons.ProjectionBlock; import integeruser.jgltut.commons.UnprojectionBlock; import integeruser.jgltut.framework.Framework; import integeruser.jgltut.framework.Mesh; import integeruser.jgltut.framework.MousePol...
package integeruser.jgltut.tut10; /** * Visit https://github.com/integeruser/jgltut for info and updates. * Original: https://bitbucket.org/alfonse/gltut/src/default/Tut%2010%20Plane%20Lights/Fragment%20Attenuation.cpp * <p> * Part III. Illumination * Chapter 10. Plane Lights * <p> * I,J,K,L - control the ...
glBufferData(GL_UNIFORM_BUFFER, ProjectionBlock.BYTES, GL_DYNAMIC_DRAW);
2
tinkerlog/PaintMachine
PrintClient/app/src/main/java/com/tinkerlog/printclient/activity/ControlFragment.java
[ "public class Const {\n\n public static final String PRINTER_SSID = \"PRINTBOT\";\n public static final String PRINTER_SSID_QUOTED = \"\\\"PRINTBOT\\\"\";\n public static final String PRINTER_PASS_QUOTED = \"\\\"password\\\"\";\n\n public static final String KEY_PRINT_ID = \"print_id\";\n\n public st...
import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.TextView; import com.tinkerlog.printclient.Const; import com.tinkerlog.printclient.R; impor...
private int stickHeight; private int controlWidth; private int maxWidth; private int minWidth; private int rangeWidth; private float left; private float right; private float head; private boolean isFire; private boolean isGone; public static ControlFragment newFragment() {...
printer.send(new ImageCommand(img, new ResponseHandler() {
3
TreyRuffy/CommandBlocker
Command Blocker Bukkit/src/main/java/me/treyruffy/commandblocker/bukkit/BukkitMain.java
[ "public class Universal {\n\n\tprivate static Universal instance = null;\n\tprivate MethodInterface mi;\n\t\n\tpublic static Universal get() {\n\t\treturn instance == null ? instance = new Universal() : instance;\n\t}\n\t\n\tpublic void setup(MethodInterface mi) {\n\t\tthis.mi = mi;\n\t\t\n\t\tmi.setupMetrics();\n\...
import me.treyruffy.commandblocker.Universal; import me.treyruffy.commandblocker.bukkit.commands.CommandBlockerCmd; import me.treyruffy.commandblocker.bukkit.commands.CommandBlockerTabComplete; import me.treyruffy.commandblocker.bukkit.config.BukkitUpdateConfig; import me.treyruffy.commandblocker.bukkit.config.ConfigMa...
package me.treyruffy.commandblocker.bukkit; public class BukkitMain extends JavaPlugin { private static BukkitMain instance; public static BukkitMain get() { return instance; } private static BukkitAudiences adventure; public static @NotNull BukkitAudiences adventure() { if (adventure == null) { thro...
Universal.get().setup(new BukkitMethods());
0
mitdbg/AdaptDB
src/main/java/core/common/key/ParsedTupleList.java
[ "public class Globals {\n // Re-partition cost multiplier.\n static public final int c = 4;\n\n // Query window size.\n static public final int window_size = 20;\n static public final int QUERY_WINDOW_SIZE = 10;\n\n\tstatic Map<String, TableInfo> tableInfos = new HashMap<String, TableInfo>();\n\n ...
import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.List; import org.apache.commons.lang.ArrayUtils; import com.google.common.base.Joiner; import com.google.common.collect.Lists; import com.google.common.primitives.Bytes; import core.common.globals.Globals; import core...
public Object[] getCutpoints(int dim, int numParts) { Object[] cutpoints = new Object[numParts + 1]; this.sort(dim); cutpoints[0] = this.getFirst(dim); cutpoints[numParts] = this.getLast(dim); int partLength = this.values.size() / numParts; for (int i = 1; i <= numParts - 1; i++) { cutpoints[i] = this.v...
Comparator<Object> comp = TypeUtils.getComparatorForType(types[attributeIdx]);
2
sweer/hex-image-compress
src/test/pipeline/DecoderTest.java
[ "public static final long NAN = Long.MIN_VALUE;", "public static final double DELTA = 0.00000001;", "public class LongLattice extends Lattice {\n\n public static final int SHIFT = 0;\n public static final long NAN = Long.MIN_VALUE;\n final public double min;\n final public double factor;\n protec...
import static lattice.LongLattice.NAN; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static test.TestUtils.DELTA; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.List; import javax.ima...
package test.pipeline; public class DecoderTest { @Test public final void testDecodeHeader() { //@formatter:off LongLattice template = new LongLattice(new long[][] { { NAN, 2, NAN, NAN }, { NAN, NAN, 7, 0 }, { 4, 7, NAN, 3 }, ...
LongLattice actual = Decoder.decodeToHexagonalLattice(encoded);
4
nkarasch/ChessGDX
core/src/nkarasch/chessgdx/view/renderers/PerspectiveRenderer.java
[ "public class Camera extends PerspectiveCamera {\n\n\tprivate final OrbitCamera mFPCameraController;\n\n\t/**\n\t * Creates 60 degree field of view PerspectiveCamera and instantiates its\n\t * controller.\n\t */\n\tpublic Camera() {\n\t\tsuper(60, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\tthis.mFPCam...
import nkarasch.chessgdx.camera.Camera; import nkarasch.chessgdx.logiccontroller.frontend.BoardController; import nkarasch.chessgdx.logiccontroller.frontend.ChessPieceGraveyard; import nkarasch.chessgdx.perspectiveview.gameobjects.ChessPiece; import nkarasch.chessgdx.perspectiveview.gameobjects.GridSpaceHighlighter; im...
package nkarasch.chessgdx.view.renderers; public class PerspectiveRenderer { private final ModelBatch mShadowBatch; private final ModelBatch mCubeMapBatch; private final ModelBatch mBackgroundBatch; private final Environment mEnvironment; private final Environment mBackgroundEnvironment; private final Array<A...
GridSpaceHighlighter boardGrid = new GridSpaceHighlighter(assetHandler.getOtherModel(AssetHandler.MODEL_GRID), i);
4
scalyr/Scalyr-Java-Client
src/test/com/scalyr/api/tests/UtilTests.java
[ "public class Converter {\n /**\n * Convert any numeric type to Integer. If `parseSI` is set to true, try to parse SI units as well.\n * <p>\n * A null input is returned as-is. Non-numeric inputs trigger an exception. Out-of-range\n * values trigger undefined behavior.\n */\n public static Integer toInt...
import com.scalyr.api.internal.ScalyrUtil; import com.scalyr.api.internal.Tuple; import com.scalyr.api.json.JSONObject; import com.scalyr.api.json.JSONParser; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.io.ByteArrayOutpu...
/* * Scalyr client library * Copyright 2012 Scalyr, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
assertTrue(ScalyrUtil.equals(null, null));
3
michael-rapp/AndroidMaterialValidation
example/src/main/java/de/mrapp/android/validation/example/MainActivity.java
[ "public final class Constraints {\n\n /**\n * Creates a new utility class, which provides factory methods, which allows to create various\n * validators.\n */\n private Constraints() {\n\n }\n\n /**\n * Creates and returns a constraint, which allows to negate the result of an other const...
import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import androidx.appcompat.app.AppCompatActivity; import de.mrapp.android.validation.Constraints; import de.mrapp.android.validation.EditText; import de.mrapp.android.validation.PasswordEditText; i...
/* * Copyright 2015 - 2019 Michael Rapp * * 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...
private PasswordEditText passwordEditText;
2
reapzor/FiloFirmata
src/main/java/com/bortbort/arduino/FiloFirmata/Parser/Builders/DigitalPortBuilder.java
[ "public enum DigitalPinValue {\n LOW (0x00), // Digital Low\n HIGH (0x01); // Digital High\n\n private Byte byteValue;\n private Integer intValue;\n\n DigitalPinValue(int byteValue) {\n this.byteValue = (byte) byteValue;\n intValue = byteValue;\n }\n\n /**\n * Get Byte Va...
import com.bortbort.arduino.FiloFirmata.DigitalPinValue; import com.bortbort.arduino.FiloFirmata.Messages.DigitalPortMessage; import com.bortbort.arduino.FiloFirmata.Messages.Message; import com.bortbort.arduino.FiloFirmata.Parser.CommandBytes; import com.bortbort.arduino.FiloFirmata.Parser.MessageBuilder; import com.b...
package com.bortbort.arduino.FiloFirmata.Parser.Builders; /** * Created by chuck on 1/11/2016. */ public class DigitalPortBuilder extends MessageBuilder { private static final Logger log = LoggerFactory.getLogger(DigitalPortBuilder.class); public DigitalPortBuilder() { super(CommandBytes.DIGITAL_M...
public Message buildMessage(Byte channelByte, InputStream inputStream) {
2
googlearchive/abelana
Android/app/src/main/java/com/examples/abelanav2/ui/PicturesFragment.java
[ "public class AbelanaClient {\n /**\n * The actual OkHttp channel implementation.\n */\n private ChannelImpl mChannelImpl;\n /**\n * The gRPC stub used to make calls to the server.\n */\n private AbelanaGrpc.AbelanaBlockingStub mBlockingStub;\n /**\n * The header client intercepto...
import android.app.AlertDialog; import android.app.WallpaperManager; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v7.widget.CardView; import android.support...
vote = 0; card.findViewById(R.id.imageButtonThumbsDown) .setSelected(false); } else { card.findViewById(R.id.imageButtonThumbsDown) .setSelected(true); } ne...
} catch (AbelanaClientException e) {
1
Archistar/archistar-smc
src/main/java/at/archistar/crypto/ShamirEngine.java
[ "public class ReconstructionResult {\n\n private final byte[] data;\n private final boolean okay;\n private final List<String> errors;\n\n @SuppressFBWarnings(\"EI_EXPOSE_REP2\")\n public ReconstructionResult(byte[] data) {\n this.data = data;\n this.okay = true;\n this.errors = ...
import at.archistar.crypto.data.ReconstructionResult; import at.archistar.crypto.data.Share; import at.archistar.crypto.decode.DecoderFactory; import at.archistar.crypto.decode.ErasureDecoderFactory; import at.archistar.crypto.random.BCDigestRandomSource; import at.archistar.crypto.random.RandomSource; import at.archis...
package at.archistar.crypto; public class ShamirEngine implements CryptoEngine { private final int n; private final int k;
private final ShamirPSS engine;
5
adiyoss/StructED
src/com/structed/tests/dal/LazyReaderTest.java
[ "public class Consts {\n\n // GENERALS\n\tpublic static final String SPACE = \" \";\n public static final String TAB = \"\\t\";\n public static final String COMMA_NOTE = \",\";\n\tpublic static final String CLASSIFICATION_SPLITTER = \"-\";\n\tpublic static final String COLON_SPLITTER = \":\";\n public s...
import com.structed.dal.Reader; import junit.framework.TestCase; import static org.junit.Assert.assertThat; import static org.hamcrest.CoreMatchers.instanceOf; import com.structed.constants.Consts; import com.structed.data.Factory; import com.structed.data.InstancesContainer; import com.structed.data.LazyInstancesConta...
/* * The MIT License (MIT) * * StructED - Machine Learning Package for Structured Prediction * * Copyright (c) 2015 Yossi Adi, E-Mail: yossiadidrum@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), t...
assertThat(instances, instanceOf(LazyInstancesContainer.class));
3
HotBitmapGG/LeisureRead
app/src/main/java/com/hotbitmapgg/leisureread/ui/activity/SectionsDetailsActivity.java
[ "public class AppConstant {\n\n public static final float SCALE_END = 1.13F;\n\n public static final int ANIMATION_DURATION = 2000;\n\n public static final String EXTRA_ID = \"extra_id\";\n\n public static final String EXTRA_NAME = \"extra_name\";\n\n public static final String EXTRA_TYPE = \"extra_type\";\n\n...
import butterknife.Bind; import com.annimon.stream.Stream; import com.hotbitmapgg.leisureread.app.AppConstant; import com.hotbitmapgg.leisureread.mvp.model.entity.SectionsDetailsInfo; import com.hotbitmapgg.leisureread.network.RetrofitHelper; import com.hotbitmapgg.leisureread.rx.Rxutils; import com.hotbitmapgg.leisure...
package com.hotbitmapgg.leisureread.ui.activity; /** * Created by hcc on 2016/12/28 13:35 * 100332338@qq.com * LeisureRead * * @HotBitmapGG 专栏详情界面 */ public class SectionsDetailsActivity extends BaseAppCompatActivity { @Bind(R.id.toolbar) Toolbar mToolbar; @Bind(R.id.swipe_refresh) SwipeRefreshLayout...
RetrofitHelper.getLastZhiHuApi().getSectionsDetails(id)
2
JanWiemer/jacis
src/test/java/org/jacis/index/JacisNonUniqueIndexTest.java
[ "@JacisApi\npublic class JacisContainer {\n\n /** {@link JacisTransactionAdapter} to bind the Jacis Store to externally managed transactions. */\n private final JacisTransactionAdapter txAdapter;\n /** Map assigning the stores (values of type {@link JacisStoreImpl}) to the store identifiers (keys of type {@link ...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import org.jacis.container.JacisContainer; import org.jacis.integration.JacisStoreIntegrationTest; import org.jacis.store.JacisStore; import org.jacis.testhelper.JacisTestHelper; import org.jacis.testhelper.TestObject; import org.ju...
/* * Copyright (c) 2020. Jan Wiemer */ package org.jacis.index; public class JacisNonUniqueIndexTest { private static final Logger log = LoggerFactory.getLogger(JacisStoreIntegrationTest.class); @Test public void testNonUniqueIndexAccessorMethods() { JacisTestHelper testHelper = new JacisTestHelper();
JacisStore<String, TestObject> store = testHelper.createTestStoreWithCloning();
4
DSH105/SparkTrail
src/main/java/com/dsh105/sparktrail/trail/EffectHolder.java
[ "public class SparkTrailPlugin extends DSHPlugin {\n\n private YAMLConfig config;\n private YAMLConfig dataConfig;\n private YAMLConfig langConfig;\n public AutoSave AS;\n public SparkTrailAPI api;\n\n public EffectManager EH;\n public SQLEffectManager SQLH;\n\n // Update data\n public bo...
import java.util.HashSet; import java.util.Iterator; import com.dsh105.sparktrail.SparkTrailPlugin; import com.dsh105.sparktrail.config.ConfigOptions; import com.dsh105.sparktrail.data.EffectCreator; import com.dsh105.sparktrail.data.EffectManager; import com.dsh105.sparktrail.trail.type.*; import com.dsh105.sparktrail...
/* * This file is part of SparkTrail 3. * * SparkTrail 3 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. * * SparkTrail 3 is di...
EffectManager.getInstance().save(this);
3
davidandrzej/LogicLDA
src/main/java/logiclda/rules/SentExclRule.java
[ "public class Corpus {\n\n\tpublic int N;\n\tpublic int D;\n\tpublic int W;\n\tpublic int[] w;\n\tpublic int[] d;\n\t\n\tpublic List<String> vocab;\n\tpublic List<String> doclist;\n\t\n\tpublic HashMap<String,Object> sideInfo;\n\t\n\t\n\t/**\n\t * Copy this corpus\n\t * \n\t * TODO: does not support general metadat...
import java.util.*; import logiclda.Corpus; import logiclda.MiscUtil; import logiclda.SideInfoType; import logiclda.infer.Gradient; import logiclda.infer.RelaxedSample;
package logiclda.rules; public class SentExclRule implements LogicRule { private int excluder; private int excludee; private double sampWeight; private double stepWeight; // Maps sentence idx --> list of corpus idxs in that sentence private HashMap<Integer, ArrayList<Integer>> sentences; private int[] se...
public Gradient randomGradient(RelaxedSample relax, Random rng)
3
BubbleOctopus/Album
library/src/main/java/com/alexvasilkov/gestures/commons/FinderView.java
[ "public class Settings {\n\n public static final float MAX_ZOOM = 2f;\n public static final float OVERZOOM_FACTOR = 2f;\n\n /**\n * Viewport area\n */\n private int viewportW, viewportH;\n\n /**\n * Moving area\n */\n private int movementAreaW, movementAreaH;\n\n private boolean...
import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.RectF; import android.support.annotation.ColorInt; import android.util.AttributeSet; impor...
package com.alexvasilkov.gestures.commons; /** * View to draw movement area above {@link GestureImageView}, useful when implementing cropping. * <p/> * To use this view you should set corresponding {@link Settings} with * {@link #setSettings(Settings)} method. Then whenever movement area is changed * (see {@lin...
private Settings mSettings;
0
bingoogolapple/Graduation-Design
FrogCare/src/com/bingoogol/frogcare/ui/SettingActivity.java
[ "public class BlacklistInterceptService extends Service {\n\tprivate static final String TAG = \"BlacklistInterceptService\";\n\tprivate BlacklistSmsInterceptReceiver mBlacklistSmsInterceptReceiver;\n\tprivate BlacklistDao mBlacklistDao;\n\tprivate TelephonyManager mTelephonyManager;\n\tprivate BlacklistPhoneInterc...
import android.content.Intent; import android.os.Bundle; import android.view.View; import com.bingoogol.frogcare.R; import com.bingoogol.frogcare.service.BlacklistInterceptService; import com.bingoogol.frogcare.service.AttributionService; import com.bingoogol.frogcare.service.ApplockService; import com.bingoogol.frogca...
package com.bingoogol.frogcare.ui; public class SettingActivity extends BaseActivity { private static final String TAG = "SettingActivity"; private SettingView sv_setting_autoupdate; private SettingView sv_setting_applock; private SettingView sv_setting_attribution; private SettingView sv_setting_blacklist; pr...
Logger.i(TAG, "开启程序锁");
5
tudoNoob/poseidon
src/test/java/com/poseidon/controller/QuiropraxistaControllerTest.java
[ "public class QuiropraxistaBuilder {\n\n private Quiropraxista myObject;\n\n private List<Quiropraxista> quiropraxistaList;\n\n public QuiropraxistaBuilder(){\n myObject= new Quiropraxista();\n quiropraxistaList= new ArrayList<>();\n }\n\n public Quiropraxista build(){\n return ...
import com.poseidon.builder.QuiropraxistaBuilder; import com.poseidon.dao.QuiropraxistaDao; import com.poseidon.model.CRUDView; import com.poseidon.model.Quiropraxista; import com.poseidon.utils.RedirectAttributesMock; import org.springframework.web.servlet.ModelAndView; import org.testng.annotations.BeforeTest; import...
package com.poseidon.controller; @Test() public class QuiropraxistaControllerTest { private QuiropraxistaController quiropraxistaController; private QuiropraxistaDao quiropraxistaDao; @BeforeTest public void setUp() { quiropraxistaController = new QuiropraxistaController(); qu...
Quiropraxista quiropraxista = new QuiropraxistaBuilder().withName("Saruman").build();
0
baldapps/google-actions
src/main/java/com/balda/dialogflow/GoogleApiAiBridge.java
[ "public class ExpectedInput {\n\n\t@SerializedName(\"inputPrompt\")\n\t@Expose\n\tprivate InputPrompt inputPrompt;\n\t@SerializedName(\"possibleIntents\")\n\t@Expose\n\tprivate List<ExpectedIntent> possibleIntents = null;\n\t@SerializedName(\"speechBiasingHints\")\n\t@Expose\n\tprivate List<String> speechBiasingHin...
import java.util.List; import com.balda.googleactions.response.ExpectedInput; import com.balda.googleactions.response.ExpectedIntent; import com.balda.googleactions.response.FinalResponse; import com.balda.googleactions.response.InputPrompt; import com.balda.googleactions.response.RichResponse; import com.balda.googlea...
/* * Copyright 2017 Marco Stornelli <playappassistance@gmail.com> * * This file is part of Google Actions project * * Google Actions 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 ...
List<ExpectedIntent> li = el.getPossibleIntents();
1
WeDevelopTeam/HeroVideo-master
app/src/main/java/com/github/bigexcalibur/herovideo/mvp/home/ui/MainActivity.java
[ "public abstract class RxBaseActivity extends RxAppCompatActivity implements ThemePickDialog.ClickListener, IRxBaseView {\n\n private Unbinder bind;\n private RxBaseViewPresenter mRxBaseViewPresenter;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInsta...
import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.NavigationView; import android.support.v4.app.Fragment; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.AppCompatDelegate; import android.v...
package com.github.bigexcalibur.herovideo.mvp.home.ui; public class MainActivity extends RxBaseActivity implements NavigationView.OnNavigationItemSelectedListener { public static final String TAG = MainActivity.class.getSimpleName(); @BindView(R.id.drawer_layout) DrawerLayout mDrawerLayout; @Bin...
CircleImageView mUserAvatarView = (CircleImageView) headerView.findViewById(R.id.user_avatar_view);
1
makemyownlife/newdda-client
src/main/java/com/elong/pb/newdda/client/router/parser/SqlVisitorRegistry.java
[ "public enum DatabaseType {\n\n H2, MySQL, Oracle, SQLServer, DB2;\n\n public static DatabaseType valueFrom(final String databaseName) {\n try {\n return DatabaseType.valueOf(databaseName);\n } catch (final IllegalArgumentException ex) {\n throw new DatabaseTypeUnsupportedE...
import com.alibaba.druid.sql.visitor.SQLASTOutputVisitor; import com.elong.pb.newdda.client.constants.DatabaseType; import com.elong.pb.newdda.client.exception.DatabaseTypeUnsupportedException; import com.elong.pb.newdda.client.router.parser.visitor.basic.mysql.MySqlDeleteVisitor; import com.elong.pb.newdda.client.rout...
package com.elong.pb.newdda.client.router.parser; /** * SQL访问器注册表. */ public final class SqlVisitorRegistry { private static final Map<DatabaseType, Class<? extends SQLASTOutputVisitor>> SELECT_REGISTRY = new HashMap<DatabaseType, Class<? extends SQLASTOutputVisitor>>(DatabaseType.values().length); priva...
DELETE_REGISTRY.put(DatabaseType.H2, MySqlDeleteVisitor.class);
2
difi/datahotel
src/test/java/no/difi/datahotel/logic/ChunkBeanTest.java
[ "public class BaseTest {\r\n\r\n @BeforeClass\r\n public static void beforeClass() throws Exception {\r\n System.setProperty(\"datahotel.home\", new File(ChunkBeanTest.class.getResource(\"/\").toURI()).toString() + File.separator + \"datahotel\");\r\n }\r\n}\r", "@XmlRootElement\r\npublic class Me...
import no.difi.datahotel.BaseTest; import no.difi.datahotel.model.Metadata; import no.difi.datahotel.util.Filesystem; import no.difi.datahotel.util.MetadataLogger; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; import java.io.File; import static no.difi.datahotel.util.Filesystem.FOLDER_CACH...
package no.difi.datahotel.logic; public class ChunkBeanTest extends BaseTest { private ChunkBean chunkBean;
static MetadataLogger logger;
3
irq0/jext2
src/fusejext2/tasks/Rename.java
[ "public class Constants {\n\t// Special inode numbers\n\tpublic static final int\tEXT2_BAD_INO = 1; /* Bad blocks inode */\n\tpublic static final int EXT2_ROOT_INO = 2; /* Root inode */\n\tpublic static final int EXT2_BOOT_LOADER_INO = 5; /* Boot loader inode */\n\tpublic static final int EXT2_UNDEL_...
import jlowfuse.Reply; import java.util.concurrent.locks.ReentrantReadWriteLock; import jext2.Constants; import jext2.DirectoryEntry; import jext2.DirectoryEntryAccess; import jext2.DirectoryInode; import jext2.Inode; import jext2.exceptions.JExt2Exception; import jext2.exceptions.NoSuchFileOrDirectory; import fusejext...
/* * Copyright (c) 2011 Marcel Lauhoff. * * This file is part of jext2. * * jext2 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 vers...
Inode existing = context.inodes.getOpened(existingEntry.getIno());
4
concentricsky/android-viewer-for-khan-academy
src/com/concentricsky/android/khanacademy/app/ShowProfileActivity.java
[ "public class KADataService extends Service {\n \n\tpublic final String LOG_TAG = getClass().getSimpleName();\n\t\n\tpublic static final int RESULT_SUCCESS = 0;\n\tpublic static final int RESULT_ERROR = 1;\n\tpublic static final int RESULT_CANCELLED = 2;\n\t\n\tprivate KADataBinder mBinder = new KADataBinder(thi...
import static com.concentricsky.android.khanacademy.Constants.PARAM_TOPIC_ID; import static com.concentricsky.android.khanacademy.Constants.PARAM_VIDEO_ID; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; import java.sql.SQLException; i...
/* Viewer for Khan Academy Copyright (C) 2012 Concentric Sky, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later...
private KADataService dataService;
0
mattcasters/pentaho-pdi-dataset
src/main/java/org/pentaho/di/dataset/steps/exectests/ExecuteTests.java
[ "@MetaStoreElementType(\n name = \"Kettle Transformation Unit Test\",\n description = \"This describes a golden data unit test for a transformation with defined input data sets\" )\npublic class TransUnitTest {\n\n private String name;\n\n @MetaStoreAttribute( key = \"description\" )\n private String descripti...
import org.apache.commons.lang.StringUtils; import org.apache.commons.vfs2.FileObject; import org.pentaho.di.core.Const; import org.pentaho.di.core.Result; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.row.RowDataUtil; import org.pentaho.di.core.row.RowMeta; import org.pentaho.di.core...
/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2017 by Pentaho : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (th...
MetaStoreFactory<TransUnitTest> testFactory = data.hierarchy.getTestFactory();
0
nightscout/android-uploader
app/src/main/java/com/nightscout/android/upload/Uploader.java
[ "public class ToastReceiver extends BroadcastReceiver {\n public static final String ACTION_SEND_NOTIFICATION = \"nightscout_toast_intent\";\n public static final String TOAST_MESSAGE = \"nightscout_toast_message\";\n\n @Override\n public void onReceive(Context context, Intent intent) {\n if (int...
import android.content.Context; import android.util.Log; import com.mongodb.MongoClientURI; import com.nightscout.android.R; import com.nightscout.android.ToastReceiver; import com.nightscout.android.drivers.AndroidUploaderDevice; import com.nightscout.core.dexcom.Utils; import com.nightscout.core.dexcom.records.Glucos...
package com.nightscout.android.upload; public class Uploader { private static final String LOG_TAG = Uploader.class.getSimpleName(); private final List<BaseUploader> uploaders; private boolean allUploadersInitalized = true; private Context context; public Uploader(Context context, NightscoutPr...
List<CalibrationEntry> calList = filterRecords(numRecords, download.cal);
2
tang-jie/AvatarMQ
src/com/newlandframework/avatarmq/consumer/MessageConsumerHandler.java
[ "public class ConsumerAckMessage extends BaseMessage implements Serializable {\n\n private String ack;\n private int status;\n private String msgId;\n\n public String getAck() {\n return ack;\n }\n\n public void setAck(String ack) {\n this.ack = ack;\n }\n\n public int getStatu...
import io.netty.channel.ChannelHandlerContext; import com.newlandframework.avatarmq.msg.ConsumerAckMessage; import com.newlandframework.avatarmq.model.RequestMessage; import com.newlandframework.avatarmq.model.ResponseMessage; import com.newlandframework.avatarmq.model.MessageSource; import com.newlandframework.avatarm...
/** * Copyright (C) 2016 Newland Group Holding Limited * * 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...
public MessageConsumerHandler(MessageProcessor processor, HookMessageEvent hook) {
4
Ecwid/consul-api
src/main/java/com/ecwid/consul/v1/health/HealthChecksForServiceRequest.java
[ "public interface ConsulRequest {\n\n\tpublic List<UrlParameters> asUrlParameters();\n\n}", "public final class SingleUrlParameters implements UrlParameters {\n\n\tprivate final String key;\n\tprivate final String value;\n\n\tpublic SingleUrlParameters(String key) {\n\t\tthis.key = key;\n\t\tthis.value = null;\n\...
import com.ecwid.consul.ConsulRequest; import com.ecwid.consul.SingleUrlParameters; import com.ecwid.consul.UrlParameters; import com.ecwid.consul.v1.NodeMetaParameters; import com.ecwid.consul.v1.QueryParams; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import ...
package com.ecwid.consul.v1.health; public final class HealthChecksForServiceRequest implements ConsulRequest { private final String datacenter; private final String near; private final Map<String, String> nodeMeta; private final QueryParams queryParams; public HealthChecksForServiceRequest(String datacenter,...
public List<UrlParameters> asUrlParameters() {
2
WeDevelopTeam/HeroVideo-master
app/src/main/java/com/github/bigexcalibur/herovideo/mvp/test/ui/TestFragment.java
[ "public class MediaPlayerActivity extends Activity {\n\n MediaPlayer player;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n super.onCreate(savedInstanceState);\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTA...
import android.content.Intent; import android.os.Bundle; import android.text.Editable; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import com.bili...
package com.github.bigexcalibur.herovideo.mvp.test.ui; /** * Created by Xie.Zhou on 2017/1/4. */ public class TestFragment extends RxLazyFragment { @BindView(R.id.tv_test) TextView mTvTest; @BindView(R.id.btn_test1) Button mBtnTest1; @BindView(R.id.btn_test2) Button mBtnTest2; @Bin...
LogUtil.test(sign);
5
pixmob/freemobilenetstat
src/org/pixmob/freemobile/netstat/util/IntentFactory.java
[ "public static final String NOTIF_ACTION_NETWORK_OPERATOR_SETTINGS = \"network_operator_settings\";", "public static final String NOTIF_ACTION_STATISTICS = \"statistics\";", "public static final String SP_KEY_NOTIF_ACTION = \"pref_notif_action\";", "public static final String SP_NAME = \"netstat\";", "@Supp...
import static org.pixmob.freemobile.netstat.Constants.NOTIF_ACTION_NETWORK_OPERATOR_SETTINGS; import static org.pixmob.freemobile.netstat.Constants.NOTIF_ACTION_STATISTICS; import static org.pixmob.freemobile.netstat.Constants.SP_KEY_NOTIF_ACTION; import static org.pixmob.freemobile.netstat.Constants.SP_NAME; import or...
/* * Copyright (C) 2012 Pixmob (http://github.com/pixmob) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
if (NOTIF_ACTION_NETWORK_OPERATOR_SETTINGS.equals(notifAction)) {
0
mast-group/codemining-core
src/main/java/codemining/java/codeutils/scopes/MethodScopeExtractor.java
[ "public class JavaASTExtractor {\n\n\tprivate static final class TopMethodRetriever extends ASTVisitor {\n\t\tpublic MethodDeclaration topDcl;\n\n\t\t@Override\n\t\tpublic boolean visit(final MethodDeclaration node) {\n\t\t\ttopDcl = node;\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Remembers if the given Extra...
import java.io.File; import java.io.IOException; import java.util.Map.Entry; import java.util.logging.Logger; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.ASTVisitor; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.MethodInvocation; import org.eclipse.jdt.c...
/** * */ package codemining.java.codeutils.scopes; /** * Extract method names from a scope. * * @author Miltos Allamanis <m.allamanis@ed.ac.uk> * */ public class MethodScopeExtractor { public static class Method { public final String name; public final ScopeType type; public Method(final String...
final JavaASTExtractor ex = new JavaASTExtractor(false);
0
CloudScale-Project/CloudStore
src/main/java/eu/cloudscale/showcase/db/model/mongo/Item.java
[ "public class ContextHelper \n{\n\tprivate static GenericXmlApplicationContext ctx = null;\n\t\n\tpublic static GenericXmlApplicationContext getApplicationContext()\n\t{\n\t\tif( ctx == null)\n\t\t{\n\t\t\tctx = new GenericXmlApplicationContext();\n\t\t\tctx.load(\"classpath:app-context.xml\");\n\t\t\tctx.refresh()...
import java.io.Serializable; import java.util.Date; import org.bson.types.ObjectId; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.index.Indexed; imp...
/******************************************************************************* * Copyright (c) 2015 XLAB d.o.o. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * h...
return DatabaseHelper.getDatabase().findAuthorById( this.authId );
1
jhamalt/maltparser
src/org/maltparser/core/syntaxgraph/feature/InputArcDirFeature.java
[ "public abstract class FeatureValue extends FunctionValue {\r\n\tprotected boolean nullValue;\r\n\t\r\n\tpublic FeatureValue(Function function) {\r\n\t\tsuper(function);\r\n\t\tsetNullValue(true);\r\n\t}\r\n\t\r\n\tpublic void reset() {\r\n\t\tsetNullValue(true);\r\n\t}\r\n\r\n\tpublic boolean isNullValue() {\r\n\t...
import org.maltparser.core.exception.MaltChainedException; import org.maltparser.core.feature.FeatureException; import org.maltparser.core.feature.function.AddressFunction; import org.maltparser.core.feature.function.FeatureFunction; import org.maltparser.core.feature.value.AddressValue; import org.maltparser.core...
package org.maltparser.core.syntaxgraph.feature; /** * * @author Johan Hall **/ public final class InputArcDirFeature implements FeatureFunction { public final static Class<?>[] paramTypes = { java.lang.String.class, org.maltparser.core.feature.function.AddressFunction.class }; private ColumnDescription colu...
private final DataFormatInstance dataFormatInstance;
2
fuinorg/utils4j
src/test/java/org/fuin/utils4j/examples/CDataJaxbExample.java
[ "public static <T> String marshal(final T data, final Class<?>... classesToBeBound) {\n return marshal(data, null, classesToBeBound);\n}", "public static <T> T unmarshal(final String xmlData, final Class<?>... classesToBeBound) {\n final Unmarshaller unmarshaller = new UnmarshallerBuilder().addClassesToBeBo...
import static org.fuin.utils4j.jaxb.JaxbUtils.marshal; import static org.fuin.utils4j.jaxb.JaxbUtils.unmarshal; import java.io.StringWriter; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamWriter; import jakarta.xml.bind.JAXBContext; import org.fuin.utils4j.jaxb.CDataXmlAdapter; import org.fu...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
final MyClassWithCData copy = unmarshal(xml, MyClassWithCData.class);
1
GoogleCloudPlatform/runtime-builder-java
java-runtime-builder-app/src/test/java/com/google/cloud/runtimes/builder/buildsteps/PrebuiltRuntimeImageBuildStepTest.java
[ "public static class TestWorkspaceBuilder {\n\n private final Path workspaceDir;\n\n public TestWorkspaceBuilder() throws IOException {\n this.workspaceDir = Files.createTempDirectory(null);\n }\n\n public FileBuilder file(String path) {\n return new FileBuilder(this, workspaceDir.resolve(path));\n }\n\n...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.google.cloud.runtimes.builder.TestUtils.TestWorkspaceBuilder; import com.google.cloud.runtimes.builder.buildsteps.base.BuildStepException; im...
package com.google.cloud.runtimes.builder.buildsteps; /** * Unit tests for {@link PrebuiltRuntimeImageBuildStep}. */ public class PrebuiltRuntimeImageBuildStepTest { private PrebuiltRuntimeImageBuildStep prebuiltRuntimeImageBuildStep; @Mock private JdkServerLookup jdkServerLookup; private String compatImag...
public void testProvidedJarArtifactPath() throws IOException, BuildStepException {
1
domoinc/domo-java-sdk
domo-java-sdk-all/src/main/java/com/domo/sdk/datasets/DataSetClient.java
[ "public class CreateDataSetRequest {\n private String name;\n private String description;\n private long rows;\n private Schema schema;\n\n public CreateDataSetRequest(){\n this.name=\"\";\n this.description=\"\";\n this.rows=0;\n this.schema = new Schema();\n }\n\n ...
import com.domo.sdk.datasets.model.CreateDataSetRequest; import com.domo.sdk.datasets.model.DataSet; import com.domo.sdk.datasets.model.DataSetAndPDP; import com.domo.sdk.datasets.model.DataSetListResult; import com.domo.sdk.request.RequestException; import com.domo.sdk.request.Transport; import com.domo.sdk.request.Ur...
package com.domo.sdk.datasets; public class DataSetClient { private final UrlBuilder urlBuilder; private final Transport transport; private static final String URL_BASE = "v1/datasets"; /** DataSets - Programmatically manage Domo DataSets - Use DataSets for fairly static data sources ...
public DataSetAndPDP get(String id) {
2
Cantara/ConfigService
src/main/java/no/cantara/cs/client/ClientService.java
[ "@Service\npublic class CloudWatchLogger {\n\n private static final Logger log = LoggerFactory.getLogger(CloudWatchLogger.class);\n\n private static final int DEFAULT_MAX_BATCH_SIZE = 512;\n private static final int DEFAULT_INTERNAL_QUEUE_SIZE = 1024;\n\n private int maxBatchSize;\n private LinkedBlo...
import no.cantara.cs.cloudwatch.CloudWatchLogger; import no.cantara.cs.cloudwatch.CloudWatchMetricsPublisher; import no.cantara.cs.dto.*; import no.cantara.cs.dto.event.ExtractedEventsStore; import no.cantara.cs.persistence.ApplicationConfigDao; import no.cantara.cs.persistence.ClientDao; import no.cantara.cs.persisten...
package no.cantara.cs.client; /** * @author <a href="mailto:erik-dev@fjas.no">Erik Drolshammer</a> 2015-08-23. */ @Service public class ClientService { private static final Logger log = LoggerFactory.getLogger(ClientService.class);
private final ApplicationConfigDao applicationConfigDao;
2
janScheible/rising-empire
src/main/java/com/scheible/risingempire/web/game/GameHolder.java
[ "public interface Game {\n\n\tvoid register(Player player);\n\tvoid addAi(Player player);\n\n\tList<Player> getPlayers();\n\tboolean isAi(Player player);\n\n\tboolean process(Player player, List<Command> commands);\n\n\tMap<Player, View> getViews();\n\n\tint getTurn();\n\n\tMap<Player, Boolean> getTurnFinishInfo();...
import com.scheible.risingempire.game.common.Game; import com.scheible.risingempire.game.common.GameFactory; import com.scheible.risingempire.game.common.command.Command; import com.scheible.risingempire.game.common.view.View; import com.scheible.risingempire.game.common.Player; import com.scheible.risingempire.game.co...
package com.scheible.risingempire.web.game; /** * * @author sj */ @Component public class GameHolder { private static Game game; @PostConstruct private void init() { List<Player.Prototype> playerPrototypes = new ArrayList<>();
for(AvailablePlayer availablePlayer : AvailablePlayer.values()) {
6
ozimov/cirneco
hamcrest/guava-hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/guava/GuavaMatchers.java
[ "public class IsEmptyGuavaOptional extends TypeSafeMatcher<Optional> {\n\n /**\n * Creates a matcher that matches when the examined {@linkplain Optional} contains no object.\n */\n public static Matcher<Optional> emptyGuavaOptional() {\n return new IsEmptyGuavaOptional();\n }\n\n @Overrid...
import com.google.common.base.Equivalence; import com.google.common.base.Optional; import com.google.common.collect.Multimap; import com.google.common.collect.Multiset; import it.ozimov.cirneco.hamcrest.guava.base.IsEmptyGuavaOptional; import it.ozimov.cirneco.hamcrest.guava.base.IsEquivalent; import it.ozimov.cirneco....
package it.ozimov.cirneco.hamcrest.guava; /** * The {@code GuavaMatchers} class groups all the matchers introduced by Cirneco's Hamcrest extension for <a * href="https://github.com/google/guava">Google Guava library</a>. Suggested use would be to import all the static * methods of this class in a unit test. * *...
return IsMultimapKeyWithCollectionSize.keyWithSize(element, size);
2
RojerAlone/shop
src/main/java/cn/cie/services/impl/GameServiceImpl.java
[ "public class Game {\n\n /**\n * 未上架\n */\n public static final Byte STAT_PRE = 0;\n /**\n * 已上架\n */\n public static final Byte STAT_OK = 1;\n /**\n * 已下架\n */\n public static final Byte STAT_DEL = 2;\n\n private Integer id;\n\n private String creater;\n\n private...
import cn.cie.entity.Game; import cn.cie.entity.Kind; import cn.cie.entity.Tag; import cn.cie.entity.dto.GameDTO; import cn.cie.mapper.*; import cn.cie.services.GameService; import cn.cie.utils.MsgCenter; import cn.cie.utils.RedisUtil; import cn.cie.utils.Result; import org.springframework.beans.factory.annotation.Auto...
package cn.cie.services.impl; /** * Created by RojerAlone on 2017/6/8. */ @Service public class GameServiceImpl implements GameService { @Autowired private GameMapper gameMapper; @Autowired private KindMapper kindMapper; @Autowired private KindmapperMapper kindmapperMapper; @Autowired ...
return Result.fail(MsgCenter.ERROR_PARAMS);
5
AbrarSyed/SecretRoomsMod-forge
src/main/java/com/wynprice/secretroomsmod/proxy/ClientProxy.java
[ "@EventBusSubscriber(modid=SecretRooms5.MODID)\npublic class SecretItems \n{\n\tpublic static final Item CAMOUFLAGE_PASTE = new CamouflagePaste();\n\tpublic static final Item SECRET_WOODEN_DOOR = SecretCompatibility.MALISISDOORS ? SecretCompactMalisisDoors.WOODEN_DOOR_ITEM : new BaseItemDoor(SecretBlocks.SECRET_WOO...
import java.awt.Color; import java.lang.reflect.Field; import com.wynprice.secretroomsmod.SecretItems; import com.wynprice.secretroomsmod.base.interfaces.ISecretBlock; import com.wynprice.secretroomsmod.base.interfaces.ISecretTileEntity; import com.wynprice.secretroomsmod.gui.GuiProgrammableSwitchProbe; import com.wynp...
package com.wynprice.secretroomsmod.proxy; public class ClientProxy extends CommonProxy { @Override public void displayGui(int guiID, Object... objects) { GuiScreen gui = null; switch (guiID) { case 0:
gui = new GuiProgrammableSwitchProbe((ItemStack) objects[0]);
3
material-motion/material-motion-android
library/src/test/java/com/google/android/material/motion/operators/PointFOperatorsTests.java
[ "public abstract class MotionObserver<T> extends Observer<T> {\n\n @Override\n public abstract void next(T value);\n\n public abstract void build(MotionBuilder<T> builder, T... values);\n\n /**\n * A simple observer for when you only want to implement {@link #next(Object)}.\n */\n public static abstract cl...
import static com.google.android.material.motion.operators.X.x; import static com.google.android.material.motion.operators.Y.y; import static com.google.common.truth.Truth.assertThat; import android.graphics.PointF; import android.support.annotation.NonNull; import com.google.android.indefinite.observable.IndefiniteObs...
/* * Copyright 2016-present The Material Motion Authors. All Rights Reserved. * * 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 * * ...
private MotionObservable<PointF> pointFSource() {
1
RestNEXT/restnext
restnext-security/src/main/java/org/restnext/security/Security.java
[ "public static boolean isPathParamUri(final String uri) {\n return uri != null && PATH_PARAM_URI.matcher(uri).matches();\n}", "public static String normalize(String uri) {\n return Optional.ofNullable(uri)\n .map(UriUtils::addFirstSlash)\n .map(UriUtils::removeLastSlash)\n .orElse(uri);\n}", "p...
import org.slf4j.LoggerFactory; import static org.restnext.util.UriUtils.isPathParamUri; import static org.restnext.util.UriUtils.normalize; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.TreeMap; import java.util.function.Function; import org.restnext.core.http.Request; imp...
/* * Copyright (C) 2016 Thiago Gutenberg Carvalho da Costa * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
this.urlMatcher = isPathParamUri(this.uri)
0
shaunlebron/flex-fov
src/main/java/mod/render360/coretransform/classtransformers/GuiScreenTransformer.java
[ "public class ClassName {\n\n private final String deobfuscatedName;\n private final String obfuscatedName;\n\n public ClassName(String deobfuscatedName, String obfuscatedName) {\n this.deobfuscatedName = deobfuscatedName;\n this.obfuscatedName = obfuscatedName;\n }\n\n public String ge...
import mod.render360.coretransform.classtransformers.name.ClassName; import mod.render360.coretransform.classtransformers.name.MethodName; import mod.render360.coretransform.classtransformers.name.Names; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; import org.objectweb.a...
package mod.render360.coretransform.classtransformers; public class GuiScreenTransformer extends ClassTransformer { @Override
public ClassName getName() {
0
sandflow/regxmllib
src/main/java/com/sandflow/smpte/tools/GenerateDictionaryXMLSchema.java
[ "public class XMLSchemaBuilder {\n\n private final static Logger LOG = Logger.getLogger(XMLSchemaBuilder.class.getName());\n\n public static final String REGXML_NS = \"http://sandflow.com/ns/SMPTEST2001-1/baseline\";\n private final static String XMLNS_NS = \"http://www.w3.org/2000/xmlns/\";\n private s...
import com.sandflow.smpte.klv.exceptions.KLVException; import com.sandflow.smpte.regxml.FragmentBuilder; import com.sandflow.smpte.regxml.XMLSchemaBuilder; import com.sandflow.smpte.regxml.dict.MetaDictionary; import com.sandflow.smpte.regxml.dict.MetaDictionaryCollection; import com.sandflow.smpte.regxml.dict.exceptio...
/* * Copyright (c) 2014, Pierre-Anthony Lemieux (pal@sandflow.com) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notic...
public boolean handle(Event evt) {
3
jenkinsci/github-plugin
src/main/java/org/jenkinsci/plugins/github/webhook/subscriber/DefaultPushGHEventSubscriber.java
[ "public class GitHubPushTrigger extends Trigger<Job<?, ?>> implements GitHubTrigger {\n\n @DataBoundConstructor\n public GitHubPushTrigger() {\n }\n\n /**\n * Called when a POST is made.\n */\n @Deprecated\n public void onPost() {\n onPost(GitHubTriggerEvent.create()\n ...
import com.cloudbees.jenkins.GitHubPushTrigger; import com.cloudbees.jenkins.GitHubRepositoryName; import com.cloudbees.jenkins.GitHubRepositoryNameContributor; import com.cloudbees.jenkins.GitHubTriggerEvent; import com.cloudbees.jenkins.GitHubWebHook; import hudson.Extension; import hudson.ExtensionList; import hudso...
package org.jenkinsci.plugins.github.webhook.subscriber; /** * By default this plugin interested in push events only when job uses {@link GitHubPushTrigger} * * @author lanwen (Merkushev Kirill) * @since 1.12.0 */ @Extension @SuppressWarnings("unused") public class DefaultPushGHEventSubscriber extends GHEvents...
return withTrigger(GitHubPushTrigger.class).apply(project);
0
mathisdt/sdb2
src/main/java/org/zephyrsoft/sdb2/remote/RemoteController.java
[ "public class MainController implements Scroller {\n\t\n\tprivate static final String PRESENTATION_DISPLAY_WARNING = \"\"\"\n\t\tCould not start presentation!\n\t\t\n\t\tPlease specify at least one existing presentation display:\n\t\tCheck your system configuration\n\t\tand/or adjust this program's configuration\n\...
import org.zephyrsoft.sdb2.presenter.Presentable; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; import org.eclipse.paho.client.mqttv3.MqttException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.zephyrsoft.sdb2.MainController; ...
/* * This file is part of the Song Database (SDB). * * SDB is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License 3.0 as published by * the Free Software Foundation. * * SDB is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; wit...
private final MqttObject<SongsModel> playlist;
4
cqyijifu/OpenFalcon-SuitAgent
src/main/java/com/yiji/falcon/agent/plugins/plugin/tcp/TcpPlugin.java
[ "public enum CounterType {\n /**\n * 用户上传什么样的值,就原封不动的存储\n */\n GAUGE,\n /**\n * 指标在存储和展现的时候,会被计算为speed,即(当前值 - 上次值)/ 时间间隔\n */\n COUNTER\n}", "public interface DetectPlugin extends Plugin {\n\n /**\n * 监控的具体服务的agentSignName tag值\n * @param address\n * 被监控的探测地址\n * @r...
import com.yiji.falcon.agent.falcon.CounterType; import com.yiji.falcon.agent.plugins.DetectPlugin; import com.yiji.falcon.agent.plugins.Plugin; import com.yiji.falcon.agent.plugins.util.CacheUtil; import com.yiji.falcon.agent.vo.detect.DetectResult; import lombok.extern.slf4j.Slf4j; import java.io.IOException; import ...
/* * www.yiji.com Inc. * Copyright (c) 2016 All Rights Reserved */ package com.yiji.falcon.agent.plugins.plugin.tcp; /* * 修订记录: * guqiu@yiji.com 2016-07-25 13:53 创建 */ /** * @author guqiu@yiji.com */ @Slf4j public class TcpPlugin implements DetectPlugin { private int step; private final Map<String, ...
Map<String,String> map = CacheUtil.getTags(addresses,tagsCache,address);
3
WANdisco/s3hdfs
src/main/java/com/wandisco/s3hdfs/command/GetCommand.java
[ "public class S3HdfsPath {\n private final String rootDir;\n private final String userName;\n private final String bucketName;\n private final String objectName;\n private final String partNumber;\n\n private String version;\n\n public S3HdfsPath() throws UnsupportedEncodingException {\n this(null, null, ...
import com.wandisco.s3hdfs.path.S3HdfsPath; import com.wandisco.s3hdfs.rewrite.redirect.ObjectInfoRedirect; import com.wandisco.s3hdfs.rewrite.wrapper.*; import com.wandisco.s3hdfs.rewrite.xml.S3XmlWriter; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import java.io.IOException; import ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ObjectInfoRedirect objectInfoRedirect =
1
kaazing/netx
ws/src/main/java/org/kaazing/netx/ws/internal/url/WssURLStreamHandlerImpl.java
[ "public static URI changeScheme(URI location, String newScheme) {\n String userInfo = location.getUserInfo();\n String host = location.getHost();\n int port = location.getPort();\n String path = location.getPath();\n String query = location.getQuery();\n String fragment = location.getFragment();\n...
import static org.kaazing.netx.ws.internal.util.Util.changeScheme; import java.io.IOException; import java.net.URI; import java.net.URL; import java.net.URLStreamHandler; import java.util.Map; import java.util.Random; import org.kaazing.netx.URLConnectionHelper; import org.kaazing.netx.ws.WsURLConnection; import org.ka...
/** * Copyright 2007-2015, Kaazing Corporation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require...
URI httpLocation = changeScheme(locationURI, httpScheme);
0
AlexAUT/Kroniax
core/src/com/alexaut/kroniax/game/scripts/TutorialScript.java
[ "public class Camera {\r\n private OrthographicCamera mCamera;\r\n \r\n Vector2 mCameraOffset;\r\n float mRotation;\r\n \r\n Vector2 mCacheOffset;\r\n float mCacheRotation;\r\n\r\n public Camera() {\r\n mCamera = new OrthographicCamera();\r\n mCameraOffset = new Vector2(300, 0)...
import com.alexaut.kroniax.game.Camera; import com.alexaut.kroniax.game.GameController; import com.alexaut.kroniax.game.GameController.State; import com.alexaut.kroniax.game.level.Level; import com.alexaut.kroniax.game.player.Player;
package com.alexaut.kroniax.game.scripts; public class TutorialScript extends Script { String mText; public TutorialScript(String text) { super(); mText = text; } @Override
public void update(float deltaTime, GameController gameController, Level level, Player player, Camera camera) {
0
NICTA/nicta-ner
nicta-ner/src/main/java/org/t3as/ner/classifier/NameClassifier.java
[ "public class EntityClass {\n\n public static final EntityClass UNKNOWN = new EntityClass(\"UNKNOWN\");\n public static final EntityClass DATE = new EntityClass(\"DATE\");\n\n private final String entityClass;\n\n @JsonCreator\n public EntityClass(@JsonProperty(\"entityClass\") final String entityCla...
import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.t3as.ner.EntityClass; import org.t3as.ner.NerResultSet; import org.t3as.ner.Phrase; import org.t3as.ner.classifier.feature.FeatureMap; import org.t3as.ner.resource.Configuration; import java.util.ArrayList; import ja...
/* * #%L * NICTA t3as Named-Entity Recognition library * %% * Copyright (C) 2010 - 2014 NICTA * %% * 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 ...
final Map<Phrase, Set<Phrase>> phraseInMemory = new HashMap<>();
2
byoutline/CachedField
ibuscachedfield/src/test/groovy/com/byoutline/ibuscachedfield/mocks/CachedFieldWithArgConstructorWrapperImpl.java
[ "public interface CachedFieldWithArg<RETURN_TYPE, ARG_TYPE> {\n\n FieldState getState();\n\n /**\n * Informs {@link SuccessListener} when value is ready.\n *\n * @param arg Argument needed to calculate value.\n */\n void postValue(ARG_TYPE arg);\n\n /**\n * Force value to refresh(be ...
import com.byoutline.cachedfield.CachedFieldWithArg; import com.byoutline.cachedfield.CachedFieldWithArgImpl; import com.byoutline.cachedfield.ProviderWithArg; import com.byoutline.eventcallback.IBus; import com.byoutline.ibuscachedfield.builders.CachedFieldWithArgConstructorWrapper; import com.byoutline.ibuscachedfiel...
package com.byoutline.ibuscachedfield.mocks; /** * @author Sebastian Kacprzak <sebastian.kacprzak at byoutline.com> */ public class CachedFieldWithArgConstructorWrapperImpl implements CachedFieldWithArgConstructorWrapper<String, Integer, IBus, CachedFieldWithArg<String, Integer>> { @Override public Cached...
ResponseEventWithArg<String, Integer> successEvent, ResponseEventWithArg<Exception, Integer> errorEvent, IBus iBus,
4
elixsr/FwdPortForwardingApp
app/src/main/java/com/elixsr/portforwarder/ui/rules/BaseRuleActivity.java
[ "public class RuleValidationException extends ValidationException {\n\n public RuleValidationException() {\n }\n\n public RuleValidationException(String message) {\n super(message);\n }\n\n public RuleValidationException(Throwable cause) {\n super(cause);\n }\n\n public RuleValida...
import android.content.Intent; import android.support.design.widget.TextInputEditText; import android.support.design.widget.TextInputLayout; import android.util.Log; import android.widget.ArrayAdapter; import android.widget.Spinner; import android.widget.Toast; import java.net.InetSocketAddress; import java.net.SocketE...
/* * Fwd: the port forwarding app * Copyright (C) 2016 Elixsr Ltd * * 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 versi...
Intent mainActivityIntent = new Intent(this, MainActivity.class);
3
DevLeoko/AdvancedBan
bungee/src/main/java/me/leoko/advancedban/bungee/listener/InternalListener.java
[ "public class Universal {\n\n private static Universal instance = null;\n\n public static void setRedis(boolean redis) {\n Universal.redis = redis;\n }\n\n private final Map<String, String> ips = new HashMap<>();\n private MethodInterface mi;\n private LogManager logManager;\n\n private ...
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; import com.google.gson.JsonObject; import com.google.gson.JsonSyntaxException; import me.leoko.advancedban.Universal; import me.leoko.advancedban.bungee.event.PunishmentEvent; import...
package me.leoko.advancedban.bungee.listener; /** * * @author Beelzebu */ public class InternalListener implements Listener { private final Universal universal = Universal.get(); @EventHandler public void onPunish(PunishmentEvent e) { sendToBukkit("Punish", Arrays.asList(e.getPunishment().to...
UUIDManager.get().getUUID(punishment.get("uuid").getAsString()),
4
dbuschman7/mongoFS
src/test/java/me/lightspeed7/mongofs/FileChunkOutputStreamSinkTest.java
[ "public class GridFS {\n\n /**\n * File's chunk size\n */\n public static final int DEFAULT_CHUNKSIZE = 255 * 1024;\n\n /**\n * Bucket to use for the collection namespaces\n */\n public static final String DEFAULT_BUCKET = \"fs\";\n\n /**\n * File's max chunk size\n * \n *...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.io.IOException; import me.lightspeed7.mongofs.gridfs.GridFS; import me.lightspeed7.mongofs.gridfs.GridFSInputFile; import me.lightspeed7.mongofs.gridfs.GridFSInputFileAdapter...
package me.lightspeed7.mongofs; public class FileChunkOutputStreamSinkTest { private static final String DB_NAME = "MongoFS-FileChunkOutputStreamSink"; private DB database; // private ObjectId id; private MongoClient mongoClient; private GridFS gridFS; private String bucketName; ...
private MongoCollection<Document> chunksCollection;
4
hceylan/guava
guava/src/com/google/common/cache/CacheBuilder.java
[ "public static <T> T firstNonNull(@Nullable T first, @Nullable T second) {\n return first != null ? first : checkNotNull(second);\n}", "@GwtCompatible\npublic final class Objects {\n private Objects() {}\n\n /**\n * Determines whether two possibly-null objects are equal. Returns:\n *\n * <ul>\n * <li>{...
import static com.google.common.base.Objects.firstNonNull; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkState; import com.google.common.annotations.Beta; import com.google.common...
/* * Copyright (C) 2009 The Guava 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 agre...
static final Supplier<? extends StatsCounter> NULL_STATS_COUNTER = Suppliers.ofInstance(
3
shopzilla/catalog-api-client
client/src/main/java/com/shopzilla/api/client/http/RestCatalogAPIClient.java
[ "public interface CatalogAPIClient {\n\n public CatalogResponse performSearch(ProductSearchRequest request);\n\n public CategoryResponse performCategorySearch(CategorySearchRequest request);\n\n AttributeSearchResponse performAttributeSearch(AttributeSearchRequest request);\n\n Classification performCla...
import java.util.List; import com.shopzilla.api.client.CatalogAPIClient; import com.shopzilla.api.client.UrlProvider; import com.shopzilla.api.client.brand.BizrateUrlProvider; import com.shopzilla.api.client.model.*; import com.shopzilla.api.client.model.request.*; import com.shopzilla.api.client.model.response.Attribu...
/** * Copyright 2011 Shopzilla.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 law or ag...
public AttributeSearchResponse performAttributeSearch(AttributeSearchRequest request) {
3
projectbuendia/buendia
openmrs/omod/src/main/java/org/openmrs/projectbuendia/webservices/rest/DbUtils.java
[ "public class Utils {\n public static final int SECOND = 1000; // in ms\n public static final int MINUTE = 60 * SECOND; // in ms\n public static final int HOUR = 60 * MINUTE; // in ms\n public static final int DAY = 24 * HOUR; // in ms\n\n public static final String EN_DASH = \"\\u2013\";\n pu...
import org.openmrs.BaseOpenmrsMetadata; import org.openmrs.CareSetting; import org.openmrs.Concept; import org.openmrs.ConceptClass; import org.openmrs.ConceptDatatype; import org.openmrs.ConceptName; import org.openmrs.ConceptNumeric; import org.openmrs.Encounter; import org.openmrs.EncounterRole; import org.openmrs.E...
// Copyright 2015 The Project Buendia 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 agree...
return ALPHANUMERIC_COMPARATOR.compare(a.getName(), b.getName());
2
gamblore/AndroidPunk
sample/AndroidPunkTest/src/com/gamblore/androidpunk/entities/Lightning.java
[ "public class FP {\n\n\tprivate static final String TAG = \"FP\";\n\t\n /**\n * The FlashPunk major version.\n */\n public static final String VERSION = \"1.6\";\n \n /**\n * The default Typeface to use.\n */\n public static Typeface typeface = Typeface.DEFAULT;\n \n /**\n *...
import net.androidpunk.FP; import net.androidpunk.graphics.atlas.GraphicList; import net.androidpunk.graphics.atlas.SpriteMap; import net.androidpunk.graphics.atlas.TiledSpriteMap; import net.androidpunk.graphics.opengl.SubTexture; import com.gamblore.androidpunk.Main;
package com.gamblore.androidpunk.entities; public class Lightning extends StaticDanger { private static final String TAG = "Lightning"; private TiledSpriteMap mMap; private SpriteMap mBallMap; private static final String ANIM_SHOCK = "shock"; public Lightning(int x, int y, int width, int an...
setGraphic(new GraphicList(mMap, mBallMap));
1
erlymon/erlymon-monitor-android
erlymon-monitor-app/src/main/java/org/erlymon/monitor/api/RestApi.java
[ "public class QueryDate {\n private static final ThreadLocal<DateFormat> DF = new ThreadLocal<DateFormat>() {\n @Override public DateFormat initialValue() {\n return new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n }\n };\n\n private final Date date;\n\n public QueryDat...
import org.erlymon.monitor.api.util.QueryDate; import org.erlymon.monitor.mvp.model.Command; import org.erlymon.monitor.mvp.model.Device; import org.erlymon.monitor.mvp.model.Permission; import org.erlymon.monitor.mvp.model.Position; import org.erlymon.monitor.mvp.model.Server; import org.erlymon.monitor.mvp.model.User...
/* * Copyright (c) 2016, Sergey Penkovsky <sergey.penkovsky@gmail.com> * * This file is part of Erlymon Monitor. * * Erlymon Monitor 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 t...
Observable<Void> createPermission(@Body Permission permission);
3
trivago/triava
src/examples/java/com/trivago/examples/TimeSourceExample.java
[ "public class TriavaNullLogger implements TriavaLogger\n{\n\n\t@Override\n\tpublic void info(String message)\n\t{\n\t}\n\n\t@Override\n\tpublic void error(String message)\n\t{\n\t}\n\n\t@Override\n\tpublic void error(String message, Throwable exc)\n\t{\n\t}\n\n}", "public class EstimatorTimeSource extends Thread ...
import java.io.PrintStream; import java.sql.Date; import java.text.SimpleDateFormat; import java.util.Arrays; import com.trivago.triava.logging.TriavaNullLogger; import com.trivago.triava.time.EstimatorTimeSource; import com.trivago.triava.time.OffsetTimeSource; import com.trivago.triava.time.SystemTimeSource; import c...
/********************************************************************************* * Copyright 2015-present trivago GmbH * * 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:/...
TimeSource tsYesterday = new OffsetTimeSource(tsToday.millis() - DAY_LENGTH_MILLIS, tsToday);
2
Lyneira/MachinaCraft
MachinaCore/src/me/lyneira/MachinaCore/machina/model/MachinaModel.java
[ "public final class BlockData {\r\n private static final int blockIdLimit = 256;\r\n private static BlockData[] blockId = new BlockData[blockIdLimit];\r\n private static final Random generator = new Random();\r\n private static final BreakTime breakTimeInstant = new BreakTime(1);\r\n private static f...
import java.util.Arrays; import org.bukkit.World; import org.bukkit.block.Chest; import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; import me.lyneira.MachinaCore.BlockData; import me.lyneira.MachinaCore.MachinaCore; import me.lyneira.MachinaCore.block.BlockVector; import me.lyne...
package me.lyneira.MachinaCore.machina.model; public class MachinaModel { private final UniqueIdObjectMap<ModelNode> nodes; private final World world; private ModelNode root; private int blockCount = 0; // Used to keep track of the cumulative origin of a node private int x; ...
for (UniqueIdObjectIterator<MachinaBlock> itBlock = node.blockIterator(); itBlock.hasNext();) {
5
Kestutis-Z/World-Weather
WorldWeather/app/src/main/java/com/haringeymobile/ukweather/database/GeneralDatabaseService.java
[ "public class CityManagementActivity extends ThemedActivity implements\n CityListFragmentWithUtilityButtons.OnUtilityButtonClickedListener,\n CityUtilitiesCursorAdapter.Listener,\n DeleteCityDialog.OnDialogButtonClickedListener {\n\n public static final String CITY_ID = \"city id\";\n pub...
import android.app.IntentService; import android.content.Intent; import com.haringeymobile.ukweather.CityManagementActivity; import com.haringeymobile.ukweather.MainActivity; import com.haringeymobile.ukweather.RefreshingActivity; import com.haringeymobile.ukweather.utils.SharedPrefsHelper; import com.haringeymobile.uk...
package com.haringeymobile.ukweather.database; public class GeneralDatabaseService extends IntentService { private static final String APP_PACKAGE = "com.haringeymobile.ukweather"; public static final String ACTION_INSERT_OR_UPDATE_CITY_RECORD = APP_PACKAGE + ".insert_or_update_city_records"; ...
String currentWeatherJsonString = intent.getStringExtra(RefreshingActivity.
2
bechte/junit-hierarchicalcontextrunner
src/main/java/de/bechte/junit/runners/context/processing/MethodExecutor.java
[ "public interface Describer<T extends Object> {\n /**\n * Returns a {@link Description} for the given object of type T.\n *\n * @param object the object of type T\n * @return a {@link Description} of the object\n * @throws IllegalArgumentException if {@code object} is null\n */\n publi...
import de.bechte.junit.runners.context.description.Describer; import de.bechte.junit.runners.context.statements.StatementExecutor; import de.bechte.junit.runners.context.statements.builder.MethodStatementBuilder; import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Rule; import org...
package de.bechte.junit.runners.context.processing; /** * The {@link MethodExecutor} is responsible for executing a test for the given {@link FrameworkMethod}. * * This implementation creates a new test instance along the context hierarchy, i.e. it starts by creating an instance * of the outer class and then cr...
final Object target = createDeepInstance(classHierarchy);
3
lmdbjava/lmdbjava
src/main/java/org/lmdbjava/Env.java
[ "public static final BufferProxy<ByteBuffer> PROXY_OPTIMAL;", "static final Lmdb LIB;", "static final jnr.ffi.Runtime RUNTIME;", "static boolean isSet(final int flags, final MaskedFlag test) {\n requireNonNull(test);\n return (flags & test.getMask()) == test.getMask();\n}", "static int mask(final MaskedFl...
import static java.lang.Boolean.getBoolean; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.Objects.requireNonNull; import static org.lmdbjava.ByteBufferProxy.PROXY_OPTIMAL; import static org.lmdbjava.EnvFlags.MDB_NOSUBDIR; import static org.lmdbjava.EnvFlags.MDB_RDONLY_ENV; import static...
/*- * #%L * LmdbJava * %% * Copyright (C) 2016 - 2021 The LmdbJava 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/LI...
final MDB_envinfo info = new MDB_envinfo(RUNTIME);
6