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
heroku/heroku.jar
heroku-api-integration-tests/src/test/java/com/heroku/api/parser/JsonParseTest.java
[ "public class App implements Serializable {\n\n private static final long serialVersionUID = 1L;\n\n String id;\n String name;\n Domain domain_name;\n String created_at;\n App.Owner owner;\n String web_url;\n App.Stack stack;\n String requested_stack;\n String git_url;\n String buil...
import com.heroku.api.App; import com.heroku.api.Heroku; import com.heroku.api.exception.ParseException; import com.heroku.api.request.app.AppInfo; import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import java.io.UnsupportedEncodingException; import java.lang.refl...
package com.heroku.api.parser; /** * @author mh * @since 04.01.12 */ public class JsonParseTest { private static final Type APP_LIST_TYPE = new TypeReference<List<App>>() { }.getType(); @DataProvider Object[][] getParsers() { return new Object[][]{{new GsonParser()}, {new JacksonParser(...
@Test(expectedExceptions = ParseException.class)
2
TooTallNate/Java-WebSocket
src/test/java/org/java_websocket/issues/Issue941Test.java
[ "public interface WebSocket {\n\n /**\n * sends the closing handshake. may be send in response to an other handshake.\n *\n * @param code the closing code\n * @param message the closing message\n */\n void close(int code, String message);\n\n /**\n * sends the closing handshake. may be send in res...
import java.util.concurrent.CountDownLatch; import org.java_websocket.WebSocket; import org.java_websocket.client.WebSocketClient; import org.java_websocket.framing.Framedata; import org.java_websocket.framing.PingFrame; import org.java_websocket.handshake.ClientHandshake; import org.java_websocket.handshake.ServerHand...
/* * Copyright (c) 2010-2020 Nathan Rajlich * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify...
public PingFrame onPreparePing(WebSocket conn) {
2
antest1/kcanotify
app/src/main/java/com/antest1/kcanotify/ToolsActivity.java
[ "public static final String DB_KEY_STARTDATA = \"key_startdata\";", "public static final int KCANOTIFY_DB_VERSION = 5;", "public static final String PREF_KCA_LANGUAGE = \"kca_language\";", "public final static String OPEN_TOOL = \"OpenTool\";", "public static String getStringPreferences(Context ctx, String ...
import android.content.Intent; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import androidx.core.content.ContextCompat; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.MenuItem; import...
package com.antest1.kcanotify; public class ToolsActivity extends AppCompatActivity { Toolbar toolbar; KcaDBHelper dbHelper; static Gson gson = new Gson(); LinearLayout view_fleetlist, view_shiplist, view_equipment, view_droplog, view_reslog, view_akashi, view_expcalc, view_expdtable; public ...
sendUserAnalytics(getApplicationContext(), OPEN_TOOL.concat("FleetInfo"), null);
3
InteractiveSystemsGroup/GamificationEngine-Kinben
src/main/java/info/interactivesystems/gamificationengine/entities/rewards/Points.java
[ "@Named\n@Stateless\npublic class GoalDAO {\n\t@PersistenceContext(unitName = PersistenceUnit.PROJECT)\n\tprivate EntityManager em;\n\n\t/**\n\t * Stores a new goal in the data base.\n\t * \n\t * @param goal\n\t * The goal which should be stored in the data base.\n\t * @return The id of the {@link Goal}....
import info.interactivesystems.gamificationengine.dao.GoalDAO; import info.interactivesystems.gamificationengine.dao.RuleDAO; import info.interactivesystems.gamificationengine.entities.Player; import info.interactivesystems.gamificationengine.entities.PlayerGroup; import info.interactivesystems.gamificationengine.entit...
package info.interactivesystems.gamificationengine.entities.rewards; /** * Points class serves as a Reward-subclass, that allocates points to a player. * Points are a volatile reward which can be earned more than one time. The * awarded points are added to the current ones of a player. */ @Entity @Discriminato...
public void addReward(Player player, GoalDAO goalDao, RuleDAO ruleDao) {
0
gallery/gallery-remote
com/gallery/GalleryRemote/GRAppletMini.java
[ "public class Gallery extends DefaultTreeModel implements Serializable, PreferenceNames {\n\tpublic static final String MODULE = \"Gallery\";\n\n\tString urlString = null;\n\tString username;\n\tString password;\n\tString alias;\n\tString key;\n\tString userAgent = \"Gallery Remote \" + GalleryRemote._().properties...
import com.gallery.GalleryRemote.model.Gallery; import com.gallery.GalleryRemote.model.Picture; import com.gallery.GalleryRemote.model.Album; import com.gallery.GalleryRemote.util.ImageUtils; import com.gallery.GalleryRemote.util.GRI18n; import com.gallery.GalleryRemote.util.DialogUtil; import com.gallery.GalleryRemote...
package com.gallery.GalleryRemote; /** * Created by IntelliJ IDEA. * User: paour * Date: Oct 30, 2003 */ public class GRAppletMini extends GRApplet implements GalleryRemoteCore, ActionListener, DocumentListener, ListSelectionListener, PreferenceNames { public static final String MODULE = "AppletMini"; JButt...
jStatusBar.setStatus(GRI18n.getString("MainFrame", "selPicToAdd"));
4
ethmobile/ethdroid
ethdroid/src/main/java/io/ethmobile/ethdroid/solidity/coder/SCoder.java
[ "public abstract class Utils {\n\n/* */\n\n /**\n * Check given method to extract it's return type or parametized type with the exact generic\n * type\n * (must be defined in parameters and method annotated with GenericTypeIndex ).\n * The return type can be the generic of an Observable.\n ...
import java.lang.reflect.Type; import java.util.AbstractMap; import java.util.List; import io.ethmobile.ethdroid.Utils; import io.ethmobile.ethdroid.exception.EthDroidException; import io.ethmobile.ethdroid.solidity.coder.decoder.SArrayDecoder; import io.ethmobile.ethdroid.solidity.coder.decoder.SDecoder; import io.eth...
package io.ethmobile.ethdroid.solidity.coder; /** * Created by gunicolas on 08/09/16. */ public abstract class SCoder { public static String encodeParams(Object[] parameters) { String encodedParameters = ""; for (Object parameter : parameters) { encodedParameters += encodeParam(pa...
Class<? extends SDecoder> decoder = SCoderMapper.getDecoderForClass(parameterClass);
3
hazelcast/spring-data-hazelcast
src/test/java/org/springframework/data/hazelcast/repository/custom/CustomRepoIT.java
[ "public class TestConstants {\n\n public static final String CLIENT_INSTANCE_NAME = \"hazelcast-instance-client\";\n public static final String SERVER_INSTANCE_NAME = \"hazelcast-instance-server\";\n\n public static final String SPRING_TEST_PROFILE_CLIENT_SERVER = \"client-server\";\n public static fina...
import org.junit.Test; import org.springframework.test.context.ActiveProfiles; import test.utils.TestConstants; import test.utils.TestDataHelper; import test.utils.domain.Movie; import test.utils.domain.Song; import test.utils.repository.custom.MovieRepository; import test.utils.repository.custom.MyTitleRepositoryFacto...
/* * Copyright (c) 2008-2018, Hazelcast, Inc. 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 required ...
List<Song> resultList = (List<Song>) result;
3
PunchThrough/bean-sdk-android
sdk/src/test/java/com/punchthrough/bean/sdk/utility/MiscTest.java
[ "public class NoEnumFoundException extends Exception {\n public NoEnumFoundException(String detailMessage) {\n super(detailMessage);\n }\n}", "public class EnumParse {\n\n /**\n * Denotes enums that provide a method \"int getRawValue()\" to get their unique int representation.\n */\n pu...
import com.punchthrough.bean.sdk.internal.BeanMessageID; import com.punchthrough.bean.sdk.internal.upload.sketch.BeanState; import com.punchthrough.bean.sdk.internal.exception.NoEnumFoundException; import com.punchthrough.bean.sdk.internal.utility.EnumParse; import org.junit.Test; import java.nio.ByteOrder; import stat...
package com.punchthrough.bean.sdk.utility; public class MiscTest { @Test public void testIntToByte() { assertThat(intToByte(0xFF)).isEqualTo((byte) 0xFF); } @Test
public void testEnumWithRawInt() throws NoEnumFoundException {
0
absimas/VideoClipper
app/src/main/java/com/simas/vc/MainActivity.java
[ "public class FFmpeg {\n\n\tprivate static final String TAG = \"ffmpeg\";\n\n\t// C method prototypes\n\tpublic static native Bitmap createPreview(String videoPath);\n\tstatic native int cFFmpeg(String[] args);\n\n\t/**\n\t *\n\t * @param outputFile output file (must already exist)\n\t * @param items ...
import android.animation.ObjectAnimator; import android.app.AlertDialog; import android.database.DataSetObserver; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.support.v7.widge...
/* * Copyright (c) 2015. Simas Abramovas * * This file is part of VideoClipper. * * VideoClipper is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) a...
setTitle(Utils.getString(R.string.app_name));
4
greghaskins/spectrum
src/main/java/com/greghaskins/spectrum/internal/hooks/Hooks.java
[ "static Block wrapWithReporting(final Description description,\n final RunReporting<Description, Failure> reporting,\n final Block block) {\n return () -> executeAndReport(description, reporting, block);\n}", "static NonReportingHook nonReportingHookFrom(final Hook hook) {\n return hook::accept;\n}", "@...
import static com.greghaskins.spectrum.internal.blocks.NotifyingBlock.wrapWithReporting; import static com.greghaskins.spectrum.internal.hooks.NonReportingHook.nonReportingHookFrom; import com.greghaskins.spectrum.Block; import com.greghaskins.spectrum.Variable; import com.greghaskins.spectrum.internal.RunReporting; im...
package com.greghaskins.spectrum.internal.hooks; /** * Collection of hooks. It is a linked list, but provides some helpers for * passing hooks down a generation. */ public class Hooks extends ArrayList<HookContext> { private static final long serialVersionUID = 1L; public Hooks once() { return filtered...
Variable<Boolean> hooksRememberedToRunTheInner = new Variable<>(false);
3
LetsCoders/MassiveTanks
src/main/java/pl/letscode/tanks/engine/Game.java
[ "public class GameModel {\n\n\tprivate final List<Player> players;\n\tprivate final List<TankObject> tanks;\n\tprivate final List<BulletObject> bullets;\n\tprivate final MapMatrix map;\n\t\n\t/* Constructors */\n\t\n\tGameModel(List<Player> players, List<TankObject> tanks,\n\t\t\tList<BulletObject> bullets, MapMatr...
import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.dyn4j.Listener; import org.dyn4j.dynamics.BodyFixture; import org.dyn4j.dynamics.World; import com.google.common.base.Objects; import pl.letscode.tanks.engine.model.GameModel; import pl.letscode.tanks.engine.objects.PhysicsObject...
package pl.letscode.tanks.engine; /** * Aggregate root, contains whole state. World object also has to be here as it * contains references to Body objects. * * Need to somehow keep them in sync. * * @author edhendil * */ public class Game { private final long id; private final GameModel model; pri...
public Collection<TankObject> getTanks() {
4
kunka/CoolAndroidBinding
src/com/kk/binding/view/BindFrameLayout.java
[ "public class BindEngine {\n private static final String TAG = \"BindEngine\";\n private static BindEngine bindEngine;\n private static IBindValueSetter bindValueSetter;\n private static String propertyDeclareClass = \"\";\n private Context mContext;\n\n public static BindEngine instance() {\n ...
import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.widget.FrameLayout; import com.android.binding.R; import com.kk.binding.kernel.BindEngine; import com.kk.binding.kernel.Binding; import com.kk.binding.kernel.DependencyProperty; import com.kk.binding....
/* * Copyright (C) 2013 kk-team.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 agre...
BindLog.setInDesignMode(isInEditMode());
5
imageprocessor/cv4j-desktop
desktop/src/main/java/com/cv4j/image/util/QRCodeScanner.java
[ "public class ConnectedAreaLabel {\n\n /**\n * default number of pixels\n */\n private static final int DEFAULT_PIXEL_NUM = 100;\n private static final boolean DEFAULT_FILTER_NOISE = false;\n\n private int mNumOfPixels;\n private boolean mFilterNoise;\n\n public ConnectedAreaLabel() {\n ...
import java.util.ArrayList; import java.util.List; import com.cv4j.core.binary.ConnectedAreaLabel; import com.cv4j.core.binary.MorphOpen; import com.cv4j.core.binary.Threshold; import com.cv4j.core.datamodel.ByteProcessor; import com.cv4j.core.datamodel.CV4JImage; import com.cv4j.core.datamodel.ImageProcessor; import c...
/* * Copyright (c) 2017 - present, CV4J Contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
mOpen.process(src, new Size(n1, n2)); // Y方向开操作
7
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<GlucoseDataSet> glucoseDataSets = Utils.mergeGlucoseDataRecords(sgvList, sensorList);
1
ghelmling/beeno
src/java/meetup/beeno/Criteria.java
[ "public class ColumnMatchFilter implements Filter {\n\n\t/** Comparison operators. */\n\tpublic enum CompareOp {\n\t\t/** less than */\n\t\tLESS,\n\t\t/** less than or equal to */\n\t\tLESS_OR_EQUAL,\n\t\t/** equals */\n\t\tEQUAL,\n\t\t/** not equal */\n\t\tNOT_EQUAL,\n\t\t/** greater than or equal to */\n\t\tGREAT...
import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.ArrayList; import java.util.List; import meetup.beeno.filter.ColumnMatchFilter; import meetup.beeno.filter.WhileMatchFilter; import meetup.beeno.mapping.EntityInfo; import meetup.beeno.ma...
package meetup.beeno; /** * Utility for building up criteria for HBaseEntity queries. * * @author garyh * */ public class Criteria implements Externalizable { private static Logger log = Logger.getLogger(Criteria.class); private List<Expression> expressions = new ArrayList<Expression>(); public Criteria...
public abstract Filter getFilter(EntityInfo info) throws HBaseException;
2
gamblore/AndroidPunk
sample/AndroidPunkTripZone/src/com/gamblore/tripzone/objects/Player.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.AtlasGraphic; import net.androidpunk.graphics.atlas.SpriteMap; import net.androidpunk.utils.Input; import android.graphics.Color; import android.graphics.Point; import com.gamblore.tripzone.Main; import com.gamblore.tripzone.OgmoEditorWorld;
package com.gamblore.tripzone.objects; public abstract class Player extends Physics { public static final String TYPE_PLAYER = "Player"; public static boolean INPUT_LEFT = false; public static boolean INPUT_RIGHT = false; public static boolean INPUT_JUMP = false; public static boolean LAST_INPU...
if (ag instanceof SpriteMap) {
2
I8C/sonar-flow-plugin
sonar-flow-plugin/src/main/java/be/i8c/codequality/sonar/plugins/sag/webmethods/flow/FlowPlugin.java
[ "public class FlowRulesDefinition implements RulesDefinition {\r\n\r\n private static final String RESOURCE_BASE_PATH = \"/org/sonar/l10n/flow/rules/flow\";\r\n\r\n protected static final String KEY = \"i8cFlow\";\r\n protected static final String NAME = \"I8cFlow\";\r\n\r\n public static final String REPO_KEY ...
import be.i8c.codequality.sonar.plugins.sag.webmethods.flow.rule.FlowRulesDefinition; import be.i8c.codequality.sonar.plugins.sag.webmethods.flow.rule.FlowSquidSensor; import be.i8c.codequality.sonar.plugins.sag.webmethods.flow.settings.FlowLanguageProperties; import be.i8c.codequality.sonar.plugins.sag.webmethods.f...
/* * i8c * Copyright (C) 2016 i8c NV * mailto:contact AT i8c DOT be * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option...
builder.add(FlowRulesDefinition.class, FlowSquidSensor.class);
0
Sleeksnap/sleeksnap
src/org/sleeksnap/uploaders/generic/LocalFileUploader.java
[ "public class ImageUpload implements Upload {\n\t\n\t/**\n\t * The BufferedImage we are uploading\n\t */\n\tprivate BufferedImage image;\n\t\n\tpublic ImageUpload(BufferedImage image) {\n\t\tthis.image = image;\n\t}\n\n\t@Override\n\tpublic InputStream asInputStream() throws IOException {\n\t\treturn ImageUtil.toIn...
import java.io.File; import java.io.FileWriter; import javax.imageio.ImageIO; import org.sleeksnap.upload.ImageUpload; import org.sleeksnap.upload.TextUpload; import org.sleeksnap.upload.Upload; import org.sleeksnap.uploaders.Uploader; import org.sleeksnap.util.Util; import org.sleeksnap.util.Utils.FileUtils;
package org.sleeksnap.uploaders.generic; /** * An uploader to save images and text to local files (Working Directory/local/<images/text>) * * @author Nikki * */ public class LocalFileUploader extends GenericUploader { /** * Local base directory */ private static final File LOCAL_BASE_DIR = new File(Ut...
private final Uploader<?>[] uploaders = new Uploader<?>[] { new ImageLocalFileUploader(), new TextLocalFileUploader() };
3
bencvt/LibShapeDraw
projects/demos/src/main/java/libshapedraw/demos/mod_LSDDemoEvents.java
[ "public class LibShapeDraw {\n private final Set<Shape> shapes;\n private final Set<Shape> shapesReadonly;\n private final Set<LSDEventListener> eventListeners;\n private final Set<LSDEventListener> eventListenersReadonly;\n private final String instanceId;\n private final String ownerId;\n pri...
import libshapedraw.LibShapeDraw; import libshapedraw.event.LSDEventListener; import libshapedraw.event.LSDGameTickEvent; import libshapedraw.event.LSDPreRenderEvent; import libshapedraw.event.LSDRespawnEvent; import libshapedraw.primitive.Color; import libshapedraw.primitive.ReadonlyVector3; import libshapedraw.primit...
package libshapedraw.demos; /** * Demonstrates a couple basic things you can do with events: * 1) automatically clear all shapes owned by this mod when respawning; and * 2) dynamically create and update shapes, in this case based off the player's * position * <p> * This mod implements the LSDEventListener in...
public void onGameTick(LSDGameTickEvent event) {
2
bingyulei007/bingexcel
excel/src/test/java/com/chinamobile/excel/ReadTestEventModel5.java
[ "public class AbstractFieldConvertor implements FieldValueConverter {\n\n\t@Override\n\tpublic boolean canConvert(Class<?> clz) {\n\n\t\treturn false;\n\t}\n\n\t@Override\n\tpublic OutValue toObject(Object source, ConverterHandler converterHandler) {\n\t\tif(source==null){\n\t\t\treturn null;\n\t\t}\n\t\treturn new...
import java.io.File; import java.lang.reflect.Type; import java.net.URISyntaxException; import java.net.URL; import java.text.ParseException; import java.util.Date; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import com.bing.excel.annotation.BingConvertor; import com.bing.excel.annotation.CellCo...
package com.chinamobile.excel; /** * @author shizhongtao * * date 2016-3-23 * Description: */ public class ReadTestEventModel5 { @Test public void readExcelTest() throws URISyntaxException { // InputStream in = Person.class.getResourceAsStream("/person.xlsx"); URL url = Salary.class.getResource("/sala...
public Object fromString(String cell, ConverterHandler converterHandler,Type type) {
4
EvilBT/HDImageView
library/src/main/java/xyz/zpayh/hdimage/HDImageView.java
[ "public interface AnimatorListener {\n /**\n * <p>Notifies the start of the animation.</p>\n *\n * @param animation The started animation.\n */\n void onAnimationStart(ValueAnimator animation);\n\n /**\n * <p>Notifies the end of the animation. This callback is not invoked\n * for an...
import android.content.Context; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect...
/* Copyright 2013-2015 David Morrissey Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
private BitmapDataSource mBitmapDataSource;
4
dlcs/the-mathmos-server
the-mathmos-server/src/main/java/com/digirati/themathmos/service/impl/OASearchServiceImpl.java
[ "public class ServiceResponse<T> implements Serializable{\n\n /**\n *\n */\n private static final long serialVersionUID = 8231671973667011469L;\n\n public enum Status {\n OK, NOT_FOUND, CACHE_KEY_MISS, ILLEGAL_MODIFICATION, NON_CONFORMANT\n }\n\n private final Status status;\n priva...
import java.util.Map; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; import org.springframework.stereotype.Serv...
package com.digirati.themathmos.service.impl; @Service(OASearchServiceImpl.OA_SERVICE_NAME) public class OASearchServiceImpl extends AnnotationSearchServiceImpl implements OASearchService{ private static final Logger LOG = Logger.getLogger(OASearchServiceImpl.class); public static final String OA_SERV...
Map <String, Object> emptyMap = annotationUtils.returnEmptyResultSet(queryString,false, new PageParameters(),true);
2
senseobservationsystems/sense-android-library
sense-android-library/src/nl/sense_os/service/motion/MotionBurstSensor.java
[ "public class SensePrefs {\r\n /**\r\n * Keys for the authentication-related preferences of the Sense Platform\r\n */\r\n public static class Auth {\r\n /**\r\n * Key for login preference for session cookie.\r\n * \r\n * @see SensePrefs#AUTH_PREFS\r\n */\r\n ...
import java.util.ArrayList; import java.util.List; import nl.sense_os.service.R; import nl.sense_os.service.constants.SenseDataTypes; import nl.sense_os.service.constants.SensePrefs; import nl.sense_os.service.constants.SensePrefs.Main.Motion; import nl.sense_os.service.constants.SensorData; import nl.sense_os.service....
package nl.sense_os.service.motion; public class MotionBurstSensor extends BaseDataProducer implements DataConsumer { private static final String TAG = "MotionBurstSensor"; private static final long DEFAULT_BURST_DURATION = 3 * 1000; private long burstDuration = 3 * 1000; private int SENSOR_TYPE = 0; private...
i.putExtra(DataPoint.SENSOR_NAME, SENSOR_NAME);
3
enasequence/cramtools
src/main/java/net/sf/cram/Cram2Bam.java
[ "public class IndexAggregate {\n\tprivate static Log log = Log.getInstance(IndexAggregate.class);\n\tprivate BAMIndex bai;\n\tprivate List<CramIndex.Entry> crai;\n\n\tpublic static IndexAggregate forDataFile(SeekableStream stream, SAMSequenceDictionary dictionary)\n\t\t\tthrows IOException {\n\t\tString path = stre...
import htsjdk.samtools.Defaults; import htsjdk.samtools.IndexAggregate; import htsjdk.samtools.SAMFileWriter; import htsjdk.samtools.SAMFileWriterFactory; import htsjdk.samtools.SAMRecord; import htsjdk.samtools.SAMSequenceRecord; import htsjdk.samtools.ValidationStringency; import htsjdk.samtools.cram.build.ContainerP...
/******************************************************************************* * Copyright 2013 EMBL-EBI * * 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...
is = Utils.openCramInputStream(params.cramURL, params.decrypt, params.password);
4
zer0Black/zer0MQTTServer
zer0MQTTServer/src/com/syxy/protocol/mqttImp/process/Impl/dataHandler/MapDBPersistentStore.java
[ "public enum QoS {\n\tAT_MOST_ONCE (0),\n\tAT_LEAST_ONCE (1),\n\tEXACTLY_ONCE (2),\n\tRESERVE(3);\n\t\n\tfinal public int val;\n\t\n\tQoS(int val) {\n\t\tthis.val = val;\n\t}\n\t\n\t/**\n\t * 获取类型对应的值\n\t * @return int\n\t * @author zer0\n\t * @version 1.0\n\t * @date 2016-3-3\n\t */\n\tpublic int value() {\n\t\t...
import io.netty.buffer.ByteBuf; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentMap; import org.apach...
} Set<Subscription> subs = persistentSubscriptionStore.get(clientID); Subscription existingSubscription = null; for (Subscription subscription : subs) { String topicfilter = subscription.getTopicFilter(); if (topicfilter.equals(topic)) { existingSubscription = subscription; } } if (existi...
if (SubscribeStore.matchTopics(entry.getKey(), topic)) {
5
DeemOpen/excord
src/main/java/com/deem/excord/controller/RequirementController.java
[ "@Entity\r\n@Table(name = \"ec_requirement\")\r\npublic class EcRequirement implements Serializable {\r\n\r\n private static final long serialVersionUID = 1L;\r\n @Id\r\n @GeneratedValue(strategy = GenerationType.IDENTITY)\r\n @Basic(optional = false)\r\n @Column(name = \"id\")\r\n private Long id...
import com.deem.excord.domain.EcRequirement; import com.deem.excord.domain.EcTestcase; import com.deem.excord.domain.EcTestcaseRequirementMapping; import com.deem.excord.repository.RequirementRepository; import com.deem.excord.repository.TestCaseRepository; import com.deem.excord.repository.TestcaseRequirementRepo...
package com.deem.excord.controller; @Controller public class RequirementController { private static final Logger LOGGER = LoggerFactory.getLogger(RequirementController.class); @Autowired RequirementRepository rDao; @Autowired
TestcaseRequirementRepository tcrDao;
5
Medo42/Gmk-Splitter
src/com/ganggarrison/gmdec/xml/ActionXmlFormat.java
[ "public class XmlReader {\r\n\tprivate final Document domDocument;\r\n\tprivate Element currentParent = null;\r\n\tprivate Element currentChild = null;\r\n\r\n\tpublic XmlReader(File xmlFile) throws IOException {\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tf...
import java.util.ArrayList; import java.util.List; import org.lateralgm.file.GmFile; import org.lateralgm.resources.GmObject; import org.lateralgm.resources.InstantiableResource; import org.lateralgm.resources.Resource; import org.lateralgm.resources.ResourceReference; import org.lateralgm.resources.library.LibAction; ...
/* * Copyright (C) 2010 Medo <smaxein@googlemail.com> * Copyright (C) 2008, 2009 IsmAvatar <IsmAvatar@gmail.com> * * This file is part of GmkSplitter. * GmkSplitter is free software and comes with ABSOLUTELY NO WARRANTY. * See LICENSE for details. */ package com.ganggarrison.gmdec.xml; public class ActionXm...
} else if (GmkSplitter.convertLineEndings && la.execType == Action.EXEC_CODE && arg.kind == Argument.ARG_STRING) {
4
GoogleCloudPlatform/grpc-gcp-java
end2end-test-examples/firestore/src/main/java/org/roguewave/grpc/apimethods/CreateIndex.java
[ "public final class CreateIndexRequest extends\n com.google.protobuf.GeneratedMessageV3 implements\n // @@protoc_insertion_point(message_implements:google.firestore.admin.v1beta1.CreateIndexRequest)\n CreateIndexRequestOrBuilder {\nprivate static final long serialVersionUID = 0L;\n // Use CreateIndexRequ...
import com.google.firestore.admin.v1beta1.CreateIndexRequest; import com.google.firestore.admin.v1beta1.FirestoreAdminGrpc.FirestoreAdminBlockingStub; import com.google.firestore.admin.v1beta1.Index; import com.google.firestore.admin.v1beta1.IndexField; import com.google.firestore.v1beta1.FirestoreGrpc; import com.goog...
package org.roguewave.grpc.apimethods; public class CreateIndex { public void createIndexCall() { System.out.println(":: Creating New Index ::"); FirestoreAdminBlockingStub blockingStub = new GRPCFirebaseAdminClientFactory().createFirebaseAdminClient().getBlockingStub(); String indexF...
Menu menu = new Menu();
6
Simonsator/BungeecordPartyAndFriends
src/main/java/de/simonsator/partyandfriends/party/command/PartyChat.java
[ "public abstract class OnlyTopCommand extends TopCommand {\n\t/**\n\t * @param pCommandNames The command name and the different aliases of this command.\n\t * By these names the method can be called.\n\t * @param pPermission The permission which is needed to execute this command.\n\t * ...
import de.simonsator.partyandfriends.api.OnlyTopCommand; import de.simonsator.partyandfriends.api.adapter.BukkitBungeeAdapter; import de.simonsator.partyandfriends.api.events.message.PartyMessageEvent; import de.simonsator.partyandfriends.api.pafplayers.OnlinePAFPlayer; import de.simonsator.partyandfriends.api.party.Pa...
package de.simonsator.partyandfriends.party.command; /** * The /p command * * @author Simonsator * @version 1.0.0 */ public class PartyChat extends OnlyTopCommand { private static PartyChat instance; public PartyChat(String[] pCommandNames, String pPrefix) { super(pCommandNames, Main.getInstance().getGene...
BukkitBungeeAdapter.getInstance().callEvent(partyMessageEvent);
1
greengrowapps/ggaforms
GGAForms/ggaforms/src/main/java/com/greengrowapps/ggaforms/validation/validator/MinLengthValidator.java
[ "public interface FormInput<T> {\n\n void setOnInputChangedListener(OnInputChangedListener listener);\n\n void setError(ValidationError error);\n\n Class<T> getType();\n T getValue();\n void setValue(T value);\n\n ValidationError getError();\n}", "public class ExceedsMaxLengthValidationError ext...
import com.greengrowapps.ggaforms.fields.FormInput; import com.greengrowapps.ggaforms.validation.errors.ExceedsMaxLengthValidationError; import com.greengrowapps.ggaforms.validation.errors.ExceedsMinLengthValidationError; import com.greengrowapps.ggaforms.validation.errors.ValidationError; import com.greengrowapps.ggaf...
package com.greengrowapps.ggaforms.validation.validator; public class MinLengthValidator extends ErrorProvidedValidator<ExceedsMinLengthValidationError> { int minLength = 0;
public MinLengthValidator(FormInput input, ValidationErrorProvider errorProvider, int length) {
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
wheat7/Cashew
app/src/main/java/com/wheat7/cashew/fragment/DailyFragment.java
[ "public class InfoActivity extends BaseActivity<ActivityInfoBinding> {\n\n\n @Override\n public int getLayoutId() {\n return R.layout.activity_info;\n }\n\n @Override\n public void initView(Bundle savedInstanceState) {\n getBinding().setAct(this);\n getBinding().setVm(new InfoVie...
import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.View; import android.widget.Toast; import com.wheat7.cashew.R; import com.wheat7.cashew.activity.InfoActivity; import com.wheat7.cashew.adapter.BaseFragmentPageAdapter;...
package com.wheat7.cashew.fragment; /** * Created by wheat7 on 2017/8/5. */ public class DailyFragment extends BaseFragment<FragmentDailyBinding> { private ProgressDialog mProgressDialog; @Override public int getLayoutId() { return R.layout.fragment_daily; } @Override public v...
private class BaseResFunc<T> implements io.reactivex.functions.Function<BaseRes<T>, T> {
5
Bpazy/finalspeed
src/main/java/net/fs/rudp/Receiver.java
[ "public class AckListMessage extends Message {\r\n ArrayList<Integer> ackList;\r\n byte[] dpData = null;\r\n int lastRead;\r\n\r\n int r1, r2, r3, s1, s2, s3;\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n public AckListMessage(long connId, ArrayList ackList, int lastRead,\r\n ...
import net.fs.rudp.message.AckListMessage; import net.fs.rudp.message.CloseMessage_Conn; import net.fs.rudp.message.CloseMessage_Stream; import net.fs.rudp.message.DataMessage; import net.fs.utils.MessageCheck; import java.net.DatagramPacket; import java.net.InetAddress; import java.util.ArrayList; import java....
package net.fs.rudp; public class Receiver { static int c; final Object availOb = new Object(); public InetAddress dstIp; public int dstPort; public int nw; ConnectionUDP conn; Sender sender; HashMap<Integer, DataMessage> receiveTable = new HashMap<>(); int lastRead...
AckListMessage alm = new AckListMessage(dp);
0
ZhangFly/WTFSocket_Server_JAVA
src/wtf/socket/secure/strategy/impl/WTFSocketSendPermissionSecureStrategyImpl.java
[ "public final class WTFSocketServer {\n\n /**\n * Spring 上下文\n */\n private ApplicationContext spring = new ClassPathXmlApplicationContext(\"spring.wtf.socket.xml\");\n\n /**\n * 消息调度组件\n * 根据消息的头信息将消息投递到指定的目的地\n */\n @Resource()\n private WTFSocketScheduler scheduler;\n\n /**\...
import org.springframework.stereotype.Component; import wtf.socket.WTFSocketServer; import wtf.socket.exception.WTFSocketException; import wtf.socket.exception.normal.WTFSocketPermissionDeniedException; import wtf.socket.protocol.WTFSocketMsg; import wtf.socket.routing.item.WTFSocketRoutingFormalItem; import wtf.socket...
package wtf.socket.secure.strategy.impl; /** * 消息是否有权限进行发送 * <p> * Created by ZFly on 2017/4/22. */ @Component public final class WTFSocketSendPermissionSecureStrategyImpl extends WTFSocketBaseSecureStrategyImpl { @Override public void check(WTFSocketServer context, WTFSocketMsg msg) throws WTFSocketExce...
final WTFSocketRoutingFormalItem source = (WTFSocketRoutingFormalItem) context.getRouting().getItem(msg.getFrom());
4
jameskennard/mockito-collections
mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/internal/Initialiser.java
[ "public class CollectionFactory {\n\n\t/**\n\t * Creates a new {@link Collection} of the specified type and populates with the specified contents. If the contents\n\t * is <code>null</code> the new {@link Collection} will be empty. The returned {@link Collection} will retain the\n\t * order of the elements where ev...
import java.lang.reflect.Field; import java.util.Collection; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import uk.co.webamoeba.mockito.collections.inject.CollectionFactory; import uk.co.webamoeba.mockito.collections.inject.CollectionInjector; import uk.co.webamoeba.m...
package uk.co.webamoeba.mockito.collections.internal; /** * Utility class, comparable to {@link MockitoAnnotations}, which orchestrates the injection of {@link Collection * Collections} of Mockito Mocks. This class will scan an {@link Object}, typically a Mockito style unit test, and * inject the values of {@lin...
MockStrategy mockStrategy = new DefaultMockStrategy();
6
marcb1/droid-ssh
scp/src/main/java/marc/scp/activities/FolderPairsList.java
[ "public class Constants\n{\n public final static String LOG_PREFIX = \"DROID_SSH.\";\n\n public final static String PREFERENCE_PARCEABLE = \"com.whomarc.scp.PREFERENCE\";\n public final static String FILE_PARCEABLE = \"com.whomarc.scp.FILE\";\n\n // terminal constants\n public final static String RIG...
import android.app.Activity; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.os.Parcelable; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.Button; import andr...
package marc.scp.activities; /** * Created by Marc on 5/14/14. */ public class FolderPairsList extends Activity { private ListView listView; private FileSync selectedFolderPair; private Database dbInstance; private Dialogs DialogsInstance; private View lastSelectedview; protected void ...
new YesNoDialog()
2
thlcly/Mini-JVM
src/main/java/com/aaront/exercise/jvm/commands/InvokeVirtualCommand.java
[ "@Data\npublic class ClassFile {\n private String magicNumber;\n private int majorVersion;\n private int minorVersion;\n private ClassIndex classIndex;\n private InterfaceIndex interfaceIndex;\n private ConstantPool constantPool;\n private List<ClassAccessFlag> accessFlags;\n private List<Fi...
import com.aaront.exercise.jvm.ClassFile; import com.aaront.exercise.jvm.constant.ConstantPool; import com.aaront.exercise.jvm.constant.MethodRefConstant; import com.aaront.exercise.jvm.engine.ExecutionResult; import com.aaront.exercise.jvm.engine.JavaObject; import com.aaront.exercise.jvm.engine.MethodArea; import com...
package com.aaront.exercise.jvm.commands; /** * @author tonyhui * @since 17/6/17 */ public class InvokeVirtualCommand extends TwoOperandCommand { public InvokeVirtualCommand(ClassFile clzFile, String opCode, int operand1, int operand2) { super(clzFile, opCode, operand1, operand2); } @Overrid...
MethodRefConstant methodRefConstant = (MethodRefConstant) frame.getPool().getConstantInfo(methodIndex);
2
bushidowallet/bushido-java-core
src/main/java/com/bushidowallet/core/bitcoin/tx/input/PublicKeyHashInput.java
[ "public class ECKey {\n\n public static final X9ECParameters curve = SECNamedCurves.getByName(\"secp256k1\");\n public static final ECDomainParameters params = new ECDomainParameters(curve.getCurve(), curve.getG(), curve.getN(), curve.getH());\n\n private BigInteger priv;\n private byte[] pub;\n priv...
import com.bushidowallet.core.bitcoin.bip32.ECKey; import com.bushidowallet.core.bitcoin.script.Script; import com.bushidowallet.core.bitcoin.tx.SigHash; import com.bushidowallet.core.bitcoin.tx.Transaction; import com.bushidowallet.core.bitcoin.tx.TransactionSignature; import java.util.ArrayList; import java.util.Arra...
package com.bushidowallet.core.bitcoin.tx.input; /** * Created by Jesion on 2015-04-01. */ public class PublicKeyHashInput extends Input { private static int SCRIPT_MAX_SIZE = 73 + 34; @Override public int estimateSize() throws Exception { return SCRIPT_MAX_SIZE; } @Override
public List<TransactionSignature> getSignatures(Transaction tx, ECKey key, int index, int sigType, byte[] hashData) throws Exception {
0
epam/parso
src/main/java/com/epam/parso/impl/SasFileParser.java
[ "public class Column {\n /**\n * The column id.\n */\n private final int id;\n\n /**\n * The column name.\n */\n private String name;\n\n /**\n * The column label.\n */\n private String label;\n\n /**\n * The column format.\n */\n private ColumnFormat format;\...
import com.epam.parso.Column; import com.epam.parso.ColumnFormat; import com.epam.parso.ColumnMissingInfo; import com.epam.parso.SasFileProperties; import com.epam.parso.date.OutputDateType; import com.epam.parso.date.SasTemporalFormatter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.DataInpu...
} subheaderPointerLength = sasFileProperties.isU64() ? SUBHEADER_POINTER_LENGTH_X64 : SUBHEADER_POINTER_LENGTH_X86; alignCorrection = (bitOffset + SUBHEADER_POINTERS_OFFSET + currentPageSubheadersCount * subheaderPointerLeng...
column.setFormat(new ColumnFormat(missedInfo));
1
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 i = new Intent(parentActivity, Preferences.class);
3
goldmansachs/reladomo-kata
main-kata/src/test/java/kata/test/ExercisesBiTemporal.java
[ "public class AccountBalance extends AccountBalanceAbstract\n{\n\tpublic AccountBalance(Timestamp businessDate, Timestamp processingDate)\n\t{\n\t\tsuper(businessDate,processingDate);\n\t\t// You must not modify this constructor. Mithra calls this internally.\n\t\t// You can call this constructor. You can also add ...
import java.sql.Timestamp; import org.eclipse.collections.api.block.function.primitive.DoubleFunction; import org.eclipse.collections.api.list.MutableList; import org.eclipse.collections.impl.list.mutable.FastList; import org.eclipse.collections.impl.set.mutable.UnifiedSet; import org.eclipse.collections.impl.test.Veri...
/* Copyright 2018 Goldman Sachs. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
AccountBalanceList balances = null;
1
gen2brain/bukanir
android/src/main/java/com/bukanir/android/activities/SearchActivity.java
[ "public class Settings {\n\n private SharedPreferences preferences;\n\n public Settings(Context context) {\n Context context1 = context.getApplicationContext();\n preferences = PreferenceManager.getDefaultSharedPreferences(context1);\n }\n\n public int listCount() {\n return Integer...
import android.app.SearchManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.os.Build; import android.support.v4.app.FragmentTransaction; import android.support.v4.view.MenuItemCompat; import android.support.v7.app.App...
package com.bukanir.android.activities; public class SearchActivity extends AppCompatActivity { public static final String TAG = "SearchActivity"; private boolean twoPane;
private Settings settings;
0
JulienDev/BugDroid
app/src/main/java/fr/julienvermet/bugdroid/ui/ProductsListFragment.java
[ "public class BugDroidApplication extends Application implements OnSharedPreferenceChangeListener {\n\n // Android\n public static Context mContext;\n private static SharedPreferences mPrefs;\n\n // Objects\n public static Instance mCurrentInstance;\n\n @Override\n public void onCreate() {\n ...
import java.util.ArrayList; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Handler.Callback; import android.os.Message; import android.os.Messenger; import android.view.LayoutInflater; import android.view.View; import android.view.Vi...
/* * Copyright (C) 2013 Julien Vermet * * 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 writ...
Intent intent = ProductsIntentService.getIntent(getActivity(), mInstance, false);
4
haogefeifei/odoo-mobile-building
app/src/main/java/com/haogefeifei/odoo/api/OdooApi.java
[ "public class OdooRpcException extends Exception {\n\n private static final long serialVersionUID = 1L;\n\n private String exceptionMessage = \"\"; //错误信息\n\n public static final String XML_ERROR = \"服务器暂时无法您的处理请求\";\n public static final String FOUND_SERVER_ERROR = \"无法与服务器通信\";\n public static fina...
import com.haogefeifei.odoo.api.inf.OdooRpcException; import com.haogefeifei.odoo.api.inf.RpcApiInf; import com.haogefeifei.odoo.common.utils.LogUtil; import com.haogefeifei.odoo.common.utils.Page; import com.haogefeifei.odoo.config.LoginParameters; import org.xmlrpc.android.XMLRPCClient; import org.xmlrpc.android.XMLR...
package com.haogefeifei.odoo.api; /** * 提供OdooORM的操作方法 * Created by feifei on 15/12/28. */ public class OdooApi implements RpcApiInf{ private static String TAG = "OdooApi"; private static OdooApi instance = new OdooApi(); public URL mUrl; private OdooConnect conn; //XML-RPC连接对象 private Ha...
return LoginParameters.FAILURE;
4
belaban/jgroups-raft
tests/junit-functional/org/jgroups/tests/ReplicatedStateMachineTest.java
[ "@MBean(description=\"Protocol performing leader election according to the RAFT paper\")\npublic class ELECTION extends Protocol {\n // when moving to JGroups -> add to jg-protocol-ids.xml\n protected static final short ELECTION_ID = 520;\n\n // When moving to JGroups -> add to jg-magic-map.xml\n pro...
import org.jgroups.Global; import org.jgroups.JChannel; import org.jgroups.protocols.raft.ELECTION; import org.jgroups.protocols.raft.RAFT; import org.jgroups.protocols.raft.REDIRECT; import org.jgroups.raft.blocks.ReplicatedStateMachine; import org.jgroups.tests.VoteTest.DummyStateMachine; import org.jgroups.util.Util...
package org.jgroups.tests; @Test(groups=Global.FUNCTIONAL,singleThreaded=true) public class ReplicatedStateMachineTest { protected static final String CLUSTER=ReplicatedStateMachineTest.class.getSimpleName(); protected static final List<String> mbrs=Arrays.asList("A", "B", "C", "D"); public void testEquals() th...
RAFT raft=new RAFT().members(mbrs).raftId(name).stateMachine(new DummyStateMachine())
1
jaychang0917/SimpleRecyclerView
app/src/main/java/com/jaychang/demo/srv/AutoLoadMoreActivity.java
[ "public class BookCell extends SimpleCell<Book, BookCell.ViewHolder>\n implements Updatable<Book> {\n\n private static final String KEY_TITLE = \"KEY_TITLE\";\n private boolean showHandle;\n\n public BookCell(Book item) {\n super(item);\n }\n\n @Override\n protected int getLayoutRes() {\n return R.layo...
import android.os.Bundle; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.SeekBar; import android.widget.TextView; import com.jaychang.demo.srv.cell.BookCell; import com.jaychang.demo.srv.model.Book; import com.jaychang.demo.srv.util.DataUtils; import com.jaychang.demo.srv.ut...
package com.jaychang.demo.srv; public class AutoLoadMoreActivity extends BaseActivity { @BindView(R.id.recyclerView) SimpleRecyclerView recyclerView; @BindView(R.id.loadMoreToTopCheckbox) CheckBox loadMoreToTopCheckbox; @BindView(R.id.thresholdTextView) TextView thresholdTextView; @BindView(R.id.thr...
public void onSuccess(List<Book> books) {
1
bafomdad/uniquecrops
com/bafomdad/uniquecrops/entities/EntityEulaBook.java
[ "@Mod(modid=UniqueCrops.MOD_ID, name=UniqueCrops.MOD_NAME, version=UniqueCrops.VERSION)\npublic class UniqueCrops {\n\n\tpublic static final String MOD_ID = \"uniquecrops\";\n\tpublic static final String MOD_NAME = \"Unique Crops\";\n\tpublic static final String VERSION = \"0.2.02\";\n\t\n\t@SidedProxy(clientSide=\...
import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.item.ItemStack; imp...
package com.bafomdad.uniquecrops.entities; public class EntityEulaBook extends EntityPotion { public EntityEulaBook(World world) { super(world); } public EntityEulaBook(World worldIn, EntityLivingBase throwerIn, ItemStack potionDamageIn) { super(worldIn, throwerIn, potionDamageIn); } @Override ...
ItemStack stack = UCItems.generic.createStack(EnumItems.EULA);
1
teivah/TIBreview
src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/CProcessorRendezvousResourceCertifiedTest.java
[ "public class TIBResource {\n\tprivate String filePath;\n\tprivate String type;\n\t\n\tprivate static final String REQUEST_GET_TYPE = \"/jndi:namedResource/@type\";\n\t\n\tpublic TIBResource(String filePath) throws Exception {\n\t\tthis.filePath = filePath;\n\t\tthis.type = Util.xpathEval(filePath, Constants.RESOUR...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import org.apache.log4j.Logger; import org.junit.Test; import com.tibco.exchange.tibreview.common.TIBResource; import com.tibco.exchange.tibreview.engine.Context; import com.tibco.exchange.tibreview.mod...
package com.tibco.exchange.tibreview.processor.resourcerule; public class CProcessorRendezvousResourceCertifiedTest { private static final Logger LOGGER = Logger.getLogger(CProcessorRendezvousResourceCertifiedTest.class); @Test public void testCProcessorRendezvousResourceCertifiedTest() { TIBResou...
Tibrules tibrules= RulesParser.getInstance().parseFile("src/test/resources/FileResources/xml/RendezvousResourceCertified.xml");
5
Hevelian/hevelian-olastic
olastic-core/src/test/java/com/hevelian/olastic/core/api/edm/provider/MultyElasticIndexCsdlEdmProviderTest.java
[ "public interface NestedTypeMapper {\r\n\r\n /**\r\n * Get's complex types for specific Elasticsearch index.\r\n * \r\n * @param index\r\n * index name\r\n * @return list of complex types\r\n * @throws ODataException\r\n * if any error occurred\r\n */\r\n ...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.doAns...
@BeforeClass public static void setUpBeforeClass() { indices = new HashSet<String>(); indices.add(AUTHORS_INDEX); indices.add(WRITERS_INDEX); } private static String addNamespace(String... path) { StringBuffer result = new StringBuffer(DefaultElasticToCsdlMapper....
when(metaDataProvider.getMappingsForField(AUTHORS_INDEX, ElasticConstants.PARENT_PROPERTY))
1
R2RML-api/R2RML-api
r2rml-api-jena-binding/src/test/java/jenaTest/InMemoryStructureCreation1_Test.java
[ "public class JenaR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static JenaR2RMLMappingManager INSTANCE = new JenaR2RMLMappingManager(new JenaRDF());\n\n private JenaR2RMLMappingManager(JenaRDF rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod...
import eu.optique.r2rml.api.model.LogicalTable; import eu.optique.r2rml.api.MappingFactory; import eu.optique.r2rml.api.model.ObjectMap; import eu.optique.r2rml.api.model.PredicateMap; import eu.optique.r2rml.api.model.PredicateObjectMap; import eu.optique.r2rml.api.model.SubjectMap; import eu.optique.r2rml.api.m...
/******************************************************************************* * Copyright 2013, the Optique Consortium * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http...
PredicateObjectMap pom = mfact.createPredicateObjectMap(pred, obm);
5
bwajtr/java-persistence-frameworks-comparison
src/main/java/com/clevergang/dbtests/repository/impl/jooq/generated/Public.java
[ "@Generated(\n value = {\n \"http://www.jooq.org\",\n \"jOOQ version:3.8.4\"\n },\n comments = \"This class is generated by jOOQ\"\n)\n@SuppressWarnings({ \"all\", \"unchecked\", \"rawtypes\" })\npublic class Company extends TableImpl<CompanyRecord> {\n\n private static final long serialVe...
import com.clevergang.dbtests.repository.impl.jooq.generated.tables.Company; import com.clevergang.dbtests.repository.impl.jooq.generated.tables.Department; import com.clevergang.dbtests.repository.impl.jooq.generated.tables.Employee; import com.clevergang.dbtests.repository.impl.jooq.generated.tables.Project; import c...
/** * This class is generated by jOOQ */ package com.clevergang.dbtests.repository.impl.jooq.generated; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.4" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({...
public final Project PROJECT = com.clevergang.dbtests.repository.impl.jooq.generated.tables.Project.PROJECT;
3
varunon9/Remote-Control-PC
RemoteControlPC-JavaFXML/src/remotecontrolpc/Server.java
[ "public class Screenshot {\n \n public void sendScreenshot(final ObjectOutputStream out) {\n new Thread() {\n @Override\n public void run() {\n InputStream is = null;\n try {\n BufferedImage screenshot\n =...
import filesharing.Screenshot; import image.ImageViewer; import java.awt.Dimension; import java.awt.MouseInfo; import java.awt.Point; import java.awt.Toolkit; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import javafx.scene.control.Button; import javafx.scene.control.Label; import filesharing.Fi...
String connectedMessage = "Connected to: " + remoteInetAddress; Platform.runLater(() -> { connectionStatusLabel.setText(connectedMessage); }); showMessage(connectedMessage); // connecting another socket to app (Peer to Peer) ...
new ReceiveFile().receiveFile(
3
Lyneira/MachinaCraft
MachinaCore/src/me/lyneira/MachinaCore/MachinaCore.java
[ "public class BlockVector {\r\n public final int x;\r\n public final int y;\r\n public final int z;\r\n\r\n /**\r\n * Constructs a BlockVector from the given x, y and z values.\r\n * \r\n * @param x\r\n * The length in the x direction\r\n * @param y\r\n * Th...
import java.util.List; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.scheduler.BukkitScheduler; import org.bukkit.scheduler.BukkitTask; import me.lyneira.MachinaCore.block.BlockVector; import me.lyneira.MachinaCore...
package me.lyneira.MachinaCore; /** * Main Plugin. * * @author Lyneira */ public final class MachinaCore extends MachinaCraftPlugin { private static MachinaCore plugin; private static BukkitScheduler scheduler; // private static PluginManager pluginManager; private final Bluepri...
public void registerDetectors(MachinaPlugin plugin, List<MachinaDetector> detectorList) {
7
BoD/android-contentprovider-generator
acpg-lib/src/main/java/org/jraf/acpg/lib/model/parser/ModelParser.java
[ "public class GeneratorException extends Exception {\n public GeneratorException(String message) {\n super(message);\n }\n\n public GeneratorException(String message, Throwable cause) {\n super(message, cause);\n }\n}", "public class Constraint {\n private final String mName;\n pri...
import java.io.File; import java.io.FileFilter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Locale; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.apache.logging.log4j.LogManager; import org.apac...
/* * This source is part of the * _____ ___ ____ * __ / / _ \/ _ | / __/___ _______ _ * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / * /___/ * repository. * * Copyright (C) 2012-2017 Benoit 'BoD' Lubek (BoD@JRAF.org) * * This program is fre...
List<EnumValue> enumValues = new ArrayList<>();
3
lukas-krecan/JsonUnit
json-unit-spring/src/test/java/net/javacrumbs/jsonunit/spring/testit/WebTestClientTest.java
[ "public enum Option {\n /**\n * Treats null nodes in actual value as absent. In other words\n * if you expect {\"test\":{\"a\":1}} this {\"test\":{\"a\":1, \"b\": null}} will pass the test.\n * When using within {@link ConfigurationWhen#then(Option, Option...)}, exact path to such nodes should be pas...
import net.javacrumbs.jsonunit.core.Option; import net.javacrumbs.jsonunit.core.listener.Difference; import net.javacrumbs.jsonunit.core.listener.DifferenceContext; import net.javacrumbs.jsonunit.core.listener.DifferenceListener; import net.javacrumbs.jsonunit.spring.testit.demo.SpringConfig; import org.junit.jupiter.a...
/** * Copyright 2009-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
exec("/sampleProduces").consumeWith(json().isEqualTo(CORRECT_JSON));
6
Nilhcem/frcndict-android
src/com/nilhcem/frcndict/core/layout/prefs/PrefsImportExportStarred.java
[ "public final class Log {\n\n\tprivate static final boolean LOG_ERROR = Config.LOGLEVEL > 0;\n\tprivate static final boolean LOG_WARN = Config.LOGLEVEL > 1;\n\tprivate static final boolean LOG_INFO = Config.LOGLEVEL > 2;\n\tprivate static final boolean LOG_DEBUG = Config.LOGLEVEL > 3;\n\n\tprivate Log() {\n\t\tthro...
import java.io.File; import java.io.IOException; import java.lang.ref.WeakReference; import java.util.Locale; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.os.AsyncTask; import android.preference.Preference; impo...
package com.nilhcem.frcndict.core.layout.prefs; final class PrefsImportExportStarred extends Preference { private WeakReference<Context> mContext; public PrefsImportExportStarred(Context context, AttributeSet attrs) { super(context, attrs); initView(context); } public PrefsImportExportStarred(Context con...
StarredDbHelper helper = null;
1
Netflix/Nicobar
nicobar-core/src/test/java/com/netflix/nicobar/core/module/ScriptModuleLoaderDependenciesTest.java
[ "public class JarScriptArchive implements ScriptArchive {\n /** Default file name of the optional {@link ScriptModuleSpec} in the archive */\n public final static String DEFAULT_MODULE_SPEC_FILE_NAME = \"moduleSpec.json\";\n private final static String JAR_FILE_SUFFIX = \".jar\";\n private final static ...
import static com.netflix.nicobar.core.testutil.CoreTestResourceUtil.TestResource.TEST_CLASSPATH_DEPENDENT; import static com.netflix.nicobar.core.testutil.CoreTestResourceUtil.TestResource.TEST_DEPENDENCIES_DEPENDENT; import static com.netflix.nicobar.core.testutil.CoreTestResourceUtil.TestResource.TEST_DEPENDENCIES_P...
/* * Copyright 2013 Netflix, 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 a...
ScriptCompilerPluginSpec pluginSpec = new ScriptCompilerPluginSpec.Builder(BytecodeLoadingPlugin.PLUGIN_ID)
4
Zalth-One-Three/Zombie-Infection
src/main/java/com/zalthonethree/zombieinfection/item/ItemCure.java
[ "public class ICustomCureEffect {\n\t/**\n\t * Used to run custom code upon player eating the cure.\n\t * @param player - The player who ate the cure.\n\t * @param stack - The stack the cure came from.\n\t **/\n\tpublic void run(EntityPlayer player, ItemStack stack) {}\n}", "public class ZombieInfectionAPI {\n\tp...
import java.util.List; import javax.annotation.Nullable; import com.zalthonethree.zombieinfection.api.ICustomCureEffect; import com.zalthonethree.zombieinfection.api.ZombieInfectionAPI; import com.zalthonethree.zombieinfection.init.ModRegistry; import com.zalthonethree.zombieinfection.potion.PotionHelper; import com.za...
package com.zalthonethree.zombieinfection.item; public class ItemCure extends ItemBase { public ItemCure() { super(); this.setFull3D(); this.setNames("cure"); } @Override public boolean hasEffect(ItemStack stack) { return true; } @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack s...
if (playerIn.isPotionActive(ModRegistry.POTION_INFECTION) && !playerIn.isPotionActive(ModRegistry.POTION_CURE)) playerIn.setActiveHand(hand);
2
dpr-odoo/trainee-om-shop
app/src/main/java/com/odoo/core/orm/OSQLite.java
[ "public class BaseModels {\n public static final String TAG = BaseModels.class.getSimpleName();\n\n public static List<OModel> baseModels(Context context, OUser user) {\n List<OModel> models = new ArrayList<>();\n models.add(new IrModel(context));\n models.add(new ResPartner(context));\n ...
import com.odoo.core.support.addons.OAddon; import com.odoo.core.support.addons.fragment.IBaseFragment; import com.odoo.core.utils.OPreferenceManager; import com.odoo.datas.OConstants; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.database.sqlite.SQLiteDatabase; impor...
/** * Odoo, Open Source Management Solution * Copyright (C) 2012-today Odoo SA (<http:www.odoo.com>) * <p/> * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the ...
private Addons mAddons;
1
rolandkrueger/user-microservice
service/src/test/java/info/rolandkrueger/userservice/controller/AuthorityRestControllerTest.java
[ "@SpringBootApplication\n@PropertySource(\"userservice.properties\")\npublic class UserMicroserviceApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(\n new Object[]{\n UserMicroserviceApplication.class,\n Develop...
import info.rolandkrueger.userservice.UserMicroserviceApplication; import info.rolandkrueger.userservice.api.model.AuthorityApiData; import info.rolandkrueger.userservice.api.resources.AuthoritiesResource; import info.rolandkrueger.userservice.api.resources.AuthoritiesSearchResource; import info.rolandkrueger.userservi...
package info.rolandkrueger.userservice.controller; /** * @author Roland Krüger */ @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = UserMicroserviceApplication.class) @WebIntegrationTest(randomPort = true) public class AuthorityRestControllerTest extends AbstractRestControllerTest ...
private AuthoritiesResource authoritiesResource;
2
corehunter/corehunter3
corehunter-base/src/test/java/org/corehunter/tests/data/simple/SimplePhenotypeDataTest.java
[ "public static final SimpleEntity[] HEADERS_NON_UNIQUE_NAMES;", "public static final SimpleEntity[] HEADERS_UNIQUE_NAMES;", "public static final Object[][] PHENOTYPIC_TRAIT_EXPLICIT_BOUNDS = {\n {null, null},\n {null, null},\n {0, 10},\n {0.0, 2.0},\n {null, null}\n};", "public static final Obj...
import static org.corehunter.tests.TestData.HEADERS_NON_UNIQUE_NAMES; import static org.corehunter.tests.TestData.HEADERS_UNIQUE_NAMES; import static org.corehunter.tests.TestData.PHENOTYPIC_TRAIT_EXPLICIT_BOUNDS; import static org.corehunter.tests.TestData.PHENOTYPIC_TRAIT_INFERRED_BOUNDS; import static org.corehunter...
new ScalePojo("col2", "Col 2", DataType.DOUBLE, ScaleType.RATIO, 0.0, 4.0)))); OBJECT_FEATURES_MIN_MAX_COL.add(new FeaturePojo("col3", "Col 3", new MethodPojo("col3", "Col 3", new ScalePojo("col3", "Col 3", DataType.STRING, ScaleType.NOMINAL, OBJECT_COL3)))); OBJECT_FEATURES_MIN_...
assertEquals("Trait name for trait " + t + " is not correct.", PHENOTYPIC_TRAIT_NAMES[t],
5
GitLqr/LQRBiliBlili
app/src/main/java/com/lqr/biliblili/mvp/ui/fragment/main/MainCategoryFragment.java
[ "public abstract class MySupportFragment<P extends IPresenter> extends BaseFragment<P> implements ISupportFragment {\n final SupportFragmentDelegate mDelegate = new SupportFragmentDelegate(this);\n protected FragmentActivity _mActivity;\n\n @Override\n public SupportFragmentDelegate getSupportDelegate()...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem;...
package com.lqr.biliblili.mvp.ui.fragment.main; /** * @创建者 CSDN_LQR * @描述 分区 */ public class MainCategoryFragment extends MySupportFragment<MainCategoryPresenter> implements MainCategoryContract.View { @BindView(R.id.toolbar) Toolbar mToolbar; @BindView(R.id.recyclerview) RecyclerView mRecycler...
EventBus.getDefault().post(new MainTag(), "openDrawer");
1
Biacode/presentations
testing/src/test/java/com/biacode/testing/service/impl/AccessTokenServiceImplTest.java
[ "public class AccessToken {\n\n private String token;\n\n private DateTime expiration;\n\n public AccessToken() {\n // Default constructor\n }\n\n public AccessToken(final String token, final DateTime expiration) {\n this.token = token;\n this.expiration = expiration;\n }\n\n ...
import com.biacode.testing.domain.AccessToken; import com.biacode.testing.repository.AccessTokenRepository; import com.biacode.testing.service.AccessTokenService; import com.biacode.testing.service.exception.AccessTokenExpiredRuntimeException; import com.biacode.testing.service.exception.AccessTokenNotFoundForToken; im...
package com.biacode.testing.service.impl; /** * @author Arthur Asatryan * @since 5/21/17 3:50 PM */ @RunWith(EasyMockRunner.class) public class AccessTokenServiceImplTest extends EasyMockSupport { //region Test subject @TestSubject private final AccessTokenService accessTokenService = new AccessToke...
final AccessToken accessToken = new AccessToken(token, expires);
0
Mignet/Inspiration
core/src/com/v5ent/game/utils/Trace.java
[ "public class WorldController extends InputAdapter {\n\n private static final String TAG = WorldController.class.getName();\n /**\n * main camera\n **/\n public OrthographicCamera camera = null;\n\n public OrthographicCamera hudCamera = null;\n private InputMultiplexer multiplexer;\n publi...
import java.util.ArrayList; import java.util.List; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.math.Vector2; import com.v5ent.game.core.WorldController; import com.v5ent.game.entities.Role; import com.v5ent.game.skill.Earth; import com.v5ent.game.skill.Fire; import com.v5ent.game.skill.Thunder; import com.v5en...
package com.v5ent.game.utils; public class Trace { private static final String TAG = Trace.class.getName(); private static int DISTANCE = 200; public static boolean symbol(WorldController worldController, List<Vector2> points, Role player){ //need to recognise the shap what user drawn /* * e.g....
worldController.skill = new Earth();
2
nullpointerexceptionapps/TeamCityDownloader
java/com/raidzero/teamcitydownloader/services/NotificationService.java
[ "public class FavoritesActivity extends ListActivity implements AdapterView.OnItemClickListener {\n private static final String tag = \"FavoritesActivity\";\n private ListView list;\n private ArrayList<String> configList;\n private AppHelper helper;\n\n @Override\n public void onCreate(Bundle save...
import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.os.IBinder; import android.support.v4.app.NotificationCompat; import com.raidzero.teamcitydownloader.R; import ...
package com.raidzero.teamcitydownloader.services; /** * Created by raidzero on 11/30/14. */ public class NotificationService extends Service implements QueryBuildIdsTask.OnQueryBuildIdsCompleteListener { private static final String tag = "NotificationService"; private AppHelper mHelper; private int ...
Debug.Log(tag, "onStartCommand()");
3
multi-os-engine/moe-plugin-gradle
src/main/java/org/moe/gradle/tasks/IpaBuild.java
[ "public class MoeExtension extends AbstractMoeExtension {\n\n private static final Logger LOG = Logging.getLogger(MoeExtension.class);\n\n @NotNull\n public final PackagingOptions packaging;\n\n @NotNull\n public final ResourceOptions resources;\n\n @NotNull\n public final XcodeOptions xcode;\n...
import org.gradle.api.GradleException; import org.gradle.api.logging.LogLevel; import org.gradle.api.logging.Logger; import org.gradle.api.logging.Logging; import org.gradle.api.tasks.Input; import org.gradle.api.tasks.InputDirectory; import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.Optional; import or...
@Optional public String getProvisioningProfile() { return nullableGetOrConvention(provisioningProfile, CONVENTION_PROVISIONING_PROFILE); } @IgnoreUnused public void setProvisioningProfile(@Nullable String provisioningProfile) { this.provisioningProfileSpecifier = provisioningProfile...
final Path out = Paths.get(MoePlugin.MOE);
1
EsotericSoftware/yamlbeans
src/com/esotericsoftware/yamlbeans/document/YamlDocumentReader.java
[ "public class Version {\r\n\r\n\tpublic static final Version V1_0 = new Version(1, 0);\r\n\r\n\tpublic static final Version V1_1 = new Version(1, 1);\r\n\r\n\t/**\r\n\t * YAML 1.1\r\n\t */\r\n\tpublic static final Version DEFAULT_VERSION = V1_1;\r\n\r\n\tprivate final int major;\r\n\tprivate final int minor;\r\n\r\...
import static com.esotericsoftware.yamlbeans.parser.EventType.*; import java.io.Reader; import java.io.StringReader; import java.util.Iterator; import com.esotericsoftware.yamlbeans.Version; import com.esotericsoftware.yamlbeans.YamlException; import com.esotericsoftware.yamlbeans.parser.AliasEvent; import com.esoteric...
} } public void remove() { throw new UnsupportedOperationException(); } }; return iterator; } private YamlElement readDocument() { YamlElement yamlElement = null; Event event = parser.peekNextEvent(); switch (event.type) { case SCALAR: yamlElement = readScalar(); break; case AL...
ScalarEvent scalar = (ScalarEvent)event;
6
micdoodle8/Crossbow_Mod_2
src/main/java/micdoodle8/mods/crossbowmod/item/ItemIronCrossbow.java
[ "@Mod(modid = \"CrossbowMod2\", name = \"Crossbow Mod 2 1.6\", version = \"a0.1.6\")\npublic class CrossbowModCore\n{\n @SidedProxy(clientSide = \"micdoodle8.mods.crossbowmod.client.ClientProxy\", serverSide = \"micdoodle8.mods.crossbowmod.CommonProxy\")\n public static CommonProxy proxy;\n @Instance\n ...
import java.util.List; import micdoodle8.mods.crossbowmod.CrossbowModCore; import micdoodle8.mods.crossbowmod.entity.EntityBolt; import micdoodle8.mods.crossbowmod.entity.EntityIronBolt; import micdoodle8.mods.crossbowmod.entity.EntityStoneBolt; import micdoodle8.mods.crossbowmod.entity.EntityWoodBolt; import net.minec...
package micdoodle8.mods.crossbowmod.item; public class ItemIronCrossbow extends ItemCrossbow { public ItemIronCrossbow() { super(); CrossbowModCore.ironCrossbowsList.add(this); } @Override public EntityBolt getEntity(World world, EntityLivingBase entityliving, float f) { ...
return new EntityIronBolt(world, entityliving, 1.33F, f);
2
quhfus/DoSeR-Disambiguation
doser-dis-core/src/main/java/doser/entitydisambiguation/algorithms/EntityCentricAlgorithmTableDefault.java
[ "public final class DisambiguationMainService {\n\n\tpublic final static int MAXCLAUSECOUNT = 4096;\n\n\tprivate static final int TIMERPERIOD = 10000;\n\n\tprivate static DisambiguationMainService instance = null;\n\n//\tprivate Model hdtdbpediaCats;\n//\tprivate Model hdtdbpediaCats_ger;\n//\tprivate Model hdtdbpe...
import java.io.IOException; import java.util.LinkedList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.log4j.Logger; import org.apache.lucene.document.Document; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.IndexSearcher; import or...
package doser.entitydisambiguation.algorithms; public class EntityCentricAlgorithmTableDefault extends AbstractDisambiguationAlgorithm { private EntityCentricKnowledgeBase eckb; private DisambiguationTaskSingle task; @Override public boolean checkAndSetInputParameter(AbstractDisambiguationTask task) {
AbstractKnowledgeBase kb = task.getKb();
7
kennedyoliveira/ultimate-pastebin-intellij-plugin
src/com/github/kennedyoliveira/ultimatepastebin/ui/forms/CreatePasteForm.java
[ "public interface PasteBinService {\n /**\n * @return If the credentials are valid or not\n * @throws IllegalStateException if any credential is missing, like username or password\n */\n boolean isCredentialsValid();\n\n /**\n * <p>Initialize the service connecting to pastebin and fetching some info.</p>...
import com.github.kennedyoliveira.pastebin4j.Paste; import com.github.kennedyoliveira.pastebin4j.PasteExpiration; import com.github.kennedyoliveira.pastebin4j.PasteHighLight; import com.github.kennedyoliveira.pastebin4j.PasteVisibility; import com.github.kennedyoliveira.ultimatepastebin.service.PasteBinService; import ...
package com.github.kennedyoliveira.ultimatepastebin.ui.forms; /** * Created by kennedy on 11/7/15. */ public class CreatePasteForm extends DialogWrapper { private static final Logger logger = UltimatePasteBinUtils.logger; private static final Map<Integer, PasteVisibility> pasteVisibilityMap; private static...
ClipboardUtils.copyToClipboard(url);
2
calibre2opds/calibre2opds
OpdsOutput/src/main/java/com/gmail/dpierron/calibre/gui/ReprocessEpubMetadataDialog.java
[ "public class ConfigurationManager {\r\n\r\n public static final String PROFILES_SUFFIX = \".profile.xml\";\r\n private final static String PROFILE_FILENAME = \"profile.xml\";\r\n private final static String DEFAULT_PROFILE = \"default\";\r\n public static final String LOGGING_PREFIX = \"log4j2.\";\r\n public ...
import com.gmail.dpierron.calibre.configuration.ConfigurationManager; import com.gmail.dpierron.calibre.datamodel.Book; import com.gmail.dpierron.calibre.datamodel.DataModel; import com.gmail.dpierron.calibre.datamodel.Tag; import com.gmail.dpierron.calibre.opds.Catalog; import com.gmail.dpierron.tools.i18n.Locali...
package com.gmail.dpierron.calibre.gui; /** * @author David */ public class ReprocessEpubMetadataDialog extends javax.swing.JDialog { private final static Logger logger = LogManager.getLogger(Catalog.class); int maxScale; double to30000; int pos; int position; boolean stopThread = false; ...
java.util.List<Book> books = null;
1
j256/simplecsv
src/test/java/com/j256/simplecsv/processor/ColumnInfoTest.java
[ "public class BooleanConverter implements Converter<Boolean, BooleanConverter.ConfigInfo> {\n\n\t/**\n\t * Set this flag using {@link CsvColumn#converterFlags()} if you want a parse error to be generated if the value is\n\t * not either false or true (or the ones specified in the format). Default is that an invalid...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.lang.reflect.Field; import org.junit.Test; import com.j256.simplecsv.common.CsvColumn; ...
package com.j256.simplecsv.processor; public class ColumnInfoTest { @Test public void testStuff() throws Exception { String fieldName = "field"; Field field = MyClass.class.getDeclaredField(fieldName); @SuppressWarnings("unchecked") Class<Integer> castType = (Class<Integer>) field.getType(); ColumnInf...
castType2, field, null, null, StringConverter.getSingleton());
4
SQLPower/sqlpower-library
src/main/java/ca/sqlpower/testutil/GenericNewValueMaker.java
[ "public class SQLColumn extends SQLObject implements java.io.Serializable, SPVariableResolverProvider, SQLCheckConstraintContainer {\n\n\tprivate static Logger logger = Logger.getLogger(SQLColumn.class);\n\t\n public static final List<Class<? extends SPObject>> allowedChildTypes = \n Collections.<Class<? ...
import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Image; import java.awt.Point; import java.awt.Rectangle; import java.awt.geom.Point2D; import java.awt.image.BufferedImage; import java.io.File; import java.math.BigDecimal; import java.text.NumberFormat; import java.text.SimpleDate...
newVal = new Integer(1); } else { newVal = new Integer((Integer)oldVal+1); } } else if (valueType == Double.class) { if (oldVal == null) { newVal = new Double(1); } else { newVal = new Double((Double)old...
SQLRelationship rel = (SQLRelationship) makeNewValue(SQLRelationship.class, null, "parent of column mapping");
1
ralscha/wampspring
src/test/java/ch/rasc/wampspring/config/SockJsTest.java
[ "public class CallMessage extends WampMessage {\n\tprivate final String callID;\n\n\tprivate final String procURI;\n\n\tprivate final List<Object> arguments;\n\n\tpublic CallMessage(String callID, String procURI, Object... arguments) {\n\t\tsuper(WampMessageType.CALL);\n\t\tthis.callID = callID;\n\t\tthis.procURI =...
import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import org.junit.Assert; import org.junit.Test; import org.springframework.boot.autoconfi...
/** * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
SubscribeMessage subscribeMsg = new SubscribeMessage("/topic");
4
larusba/neo4j-jdbc
neo4j-jdbc/src/main/java/org/neo4j/jdbc/Neo4jDatabaseMetaData.java
[ "public class ListNeo4jResultSet extends Neo4jResultSet {\n\n\tprivate List<List<Object>> list;\n\tprivate int index = -1;\n\tprivate boolean closed = false;\n\tprivate List<String> keys;\n\n\tprivate ListNeo4jResultSet(List<List<Object>> list, List<String> keys) {\n\t\tsuper(null);\n\t\tthis.list = list;\n\t\...
import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.neo4j.jdbc.impl.ListNeo4jResultSet; import org.neo4j.jdbc.metadata.Column; import org.neo4j.jdbc.metadata.Table; import org.neo4j.jdbc.utils.ExceptionBuilder; import org.neo4j.jdbc...
/*able * Copyritring ght (c) 2016 LARUS Business Automation [http://www.larus-ba.it] * <p> * This file is part of the "LARUS Integration Framework for Neo4j". * <p> * The "LARUS Integration Framework for Neo4j" is licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except i...
protected List<Column> databaseProperties;
1
OliviaLiyuanWei/Foodtastic-e-foodstore-website
src/main/java/com/efoodstore/dao/impl/CustomerDaoImpl.java
[ "public interface CustomerDao {\n\n void addCustomer (Customer customer);\n\n Customer getCustomerById (int customerId);\n\n List<Customer> getAllCustomers();\n\n Customer getCustomerByUsername (String username);\n\n}", "@Entity\npublic class Authorities {\n\n @Id\n @GeneratedValue\n private ...
import com.efoodstore.dao.CustomerDao; import com.efoodstore.model.Authorities; import com.efoodstore.model.Cart; import com.efoodstore.model.Customer; import com.efoodstore.model.Users; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.springframework.beans.facto...
package com.efoodstore.dao.impl; @Repository @Transactional public class CustomerDaoImpl implements CustomerDao{ @Autowired private SessionFactory sessionFactory; public void addCustomer(Customer customer) { Session session = sessionFactory.getCurrentSession(); customer.getBillingAddre...
Cart newCart = new Cart();
2
maxdemarzi/grittier_ext
src/main/java/com/maxdemarzi/users/Users.java
[ "public enum Labels implements Label {\n User,\n Post,\n Tag\n}", "public enum RelationshipTypes implements RelationshipType {\n BLOCKS,\n FOLLOWS,\n MUTES,\n LIKES,\n REPLIED_TO\n}", "public class PostExceptions extends Exceptions {\n\n public static final Exceptions missingStatusPa...
import com.fasterxml.jackson.databind.ObjectMapper; import com.maxdemarzi.Labels; import com.maxdemarzi.RelationshipTypes; import com.maxdemarzi.posts.PostExceptions; import org.apache.shiro.crypto.hash.Md5Hash; import org.neo4j.dbms.api.DatabaseManagementService; import org.neo4j.graphdb.*; import javax.ws.rs.Path; im...
package com.maxdemarzi.users; @Path("/users") public class Users { private final GraphDatabaseService db; private static final ObjectMapper objectMapper = new ObjectMapper(); public Users(@Context DatabaseManagementService dbms ) { this.db = dbms.database( "neo4j" );; } @GET @Path...
Node user = tx.findNode(Labels.User, USERNAME, parameters.get(USERNAME));
0
noctarius/castmapr
src/main/java/com/noctarius/castmapr/core/MultiMapNodeMapReduceTaskImpl.java
[ "public static <Key> Iterable<Key> copyKeys( Iterable<Key> keys )\n{\n if ( keys == null )\n {\n return null;\n }\n List<Key> result = new ArrayList<Key>();\n for ( Key key : keys )\n {\n result.add( key );\n }\n // Force correct size recreation\n return new ArrayList<Key>( ...
import static com.noctarius.castmapr.core.MapReduceUtils.copyKeys; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutorService; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.core.MultiMap; import...
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed u...
Collator<KeyIn, ValueIn, R> collator,
2
jramoyo/quickfix-messenger
src/main/java/com/jramoyo/qfixmessenger/ui/panels/GroupPanel.java
[ "public final class Component extends AbstractMember\r\n{\r\n\tprivate final String name;\r\n\tprivate final SortedMap<MemberOrder, Boolean> members;\r\n\tprivate final Field firstTag;\r\n\r\n\tpublic Component(String name, Map<MemberOrder, Boolean> members,\r\n\t\t\tField firstTag)\r\n\t{\r\n\t\tthis.name = name;\...
import java.awt.Color; import java.awt.Cursor; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.NumberFormat; import java.util.ArrayList; import java.util.List; import java.ut...
/* * Copyright (c) 2011, Jan Amoyo * 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 * notice, this list...
.append(QFixMessengerConstants.SOH);
5
jachness/blockcalls
app/src/main/java/com/jachness/blockcalls/modules/AppModule.java
[ "public class BlackListDAO {\n private static final String TAG = BlackListDAO.class.getSimpleName();\n private final Context context;\n\n public BlackListDAO(Context context) {\n this.context = context;\n }\n\n @DebugLog\n public List<BlackListNumberEntity> findForBlock(Call call) {\n\n ...
import dagger.Module; import dagger.Provides; import android.content.Context; import com.jachness.blockcalls.db.dao.BlackListDAO; import com.jachness.blockcalls.db.dao.ContactDAO; import com.jachness.blockcalls.services.BlackListWrapper; import com.jachness.blockcalls.services.ImportExportWrapper; import com.jachness.b...
/* * Copyright (C) 2017 Jonatan Cheiro Anriquez * * This file is part of Block Calls. * * Block Calls 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 opti...
ImportExportWrapper provideImportExportWrapper(BlackListWrapper blackListWrapper) {
2
jaksab/EasyNetwork
easynet/src/main/java/pro/oncreate/easynet/models/NRequestModel.java
[ "@SuppressWarnings(\"unused,WeakerAccess\")\npublic class PaginationModel {\n private HashMap<String, Integer> data = new HashMap<>();\n private PaginationInterface paginationInterface;\n\n PaginationModel(String... keys) {\n if (keys == null || keys.length == 0)\n throw new IllegalArgume...
import android.app.Dialog; import android.content.res.Resources; import android.support.annotation.RawRes; import android.support.v4.widget.SwipeRefreshLayout; import android.view.View; import android.widget.ProgressBar; import java.io.File; import java.util.ArrayList; import java.util.List; import pro.oncreate.easynet...
package pro.oncreate.easynet.models; /** * Copyright (c) $today.year. Konovalenko Andrii [jaksab2@mail.ru] */ @SuppressWarnings("unused") public class NRequestModel { // Request general private String url; private Method method; private String requestType; private String tag; private Res...
private PaginationModel paginationModel;
0
fjorum/fjorum
src/main/java/org/fjorum/controller/ForumController.java
[ "public class CategoryCreateForm {\n\n public final static String NAME = \"categoryCreateForm\";\n\n @NotNull\n private Category parentCategory;\n\n @NotEmpty\n private String categoryName = \"\";\n\n CategoryCreateForm(){}\n\n public CategoryCreateForm(Category parentCategory){\n this.p...
import org.fjorum.controller.form.CategoryCreateForm; import org.fjorum.controller.form.CategoryCreateValidator; import org.fjorum.controller.form.ReplyCreateForm; import org.fjorum.controller.form.TopicCreateForm; import org.fjorum.model.entity.Category; import org.fjorum.model.entity.Reply; import org.fjorum.model.en...
package org.fjorum.controller; @Controller @RequestMapping(value = "/forum") public class ForumController { private static final String FORUM_PAGE = "forum"; private static final String TOPIC_PAGE = "topic"; private final CategoryService categoryService;
private final TopicService topicService;
6
M4thG33k/TombManyGraves2
src/main/java/com/m4thg33k/tombmanygraves/tiles/TileGrave.java
[ "public class ModConfigs {\n\n public static Configuration config;\n\n // Client configs\n public static boolean FORCE_DIRT_RENDER;\n public static int GRAVE_SKULL_RENDER_TYPE;\n public static boolean DISPLAY_GRAVE_NAME;\n public static int NAME_FORCE;\n public static int NAME_YIELD;\n publi...
import java.util.UUID; import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.annotation.ParametersAreNonnullByDefault; import com.m4thg33k.tombmanygraves.ModConfigs; import com.m4thg33k.tombmanygraves.blocks.ModBlocks; import com.m4thg33k.tombmanygraves.friends.FriendHandler; import com.m4thg3...
package com.m4thg33k.tombmanygraves.tiles; @SuppressWarnings("deprecation") public class TileGrave extends TileEntity { // static final Strings for use as NBT tags (keep it consistent yo!) private static final String TAG_CAMO = "camo"; private static final String TAG_CAMO_META = "camoMeta"; privat...
private boolean GIVE_ITEMS_IN_GRAVE_PRIORITY = ModConfigs.GIVE_ITEMS_IN_GRAVE_PRIORITY;
0
blind-coder/SpaceTrader
SpaceTrader/src/main/java/de/anderdonau/spacetrader/FragmentSystemInformation.java
[ "public class CrewMember implements Serializable {\n\tpublic int nameIndex;\n\tpublic int pilot;\n\tpublic int fighter;\n\tpublic int trader;\n\tpublic int engineer;\n\tpublic int curSystem;\n\n\tpublic CrewMember() {\n\t\tnameIndex = 1;\n\t\tpilot = 1;\n\t\tfighter = 1;\n\t\ttrader = 1;\n\t\tengineer = 1;\n\t\tcur...
import de.anderdonau.spacetrader.DataTypes.Politics; import de.anderdonau.spacetrader.DataTypes.Popup; import de.anderdonau.spacetrader.DataTypes.Shields; import de.anderdonau.spacetrader.DataTypes.ShipTypes; import de.anderdonau.spacetrader.DataTypes.SolarSystem; import de.anderdonau.spacetrader.DataTypes.SpecialEvent...
case 0: news += "\nLocals Welcome Visiting Hero " + gameState.NameCommander + "!"; break; case 1: news += "\nFamed Hero " + gameState.NameCommander + " to Visit System!"; break; case 2: news += "\nLarge Turnout At Spaceport to Welcome " + gameState.NameCommander + "!"; break; ...
SpecialEvents.SpecialEvent Event = SpecialEvents.mSpecialEvent[CURSYSTEM.special];
7
Vauff/Maunz-Discord
src/com/vauff/maunzdiscord/threads/ReactionAddThread.java
[ "public abstract class AbstractCommand\n{\n\t/**\n\t * Holds all messages as keys which await a reaction by a specific user.\n\t * The values hold an instance of {@link Await}\n\t */\n\tpublic static final HashMap<Snowflake, Await> AWAITED = new HashMap<>();\n\n\t/**\n\t * Enum holding the different bot permissions...
import com.vauff.maunzdiscord.commands.templates.AbstractCommand; import com.vauff.maunzdiscord.commands.templates.AbstractLegacyCommand; import com.vauff.maunzdiscord.commands.templates.AbstractSlashCommand; import com.vauff.maunzdiscord.core.Logger; import com.vauff.maunzdiscord.core.Util; import com.vauff.maunzdisco...
package com.vauff.maunzdiscord.threads; public class ReactionAddThread implements Runnable { private ReactionAddEvent event; private Message message; private Thread thread; private String name; public ReactionAddThread(ReactionAddEvent passedEvent, Message passedMessage, String passedName) { event = passedE...
Util.msg(event.getUser().block().getPrivateChannel().block(), true, ":exclamation: | **Missing permissions!**" + System.lineSeparator() + System.lineSeparator() + "The bot wasn't able to reply to your command in " + event.getChannel().block().getMention() + " because it's lacking permissions." + System.lineSep...
4
TheCount/jhilbert
src/main/java/jhilbert/scanners/impl/MediaWikiTokenFeed.java
[ "public class Server extends Thread {\n\n\t/**\n\t * Logger for this class.\n\t */\n\tprivate static final Logger logger = Logger.getLogger(Server.class);\n\n\t/**\n\t * Socket to talk with.\n\t */\n\tprivate final Socket socket;\n\n\t/**\n\t * Encoding.\n\t */\n\tprivate static final String ENCODING = \"UTF-8\";\n...
import java.util.Set; import org.apache.log4j.Logger; import jhilbert.Server; import jhilbert.data.Module; import jhilbert.data.Name; import jhilbert.data.Symbol; import jhilbert.scanners.ScannerException; import jhilbert.scanners.Token; import jhilbert.scanners.TokenFeed; import jhilbert.utils.Io; import java.io.Buffe...
/* JHilbert, a verifier for collaborative theorem proving Copyright © 2008, 2009, 2011 The JHilbert Authors See the AUTHORS file for the list of JHilbert authors. See the commit logs ("git log") for a list of individual contributions. This program is free software: you can redistribute it and/...
protected @Override Token getNewToken() throws ScannerException {
5
glenrobson/SimpleAnnotationServer
src/test/java/uk/org/llgc/annotation/store/test/TestBOR.java
[ "public class IDConflictException extends Exception {\n\tpublic IDConflictException() {\n\t\tsuper();\n\t}\n\n\tpublic IDConflictException(final String pMessage) {\n\t\tsuper(pMessage);\n\t}\n}", "public interface StoreAdapter {\n\n\tpublic void init(final AnnotationUtils pAnnoUtils);\n\n // CRUD annotations\n...
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.junit.Test; import static org.junit.Assert.*; import org.junit.Rule; import org.junit.Before; import org.junit.After; import org.junit.rules.TemporaryFolder; import com.github.jsonldjava.utils.JsonUtils; import java.util.List...
package uk.org.llgc.annotation.store.test; public class TestBOR extends TestUtils { protected static Logger _logger = LogManager.getLogger(TestBOR.class.getName()); public TestBOR() throws IOException { super(new BookOfPeaceEncoder()); } @Before public void setup() throws IOException { super.setup...
public void testRetrieveAnnotation() throws IOException, IDConflictException, MalformedAnnotation {
6
cjburkey01/ClaimChunk
src/main/java/com/cjburkey/claimchunk/data/newdata/MySQLDataHandler.java
[ "final class SqlBacking {\n\n private static boolean debug(ClaimChunk claimChunk) {\n return claimChunk.getConfigHandler().getPrintDatabaseDebug();\n }\n\n static Supplier<Connection> connect(\n String hostname,\n int port,\n String databaseName,\n String ...
import static com.cjburkey.claimchunk.data.newdata.SqlBacking.*; import com.cjburkey.claimchunk.ClaimChunk; import com.cjburkey.claimchunk.Utils; import com.cjburkey.claimchunk.chunk.ChunkPos; import com.cjburkey.claimchunk.chunk.DataChunk; import com.cjburkey.claimchunk.data.conversion.IDataConverter; import com.cjbur...
} } catch (Exception e) { Utils.err("Failed to retrieve chunk owner: %s", e.getMessage()); e.printStackTrace(); } return null; } @Override public DataChunk[] getClaimedChunks() { String sql = String.format( ...
public void addPlayers(FullPlayerData[] players) {
6
BlochsTech/BitcoinCardTerminal
src/com/blochstech/bitcoincardterminal/View/ChargePage.java
[ "public final class R {\n public static final class attr {\n }\n public static final class color {\n public static final int ThinBlue=0x7f050002;\n public static final int ThinRed=0x7f050001;\n public static final int WhiteNothing=0x7f050000;\n /** Scanner \n */\n ...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import com.blochstech.bit...
package com.blochstech.bitcoincardterminal.View; //Everything in view classes will be destroyed at whim by Android. VMs and model/database should hold logic and information. //Views defined in layout xml files. public class ChargePage extends Fragment { private View myView; private ChargePageVM myVM; private Upda...
myVM = SyntacticSugar.<ChargePageVM>castAs(PageManager.Instance().getVM(PageManager.ViewModelTags.CHARGE_PAGE_VM));
2
graceland/graceland-core
graceland-platform/src/main/java/io/graceland/Platform.java
[ "public interface Application {\n\n /**\n * Adds the plugin to the list of plugins that will be loaded.\n *\n * @param plugin The plugin to load.\n */\n void loadPlugin(Plugin plugin);\n\n /**\n * Provides a list of loaded plugins for this application. Once requested, the list of plugin...
import java.util.List; import javax.servlet.FilterRegistration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.codahale.metrics.health.HealthCheck; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.inject.Guice; import com.google.inject.I...
package io.graceland; /** * The platform is the foundation for Graceland. It's where an {@link io.graceland.application.Application} * is ran, providing the underlying functionality using a Dropwizard service (via an {@link io.dropwizard.Application}). */ public class Platform extends io.dropwizard.Application<P...
for (Configurator configurator : wrapper.getConfigurators()) {
1
skuzzle/restrict-imports-enforcer-rule
src/main/java/org/apache/maven/plugins/enforcer/RestrictImports.java
[ "public static void checkArgument(boolean condition) {\n checkArgument(condition, \"Unexpected argument\");\n}", "public final class AnalyzeResult {\n\n private final List<MatchedFile> srcMatches;\n private final List<MatchedFile> testMatches;\n private final Duration duration;\n private final int ...
import static de.skuzzle.enforcer.restrictimports.util.Preconditions.checkArgument; import java.io.File; import java.nio.charset.Charset; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util....
package org.apache.maven.plugins.enforcer; /** * Enforcer rule which restricts the usage of certain packages or classes within a Java * code base. */ public class RestrictImports extends BannedImportGroupDefinition implements EnforcerRule, EnforcerRule2 { private static final Logger LOGGER = LoggerFactory....
private final MatchFormatter matchFormatter = MatchFormatter.getInstance();
7
BCA-Team/Buildcraft-Additions
src/main/java/buildcraftAdditions/reference/ItemLoader.java
[ "public class ToolCoreRecipe implements IIntegrationRecipe {\n\t@Override\n\tpublic int getEnergyCost() {\n\t\treturn 10000;\n\t}\n\n\t@Override\n\tpublic List<ItemStack> getExampleInput() {\n\t\treturn OreDictionary.getOres(\"gearGold\");\n\t}\n\n\t@Override\n\tpublic List<List<ItemStack>> getExampleExpansions() {...
import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import buildcraft.api.recipes.Buil...
package buildcraftAdditions.reference; /** * Copyright (c) 2014-2015, AEnterprise * http://buildcraftadditions.wordpress.com/ * Buildcraft Additions is distributed under the terms of GNU GPL v3.0 * Please check the contents of the license located in * http://buildcraftadditions.wordpress.com/wiki/licensing-s...
dust = new ItemDust();
7
janrain/engage.android
Jump/src/com/janrain/android/engage/ui/JRWebViewFragment.java
[ "public class JREngageError {\n public static final int CODE_UNKNOWN = 0;\n\n /**\n * @name Public Constants\n * Constant pools for different kinds of errors.\n **/\n/*@{*/\n\n /**\n * @brief String based error categorizations. See JREngageError#mType for more information.\n */\n pub...
import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.graphics.Bitmap; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.v4.app.F...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (c) 2011, Janrain, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Re...
return AndroidUtils.SDK_INT;
4
datacleaner/metamodel_extras
dbase/src/main/java/org/xBaseJ/XBaseXmlParser.java
[ "public class CharField extends Field {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic Object clone() throws CloneNotSupportedException {\n\t\tCharField tField = (CharField) super.clone();\n\t\ttField.name = new String(name);\n\t\ttField.nength = nength;\n\t\treturn tField;\n\t}\n\n\tpublic CharF...
import org.xBaseJ.fields.FloatField; import org.xBaseJ.fields.LogicalField; import org.xBaseJ.fields.MemoField; import org.xBaseJ.fields.NumField; import org.xBaseJ.fields.PictureField; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; ...
/** * eobjects.org MetaModel * Copyright (C) 2010 eobjects.org * * This copyrighted material is made available to anyone wishing to use, modify, * copy, or redistribute it subject to the terms and conditions of the GNU * Lesser General Public License, as published by the Free Software Foundation. * * This progr...
dbf.addField(new DateField(fldName));
1
neo4j-contrib/neo4j-jdbc
neo4j-jdbc-bolt/src/main/java/org/neo4j/jdbc/bolt/BoltNeo4jPreparedStatement.java
[ "public abstract class Neo4jParameterMetaData implements java.sql.ParameterMetaData {\n\n\t@Override\n\tpublic int getParameterCount() throws SQLException {\n\t\tthrow ExceptionBuilder.buildUnsupportedOperationException();\n\t}\n\n\t@Override\n\tpublic int isNullable(int param) throws SQLException {\n\t\treturn par...
import org.neo4j.driver.Result; import org.neo4j.driver.summary.SummaryCounters; import org.neo4j.jdbc.Loggable; import org.neo4j.jdbc.Neo4jParameterMetaData; import org.neo4j.jdbc.Neo4jPreparedStatement; import org.neo4j.jdbc.Neo4jResultSetMetaData; import org.neo4j.jdbc.bolt.impl.BoltNeo4jConnectionImpl; import org.n...
/* * Copyright (c) 2016 LARUS Business Automation [http://www.larus-ba.it] * <p> * This file is part of the "LARUS Integration Framework for Neo4j". * <p> * The "LARUS Integration Framework for Neo4j" is licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complian...
return executeInTx((BoltNeo4jConnection) this.connection, this.statement, this.parameters, body);
5
radkovo/CSSBox
src/main/java/org/fit/cssbox/awt/BackgroundBitmap.java
[ "abstract public class ElementBox extends Box\n{\n private static Logger log = LoggerFactory.getLogger(ElementBox.class);\n \n public static final CSSProperty.Display DISPLAY_ANY = null;\n public static final CSSProperty.Display DISPLAY_NONE = CSSProperty.Display.NONE;\n public static final CSSProper...
import java.awt.Graphics2D; import java.awt.LinearGradientPaint; import java.awt.RadialGradientPaint; import java.awt.MultipleGradientPaint.ColorSpaceType; import java.awt.MultipleGradientPaint.CycleMethod; import java.awt.Paint; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.awt.geom.R...
/* * BackgroundBitmap.java * Copyright (c) 2005-2020 Radek Burget * * CSSBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later versi...
if (img.getGradient() instanceof LinearGradient)
7
bmatthews68/inmemdb-maven-plugin
src/main/java/com/btmatthews/maven/plugins/inmemdb/db/h2/H2Database.java
[ "public interface Loader {\r\n\r\n /**\r\n * The message key for the error reported when a source file cannot be read.\r\n */\r\n String CANNOT_READ_SOURCE_FILE = \"cannot_read_source_file\";\r\n\r\n /**\r\n * The message key for the error reported when a source file cannot be processed.\r\n ...
import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; import com.btmatthews.maven.plugins.inmemdb.Loader; import com.btmatthews.maven.plugins.inmemdb.MessageUtil; import com.btmatthews.maven.plugins.inmemdb.db.AbstractSQLDatabase; import com.btmatthews.maven.plugins.inmemdb.ldr.dbunit.DBUnitCS...
/* * Copyright 2011-2012 Brian Matthews * * 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...
new DBUnitCSVLoader(), new DBUnitXLSLoader(), new SQLLoader()};
3
ScottDTA/ExtraCarts-1.7.10
src/main/java/com/dta/extracarts/mods/ironchest/entities/EntityDiamondChestCart.java
[ "public interface OpenableGUI {\n\tpublic Object getClientGuiElement(int ID, EntityPlayer player, World world,\tint x, int y, int z);\n\tpublic Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);\n}", "@Optional.InterfaceList({\n\t\t@Optional.Interface(iface = \"mods.railcra...
import com.dta.extracarts.client.OpenableGUI; import com.dta.extracarts.entities.EntityExtraCartChestMinecart; import com.dta.extracarts.mods.ironchest.IronChestItems; import com.dta.extracarts.mods.ironchest.client.ContainerDiamondChestCart; import com.dta.extracarts.mods.ironchest.client.GuiDiamondChestCart; import c...
package com.dta.extracarts.mods.ironchest.entities; @Optional.Interface(iface = "mods.railcraft.api.carts.IMinecart", modid = "RailcraftAPI|carts") public class EntityDiamondChestCart extends EntityExtraCartChestMinecart implements OpenableGUI, IMinecart{ private Block ironChest = Block.getBlockFromName("IronChest...
return new ContainerDiamondChestCart(player.inventory, this);
3
tonivade/resp-server
src/main/java/com/github/tonivade/resp/protocol/RedisToken.java
[ "public static SafeString safeString(String str) {\n return new SafeString(UTF_8.encode(checkNonNull(str)));\n}", "public static final class ArrayRedisToken extends AbstractRedisToken<Sequence<RedisToken>> {\n\n ArrayRedisToken(Sequence<RedisToken> value) {\n super(RedisTokenType.ARRAY, checkNonNull(value).a...
import static com.github.tonivade.resp.protocol.SafeString.safeString; import java.util.Collection; import java.util.stream.Stream; import com.github.tonivade.purefun.data.ImmutableList; import com.github.tonivade.purefun.data.Sequence; import com.github.tonivade.resp.protocol.AbstractRedisToken.ArrayRedisToken; import...
/* * Copyright (c) 2016-2022, Antonio Gabriel Muñoz Conejo <antoniogmc at gmail dot com> * Distributed under the terms of the MIT License */ package com.github.tonivade.resp.protocol; public interface RedisToken { RedisToken NULL_STRING = string((SafeString) null); RedisToken RESPONSE_OK = status("OK"); R...
return new IntegerRedisToken(b ? 1 : 0);
3
dmfs/jdav
src/org/dmfs/dav/rfc6352/AddressbookQuery.java
[ "public abstract class PropertyRequest implements Recyclable\n{\n\n\tprotected Map<ElementDescriptor<?>, Object> mProp;\n\n\n\t/**\n\t * Add another property to the list of requested properties.\n\t * \n\t * @param property\n\t * The property to request from the server.\n\t * @return This instance.\n\t *...
import org.dmfs.dav.rfc6352.filter.PropFilter; import org.dmfs.xmlobjects.ElementDescriptor; import org.dmfs.xmlobjects.builder.AbstractObjectBuilder; import org.dmfs.xmlobjects.builder.IObjectBuilder; import org.dmfs.xmlobjects.serializer.SerializerContext; import org.dmfs.xmlobjects.serializer.SerializerException; im...
/* * Copyright (C) 2014 Marten Gajda <marten@dmfs.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2 of the License, * or (at your option) any later version. * * Thi...
childWriter.writeChild(WebDavSearch.LIMIT, object.mLimit, context);
4