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
nVisium/MoneyX
src/main/java/com/nvisium/androidnv/api/controller/PaymentController.java
[ "@Entity\n@Table(name = \"eventMemberships\")\npublic class EventMembership {\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@Column(name = \"eventId\")\n\tprivate Long eventId;\n\n\t@Column(name = \"user\")\n\tprivate Long user;\n\n\t@Col...
import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.persistence.EntityManager; import javax.persistence.EntityTransaction; import javax.persistence.PersistenceContext; import javax.persistence.Query; import javax.transaction.Transactional; import org.hibernat...
package com.nvisium.androidnv.api.controller; @RequestMapping(value = "/payment") @Controller public class PaymentController { @Autowired PaymentService paymentService; @Autowired EventService eventService; @Autowired UserService userService; @Autowired
SecurityUtils security;
4
Piasy/decaf-mind-compiler
decaf_PA4/src/decaf/Driver.java
[ "public abstract class Tree {\n\n /**\n * Toplevel nodes, of type TopLevel, representing entire source files.\n */\n public static final int TOPLEVEL = 1;\n\n /**\n * Import clauses, of type Import.\n */\n public static final int IMPORT = TOPLEVEL + 1;\n\n /**\n * Class definition...
import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import decaf.tree.Tree; import decaf.backend.Mips; import decaf.dataflow.FlowGraph; import decaf.error.DecafError; import decaf.frontend.Lexer; import dec...
package decaf; public final class Driver { private static Driver driver; private Option option; private List<DecafError> errors; private ScopeStack table; private Lexer lexer; private Parser parser; public ScopeStack getTable() { return table; } public static Driver getDriver() { return driver; ...
Tree.TopLevel tree = parser.parseFile();
0
freedomofme/Netease
app/src/main/java/com/hhxplaying/neteasedemo/netease/fragment/SecondLayerFragment.java
[ "public class NormalRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {\n private final LayoutInflater mLayoutInflater;\n private final Context mContext;\n private RecyclerView recyclerView;\n private String[] mTitles;\n private ArrayList<OneNewsItemBean> listItem;\n int de...
import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.widget.TextView; import com.android.volley.Response; import com.google.gson.Gson; import com.hhxplay...
package com.hhxplaying.neteasedemo.netease.fragment; public class SecondLayerFragment extends LazyFragment implements SwipeRefreshLayout.OnRefreshListener { public static final String INTENT_STRING_TABNAME = "intent_String_tabName"; public static final String INTENT_INT_POSITION = "intent_int_position"; private...
RequestSingletonFactory.getInstance().getGETStringRequest(getActivity(),
4
kristian/JDigitalSimulator
src/main/java/lc/kra/jds/components/buildin/converter/ByteToDecimalConverter.java
[ "public final class Utilities {\n\tpublic static enum TranslationType { TEXT, ALTERNATIVE, TITLE, EXTERNAL, TOOLTIP, DESCRIPTION; }\n\n\tpublic static final String\n\t\tCONFIGURATION_LOCALIZATION_LANGUAGE = \"localization.language\",\n\t\tCONFIGURATION_LOOK_AND_FEEL_CLASS = \"lookandfeel.class\",\n\t\tCONFIGURATION...
import lc.kra.jds.contacts.InputContact; import lc.kra.jds.contacts.OutputContact; import static lc.kra.jds.Utilities.*; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Point; import lc.kra.jds.Utilities.TranslationType; import lc.kra.jds.components.Component; import lc.kra.j...
/* * JDigitalSimulator * Copyright (C) 2017 Kristian Kraljic * * 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. *...
private InputContact[] inputs;
7
jsmith613/Aruco-Marker-Tracking-Android
openCVTutorial1CameraPreview/src/main/java/min3d/core/Scene.java
[ "public interface IObject3dContainer \n{\n\tpublic void addChild(Object3d $child);\n\tpublic void addChildAt(Object3d $child, int $index);\n\tpublic boolean removeChild(Object3d $child);\n\tpublic Object3d removeChildAt(int $index);\n\tpublic Object3d getChildAt(int $index);\n\tpublic Object3d getChildByName(String...
import java.util.ArrayList; import min3d.interfaces.IDirtyParent; import min3d.interfaces.IObject3dContainer; import min3d.interfaces.ISceneController; import min3d.vos.CameraVo; import min3d.vos.Color4; import min3d.vos.Color4Managed; import min3d.vos.FogType; import android.util.Log; import aruco.min3d.Min3d;
package min3d.core; public class Scene implements IObject3dContainer, IDirtyParent { private ArrayList<Object3d> _children = new ArrayList<Object3d>(); private ManagedLightList _lights; private CameraVo _camera;
private Color4Managed _backgroundColor;
2
Archistar/archistar-smc
src/main/java/at/archistar/crypto/CSSEngine.java
[ "public interface DecoderFactory {\n\n /**\n * create a new Decoder\n *\n * @param xValues the constant xValues the Decoder was initialized with.\n * @param k (degree+1)/count of the decoded elements\n * @return a new Decoder for the given xValues\n */\n Decoder createDecoder(final int...
import at.archistar.crypto.data.*; import at.archistar.crypto.decode.DecoderFactory; import at.archistar.crypto.decode.ErasureDecoderFactory; import at.archistar.crypto.random.BCDigestRandomSource; import at.archistar.crypto.random.RandomSource; import at.archistar.crypto.secretsharing.KrawczykCSS; import at.archistar....
package at.archistar.crypto; /** * CryptoEngine for Computationally Secure Secret Sharing * (Krawczyk CSS + Fingerprinting) * * @author Andreas Happe <andreashappe@snikt.net> */ public class CSSEngine implements CryptoEngine { /** how many shares should be generated */ private final int n; /** min...
} catch (ReconstructionException e) {
3
ailab-uniud/distiller-CORE
src/main/java/it/uniud/ailab/dcore/annotation/annotators/SimpleNGramGeneratorAnnotator.java
[ "public abstract class DocumentComponent extends Annotable {\n\n private final String text;\n private Locale language;\n\n /**\n * Creates a document component.\n *\n * @param text the text of the component\n * @param language the language of the component\n * @param identifier the uniq...
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; import org.json.simple.JSONArr...
/* * Copyright (C) 2015 Artificial Intelligence * Laboratory @ University of Udine. * * 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...
g.putFeature(new FeatureAnnotation(
2
jvdb/derric
src/org/derric_lang/validator/interpreter/Interpreter.java
[ "public class ParseResult {\n\t\n\tprivate boolean _result;\n\tprivate long _lastLocation;\n\tprivate long _lastRead;\n\tprivate String _symbol;\n\tprivate String _sequence;\n\n\tpublic boolean isSuccess() {\n\t\treturn _result;\n\t}\n\n\tpublic long getLastLocation() {\n\t\treturn _lastLocation;\n\t}\n\t\n\tpublic...
import java.io.IOException; import java.net.URI; import java.util.HashMap; import java.util.List; import java.util.Map; import org.derric_lang.validator.ParseResult; import org.derric_lang.validator.Validator; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.ValidatorInputStreamFa...
package org.derric_lang.validator.interpreter; public class Interpreter extends Validator { private final String _format; private final List<Symbol> _sequence; private final List<Structure> _structures;
private final Map<String, Type> _globals;
6
hai-nguyen/Impala
impala/src/main/java/hainguyen/impala/injection/module/PresenterModule.java
[ "public class ApplicationBus {\n\n private boolean login;\n\n public boolean isLogin() {\n return login;\n }\n\n public void setLogin(boolean login) {\n this.login = login;\n }\n}", "public class UserProfile {\n\n private LoginRepository loginRepository;\n\n @Inject\n public ...
import javax.inject.Singleton; import dagger.Module; import dagger.Provides; import hainguyen.impala.application.ApplicationBus; import hainguyen.impala.data.UserProfile; import hainguyen.impala.feature.login.presenter.LoginPresenter; import hainguyen.impala.feature.login.presenter.LoginPresenterImpl; import hainguyen....
package hainguyen.impala.injection.module; @Singleton @Module public class PresenterModule { @Provides @Singleton LoginPresenter provideLoginPresenter(UserProfile userProfile,
ContactUtil util, ApplicationBus bus, ScopeHelper scopeHelper) {
0
mobilejazz/CacheIO
sample/src/main/java/com/mobilejazz/sample/InitialActivity.java
[ "public class CacheIO {\n\n private Builder config;\n\n private CacheIO(Builder config) {\n this.config = config;\n }\n\n @SuppressWarnings(\"unchecked\")\n public <K, V> RxCache<K, V> newRxCache(Class<K> keyType, Class<V> valueType) {\n final KeyMapper<K> keyMapper = (KeyMapper<K>) config.keyMappers.get...
import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import com.mobilejazz.cacheio.CacheIO; import com.mobilejazz.cacheio.FutureCache; import com.mobilejazz.cacheio.RxCache; import com.mobilejazz.cacheio.SyncCache; import com.mobilejazz.cacheio.serializers.gson.GsonValueMa...
package com.mobilejazz.sample; public class InitialActivity extends AppCompatActivity { private static final String TAG = InitialActivity.class.getSimpleName(); public static final String USER_KEY_LIST = "user.key.list"; public static final String USER_KEY_ONE = "user.key.one"; @Override protected void onC...
CacheIO cacheIO = CacheIO.with(getApplicationContext())
0
ccrama/Slide-RSS
app/src/main/java/me/ccrama/rssslide/Activities/BaseActivity.java
[ "public class ColorPreferences {\n\n public final static String FONT_STYLE = \"THEME\";\n private final Context context;\n\n public ColorPreferences(Context context) {\n this.context = context;\n }\n\n public static int[] getColors(Context context, int c) {\n if (c == ContextCompat.getC...
import android.app.ActivityManager; import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.nfc.NfcAdapter; import android.os.Build; import android.os.Bundle; import android.support.annotation.IdRes; import android.support.annotation.Nullable; impo...
package me.ccrama.rssslide.Activities; /** * This is an activity which is the base for most of Slide's activities. It has support for handling * of swiping, setting up the AppBar (toolbar), and coloring of applicable views. */ public class BaseActivity extends AppCompatActivity implements SwipeBackActi...
protected SwipeBackActivityHelper mHelper;
7
dvanherbergen/robotframework-formslibrary
src/main/java/org/robotframework/formslibrary/operator/WFProcessOperator.java
[ "public class FormsLibraryException extends RuntimeException {\n\n private static final long serialVersionUID = 1L;\n\n public static final boolean ROBOT_SUPPRESS_NAME = true;\n\n public FormsLibraryException(String message) {\n super(message);\n }\n\n public FormsLibraryException(Throwable t)...
import java.awt.Component; import java.util.HashMap; import java.util.Map; import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.robotframework.formslibrary.FormsLibraryException; import org.robotframework.formslibrary.chooser.ByComponentTypeChooser; import org.robo...
package org.robotframework.formslibrary.operator; /** * Operator for oracle Workflow Components. */ public class WFProcessOperator extends AbstractRootComponentOperator { String[] ALL_PROCESS_ACTIVITY_FIELDS = { "instanceID", "dispName", "activityStatus", "activityStatusDisp", "activityStatusResult", "b...
super(new ByComponentTypeChooser(0, ComponentType.WFPROCESS));
1
pasqualesalza/elephant56
elephant56/src/main/java/it/unisa/elephant56/core/IslandDistributedDriver.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.generator.*; import it.unisa.elephant56.core.common.IndividualWrapper; import it.unisa.elephant56.core.input.NodesInputFormat; import it.unisa.elephant56.core.reporter.time.MapReduceTimeReporter; import it.unisa.elephant56.user.common.FitnessValue; import it.unisa.elephant56.user.op...
individualWrapperSchema, activeMigration ); // Creates the MapReduce time reporter. MapReduceTimeReporter mapreduceTimeReporter = null; if (this.isTimeReporterActive) { // Creates ...
FitnessValue.class);
3
facebookarchive/hive-dwrf
hive-dwrf/src/main/java/com/facebook/hive/orc/lazy/LazyStringDictionaryTreeReader.java
[ "public class BitFieldReader {\n private final RunLengthByteReader input;\n private int current;\n private int bitsLeft;\n // The number of consumed bytes at each index stride\n private int[] indeces;\n\n public BitFieldReader(InStream input) throws IOException {\n this.input = new RunLengthByteReader(inpu...
import com.facebook.hive.orc.StreamName; import com.facebook.hive.orc.WriterImpl; import org.apache.hadoop.io.Text; import com.facebook.hive.orc.OrcProto.RowIndex; import com.facebook.hive.orc.OrcProto.RowIndexEntry; import java.io.IOException; import java.util.List; import java.util.Map; import com.facebook.hive.orc.B...
// Copyright (c) 2013, Facebook, Inc. All rights reserved. /** * 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...
private InStream directReader;
2
jboss-logging/jboss-logmanager
ext/src/test/java/org/jboss/logmanager/ext/PropertyConfigurationTests.java
[ "public abstract class ExtHandler extends Handler implements AutoCloseable, Flushable {\n\n private static final ErrorManager DEFAULT_ERROR_MANAGER = new OnlyOnceErrorManager();\n private static final Permission CONTROL_PERMISSION = new LoggingPermission(\"control\", null);\n\n private volatile boolean aut...
import java.io.PrintWriter; import java.io.Reader; import java.io.StringWriter; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Properties; im...
config.setProperty("errorManager.TEST", TestErrorManager.class.getName()); PropertyConfigurator.configure(logContext, config); testDefault(2, 2); final Logger rootLogger = logContext.getLogger(""); final TestHandler handler = findType(TestHandler.class, rootLogger.getHandlers()...
config.setProperty("formatter.PATTERN", PatternFormatter.class.getName());
3
Doctoror/Pure-File-Manager
purefm/src/main/java/com/docd/purefm/tasks/DirectoryScanTask.java
[ "public abstract class BrowserBaseAdapter implements ListAdapter,\n MultiListenerFileObserver.OnEventListener {\n\n /**\n * Events to be monitor for every File in this Adapter\n */\n private static final int OBSERVER_EVENTS =\n FileObserver.CREATE |\n FileObserver.DELETE_S...
import android.os.AsyncTask; import android.support.v4.widget.SwipeRefreshLayout; import com.docd.purefm.adapters.BrowserBaseAdapter; import com.docd.purefm.browser.Browser; import com.docd.purefm.file.GenericFile; import com.docd.purefm.file.GenericFileFilter; import com.docd.purefm.settings.Settings; import com.docd....
/* * Copyright 2014 Yaroslav Mytkalyk * 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...
private final Browser mBrowser;
1
citysearch/web-widgets
src/main/java/com/citysearch/webwidget/facade/ConquestNearByPlacesFacade.java
[ "public class HouseAd {\n private String title;\n private String tagLine;\n private String destinationUrl;\n private String imageURL;\n private String trackingUrl;\n private String displayUrl;\n\n public String getTrackingUrl() {\n return trackingUrl;\n }\n\n public void setTrackin...
import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.TreeSet; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import com.citysearch.webwidget.bean.HouseAd; import com.citysearch.webwidget.bean.NearbyPlace; import com.citysearch.webwidget.bean.NearbyPlaces...
package com.citysearch.webwidget.facade; public class ConquestNearByPlacesFacade extends AbstractNearByPlacesFacade { private Logger log = Logger.getLogger(getClass()); protected ConquestNearByPlacesFacade(String contextPath, int displaySize) { super(contextPath, displaySize); }
public NearbyPlacesResponse getNearbyPlaces(RequestBean request)
2
ppicas/android-clean-architecture-mvp
app/src/main/java/cat/ppicas/cleanarch/ui/fragment/CityDetailFragment.java
[ "public interface ServiceContainer {\n\n CityRepository getCityRepository();\n\n CurrentWeatherRepository getCurrentWeatherRepository();\n\n DailyForecastRepository getDailyForecastRepository();\n\n TaskExecutor getTaskExecutor();\n\n}", "public final class ServiceContainers {\n\n private ServiceCo...
import cat.ppicas.framework.ui.PresenterFactory; import cat.ppicas.framework.ui.PresenterHolder; import cat.ppicas.cleanarch.ui.vista.CityDetailVista; import android.app.Fragment; import android.app.FragmentManager; import android.os.Bundle; import android.support.v13.app.FragmentStatePagerAdapter; import android.suppo...
/* * Copyright (C) 2015 Pau Picas Sans <pau.picas@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 app...
ServiceContainer sc = ServiceContainers.getFromApp(getActivity());
0
vianneyfaivre/Persephone
src/main/java/re/vianneyfaiv/persephone/ui/page/PropertiesPage.java
[ "public class Application {\n\n\tprivate int id;\n\tprivate String name;\n\tprivate String environment;\n\tprivate String url;\n\tprivate boolean up; // set when application is clicked\n\tprivate Endpoints endpoints;\n\tprivate AuthScheme authScheme;\n\tprivate String actuatorUsername;\n\tprivate String actuatorPas...
import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; import com.vaadin.icons.VaadinIcons; import com.vaadin.navigator.View; import com.vaad...
package re.vianneyfaiv.persephone.ui.page; /** * Display all declared properties of an application */ @UIScope @SpringView(name=PersephoneViews.PROPERTIES) public class PropertiesPage extends VerticalLayout implements View { @Autowired
private EnvironmentService envService;
3
Turksat/ESign
ESignUI/src/main/java/tr/gov/turkiye/esignuidesk/view/pane/PinPane.java
[ "public class Config {\n //Main frame configuration\n public static final int FRAME_WIDTH = 530;\n public static final int FRAME_HEIGHT = 275;\n public static final int FRAME_STARTING_X = 30;\n public static final int FRAME_STARTING_Y = 30;\n \n //Main panel configuration\n public static fin...
import java.awt.Point; import java.util.ArrayList; import javax.swing.JButton; import javax.swing.JTextField; import tr.gov.turkiye.esignuidesk.annotation.FocusOwner; import tr.gov.turkiye.esignuidesk.config.Config; import tr.gov.turkiye.esignuidesk.controller.LogicManager; import tr.gov.turkiye.esignuidesk.data.UserDa...
rndNumberCB = new javax.swing.JCheckBox(); setBackground(new java.awt.Color(255, 255, 255)); setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); setMaximumSize(new java.awt.Dimension(260, 250)); setName(Config.pinPaneName); setSize(new jav...
messagePane.setText(ScreenProperties.getValue("enter_pin"));
3
Piasy/BigImageViewer
app/src/main/java/com/github/piasy/biv/example/FrescoLoaderActivity.java
[ "public final class BigImageViewer {\n private static volatile BigImageViewer sInstance;\n\n private final ImageLoader mImageLoader;\n\n private BigImageViewer(ImageLoader imageLoader) {\n mImageLoader = imageLoader;\n }\n\n public static void initialize(ImageLoader imageLoader) {\n sIn...
import com.github.piasy.biv.loader.fresco.FrescoImageLoader; import com.github.piasy.biv.view.BigImageView; import com.github.piasy.biv.view.FrescoImageViewFactory; import android.net.Uri; import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import com.github.piasy.biv.Bi...
/* * The MIT License (MIT) * * Copyright (c) 2018 Piasy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, ...
bigImageView.setProgressIndicator(new ProgressPieIndicator());
1
ground-context/ground
modules/postgres/app/edu/berkeley/ground/postgres/dao/version/PostgresVersionDao.java
[ "public class GroundException extends Exception {\n\n private static final long serialVersionUID = 1L;\n\n private final String message;\n private final ExceptionType exceptionType;\n\n public enum ExceptionType {\n DB(\"Database Exception:\", \"%s\"),\n ITEM_NOT_FOUND(\"GroundItemNotFoundException\", \"N...
import edu.berkeley.ground.common.dao.version.VersionDao; import edu.berkeley.ground.common.exception.GroundException; import edu.berkeley.ground.common.model.version.Version; import edu.berkeley.ground.common.util.IdGenerator; import edu.berkeley.ground.postgres.dao.SqlConstants; import edu.berkeley.ground.postgres.ut...
/** * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * <p>http://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed to in writing, software distributed ...
statements.append(String.format(SqlConstants.INSERT_VERSION, version.getId()));
3
exoplatform/task
integration/src/main/java/org/exoplatform/task/integration/chat/ChatPopupPlugin.java
[ "@Data\n@NoArgsConstructor\npublic class ProjectDto implements Serializable {\n private static final Log LOG = ExoLogger.getLogger(ProjectDto.class);\n\n\n private long id;\n\n private String name;\n\n private String description;\n\n private String color;\n\n private Set<St...
import java.text.SimpleDateFormat; import java.util.*; import javax.ws.rs.core.MediaType; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.exoplatform.task.dto.ProjectDto; import org.exoplatform.task.dto.StatusDt...
/* * Copyright (C) 2012 eXo Platform SAS. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software i...
User user = userService.loadUser(task.getAssignee());
4
Vhati/OpenUHS
android-reader/src/main/java/net/vhati/openuhs/androidreader/reader/HotSpotNodeView.java
[ "public final class AndroidUHSConstants {\n\n\t/** A globally shared tag name for logging. */\n\tpublic static final String LOG_TAG = \"OpenUHS\";\n\n\n\tprivate AndroidUHSConstants() {}\n}", "public abstract class NodeView extends FrameLayout {\n\tprivate UHSNode node = null;\n\tprivate UHSReaderNavCtrl navCtrl ...
import java.io.InputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.DashPathEffect; import ...
package net.vhati.openuhs.androidreader.reader; public class HotSpotNodeView extends NodeView { private final Logger logger = LoggerFactory.getLogger( AndroidUHSConstants.LOG_TAG ); protected int overlayOutlineColor = Color.rgb( 0x80, 0x80, 0x80 ); // Gray. protected int overlayZoneColor = Color.rgb( 0xFF, ...
ByteReference mainImageRef = hotspotNode.getRawImageContent();
2
sivareddyg/UDepLambda
src/deplambda/parser/TreeTransformer.java
[ "public class PredicateKeys {\n public static final String EVENT_ENTITY_PREFIX = \"p_EVENT.ENTITY_\";\n public static final String EVENT_EVENT_PREFIX = \"p_EVENT.EVENT_\";\n public static final String COUNT_PREFIX = \"p_COUNT\";\n public static final String TARGET_PREFIX = \"p_TARGET\";\n public static final S...
import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Stack; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.log4j.Logger; import com.google.common.base.Preconditions; import deplambda.others.PredicateKeys; import deplamb...
depAndLeftAndRight = heuristicJoin(leftTreeParse, rightTreeParse); } if (depAndLeftAndRight != null) { if (logger != null) { logger.debug(depParse); logger.debug(leftTreeParse); logge...
PredicateKeys.EQUAL_PREFIX, variableType, variableType,
0
graphql-java/java-dataloader
src/test/java/org/dataloader/registries/ScheduledDataLoaderRegistryTest.java
[ "@PublicApi\npublic class DataLoader<K, V> {\n\n private final DataLoaderHelper<K, V> helper;\n private final StatisticsCollector stats;\n private final CacheMap<Object, V> futureCache;\n private final ValueCache<K, V> valueCache;\n\n /**\n * Creates new DataLoader with the specified batch loader...
import junit.framework.TestCase; import org.dataloader.DataLoader; import org.dataloader.DataLoaderFactory; import org.dataloader.DataLoaderRegistry; import org.dataloader.fixtures.TestKit; import java.time.Duration; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CompletableFuture; impor...
package org.dataloader.registries; public class ScheduledDataLoaderRegistryTest extends TestCase { DispatchPredicate alwaysDispatch = (key, dl) -> true; DispatchPredicate neverDispatch = (key, dl) -> false; public void test_basic_setup_works_like_a_normal_dlr() { List<List<String>> aCalls = ...
snooze(200);
5
zzwwws/RxZhihuDaily
app/src/main/java/com/github/zzwwws/rxzhihudaily/presenter/activity/CommentActivity.java
[ "@JsonInclude(JsonInclude.Include.NON_NULL)\n@JsonPropertyOrder({\n \"author\",\n \"content\",\n \"avatar\",\n \"time\",\n \"id\",\n \"likes\",\n \"reply_to\"\n})\npublic class Comment {\n\n @JsonProperty(\"author\")\n private String author;\n @JsonProperty(\"content\")\n private St...
import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import com.github.zzwwws.rxzhihudaily.R; import com.github.zzwwws.rxz...
package com.github.zzwwws.rxzhihudaily.presenter.activity; /** * Created by zzwwws on 2016/2/22. */ public class CommentActivity extends BaseActivity implements CommentView, View.OnClickListener, RecyclerOnItemClickListener { @Bind(R.id.tool_bar) Toolbar toolbar; @Bind(R.id.comment_recycler) Recy...
private CommentAdapter commentAdapter;
1
PistoiaHELM/HELMNotationToolkit
test/org/helm/notation/tools/SimpleNotationParserTest.java
[ "public class MonomerException extends Exception {\n\n\t/**\n\t * Creates a new instance of <code>MonomerException</code> without detail\n\t * message.\n\t */\n\tpublic MonomerException() {\n\t}\n\n\t/**\n\t * Constructs an instance of <code>MonomerException</code> with the\n\t * specified detail message.\n\t * \n\...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.Arrays; import java.util.List; import java.util.Map; import org.helm.notation.MonomerException; import org.helm.notation.MonomerFactory; import org.helm.notation.NotationException; import...
package org.helm.notation.tools; public class SimpleNotationParserTest { public String getSimpleRNANotation() { return "P.R(A)[sP].RP.R(G)P.[LR]([5meC])"; } /* * public String getInlineSmilesModP(){ return * "[OP([*])([*])=O |$;;_R1;_R2;$|].R(A)[sP].RP.R(G)[OP([*])([*])=O |$;;_R1;_R2;$|].[LR]([5meC])" ...
getSimpleRNANotation(), Monomer.NUCLIEC_ACID_POLYMER_TYPE);
6
AEminium/AeminiumRuntime
src/aeminium/runtime/implementations/implicitworkstealing/decider/MaxTasks.java
[ "public interface Runtime {\n /* Global constants for default values */\n public final static Collection<Task> NO_DEPS = new ArrayList<Task>() {\n\t\tprivate static final long serialVersionUID = 1852797887380877437L;\n\n\t\t@Override \n\t\tpublic String toString() {\n\t\t\treturn \"NO_DEPS\"; \n\t\t}\n\t};\n ...
import aeminium.runtime.Runtime; import aeminium.runtime.implementations.Configuration; import aeminium.runtime.implementations.implicitworkstealing.ImplicitWorkStealingRuntime; import aeminium.runtime.implementations.implicitworkstealing.scheduler.WorkStealingThread; import aeminium.runtime.implementations.implicitwor...
package aeminium.runtime.implementations.implicitworkstealing.decider; public class MaxTasks implements ParallelizationDecider { ImplicitWorkStealingRuntime rt;
protected final int maxTotalTasksPerCoreThreshold = Configuration.getProperty(getClass(), "maxTotalTasksPerCoreThreshold", 2);
1
TheCBProject/EnderStorage
src/main/java/codechicken/enderstorage/tile/TileEnderChest.java
[ "public class EnderStorageConfig {\n\n private static ConfigTag config;\n\n public static ItemStack personalItem;\n public static boolean anarchyMode;\n public static int storageSize;\n\n public static boolean disableCreatorVisuals;\n public static boolean useVanillaEnderChestSounds;\n\n public...
import codechicken.enderstorage.config.EnderStorageConfig; import codechicken.enderstorage.init.ModContent; import codechicken.enderstorage.manager.EnderStorageManager; import codechicken.enderstorage.misc.EnderDyeButton; import codechicken.enderstorage.storage.EnderItemStorage; import codechicken.lib.data.MCDataInput;...
package codechicken.enderstorage.tile; public class TileEnderChest extends TileFrequencyOwner { public double a_lidAngle; public double b_lidAngle; public int c_numOpen; public int rotation; private LazyOptional<IItemHandler> itemHandler = LazyOptional.empty(); public static EnderDyeButto...
public EnderItemStorage getStorage() {
4
notem/Saber-Bot
src/main/java/ws/nmathe/saber/core/schedule/ScheduleSyncer.java
[ "public class Main\n{\n private static ShardManager shardManager;\n private static BotSettingsManager botSettingsManager = new BotSettingsManager();\n private static EntryManager entryManager = new EntryManager();\n private static ScheduleManager scheduleManager = new Sched...
import com.google.api.client.auth.oauth2.Credential; import com.google.api.services.calendar.Calendar; import com.google.common.util.concurrent.ThreadFactoryBuilder; import net.dv8tion.jda.api.JDA; import net.dv8tion.jda.api.entities.TextChannel; import org.bson.Document; import org.bson.conversions.Bson; import ws.nma...
package ws.nmathe.saber.core.schedule; /** * Thread used to resync schedules once a day if that schedule * is configured to sync to a google calendar address. * If the sync fails, the schedule's sync configuration is reset */ class ScheduleSyncer implements Runnable { // thread pool for sync jobs privat...
MessageUtilities.sendMsg(content, control, null);
4
wrey75/WaveCleaner
src/main/java/com/oxande/wavecleaner/ui/MainScreen.java
[ "public class AudioProject {\r\n\tpublic static String DEFAULT_EXT = \".wclean\";\r\n\t\r\n\tprivate String name;\r\n\tprivate boolean saved;\r\n\tprivate ListenerManager<ProjectListener> listenerManager = new ListenerManager<>();\r\n\t\r\n\t/**\r\n\t * A project can contain more than 1 side of the disc.\r\n\t * \r...
import java.io.File; import java.io.IOException; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import javax.swing.filechooser.FileNameExtensionFilter; import org.apache.logging.log4j.Logger; import com.oxande.wavecleaner.AudioProject; import com.oxande.wavecleaner.P...
package com.oxande.wavecleaner.ui; @SuppressWarnings("serial") public class MainScreen extends AbstractMainScreen implements AudioPlayerListener, AudioChangedListener, ProjectListener { private static Logger LOG = LogFactory.getLog(MainScreen.class); private WaveCleaner app;
private AudioDocument audio;
4
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/backend/Symbol.java
[ "public static boolean containsAt(byte[] array, byte[] searchFor, int index) {\n for (int i = 0; i < searchFor.length; i++) {\n if (index + i >= array.length || array[index + i] != searchFor[i]) {\n return false;\n }\n }\n return true;\n}", "public static int positionOf(char valu...
import static uk.org.okapibarcode.backend.HumanReadableAlignment.CENTER; import static uk.org.okapibarcode.backend.HumanReadableLocation.BOTTOM; import static uk.org.okapibarcode.backend.HumanReadableLocation.NONE; import static uk.org.okapibarcode.backend.HumanReadableLocation.TOP; import static uk.org.okapibarcode.ut...
} /** * Returns render information about the target circles in this symbol. * * @return render information about the target circles in this symbol */ public List< Ellipse2D.Double > getTarget() { return target; } protected static String bin2pat(CharSequence bin) { ...
EciMode eci = EciMode.of(content, "ISO8859_1", 3)
4
tomtom-international/configuration-service
src/main/java/com/tomtom/services/configuration/implementation/TreeResourceImpl.java
[ "@Path(\"/tree\")\n@SuppressWarnings(\"squid:S1214\")\npublic interface TreeResource {\n\n String PATH_PARAM = \"path\";\n String HEADER_IF_MODIFIED_SINCE = \"If-Modified-Since\";\n String HEADER_IF_NONE_MATCH = \"If-None-Match\";\n\n char SEPARATOR_QUERY = ',';\n char SEPARATOR_WRONG = ';';\n cha...
import akka.dispatch.Futures; import com.google.common.base.Splitter; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.tomtom.services.configuration.TreeResource; import com.tomtom.services.configuration.domain.Node; import com.tomtom.services.configuration.dto.NodeDTO; imp...
/* * Copyright (C) 2012-2021, TomTom (http://tomtom.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...
for (final SearchResultDTO foundResult : foundResults) {
3
timschlechter/swagger-for-elasticsearch
src/main/java/net/itimothy/elasticsearch/routes/indexroutes/DocumentRoutes.java
[ "public enum HttpMethod {\n UNKNOWN,\n GET,\n POST,\n PUT,\n PATCH,\n DELETE,\n OPTIONS,\n HEAD\n}", "public enum ParamType {\n PATH,\n QUERY,\n BODY,\n HEADER,\n FORM\n}", "public class Route extends Description {\n private String apiPath;\n private HttpMethod metho...
import com.google.common.base.Function; import net.itimothy.elasticsearch.routes.model.HttpMethod; import net.itimothy.elasticsearch.routes.model.Model; import net.itimothy.elasticsearch.routes.model.ParamType; import net.itimothy.elasticsearch.routes.model.Route; import org.elasticsearch.client.Client; import net.itim...
package net.itimothy.elasticsearch.routes.indexroutes; class DocumentRoutes extends BaseIndexRoutes { public DocumentRoutes(Client client, ModelsCatalog modelsCatalog, String indexOrAlias) { super(client, modelsCatalog, indexOrAlias); } @Override protected String getDefaultGroup() { ...
param("type", ParamType.PATH).build(),
1
salk31/RedQueryBuilder
redquerybuilder-js/src/main/java/com/redspr/redquerybuilder/js/client/ConfigurationAdapter.java
[ "public class Configuration {\n private Database database = new Database();\n\n private final From from = new From();\n\n public void fireEnumerate(EnumerateRequest request, AsyncCallback<Response> callback) {\n }\n\n // XXX not called by CommandBuilder. GWT users meant to use RedQueryBuilder?\n p...
import java.util.ArrayList; import java.util.List; import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.core.client.JsArray; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.MultiWordSuggestOracle.MultiWordSuggestion; import com.google.gwt.user.client.ui.Sug...
/******************************************************************************* * Copyright (c) 2010-2013 Redspr Ltd. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * h...
op.setCardinality(Cardinality.valueOf(cardName));
1
RoboTricker/Transport-Pipes
src/main/java/de/robotricker/transportpipes/saving/DuctLoader.java
[ "public abstract class Duct {\n\n protected GlobalDuctManager globalDuctManager;\n protected DuctSettingsInventory settingsInv;\n private DuctType ductType;\n private BlockLocation blockLoc;\n private World world;\n private Chunk chunk;\n private Map<TPDirection, Duct> connectedDucts;\n priv...
import net.querz.nbt.CompoundTag; import net.querz.nbt.ListTag; import net.querz.nbt.NBTUtil; import org.bukkit.World; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; import javax.inject.Inject; import de.robotricker.transport...
package de.robotricker.transportpipes.saving; public class DuctLoader { @Inject private GlobalDuctManager globalDuctManager; @Inject private DuctRegister ductRegister; @Inject private ItemService itemService; public void loadDuctsSync(World world, CompoundTag compoundTag) { L...
Map<Duct, CompoundTag> ductCompoundTagMap = new HashMap<>();
0
ralscha/wampspring
src/test/java/ch/rasc/wampspring/cra/ClassEnableTest.java
[ "@Configuration\npublic class DefaultWampConfiguration {\n\n\tprivate final List<WampConfigurer> configurers = new ArrayList<>();\n\n\tprivate ObjectMapper objectMapper = null;\n\n\tprotected ObjectMapper internalObjectMapper = null;\n\n\tprotected PathMatcher internalPathMatcher = null;\n\n\tprotected ConversionSe...
import ch.rasc.wampspring.testsupport.BaseWampTest; import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBoot...
/** * Copyright 2014-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
CallMessage sumMessage = new CallMessage("12", "callService.sum", 3, 4);
3
BottleRocketStudios/Android-GroundControl
GroundControl/groundcontrol/src/androidTest/java/com/bottlerocketstudios/groundcontrol/test/integration/CacheClearingTest.java
[ "public class AgentExecutor implements InactivityCleanupListener {\n\n private static final String TAG = AgentExecutor.class.getSimpleName();\n\n public static final String DEFAULT_AGENT_EXECUTOR_ID = \"<def>\";\n\n private static final ConcurrentHashMap<String, AgentExecutor> sAgentExecutorMap = new Concu...
import android.test.AndroidTestCase; import com.bottlerocketstudios.groundcontrol.AgentExecutor; import com.bottlerocketstudios.groundcontrol.test.TestUtils; import com.bottlerocketstudios.groundcontrol.listener.AgentListener; import com.bottlerocketstudios.groundcontrol.policy.AgentPolicy; import com.bottlerocketstudi...
/* * Copyright (c) 2016. Bottle Rocket LLC * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
final TestUtils.Container<Long> firstResult = new TestUtils.Container<>(0L);
1
Mpmart08/MusicPlayer
src/app/musicplayer/util/Search.java
[ "public final class Library {\n\n private static final String ID = \"id\";\n private static final String TITLE = \"title\";\n private static final String ARTIST = \"artist\";\n private static final String ALBUM = \"album\";\n private static final String LENGTH = \"length\";\n private static final ...
import app.musicplayer.model.Library; import app.musicplayer.model.Song; import app.musicplayer.model.Album; import app.musicplayer.model.Artist; import app.musicplayer.model.SearchResult; import java.util.List; import java.util.stream.Collectors; import javafx.beans.property.BooleanProperty; import javafx.beans.proper...
package app.musicplayer.util; public class Search { private static BooleanProperty hasResults = new SimpleBooleanProperty(false); private static SearchResult result; private static Thread searchThread; public static BooleanProperty hasResultsProperty() { return hasResults; } public static Sear...
List<Song> songResults = Library.getSongs().stream()
0
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/implementations/ViewFactory.java
[ "public class UIHandler extends Handler\n{\n\tprivate Thread uiThread;\n\tpublic UIHandler()\n\t{\n\t\t//save an instance of the current thread, where it was created.\n\t\tuiThread = Thread.currentThread();\n\t}\n\n\tpublic void tryPostImmediatelyToUIThread(Runnable action)\n\t{\n\t\t//if the current thread is same...
import android.view.View; import org.json.JSONException; import org.json.JSONObject; import traction.mvc.observables.ScopeBuilder; import java.lang.reflect.Constructor; import traction.mvc.R; import traction.mvc.implementations.ui.UIHandler; import traction.mvc.interfaces.IProxyViewBinding; import traction.mvc.interfac...
String prefix = (parentViewBinding == null || parentViewBinding.getProxyViewBinding() == null ? null : parentViewBinding.getProxyViewBinding().getPathPrefix()); if (relativeContext != null) { if (prefix == null) prefix = relativeContext; else ...
if (scope instanceof IProxyObservableObject && ((IProxyObservableObject)scope).getProxyObservableObject() != null)
5
artivisi/biller-simulator
biller-simulator-service-impl/src/main/java/com/artivisi/biller/simulator/service/impl/PlnSimulatorServiceImpl.java
[ "public class GeneratorTagihanPascabayar {\n\tprivate Integer normal = 100;\n\tprivate Integer satuBulanBukanBerjalan = 10;\n\tprivate Integer tigaBulanTunggakan = 10;\n\tprivate Integer empatBulanTunggakan = 10;\n\tprivate Integer enamBulanTunggakan = 10;\n\tprivate Integer delapanBulanTunggakan = 10;\n\tprivate I...
import java.math.BigDecimal; import java.math.RoundingMode; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.hibernate.SessionFactory; import org.joda.time.DateTime; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import o...
/** * Copyright (C) 2011 ArtiVisi Intermedia <info@artivisi.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 req...
private List<TagihanNontaglis> findTagihanNontaglis(Pelanggan pelanggan, Boolean lunas) {
4
vgoldin/cqrs-eventsourcing-kafka
services-inventoryitem-domain/src/main/java/io/plumery/inventoryitem/core/domain/InventoryItem.java
[ "public abstract class AggregateRoot {\n private static final Logger logger = LoggerFactory.getLogger(AggregateRoot.class);\n\n private static final String APPLY_METHOD_NAME = \"apply\";\n private final List<Event> changes = new ArrayList<>();\n\n public ID id;\n public int version;\n\n protected ...
import io.plumery.core.AggregateRoot; import io.plumery.core.ID; import io.plumery.core.exception.InvalidArgumentException; import io.plumery.core.exception.InvalidStateException; import io.plumery.inventoryitem.core.domain.event.ItemsCheckedInToInventory; import io.plumery.inventoryitem.core.domain.event.ItemsRemovedF...
package io.plumery.inventoryitem.core.domain; public class InventoryItem extends AggregateRoot { private Boolean activated; private String name; @SuppressWarnings("unused") private InventoryItem() {} public InventoryItem(ID id, String name) { InventoryItemCreated e = new InventoryItemCr...
applyChange(new ItemsCheckedInToInventory(id, count));
4
cattaka/AdapterToolbox
example/src/androidTest/java/net/cattaka/android/adaptertoolbox/example/SpinnerTreeItemAdapterExampleActivityTest.java
[ "public class AdapterConverter<\n S extends IHasItemAdapter<VH, T>,\n VH extends RecyclerView.ViewHolder,\n T\n > extends BaseAdapter {\n @IdRes\n public static int VIEW_HOLDER = R.id.viewholder;\n\n private S mOrig;\n private boolean mRecyclingDisabled = false;\n\n privat...
import android.support.test.rule.ActivityTestRule; import android.view.View; import net.cattaka.android.adaptertoolbox.classic.AdapterConverter; import net.cattaka.android.adaptertoolbox.example.spinner.SpinnerMyTreeItemAdapter; import net.cattaka.android.adaptertoolbox.example.spinner.SpinnerMyTreeItemAdapter.WrappedI...
package net.cattaka.android.adaptertoolbox.example; /** * Created by cattaka on 16/06/05. */ public class SpinnerTreeItemAdapterExampleActivityTest { @Rule public ActivityTestRule<SpinnerTreeItemAdapterExampleActivity> mActivityTestRule = new ActivityTestRule<>(SpinnerTreeItemAdapterExampleActivity.class...
TestUtils.Entry<SpinnerMyTreeItemAdapter.WrappedItem> entry = find(mAdapter.getItems(), SpinnerMyTreeItemAdapter.WrappedItem.class, i);
5
sorinMD/MCTS
src/main/java/mcts/tree/selection/UCTAction.java
[ "public interface Game {\n\n\t/**\n\t * @return a clone of the game state\n\t */\n\tpublic int[] getState();\n\n\tpublic int getWinner();\n\n\tpublic boolean isTerminal();\n\n\tpublic int getCurrentPlayer();\n\n\t/**\n\t * Updates the state description based on the chosen action\n\t * \n\t * @param a\n\t * ...
import java.util.ArrayList; import java.util.Collections; import java.util.concurrent.ThreadLocalRandom; import mcts.game.Game; import mcts.game.GameFactory; import mcts.tree.Tree; import mcts.tree.node.Key; import mcts.tree.node.StandardNode; import mcts.tree.node.TreeNode; import mcts.utils.Selection; import mcts.uti...
package mcts.tree.selection; /** * Similar to the UCT class, but selecting based on the statistics stored in the * links, i.e. actions, rather than the resulting states. Used when afterstates * are not allowed. * * @author sorinMD * */ public class UCTAction extends SelectionPolicy{ public UCTAction() {}...
TreeNode child = tree.getNode(chosen);
5
binzume/glvideoplayer-android
src/net/binzume/android/nicovideo/webapi/ChannelAPI.java
[ "public class ChannelCategoryInfo {\n\tpublic String id;\n\tpublic String name;\n\tpublic String description;\n\n\tpublic List<ChannelInfo> channels;\n\n\tpublic ChannelCategoryInfo() {\n\t}\n\n\tpublic ChannelCategoryInfo(String str) {\n\t\tString s[] = str.split(\"\\t\", 4);\n\t\tif (!\"0\".equals(s[0]) || s.leng...
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.regex.*; import net.binzume.android.nicovideo.ChannelCategoryInfo; import net.binzume.android.nicovideo.ChannelInfo; import net.binzume.android.nicovideo.NicoSession; import net.binzume.android.nicovi...
package net.binzume.android.nicovideo.webapi; public class ChannelAPI { private static final String LIST_URL = "http://ch.nicovideo.jp/chlist"; private static final String VIDEO_URL = "http://ch.nicovideo.jp/video/"; private static final String CH_API_URL = "http://ch.nicovideo.jp/api/"; private static final Str...
public static List<ChannelCategoryInfo> getAllChannelList() {
0
arquillian/arquillian-recorder
arquillian-recorder-reporter/arquillian-recorder-reporter-impl/src/main/java/org/arquillian/recorder/reporter/impl/ReporterLifecycleObserver.java
[ "public enum ReportFrequency {\n\n METHOD(\"method\"),\n CLASS(\"class\"),\n SUITE(\"suite\");\n\n private String phase;\n\n ReportFrequency(String phase) {\n this.phase = phase;\n }\n\n @Override\n public String toString() {\n return phase;\n }\n\n /**\n *\n * @r...
import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.sql.Date; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import org.arquillian.recorder.reporter.ReportFrequency; import org.arquillian.recorder.reporter....
/* * JBoss, Home of Professional Open Source * Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual * contributors by the @authors tag. See the copyright.txt in the * distribution for a full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * y...
private Event<InTestResourceReport> inTestResourceReportEvent;
3
sastix/cms
server/src/main/java/com/sastix/cms/server/controllers/CacheController.java
[ "public interface Constants {\n\n /**\n * Rest API Version.\n */\n static String REST_API_1_0 = \"1.0\";\n String GET_API_VERSION = \"/apiversion\";\n String DEFAULT_LANGUAGE = \"en\";\n\n /**\n * CONTENT API ENDPOINTS\n */\n static String CREATE_RESOURCE = \"createResource\";\n ...
import com.sastix.cms.common.Constants; import com.sastix.cms.common.cache.CacheDTO; import com.sastix.cms.common.cache.QueryCacheDTO; import com.sastix.cms.common.cache.RemoveCacheDTO; import com.sastix.cms.common.cache.exceptions.CacheValidationException; import com.sastix.cms.common.cache.exceptions.DataNotFound; im...
/* * Copyright(c) 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
CacheDTO getCachedResource(@Valid @RequestBody QueryCacheDTO queryCacheDTO) throws DataNotFound, CacheValidationException {
1
lukasz-kusek/xml-comparator
src/main/java/com/github/lukaszkusek/xml/comparator/comparators/children/cost/CostCalculator.java
[ "public class XMLComparator {\n\n private XMLDocument xmlDocument1;\n private XMLDocument xmlDocument2;\n\n private Predicate<DifferenceInformation> xPathsToOmitPredicate;\n\n private List<XMLComparatorStep> xmlComparatorSteps;\n\n XMLComparator() {\n }\n\n public static XMLComparatorBuilder bu...
import com.google.common.collect.Lists; import java.util.Collection; import com.github.lukaszkusek.xml.comparator.XMLComparator; import com.github.lukaszkusek.xml.comparator.diff.DifferenceCode; import com.github.lukaszkusek.xml.comparator.diff.DifferenceDetails; import com.github.lukaszkusek.xml.comparator.node.INode;...
/* * The MIT License (MIT) * * Copyright (c) 2013 Lukasz Kusek * * 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,...
public CostMatrix compareChildren(Collection<Node> children1, Collection<Node> children2) {
4
VEINHORN/ScrollGalleryView
builder_example/src/main/java/com/veinhorn/scrollgalleryview/example/builder/MainActivity.java
[ "public class MediaInfo {\n private MediaLoader mLoader;\n private String description;\n\n private MediaInfo() {\n\n }\n\n private MediaInfo(MediaLoader mediaLoader, String description) {\n this.mLoader = mediaLoader;\n this.description = description;\n }\n\n /**\n * Creates M...
import android.support.v4.app.FragmentActivity; import android.os.Bundle; import android.support.v4.view.ViewPager; import android.util.Log; import android.widget.Toast; import com.veinhorn.scrollgalleryview.MediaInfo; import com.veinhorn.scrollgalleryview.ScrollGalleryView; import com.veinhorn.scrollgalleryview.builde...
package com.veinhorn.scrollgalleryview.example.builder; public class MainActivity extends FragmentActivity { private static final String TAG = MainActivity.class.getName(); private ScrollGalleryView galleryView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(...
new PicassoImageLoader("https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/USRC_Salmon_P_Chase_-_LoC_4a25817u.jpg/1200px-USRC_Salmon_P_Chase_-_LoC_4a25817u.jpg"),
3
Doist/JobSchedulerCompat
library/src/test/java/com/doist/jobschedulercompat/scheduler/jobscheduler/JobSchedulerJobServiceTest.java
[ "public class JobInfo {\n private static final String LOG_TAG = \"JobInfoCompat\";\n\n @IntDef({\n NETWORK_TYPE_NONE,\n NETWORK_TYPE_ANY,\n NETWORK_TYPE_UNMETERED,\n NETWORK_TYPE_NOT_ROAMING,\n NETWORK_TYPE_CELLULAR\n })\n @Retention(RetentionPolicy...
import com.doist.jobschedulercompat.JobInfo; import com.doist.jobschedulercompat.job.JobStatus; import com.doist.jobschedulercompat.job.JobStore; import com.doist.jobschedulercompat.util.DeviceTestUtils; import com.doist.jobschedulercompat.util.JobCreator; import com.doist.jobschedulercompat.util.ShadowJobParameters; i...
package com.doist.jobschedulercompat.scheduler.jobscheduler; @RunWith(RobolectricTestRunner.class) @Config(sdk = {Build.VERSION_CODES.LOLLIPOP, Build.VERSION_CODES.N, Build.VERSION_CODES.O, Build.VERSION_CODES.P}, shadows = {ShadowJobParameters.class, ShadowNetworkInfo.class}) public class JobSchedulerJob...
private JobStore jobStore;
2
eriq-augustine/jocr
src/com/eriqaugustine/ocr/drivers/EntropyReducerTest.java
[ "public interface OCRClassifier {\n public String classify(WrapImage image);\n}", "public class PLOVEClassifier extends CharacterClassifier {\n private static Logger logger = LogManager.getLogger(PLOVEClassifier.class.getName());\n\n public PLOVEClassifier(String trainingCharacters, String[] fonts, FeatureV...
import com.eriqaugustine.ocr.classifier.OCRClassifier; import com.eriqaugustine.ocr.classifier.PLOVEClassifier; import com.eriqaugustine.ocr.classifier.reduce.EntropyReducer; import com.eriqaugustine.ocr.classifier.reduce.FeatureVectorReducer; import com.eriqaugustine.ocr.plove.PLOVE; import com.eriqaugustine.ocr.utils...
package com.eriqaugustine.ocr.drivers; /** * Quck test for PLOVEClassifier. */ public class EntropyReducerTest extends ClassifierTest { public static void main(String[] args) throws Exception { EntropyReducerTest test = new EntropyReducerTest(); test.run(); } private void run() throws Excepti...
String[] fonts = Props.getList("CLASSIFIER_TRAINING_FONTS").toArray(new String[0]);
5
lambdazen/pixy
src/main/java/com/lambdazen/pixy/postprocess/Phase1.java
[ "public interface PipeVisitor {\n\tpublic void visit(PixyPipe pp);\n\n\tpublic void mark();\n\n\tpublic void reset();\n}", "public interface PixyPipe {\n\tpublic GraphTraversal pixyStep(GraphTraversal inputPipe);\n\t\n\tpublic void visit(PipeVisitor visitor);\n}", "public class MergePipe implements PixyPipe, In...
import java.util.Set; import com.lambdazen.pixy.PipeVisitor; import com.lambdazen.pixy.PixyPipe; import com.lambdazen.pixy.pipes.MergePipe; import com.lambdazen.pixy.pipes.NamedInputPipe; import com.lambdazen.pixy.pipes.NamedOutputPipe; import com.lambdazen.pixy.pipes.PipeUtils;
package com.lambdazen.pixy.postprocess; public class Phase1 implements PipeVisitor { private String curOutputStep; private Set<String> usedSteps; private MergePipe prevMergePipe; private String markOutputStep; public Phase1(Set<String> usedSteps) { this.usedSteps = usedSteps; this.curOutputStep = null; }...
PipeUtils.addDependentNamedSteps(usedSteps, pp);
5
orekyuu/Riho
src/net/orekyuu/riho/emotion/renderer/AngerRenderer.java
[ "public abstract class Animation {\n\n private Instant startTime;\n private final Duration duration;\n private final Duration delay;\n double valueFrom;\n double valueTo;\n double value;\n\n public Animation(Instant startTime, Duration duration) {\n this(startTime, duration, Duration.ZER...
import net.orekyuu.riho.animation.Animation; import net.orekyuu.riho.animation.KeyFrameAnimation; import net.orekyuu.riho.animation.LinearAnimation; import net.orekyuu.riho.character.ImageResources; import net.orekyuu.riho.character.ImageUtil; import net.orekyuu.riho.character.Loop; import net.orekyuu.riho.character.Ri...
package net.orekyuu.riho.emotion.renderer; public class AngerRenderer extends EmotionRendererBase { private final BufferedImage emotionImage; private Duration animationTime = Duration.ofMillis(2000); private Animation moveX; private Animation moveY; private Animation fade = new LinearAnimation(In...
public AngerRenderer(Loop maxLoopCount) {
5
jochen777/jFormchecker
src/test/java/de/jformchecker/test/FormTests.java
[ "public class FormChecker {\n\tRequest req;\n\tboolean firstRun = true;\n\tboolean isValid = true;\n\tFormCheckerForm form = null;\n\tValidator validator = new DefaultValidator();\n\n\t@Deprecated\n\tString id;\n\n\t/**\n\t * Maximal lenght of input vars to avoid too long requests If you want to\n\t * get longer el...
import static org.junit.Assert.assertEquals; import java.util.HashMap; import java.util.Map; import org.junit.Assert; import org.junit.Test; import de.jformchecker.FormChecker; import de.jformchecker.FormCheckerForm; import de.jformchecker.criteria.Criteria; import de.jformchecker.elements.TextInput; import de.jformche...
package de.jformchecker.test; public class FormTests { @Test public void testXSS() { TextInput ti = buildExampleTextInput(); Request request = RequestBuilders.buildExampleHttpRequest(); ti.init(request, false, new DefaultValidator()); String inputTag = ti.getInputTag(); assertEquals( "<input id=\"...
FormChecker fc = FormChecker.build(request, ExampleFormBuilder.getComplexForm(formId));
5
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)); table.getColumns().add(new Column(0.25)); ...
table.getVerticalBorders().add(new Border(200, Color.BLACK));
2
kristian/JDigitalSimulator
src/main/java/lc/kra/jds/components/buildin/register/Register.java
[ "public final class Utilities {\n\tpublic static enum TranslationType { TEXT, ALTERNATIVE, TITLE, EXTERNAL, TOOLTIP, DESCRIPTION; }\n\n\tpublic static final String\n\t\tCONFIGURATION_LOCALIZATION_LANGUAGE = \"localization.language\",\n\t\tCONFIGURATION_LOOK_AND_FEEL_CLASS = \"lookandfeel.class\",\n\t\tCONFIGURATION...
import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Polygon; import java.awt.Shape; import java.beans.PropertyVetoException; import java.io.IOException; import java.io.ObjectInputStream; import java.util.HashMap; import java.util...
/* * JDigitalSimulator * Copyright (C) 2017 Kristian Kraljic * * 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. *...
int x = (list.getContact(0) instanceof InputContact)?0:size.width;
7
AfterLifeLochie/fontbox
src/main/java/net/afterlifelochie/fontbox/layout/components/LineWriter.java
[ "public class TextFormat implements Cloneable {\r\n\r\n\tpublic final EnumSet<DecorationStyle> decorations;\r\n\tpublic final GLFont font;\r\n\tpublic final ColorFormat color;\r\n\r\n\tpublic TextFormat(GLFont font) {\r\n\t\tthis(font, EnumSet.noneOf(DecorationStyle.class), null);\r\n\t}\r\n\r\n\tpublic TextFormat(...
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map.Entry; import net.afterlifelochie.fontbox.document.formatting.TextFormat; import net.afterlifelochie.fontbox.document.property.AlignmentMode; import net.afterlifelochie.fontbox.docume...
package net.afterlifelochie.fontbox.layout.components; public class LineWriter { /** The writer stream */ private final PageWriter writer; /** The alignment writing in */ private final AlignmentMode alignment; /** The list of words on the stack currently */ private final ArrayList<String> words; ...
private void update() throws LayoutException, IOException {
4
cmusatyalab/gabriel
examples/round_trip/android-client/app/src/main/java/edu/cmu/cs/roundtrip/GabrielActivity.java
[ "public class CameraCapture {\n private static final String TAG = \"CameraCapture\";\n private static final String REQUIRED_PERMISSION = Manifest.permission.CAMERA;\n private static final CameraSelector DEFAULT_SELECTOR = CameraSelector.DEFAULT_BACK_CAMERA;\n private static final boolean DEFAULT_ENABLE_...
import android.os.Bundle; import android.util.Log; import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.camera.core.ImageAnalysis; import androidx.camera.core.ImageProxy; import androidx.camera.view.PreviewView; import com.google.protobuf....
package edu.cmu.cs.roundtrip; public class GabrielActivity extends AppCompatActivity { private static final String TAG = "GabrielActivity"; private static final String SOURCE = "roundtrip"; private static final int PORT = 9099; private static final int WIDTH = 640; private static final int HEI...
Consumer<ResultWrapper> consumer = resultWrapper -> {
6
gugemichael/nesty
core/src/main/java/org/nesty/core/server/rest/controller/ControllerMethodDescriptor.java
[ "public class ControllerParamsNotMatchException extends Exception {\n\n public ControllerParamsNotMatchException(String msg) {\n super(msg);\n }\n}", "public class ControllerParamsParsedException extends Exception {\n\n public ControllerParamsParsedException(String msg) {\n super(msg);\n ...
import org.nesty.commons.annotations.Header; import org.nesty.commons.annotations.PathVariable; import org.nesty.commons.annotations.RequestBody; import org.nesty.commons.annotations.RequestParam; import org.nesty.commons.exception.ControllerParamsNotMatchException; import org.nesty.commons.exception.ControllerParamsPa...
package org.nesty.core.server.rest.controller; /** * controller method descriptor include annotation params * <p> * Author : Michael * Date : March 07, 2016 */ public class ControllerMethodDescriptor { // method private Method method; // method param include param class type and param annotation ...
} catch (NumberFormatException | SerializeException e) {
2
numenta/htm.java
src/test/java/org/numenta/nupic/network/AlgorithmDeterminacyTest.java
[ "public class Parameters implements Persistable {\n /** keep it simple */\n private static final long serialVersionUID = 1L;\n \n private static final Map<KEY, Object> DEFAULTS_ALL;\n private static final Map<KEY, Object> DEFAULTS_TEMPORAL;\n private static final Map<KEY, Object> DEFAULTS_SPATIAL;...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.Map; import org.junit.AfterClass; import org.junit.Test; import org.numenta.nupic.Parameters; import org.numenta.nupic.Parameters.KEY; import org....
/* --------------------------------------------------------------------- * Numenta Platform for Intelligent Computing (NuPIC) * Copyright (C) 2014, Numenta, Inc. Unless you have an agreement * with Numenta, Inc., for a separate license for this software code, the * following terms and conditions apply: * * This ...
TEST_AGGREGATION[TM_EXPL] = SDR.asCellIndices(cc.activeCells);
5
hello/android-buruberi
buruberi-example/src/main/java/is/hello/buruberi/example/activities/ScanActivity.java
[ "public interface GattPeripheral extends Comparable<GattPeripheral> {\n /**\n * The log tag used by implementations of the GattPeripheral interface.\n */\n String LOG_TAG = \"Bluetooth.\" + GattPeripheral.class.getSimpleName();\n\n\n //region Local Broadcasts\n\n /**\n * A local broadcast th...
import android.Manifest; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.PermissionChecker; import android.support.v7.app.AlertDialog; import androi...
package is.hello.buruberi.example.activities; /** * Allows the user to conduct a Bluetooth Low Energy peripheral scan, * and select peripherals to interact with. */ public class ScanActivity extends BaseActivity implements ScanResultsAdapter.OnItemClickListener { private static final int LOCATION_RE...
@Inject PeripheralPresenter peripheralPresenter;
2
alt236/EasyCursor---Android
sample_app/src/main/java/uk/co/alt236/easycursor/sampleapp/database/ExampleDatabase.java
[ "public interface EasyCursor extends Cursor {\n\n /**\n * Returns the value of the requested column as a byte array or throws\n * IllegalArgumentException if the column doesn't exist.\n *\n * @param columnName the column name\n * @return the value from cursor\n * @throws IllegalArgumentEx...
import java.util.List; import uk.co.alt236.easycursor.EasyCursor; import uk.co.alt236.easycursor.objectcursor.EasyObjectCursor; import uk.co.alt236.easycursor.sampleapp.container.TrackInfo; import uk.co.alt236.easycursor.sampleapp.database.builders.LousyQueryBuilder; import uk.co.alt236.easycursor.sampleapp.util.Consta...
/* * *************************************************************************** * Copyright 2015 Alexandros Schillings * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * ht...
final SqlQueryModel model = SqlJsonModelConverter.convert(json);
7
cloudera/director-spi
src/main/java/com/cloudera/director/spi/v2/compute/ComputeInstanceTemplate.java
[ "public interface ConfigurationProperty extends Property<ConfigurationProperty.Widget> {\n\n /**\n * Represents the widget used to display and edit a configuration property.\n */\n enum Widget {\n\n /**\n * Radio button widget.\n */\n RADIO,\n\n /**\n * Checkbox widget.\n */\n CHEC...
import com.cloudera.director.spi.v2.model.ConfigurationProperty; import com.cloudera.director.spi.v2.model.Configured; import com.cloudera.director.spi.v2.model.InstanceTemplate; import com.cloudera.director.spi.v2.model.LocalizationContext; import com.cloudera.director.spi.v2.model.util.SimpleConfigurationPropertyBuil...
// (c) Copyright 2015 Cloudera, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
LocalizationContext providerLocalizationContext) {
3
google/Accessibility-Test-Framework-for-Android
src/main/java/com/google/android/apps/common/testing/accessibility/framework/suggestions/BaseTextContrastFixSuggestionProducer.java
[ "public class AccessibilityHierarchyCheckResult extends AccessibilityCheckResult {\n\n private final int resultId;\n private final @Nullable ViewHierarchyElement element;\n private final @Nullable ResultMetadata metadata;\n private final ImmutableList<Answer> answers;\n\n /**\n * Constructor when there are {...
import com.google.android.apps.common.testing.accessibility.framework.AccessibilityHierarchyCheckResult; import com.google.android.apps.common.testing.accessibility.framework.Parameters; import com.google.android.apps.common.testing.accessibility.framework.ResultMetadata; import com.google.android.apps.common.testing.a...
package com.google.android.apps.common.testing.accessibility.framework.suggestions; /** * Base class which produces a {@link SetViewAttributeFixSuggestion} to fix a text low contrast * issue. */ abstract class BaseTextContrastFixSuggestionProducer implements FixSuggestionProducer<SetViewAttributeFixSuggestion>...
@Nullable Parameters parameters) {
1
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, JobSchedulerSchedulerV24.TAG);
6
rust-keylock/rust-keylock-android
java/src/main/java/org/astonbitecode/rustkeylock/callbacks/ShowEntriesSetCb.java
[ "public class MainActivity extends Activity implements BackButtonHandlable {\n private static MainActivity ACTIVE_ACTIVITY;\n\n public static MainActivity getActiveActivity() {\n return ACTIVE_ACTIVITY;\n }\n\n private final String TAG = getClass().getName();\n private Thread rustThread = null...
import android.util.Log; import org.astonbitecode.j4rs.api.invocation.NativeCallbackToRustChannelSupport; import org.astonbitecode.rustkeylock.MainActivity; import org.astonbitecode.rustkeylock.R; import org.astonbitecode.rustkeylock.api.InterfaceWithRust; import org.astonbitecode.rustkeylock.api.JavaEntry; import org....
// Copyright 2017 astonbitecode // This file is part of rust-keylock password manager. // // rust-keylock 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 optio...
ListEntries le = new ListEntries(entries, filter);
3
y1j2x34/spring-influxdb-orm
spring-influxdb-orm/src/main/java/com/vgerbot/orm/influxdb/result/resolver/NativeResultResolver.java
[ "public class InfluxDBException extends RuntimeException {\n\n\tprivate static final long serialVersionUID = -4410268653794610252L;\n\n\tpublic InfluxDBException() {\n\t\tsuper();\n\t}\n\n\tpublic InfluxDBException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}\n\n\tpublic InfluxDBException(Str...
import java.lang.reflect.Array; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.AbstractList; import java.util.AbstractMap; import java.util.ArrayList;...
package com.vgerbot.orm.influxdb.result.resolver; public class NativeResultResolver implements ResultResolver<Object> { @Override
public boolean support(ResultContext context, MethodSignature methodSignature) {
1
loklak/loklak_server
test/org/loklak/api/search/InstagramProfileScraperTest.java
[ "public class InstagramProfileScraper extends BaseScraper {\n\n private static final long serialVersionUID = -3360416757176406604L;\n \n /**\n * instaJsonData is a Pattern object which will be used to match the required pattern\n * with the extracted elements from html page\n */\n private Pa...
import java.io.BufferedReader; import java.io.IOException; import org.junit.Test; import org.loklak.api.search.InstagramProfileScraper; import org.loklak.data.DAO; import org.loklak.http.ClientConnection; import org.json.JSONArray; import org.json.JSONObject; import static org.hamcrest.core.Is.is; import static org.jun...
package org.loklak.api.search; /** * These unit-tests test org.loklak.api.search.InstagramProfileScraper.java */ public class InstagramProfileScraperTest { @Test public void apiPathTest() { InstagramProfileScraper instagramScraper = new InstagramProfileScraper(); assertEquals("/api/instag...
DAO.log("InstagramProfileScraperTest.instagramProfileScraperUserTest() failed to connect to network. url:" + url);
1
testmycode/tmc-intellij
tmc-plugin-intellij/src/main/java/fi/helsinki/cs/tmc/intellij/services/login/LoginManager.java
[ "public final class TmcSettingsManager {\n\n private static final Logger logger = LoggerFactory.getLogger(TmcSettingsManager.class);\n private static final PersistentTmcSettings persistentSettings =\n ServiceManager.getService(PersistentTmcSettings.class);\n\n private TmcSettingsManager() {}\n\n...
import com.google.common.base.Optional; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.ui.Messages; import fi.helsinki.cs.tmc.core.domain.ProgressObserver; import fi.helsinki.cs.tmc.core.exceptions.AuthenticationFailedException; import fi.helsinki.cs.tmc.core.exceptions.ShowToUserExc...
package fi.helsinki.cs.tmc.intellij.services.login; public class LoginManager { private IOException connectionException; private AuthenticationFailedException authenticationException; private static final Logger logger = LoggerFactory.getLogger(LoginManager.class); public boolean login(String pass...
final SettingsTmc settings =
1
mmonkey/Destinations
src/main/java/com/github/mmonkey/destinations/listeners/PlayerListeners.java
[ "public class DestinationsConfig extends Config {\n\n public static final String DATABASE_SETTINGS = \"Database Settings\";\n public static final String COMMAND_SETTINGS = \"Command Settings\";\n\n private static DestinationsConfig instance;\n\n /**\n * DestinationsConfig constructor\n *\n *...
import com.flowpowered.math.vector.Vector3d; import com.github.mmonkey.destinations.configs.DestinationsConfig; import com.github.mmonkey.destinations.entities.BedEntity; import com.github.mmonkey.destinations.entities.LocationEntity; import com.github.mmonkey.destinations.entities.PlayerEntity; import com.github.mmonk...
package com.github.mmonkey.destinations.listeners; public class PlayerListeners { @Listener @IsCancelled(Tristate.FALSE) public void onClientConnectionEventLogin(ClientConnectionEvent.Login event) { Optional<Player> optionalPlayer = event.getTargetUser().getPlayer(); if (optionalPlayer.i...
Sponge.getGame().getEventManager().post(new PlayerTeleportPreEvent(player, player.getLocation(), player.getRotation()));
5
princeofgiri/f-droid
F-Droid/src/org/fdroid/fdroid/AppDetails.java
[ "public static class CommaSeparatedList implements Iterable<String> {\n private String value;\n\n private CommaSeparatedList(String list) {\n value = list;\n }\n\n public static CommaSeparatedList make(List<String> list) {\n if (list == null || list.size() == 0)\n return null;\n...
import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.bluetooth.BluetoothAdapter; import android.content.ContentValues; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageInfo; i...
if (app.litecoinAddr != null) donate.add(Menu.NONE, LITECOIN, 8, R.string.menu_litecoin); if (app.dogecoinAddr != null) donate.add(Menu.NONE, DOGECOIN, 8, R.string.menu_dogecoin); if (app.flattrID != null) donate.add(Menu.NONE, FLATTR, ...
String [] projection = { RepoProvider.DataColumns.ADDRESS };
3
edmcouncil/rdf-toolkit
src/main/java/org/edmcouncil/rdf_toolkit/writer/SortedTurtleWriter.java
[ "public static List<Value> getCollectionMembers(UnsortedTurtleSubjectPredicateObjectMap unsortedTripleMap,\n BNode bnode,\n Class<Value> collectionClass,\n ComparisonContext comp...
import static org.edmcouncil.rdf_toolkit.comparator.ComparisonUtils.getCollectionMembers; import static org.edmcouncil.rdf_toolkit.comparator.ComparisonUtils.isCollection; import static org.edmcouncil.rdf_toolkit.util.Constants.INDENT; import org.eclipse.rdf4j.model.BNode; import org.eclipse.rdf4j.model.IRI; import org...
/* * The MIT License (MIT) * * Copyright (c) 2015 Enterprise Data Management Council * * 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...
protected void writeHeader(Writer out, SortedTurtleObjectList importList, String[] leadingComments)
3
GoogleCloudPlatform/runtime-builder-java
java-runtime-builder-app/src/main/java/com/google/cloud/runtimes/builder/injection/RootModule.java
[ "public interface BuildStepFactory {\n\n MavenBuildStep createMavenBuildStep();\n\n GradleBuildStep createGradleBuildStep();\n\n ScriptExecutionBuildStep createScriptExecutionBuildStep(String buildCommand);\n\n SourceBuildRuntimeImageBuildStep createSourceBuildRuntimeImageStep();\n\n PrebuiltRuntimeImageBuildS...
import java.util.Collections; import java.util.Map; import java.util.Optional; import com.google.cloud.runtimes.builder.buildsteps.base.BuildStepFactory; import com.google.cloud.runtimes.builder.config.AppYamlFinder; import com.google.cloud.runtimes.builder.config.AppYamlParser; import com.google.cloud.runtimes.builder...
/* * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
bind(new TypeLiteral<YamlParser<AppYaml>>(){})
3
sladeware/groningen
src/test/java/org/arbeitspferde/groningen/BaseModuleTest.java
[ "public interface GroningenConfig {\n\n /**\n * Returns the {@link ClusterConfig} with the specified name\n *\n * @param clusterName {@link String} representation of the cluster name for which to retrieve the\n * {@link ClusterConfig}\n * @return A {@link ClusterConfig} if the cluster is present in the e...
import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Provider; import com.google.inject.name.Names; import org.arbeitspferde.groningen.common.BlockScope; import org.arbeitspferde.groningen.common.SystemAdapter; import org.arbeitspferde.groningen.confi...
/* Copyright 2012 Google, 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 to in...
final ExperimentDb experimentDb = injector.getInstance(ExperimentDb.class);
4
bramp/unsafe
unsafe-benchmark/src/main/java/net/bramp/unsafe/MemoryTest.java
[ "public abstract class AbstractListTest {\n protected final Random rand = new Random(0);\n protected int size;\n\n public void setSize(int size) {\n this.size = size;\n }\n\n public void setRandomSeed(long seed) {\n rand.setSeed(seed);\n }\n\n /**\n * Setups the test.\n */\n public abstract void s...
import com.google.common.collect.ImmutableList; import net.bramp.unsafe.collection.AbstractListTest; import net.bramp.unsafe.collection.ArrayListBenchmark; import java.util.List; import static net.bramp.unsafe.MemoryUtils.buildJavaArg; import static net.bramp.unsafe.MemoryUtils.memoryUsage; import static net.bramp.unsa...
package net.bramp.unsafe; /** * Finds out how much memory each benchmark would take. */ public class MemoryTest { static final List<Integer> sizes = ImmutableList.of(4000, 8000, 400000, 800000, 40000000, 80000000); static Process childProcess; /** * Starts the test. * @param args Command line...
List<String> javaArgs = buildJavaArg();
2
ddarriba/jmodeltest2
src/main/java/es/uvigo/darwin/jmodeltest/exe/MultipleDistributor.java
[ "public class ModelTest {\n\n\tprivate ApplicationOptions options = ApplicationOptions.getInstance();\n\n\t/** The MPJ rank of the process. It is only useful if MPJ is running. */\n\tpublic static int MPJ_ME;\n\t/** The MPJ size of the communicator. It is only useful if MPJ is running. */\n\tpublic static int MPJ_S...
import es.uvigo.darwin.jmodeltest.model.Model; import es.uvigo.darwin.jmodeltest.model.ModelComparator; import es.uvigo.darwin.jmodeltest.observer.ProgressInfo; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.List; import java.util.Observable; import javax.manage...
/* Copyright (C) 2011 Diego Darriba, David Posada 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 program is distributed...
if (ModelTest.HOSTS_TABLE != null) {
0
reapzor/FiloFirmata
src/main/java/com/bortbort/arduino/FiloFirmata/Parser/SysexCommandParser.java
[ "public class FirmataHelper {\n\n private final static char[] hexArray = \"0123456789ABCDEF\".toCharArray();\n public static String bytesToHexString(byte... bytes) {\n char[] hexChars = new char[bytes.length * 2];\n for ( int j = 0; j < bytes.length; j++ ) {\n int v = bytes[j] & 0xFF;...
import com.bortbort.arduino.FiloFirmata.FirmataHelper; import com.bortbort.arduino.FiloFirmata.Messages.Message; import com.bortbort.arduino.FiloFirmata.Parser.Builders.SysexCapabilityResponseBuilder; import com.bortbort.arduino.FiloFirmata.Parser.Builders.SysexPinStateResponseBuilder; import com.bortbort.arduino.FiloF...
package com.bortbort.arduino.FiloFirmata.Parser; /** * Firmata Sysex Command Parser. * Handles parsing of a Firmata sysex command message discovered over the SerialPort. * This is essentially a re-implementation of CommandParser, with one extra layer to handle * the padded START_SYSEX and END_SYSEX bytes. */ pub...
new SysexPinStateResponseBuilder()
3
jenshadlich/s3srv
src/main/java/de/jeha/s3srv/operations/objects/CreateObject.java
[ "public class BadDigestException extends Exception {\n\n public BadDigestException(String message) {\n super(message);\n }\n\n}", "public enum ErrorCodes {\n\n ACCESS_DENIED(\n \"AccessDenied\",\n \"Access Denied\",\n 403\n ),\n BAD_DIGEST(\n \"Bad...
import de.jeha.s3srv.common.errors.BadDigestException; import de.jeha.s3srv.common.errors.ErrorCodes; import de.jeha.s3srv.common.http.Headers; import de.jeha.s3srv.common.security.AuthorizationContext; import de.jeha.s3srv.model.S3Object; import de.jeha.s3srv.operations.AbstractOperation; import de.jeha.s3srv.storage....
package de.jeha.s3srv.operations.objects; /** * @author jenshadlich@googlemail.com */ public class CreateObject extends AbstractOperation { private static final Logger LOG = LoggerFactory.getLogger(CreateObject.class); public CreateObject(StorageBackend storageBackend) { super(storageBackend); ...
AuthorizationContext authorizationContext = checkAuthorization(request, resource);
3
junjunguo/PocketMaps
PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/map/Navigator.java
[ "public interface NavigatorListener {\n /**\n * the change on navigator: navigation is used or not\n *\n * @param on\n */\n void onStatusChanged(boolean on);\n \n void onNaviStart(boolean on);\n}", "public class NaviEngine\n{\n /** The DEBUG_SIMULATOR will simulate first generated rou...
import com.graphhopper.PathWrapper; import com.graphhopper.util.Helper; import com.graphhopper.util.Instruction; import com.junjunguo.pocketmaps.R; import com.junjunguo.pocketmaps.model.listeners.NavigatorListener; import com.junjunguo.pocketmaps.navigator.NaviEngine; import com.junjunguo.pocketmaps.navigator.NaviText;...
package com.junjunguo.pocketmaps.map; /** * singleton class * <p/> * Handler navigation information * <p/> * This file is part of PocketMaps * <p/> * Created by GuoJunjun <junjunguo.com> on June 19, 2015. */ public class Navigator { /** * get from MapHandler calculate path */ private PathW...
if (Variable.getVariable().getTravelMode() == Variable.TravelMode.Foot)
4
ruigoncalo/passarola
app/src/main/java/pt/passarola/ui/PlacesPresenter.java
[ "public class MapItems {\n\n private final List<PlaceViewModel> places;\n\n public MapItems(List<PlaceViewModel> places) {\n this.places = places;\n }\n\n public List<PlaceViewModel> getPlaces() {\n return places;\n }\n}", "public class Place {\n\n private String id;\n private S...
import com.squareup.otto.Subscribe; import java.util.ArrayList; import java.util.List; import javax.inject.Inject; import pt.passarola.model.MapItems; import pt.passarola.model.Place; import pt.passarola.model.events.PlacesErrorEvent; import pt.passarola.model.viewmodel.PlaceViewModel; import pt.passarola.model.events....
package pt.passarola.ui; /** * Created by ruigoncalo on 23/10/15. */ public class PlacesPresenter extends Presenter<PlacesPresenterCallback> { @Inject PlaceProvider placeProvider; @Inject BusProvider busProvider; @Inject public PlacesPresenter(){ } public void onStart(PlacesPresenterC...
final List<PlaceViewModel> placeViewModels = PlaceViewModel.createViewModelList(validPlaces);
3
lrscp/ControlAndroidDeviceFromPC
src/com/android/ddmuilib/logcat/LogPanel.java
[ "public interface IDevice {\n\n public final static String PROP_BUILD_VERSION = \"ro.build.version.release\";\n public final static String PROP_BUILD_API_LEVEL = \"ro.build.version.sdk\";\n public final static String PROP_BUILD_CODENAME = \"ro.build.version.codename\";\n\n public final static String PRO...
import com.android.ddmlib.AdbCommandRejectedException; import com.android.ddmlib.IDevice; import com.android.ddmlib.Log; import com.android.ddmlib.Log.LogLevel; import com.android.ddmlib.MultiLineReceiver; import com.android.ddmlib.ShellCommandUnresponsiveException; import com.android.ddmlib.TimeoutException; import co...
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
private final class LogCatOuputReceiver extends MultiLineReceiver {
1
idega/se.idega.idegaweb.commune.accounting
src/java/se/idega/idegaweb/commune/accounting/invoice/business/PaymentThreadHighSchool.java
[ "public interface ExportDataMapping extends IDOEntity {\n\n\t/**\n\t * @see se.idega.idegaweb.commune.accounting.export.data.ExportDataMappingBMPBean#getPrimaryKeyClass\n\t */\n\tpublic Class getPrimaryKeyClass();\n\n\t/**\n\t * @see se.idega.idegaweb.commune.accounting.export.data.ExportDataMappingBMPBean#getOpera...
import java.rmi.RemoteException; import java.sql.Date; import java.util.ArrayList; import java.util.Collection; import se.idega.idegaweb.commune.accounting.export.data.ExportDataMapping; import se.idega.idegaweb.commune.accounting.posting.business.PostingException; import se.idega.idegaweb.commune.accounting.regulation...
package se.idega.idegaweb.commune.accounting.invoice.business; /** * Holds most of the logic for the batchjob that creates the information that * is base for payment data, that is sent to external finance system. * * @author Joakim * * @see se.idega.idegaweb.commune.accounting.invoice.business.PaymentThread...
protected PostingDetail getCheck(RegulationsBusiness regBus, Collection conditions,SchoolClassMember placement) throws RegulationException {
3
neoremind/navi-pbrpc
src/test/java/com/baidu/beidou/navi/pbrpc/client/HAPbrpcClientMainTest.java
[ "public class CallFuture<T> implements Future<T>, Callback<T> {\r\n\r\n /**\r\n * 内部回调用的栅栏\r\n */\r\n private final CountDownLatch latch = new CountDownLatch(1);\r\n\r\n /**\r\n * 调用返回结果\r\n */\r\n private T result = null;\r\n\r\n /**\r\n * 调用错误信息\r\n */\r\n private Throwab...
import com.baidu.beidou.navi.pbrpc.client.callback.CallFuture; import com.baidu.beidou.navi.pbrpc.client.ha.FailOverStrategy; import com.baidu.beidou.navi.pbrpc.client.ha.RandomLoadBalanceStrategy; import com.baidu.beidou.navi.pbrpc.demo.proto.Demo.DemoRequest; import com.baidu.beidou.navi.pbrpc.demo.proto.Demo.DemoRes...
package com.baidu.beidou.navi.pbrpc.client; public class HAPbrpcClientMainTest { public static void main(String[] args) throws Exception { PbrpcClient client = HAPbrpcClientFactory.buildShortLiveConnection("127.0.0.1:8088,1.1.1.1:9999", new RandomLoadBalanceStrategy(new FailOverStrategy(2...
PbrpcMsg msg = new PbrpcMsg();
5
Nilhcem/devfestnantes-2016
app/src/main/java/com/nilhcem/devfestnantes/receiver/reminder/ReminderReceiver.java
[ "@DebugLog\npublic class DevFestApp extends Application {\n\n private AppComponent component;\n\n public static DevFestApp get(Context context) {\n return (DevFestApp) context.getApplicationContext();\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n AndroidThree...
import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.support.v4.app.TaskStackBuilder; import android.support.v7.ap...
package com.nilhcem.devfestnantes.receiver.reminder; @IntentBuilder public class ReminderReceiver extends BroadcastReceiver { @Extra Integer sessionId; @Inject SessionsDao sessionsDao; @Override public void onReceive(Context context, Intent intent) { Timber.d("Received session reminder");...
private void showNotification(Context context, Session session) {
1
julianthome/inmemantlr
inmemantlr-api/src/test/java/TestExternalGrammars.java
[ "public class GenericParser {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(GenericParser.class);\n\n public enum CaseSensitiveType {\n NONE,\n UPPER,\n LOWER\n }\n\n private InmemantlrTool antlr = new InmemantlrTool();\n private DefaultListener listener = new ...
import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.RecognitionException; import org.apache.commons.io.FilenameUtils; import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.snt.inmemantlr.GenericParser; import org.snt.inmemantlr.GenericParser.CaseSe...
"/ZSupport.java"); gp.addUtilityJavaFiles(util1, util2); } catch (FileNotFoundException e) { fail(); } assertNotNull(gp); DefaultTreeListener mdt = new DefaultTreeListener(); assertDoesNotThrow(gp::compile); gp.set...
mparser.setStreamProvider(new CasedStreamProvider(CaseSensitiveType.UPPER));
5
turn/camino
src/test/java/com/turn/camino/render/functions/TimeFunctionsTest.java
[ "public interface Context {\n\n\t/**\n\t * Get system environment\n\t *\n\t * @return system environment\n\t */\n\tEnv getEnv();\n\n\t/**\n\t * Creates child context\n\t *\n\t * @return new context\n\t */\n\tContext createChild();\n\n\t/**\n\t * Gets parent context\n\t *\n\t * Returns a parent context, or null if c...
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import com.turn.camino.Context; import com.turn.camino.Env; import com.turn.camino.render.FunctionCallException; import com.turn.camino.render.TimeTestUtil; import com.turn.camino.render.TimeValue; import java.text.ParseExcepti...
/* * Copyright (C) 2014-2018, Amobee Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
private TimeValue timeValue;
4
beerbong/com_beerbong_zipinst
src/com/beerbong/zipinst/cloud/CloudStorage.java
[ "public interface Core extends Serializable {\n\n public static final String PLUGIN_UI = \"UIPlugin\";\n public static final String PLUGIN_SUPERUSER = \"SuperUserPlugin\";\n public static final String PLUGIN_RECOVERY = \"RecoveryPlugin\";\n public static final String PLUGIN_STORAGE = \"StoragePlugin\";\...
import com.beerbong.zipinst.R; import com.beerbong.zipinst.core.Core; import com.beerbong.zipinst.core.plugins.recovery.RecoveryPlugin; import com.beerbong.zipinst.core.plugins.superuser.SuperUserPlugin; import com.beerbong.zipinst.io.Zip; import com.beerbong.zipinst.io.Zip.ZipCallback; import com.beerbong.zipinst.ui.w...
/* * Copyright 2014 ZipInstaller Project * * This file is part of ZipInstaller. * * ZipInstaller is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) a...
private Core mCore;
0
WSDOT/social-analytics
src/main/java/gov/wa/wsdot/apps/analytics/client/activities/twitter/view/sentiment/SentimentPieChart.java
[ "public interface ClientFactory {\n EventBus getEventBus();\n PlaceController getPlaceController();\n AnalyticsView getAnalyticsView();\n}", "public class DateSubmitEvent extends GenericEvent {\n\n\n private final String dateRange;\n private final String account;\n private final Date startDate;\...
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.JsArray; import com.google.gwt.jsonp.client.JsonpRequestBuilder; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCa...
/* * Copyright (c) 2016 Washington State Department of Transportation * * 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 ver...
static ClientFactory clientFactory;
0
ZinoKader/SpotiQ
app/src/main/java/se/zinokader/spotiq/feature/login/LoginActivity.java
[ "public class ApplicationConstants {\n\n private ApplicationConstants() {}\n\n /* Request codes */\n public static final int LOGIN_INTENT_REQUEST_CODE = 5473;\n public static final int SEARCH_INTENT_REQUEST_CODE = 3125;\n\n /* Time and timing-related */\n public static final int DEFER_SNACKBAR_DEL...
import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.content.Intent; import android.databinding.DataBindingUtil; import android.graphics.BitmapFactory; import android.os.Bundle; import android.os.Handler; import android.support.v4.content.ContextCompat; import android.util...
package se.zinokader.spotiq.feature.login; @RequiresPresenter(LoginPresenter.class) public class LoginActivity extends BaseActivity<LoginPresenter> implements LoginView { ActivityLoginBinding binding; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)...
if (resultCode == SpotifyConstants.RESULT_CODE_AUTHENTICATED) {
2
ZhangJiupeng/AgentX
src/main/java/cc/agentx/server/net/nio/XConnectHandler.java
[ "public class XRequest {\n private Type atyp;\n private String host;\n private int port;\n private int subsequentDataLength;\n private Channel channel = Channel.TCP;\n\n public XRequest(Type atyp, String host, int port, int subsequentDataLength) {\n this.atyp = atyp;\n this.host = ho...
import cc.agentx.protocol.request.XRequest; import cc.agentx.protocol.request.XRequestResolver; import cc.agentx.server.Configuration; import cc.agentx.server.cache.DnsCache; import cc.agentx.util.KeyHelper; import cc.agentx.wrapper.Wrapper; import io.netty.bootstrap.Bootstrap; import io.netty.buffer.ByteBuf; import io...
/* * Copyright 2017 ZhangJiupeng * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
private final XRequestResolver requestResolver;
1
vbauer/jconditions
src/main/java/com/github/vbauer/jconditions/checker/ResourceIsAvailableChecker.java
[ "public class CheckerContext<T> {\n\n private final Object instance;\n private final T annotation;\n\n\n public CheckerContext(final Object instance, final T annotation) {\n this.instance = instance;\n this.annotation = annotation;\n }\n\n\n public Object getInstance() {\n return...
import com.github.vbauer.jconditions.annotation.ResourceIsAvailable; import com.github.vbauer.jconditions.core.CheckerContext; import com.github.vbauer.jconditions.core.ConditionChecker; import com.github.vbauer.jconditions.util.FSUtils; import com.github.vbauer.jconditions.util.NetUtils; import com.github.vbauer.jcond...
package com.github.vbauer.jconditions.checker; /** * @author Vladislav Bauer */ public class ResourceIsAvailableChecker implements ConditionChecker<ResourceIsAvailable> { /** * {@inheritDoc} */ @Override public boolean isSatisfied(final CheckerContext<ResourceIsAvailable> context) throws Ex...
final String source = NetUtils.fixScheme(PropUtils.injectProperties(annotation.source()));
4
xushaomin/apple-deploy
src/main/java/com/appleframework/deploy/service/impl/ProjectServiceImpl.java
[ "@Repository\r\npublic interface ProjectMapper {\r\n\t\r\n int deleteByPrimaryKey(Integer id);\r\n\r\n int insert(ProjectWithBLOBs record);\r\n\r\n int insertSelective(ProjectWithBLOBs record);\r\n\r\n ProjectWithBLOBs selectByPrimaryKey(Integer id);\r\n\r\n int updateByPrimaryKeySelective(ProjectWit...
import java.util.Date; import java.util.List; import javax.annotation.Resource; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Service; import com.appleframework.deploy.dao.ProjectMapper; import com.appleframework.deploy.dao.extend.ProjectExtendMapper; import com.appleframework...
package com.appleframework.deploy.service.impl; @Service("projectService") public class ProjectServiceImpl implements ProjectService { @Resource private ProjectMapper projectMapper; @Resource private ProjectExtendMapper projectExtendMapper; @Resource private TaskService taskService; ...
public Integer save(ProjectWithBLOBs record) throws AppleException {
3
OpenMods/OpenPeripheral-Addons
src/main/java/openperipheral/addons/glasses/drawable/GradientPolygon.java
[ "@ScriptStruct\n@SerializableClass\npublic class ColorPoint2d {\n\n\tpublic static final ColorPoint2d NULL = new ColorPoint2d(0, 0, 0, 0.0f);\n\n\tpublic ColorPoint2d() {}\n\n\tpublic ColorPoint2d(float x, float y, int rgb, float opacity) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.rgb = rgb;\n\t\tthis.opacity = ...
import openperipheral.addons.glasses.utils.ColorPoint2d; import openperipheral.addons.glasses.utils.ColorPointListBuilder; import openperipheral.addons.glasses.utils.GradientPolygonBuilder; import openperipheral.addons.glasses.utils.IPointListBuilder; import openperipheral.addons.glasses.utils.IPolygonBuilder; import o...
package openperipheral.addons.glasses.drawable; @ScriptObject @AdapterSourceName("glasses_gradient_polygon") public class GradientPolygon extends Polygon<ColorPoint2d> { public GradientPolygon() {} public GradientPolygon(ColorPoint2d... points) { super(points); } @Override protected IPointListBuilder<ColorP...
protected IPolygonBuilder<ColorPoint2d> createPolygonBuilder() {
4
maximeflamant/waveplay
src/com/nixus/raop/speaker/airport/Finder.java
[ "public interface Service {\n\n /**\n * Start the Service\n * @param context the ServiceContext for this Service\n */\n public void startService(ServiceContext context);\n\n /**\n * Stop the Service\n * @param context the ServiceContext for this Service (same as was passed into start)\n...
import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import com.nixus.raop.core.Service; import com.nixus.raop.core.ServiceContext; import com.nixus.raop.speaker.Speaker; import com.nixus.raop.zeroconf.ZCServiceInfo; import com.nixus.raop.zeroconf.Ze...
package com.nixus.raop.speaker.airport; public class Finder implements Service, Runnable { private ServiceContext context; private Thread thread; private volatile boolean cancelled; private int delay; private Set<SpeakerRef> all = new HashSet<SpeakerRef>(); public void run() { Set<S...
ZCServiceInfo[] services = zeroconf.list("_raop._tcp", 6000);
3
dvdme/forecastio-lib-java
src/com/github/einstein29/csv/FIOCsvTest.java
[ "public class FIOCurrently {\r\n\r\n\tFIODataPoint currently;\r\n\r\n\tpublic FIOCurrently(ForecastIO fio){\r\n\r\n\t\tthis.currently = null;\r\n\t\tinit(fio);\r\n\r\n\t}\r\n\r\n\tprivate void init(ForecastIO fio){\r\n\r\n\t\tif(fio.hasCurrently()){\r\n\t\t\tthis.currently = new FIODataPoint(fio.getCurrently()); \r...
import com.github.dvdme.ForecastIOLib.FIOCurrently; import com.github.dvdme.ForecastIOLib.FIODaily; import com.github.dvdme.ForecastIOLib.FIOHourly; import com.github.dvdme.ForecastIOLib.FIOMinutely; import com.github.dvdme.ForecastIOLib.ForecastIO;
package com.github.einstein29.csv; public class FIOCsvTest { private static final String apikey = "APIKEY"; public static void main(String[] args) { ForecastIO fio = new ForecastIO(apikey); fio.setUnits(ForecastIO.UNITS_SI); fio.setLang(ForecastIO.LANG_ENGLISH); fio.getForecast("38.7252993" , "-9.150036...
FIOCurrently currently = new FIOCurrently(fio);
0
SamuelGjk/DiyCode
app/src/main/java/moe/yukinoneko/diycode/module/favorites/FavoritesListAdapter.java
[ "public class Topic {\n @SerializedName(\"id\") public int id; // 话题 id\n @SerializedName(\"title\") public String title; // 标题\n @SerializedName(\"created_at\") public Date createdAt; // 创建时间\n @Seri...
import moe.yukinoneko.diycode.R; import moe.yukinoneko.diycode.bean.Topic; import moe.yukinoneko.diycode.list.BaseRecyclerListAdapter; import moe.yukinoneko.diycode.module.topic.details.TopicDetailsActivity; import moe.yukinoneko.diycode.module.user.UserActivity; import moe.yukinoneko.diycode.tool.ImageLoadHelper; impo...
/* * Copyright (c) 2017 SamuelGjk <samuel.alva@outlook.com> * * This file is part of DiyCode * * DiyCode 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 o...
UserActivity.launch(v.getContext(), topic.user.login);
3
logful/logful-api
src/main/java/com/getui/logful/server/parse/GraylogClientService.java
[ "public class GlobalReference {\n\n private static final int MAX_CAPACITY = 1000;\n private HashMap<String, Layout> layoutMap = new HashMap<>();\n\n private static class ClassHolder {\n static GlobalReference instance = new GlobalReference();\n }\n\n public static GlobalReference reference() {...
import com.getui.logful.server.GlobalReference; import com.getui.logful.server.ServerProperties; import com.getui.logful.server.entity.Layout; import com.getui.logful.server.entity.LayoutItem; import com.getui.logful.server.entity.LogMessage; import com.getui.logful.server.mongod.LogMessageRepository; import com.mongod...
package com.getui.logful.server.parse; @Component public class GraylogClientService implements SenderInterface { private static final Logger LOG = LoggerFactory.getLogger(GraylogClientService.class); @Autowired ServerProperties serverProperties; @Autowired LogMessageRepository logMessageReposi...
Layout layout = GlobalReference.getLayout(template);
2
vestrel00/android-dagger-butterknife-mvp
app/src/main/java/com/vestrel00/daggerbutterknifemvp/ui/example_3/parent_fragment/presenter/Example3ParentPresenterImpl.java
[ "public abstract class BasePresenter<T extends MVPView> implements Presenter {\n\n protected final T view;\n\n protected BasePresenter(T view) {\n this.view = view;\n }\n\n @Override\n public void onStart(@Nullable Bundle savedInstanceState) {\n }\n\n @Override\n public void onResume(...
import com.vestrel00.daggerbutterknifemvp.inject.PerFragment; import com.vestrel00.daggerbutterknifemvp.ui.common.presenter.BasePresenter; import com.vestrel00.daggerbutterknifemvp.ui.example_3.parent_fragment.view.Example3ParentView; import com.vestrel00.daggerbutterknifemvp.util.PerActivityUtil; import com.vestrel00....
/* * Copyright 2018 Vandolf Estrellado * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
private final PerActivityUtil perActivityUtil;
2
BruceHurrican/asstudydemo
app/src/main/java/com/bruce/demo/studydata/game/gamepuzzle/PuzzleLoginActivity.java
[ "public abstract class BaseActivity extends Activity {\n private final String TAG = getTAG();\n private Context context;\n private DemoApplication application;\n /**\n * 加载进度等待对话框\n */\n private ProgressDialog pd_waiting;\n private UIHandler mUIHandler;\n private WorkerHandler mWorkerHa...
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.os.Message; import android.view.View; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.AdapterView; import android.widget.Button; import android.wid...
mImageView.startAnimation(animHide); mImageView.setVisibility(View.GONE); mIsShowImg = false; } else { mImageView.startAnimation(animShow); mImageView.setVisibility(View.VISIBLE); mIsS...
int screenWidth = ScreenUtil.getScreenSize(this).widthPixels;
5