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
waynedgrant/android-appwidget-cirrus
app/src/test/java/com/waynedgrant/cirrus/presentation/formatters/TestWeatherItemFormatter.java
[ "public class ClientRawGenerator {\n public ClientRaw generatedPopulated() throws IOException {\n List<Field> fields = new ArrayList<Field>();\n fields.add(new Field(ClientRaw.APPARENT_TEMPERATURE_CELSIUS, \"-15.6\"));\n fields.add(new Field(ClientRaw.AVERAGE_WIND_SPEED_KNOTS, \"10.5\"));\n ...
import com.waynedgrant.cirrus.ClientRawGenerator; import com.waynedgrant.cirrus.clientraw.ClientRaw; import com.waynedgrant.cirrus.measures.WeatherItem; import com.waynedgrant.cirrus.units.PressureUnit; import com.waynedgrant.cirrus.units.RainfallUnit; import com.waynedgrant.cirrus.units.TemperatureUnit; import com.way...
package com.waynedgrant.cirrus.presentation.formatters; public class TestWeatherItemFormatter { private WeatherItemFormatter testee; @Before public void setUp() throws IOException { ClientRaw clientRaw = new ClientRawGenerator().generatedPopulated(); testee = new WeatherItemFormatter(...
TemperatureUnit.CELSIUS,
5
hyounesy/ChAsE
src/org/sfu/chase/core/ChaseOp.java
[ "public class ClustFramework\n{\n private Table m_Table;\n private Table m_UnNormTable;\n private GroupInfo[] m_Groups; \n private int[] m_GroupOrder;\n private ClustInfo m_RootClustInfo;\n \n private String[] m_RegionNames;\n private int m_MaxRegionSize = ...
import java.awt.event.ActionEvent; import java.io.File; import org.sfu.chase.core.ClustFramework; import org.sfu.chase.gui.PChasePainter; import org.sfu.chase.input.DataModel; import org.sfu.chase.input.InputDialog; import org.sfu.chase.util.UpdateManager; import still.data.MemoryTable; import still.data.Operator; impo...
package org.sfu.chase.core; public class ChaseOp extends BasicOp { private static final long serialVersionUID = 5118434778904392340L; public ClustFramework m_Framework; private static String m_gffFilePath;// = "/Users/hyounesy/SFU/Research/BioVis/data/Brad/Allenhancers_nopromok4me3.gff"; // "/U...
public ChaseOp( Table newTable, boolean isActive, String paramString )
7
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/implementations/ui/menubinding/MenuBinding.java
[ "public class BindingInventory\n extends ObservableObject\n{\n\t/**\n\t * patterns for parsing property chains\n\t */\n\tprivate final static Pattern pathPattern = Pattern.compile(\"(\\\\\\\\|[\\\\.]*)(.+)\");\n\tprivate final static Pattern split = Pattern.compile(\"\\\\.\");\n\n\t//used for determining a range...
import android.view.MenuItem; import android.view.View; import org.json.JSONException; import org.json.JSONObject; import traction.mvc.observables.BindingInventory; import traction.mvc.implementations.ui.UIEvent; import traction.mvc.implementations.ui.UIHandler; import traction.mvc.implementations.ui.UIProperty; import...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
private final ViewBindingHelper<View> helper;
4
mitdbg/AdaptDB
src/main/java/perf/benchmark/SingleAttributeQueries.java
[ "public class Predicate {\n\tpublic enum PREDTYPE {\n\t\tLEQ, GEQ, GT, LT, EQ\n\t};\n\n\tpublic int attribute;\n\tpublic TYPE type;\n\tpublic Object value;\n\tpublic PREDTYPE predtype;\n\n\tpublic Predicate(int attr, TYPE t, Object val, PREDTYPE predtype) {\n\t\tthis.attribute = attr;\n\t\tthis.type = t;\n\t\tthis....
import core.adapt.Predicate; import core.adapt.Predicate.PREDTYPE; import core.adapt.Query; import core.adapt.iterator.IteratorRecord; import core.adapt.spark.SparkQuery; import core.utils.ConfUtils; import core.utils.TypeUtils.SimpleDate; import core.utils.TypeUtils.TYPE; import org.apache.hadoop.io.LongWritable; impo...
package perf.benchmark; public class SingleAttributeQueries { public final static String propertyFile = BenchmarkSettings.conf; public final static ConfUtils cfg = new ConfUtils(propertyFile); public final static int scaleFactor = 1000; public static int numQueries = 1; double selectivity; SparkQuery sq; pu...
Predicate p1 = new Predicate(0, TYPE.LONG, orderKey, PREDTYPE.GT);
7
lyubenblagoev/postfix-rest-server
src/main/java/com/lyubenblagoev/postfixrest/service/BccServiceImpl.java
[ "public class BadRequestException extends RuntimeException {\n\n\tprivate static final long serialVersionUID = 540536621916319350L;\n\n\tpublic BadRequestException() {\n\t}\n\n\tpublic BadRequestException(String message) {\n\t\tsuper(message);\n\t}\n\n\tpublic BadRequestException(Throwable cause) {\n\t\tsuper(cause...
import java.util.Optional; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.lyubenblagoev.postfixrest.BadRequestException; import com.lyubenblagoev.postfixrest.entity.Account; import com.lyubenblagoev.postfixrest.entity.IncomingBcc; import com.ly...
package com.lyubenblagoev.postfixrest.service; @Service @Transactional(readOnly = true) public class BccServiceImpl extends AbstractBccServiceImpl { private final OutgoingBccRepository outBccRepository; private final IncomingBccRepository inBccRepository; public BccServiceImpl(OutgoingBccRepository outBccRepo...
public Optional<BccResource> getOutgoingBcc(String domain, String username) {
7
PearsonEducation/StatsPoller
src/main/java/com/pearson/statspoller/internal_metric_collectors/linux/DiskIo/DiskIoCollector.java
[ "public abstract class InternalCollectorFramework {\n \n private static final Logger logger = LoggerFactory.getLogger(InternalCollectorFramework.class.getName());\n \n protected final int NUM_FILE_WRITE_RETRIES = 3;\n protected final int DELAY_BETWEEN_WRITE_RETRIES_IN_MS = 100;\n \n private fin...
import com.pearson.statspoller.internal_metric_collectors.InternalCollectorFramework; import com.pearson.statspoller.metric_formats.graphite.GraphiteMetric; import com.pearson.statspoller.utilities.core_utils.StackTrace; import com.pearson.statspoller.utilities.core_utils.Threads; import com.pearson.statspoller.utiliti...
package com.pearson.statspoller.internal_metric_collectors.linux.DiskIo; /** * @author Jeffrey Schmidt * * Collects Disk IO metrics -- similar to the metrics collected by iostat * Based on raw data from /sys/block/(deviceName)/stat or /proc/diskstats */ public class DiskIoCollector extends InternalCollectorFram...
List<String> devices = FileIo.getListOfDirectoryNamesInADirectory(super.getLinuxSysFileSystemLocation() + "/block");
4
d-sauer/JCalcAPI
src/main/java/org/jdice/calc/extension/ModOperator.java
[ "public abstract class AbstractCalculator<CALC> {\r\n\r\n /**\r\n * Detect changes in infix expression\r\n */\r\n private CList infix = new CList(new CListListener() {\r\n @Override\r\n public void change() {\r\n isInfixChanged = true;\r\n }\r\n });\r\n private bo...
import java.math.BigDecimal; import java.math.MathContext; import org.jdice.calc.AbstractCalculator; import org.jdice.calc.Num; import org.jdice.calc.Operator; import org.jdice.calc.Properties; import org.jdice.calc.Rounding;
/* * Copyright 2014 Davor Sauer * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
Rounding roundingMode = Properties.getInheritedRoundingMode(calc, value2);
4
roma/roma-java-client
java/client/src/main/java/jp/co/rakuten/rit/roma/client/commands/GetsOptCommand.java
[ "public class BadRoutingTableFormatException extends ClientException {\r\n public BadRoutingTableFormatException(String reason) {\r\n super(reason);\r\n }\r\n\r\n private static final long serialVersionUID = -8186833003353745212L;\r\n}", "public class ClientException extends Exception {\n private static fi...
import java.io.IOException; import java.math.BigInteger; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.StringTokenizer; import java.util.concurrent.Callable; import java.util.concurrent.CancellationException; import java.ut...
package jp.co.rakuten.rit.roma.client.commands; public class GetsOptCommand extends AbstractCommand { private static ExecutorService executor; public static int numOfThreads = Integer .parseInt(Config.DEFAULT_NUM_OF_THREADS2); public static void shutdown() { if (executor != null) { // executo...
ConnectionPool pool = (ConnectionPool) context
4
shamanDevel/jME3-OpenCL-Library
src/main/java/org/shaman/jmecl/test/TestFluids2D_old.java
[ "public class OpenCLSettings {\n\t\n\tprivate final Context clContext;\n\tprivate final CommandQueue clCommandQueue;\n\tprivate final ProgramCache programCache;\n\tprivate final AssetManager assetManager;\n\n\tpublic OpenCLSettings(Context clContext, CommandQueue clCommandQueue, \n\t\t\tProgramCache programCache, A...
import com.jme3.app.SimpleApplication; import com.jme3.app.StatsAppState; import com.jme3.app.state.VideoRecorderAppState; import com.jme3.material.Material; import com.jme3.material.RenderState; import com.jme3.math.Vector3f; import com.jme3.opencl.CommandQueue; import com.jme3.opencl.Context; import com.jme3.renderer...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package org.shaman.jmecl.test; /** * * @author Sebastian Weiss */ public class TestFluids2D_old extends SimpleApplication { priva...
private SharedTexture densityTexture;
4
darrachequesne/spring-data-jpa-datatables
src/test/java/org/springframework/data/jpa/datatables/repository/EmployeeRepositoryTest.java
[ "@Slf4j\n@Configuration\n@EnableJpaRepositories(repositoryFactoryBeanClass = DataTablesRepositoryFactoryBean.class,\n basePackages = { \"org.springframework.data.jpa.datatables.model\", \"org.springframework.data.jpa.datatables.repository\" })\npublic class Config {\n\n @Bean\n @Profile({\"default\", \...
import com.google.common.collect.Lists; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.jpa.datatables.Config; import org.springframework.data.jpa.datatables.mapping.DataTablesInput; import or...
package org.springframework.data.jpa.datatables.repository; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = Config.class) public class EmployeeRepositoryTest { protected DataTablesInput input; @Autowired private EmployeeRepository employeeRepository;
protected DataTablesOutput<Employee> getOutput(DataTablesInput input) {
4
Frank1234/FireBaseTest
app/src/main/java/com/ironflowers/firebasetest/di/ActivityBindingModule.java
[ "public class ContentActivity extends DaggerAppCompatActivity {\n\n public static final String EXTRA_CONTENT_ITEM_ID = \"EXTRA_CONTENT_ITEM_ID\",\n EXTRA_TOOLBAR_TITLE = \"EXTRA_TOOLBAR_TITLE\";\n\n @BindView(R.id.toolbar)\n Toolbar toolbar;\n\n @Inject\n ContentFragment contentFragment;\n...
import com.ironflowers.firebasetest.ui.content.ContentActivity; import com.ironflowers.firebasetest.ui.home.HomeModule; import com.ironflowers.firebasetest.ui.signin.SignInActivity; import com.ironflowers.firebasetest.ui.signin.SignInModule; import com.ironflowers.firebasetest.ui.content.ContentModule; import com.ironf...
package com.ironflowers.firebasetest.di; @Module public abstract class ActivityBindingModule { @ActivityScoped
@ContributesAndroidInjector(modules = HomeModule.class)
1
rcongiu/Hive-JSON-Serde
json-serde/src/main/java/org/openx/data/jsonserde/JsonSerDe.java
[ "public abstract class AbstractSerDe implements SerDe {\n public AbstractSerDe() {\n }\n\n public abstract void initialize(Configuration var1, Properties var2) throws SerDeException;\n\n public abstract Class<? extends Writable> getSerializedClass();\n\n public abstract Writable serialize(Object var1...
import java.sql.Timestamp; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import org.apache.hadoop.hive.serde2.AbstractSerDe; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde...
/*======================================================================* * Copyright (c) 2011, OpenX Technologies, Inc. All rights reserved. * * * * Licensed under the New BSD License (the "License"); you may not use * * this file except in c...
rowObjectInspector = (StructObjectInspector) JsonObjectInspectorFactory
4
jiangqqlmj/Android-Universal-Image-Loader-Modify
sample/src/main/java/com/nostra13/universalimageloader/sample/fragment/ImageGridFragment.java
[ "public final class DisplayImageOptions {\n /*图片正在加载过程中的图片*/\n\tprivate final int imageResOnLoading;\n\t/*图片地址为空,显示的图片*/\n\tprivate final int imageResForEmptyUri;\n\t/*图片加载失败,显示的图片*/\n\tprivate final int imageResOnFail;\n\t/*图片资源 正在加载的图片*/\n\tprivate final Drawable imageOnLoading;\n\t/*图片资源 图片地址为空情况*/\n\tprivate...
import android.content.Context; import android.graphics.Bitmap; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import andro...
/******************************************************************************* * Copyright 2011-2014 Sergey Tarasevich * * 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....
ImageLoader.getInstance()
1
Lambda-3/DiscourseSimplification
src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/AdjectivalAdverbialMiddleFinalExtractor.java
[ "public enum Relation {\n\n UNKNOWN,\n\n // Coordinations\n UNKNOWN_COORDINATION, // the default for coordination\n CONTRAST,\n CAUSE_C,\n RESULT_C,\n LIST,\n DISJUNCTION,\n TEMPORAL_AFTER_C,\n TEMPORAL_BEFORE_C,\n\n // Subordinations\n UNKNOWN_SUBORDINATION, // the default for s...
import org.lambda3.text.simplification.discourse.utils.parseTree.ParseTreeExtractionUtils; import org.lambda3.text.simplification.discourse.utils.words.WordsUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; import edu.stanford.nlp.ling.Word; import edu.stanfor...
/* * ==========================License-Start============================= * DiscourseSimplification : SubordinationPostExtractor * * Copyright © 2017 Lambda³ * * GNU General Public License 3 * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public Lic...
public Optional<Extraction> extract(Leaf leaf) throws ParseTreeException {
4
gallir/SpokenPic
src/com/spokenpic/ViewClipImporter.java
[ "static public interface FileDownloaderListener {\n\tvoid onDownLoadFinished(File file);\n}", "public class InputStreamDownloader {\n\tDownloader mTask;\n\tInputStream mIs;\n\tFileDownloaderListener mListener;\n\tString mFilename;\n\t\n\t/*\n\tstatic public void download(InputStream is, String outputFile, FileDow...
import java.io.File; import java.io.FileNotFoundException; import java.io.InputStream; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.view.WindowManager; import com.actionbar...
/** * SpokenPic Java source code * @author Ricardo Galli (gallir@gmail.com) * @copyright: Menéame & APSL, 2012 * @license: GPL3 */ package com.spokenpic; public class ViewClipImporter extends SherlockActivity implements CameraPreviewCallback { private CameraPreview mPreview = null; @Override public void...
final LazyProgressDialog dialog = LazyProgressDialog.show(this, null, getString(R.string.downloading_image), true, true);
6
JEEventStore/JEEventStore
persistence-jpa/src/main/java/org/jeeventstore/persistence/jpa/EventStorePersistenceJPA.java
[ "public interface ChangeSet extends Serializable {\n\n /**\n * Identifies the bucket to which the event stream belongs.\n * \n * @return the identifier\n */\n String bucketId();\n\n /**\n * Identifies the event stream to which this belongs.\n * \n * @return the identifier\n ...
import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Resource; import javax.ejb.EJB; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import jav...
/* * Copyright (c) 2013 Red Rainbow IT Solutions GmbH, Germany * * 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, c...
public Iterator<ChangeSet> allChanges(final String bucketId) {
0
springtestdbunit/spring-test-dbunit
spring-test-dbunit/src/main/java/com/github/springtestdbunit/annotation/DbUnitConfiguration.java
[ "public class DbUnitTestExecutionListener extends AbstractTestExecutionListener {\n\n\tprivate static final Log logger = LogFactory.getLog(DbUnitTestExecutionListener.class);\n\n\tprivate static final String[] COMMON_DATABASE_CONNECTION_BEAN_NAMES = { \"dbUnitDatabaseConnection\", \"dataSource\" };\n\n\tprivate sta...
import com.github.springtestdbunit.dataset.FlatXmlDataSetLoader; import com.github.springtestdbunit.operation.DatabaseOperationLookup; import com.github.springtestdbunit.operation.DefaultDatabaseOperationLookup; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation...
/* * Copyright 2002-2016 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 applic...
Class<? extends DataSetLoader> dataSetLoader() default FlatXmlDataSetLoader.class;
1
nantaphop/AomYim-Pantip
app/src/main/java/com/nantaphop/pantipfanapp/utils/CustomLinkMovementMethod.java
[ "@EApplication\npublic class BaseApplication extends Application {\n\n @Pref\n UserPref_ userPref;\n\n static private Bus eventBus = null;\n static private Gson gson = null;\n\n LruCache<String, BitmapDrawable> imageCache;\n private Bitmap tmpDrawingCache;\n ArrayList<String> loadingList;\n\n ...
import android.content.Context; import android.content.Intent; import android.net.Uri; import android.text.Layout; import android.text.method.LinkMovementMethod; import android.text.style.URLSpan; import android.util.Log; import android.view.MotionEvent; import com.nantaphop.pantipfanapp.BaseApplication; import com.nan...
package com.nantaphop.pantipfanapp.utils; /** * Created with IntelliJ IDEA. * User: Nantaphop * Date: 8/14/13 * Time: 3:06 PM * To change this template use File | Settings | File Templates. */ public class CustomLinkMovementMethod extends LinkMovementMethod { private static Context movementContext; p...
BaseApplication.getEventBus().post(new OpenPhotoEvent(url));
1
cloudsoft/brooklyn-tosca
karaf/init/src/main/java/io/cloudsoft/tosca/a4c/brooklyn/osgi/AlienPlatformFactoryOsgi.java
[ "public interface AlienPlatformFactory {\n\n ToscaPlatform newPlatform(ManagementContext mgmt) throws Exception;\n \n public static class Default implements AlienPlatformFactory {\n @Override\n public ToscaPlatform newPlatform(ManagementContext mgmt) throws Exception {\n Applicatio...
import io.cloudsoft.tosca.a4c.brooklyn.AlienPlatformFactory; import io.cloudsoft.tosca.a4c.platform.Alien4CloudSpringContext; import io.cloudsoft.tosca.a4c.platform.ToscaPlatform; import org.apache.brooklyn.api.mgmt.ManagementContext; import org.elasticsearch.util.AnnotationScanner; import org.springframework.context.A...
package io.cloudsoft.tosca.a4c.brooklyn.osgi; public class AlienPlatformFactoryOsgi implements AlienPlatformFactory { @Override public ToscaPlatform newPlatform(ManagementContext mgmt) throws Exception { ResourceLoader rl = new OsgiAwarePathMatchingResourcePatternResolver(); TypeScanner.setR...
AnnotationScanner.setResourceLoader(rl);
3
Doist/JobSchedulerCompat
library/src/main/java/com/doist/jobschedulercompat/JobScheduler.java
[ "@RestrictTo(RestrictTo.Scope.LIBRARY)\npublic class JobStatus {\n public static final long NO_LATEST_RUNTIME = Long.MAX_VALUE;\n public static final long NO_EARLIEST_RUNTIME = 0L;\n\n public static final int CONSTRAINT_CHARGING = JobInfo.CONSTRAINT_FLAG_CHARGING;\n public static final int CONSTRAINT_ID...
import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GoogleApiAvailability; import com.doist.jobschedulercompat.job.JobStatus; import com.doist.jobschedulercompat.job.JobStore; import com.doist.jobschedulercompat.scheduler.Scheduler; import com.doist.jobschedulercompat.scheduler.a...
package com.doist.jobschedulercompat; /** @see android.app.job.JobScheduler */ public class JobScheduler { /** @see android.app.job.JobScheduler#RESULT_SUCCESS */ public static final int RESULT_FAILURE = 0; /** @see android.app.job.JobScheduler#RESULT_FAILURE */ public static final int RESULT_SUCC...
return getSchedulerForTag(context, JobSchedulerSchedulerV28.TAG);
8
lkorth/photo-paper
PhotoPaper/src/main/java/com/lukekorth/photo_paper/views/FeatureListPreference.java
[ "public class SearchActivity extends AppCompatActivity implements SearchView.OnQueryTextListener,\n AbsListView.OnScrollListener, View.OnClickListener {\n\n private static final String QUERY_KEY = \"com.lukekorth.photo_paper.SearchActivity.QUERY_KEY\";\n\n private SearchView mSearchView;\n private G...
import android.annotation.TargetApi; import android.app.AlertDialog; import android.content.Context; import android.content.Intent; import android.os.Build; import android.preference.ListPreference; import android.preference.Preference; import android.util.AttributeSet; import com.lukekorth.photo_paper.R; import com.lu...
package com.lukekorth.photo_paper.views; public class FeatureListPreference extends ListPreference implements Preference.OnPreferenceChangeListener { private Realm mRealm; public FeatureListPreference(Context context) { super(context); init(); } public FeatureListPreference(Contex...
getContext().startActivity(new Intent(getContext(), SearchActivity.class));
0
KorAP/Koral
src/main/java/de/ids_mannheim/korap/query/serialize/MapBuilder.java
[ "public class KoralGroup implements KoralObject {\n\n private static final KoralType type = KoralType.GROUP;\n\n private KoralOperation operation;\n\n private boolean inOrder = false;\n private List<KoralObject> operands;\n private List<KoralDistance> distances;\n private List<KoralFrame> frames;\...
import java.util.Map; import de.ids_mannheim.korap.query.object.KoralGroup; import de.ids_mannheim.korap.query.object.KoralObject; import de.ids_mannheim.korap.query.object.KoralSpan; import de.ids_mannheim.korap.query.object.KoralTerm; import de.ids_mannheim.korap.query.object.KoralTermGroup; import de.ids_mannheim.ko...
package de.ids_mannheim.korap.query.serialize; /** * @author margaretha * */ public class MapBuilder { /** Builds a query map containing JSON-LD serialization parts of the given KoralObject. * @param o * @return a map */ public static Map<String, Object> buildQueryMap(KoralObject o) { ...
if (o instanceof KoralToken) {
5
fredg02/se.bitcraze.crazyflie.lib
se.bitcraze.crazyflie.lib/src/test/java/se/bitcraze/crazyflie/lib/crazyflie/CrazyflieTest.java
[ "public class MockDriver extends RadioDriver {\n\n final Logger mLogger = LoggerFactory.getLogger(this.getClass().getSimpleName());\n\n public static final int CF1 = 1;\n public static final int CF2 = 2;\n\n protected int mCFmodel = CF1;\n\n public MockDriver() {\n super(null);\n }\n\n @...
import java.util.ArrayList; import org.junit.Test; import se.bitcraze.crazyflie.lib.MockDriver; import se.bitcraze.crazyflie.lib.TestConnectionAdapter; import se.bitcraze.crazyflie.lib.TestUtilities; import se.bitcraze.crazyflie.lib.crazyradio.ConnectionData; import se.bitcraze.crazyflie.lib.crazyradio.RadioDriver; imp...
/** * || ____ _ __ * +------+ / __ )(_) /_______________ _____ ___ * | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ * +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ * || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ * * Copyright (C) 2015 Bitcraze AB * * Crazyflie Nano Quadcop...
crazyflie.getDriver().addConnectionListener(new TestConnectionAdapter() {
1
noctarius/castmapr
src/main/java/com/noctarius/castmapr/client/AllKeysMapReduceRequest.java
[ "public class IListMapReduceOperationFactory<KeyIn, ValueIn, KeyOut, ValueOut>\n implements OperationFactory\n{\n\n private Mapper<KeyIn, ValueIn, KeyOut, ValueOut> mapper;\n\n private Reducer<KeyOut, ValueOut> reducer;\n\n private boolean distributableReducer;\n\n private String name;\n\n public ...
import java.io.IOException; import java.util.Map; import com.hazelcast.client.AllPartitionsClientRequest; import com.hazelcast.client.RetryableRequest; import com.hazelcast.map.MapService; import com.hazelcast.nio.ObjectDataInput; import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.nio.serialization.DataSer...
/* * 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...
return new IMapMapReduceOperationFactory<KeyIn, ValueIn, KeyOut, ValueOut>( name, mapper, reducer,
1
gems-uff/prov-viewer
src/main/java/br/uff/ic/provviewer/ProvDebugger.java
[ "public class DebugVisualizationScheme extends ColorScheme {\n int totalNumberGraphs = 2;\n List<Vertex> alwaysWrong = new ArrayList<>();\n List<Vertex> reasonsForFailure = new ArrayList<>();\n List<Vertex> proposedFix = new ArrayList<>();\n \n\n public DebugVisualizationScheme(String attribute, L...
import java.util.HashMap; import java.util.List; import java.util.Map; import br.uff.ic.provviewer.Vertex.ColorScheme.DebugVisualizationScheme; import br.uff.ic.utility.graph.ActivityVertex; import br.uff.ic.utility.graph.AgentVertex; import br.uff.ic.utility.graph.EntityVertex; import br.uff.ic.utility.graph.Vertex; i...
/* * The MIT License * * Copyright 2018 Kohwalter. * * 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, modif...
} else if ((v instanceof ActivityVertex || ((Vertex) v).hasAttribute(VariableNames.CollapsedVertexActivityAttribute)) && activity) {
1
googleapis/google-oauth-java-client
google-oauth-client-java6/src/test/java/com/google/api/client/extensions/java6/auth/oauth2/FileCredentialStoreTest.java
[ "public class BearerToken {\n\n /** Query and form-encoded parameter name. */\n static final String PARAM_NAME = \"access_token\";\n\n /**\n * In case an abnormal HTTP response is received with {@code WWW-Authenticate} header, and its\n * value contains this error pattern, we will try to refresh the token.\n...
import com.google.api.client.auth.oauth2.BearerToken; import com.google.api.client.auth.oauth2.Credential; import com.google.api.client.auth.oauth2.StoredCredential; import com.google.api.client.auth.oauth2.TokenErrorResponse; import com.google.api.client.auth.oauth2.TokenResponse; import com.google.api.client.http.Bas...
} public void testStoreCredentials() throws Exception { Credential expected = createCredential(); File file = createTempFile(); file.delete(); FileCredentialStore store = new FileCredentialStore(file, JSON_FACTORY); store = new FileCredentialStore(file, JSON_FACTORY); store.store(USER_ID, e...
DataStore<StoredCredential> newStore =
2
wso2-extensions/identity-outbound-auth-samlsso
components/org.wso2.carbon.identity.application.authenticator.samlsso/src/test/java/org/wso2/carbon/identity/application/authenticator/samlsso/logout/processor/SAMLLogoutResponseProcessorTest.java
[ "public class SAMLMessageContext<T1 extends Serializable, T2 extends Serializable> extends IdentityMessageContext {\n\n private String acsUrl;\n private String response;\n private String sessionID;\n private String idpSessionID;\n private String tenantDomain;\n private Boolean validStatus;\n pr...
import static org.wso2.carbon.identity.application.authentication.framework.inbound.InboundConstants.RequestProcessor.CONTEXT_KEY; import static org.wso2.carbon.identity.application.authenticator.samlsso.TestConstants.INBOUND_SESSION_INDEX; import static org.wso2.carbon.identity.application.authenticator.samlsso.TestCo...
/* * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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/li...
SAMLMessageContext context = new SAMLMessageContext(mockedLogoutRequest, new HashMap());
0
pasqualesalza/elephant56
elephant56/src/main/java/it/unisa/elephant56/core/generator/GridDistributedSecondaryGenerationsBlockExecutor.java
[ "public class IndividualWrapper<IndividualType extends Individual, FitnessValueType extends FitnessValue>\r\n implements Comparable<IndividualWrapper<IndividualType, FitnessValueType>>, Cloneable {\r\n\r\n private IndividualType individual;\r\n private FitnessValueType fitnessValue;\r\n private Bool...
import it.unisa.elephant56.core.common.IndividualWrapper; import it.unisa.elephant56.core.common.Properties; import it.unisa.elephant56.core.reporter.individual.IndividualReporter; import it.unisa.elephant56.core.reporter.time.GenerationsBlockTimeReporter; import it.unisa.elephant56.core.reporter.time.GeneticOperat...
package it.unisa.elephant56.core.generator; public class GridDistributedSecondaryGenerationsBlockExecutor extends GenerationsBlockExecutor { private boolean isLastGeneration; public GridDistributedSecondaryGenerationsBlockExecutor(boolean isLastGeneration) { super(); this.isLast...
FitnessEvaluation<Individual, FitnessValue> fitnessEvaluationClassInstance = null;
5
vangj/jbayes
src/main/java/com/github/vangj/jbayes/inf/exact/graph/pptc/blocks/Initialization.java
[ "public static Potential getPotential(Node node, List<Node> parents) {\n Potential potential = getPotential(merge(node, parents));\n\n final int total = Math.min(node.probs().size(), potential.entries().size());\n for (int i = 0; i < total; i++) {\n Double prob = node.probs().get(i);\n potential.entries()....
import static com.github.vangj.jbayes.inf.exact.graph.util.PotentialUtil.getPotential; import static com.github.vangj.jbayes.inf.exact.graph.util.PotentialUtil.multiply; import com.github.vangj.jbayes.inf.exact.graph.lpd.Potential; import com.github.vangj.jbayes.inf.exact.graph.pptc.Clique; import com.github.vangj.jbay...
package com.github.vangj.jbayes.inf.exact.graph.pptc.blocks; /** * Step 4. Assigns initial join-tree potentials using the conditional probabilities from the belief * network. */ public class Initialization { private Initialization() { } public static JoinTree initialization(JoinTree joinTree) { joinT...
Clique clique = (null == node.getMetadata("parent.clique"))
3
actorapp/droidkit-actors
actors/src/main/java/com/droidkit/actors/typed/TypedAskExtensions.java
[ "public class ActorRef {\n private ActorSystem system;\n private AbsActorDispatcher dispatcher;\n private UUID uuid;\n private String path;\n private ActorEndpoint endpoint;\n\n public UUID getUuid() {\n return uuid;\n }\n\n public String getPath() {\n return path;\n }\n\n ...
import com.droidkit.actors.ActorRef; import com.droidkit.actors.concurrency.Future; import com.droidkit.actors.concurrency.FutureCallback; import com.droidkit.actors.extensions.ActorExtension; import com.droidkit.actors.typed.messages.TypedFutureError; import com.droidkit.actors.typed.messages.TypedFutureResult; import...
package com.droidkit.actors.typed; /** * Created by ex3ndr on 14.09.14. */ public class TypedAskExtensions implements ActorExtension { private HashMap<Integer, AskContainer> containers = new HashMap<Integer, AskContainer>(); private ActorRef self; private AtomicInteger askId = new AtomicInteger(); ...
} else if (message instanceof TypedFutureError) {
4
BoD/irondad
src/main/java/org/jraf/irondad/handler/helloworld/HelloWorldHandler.java
[ "public abstract class CommandHandler extends BaseHandler {\n protected abstract String getCommand();\n\n @Override\n public boolean isMessageHandled(String channel, String fromNickname, String text, List<String> textAsList, Message message, HandlerContext handlerContext) {\n String command = getCom...
import org.jraf.irondad.protocol.Connection; import org.jraf.irondad.protocol.Message; import java.util.List; import org.jraf.irondad.handler.CommandHandler; import org.jraf.irondad.handler.HandlerContext; import org.jraf.irondad.protocol.Command;
/* * This source is part of the * _____ ___ ____ * __ / / _ \/ _ | / __/___ _______ _ * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / * /___/ * repository. * * Copyright (C) 2013 Benoit 'BoD' Lubek (BoD@JRAF.org) * * This library is free sof...
public void handlePrivmsgMessage(Connection connection, String fromNickname, String text, List<String> textAsList, Message message,
4
HGGM-LIM/jclustering
src/main/java/jclustering/JClustering_.java
[ "public abstract class ClusteringMetric implements ActionListener, ItemListener {\n\n /**\n * Panel to be returned if this metric needs configuration.\n */\n protected JPanel jp;\n\n /**\n * Reference to the full image, if needed.\n */\n protected ImagePlusHyp ip;\n\n /**\n * Comp...
import java.awt.BorderLayout; import java.awt.Button; import java.awt.Component; import java.awt.Dimension; import java.awt.GridLayout; import java.awt.Label; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ComponentEvent; import java.awt.event.Com...
package jclustering; /** * <p> * JClustering ImageJ Plugin. * </p> * * <p> * This plugin is intended to be used as a development framework for developing * clustering algorithms to be used in nuclear medicine dynamic studies or * any other modality of dynamic imaging. * Examples of said clustering algor...
met_panel.add(new Label(NO_METRIC));
5
maruohon/minihud
src/main/java/fi/dy/masa/minihud/config/ConfigCallbacks.java
[ "public class DataStorage\n{\n private static final DataStorage INSTANCE = new DataStorage();\n\n private final Minecraft mc = GameUtils.getClient();\n\n private final MobCapDataHolder mobcapData = new MobCapDataHolder();\n private final StructureStorage structureStorage = new StructureStorage();\n p...
import fi.dy.masa.malilib.input.callback.AdjustableValueHotkeyCallback; import fi.dy.masa.malilib.input.callback.HotkeyCallback; import fi.dy.masa.malilib.listener.EventListener; import fi.dy.masa.malilib.overlay.message.MessageUtils; import fi.dy.masa.minihud.data.DataStorage; import fi.dy.masa.minihud.hotkeys.Actions...
package fi.dy.masa.minihud.config; public class ConfigCallbacks { public static void init() { Configs.Generic.OPEN_CONFIG_GUI.getKeyBind().setCallback(HotkeyCallback.of(Actions.OPEN_CONFIG_SCREEN)); Configs.Generic.OPEN_SHAPE_EDITOR.getKeyBind().setCallback(HotkeyCallback.of(Actions.OPEN_SHAPE...
Configs.Generic.LIGHT_LEVEL_RANGE.addValueChangeListener(OverlayRendererLightLevel::setNeedsUpdate);
4
Sparker0i/Weather
app/src/main/java/com/a5corp/weather/GlobalActivity.java
[ "public class Log {\n public static void i(String tag , String message) {\n if (BuildConfig.DEBUG)\n android.util.Log.i(tag , message);\n }\n\n public static void i(String tag , String message , Throwable r) {\n if (BuildConfig.DEBUG)\n android.util.Log.i(tag, message, r...
import android.content.Intent; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import com.a5corp.weather.model.Log; import com.a5corp.weather.activity.FirstLaunch; import com.a5corp.weather.activity.WeatherActivity; import com.a5corp.weather.preferences.Preferences; import com.a5corp.weather....
package com.a5corp.weather; public class GlobalActivity extends AppCompatActivity { public static Preferences cp; public static Prefs prefs; public static int i = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView...
intent = new Intent(GlobalActivity.this, FirstLaunch.class);
1
byoutline/CachedField
eventbuscachedfield/src/main/java/com/byoutline/eventbuscachedfield/EventBusCachedEndpointWithArgBuilder.java
[ "public interface ProviderWithArg<RETURN_TYPE, ARG_TYPE> {\n\n RETURN_TYPE get(ARG_TYPE arg);\n}", "public interface CachedEndpointWithArg<RETURN_TYPE, ARG_TYPE> {\n StateAndValue<RETURN_TYPE, ARG_TYPE> getStateAndValue();\n\n void call(ARG_TYPE arg);\n\n /**\n * Forget cached value, so memory can...
import com.byoutline.cachedfield.ProviderWithArg; import com.byoutline.cachedfield.cachedendpoint.CachedEndpointWithArg; import com.byoutline.cachedfield.cachedendpoint.StateAndValue; import com.byoutline.eventbuscachedfield.internal.EventIBus; import com.byoutline.ibuscachedfield.IBusCachedEndpointWithArgBuilder; impo...
package com.byoutline.eventbuscachedfield; /** * Fluent interface for building instances of {@link EventBusCachedEndpointWithArg}. */ public class EventBusCachedEndpointWithArgBuilder<RETURN_TYPE, ARG_TYPE> extends IBusCachedEndpointWithArgBuilder<RETURN_TYPE, ARG_TYPE, EventBus, CachedEndpointWithArg<RETU...
ResponseEventWithArg<StateAndValue<RETURN_TYPE, ARG_TYPE>, ARG_TYPE> resultEvent,
2
fau-amos-2014-team-2/root
WoundManagement/src/main/java/com/fau/amos/team2/WoundManagement/ui/subviews/ExistingWound.java
[ "public enum BodyLocation {\n\t\n\tNULL(0),\n\tHINTERKOPF(1),\n\tSCHAEDELANSATZ(2),\n\tNACKEN(3),\n\tSCHULTERBLATT_OBEN_LI(4),\n\tSCHULTERBLATT_UNTEN_LI(5),\n\tSCHULTERBLATT_OBEN_RE(6),\n\tSCHULTERBLATT_UNTEN_RE(7),\n\tELLENBOGEN_LI(8),\n\tELLENBOGEN_RE(9),\n\tKREUZBEIN(10),\n\tFERSE_LI(11),\n\tFERSE_RE(12),\n\tGES...
import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import com.fau.amos.team2.WoundManagement.model.BodyLocation; import com.fau.amos.team2.WoundManagement.model.Origination; import com.fau.amos.team2.WoundManagement.model.Wound; import com.fau.amos.team2.WoundManagement.provider.Woun...
package com.fau.amos.team2.WoundManagement.ui.subviews; public class ExistingWound extends VerticalLayout { private static final long serialVersionUID = 4222621457384471453L; private final Wound wound; private PatientView parentView; private DateFormat dateFormat; private Label typeDecubitusLabel; private...
private WoundProvider woundProvider =
3
ThomasDaheim/ownNoteEditor
ownNoteEditor/src/main/java/tf/ownnote/ui/notes/NoteMetaData.java
[ "public class CommentDataMapper {\n private final static CommentDataMapper INSTANCE = new CommentDataMapper();\n \n private static final String COMMENT_STRING_PREFIX = \"<!-- \";\n private static final String COMMENT_STRING_SUFFIX = \" -->\";\n public static final String COMMENT_DATA_SEP = \"---\";\n...
import java.io.File; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBoolean...
/* * Copyright (c) 2014ff Thomas Feuster * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and...
private final ObservableSet<TaskData> myTasks = FXCollections.<TaskData>observableSet();
7
klaus7/jfastnet
src/main/java/com/jfastnet/State.java
[ "public class EventLog {\n\n\tprivate final Config config;\n\tprivate final State state;\n\n\t@Getter\n\tprivate CircularFifoQueue<Event> eventQueue;\n\n\tpublic EventLog(Config config, State state) {\n\t\tthis.config = config;\n\t\tthis.state = state;\n\t\tthis.eventQueue = new CircularFifoQueue<>(config.eventLogS...
import java.lang.reflect.InvocationTargetException; import java.util.*; import com.jfastnet.events.EventLog; import com.jfastnet.idprovider.IIdProvider; import com.jfastnet.messages.MessagePart; import com.jfastnet.processors.IMessageReceiverPostProcessor; import com.jfastnet.processors.IMessageReceiverPreProcessor; im...
/******************************************************************************* * Copyright 2018 Klaus Pfeiffer - klaus@allpiper.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 * ...
private final List<IMessageSenderPostProcessor> messageSenderPostProcessors = new ArrayList<>();
5
s4/core
src/main/java/io/s4/client/ClientStub.java
[ "public class EventWrapper {\n private List<CompoundKeyInfo> compoundKeys = null;\n private List<List<String>> compoundKeyNames = null;\n private Object event;\n private String streamName;\n\n public List<CompoundKeyInfo> getCompoundKeys() {\n return compoundKeys;\n }\n\n public Object g...
import org.apache.log4j.Logger; import io.s4.collector.EventWrapper; import io.s4.listener.EventHandler; import io.s4.message.Request; import io.s4.message.Response; import io.s4.util.ByteArrayIOChannel; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; import...
public void setConnectionPort(int port) throws IOException { serverSocket = new ServerSocket(port); } private Thread acceptThread = null; private Thread senderThread = null; public void init() { // start accepting new clients and sending events to them (acceptThread = new T...
Request.RInfo rinfo = res.getRInfo();
2
KostyaSha/yet-another-docker-plugin
yet-another-docker-its/src/test/java/com/github/kostyasha/it/tests/ShortTLSKeyTest.java
[ "public class DockerRule extends ExternalResource {\n private static final long serialVersionUID = 1L;\n private static final Logger LOG = LoggerFactory.getLogger(DockerRule.class);\n\n public static final String CONTAINER_JAVA_OPTS = \"JAVA_OPTS=\"\n // hack crap https://issues.jenkins-ci.org/b...
import com.github.kostyasha.it.rule.DockerRule; import com.github.kostyasha.yad.client.ClientBuilderForConnector; import com.github.kostyasha.yad.other.ConnectorType; import com.github.kostyasha.yad.other.VariableSSLConfig; import com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.DockerClient; import com.g...
package com.github.kostyasha.it.tests; /** * @author Kanstantsin Shautsou */ @RunWith(Parameterized.class) public class ShortTLSKeyTest { private static final Logger LOG = LoggerFactory.getLogger(ShortTLSKeyTest.class); private static final String DATA_IMAGE_TAG = ShortTLSKeyTest.class.getSimpleName().toL...
public static TemporaryFolder folder = new TemporaryFolder(new File(getDockerItDir()));
3
peshkira/c3po
c3po-webapi/app/controllers/Elements.java
[ "public interface PersistenceLayer {\n\n /**\n * Clears the current cache of the application. This includes the\n * {@link Cache}, but also any other cached information that the backend\n * provider might have stored (e.g. cached statistics and aggregations).\n */\n void clearCache();\n\n /**\n * This ...
import com.petpet.c3po.datamodel.Element; import com.petpet.c3po.datamodel.Filter; import com.petpet.c3po.utils.Configurator; import com.petpet.c3po.utils.DataHelper; import common.WebAppConstants; import java.util.ArrayList; import java.util.List; import org.bson.types.ObjectId; import play.Logger; import play.mvc.Con...
/******************************************************************************* * Copyright 2013 Petar Petrov <me@petarpetrov.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
final PersistenceLayer pl = Configurator.getDefaultConfigurator().getPersistence();
2
Wisebite/wisebite_android
app/src/main/java/dev/wisebite/wisebite/activity/CreateMenuActivity.java
[ "public class DishAdapter extends RecyclerView.Adapter<DishAdapter.DishHolder> {\n\n private ArrayList<Dish> dishes;\n private boolean menu;\n\n public DishAdapter(ArrayList<Dish> dishes, boolean menu) {\n this.dishes = dishes;\n this.menu = menu;\n notifyDataSetChanged();\n }\n\n ...
import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.LayoutInflat...
package dev.wisebite.wisebite.activity; public class CreateMenuActivity extends BaseActivity { private ArrayList<Dish> mainDishes, secondaryDishes, otherDishes; private DishAdapter mainDishesAdapter, secondaryDishesAdapter, otherDishesAdapter; private LayoutInflater inflater; private FloatingActi...
private MenuService menuService;
3
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...
AppPreferences providesSettings() {
6
Anchormen/sql4es
src/main/java/nl/anchormen/sql4es/parse/sql/GroupParser.java
[ "public interface QueryState {\n\n\t/**\n\t * Provides the original query provided to the driver\n\t * @return\n\t */\n\tpublic String originalSql();\n\n\t/**\n\t * Returns the heading build for the query\n\t * @return\n\t */\n\tpublic Heading getHeading();\n\t\n\t/**\n\t * Adds exception to this state signaling so...
import java.util.ArrayList; import java.util.List; import java.util.Set; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.script.Script; import org.elasticsearch.search.aggregations.AggregationBuilder; import org.elasticsearch.search.aggrega...
package nl.anchormen.sql4es.parse.sql; /** * A Presto {@link AstVisitor} implementation that parses GROUP BY clauses * * @author cversloot * */ public class GroupParser extends SelectParser { public TermsAggregationBuilder parse(List<GroupingElement> elements, QueryState state){ List<Column> groups = ne...
Heading.fixColumnReferences(state.originalSql()+";", "group by.+", "\\W", groups);
2
fashare2015/MVVM-JueJin
databinding/src/main/kotlin/com/fashare/databinding/adapters/RecyclerViewAdapter.java
[ "public abstract class OnItemClickListener<T> {\n public abstract void onItemClick(ViewHolder holder, T data, int position);\n\n public boolean onItemLongClick(ViewHolder holder, T data, int position) {\n return false;\n }\n}", "public class ViewHolder extends RecyclerView.ViewHolder {\r\n priv...
import android.databinding.BindingAdapter; import android.databinding.BindingConversion; import android.databinding.DataBindingUtil; import android.databinding.ObservableArrayList; import android.databinding.ViewDataBinding; import android.support.annotation.LayoutRes; import android.support.v7.widget.RecyclerView; imp...
package com.fashare.databinding.adapters; /** * User: fashare(153614131@qq.com) * Date: 2017-09-10 * Time: 16:15 */ public class RecyclerViewAdapter { public static final String TAG_SHORT = "RecyclerViewAdapter"; public static final String TAG = "RecyclerViewAdapter - binding RecyclerView...: "; @...
CommonRvAdapter innerAdapter;
2
sewerk/Bill-Calculator
app/src/main/java/pl/srw/billcalculator/di/ApplicationComponent.java
[ "@RetainActivityScope\n@Subcomponent\npublic interface PgeBillComponent extends MvpComponent<PgeBillActivity> {\n}", "@RetainActivityScope\n@Subcomponent\npublic interface PgnigBillComponent extends MvpComponent<PgnigBillActivity> {\n}", "@RetainActivityScope\n@Subcomponent\npublic interface TauronBillComponent...
import android.content.Context; import android.support.annotation.NonNull; import javax.inject.Singleton; import dagger.Component; import pl.srw.billcalculator.BillCalculator; import pl.srw.billcalculator.bill.di.PgeBillComponent; import pl.srw.billcalculator.bill.di.PgnigBillComponent; import pl.srw.billcalculator.bil...
package pl.srw.billcalculator.di; @Singleton @Component(modules = ApplicationModule.class) public interface ApplicationComponent { @NonNull HistoryComponent getHistoryComponent(); @NonNull SettingsComponent getSettingsComponent();
@NonNull PgeBillComponent getPgeBillComponent();
0
cattaka/AdapterToolbox
example/src/main/java/net/cattaka/android/adaptertoolbox/example/MultiChoosableTreeItemAdapterExampleActivity.java
[ "public abstract class AbsChoosableTreeItemAdapter<\n A extends AbsChoosableTreeItemAdapter<A, VH, T, W>,\n VH extends RecyclerView.ViewHolder,\n T extends ITreeItem<T>,\n W extends AbsChoosableTreeItemAdapter.WrappedItem<W, T>\n > extends AbsTreeItemAdapter<\n A,\n ...
import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import net.cattaka.android.adaptertoolbox.adapter.AbsChoosableTreeItemA...
package net.cattaka.android.adaptertoolbox.example; /** * Created by cattaka on 16/05/21. */ public class MultiChoosableTreeItemAdapterExampleActivity extends AppCompatActivity implements View.OnClickListener { SnackbarLogic mSnackbarLogic = new SnackbarLogic(); RecyclerView mRecyclerView;
ChoosableMyTreeItemAdapter mAdapter;
1
DDoS/JICI
src/main/java/ca/sapon/jici/lexer/literal/NullLiteral.java
[ "public class Environment {\n // TODO make me thread safe\n private static final Map<String, Class<?>> DEFAULT_CLASSES = new HashMap<>();\n private final Map<String, Class<?>> classes = new LinkedHashMap<>(DEFAULT_CLASSES);\n private final Map<String, Variable> variables = new LinkedHashMap<>();\n\n ...
import ca.sapon.jici.evaluator.Environment; import ca.sapon.jici.evaluator.EvaluatorException; import ca.sapon.jici.evaluator.value.Value; import ca.sapon.jici.evaluator.value.ValueKind; import ca.sapon.jici.evaluator.type.NullType; import ca.sapon.jici.evaluator.type.Type; import ca.sapon.jici.lexer.TokenID;
/* * This file is part of JICI, licensed under the MIT License (MIT). * * Copyright (c) 2015-2016 Aleksi Sapon <http://sapon.ca/jici/> * * 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...
public ValueKind getKind() {
3
funktionio/funktion-connectors
funktion-agent/src/main/java/io/fabric8/funktion/agent/Agent.java
[ "public class DataKeys {\n public static class Connector {\n public static final String SCHEMA_YAML = \"schema.yml\";\n public static final String ASCIIDOC = \"documentation.adoc\";\n public static final String DEPLOYMENT_YAML = \"deployment.yml\";\n public static final String APPLICA...
import com.fasterxml.jackson.core.JsonProcessingException; import io.fabric8.funktion.DataKeys; import io.fabric8.funktion.Labels; import io.fabric8.funktion.model.Funktion; import io.fabric8.kubernetes.api.KubernetesHelper; import io.fabric8.kubernetes.api.model.ConfigMap; import io.fabric8.kubernetes.api.model.Config...
/* * Copyright 2016 Red Hat, Inc. * <p> * Red Hat licenses this file to you under the Apache License, version * 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless requ...
labels.put(Labels.KIND, SUBSCRIPTION);
1
ThexXTURBOXx/BlockHelper
de/thexxturboxx/blockhelper/integration/ForgeIntegration.java
[ "public class BlockHelperCommonProxy {\n\n protected static Configuration cfg;\n\n public static boolean showHealth;\n public static boolean advMachinesIntegration;\n public static boolean appEngIntegration;\n public static boolean bcIntegration;\n public static boolean ccIntegration;\n public ...
import buildcraft.factory.TileTank; import de.thexxturboxx.blockhelper.BlockHelperCommonProxy; import de.thexxturboxx.blockhelper.api.BlockHelperBlockState; import de.thexxturboxx.blockhelper.api.BlockHelperInfoProvider; import de.thexxturboxx.blockhelper.api.InfoHolder; import de.thexxturboxx.blockhelper.i18n.I18n; im...
package de.thexxturboxx.blockhelper.integration; public class ForgeIntegration extends BlockHelperInfoProvider { public static final ForgeDirection[] DIRECTIONS = ForgeDirection.values(); @Override public void addInformation(BlockHelperBlockState state, InfoHolder info) { if (iof(state.te, "net....
return BlockHelperCommonProxy.forgeIntegration;
0
adiyoss/StructED
tutorials-code/vowel/FeatureFunctionsVowelDuration.java
[ "public interface IKernel {\n Vector convertVector(Vector vector, int vectorSize);\n}", "public class Consts {\n\n // GENERALS\n\tpublic static final String SPACE = \" \";\n public static final String TAB = \"\\t\";\n public static final String COMMA_NOTE = \",\";\n\tpublic static final String CLASSIF...
import com.structed.data.Factory; import com.structed.data.entities.Vector; import com.structed.data.Logger; import com.structed.utils.ConverterHelplers; import com.structed.utils.MathHelpers; import jsc.distributions.Gamma; import com.structed.models.kernels.IKernel; import com.structed.constants.Consts; import com.st...
phiFeatures.put(loc, calculateDiff(example, win_size_50, start, MFCC_3)); loc++; phiFeatures.put(loc, calculateDiff(example, win_size_15, end, MFCC_3)); loc++; phiFeatures.put(loc, calculateDiff(example, win_size_50, end, MFCC_3)); ...
double startVal = CacheVowelData.getCumulativeValue(example, location - win_size, featureNumber);
2
neva-dev/felix-search-webconsole-plugin
src/main/java/com/neva/felix/webconsole/plugins/search/core/provider/BundleSearchProvider.java
[ "public class SearchParams {\n\n\tprivate static final int RESULT_LIMIT_DEFAULT = 60;\n\n\tprivate static final boolean CACHED_DEFAULT = true;\n\n\tprivate final String phrase;\n\n\tprivate final int resultLimit;\n\n\tprivate final List<String> providers;\n\n\tprivate final boolean cached;\n\n\tpublic SearchParams(...
import com.neva.felix.webconsole.plugins.search.core.SearchParams; import com.neva.felix.webconsole.plugins.search.core.SearchResult; import com.neva.felix.webconsole.plugins.search.core.SearchUtils; import com.neva.felix.webconsole.plugins.search.rest.BundleClassesServlet; import com.neva.felix.webconsole.plugins.sear...
package com.neva.felix.webconsole.plugins.search.core.provider; public class BundleSearchProvider extends AbstractSearchProvider { public static final String LABEL = "Bundle"; private static final int RESULT_RANK = 350; private static final Logger LOG = LoggerFactory.getLogger(BundleSearchProvider.class); pu...
result.getContext().put("bundleDownloadUrl", BundleDownloadServlet.url(bundleContext, bundle));
4
data-integrations/salesforce
src/main/java/io/cdap/plugin/salesforce/plugin/source/batch/util/SalesforceSplitUtil.java
[ "public class BulkAPIBatchException extends RuntimeException {\n private BatchInfo batchInfo;\n\n public BulkAPIBatchException(String message, BatchInfo batchInfo) {\n super(String.format(\"%s. BatchId='%s', Reason='%s'\", message, batchInfo.getId(), batchInfo.getStateMessage()));\n this.batchInfo = batchIn...
import com.sforce.async.AsyncApiException; import com.sforce.async.BatchInfo; import com.sforce.async.BatchStateEnum; import com.sforce.async.BulkConnection; import com.sforce.async.JobInfo; import com.sforce.async.JobStateEnum; import com.sforce.async.OperationEnum; import io.cdap.plugin.salesforce.BulkAPIBatchExcepti...
/* * Copyright © 2021 Cask Data, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
public static List<SalesforceSplit> getQuerySplits(String query, BulkConnection bulkConnection,
7
jsmith613/Aruco-Marker-Tracking-Android
openCVTutorial1CameraPreview/src/main/java/min3d/parser/AParser.java
[ "public class AnimationObject3d extends Object3d {\n\tprivate int numFrames;\n\tprivate KeyFrame[] frames;\n\tprivate int currentFrameIndex;\n\tprivate long startTime;\n\tprivate long currentTime;\n\tprivate boolean isPlaying;\n\tprivate float interpolation;\n\tprivate float fps = 70;\n\tprivate boolean updateVerti...
import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import min3d.animation.AnimationObject3d; import min3d.core.Object3dContainer; import min3d.vos.Color4; import min3d.vos.Number3d; import min3d.vos.Uv;...
b.getPixels(pixels, 0, w, 0, 0, w, h); atlas.setPixels(pixels, 0, w, uOffset, vOffset, w, h); ba.uOffset = (float) uOffset / totalWidth; ba.vOffset = 0; ba.uScale = (float) w / (float) totalWidth; ba.vScale = (float) h / (float) largestBitmap.bitmap.getHeight(); uOffset +=...
public Color4 diffuseColor;
2
maruohon/justenoughdimensions
src/main/java/fi/dy/masa/justenoughdimensions/world/WorldProviderJED.java
[ "@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION, certificateFingerprint = Reference.FINGERPRINT,\n guiFactory = \"fi.dy.masa.justenoughdimensions.config.JustEnoughDimensionsGuiFactory\",\n updateJSON = \"https://raw.githubusercontent.com/maruohon/justenoughdimensions...
import javax.annotation.Nullable; import net.minecraft.client.audio.MusicTicker.MusicType; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import n...
try { return clazz.getConstructor(World.class, long.class, boolean.class, String.class) .newInstance(world, seed, features, generatorOptions); } catch (NoSuchMethodException e) { } try { ...
VoidTeleport.tryVoidTeleportEntities(this.world, this.voidTeleport, this.skyTeleport);
4
sqrlserverjava/sqrl-server-base
src/main/java/com/github/sqrlserverjava/backchannel/nut/SqrlNutTokenFactory.java
[ "@XmlRootElement\npublic class SqrlConfig {\n\t// @formatter:off\n\t/* *********************************************************************************************/\n\t/* *************************************** REQUIRED ********************************************/\n\t/* *******************************************...
import java.net.InetAddress; import java.net.URI; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.sqrlserverjava.SqrlConfig; import com.github.sqrlserverjava.SqrlConfigOperations; import com.github.sqrlserverjava.backchannel.SqrlTifFlag; import com.github.sqrlserverjava.exception.SqrlClientRe...
package com.github.sqrlserverjava.backchannel.nut; // @formatter:off /** * Factory pattern class for marshaling and unmarshaling of SQRL "nut" tokens. The SQRL spec suggests a possible format, * but does not mandate the format. This library supports multiple layouts of the token to support the following: * * 1...
throw new SqrlClientRequestProcessingException(SqrlTifFlag.COMMAND_FAILED, null,
2
magmaOffenburg/magmaChallenge
srcTools/magma/tools/benchmark/controller/BenchmarkController.java
[ "public enum ChallengeType {\n\tRUN(\"Run\", server -> new RunBenchmark(server, false), RunBenchmarkTableView::getInstance),\n\n\tKICK(\"Kick\", KickBenchmark::new, KickBenchmarkTableView::getInstance),\n\n\tKEEP_AWAY(\"Keep Away\", KeepAwayBenchmark::new, KeepAwayBenchmarkTableView::getInstance),\n\n\tGAZEBO_RUN(\...
import hso.autonomy.util.commandline.Argument; import hso.autonomy.util.commandline.EnumArgument; import hso.autonomy.util.commandline.HelpArgument; import hso.autonomy.util.commandline.StringArgument; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.util.Collect...
/* Copyright 2009 Hochschule Offenburg * Klaus Dorer, Mathias Ehret, Stefan Glaser, Thomas Huber, * Simon Raffeiner, Srinivasa Ragavan, Thomas Rinklin, * Joachim Schilling, Rajit Shahi * * This file is part of magmaOffenburg. * * magmaOffenburg is free software: you can redistribute it and/or modify * it under ...
Collections.singletonList(new TeamConfiguration("magma", startScriptFolder, 0.4f)));
5
ieg-vienna/EvalBench
src_demo/EvalBenchSampleFrame.java
[ "public interface EvaluationDelegate {\n \n // TODO shorter method name easier to keep overview??\n\n /**\n * This method will be called when an {@link EvaluationSessionGroup} was set in the\n * {@link EvaluationManager} to prepare the gui for a distinct {@link EvaluationSessionGroup}\n * @para...
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.border.LineBorder; import evaluation.evalBench.Evalua...
public class EvalBenchSampleFrame extends JFrame implements EvaluationDelegate { private static final long serialVersionUID = 1L; private static final String FRAME_TITLE = "VisualizationTool"; private JPanel evalPanel; private JPanel visPanel; private TaskDialog taskDialog; /** * Initialize new F...
public void prepareForEvaluationSession(EvaluationSession aSession) {
3
apache/commons-logging
src/test/java/org/apache/commons/logging/simple/DefaultConfigTestCase.java
[ "public interface Log {\n\n /**\n * Logs a message with debug log level.\n *\n * @param message log this message\n */\n void debug(Object message);\n\n /**\n * Logs an error with debug log level.\n *\n * @param message log this message\n * @param t log this cause\n */\n ...
import org.apache.commons.logging.impl.SimpleLog; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import junit.framework.Test; import junit.framework.TestCase; import org.apache.commons.logging.Log; import org.apache.commons...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
protected Log log;
0
eckig/graph-editor
core/src/main/java/de/tesis/dynaware/grapheditor/core/skins/defaults/DefaultConnectionSkin.java
[ "public abstract class GJointSkin extends GSkin<GJoint> {\n\n private final DraggableBox root = new DraggableBox(EditorElement.JOINT)\n {\n\n @Override\n public final void positionMoved()\n {\n super.positionMoved();\n GJointSkin.this.impl_positionMoved();\n }...
import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import de.tesis.dynaware.grapheditor.GJointSkin; import de.tesis.dynaware.grapheditor.GraphEditor; import de.tesis.dynaware.grapheditor.core.connections.RectangularConnections; import de.tesis.dynaware.grapheditor.core.skins.defaults.connec...
/* * Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH */ package de.tesis.dynaware.grapheditor.core.skins.defaults; /** * The default connection skin. * * <p> * Extension of {@link SimpleConnectionSkin} that provides a mechanism for creating and removing joints. * </p> */ public class DefaultConnectionSkin ...
private final JointCreator jointCreator;
6
packetpirate/Generic-Zombie-Shooter
GenericZombieShooter/src/genericzombieshooter/structures/weapons/Flare.java
[ "public class Player extends Rectangle2D.Double {\r\n // Final variables.\r\n public static final int DEFAULT_HEALTH = 150;\r\n public static final long INVINCIBILITY_LENGTH = 3000;\r\n private static final double MOVE_SPEED = 2; // How many pixels per tick the player moves.\r\n public static final d...
import genericzombieshooter.actors.Player; import genericzombieshooter.actors.Zombie; import genericzombieshooter.misc.Images; import genericzombieshooter.structures.Animation; import genericzombieshooter.structures.LightSource; import java.awt.Color; import java.awt.Graphics2D; import java.awt.event.KeyEvent; ...
/** This file is part of Generic Zombie Shooter. Generic Zombie Shooter is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later ver...
public void fire(double theta, Point2D.Double pos, Player player) {
0
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/spi/JavaZipFileSystem.java
[ "public final class TempDir implements Closeable {\n\n private final TempFileProvider provider;\n private final File root;\n private final AtomicBoolean open = new AtomicBoolean(true);\n\n TempDir(TempFileProvider provider, File root) {\n this.provider = provider;\n this.root = root;\n ...
import java.io.BufferedOutputStream; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; import java.security...
/* * JBoss, Home of Professional Open Source * Copyright 2009, JBoss Inc., and individual contributors as indicated * by the @authors tag. * * 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 ...
private final TempDir tempDir;
0
kaliturin/BlackList
app/src/main/java/com/kaliturin/blacklist/services/BlockEventProcessService.java
[ "public class InternalEventBroadcast extends BroadcastReceiver {\n public static final String TAG = InternalEventBroadcast.class.getName();\n public static final String JOURNAL_WAS_WRITTEN = \"JOURNAL_WAS_WRITTEN\";\n public static final String SMS_WAS_WRITTEN = \"SMS_WAS_WRITTEN\";\n public static fina...
import android.app.IntentService; import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.Log; import com.kaliturin.blacklist.receivers.InternalEventBroadcast; import com.kaliturin.blacklist.utils.ContactsA...
/* * Copyright (C) 2017 Anton Kaliturin <kaliturin@gmail.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 a...
if (Settings.getBooleanValue(context, Settings.REMOVE_FROM_CALL_LOG)) {
5
albertoruibal/carballo
core/src/main/java/com/alonsoruibal/chess/evaluation/ExperimentalEvaluator.java
[ "public class Board {\n\tpublic static final int MAX_MOVES = 1024;\n\tpublic static final String FEN_START_POSITION = \"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\";\n\tpublic static final String CHESS960_START_POSITIONS[] = {\"QNNRKR\", \"NQNRKR\", \"NNQRKR\", \"NNRQKR\", \"NNRKQR\", \"NNRKRQ\", \"QN...
import com.alonsoruibal.chess.Board; import com.alonsoruibal.chess.Piece; import com.alonsoruibal.chess.Square; import com.alonsoruibal.chess.bitboard.AttacksInfo; import com.alonsoruibal.chess.bitboard.BitboardUtils; import com.alonsoruibal.chess.log.Logger;
package com.alonsoruibal.chess.evaluation; /** * Evaluation is done in centipawns * * @author rui */ public class ExperimentalEvaluator extends Evaluator { private static final Logger logger = Logger.getLogger("ExperimentalEvaluator"); // Mobility units: this value is added for the number of destination square...
private static final long WHITE_SPACE_ZONE = (BitboardUtils.C | BitboardUtils.D | BitboardUtils.E | BitboardUtils.F) &
4
iostackproject/SDGen
src/com/ibm/test/CompressionAndPerformanceMotifGeneratorTest.java
[ "public abstract class AbstractChunkCharacterization implements Serializable, Cloneable{\n\t\n\tprivate static final long serialVersionUID = 1L;\n\t/*Size of the chunk during the scan process*/\n\tprotected int size = 0; \n\t/*Amount of non unique data of this chunk across a dataset*/\n\tprotected int deduplicatedD...
import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import ja...
/* * Copyright (C) 2014 Raul Gracia-Tinedo * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This progr...
DataProducer generator = new DataProducer(characterization);
5
CagataySonmez/EdgeCloudSim
src/edu/boun/edgecloudsim/applications/sample_app5/VehicularEdgeServerManager.java
[ "public class SimManager extends SimEntity {\r\n\tprivate static final int CREATE_TASK = 0;\r\n\tprivate static final int CHECK_ALL_VM = 1;\r\n\tprivate static final int GET_LOAD_LOG = 2;\r\n\tprivate static final int PRINT_PROGRESS = 3;\r\n\tprivate static final int STOP_SIMULATION = 4;\r\n\t\r\n\tprivate String s...
import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import org.cloudbus.cloudsim.CloudletSchedulerTimeShared; import org.cloudbus.cloudsim.Datacenter; import org.cloudbus.cloudsim.DatacenterCharacteristics; import org.cloudbus.cloudsim.Host; import org.cloudbus.cloudsim.Pe; import org.cloudb...
/* * Title: EdgeCloudSim - Edge Server Manager * * Description: * VehicularEdgeServerManager is responsible for creating * Edge datacenters and hosts/VMs running on it. * * Licence: GPL - http://www.gnu.org/copyleft/gpl.html * Copyright (c) 2017, Bogazici University, Istanbul, Turkey */ package...
return new EdgeVmAllocationPolicy_Custom(hostList,dataCenterIndex);
5
piyell/NeteaseCloudMusic
app/src/main/java/com/zsorg/neteasecloudmusic/utils/AlertUtil.java
[ "public interface OnDeleteListener {\n public void onDelete(boolean isDeleteOnDisk);\n}", "public interface OnItemCLickListener {\n void onItemClick(View view, int position);\n}", "public interface OnTextSubmitListener {\n void onTextSubmit(String text);\n}", "public class PlaylistAdapter extends Bas...
import android.content.Context; import android.content.DialogInterface; import android.support.v7.app.AlertDialog; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; impor...
listener.onDelete(isDeleteOnDisk[0]); } } }) .setNegativeButton(R.string.cancel, null) .show(); } public static void showDeletePlaylistDialog(Context context, final OnDeleteListener listener)...
final ConfigModel model = ConfigModel.getInstance(context);
4
houxg/Leamonax
app/src/main/java/org/houxg/leamonax/ui/NotePreviewActivity.java
[ "@Database(name = \"leanote_db\", version = 4)\npublic class AppDataBase {\n\n private static final String TAG = \"AppDataBase:\";\n\n @Migration(version = 2, database = AppDataBase.class)\n public static class UpdateTag extends BaseMigration {\n\n @Override\n public void migrate(DatabaseWrap...
import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.Menu; import android.view.MenuItem; import android.view.View; import com.elvishew.xlog.XLog; import com.tencent.bu...
package org.houxg.leamonax.ui; public class NotePreviewActivity extends BaseActivity implements EditorFragment.EditorFragmentListener { private static final String TAG = "NotePreviewActivity:"; public static final String EXT_NOTE_LOCAL_ID = "ext_note_local_id"; public static final int REQ_EDIT = 1; ...
NoteService.saveNote(mNote.getId());
2
nVisium/MoneyX
src/main/java/com/nvisium/androidnv/api/service/impl/EventServiceImpl.java
[ "@Entity\n@Table(name = \"events\")\npublic class Event {\n\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.AUTO)\n\tprivate Long id;\n\n\t@Version\n\tprivate Long version;\n\n\t// TODO: Actually associate this with a user, not just an id that we have to reference...see Payment Model.\n\t//@ManyToOne(targetEnti...
import java.math.BigDecimal; import java.util.Date; import java.util.LinkedList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import org.springframework.transaction.anno...
package com.nvisium.androidnv.api.service.impl; @Service @Qualifier(value = "eventService") public class EventServiceImpl implements EventService { @Autowired private EventRepository eventRepository; @Autowired private UserRepository userRepository; @Autowired private EventMembershipRepository eventMembe...
public List<User> getUsersbyEventMembership(Long eventId) {
2
Nilhcem/droidcontn-2016
app/src/main/java/com/nilhcem/droidcontn/data/app/DataProvider.java
[ "public class Schedule extends ArrayList<ScheduleDay> implements Parcelable {\n\n public static final Parcelable.Creator<Schedule> CREATOR = new Parcelable.Creator<Schedule>() {\n public Schedule createFromParcel(Parcel source) {\n return new Schedule(source);\n }\n\n public Sched...
import com.nilhcem.droidcontn.data.app.model.Schedule; import com.nilhcem.droidcontn.data.app.model.Session; import com.nilhcem.droidcontn.data.app.model.Speaker; import com.nilhcem.droidcontn.data.database.dao.SessionsDao; import com.nilhcem.droidcontn.data.database.dao.SpeakersDao; import com.nilhcem.droidcontn.data....
package com.nilhcem.droidcontn.data.app; @Singleton public class DataProvider { private final AppMapper appMapper; private final NetworkMapper networkMapper;
private final DroidconService service;
5
MHAVLOVICK/Sketchy
src/main/java/com/sketchy/server/action/SaveDrawingSettings.java
[ "public enum SketchyContext {\n\tINSTANCE;\n\t\n\tprivate static NumberFormat nf = NumberFormat.getInstance();\n\n\tpublic static final Map<String, String> PEN_SIZES = new LinkedHashMap<String, String>();\n\tstatic{\n\t\tnf.setMinimumIntegerDigits(1);\n\t\tnf.setMinimumFractionDigits(1);\n\t\t\n\t\tfor (double penS...
import javax.servlet.http.HttpServletRequest; import com.sketchy.SketchyContext; import com.sketchy.drawing.DrawingProperties; import com.sketchy.drawing.DrawingSize; import com.sketchy.metadata.MetaDataObject; import com.sketchy.server.HttpServer; import com.sketchy.server.JSONServletResult; import com.sketchy.server....
/* Sketchy Copyright (C) 2015 Matthew Havlovick http://www.quickdrawbot.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your op...
public JSONServletResult execute(HttpServletRequest request) throws Exception {
5
RockinChaos/ItemJoin
src/me/RockinChaos/itemjoin/listeners/Interfaces.java
[ "public class ItemMap {\n\t\n\tprivate String configName;\n\tprivate ConfigurationSection nodeLocation;\n\tprivate Integer probability = -1;\n\t\n\tprivate ItemStack tempItem = null;\n\tprivate ItemMeta tempMeta = null;\n\tprivate Material material = Material.AIR;\n\tprivate Short dataValue = 0;\n\t\n\tprivate Stri...
import me.RockinChaos.itemjoin.utils.interfaces.menus.Menu; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; import...
/* * ItemJoin * Copyright (C) CraftationGaming <https://www.craftationgaming.com/> * * 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 ...
if (Menu.modifyMenu((Player) event.getPlayer())) {
4
buksy/jnlua
src/test/java/com/naef/jnlua/test/LuaExceptionTest.java
[ "public interface JavaFunction {\r\n\t/**\r\n\t * Invokes this Java function. The function arguments are on the stack. The\r\n\t * method returns the number of values on the stack which constitute the\r\n\t * return values of this function.\r\n\t * \r\n\t * <p>\r\n\t * Java functions should indicate application err...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import org.junit.Test; import com.naef.jnlua.JavaFunction; import com.naef.jnlua.LuaGcMetamethodException; import com.naef.jnlua.LuaRuntimeException; import com.naef.jnlua.LuaStac...
/* * $Id: LuaExceptionTest.java 53 2012-01-05 16:58:58Z andre@naef.com $ * See LICENSE.txt for license terms. */ package com.naef.jnlua.test; /** * Contains unit tests for Lua exceptions. */ public class LuaExceptionTest extends AbstractLuaTest { // -- Test cases /** * Tests the call of a ...
luaState.openLib(Library.BASE);
6
ajitsing/Sherlock
sherlock/src/main/java/com/singhajit/sherlock/crashes/presenter/CrashListPresenter.java
[ "public class SherlockDatabaseHelper extends SQLiteOpenHelper {\n private static final int VERSION = 2;\n private static final String DB_NAME = \"Sherlock\";\n\n public SherlockDatabaseHelper(Context context) {\n super(context, DB_NAME, null, VERSION);\n }\n\n @Override\n public void onCreate(SQLiteDatabas...
import com.singhajit.sherlock.core.database.SherlockDatabaseHelper; import com.singhajit.sherlock.core.investigation.Crash; import com.singhajit.sherlock.core.investigation.CrashViewModel; import com.singhajit.sherlock.crashes.action.CrashListActions; import com.singhajit.sherlock.crashes.viewmodel.CrashesViewModel; im...
package com.singhajit.sherlock.crashes.presenter; public class CrashListPresenter { private final CrashListActions actions; public CrashListPresenter(CrashListActions actions) { this.actions = actions; } public void render(SherlockDatabaseHelper database) {
List<Crash> crashes = database.getCrashes();
1
chory-amam/slack-capybara
src/test/java/handlers/LGTMHandlersTest.java
[ "public class MockAdapter implements BotanAdapter {\n @Override\n public void run() throws BotanException {\n\n }\n\n @Override\n public void say(BotanMessage message) {\n\n }\n\n @Override\n public void initialize(Botan botan) {\n\n }\n\n @Override\n public void beforeShutdown() {\...
import adapter.MockAdapter; import com.github.masahitojp.botan.Botan; import com.github.masahitojp.botan.brain.LocalBrain; import com.github.masahitojp.botan.exception.BotanException; import handlers.lgtm.LGTMHandlers; import org.junit.After; import org.junit.Before; import org.junit.Test; import utils.HandlersTestUtil...
package handlers; public class LGTMHandlersTest { Botan botan; @Before public void setUp() throws BotanException { botan = new Botan.BotanBuilder() .setAdapter(new MockAdapter()) .setBrain(new LocalBrain()) .setMessageHandlers(new LGTMHandlers()) .build(); botan.start(); } @After public v...
new NotInvocationRegexPattern("botan lgtmi")
4
Aevi-UK/android-pos-print-api
print-api/src/main/java/com/aevi/print/PrinterManagerImpl.java
[ "public class PrintAction implements Jsonable {\n\n private final String printerId;\n private final String action;\n\n public PrintAction(String printerId, String action) {\n this.printerId = printerId;\n this.action = action;\n }\n\n public String getPrinterId() {\n return print...
import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.util.Log; import com.aevi.android.rxmessenger.ChannelClient; import com.aevi.android.rxmessenger.Channels; import com.aevi....
/* * 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...
PrintAction printAction = new PrintAction(printerId, action);
0
santoslab/aadl-translator
edu.ksu.cis.projects.mdcf.aadl-translator-test/src/test/java/edu/ksu/cis/projects/mdcf/aadltranslator/view/AppSpecViewTests.java
[ "public final static String MAIN_PLUGIN_BUNDLE_ID = \"edu.ksu.cis.projects.mdcf.aadl-translator\";", "public final static String TEMPLATE_DIR = \"src/main/resources/templates/\";", "public static boolean initComplete = false;", "public static void runWriterTest(String testName, Object var, String varName,\n\t...
import static edu.ksu.cis.projects.mdcf.aadltranslator.test.AllTests.MAIN_PLUGIN_BUNDLE_ID; import static edu.ksu.cis.projects.mdcf.aadltranslator.test.AllTests.TEMPLATE_DIR; import static edu.ksu.cis.projects.mdcf.aadltranslator.test.AllTests.initComplete; import static edu.ksu.cis.projects.mdcf.aadltranslator.test...
package edu.ksu.cis.projects.mdcf.aadltranslator.view; public class AppSpecViewTests { // Enable to overwrite existing expected values // Note that doing so will cause all tests to fail until this value is // re-disabled. private final static boolean GENERATE_EXPECTED = false; private final static...
runWriterTest(testName, model, "model", appspecSTG, GENERATE_EXPECTED,
3
nkarasch/ChessGDX
core/src/nkarasch/chessgdx/GameCore.java
[ "public class Camera extends PerspectiveCamera {\n\n\tprivate final OrbitCamera mFPCameraController;\n\n\t/**\n\t * Creates 60 degree field of view PerspectiveCamera and instantiates its\n\t * controller.\n\t */\n\tpublic Camera() {\n\t\tsuper(60, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\tthis.mFPCam...
import nkarasch.chessgdx.camera.Camera; import nkarasch.chessgdx.logiccontroller.backend.ChessLogicController; import nkarasch.chessgdx.logiccontroller.frontend.BoardController; import nkarasch.chessgdx.util.AssetHandler; import nkarasch.chessgdx.util.GraphicsSettings; import nkarasch.chessgdx.view.renderers.OverlayRen...
package nkarasch.chessgdx; public class GameCore implements ApplicationListener { public static final String TITLE = "ChessGDX"; private Camera mCameraController; private ChessLogicController mLogicController; private BoardController mBoardController; private PerspectiveRenderer mPerspectiveRenderer; private...
GraphicsSettings.setGraphics();
4
JoelGodOfwar/SinglePlayerSleep
1.13_2.13.46/src/com/github/joelgodofwar/sps/SinglePlayerSleep.java
[ "public class ChatColorUtils \r\n{\r\n public static String setColors(String s)\r\n {\r\n\t return s.replace(\"&0\", \"\" + ChatColor.BLACK).replace(\"&1\", \"\" + ChatColor.DARK_BLUE)\r\n\t \t\t.replace(\"&2\", \"\" + ChatColor.DARK_GREEN).replace(\"&3\", \"\" + ChatColor.DARK_AQUA)\r\n\t \t\t.replace(\...
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.nio.file.CopyOption; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.Standa...
package com.github.joelgodofwar.sps; /** * @author JoelGodOfWar(JoelYahwehOfWar) * some code added by ColdCode(coldcode69) */ @SuppressWarnings("unused") public class SinglePlayerSleep extends JavaPlugin implements Listener{ /** update checker variables */ public String updateurl = "https://git...
SinglePlayerSleep.logger.info(Ansi.GREEN + "**************************************" + Ansi.RESET);
4
apatry/neo4j-lucene4-index
src/test/java/org/neo4j/index/impl/lucene/TestLuceneBatchInsert.java
[ "public static <T> void assertContains( Collection<T> collection,\n T... expectedItems )\n{\n String collectionString = join( \", \", collection.toArray() );\n assertEquals( collectionString, expectedItems.length,\n collection.size() );\n for ( T item : expectedItems )\n {\n assertTrue(...
import static org.apache.lucene.search.NumericRangeQuery.newIntRange; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import static org.junit.Assert.as...
/** * Copyright (c) 2002-2014 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundati...
assertContains( index.get( "name", "Joe" + i ), ids.get( i ) );
0
Tyde/TuCanMobile
app/src/main/java/com/dalthed/tucan/ui/FragmentSingleEvent.java
[ "@ReportsCrashes(formKey = \"\", // will not be used\n\thttpMethod = Method.PUT,\n\treportType = Type.JSON,\n\tformUri = \"http://dttyde.de:5984/acra-tucan/_design/acra-storage/_update/report\",\n\tformUriBasicAuthLogin = \"tucanApp\",\n formUriBasicAuthPassword = \"thordielrbl\")\n//@ReportsCrashes(formUri = \"...
import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Looper; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4....
/* * Liste wird eingebaut, wenn geupdated wird und die Liste noch leer * ist * * for (int ii = 0; ii <= 2; ii++) { if (getInitializedItem(ii) != * null && adapterList.size() > ii) { if * (getInitializedItem(ii).getListAdapter() == null) * getInitializedItem(ii).setListAdapter( adapterLis...
} catch (TucanDownException e) {
6
pfstrack/eldamo
src/test/java/xdb/dom/XQueryEngineTest.java
[ "public class ModelConfigManagerTest extends TestCase {\n\n public ModelConfigManagerTest(String testName) {\n super(testName);\n }\n\n public static ModelConfigManager getTestModelConfigManager() {\n init();\n return ModelConfigManager.instance();\n }\n\n public static void init...
import java.io.IOException; import java.io.InputStream; import java.io.StringReader; import java.io.Writer; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import junit.framework.TestCase; import net.sf.saxon.dom.NodeOverNodeInfo; import net.sf.saxon.om.NodeInfo; i...
package xdb.dom; public class XQueryEngineTest extends TestCase { public XQueryEngineTest(String testName) { super(testName); } public void testQuery() throws Exception { String xml = "<x><a id='1'>x</a><a id='2'>y</a><a id='3'>z</a></x>"; Document doc = parse(xml); Map<...
if (!(doc instanceof DocumentImpl)) {
3
hoffimar/timerdroid
app/src/main/java/com/tomatodev/timerdroid/fragments/ListTimersFragment.java
[ "public class MyApplication extends Application {\n\tpublic static boolean mainVisible = false;\n\tprivate static int counter;\n\t\n\tpublic static boolean showRunningTimers = false;\n\t\n\tpublic static synchronized int getId() {\n\t\treturn counter++;\n\t}\n}", "public class TimerCursorAdapter extends CursorAda...
import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.database.Cursor; import android.os.Bundle; import android.os.IBinder; import android.support.v4.app.ListFragment; import android.support.v4.app.LoaderManager; import android.support.v4.content.C...
package com.tomatodev.timerdroid.fragments; public class ListTimersFragment extends ListFragment implements LoaderManager.LoaderCallbacks<Cursor> { private int categoryId;
private TimerCursorAdapter items;
1
CaMnter/Robotlegs4Android
robotlegs4android/src/main/java/com/camnter/robotlegs4android/views/RobotlegsFragmentActivity.java
[ "public class Event {\n\n public static final String ADDED_TO_STAGE = \"added_to_stage\";\n public static final String REMOVED_FROM_STAGE = \"removed_from_stage\";\n public static final String ENTER_FRAME = \"enter_frame\";\n\n private String _type;\n private Object _target = null;\n public Object...
import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.KeyEvent; import com.camnter.robotlegs4android.base.Event; import com.camnter.robotlegs4android.base.EventDispatcher; import com.camnter.robotlegs4android.base.Listener; import com.camnter.robotlegs4android.core.IListener; im...
/* * Copyright (C) 2015 CaMnter yuanyu.camnter@gmail.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 ap...
this.onBackClickListener = listener == null ? new Listener("", "") {
2
cardinity/cardinity-sdk-java
src/main/java/com/cardinity/CardinityClient.java
[ "public abstract class CardinityException extends RuntimeException {\n\n private static final long serialVersionUID = -4551051157520060255L;\n\n public CardinityException(String message) {\n super(message, null);\n }\n\n}", "public class ValidationException extends CardinityException {\n\n priv...
import com.cardinity.exceptions.CardinityException; import com.cardinity.exceptions.ValidationException; import com.cardinity.model.Void; import com.cardinity.model.*; import com.cardinity.oauth.CardinityOAuthProvider; import com.cardinity.rest.CardinityRestClient; import com.cardinity.rest.RestClient; import com.cardi...
package com.cardinity; public class CardinityClient { private static final String MESSAGE_PAYMENT_ID_MISSING = "paymentID must be not null."; private final static TypeToken<Payment> PAYMENT_TYPE = new TypeToken<Payment>() { }; private final static TypeToken<List<Payment>> PAYMENT_LIST_TYPE = new Typ...
private final static TypeToken<Void> VOID_TYPE = new TypeToken<Void>() {
2
RockinChaos/ItemJoin
src/me/RockinChaos/itemjoin/utils/protocol/TinyProtocol.java
[ "public final class ReflectionUtils {\n\tprivate static String OBC_PREFIX = Bukkit.getServer().getClass().getPackage().getName();\n\tprivate static String NMS_PREFIX = OBC_PREFIX.replace(\"org.bukkit.craftbukkit\", \"net.minecraft.server\");\n\tprivate static String MC_PREFIX = \"net.minecraft\";\n\tprivate static ...
import io.netty.channel.Channel; import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelPipeline; import io.netty....
/* * ItemJoin * Copyright (C) CraftationGaming <https://www.craftationgaming.com/> * * 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 ...
private final MethodInvoker getPlayerHandle = ReflectionUtils.getMethod("{obc}.entity.CraftPlayer", "getHandle");
4
citysearch/web-widgets
src/main/java/com/citysearch/webwidget/facade/helper/NearbyPlacesHelper.java
[ "public class PFPAd {\n\tprivate String name;\n\tprivate String rating;\n\tprivate String reviewCount;\n\tprivate String distance;\n\tprivate String category;\n\tprivate String listingId;\n\tprivate String adDisplayUrl;\n\tprivate String imageUrl;\n\tprivate String phone;\n\tprivate String offers;\n\tprivate String...
import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.Random; import org.apache.commons.lang.StringUtils; import com.citysearch.webwidget.api.bean.PFPAd; import com.citysearch.webwidget.bean.NearbyPlace; import com.citysearch.webwidget.bean.Request...
package com.citysearch.webwidget.facade.helper; public class NearbyPlacesHelper { public static List<NearbyPlace> addDefaultImages(List<NearbyPlace> nearByPlaces, String contextPath) throws CitysearchException { if (nearByPlaces != null && !nearByPlaces.isEmpty()) { List<String> ...
public static NearbyPlace toBackfill(RequestBean request, PFPAd ad) throws CitysearchException {
0
gysel/HSR-Timetable
HSRTimeTableTest/src/ch/scythe/hsr/api/ui/DataAssemblerTest.java
[ "public enum Weekday implements Serializable {\n\n\tMONDAY(1, 2, R.string.weekday_monday), TUESDAY(2, 3, R.string.weekday_tuesday), WEDNESDAY(3, 4, R.string.weekday_wednesday), THURSDAY(4, 5,\n\t\t\tR.string.weekday_thursday), FRIDAY(5, 6, R.string.weekday_friday), SATURDAY(6, 7, R.string.weekday_saturday), SUNDAY(...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.junit.Test; import ch.scythe.hsr.enumeration.Weekday; import ch.scythe.hsr.helper.TextHelpe...
package ch.scythe.hsr.api.ui; public class DataAssemblerTest { @Test public void testConvertTESTweekdayMapping() { // Set up fixture JsonDay monday = createDay(1); JsonDay wednesday = createDay(3); JsonTimetableWeek jsonData = createWeek(monday, wednesday); // Exercise sut UiWeek uiDa...
List<JsonRoomAllocation> jsonRooms = new ArrayList<JsonRoomAllocation>();
6
pedrovgs/Nox
sample/src/main/java/com/github/pedrovgs/nox/sample/AppsActivity.java
[ "public class NoxItem {\n\n private final String url;\n private final Integer resourceId;\n private final Integer placeholderId;\n\n public NoxItem(String url) {\n validateUrl(url);\n this.url = url;\n this.resourceId = null;\n this.placeholderId = null;\n }\n\n public NoxItem(int resourceId) {\n ...
import com.github.pedrovgs.nox.shape.ShapeFactory; import java.util.ArrayList; import java.util.List; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; imp...
/* * Copyright (C) 2015 Pedro Vicente Gomez Sanchez. * * 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 ...
noxView.setOnNoxItemClickListener(new OnNoxItemClickListener() {
2
GoodGrind/ghostwriter
ghostwriter-jdk-v8/src/main/java/io/ghostwriter/openjdk/v8/ast/translator/LambdaAwareValueChangeTranslator.java
[ "public interface JavaCompiler {\n\n /**\n * Returns an expression which evaluates to the default value (Java spec.) of a given type.\n *\n * @param type Type of the default value\n * @return Expression representing a default value\n */\n JCTree.JCExpression defaultValueForType(JCTree.JCEx...
import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.util.ListBuffer; import io.ghostwriter.openjdk.v7.ast.compiler.JavaCompiler; import io.ghostwriter.openjdk.v7.ast.compiler.JavaCompilerHelper; import io.ghostwriter.openjdk.v7.ast.translator.ValueChangeTranslator; import io.ghostwriter.openjdk.v7.common...
package io.ghostwriter.openjdk.v8.ast.translator; public class LambdaAwareValueChangeTranslator extends ValueChangeTranslator { private JCTree.JCLambda visitedLambda;
public LambdaAwareValueChangeTranslator(JavaCompiler javac, JavaCompilerHelper helper) {
0
romainmoreau/e-paper
e-paper-client-common/src/test/java/fr/romainmoreau/epaper/client/common/table/TablesTest.java
[ "public enum Color {\n\tBLACK, DARK_GRAY, LIGHT_GRAY, WHITE;\n}", "public class EPaperValidationException extends EPaperException {\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic EPaperValidationException(String message) {\n\t\tsuper(message);\n\t}\n}", "public class Border {\n\tprivate final i...
import org.junit.Assert; import org.junit.Test; import fr.romainmoreau.epaper.client.api.Color; import fr.romainmoreau.epaper.client.api.EPaperValidationException; import fr.romainmoreau.epaper.client.api.table.Border; import fr.romainmoreau.epaper.client.api.table.Column; import fr.romainmoreau.epaper.client.api.table...
package fr.romainmoreau.epaper.client.common.table; public class TablesTest { @Test(expected = EPaperValidationException.class) public void validateTableTest1() throws EPaperValidationException { Table table = new Table();
table.getColumns().add(new Column(0.25));
3
daisukefuji/OpenSynth
android/src/com/indigo_lab/android/opensynth/ViewPagerAdapter.java
[ "public class ArpeggioView extends ControllerView\n implements OnSeekBarChangeListener, RadioGroup.OnCheckedChangeListener, CompoundButton.OnCheckedChangeListener{\n private Switch mArpeggioSwitch;\n private SeekBar mSampleRateSeekbar;\n private RadioGroup mOctaves;\n private RadioGroup mSteps;\n\n ...
import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import com.indigo_lab.android.opensynth.view.ArpeggioView; import com.indigo_lab.android.opensynth.view.FilterEnvelopeView; import com.indigo_lab.android.opensynth.view.FilterView; import com.indigo_lab.android.opensynth.view.Modu...
package com.indigo_lab.android.opensynth; public class ViewPagerAdapter extends PagerAdapter { @SuppressWarnings("unchecked") private static final Class<? extends View>[] VIEW_CLASSES = new Class[] { OscillatorView.class,
OscillatorDetailView.class,
4
statefulj/statefulj
statefulj-fsm/src/main/java/org/statefulj/persistence/memory/MemoryPersisterImpl.java
[ "public class ReflectionUtils {\n\t\n\tprivate static Pattern fieldNamePattern = Pattern.compile(\"[g|s]et(.)(.*)\");\n\t\n\tpublic static Field getFirstAnnotatedField(\n\t\t\tClass<?> clazz,\n\t\t\tClass<? extends Annotation> annotationClass) { \n\t\tField match = null;\n\t\tif (clazz != null) {\n\t\t\tfor(Field f...
import org.statefulj.common.utils.ReflectionUtils; import org.statefulj.fsm.Persister; import org.statefulj.fsm.StaleStateException; import org.statefulj.fsm.model.State; import org.statefulj.persistence.StateFieldAccessor; import java.lang.reflect.Field; import java.util.Collection; import java.util.HashMap; import ja...
/*** * * Copyright 2014 Andrew Hall * * 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 ...
public void setCurrent(T stateful, State<T> current, State<T> next) throws StaleStateException {
2
simon816/ChatUI
src/main/java/com/simon816/chatui/group/ChatGroupFeature.java
[ "public abstract class AbstractFeature {\r\n\r\n private ConfigurationNode node;\r\n\r\n final void setConfigRoot(ConfigurationNode node) {\r\n this.node = node;\r\n }\r\n\r\n final protected ConfigurationNode getConfigRoot() {\r\n return this.node;\r\n }\r\n\r\n protected void onIni...
import com.simon816.chatui.AbstractFeature; import com.simon816.chatui.ActivePlayerChatView; import com.simon816.chatui.ChatUI; import com.simon816.chatui.tabs.NewTab; import com.simon816.chatui.ui.AnchorPaneUI; import com.simon816.chatui.ui.table.TableModel; import ninja.leaping.configurate.ConfigurationNode; i...
package com.simon816.chatui.group; public class ChatGroupFeature extends AbstractFeature { private static final String PERM_CREATE = ChatUI.ADMIN_PERMISSON + ".group.create"; private static final String PERM_DELETE = ChatUI.ADMIN_PERMISSON + ".group.delete"; private final GroupList groupList =...
new NewTab.LaunchTabAction(() -> new ChatGroupTab(this, view, new AnchorPaneUI())));
4
endercrest/VoidSpawn
src/main/java/com/endercrest/voidspawn/commands/RemoveCommand.java
[ "public class ConfigManager {\n private VoidSpawn plugin;\n private static final ConfigManager instance = new ConfigManager();\n private File worldFile;\n private FileConfiguration config;\n private final int CURRENT_VERSION = 2;\n\n /**\n * Get the running instance of the ConfigManager\n ...
import com.endercrest.voidspawn.ConfigManager; import com.endercrest.voidspawn.VoidSpawn; import com.endercrest.voidspawn.utils.CommandUtil; import com.endercrest.voidspawn.utils.MessageUtil; import com.endercrest.voidspawn.utils.WorldUtil; import org.bukkit.entity.Player; import java.util.ArrayList; import java.util.L...
package com.endercrest.voidspawn.commands; public class RemoveCommand implements SubCommand { @Override public boolean onCommand(Player p, String[] args){ String world = CommandUtil.constructWorldFromArgs(args, 1, p.getWorld().getName()); if(world == null) {
p.sendMessage(MessageUtil.colorize(VoidSpawn.prefix + "&cThat is not a valid world!"));
1
johanneslerch/FlowTwist
FlowTwist/test/flow/twist/test/unit/GenericCallerSensitiveI2OPathTests.java
[ "public static UnitSelector unitByLabel(final String label) {\n\treturn new UnitSelector() {\n\t\t@Override\n\t\tpublic boolean matches(SootMethod method, Unit unit) {\n\t\t\treturn unit.toString().contains(label);\n\t\t}\n\n\t\t@Override\n\t\tpublic String toString() {\n\t\t\treturn label;\n\t\t}\n\t};\n}", "pub...
import static flow.twist.config.AnalysisConfigurationBuilder.i2oGenericCallerSensitiveDefaults; import static flow.twist.test.util.selectors.UnitSelectorFactory.unitByLabel; import static flow.twist.test.util.selectors.UnitSelectorFactory.unitInMethod; import java.util.Set; import org.junit.Ignore; import org.junit.Tes...
package flow.twist.test.unit; public class GenericCallerSensitiveI2OPathTests extends AbstractPathTests { @Override protected AnalysisGraphVerifier executeTaintAnalysis(String[] classNames) { AnalysisGraphVerifier verifier = new AnalysisGraphVerifier(); StoreDataTransformer<Set<Path>> dataStorage = new Stor...
SolverFactory.runInnerToOuterSolver(i2oGenericCallerSensitiveDefaults().reporter(reporter));
2
kaklakariada/fritzbox-java-api
src/test/java/com/github/kaklakariada/fritzbox/mapping/DeserializerTest.java
[ "public static DeviceListAssert assertThat(DeviceList deviceList) {\n return new DeviceListAssert(deviceList);\n}", "@Root(name = \"SessionInfo\")\npublic class SessionInfo {\n\n @Element(name = \"SID\")\n private String sid;\n\n @Element(name = \"Challenge\")\n private String challenge;\n\n @El...
import com.github.kaklakariada.fritzbox.model.homeautomation.DeviceStats; import com.github.kaklakariada.fritzbox.model.homeautomation.Group; import com.github.kaklakariada.fritzbox.model.homeautomation.GroupInfo; import com.github.kaklakariada.fritzbox.model.homeautomation.PowerMeter; import com.github.kaklakariada.fr...
/** * A Java API for managing FritzBox HomeAutomation * Copyright (C) 2017 Christoph Pirkl <christoph at users.sourceforge.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either ver...
final DeviceStats stats = new Deserializer().parse(fileContent, DeviceStats.class);
3
simo415/spc
src/com/sijobe/spc/command/DoDrops.java
[ "public interface IPlayerMP extends IHook {\n \n /**\n * Called when the onUpdate() method is called in Minecraft\n * \n * @param player - the player that the event occurred on\n */\n public void onTick(Player player);\n}", "public class Parameters {\n \n /**\n * Optional String of variab...
import com.sijobe.spc.core.IPlayerMP; import com.sijobe.spc.validation.Parameters; import com.sijobe.spc.wrapper.CommandBase; import com.sijobe.spc.wrapper.CommandException; import com.sijobe.spc.wrapper.CommandSender; import com.sijobe.spc.wrapper.Coordinate; import com.sijobe.spc.wrapper.Minecraft; import com.sijobe....
package com.sijobe.spc.command; /** * Command to toggle drops * * @author q3hardcore * @version 1.0 */ @Command ( name = "dodrops", description = "Toggles mob and block drops", example = "", videoURL = "", enabled = true ) public class DoDrops extends StandardCommand...
public void execute(CommandSender sender, List<?> params) throws CommandException {
4
cjburkey01/ClaimChunk
src/main/java/com/cjburkey/claimchunk/data/newdata/BulkMySQLDataHandler.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.player.FullPlayerData; import com.cjburkey.claim...
package com.cjburkey.claimchunk.data.newdata; /** * Some servers keep MySQL on a separate host from the server. In this case, making a MySQL request * is EXTREMELY slow. This data handler only makes requests when it initializes, saves data, and * loads data. This handler uses a JSON handler so backups are possi...
Utils.err("Failed to clear chunks table");
2
sfPlayer1/Matcher
src/matcher/gui/tab/MethodVarScoresTab.java
[ "public class ClassifierResult<T> {\n\tpublic ClassifierResult(IClassifier<T> classifier, double score) {\n\t\tthis.classifier = classifier;\n\t\tthis.score = score;\n\t}\n\n\tpublic IClassifier<T> getClassifier() {\n\t\treturn classifier;\n\t}\n\n\tpublic double getScore() {\n\t\treturn score;\n\t}\n\n\t@Override\...
import javafx.scene.control.Tab; import javafx.scene.control.TableView; import matcher.classifier.ClassifierResult; import matcher.classifier.RankResult; import matcher.gui.IGuiComponent; import matcher.gui.ISelectionProvider; import matcher.type.MatchType; import matcher.type.MethodVarInstance;
package matcher.gui.tab; public class MethodVarScoresTab extends Tab implements IGuiComponent { public MethodVarScoresTab(ISelectionProvider selectionProvider) { super("var classifiers"); this.selectionProvider = selectionProvider; init(); } private void init() { setContent(table); } @Override publ...
RankResult<MethodVarInstance> result = (RankResult<MethodVarInstance>) selectionProvider.getSelectedRankResult(MatchType.MethodVar);
4