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
egetman/ibm-bpm-rest-client
src/main/ru/bpmink/bpm/api/impl/simple/SecuredBpmClient.java
[ "public interface BpmClient extends Closeable {\n\n /**\n * Client for actions on exposed bpm api.\n *\n * @return {@link ru.bpmink.bpm.api.client.ExposedClient}\n */\n ExposedClient getExposedClient();\n\n /**\n * Client for actions on process bpm api.\n *\n * @return {@link ru...
import com.google.common.io.Closeables; import org.apache.http.HttpVersion; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.scheme.PlainSock...
package ru.bpmink.bpm.api.impl.simple; /** * Default (Secure-all) implementation of {@link ru.bpmink.bpm.api.client.BpmClient} which * supports {@link org.apache.http.impl.auth.BasicScheme} authentication. * Need to be carefully rewrite. */ @Immutable @SuppressFBWarnings("JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLA...
public final class SecuredBpmClient implements BpmClient {
0
Archistar/archistar-core
src/main/java/at/ac/ait/archistar/engine/userinterface/ArchistarS3.java
[ "public class FilesystemStorage implements StorageServer {\n\n private boolean connected = false;\n\n private final int internalBFTId;\n\n private final File baseFp;\n\n public FilesystemStorage(int bftId, File baseDir) {\n this.baseFp = baseDir;\n this.internalBFTId = bftId;\n }\n\n ...
import io.netty.channel.nio.NioEventLoopGroup; import java.io.File; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer; import org.jboss.resteasy.spi.ResteasyDeployment; import org....
package at.ac.ait.archistar.engine.userinterface; /** * this bootstrap a local S3 archistar instance containing one archistar * director with an client-side S3/HTTP/Rest interface and four backend-storage * servers utilizing filesystem based storage. * * Note: maybe we should exchange the filesystem based st...
MetadataService metadata = new SimpleMetadataService(serverConfig, distributor, crypto);
7
Kaysoro/KaellyBot
src/main/java/exceptions/NotFoundDiscordException.java
[ "public class AllianceCommand extends AbstractCommand {\n\n private final static String forPseudo = \"text=\";\n private final static String forServer = \"alliance_server_id[]=\";\n\n private DiscordException tooMuchAlliances;\n private DiscordException notFoundAlliance;\n\n public AllianceCommand(){...
import commands.classic.AllianceCommand; import commands.classic.GuildCommand; import commands.classic.ItemCommand; import commands.classic.WhoisCommand; import commands.model.Command; import discord4j.core.object.entity.Message; import enums.AnkamaBug; import enums.Language; import util.Translator;
package exceptions; /** * Created by steve on 14/11/2016. */ public class NotFoundDiscordException implements DiscordException { private String objectKey; public NotFoundDiscordException(String objectKey){ this.objectKey = objectKey; } @Override public void throwException(Message mess...
AnkamaBug bug = null;
5
OpsLabJPL/MarsImagesAndroid
MarsImages/MarsImages/src/main/java/gov/nasa/jpl/hi/marsimages/ui/ImageListActivity.java
[ "public class EvernoteMars {\n\n public static final EvernoteMars EVERNOTE = new EvernoteMars();\n\n private final WifiStateReceiver mWifiStateReceiver = new WifiStateReceiver();\n\n private static final int TIMEOUT = 15000;\n\n private static final String BEGIN_NOTE_LOADING = \"beginNoteLoading\";\n ...
import android.annotation.SuppressLint; import android.content.Intent; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.FragmentTransaction; import android.support.v4.content.LocalBroadcastManager; import android.support.v7.app.ActionBar; imp...
package gov.nasa.jpl.hi.marsimages.ui; public class ImageListActivity extends AppCompatActivity implements ImageListFragment.Callbacks, ActionBar.OnNavigationListener { public static final String STATE_HIDDEN_LIST = "hidden_list"; public static final int IMAGE_LIST_REQUEST_CODE = 105; private...
EVERNOTE.loadMoreImages(this);
3
msdx/AndroidPNClient
androidpn/src/main/java/org/jivesoftware/smack/XMPPConnection.java
[ "public class XmppManager {\r\n\r\n private static final String LOGTAG = LogUtil.makeLogTag(XmppManager.class);\r\n\r\n public static final String XMPP_RESOURCE_NAME = \"AndroidpnClient\";\r\n\r\n private Context context;\r\n\r\n private SharedPreferences sharedPrefs;\r\n\r\n private XMPPConnection c...
import android.util.Log; import org.androidpn.client.LogUtil; import org.androidpn.client.XmppManager; import org.apache.harmony.javax.security.auth.callback.Callback; import org.apache.harmony.javax.security.auth.callback.CallbackHandler; import org.apache.harmony.javax.security.auth.callback.PasswordCallback; import ...
} catch (Throwable ignore) { /* ignore */ } reader = null; } if (writer != null) { try { writer.close(); } catch (Throwable ignore) { /* ignore */ } writer = null; } try { soc...
throw new XMPPException(errorMessage, new XMPPError(
6
rnewson/couchdb-lucene
src/main/java/com/github/rnewson/couchdb/lucene/rhino/RhinoDocument.java
[ "public final class Tika {\n\n public static final Tika INSTANCE = new Tika();\n\n private static final String DC = \"_dc.\";\n\n private static final Logger log = LoggerFactory.getLogger(Tika.class);\n\n private final org.apache.tika.Tika tika = new org.apache.tika.Tika();\n\n private Tika() {\n ...
import java.util.ArrayList; import java.util.Date; import java.util.List; import com.github.rnewson.couchdb.lucene.Tika; import com.github.rnewson.couchdb.lucene.couchdb.Database; import com.github.rnewson.couchdb.lucene.couchdb.FieldType; import com.github.rnewson.couchdb.lucene.couchdb.ViewSettings; import com.github...
/* * Copyright Robert Newson * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
public Document toDocument(final String id, final ViewSettings defaults, final Database database) throws IOException,
3
LaurenceYang/EasyHttp
easy-http-library/src/main/java/com/yang/easyhttp/download/EasyDownloadTask.java
[ "public class EasyCacheType {\n\tpublic static final int CACHE_TYPE_NO_SETTING = -1;\n\tpublic static final int CACHE_TYPE_DEFAULT = 0;\n\tpublic static final int CACHE_TYPE_SHORT = 1;\n\tpublic static final int CACHE_TYPE_MID = 2;\n\tpublic static final int CACHE_TYPE_LONG = 3;\n}", "public class EasyDaoManager ...
import android.os.Handler; import android.os.Looper; import android.os.Message; import android.text.TextUtils; import android.util.Log; import com.yang.easyhttp.cache.EasyCacheType; import com.yang.easyhttp.db.EasyDaoManager; import com.yang.easyhttp.manager.EasyHttpClientManager; import com.yang.easyhttp.utils.EasyIOU...
package com.yang.easyhttp.download; /** * Created by yangy on 2017/2/16. */ public class EasyDownloadTask implements Runnable { private OkHttpClient mClient; private EasyDownloadTaskListener mDownloadTaskListener; private EasyTaskEntity mTaskEntity; private Handler mHandler = new Handler(Looper.getMainLooper...
if (EasyDaoManager.instance().queryWithId(mTaskEntity.getTaskId()) != null) {
1
bkueng/clash_of_balls
src/com/sapos_aplastados/game/clash_of_balls/network/NetworkClient.java
[ "public class Vector {\n\t\n\t// 2D vector\n\tpublic float x;\n\tpublic float y;\n\n\tpublic Vector() {\n\t\tx = 0.0f;\n\t\ty = 0.0f;\n\t}\n\tpublic Vector(Vec2 v) {\n\t\tx = v.x;\n\t\ty = v.y;\n\t}\n\n\tpublic Vector(float fx, float fy) {\n\t\tx = fx;\n\t\ty = fy;\n\t}\n\n\tpublic Vector(Vector src) {\n\t\tx = src...
import com.sapos_aplastados.game.clash_of_balls.network.Networking.AllJoynErrorData; import com.sapos_aplastados.game.clash_of_balls.network.Networking.ConnectedClient; import com.sapos_aplastados.game.clash_of_balls.network.Networking.NetworkData; import java.io.ByteArrayInputStream; import java.io.DataInputStream; im...
/* * Copyright (C) 2012-2013 Hans Hardmeier <hanshardmeier@gmail.com> * Copyright (C) 2012-2013 Andrin Jenal * Copyright (C) 2012-2013 Beat Küng <beat-kueng@gmx.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
m_network_error = new AllJoynErrorData();
4
zhao-mingjian/qvod
app/src/main/java/com/zmj/qvod/presenter/RankingListPresenter.java
[ "public class HotMovieBean implements Serializable {\n\n\n private int count;\n private int start;\n private int total;\n private String title;\n private List<SubjectsBean> subjects;\n\n public int getCount() {\n return count;\n }\n\n public void setCount(int count) {\n this.co...
import android.support.annotation.NonNull; import android.support.v7.widget.LinearLayoutManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RelativeLayout; import com.jude.beam.expansion.list.BeamListFragmentPresenter; import com.jude.easyrecyclerv...
package com.zmj.qvod.presenter; /** * Created by matt on 2017/3/30. */ public class RankingListPresenter extends BeamListFragmentPresenter<RankingListFragment, HotMovieBean.SubjectsBean> implements View.OnClickListener { private Subscription rxSubscription; @Override protected void onCreateView(@N...
.compose(RxUtil.rxSchedulerHelper())
3
zetbaitsu/CodePolitan
app/src/main/java/id/zelory/codepolitan/data/database/DataBaseHelper.java
[ "public enum BenihScheduler\n{\n HARVEST;\n private final Observable.Transformer newThread;\n private final Observable.Transformer io;\n private final Observable.Transformer computation;\n\n BenihScheduler()\n {\n newThread = new Observable.Transformer()\n {\n @Override\n ...
import rx.Observable; import android.database.Cursor; import com.squareup.sqlbrite.BriteDatabase; import com.squareup.sqlbrite.SqlBrite; import java.util.ArrayList; import java.util.List; import id.zelory.benih.util.BenihScheduler; import id.zelory.codepolitan.BuildConfig; import id.zelory.codepolitan.CodePolitanApplic...
/* * Copyright (c) 2015 Zelory. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
public Observable<List<Article>> getBookmarkedArticles()
2
mjeanroy/node-maven-plugin
src/test/java/com/github/mjeanroy/maven/plugins/node/mojos/AbstractNpmMojoTest.java
[ "public class Command {\n\n\t/**\n\t * Command executable file, this executable will be run on operating system.\n\t */\n\tprivate final String executable;\n\n\t/**\n\t * Optional arguments (each arguments will be unique).\n\t */\n\tprivate final List<CommandArg> arguments;\n\n\t/**\n\t * Create new command providi...
import java.io.File; import static com.github.mjeanroy.maven.plugins.node.tests.FileTestUtils.absolutePath; import static com.github.mjeanroy.maven.plugins.node.tests.ReflectTestUtils.readPrivate; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org...
/** * The MIT License (MIT) * * Copyright (c) 2015-2021 Mickael Jeanroy * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights t...
verify_command_executable(mojo, absolutePath("/usr/bin/yarn"), "yarn");
3
piyell/NeteaseCloudMusic
app/src/main/java/com/zsorg/neteasecloudmusic/fragments/PlayListFragment.java
[ "public class LineItemDecorator extends RecyclerView.ItemDecoration {\n\n private static LineItemDecorator lineItemDecorator;\n private int dimension;\n private boolean isDrawHorizontal=false;\n private boolean isDrawVertical=true;\n\n public LineItemDecorator() {\n super();\n }\n\n publ...
import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.zsorg.neteaseclou...
package com.zsorg.neteasecloudmusic.fragments; public class PlayListFragment extends Fragment implements IPlaylistView, OnItemCLickListener { private PlaylistAdapter mAdapter; private PlaylistPresenter mPresenter; public PlayListFragment() { } @SuppressWarnings("unused") public static Pl...
MusicListActivity.startMusicList(getContext(), bean.getName(),mPresenter.loadPlaylist((int) bean.getDuration()));
2
valdasraps/esj
client/src/main/java/lt/emasina/esj/model/RequestResponseOperation.java
[ "public interface ResponseReceiver {\r\n\r\n\tpublic void onResponseReturn(Message msg);\r\n\t\r\n\tpublic void onErrorReturn(Exception ex);\r\n\t\r\n}\r", "public class ExceptionMessage extends Exception {\n\n private final TcpCommand command;\n private final String message;\n\n /**\n * Constructor ...
import lt.emasina.esj.ResponseReceiver; import lt.emasina.esj.message.ExceptionMessage; import lt.emasina.esj.tcp.TcpCommand; import lt.emasina.esj.tcp.TcpConnection; import lt.emasina.esj.tcp.TcpPackage; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
package lt.emasina.esj.model; /** * Operation * * @author Stasys * @param <F> Forward (to send) message * @param <B> Backward (to receive on success) message */ public abstract class RequestResponseOperation<F extends Message, B extends Message> extends RequestOperation<F> { private static final Logger lo...
public void setResponsePackage(TcpPackage pckg) {
4
BoD/irondad
src/main/java/org/jraf/irondad/handler/pixgame/PixGameHandler.java
[ "public class Config {\n\n public static final boolean LOGD = true;\n\n}", "public class Constants {\n public static final String TAG = \"irondad/\";\n\n public static final String PROJECT_FULL_NAME = \"BoD irondad\";\n public static final String PROJECT_URL = \"https://github.com/BoD/irondad\";\n ...
import java.io.IOException; import java.io.RandomAccessFile; import java.util.List; import java.util.Locale; import org.apache.commons.lang3.StringUtils; import org.jraf.irondad.Config; import org.jraf.irondad.Constants; import org.jraf.irondad.handler.CommandHandler; import org.jraf.irondad.handler.HandlerContext; imp...
/* * This source is part of the * _____ ___ ____ * __ / / _ \/ _ | / __/___ _______ _ * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / * /___/ * repository. * * Copyright (C) 2013 Benoit 'BoD' Lubek (BoD@JRAF.org) * * This library is free sof...
HandlerContext handlerContext) throws Exception {
3
glenrobson/SimpleAnnotationServer
src/main/java/uk/org/llgc/annotation/store/servlets/oa/Update.java
[ "public interface StoreAdapter {\n\n\tpublic void init(final AnnotationUtils pAnnoUtils);\n\n // CRUD annotations\n\tpublic Annotation addAnnotation(final Annotation pJson) throws IOException, IDConflictException, MalformedAnnotation;\n\tpublic Annotation updateAnnotation(final Annotation pJson) throws IOExcepti...
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import java.io.IOException; i...
package uk.org.llgc.annotation.store.servlets.oa; public class Update extends HttpServlet { protected static Logger _logger = LogManager.getLogger(Update.class.getName()); protected AnnotationUtils _annotationUtils = null; protected StoreAdapter _store = null; public void init(final ServletConfig pConfig) ...
Encoder tEncoder = StoreConfig.getConfig().getEncoder();
1
ReactiveX/RxJavaJoins
src/main/java/rx/joins/operators/OperatorJoinPatterns.java
[ "public abstract class ActivePlan0 {\n protected final Map<JoinObserver, JoinObserver> joinObservers = new HashMap<JoinObserver, JoinObserver>();\n\n protected abstract void match();\n\n protected void addJoinObserver(JoinObserver joinObserver) {\n joinObservers.put(joinObserver, joinObserver);\n ...
import rx.joins.Pattern2; import rx.joins.Plan0; import rx.subscriptions.CompositeSubscription; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import rx.Observable; import rx.Observable.OnSubscribe; import rx.Observer; import rx.Subscriber; im...
/** * Copyright 2014 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
final Map<Object, JoinObserver> externalSubscriptions = new HashMap<Object, JoinObserver>();
1
jordw/heftydb
src/test/java/com/jordanwilliams/heftydb/test/performance/table/file/TableBloomFilterPerformance.java
[ "public class Key implements Comparable<Key> {\n\n private final ByteBuffer data;\n private final long snapshotId;\n\n public Key(ByteBuffer data, long snapshotId) {\n this.data = data;\n this.snapshotId = snapshotId;\n }\n\n public ByteBuffer data() {\n return data;\n }\n\n ...
import com.google.common.hash.BloomFilter; import com.google.common.hash.Funnel; import com.google.common.hash.PrimitiveSink; import com.jordanwilliams.heftydb.data.Key; import com.jordanwilliams.heftydb.data.Value; import com.jordanwilliams.heftydb.state.Paths; import com.jordanwilliams.heftydb.table.file.TableBloomFi...
/* * Copyright (c) 2014. Jordan Williams * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
Paths paths = ConfigGenerator.testPaths();
5
I8C/sonar-flow-plugin
sonar-flow-plugin/src/main/java/be/i8c/codequality/sonar/plugins/sag/webmethods/flow/visitor/check/QualifiedNameCheck.java
[ "public class FlowLanguage extends AbstractLanguage {\r\n\r\n public static final String KEY = \"flow\";\r\n public static final String NAME = \"flow\";\r\n\r\n private static Configuration config;\r\n\r\n public FlowLanguage(Configuration config) {\r\n super(KEY, NAME);\r\n FlowLanguage.config = config;\...
import java.util.regex.Pattern; import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.PropertyType; import org.sonar.api.resources.Qualifiers; import org.sonar.api.rules.RuleType; import org.sonar.check.Priority; import org.sonar.check.Rule; import org....
/* * i8c * Copyright (C) 2016 i8c NV * mailto:contact AT i8c DOT be * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option...
@FlowCheckProperty(category = FlowLanguageProperties.FLOW_CATEGORY,
1
Lzw2016/fastdfs-java-client
src/test/java/org/cleverframe/fastdfs/client/DefaultTrackerClientTest.java
[ "public class DefaultCommandExecutor implements CommandExecutor {\n /**\n * 日志\n */\n private static final Logger logger = LoggerFactory.getLogger(DefaultCommandExecutor.class);\n\n /**\n * Tracker定位\n */\n private TrackerLocator trackerLocator;\n\n /**\n * 连接池\n */\n priva...
import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig; import org.cleverframe.fastdfs.conn.DefaultCommandExecutor; import org.cleverframe.fastdfs.model.GroupState; import org.cleverframe.fastdfs.model.StorageNode; import org.cleverframe.fastdfs.model.StorageNodeInfo; import org.cleverframe.fastdfs.model.Sto...
package org.cleverframe.fastdfs.client; /** * 作者:LiZW <br/> * 创建时间:2016/11/21 16:59 <br/> */ public class DefaultTrackerClientTest { /** * 日志 */ private static final Logger logger = LoggerFactory.getLogger(DefaultTrackerClientTest.class); private static ConnectionPool connectionPool; pr...
DefaultCommandExecutor commandExecutor = new DefaultCommandExecutor(trackerSet, connectionPool);
0
spearal/spearal-java
src/test/java/org/spearal/test/TestProxyBean.java
[ "public class DefaultSpearalFactory implements SpearalFactory {\n\t\n\tprivate final SpearalContextImpl context;\n\t\n\tpublic DefaultSpearalFactory() {\n\t\tthis(true);\n\t}\n\t\n\tpublic DefaultSpearalFactory(boolean loadServices) {\n\t\t\n\t\tcontext = new SpearalContextImpl();\n\t\t\n\t\t// Reflection / Securit...
import org.spearal.configuration.AliasStrategy; import org.spearal.configuration.PartialObjectFactory.PartialObjectProxy; import org.spearal.configuration.PartialObjectFactory.UndefinedPropertyException; import org.spearal.test.model.ProxyBean; import org.spearal.test.model.SimpleBean; import java.io.ByteArrayInputStre...
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * 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/...
if (!(result instanceof PartialObjectProxy))
5
memfis19/Annca
app/src/main/java/io/github/memfis19/sample/CustomCameraActivity.java
[ "public final class AnncaConfiguration {\n\n public static final int MEDIA_QUALITY_AUTO = 10;\n public static final int MEDIA_QUALITY_LOWEST = 15;\n public static final int MEDIA_QUALITY_LOW = 11;\n public static final int MEDIA_QUALITY_MEDIUM = 12;\n public static final int MEDIA_QUALITY_HIGH = 13;\...
import android.app.Activity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RelativeLayout; import android.widget.Toast; import io.github.memfis19.annca.internal.configuration.AnncaConfiguration; import io.github.memfis19.annca.internal.configuration.C...
package io.github.memfis19.sample; /** * Created by memfis on 2/7/17. */ public class CustomCameraActivity extends AnncaCameraActivity<Integer> { private static final int REQUEST_CODE = 404; @AnncaConfiguration.MediaAction private static final int PHOTO = AnncaConfiguration.MEDIA_ACTION_PHOTO; ...
public CameraController<Integer> createCameraController(CameraView cameraView, ConfigurationProvider configurationProvider) {
2
annefried/sitent
de.uni-saarland.coli.sitent/src/main/java/sitent/syntSemFeatures/io/FeatureExtractionPipeline.java
[ "public class SyntSemFeaturesCSVWriter extends JCasAnnotator_ImplBase {\n\n\tpublic static final String PARAM_OUTPUT_FOLDER = \"outputFolder\";\n\t@ConfigurationParameter(name = PARAM_OUTPUT_FOLDER, mandatory = true, defaultValue = \"null\", description = \"Output folder for CSV with extracted features (in standoff...
import static org.apache.uima.fit.factory.CollectionReaderFactory.createReader; import static org.apache.uima.fit.pipeline.SimplePipeline.runPipeline; import java.io.File; import java.io.IOException; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cl...
package sitent.syntSemFeatures.io; /** * This class contains a configuration of a UIMA pipeline that extracts the * syntactic-semantic features as described in the ACL 2015 paper. * Running this will take a while as parsing is included. */ public class FeatureExtractionPipeline { private static String wordN...
NounPhraseFeaturesAnnotator.class, NounPhraseFeaturesAnnotator.PARAM_COUNTABILITY_PATH,
1
FlareBot/FlareBot
src/main/java/stream/flarebot/flarebot/commands/moderation/mod/ModlogCommand.java
[ "public enum CommandType {\n\n GENERAL(true),\n MODERATION(true),\n MUSIC(true),\n USEFUL(false),\n CURRENCY(false),\n RANDOM(false),\n INFORMATIONAL(false),\n SECRET(false, Constants.DEVELOPER_ID),\n INTERNAL(false, Constants.ADMINS_ID, Constants.CONTRIBUTOR_ID, Constants.DEVELOPER_ID);\...
import net.dv8tion.jda.core.Permission; import net.dv8tion.jda.core.entities.Member; import net.dv8tion.jda.core.entities.Message; import net.dv8tion.jda.core.entities.TextChannel; import net.dv8tion.jda.core.entities.User; import org.apache.commons.lang3.text.WordUtils; import stream.flarebot.flarebot.commands.Command...
.getTitle()) + "`", channel, sender); return; } else { MessageUtils.sendErrorMessage("Error disabling event (Probably already disabled)", channel, sender); return; } ...
new PagedEmbedBuilder<>(PaginationUtil.splitStringToList(sb.toString(), PaginationUtil.SplitMethod.CHAR_COUNT, 1024))
5
mleoking/LeoTask
leotask/src/core/org/leores/util/data/Statistics.java
[ "public class JGnuplot extends Logger {\r\n\tpublic Integer id;\r\n\tpublic String style, style2d, style3d, header;\r\n\tpublic String plot2d, plot2dBar, plot3d, plotDensity, plotImage, multiplot, plotx;\r\n\tpublic String beforeStyle, beforeStyleVar, afterStyleVar, afterStyle, beforeHeader, extra, afterHeader, bp;...
import java.io.FileWriter; import java.io.Serializable; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Pattern; import org.leores.plot.JGnuplot; i...
members.remove(i); i--; } else { if (stati.keyVar == null) { stati.keyVar = keyVar; } if (stati.valVar == null) { stati.valVar = valVar; } if (stati.valid == null) { stati.valid = valid; } if (stati.parVars == null) { stati.parVars = parVars; ...
UniqueHashList<String> ulSMethods = new UniqueHashList<String>();
5
PeteGoo/tcSlackBuildNotifier
tcslackbuildnotifier-web-ui/src/main/java/slacknotifications/teamcity/extension/SlackNotificationIndexPageController.java
[ "public final class TeamCityIdResolver {\n\n\tprivate static final Logger LOGGER = Logger.getLogger(TeamCityIdResolver.class.getName());\n\n\tprivate TeamCityIdResolver(){}\n\t\n\tpublic static String getBuildTypeId(SBuildType buildType){\n\t\ttry {\n\t\t\treturn buildType.getExternalId();\n\t\t} catch (NoSuchMetho...
import jetbrains.buildServer.controllers.BaseController; import jetbrains.buildServer.serverSide.SBuildServer; import jetbrains.buildServer.serverSide.SBuildType; import jetbrains.buildServer.serverSide.SProject; import jetbrains.buildServer.serverSide.auth.Permission; import jetbrains.buildServer.serverSide.settings.P...
package slacknotifications.teamcity.extension; public class SlackNotificationIndexPageController extends BaseController { private static final String SHOW_FURTHER_READING = "ShowFurtherReading"; private static final String SLACK_NOTIFICATIONS = "slackNotifications"; private static final String NO_SLACK_NOTIF...
List<SlackNotificationConfig> configs = projSettings.getBuildSlackNotificationsAsList(sBuildType);
4
FlareBot/FlareBot
src/main/java/stream/flarebot/flarebot/commands/secret/internal/DebugCommand.java
[ "public class Events extends ListenerAdapter {\n\n public static final ThreadGroup COMMAND_THREADS = new ThreadGroup(\"Command Threads\");\n private static final ExecutorService COMMAND_POOL = Executors.newFixedThreadPool(4, r ->\n new Thread(COMMAND_THREADS, r, \"Command Pool-\" + COMMAND_THREADS....
import com.arsenarsen.lavaplayerbridge.player.Player; import com.arsenarsen.lavaplayerbridge.player.Track; import net.dv8tion.jda.core.EmbedBuilder; import net.dv8tion.jda.core.entities.Member; import net.dv8tion.jda.core.entities.Message; import net.dv8tion.jda.core.entities.TextChannel; import net.dv8tion.jda.core.en...
package stream.flarebot.flarebot.commands.secret.internal; public class DebugCommand implements InternalCommand { @Override public void onCommand(User sender, GuildWrapper guild, TextChannel channel, Message message, String[] args, Member member) { if (args.length < 1) { MessageUtils.sen...
Getters.getConnectedVoiceChannels(),
3
digitalfondue/jfiveparse
src/main/java/ch/digitalfondue/jfiveparse/TreeConstructorAftersBeforeInitialInHead.java
[ "static final byte CHARACTER = 0;", "static final byte COMMENT = 1;", "static final byte DOCTYPE = 2;", "static final byte END_TAG = 4;", "static final byte EOF = 3;", "static final byte START_TAG = 5;", "static void genericRCDataParsing(TreeConstructor treeConstructor) {\n treeConstructor.insertHtml...
import static ch.digitalfondue.jfiveparse.TreeConstructor.CHARACTER; import static ch.digitalfondue.jfiveparse.TreeConstructor.COMMENT; import static ch.digitalfondue.jfiveparse.TreeConstructor.DOCTYPE; import static ch.digitalfondue.jfiveparse.TreeConstructor.END_TAG; import static ch.digitalfondue.jfiveparse.TreeCons...
handleEndTagHtml(tagName, treeConstructor); break; case START_TAG: handleStartTagHtml(tagName, treeConstructor); break; } } private static void handleStartTagHtml(String tagName, TreeConstructor treeConstructor) { if ("html".equals(tagName...
genericRawTextElementParsing(treeConstructor);
7
apache/geronimo-gshell
gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/JavaCommand.java
[ "public interface Command\n{\n /** Standard command success status code. */\n int SUCCESS = 0;\n\n /** Standard command failure status code. */\n int FAILURE = -1;\n\n String getName();\n\n void init(CommandContext context); // throws Exception ?\n\n Object execute(Object... args) throws Except...
import java.lang.reflect.Method; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.geronimo.gshell.command.Command; import org.apache.geronimo.gshell.command.CommandSupport; import org.apache.geronimo.gshell.command.MessageSo...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
protected boolean processCommandLine(final CommandLine line) throws CommandException {
3
hellojavaer/ddal
ddal-ddr/src/main/java/org/hellojavaer/ddal/ddr/shard/rule/SpelShardRouteRule.java
[ "public class ShardRouteRuleExpressionContext {\n\n private static final Map<String, Object> systemVariables = new HashMap<>();\n\n private static final ThreadLocal<LinkedList<Context>> STACK = new ThreadLocal<LinkedList<Context>>() {\n\n ...
import org.hellojavaer.ddal.ddr.expression.ShardRouteRuleExpressionContext; import org.hellojavaer.ddal.ddr.expression.el.spel.DDRSpelEvaluationContext; import org.hellojavaer.ddal.ddr.shard.RangeShardValue; import org.hellojavaer.ddal.ddr.shard.ShardRouteInfo; import org.hellojavaer.ddal.ddr.shard.ShardRouteRule; impo...
/* * Copyright 2017-2018 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 ap...
this.scRouteRuleExpression = parser.parseExpression(scRouteRule, DDRSpelEvaluationContext.PARSER_CONTEXT);
1
yyxhdy/ManyEAs
src/jmetal/problems/Golinski.java
[ "public abstract class Problem implements Serializable {\n\n\t/**\n\t * Defines the default precision of binary-coded variables\n\t */\n\tprivate final static int DEFAULT_PRECISSION = 16;\n\n\t/**\n\t * Stores the number of variables of the problem\n\t */\n\tprotected int numberOfVariables_;\n\n\t/**\n\t * Stores t...
import jmetal.core.Problem; import jmetal.core.Solution; import jmetal.encodings.solutionType.BinaryRealSolutionType; import jmetal.encodings.solutionType.RealSolutionType; import jmetal.util.JMException;
// Golinski.java // // Author: // Antonio J. Nebro <antonio@lcc.uma.es> // Juan J. Durillo <durillo@lcc.uma.es> // // Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public Li...
solutionType_ = new BinaryRealSolutionType(this) ;
2
aw20/MongoWorkBench
src/org/aw20/mongoworkbench/eclipse/view/MJavaScriptView.java
[ "public class EventWorkBenchManager extends Object {\n\tprivate static EventWorkBenchManager thisInst;\n\t\n\tpublic static synchronized EventWorkBenchManager getInst(){\n\t\tif ( thisInst == null )\n\t\t\tthisInst = new EventWorkBenchManager();\n\n\t\treturn thisInst;\n\t}\n\n\tprivate Set<EventWorkBenchListener>\...
import org.aw20.mongoworkbench.command.MongoCommand; import org.aw20.util.MSwtUtil; import org.eclipse.jface.action.Action; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.layout.FormAttachment; ...
/* * MongoWorkBench is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * Free Software Foundation,version 3. * * MongoWorkBench is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implie...
MongoFactory.getInst().registerListener(this);
2
kpavlov/fixio
core/src/main/java/fixio/netty/codec/FixMessageEncoder.java
[ "public class FixConst {\n\n public static final ZoneId DEFAULT_ZONE_ID = ZoneOffset.UTC;\n\n public static final String DATE_PATTERN = \"yyyyMMdd\";\n //\n public static final String TIME_PATTERN_SECONDS = \"HH:mm:ss\";\n public static final String TIME_PATTERN_MILLIS = \"HH:mm:ss.SSS\";\n public...
import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.List; import fixio.fixprotocol.FixConst; import fixio.fixprotocol.FixMessageBuilder; import fixio.fixprotocol.FixMessageFragment; import fixio.fixprotocol.FixMessageHeader; import fixio.fixprotocol.Group; import fixio.fixprotoco...
/* * Copyright 2014 The FIX.io Project * * The FIX.io Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
for (Group c : groupField.getValue()) {
3
handexing/geekHome
geekHome-web-ui/src/main/java/com/geekhome/controller/CommentController.java
[ "public enum ErrorCode {\n\t\n\tEXCEPTION(\"程序异常\", \"00001\"),\n\tUSER_NOT_EXIST(\"用户未注册\", \"00002\"),\n VERIFY_CODE_WRONG(\"验证码错误\",\"00003\"),\n OLD_PWD_WRONG(\"旧密码错误\",\"00004\"),\n USERNAME_PASSWORD_WRONG(\"用户名或密码错误\",\"00005\"),\n TODAY_HAVE_SIGN(\"今日已签到\",\"00006\");\n\n\tprivate String errorMsg...
import java.util.Date; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.Re...
package com.geekhome.controller; @RestController @RequestMapping("comment") public class CommentController { Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired CommentService commentService; @Autowired CommentDao commentDao; @Autowired
UserDao userDao;
6
dotcool/coolreader
src/com/dotcool/reader/task/DownloadFileTask.java
[ "public class Constants {\n\n\t// public static final String BaseURL = \"http://www.baka-tsuki.org/project/\";\n\tpublic static final String BASE_URL_HTTPS = \"http://fiction.icoolxue.com/index.php\";\n\tpublic static final String BASE_URL = \"http://fiction.icoolxue.com/index.php\";\n\tpublic static final String B...
import java.io.BufferedInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.net.URLConnection; import java.net.URLDecoder; import java.util.Date; import android.os.AsyncTask; import android.preference.PreferenceManag...
package com.dotcool.reader.task; public class DownloadFileTask extends AsyncTask<URL, Integer, AsyncTaskResult<ImageModel>> { private static final String TAG = DownloadFileTask.class.toString(); private ICallbackNotifier notifier = null; public DownloadFileTask(ICallbackNotifier notifier) { super(); this.n...
String decodedUrl = Util.sanitizeFilename(URLDecoder.decode(filepath));
7
pimps/ysoserial-modified
src/main/java/ysoserial/payloads/Jdk7u21.java
[ "public class CmdExecuteHelper {\n\t\n\tprivate String terminalType;\n\t\n\tprivate String[] commandArray;\n\t\n\tprivate String command;\n\n\tpublic CmdExecuteHelper(String terminalType, String command) {\n\t\tsuper();\n\t\tthis.terminalType = terminalType;\n\t\tthis.command = command;\n\t\t\n\t\tswitch (terminalT...
import java.lang.reflect.InvocationHandler; import java.util.HashMap; import java.util.LinkedHashSet; import javax.xml.transform.Templates; import ysoserial.payloads.annotation.Dependencies; import ysoserial.payloads.annotation.PayloadTest; import ysoserial.payloads.util.CmdExecuteHelper; import ysoserial.payloads.util...
package ysoserial.payloads; /* Gadget chain that works against JRE 1.7u21 and earlier. Payload generation has the same JRE version requirements. See: https://gist.github.com/frohoff/24af7913611f8406eaf3 Call tree: LinkedHashSet.readObject() LinkedHashSet.add() ... TemplatesImpl.hashCode() (X) Lin...
final Object templates = Gadgets.createTemplatesImpl(cmdHelper.getCommandArray());
1
open-erp-systems/erp-backend
erp-library/src/main/java/com.jukusoft/erp/lib/context/AppContext.java
[ "public interface CacheManager {\n\n /**\n * get instance of cache\n *\n * @param cacheName name of cache\n *\n * @return instance of cache or null, if cache doesnt exists\n */\n public ICache getCache (String cacheName);\n\n /**\n * get instance of cache or create an new one, if ...
import com.hazelcast.core.HazelcastInstance; import com.jukusoft.erp.lib.cache.CacheManager; import com.jukusoft.erp.lib.database.DatabaseManager; import com.jukusoft.erp.lib.logging.ILogging; import com.jukusoft.erp.lib.message.request.ApiRequest; import com.jukusoft.erp.lib.permission.PermissionManager; import com.ju...
package com.jukusoft.erp.lib.context; public interface AppContext { public Vertx getVertx (); public ILogging getLogger (); /** * get hazelcast instance * * @return instance of hazelcast */ public HazelcastInstance getHazelcast (); /** * get instance of session manager ...
public DatabaseManager getDatabaseManager ();
1
domoinc/domo-java-sdk
domo-java-sdk-all/src/test/java/com/domo/sdk/streams/ExecutionAbortExample.java
[ "public class ExampleBase {\n\n protected DomoClient client;\n\n @Before\n public void setup() {\n Config config = Config.with()\n .clientId(\"MY_CLIENT_ID\")\n .clientSecret(\"MY_CLIENT_SECRET\")\n .apiHost(\"api.domo.com\")\n .useHttps(true)\n .scope(US...
import com.domo.sdk.ExampleBase; import com.domo.sdk.datasets.model.Column; import com.domo.sdk.datasets.model.CreateDataSetRequest; import com.domo.sdk.datasets.model.Schema; import com.domo.sdk.streams.model.Execution; import com.domo.sdk.streams.model.Stream; import com.domo.sdk.streams.model.StreamRequest; import c...
package com.domo.sdk.streams; public class ExecutionAbortExample extends ExampleBase { @Test public void streamClient_smokeTest() throws IOException { StreamClient sdsClient = client.streamClient(); //Build DataSet to populate the create stream request CreateDataSetRequest ds = new CreateDataSet...
sdsRequest.setUpdateMethod(UpdateMethod.APPEND);
7
janoliver/pOT-Droid
src/main/java/com/mde/potdroid/parsers/BookmarkParser.java
[ "public class Utils {\n\n // the logcat tag\n public static final String LOG_TAG = \"pOT Droid\";\n // some URLs.\n public static final String BASE_URL = \"https://forum.mods.de/bb/\";\n public static final String ASYNC_URL = \"async/\";\n public static final int NETWORK_NONE = 0;\n public stat...
import android.sax.*; import android.util.Xml; import com.mde.potdroid.helpers.Utils; import com.mde.potdroid.models.Board; import com.mde.potdroid.models.Bookmark; import com.mde.potdroid.models.Post; import com.mde.potdroid.models.Topic; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.s...
package com.mde.potdroid.parsers; /** * An XML Handler class to parse the API XML code of the bookmarks.php. A little bit messy, * but a long stare at the code should make it clear. */ public class BookmarkParser extends DefaultHandler { public static String TAG = "bookmark"; public static String NOT_LO...
private Topic mCurrentTopic;
4
R2RML-api/R2RML-api
r2rml-api-jena-binding/src/test/java/jenaTest/Simplest_Test.java
[ "public class JenaR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static JenaR2RMLMappingManager INSTANCE = new JenaR2RMLMappingManager(new JenaRDF());\n\n private JenaR2RMLMappingManager(JenaRDF rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod...
import org.apache.jena.rdf.model.ModelFactory; import eu.optique.r2rml.api.model.LogicalTable; import eu.optique.r2rml.api.model.ObjectMap; import eu.optique.r2rml.api.model.PredicateMap; import eu.optique.r2rml.api.model.PredicateObjectMap; import eu.optique.r2rml.api.model.SubjectMap; import eu.optique.r2rml.ap...
/******************************************************************************* * Copyright 2013, the Optique Consortium * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http...
Collection<TriplesMap> coll = mm.importMappings(m);
8
turoDog/KTalk
app/src/main/java/com/turo/ktalk/controller/fragment/ContactListFragment.java
[ "public class ChatActivity extends FragmentActivity {\n\n private String mHxid;\n private EaseChatFragment easeChatFragment;\n private LocalBroadcastManager mLocalBroadcastManager;\n private int mChatType;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.support.v4.content.LocalBroadcastManager; import android.view.ContextMenu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterVie...
package com.turo.ktalk.controller.fragment; /** * Created by YQ950209 on 2017/4/24. */ //联系人列表界面 public class ContactListFragment extends EaseContactListFragment { private ImageView iv_contact_red; private LocalBroadcastManager mLocalBroadcastManager; private LinearLayout ll_contact_invite; priva...
List<UserInfo> contacts = new ArrayList<UserInfo>();
5
ktisha/Crucible4IDEA
src/com/jetbrains/crucible/ui/toolWindow/details/DetailsPanel.java
[ "@SuppressWarnings(\"ComponentNotRegistered\")\npublic class AddCommentAction extends AnActionButton implements DumbAware {\n\n private final Editor myEditor;\n private final Review myReview;\n private final boolean myIsReply;\n @Nullable private final FilePath myFilePath;\n\n public AddCommentAction(@NotNull ...
import com.intellij.icons.AllIcons; import com.intellij.ide.BrowserUtil; import com.intellij.ide.impl.TypeSafeDataProviderAdapter; import com.intellij.ide.util.PropertiesComponent; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.SimpleToolWindowPan...
package com.jetbrains.crucible.ui.toolWindow.details; /** * User: ktisha * <p/> * Show changes and general comments for review */ public class DetailsPanel extends SimpleToolWindowPanel { private static final String GENERAL_COMMENTS_VISIBILITY_PROPERTY = "CodeReview.GeneralComments.Visible"; private static ...
CrucibleBundle.message("crucible.add.comment"), false);
5
ZSCNetSupportDept/WechatTicketSystem
src/main/java/love/sola/netsupport/wechat/handler/SubmitHandler.java
[ "public class Attribute {\n\n public static final String AUTHORIZED = \"authorized\";\n public static final String WECHAT = \"wechat\";\n public static final String OPERATOR = \"operator\";\n public static final String USER = \"user\";\n\n}", "@Entity\n@Table(name = \"users\")\npublic class User {\n\n...
import me.chanjar.weixin.mp.bean.WxMpXmlMessage; import me.chanjar.weixin.mp.bean.WxMpXmlOutMessage; import me.chanjar.weixin.mp.bean.WxMpXmlOutNewsMessage; import me.chanjar.weixin.mp.bean.outxmlbuilder.NewsBuilder; import static love.sola.netsupport.config.Lang.format; import static love.sola.netsupport.config.Lang.l...
/* * This file is part of WechatTicketSystem. * * WechatTicketSystem is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * *...
item.setUrl(format("User_Submit_Link", session.getId(), u.getName(), u.getIsp().id, u.getRoom(), u.getBlock(), u.getPhone()));
7
klieber/phantomjs-maven-plugin
phantomjs-maven-core/src/test/java/com/github/klieber/phantomjs/resolve/ResolverFactoryTest.java
[ "public interface Archive {\n String getUrl();\n String getExtension();\n\tString getArchiveName();\n\tString getPathToExecutable();\n\tString getVersion();\n\tString getClassifier();\n}", "@Named\npublic class ArchiveFactory {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(ArchiveFactory.cla...
import com.github.klieber.phantomjs.test.MockPhantomJsBinary; import org.junit.ClassRule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import java.util.Collections; import static org.assertj.core.api.Asserti...
/*- * #%L * PhantomJS Maven Core * %% * Copyright (C) 2013 - 2017 Kyle Lieber * %% * 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 th...
private Archive archive;
0
tedgueniche/IPredict
src/ca/ipredict/controllers/ComparePrediction.java
[ "public class Item implements Comparable<Item> {\n\n\tpublic Integer val;\n\t\n\tpublic Item(Integer value) {\n\t\tval = value;\n\t}\n\t\n\t@Override\n\tpublic Item clone() {\n\t\treturn new Item(val);\n\t}\n\t\n\tpublic Item() {\n\t\tval = -1;\n\t}\n\t\t\n\tpublic String toString() {\n\t\treturn val.toString();\n\...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import ca.ipredict.database.Item; import ca.ipredict.database.Sequence; import ca.ipredict.predictor.Predictor; import ca.ipredict.predictor.CPT.CPTPlus.CPTPlusPredictor; import ca.ipredict.predictor.DG.DGPredictor; import ca.ipredict.predicto...
package ca.ipredict.controllers; /** * This controller demonstrates how to train multiple models and compare * their predictions */ public class ComparePrediction { public static void main(String...args) { //Initializing the predictors
HashMap<String, Predictor> predictors = new HashMap<String, Predictor>();
2
Trilarion/java-vorbis-support
examples/src/main/java/com/github/trilarion/vorbis/jcraft/JOrbisPlayer.java
[ "public class Packet {\n\n private static final Logger LOG = Logger.getLogger(Packet.class.getName());\n\n /**\n *\n */\n public byte[] packet_base;\n\n /**\n *\n */\n public int packet;\n\n /**\n *\n */\n public int bytes;\n\n /**\n *\n */\n public int b_o...
import java.applet.AppletContext; import java.awt.BorderLayout; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStrea...
/* * Copyright (C) 2000 ymnk * 2013 Trilarion * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later versi...
Block vb;
4
lob/lob-java
src/main/java/com/lob/net/ResponseGetter.java
[ "public class Lob {\n\n public static final String API_BASE_URL = \"https://api.lob.com/v1/\";\n public static final String VERSION = \"7.0.0\";\n\n public static String apiKey;\n public static String apiVersion;\n\n public static void init(final String apiKey) {\n Lob.apiKey = apiKey;\n ...
import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import com.lob.Lob; import com.lob.exception.APIException; import com.lob.exception.AuthenticationException; import com.lob.exception.InvalidRequ...
package com.lob.net; public class ResponseGetter implements IResponseGetter { private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ISO_INSTANT.withZone(ZoneId.of("UTC")); private static final ObjectMapper MAPPER = new ObjectMapper() .registerModule(new JavaTimeModule()) ...
RequestOptions options) throws AuthenticationException, APIException, RateLimitException, InvalidRequestException, IOException {
4
cwan/im-log-stats
im-log-stats-project/src/test/java/net/mikaboshi/intra_mart/tools/log_stats/parser/RequestLogParserTest.java
[ "public enum Level {\n\n\tTRACE,\n\tDEBUG,\n\tINFO,\n\tWARN,\n\tERROR;\n\n\tpublic static Level toEnum(String s) {\n\n\t\tif (s == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\ts = s.trim().toUpperCase();\n\n\t\tif (\"INFO\".equals(s)) {\n\t\t\treturn INFO;\n\t\t} else if (\"ERROR\".equals(s)) {\n\t\t\treturn ERROR;\n\...
import static org.junit.Assert.assertEquals; import java.io.File; import java.text.SimpleDateFormat; import net.mikaboshi.intra_mart.tools.log_stats.entity.Level; import net.mikaboshi.intra_mart.tools.log_stats.entity.RequestLog; import net.mikaboshi.intra_mart.tools.log_stats.parser.LogLayoutDefinitions; import ...
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * d...
LogLayoutDefinitions.getStandardRequestLogLayout(Version.V72));
5
bitkylin/BitkyShop
Android/bitkyShop/app/src/main/java/cc/bitky/bitkyshop/fragment/categrayfragment/SubCategoryActivity.java
[ "public class CommodityDetailActivity extends AppCompatActivity {\n\n private TextView textTitle;\n private TextView textPrice;\n private TextView textDetail;\n private SimpleDraweeView draweeView;\n private TextView textFirstCategory;\n private TextView textSecondCategory;\n private Commodity commodity;\n ...
import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.GridLayoutManager; import a...
package cc.bitky.bitkyshop.fragment.categrayfragment; public class SubCategoryActivity extends AppCompatActivity { Context mContext; private ToastUtil toastUtil; private SubCategrayActivityPresenter presenter; private MaterialRefreshLayout swipeRefreshLayout; private KyBaseRecyclerAdapter recyclerAdapter...
public void setDataToViewHolder(final Commodity dataItem, KyBaseViewHolder holder) {
7
trigor74/travelers-diary
app/src/main/java/com/travelersdiary/activities/MainActivity.java
[ "public class BusProvider {\n\n private static volatile Bus instance;\n\n private BusProvider() {\n }\n\n public static Bus bus() {\n Bus localInstance = instance;\n if (localInstance == null) {\n synchronized (AndroidBus.class) {\n localInstance = instance;\n ...
import android.app.ActivityManager; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.suppor...
package com.travelersdiary.activities; public class MainActivity extends BaseActivity { public static final String TRAVELS_LIST_FRAGMENT_TAG = "TRAVELS_LIST_FRAGMENT_TAG"; public static final String DIARY_LIST_FRAGMENT_TAG = "DIARY_LIST_FRAGMENT_TAG"; public static final String REMINDER_LIST_FRAGMENT_TA...
private DiaryListFragment mDiaryListFragment;
1
codereligion/bugsnag-logback
src/main/java/com/codereligion/bugsnag/logback/Converter.java
[ "public class EventVO {\n\n /**\n * A unique identifier for a user affected by this event.\n */\n private String userId;\n\n /**\n * The version number of the application which generated the error.\n */\n private String appVersion;\n\n /**\n * The operating system version of the c...
import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.classic.spi.IThrowableProxy; import ch.qos.logback.classic.spi.StackTraceElementProxy; import com.codereligion.bugsnag.logback.model.EventVO; import com.codereligion.bugsnag.logback.model.ExceptionVO; import com.codereligion.bugsnag.logback.model.Me...
/** * Copyright 2014 www.codereligion.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
public NotificationVO convertToNotification(final ILoggingEvent loggingEvent) {
3
lingganhezi/dedecmsapp
android/myapp/src/com/lingganhezi/myapp/ui/activity/EditorDialogActivity.java
[ "public class Constant {\n\tpublic final static boolean DEBUG = true;\n\tpublic final static String DEBUG_USER_ID = \"453333657@qq.com\";\n\tpublic final static String DEBUG_USER_PWD = \"chenzipeng\";\n\n\t/**\n\t * 服务器配置\n\t */\n\tpublic final static String SERVER_HOST = \"www.lingganhezi.com\";\n\tpublic final st...
import java.io.Serializable; import java.util.Arrays; import java.util.Date; import com.lingganhezi.myapp.Constant; import com.lingganhezi.myapp.R; import com.lingganhezi.myapp.PlaceProvider.PlaceColumns; import com.lingganhezi.myapp.entity.Place; import com.lingganhezi.myapp.service.UserService; import com.lingganhezi...
Date date = new Date(); if (dateData != null && dateData instanceof Date) { date = (Date) dateData; } handleRequestDate(date); break; case TYPE_PLACE: handleRequestPlace(intent.getIntExtra(KEY_PLACE, 0)); break; case TYPE_SEX: handleRequestSex(intent.getIntExtra(KEY_SEX, Constant.SEX_MAN...
CursorLoader loader = new CursorLoader(EditorDialogActivity.this, Constant.CONTENT_URI_PLACE_PROVIDER, null, PlaceColumns.REID
1
kanjielu/jeeves
src/main/java/com/cherry/jeeves/service/WechatHttpService.java
[ "@JsonIgnoreProperties(ignoreUnknown = true)\npublic class ChatRoomDescription {\n @JsonProperty\n private String UserName;\n @JsonProperty\n private String ChatRoomId = \"\";\n\n public String getUserName() {\n return UserName;\n }\n\n public void setUserName(String userName) {\n ...
import com.cherry.jeeves.domain.response.*; import com.cherry.jeeves.domain.shared.ChatRoomDescription; import com.cherry.jeeves.domain.shared.Contact; import com.cherry.jeeves.enums.StatusNotifyCode; import com.cherry.jeeves.exception.WechatException; import com.cherry.jeeves.utils.WechatUtils; import org.springframew...
package com.cherry.jeeves.service; @Component public class WechatHttpService { @Autowired private WechatHttpServiceInternal wechatHttpServiceInternal; @Autowired private CacheService cacheService; /** * Log out * * @throws IOException if logout fails */ public void logou...
wechatHttpServiceInternal.statusNotify(cacheService.getHostUrl(), cacheService.getBaseRequest(), userName, StatusNotifyCode.READED.getCode());
2
njustesen/hero-aicademy
src/ui/InputController.java
[ "public class GameState {\n\t\n\tpublic static int TURN_LIMIT = 100;\n\tpublic static boolean RANDOMNESS = false;\n\tpublic static int STARTING_AP = 3;\n\tpublic static int ACTION_POINTS = 5;\n\t\n\tprivate static final int ASSAULT_BONUS = 300;\n\tprivate static final double INFERNO_DAMAGE = 350;\n\tprivate static ...
import game.GameState; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.util.ArrayList; import java.util.List; import model.Position; import model.Unit; import action.Action; i...
package ui; public class InputController implements MouseListener, KeyListener, MouseMotionListener { private final boolean humanP1; private final boolean humanP2; private final int gridX; private final int gridY; private final int squareSize; public GameState state; public Position activeSquare;
public List<Action> possibleActions;
3
simon816/ChatUI
src/main/java/com/simon816/chatui/group/ChatGroupTab.java
[ "public interface PlayerChatView {\r\n\r\n public Player getPlayer();\r\n\r\n public TopWindow getWindow();\r\n\r\n public boolean showWindow(TopWindow window);\r\n\r\n public boolean removeShownWindow();\r\n\r\n public void update();\r\n\r\n public boolean handleIncoming(Text message);\r\n\r\n ...
import com.simon816.chatui.lib.PlayerChatView; import com.simon816.chatui.lib.PlayerContext; import com.simon816.chatui.tabs.Tab; import com.simon816.chatui.ui.AnchorPaneUI; import com.simon816.chatui.ui.LineFactory; import com.simon816.chatui.ui.UIComponent; import com.simon816.chatui.ui.table.TableUI; import c...
package com.simon816.chatui.group; class ChatGroupTab extends Tab { boolean createGroup; final ChatGroupFeature feature; public ChatGroupTab(ChatGroupFeature feature, PlayerChatView view, AnchorPaneUI root) { super(Text.of("Chat Groups"), root); this.feature = feature;
root.addChildren(new TableUI(feature.getTable(), new GroupListRenderer(view, feature)));
6
jazdw/jnaCan
netty/src/net/jazdw/jnacan/netty/tp20/Tp20Channel.java
[ "public final class Tp20ChannelOption {\n\tprivate static final Class<Tp20ChannelOption> T = Tp20ChannelOption.class;\n\t\n public static final ChannelOption<Integer> RECEIVE_TIMEOUT = valueOf(T, \"RECEIVE_TIMEOUT\");\n public static final ChannelOption<Tp20ApplicationType> APPLICATION_TYPE = valueOf(T, \"APP...
import io.netty.channel.ChannelException; import io.netty.channel.ChannelMetadata; import io.netty.channel.ChannelOption; import io.netty.channel.ChannelOutboundBuffer; import io.netty.channel.EventLoop; import io.netty.channel.oio.AbstractOioMessageChannel; import io.netty.util.internal.StringUtil; import java.io.IOEx...
/* * Copyright (C) 2014 Jared Wiltshire. All rights reserved. * @author Jared Wiltshire */ package net.jazdw.jnacan.netty.tp20; /** * Netty 5.0 channel implementation for VW Transport Protocol 2.0 * * Copyright (C) 2014 Jared Wiltshire. All rights reserved. * @author Jared Wiltshire */ public class Tp20Ch...
Tp20ChannelConnect connectRequest = new Tp20ChannelConnect();
6
dmfs/xmlobjects
src/org/dmfs/xmlobjects/builder/IObjectBuilder.java
[ "public final class ElementDescriptor<T>\n{\n\tpublic final static XmlContext DEFAULT_CONTEXT = new XmlContext()\n\t{\n\t};\n\n\t/**\n\t * The {@link QualifiedName} of this element.\n\t */\n\tpublic final QualifiedName qualifiedName;\n\n\t/**\n\t * An {@link IObjectBuilder} for elements of this type.\n\t */\n\tpubl...
import java.io.IOException; import org.dmfs.xmlobjects.ElementDescriptor; import org.dmfs.xmlobjects.QualifiedName; import org.dmfs.xmlobjects.pull.ParserContext; import org.dmfs.xmlobjects.pull.XmlObjectPullParserException; import org.dmfs.xmlobjects.serializer.SerializerContext; import org.dmfs.xmlobjects.serializer....
/* * Copyright (C) 2014 Marten Gajda <marten@dmfs.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
public void writeChildren(ElementDescriptor<T> descriptor, T object, IXmlChildWriter childWriter, SerializerContext context) throws SerializerException,
7
bafomdad/realfilingcabinet
com/bafomdad/realfilingcabinet/helpers/UpgradeHelper.java
[ "public interface IFilingCabinet extends ITileEntityProvider {\n\n\tpublic void leftClick(TileEntity tile, EntityPlayer player);\n\t\n\tpublic void rightClick(TileEntity tile, EntityPlayer player, EnumFacing side, float hitX, float hity, float hitZ);\n}", "public interface IUpgrades {\n\n\tpublic boolean canApply...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import com.bafomdad.realfilingcabinet.api.IFilingCabinet; import com.bafomdad.realfilingcabinet.api.IUpgrades; import com.bafomdad.real...
package com.bafomdad.realfilingcabinet.helpers; public class UpgradeHelper { private static Map<ItemStack, String> upgrades = new HashMap<ItemStack, String>(); /** * Put this in init phase or sometime after you've registered all your items. Stack must implement IUpgrades, and tag must not be empty. * @para...
if (upgrade.getItem() == RFCItems.upgrades && upgrade.getItemDamage() == ItemUpgrades.UpgradeType.ENDER.ordinal())
3
wakaleo/maven-schemaspy-plugin
src/main/java/net/sourceforge/schemaspy/view/HtmlTablePage.java
[ "public class Config\r\n{\r\n private static Config instance;\r\n private final List<String> options;\r\n private Map<String, String> dbSpecificOptions;\r\n private Map<String, String> originalDbSpecificOptions;\r\n private boolean helpRequired;\r\n private boolean dbHelpRequired;\r\n private F...
import java.io.File; import java.io.IOException; import java.text.NumberFormat; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.TreeSet; import net.sourceforge.schemaspy.Config; import net.sourceforge.schemaspy.model.D...
/* * This file is a part of the SchemaSpy project (http://schemaspy.sourceforge.net). * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 John Currier * * SchemaSpy is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by th...
for (TableIndex index : table.getIndexes()) {
3
fhissen/CrococryptFile
CrococryptFile/main/org/crococryptfile/suites/pbeaes/PBE1AESMain.java
[ "public abstract class Suite {\r\n\tprivate SuiteMODE mode;\r\n\tprivate StatusUpdate status;\r\n\tprivate boolean initialized = false;\r\n\t\r\n\tprotected Suite(){}\r\n\t\r\n\tpublic final void init(SuiteMODE mode, HashMap<SuitePARAM, Object> params, StatusUpdate status) throws IllegalArgumentException{\r\n\t\tif...
import java.io.InputStream; import java.io.OutputStream; import java.util.HashMap; import org.crococryptfile.suites.Suite; import org.crococryptfile.suites.SuiteMODE; import org.crococryptfile.suites.SuitePARAM; import org.fhissen.crypto.CipherMain; import org.fhissen.crypto.CryptoCodes; import org.fhissen.cryp...
package org.crococryptfile.suites.pbeaes; public class PBE1AESMain extends Suite { private int ATTRIBUTE_ITERATIONCOUNT; private byte[] ATTRIBUTE_SALT = new byte[CryptoCodes.STANDARD_SALTSIZE]; private byte[] ATTRIBUTE_KEY = new byte[CryptoCodes.AES_KEYSIZE]; private byte[] ATTRIBUTE_IV = new byte[C...
CryptoUtils.kill(pw);
6
Mangopay/cardregistration-android-kit
mangopay/src/main/java/com/mangopay/android/sdk/domain/service/CardServiceImpl.java
[ "public enum ErrorCode {\n\n VALIDATION(\"sdk-validation\"),\n SERVER_ERROR(\"server-error\"),\n SDK_ERROR(\"sdk-error\"),\n\n MISSING_FIELD_ERROR(\"105201\"),\n CARD_NUMBER_FORMAT_ERROR(\"105202\"),\n EXPIRY_DATE_FORMAT_ERROR(\"105203\"),\n CVV_FORMAT_ERROR(\"105204\");\n\n private String id;\n\n ErrorCod...
import com.mangopay.android.sdk.model.ErrorCode; import com.mangopay.android.sdk.model.exception.MangoException; import com.mangopay.android.sdk.util.JsonUtil; import com.mangopay.android.sdk.util.PrintLog; import com.mangopay.android.sdk.util.TextUtil; import java.io.BufferedReader; import java.io.BufferedWriter; impo...
package com.mangopay.android.sdk.domain.service; /** * Simple service implementation */ public class CardServiceImpl implements CardService { @SuppressWarnings("unchecked") @Override public void post(String mURL, List<AbstractMap.SimpleEntry<String, String>> params, String acce...
MangoException error = JsonUtil.getMangoError(callback, response.toString());
1
murielK/AndroidWPTemplate
app/src/main/java/hr/mk/wpmagazine/android/component/ui/fragments/FeedsFragment.java
[ "public class ConnectivityUtils {\n\n private ConnectivityUtils() {\n }\n\n public static boolean isOnline(final Context context) {\n final ConnectivityManager connectivity = (ConnectivityManager) context.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivi...
import hr.mk.wpmagazine.android.component.activities.FeedViewerActivity; import hr.mk.wpmagazine.android.component.services.UpdaterService; import hr.mk.wpmagazine.model.ObjectParcel; import hr.mk.wpmagazine.model.WP.WPPost; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Null...
/* * * * * * * **************************************************************************** * * * Copyright (c) 2015. Muriel Kamgang Mabou * * * All rights reserved. * * * * * * This file is part of project AndroidWPTemplate. * * * It can not be copied and/or distributed without the * * * expres...
final WPPost wpPost = realmResults.get(position);
6
spotify/spydra
spydra/src/main/java/com/spotify/spydra/submitter/executor/OnPremiseExecutor.java
[ "public static final String JOB_TYPE_HADOOP = \"hadoop\";", "public static final String OPTION_CLASS = \"class\";", "public static final String OPTION_JAR = \"jar\";", "public static final String OPTION_PROPERTIES = \"properties\";", "public class ProcessHelper {\n private static final Logger LOGGER = Logg...
import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import jdk.nashorn.tools.Shell; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static com.spotify.spydra.model.SpydraArgument.JOB_TYPE_HADOOP; import static com.spotify.spydra.model.SpydraArgument.OP...
/*- * -\-\- * Spydra * -- * Copyright (C) 2016 - 2018 Spotify AB * -- * 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 * * Unles...
metrics = MetricsFactory.getInstance();
6
monapu/monacoinj-multibit
core/src/test/java/com/google/bitcoin/store/WalletProtobufSerializerTest.java
[ "public enum ConfidenceType {\n /** If BUILDING, then the transaction is included in the best chain and your confidence in it is increasing. */\n BUILDING(1),\n\n /**\n * If PENDING, then the transaction is unconfirmed and should be included shortly, as long as it is being\n * announced and is cons...
import com.google.bitcoin.core.*; import com.google.bitcoin.core.TransactionConfidence.ConfidenceType; import com.google.bitcoin.params.MainNetParams; import com.google.bitcoin.params.UnitTestParams; import com.google.bitcoin.script.ScriptBuilder; import com.google.bitcoin.utils.BriefLogFormatter; import com.google.bit...
/** * Copyright 2012 Google Inc. * Copyright 2014 Andreas Schildbach * * 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...
Block genesisBlock = MainNetParams.get().getGenesisBlock();
1
DistantEye/EP_Utilities
EclipsePhaseLifePath/src/com/github/distanteye/ep_utils/commands/AddAptCommand.java
[ "public class ConditionalBuilder {\r\n\r\n\t/**\r\n\t * Returns appropriate subclass of Conditional based on the input provided \r\n\t * @param input Validly formated conditional. Should still contain the command and ? or ! prefix\r\n\t * @param Command that contains the calling conditional\r\n\t * @return Conditio...
import com.github.distanteye.ep_utils.commands.conditionals.ConditionalBuilder; import com.github.distanteye.ep_utils.containers.Aptitude; import com.github.distanteye.ep_utils.containers.EpCharacter; import com.github.distanteye.ep_utils.core.CharacterEnvironment; import com.github.distanteye.ep_utils.core.Utils;
package com.github.distanteye.ep_utils.commands; /** * Command of following syntax types: * addApt(<aptitudeName>,<value>) (can also be used to subtract with a negative value) * addApt(<aptitudeName>,<value>,<conditional) (the three parameter version throw an error if the conditional isn't true) * ...
if (Aptitude.exists(subparts[1]) || isUncertain(subparts[1]))
1
FIRST-Team-2557-The-SOTABots/FRC_Robot
Robot/src/main/java/org/usfirst/frc/team2557/robot/OI.java
[ "public class MoveArmToAngleCommand extends Command {\n\n private PIDController _controller;\n\n private double _value;\n\n public MoveArmToAngleCommand(double potentiometerValue) {\n this._value = potentiometerValue;\n requires(Robot.arm);\n\n this._controller = new PIDController(0.3,...
import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.buttons.JoystickButton; import edu.wpi.first.wpilibj.command.Command; import org.usfirst.frc.team2557.robot.commands.arm.MoveArmToAngleCommand; import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall; import org.usfirst.frc.team2557.rob...
package org.usfirst.frc.team2557.robot; /** * This class is the glue that binds the controls on the physical operator * interface to the commands and command groups that allow control of the robot. */ public class OI { // public Joystick driver; //Gamepad // // public JoystickButton driverA; // public JoystickButt...
manipulatorLB.whileHeld(new IntakeOutCommand());
6
txusballesteros/Android-Clean-Testing
app/src/test/java/com/txusballesteros/testing/presentation/MainPresenterUnitTest.java
[ "@RunWith(JUnit4.class)\n@SmallTest\npublic abstract class UnitTest {\n @Before\n public final void setup() {\n initializeMocks();\n onSetup();\n }\n\n private void initializeMocks() {\n MockitoAnnotations.initMocks(this);\n }\n\n protected abstract void onSetup();\n}", "pub...
import org.junit.Test; import org.mockito.Mock; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import java.util.List; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doReturn...
/* * Copyright Txus Ballesteros 2016 (@txusballesteros) * * This file is part of some open source application. * * 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 copyrig...
@Mock ImageModelMapper mapperMock;
4
serialx/kkma
src/org/snu/ids/ha/tools/TesterGUI.java
[ "public class Dictionary\n{\n\t/**\n\t * <pre>\n\t * </pre>\n\t * @since\t2008. 02. 14\n\t * @author\ttherocks\n\t */\n\tpublic static final String DIC_ROOT = getDicRoot();\n\n\t/**\n\t * <pre>\n\t * 사전 저장 경로를 읽어들인다.\n\t * </pre>\n\t * @author\ttherocks\n\t * @since\t2007. 6. 28\n\t * @return\n\t */\n\tprivate stat...
import java.awt.BorderLayout; import java.awt.Container; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.PrintWriter; import java.util.Comparator;...
public MAPanel() { this.setLayout(new BorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); JPanel topButtonPanel = new JPanel(new BorderLayout()); topButtonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); inputText = new JTextField(); topButtonPanel.add(in...
KeywordList keywordList = null;
3
simo415/spc
src/com/sijobe/spc/command/Explode.java
[ "public abstract class Parameter {\n\n private String label;\n private boolean optional;\n private boolean variableLength;\n \n public Parameter(String label, boolean optional) {\n this.label = label;\n this.optional = optional;\n }\n \n public Parameter(String label, boolean optional, boo...
import com.sijobe.spc.validation.Parameter; import com.sijobe.spc.validation.ParameterDouble; import com.sijobe.spc.validation.ParameterInteger; import com.sijobe.spc.validation.Parameters; import com.sijobe.spc.wrapper.CommandException; import com.sijobe.spc.wrapper.CommandSender; import com.sijobe.spc.wrapper.Coordin...
package com.sijobe.spc.command; /** * Creates an explosion of the specified size * * @author simo_415 * @version 1.0 */ @Command ( name = "explode", description = "Sets off an explosion in your current location.", example = "10", videoURL = "http://www.youtube.com/watch?v=rWOpPWYjjxY" ) public clas...
new ParameterInteger("[SIZE]",true),
2
hpdcj/PCJ
src/main/java/org/pcj/internal/message/get/ValueGetResponseMessage.java
[ "public final class InternalGroup extends InternalCommonGroup implements Group {\n\n private final int myThreadId;\n private final ValueGetStates valueGetStates;\n private final ValuePutStates valuePutStates;\n private final ValueAccumulateStates valueAccumulateStates;\n private final AsyncAtStates a...
import java.io.IOException; import java.io.WriteAbortedException; import java.nio.channels.SocketChannel; import java.util.logging.Level; import org.pcj.internal.InternalGroup; import org.pcj.internal.InternalPCJ; import org.pcj.internal.NodeData; import org.pcj.internal.PcjThread; import org.pcj.internal.message.Messa...
/* * Copyright (c) 2011-2021, PCJ Library, Marek Nowicki * All rights reserved. * * Licensed under New BSD License (3-clause license). * * See the file "LICENSE" for the full license governing this code. */ package org.pcj.internal.message.get; /** * @author Marek Nowicki (faramir@mat.umk.pl) */ public class...
NodeData nodeData = InternalPCJ.getNodeData();
1
daquexian/chaoli-forum-for-android-2
app/src/main/java/com/daquexian/chaoli/forum/view/AnswerQuestionsActivity.java
[ "public class ChaoliApplication extends Application {\n private static Context appContext;\n @Override\n public void onCreate() {\n super.onCreate();\n // train classifier on app start\n CodeProcessor.init(this);\n ChaoliApplication.appContext = getApplicationContext();\n ...
import android.app.Activity; import android.app.ProgressDialog; import android.databinding.DataBindingUtil; import android.databinding.Observable; import android.databinding.ObservableBoolean; import android.support.v7.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.Di...
package com.daquexian.chaoli.forum.view; /** * 注册时显示问题、回答问题的Activity * Created by jianhao on 16-3-28. */ public class AnswerQuestionsActivity extends BaseActivity { Context mContext; Boolean isFirst = true;
AnswerQuestionsVM viewModel;
3
callistaenterprise/blog-non-blocking-rest-service-with-spring-mvc
spring-mvc-asynch/src/main/java/se/callista/springmvc/asynch/pattern/routingslip/nonblocking/statemachine/RoutingSlipNonBlockingStateMachineController.java
[ "public class DeferredResultStateMachineCallback implements StateMachineCallback {\n\n private DeferredResult deferredResult;\n\n public DeferredResultStateMachineCallback(DeferredResult deferredResult) {\n this.deferredResult = deferredResult;\n }\n\n @Override\n public void onCompleted(State...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.context.request.async.DeferredResult; import se.callista.springmvc.asynch.common.deferredresult.Defe...
package se.callista.springmvc.asynch.pattern.routingslip.nonblocking.statemachine; @RestController public class RoutingSlipNonBlockingStateMachineController { private LogHelper LOG; @Autowired private RoutingSlipNonBlockingConfiguration configuration; @Autowired private StateMachine stateMachi...
Iterator<Processor> processingSteps = configuration.getProcessingSteps();
3
snowleo/BleedingMobs
src/main/java/me/snowleo/bleedingmobs/commands/set/type/ParticleLife.java
[ "public interface IBleedingMobs extends Plugin\n{\n\tStorage getStorage();\n\n\tboolean isWorldEnabled(World world);\n\n\tboolean isSpawning();\n\n\tvoid setSpawning(boolean set);\n\n\tSettings getSettings();\n\n\tvoid restartTimer();\n\n\tBloodStreamTask getTimer();\n\n\tboolean isParticleItem(final UUID uuid);\n}...
import me.snowleo.bleedingmobs.IBleedingMobs; import me.snowleo.bleedingmobs.commands.AbstractTypeCommand; import me.snowleo.bleedingmobs.commands.parser.FromToIntegerParser; import me.snowleo.bleedingmobs.commands.parser.LowerBoundIntegerParser; import me.snowleo.bleedingmobs.particles.ParticleType; import org.bukkit....
/* * BleedingMobs - make your monsters and players bleed * * Copyright (C) 2011-2012 snowleo * * 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...
ParticleLife(final EntityType type, final IBleedingMobs plugin)
0
Bernardo-MG/repository-pattern-java
src/test/java/com/wandrell/pattern/test/integration/repository/access/hsqldb/springjdbc/ITQueryHsqldbSpringJdbcRepository.java
[ "public class PersistenceContextPaths {\n\n /**\n * Eclipselink JPA persistence.\n */\n public static final String ECLIPSELINK = \"classpath:context/persistence/jpa-eclipselink.xml\";\n\n /**\n * Hibernate JPA persistence.\n */\n public static final String HIBERNATE = \"classpath:context...
import com.wandrell.pattern.test.util.config.properties.DatabaseScriptsPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.JdbcPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.PersistenceProviderPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.QueryPr...
/** * The MIT License (MIT) * <p> * Copyright (c) 2015 the original author or authors. * <p> * 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 limi...
RepositoryPropertiesPaths.SPRING_JDBC, TestPropertiesPaths.ENTITY,
5
kontalk/desktopclient-java
src/main/java/org/kontalk/model/message/MessageContent.java
[ "public final class Coder {\n private static final Logger LOGGER = Logger.getLogger(Coder.class.getName());\n\n private Coder() {\n }\n\n /**\n * Encryption status of a message.\n * Do not modify, only add! Ordinal used in database.\n */\n public enum Encryption {NOT, ENCRYPTED, DECRYPTED...
import java.net.URI; import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Collections; import java.util.EnumSet; import java.util.List; import java.util.Map; import java.util.Observable; import java.util.Optional; import java.util.logging.Level; import java....
.preview(preview) .groupCommand(groupCommand) .decryptedContent(decryptedContent).build(); } catch(ClassCastException ex) { LOGGER.log(Level.WARNING, "can't parse JSON message content", ex); return plainText(""); } }...
public void setErrors(EnumSet<Coder.Error> errors) {
0
blinkfox/zealot
src/test/java/com/blinkfox/zealot/test/handler/UserIdEmailHandler.java
[ "public final class BuildSource {\n\n /** xml文件对应的命名空间. */\n private String nameSpace;\n\n /** SQL拼接信息. */\n private SqlInfo sqlInfo;\n\n /** XML节点. */\n private Node node;\n\n /** 参数对象上下文,一般为Bean或者Map. */\n private Object paramObj;\n\n /** 拼接SQL片段的前缀,如:and、or等. */\n private String pre...
import com.blinkfox.zealot.bean.BuildSource; import com.blinkfox.zealot.bean.SqlInfo; import com.blinkfox.zealot.consts.ZealotConst; import com.blinkfox.zealot.core.IConditHandler; import com.blinkfox.zealot.helpers.ParseHelper; import com.blinkfox.zealot.helpers.StringHelper; import com.blinkfox.zealot.helpers.XmlNode...
package com.blinkfox.zealot.test.handler; /** * 用户ID、email的自定义标签处理器. * @author blinkfox on 2016/10/30. */ public class UserIdEmailHandler implements IConditHandler { /** * 构建用户ID、邮箱的SQL片段. * @param source 构造资源对象 * @return SqlInfo实例. */ @Override public SqlInfo buildSqlInfo(BuildS...
String idField = XmlNodeHelper.getAndCheckNodeText(node, "attribute::idField");
6
graywolf336/CasinoSlots
src/main/java/com/craftyn/casinoslots/actions/impl/BroadcastAction.java
[ "public class CasinoSlots extends JavaPlugin {\r\n private Economy economy = null;\r\n private PluginManager pm = null;\r\n private Towny towny = null;\r\n private WorldGuardPlugin worldGuard = null;\r\n private Update update;\r\n private int updateCheckTask;\r\n\r\n public boolean useTowny = f...
import org.bukkit.entity.Player; import com.craftyn.casinoslots.CasinoSlots; import com.craftyn.casinoslots.actions.Action; import com.craftyn.casinoslots.classes.Reward; import com.craftyn.casinoslots.classes.SlotType; import com.craftyn.casinoslots.exceptions.ActionLoadingException; import com.craftyn.casinoslots.uti...
package com.craftyn.casinoslots.actions.impl; /** * The broadcast action. Usage: - broadcast The message goes here * * @author graywolf336 * @since 3.0.0 * @version 1.0.0 */ public class BroadcastAction extends Action { private String name = "Broadcast"; private CasinoSlots plugin; private String m...
String msg = Util.colorizeAndTokenize(type, reward, player, message);
5
momodalo/vimtouch
plugins/BasePlugin/src/org/kvj/vimtouch/ext/manager/impl/SimplePlugin.java
[ "public class TransferableData implements Parcelable {\n\n\tprivate String data = null;\n\n\tpublic TransferableData(String data) {\n\t\tthis.data = data;\n\t}\n\n\tpublic static final Parcelable.Creator<TransferableData> CREATOR = new Creator<TransferableData>() {\n\n\t\t@Override\n\t\tpublic TransferableData[] ne...
import org.kvj.bravo7.ipc.RemoteServiceConnector; import org.kvj.vimtouch.BasePlugin; import org.kvj.vimtouch.IntegrationProvider; import org.kvj.vimtouch.TransferableData; import org.kvj.vimtouch.ext.FieldReaderException; import org.kvj.vimtouch.ext.IncomingTransfer; import org.kvj.vimtouch.ext.OutgoingTransfer; impor...
package org.kvj.vimtouch.ext.manager.impl; public abstract class SimplePlugin<I extends Transferable, O extends Transferable> extends BasePlugin.Stub implements IntegrationExtension<I, O> { protected static String TAG = "SimplePlugin"; private RemoteServiceConnector<IntegrationProvider> serviceConnector = null;...
throw new IntegrationExtensionException(String.format(
6
emop/EmopAndroid
src/com/emop/client/SettingActivity.java
[ "public class FmeiClient {\r\n\t//public ImageCache cache = null;\r\n\t//需要长时间保存的图片,例如分类,热门。\r\n\tpublic ImageLoader appImgLoader = null;\r\n\t\r\n\t//临时图片加载,比如瀑布流图片。\r\n\tpublic ImageLoader tmpImgLoader = null;\r\n\t\r\n\tpublic String userId = null;\r\n\t//推荐应用下载的用户ID. 应用里面的链接都是包含这个用的PID\r\n\tpublic String trackU...
import android.app.ProgressDialog; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.os.Handler; import...
package com.emop.client; public class SettingActivity extends BaseActivity { private PackageInfo curVersion = null; private FmeiClient client = null; private SsoHandler sinaSSO = null; private ProgressDialog loading = null; private boolean isLoginSina = false; private boolean isLoginTaobao = false...
TopAndroidClient topClient = TopAndroidClient.getAndroidClientByAppKey(Constants.TAOBAO_APPID);
3
Vrael/eManga
app/src/main/java/com/emanga/emanga/app/database/DatabaseHelper.java
[ "@DatabaseTable\npublic class Author implements Parcelable {\n\n public static final String NAME_COLUMN_NAME = \"name\";\n\n @DatabaseField(id = true, columnName = NAME_COLUMN_NAME)\n public String name;\n\n public Author() {\n // needed by ormlite\n }\n\n public Author(Parcel p){\n ...
import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.emanga.emanga.app.R; import com.emanga.emanga.app.models.Author; import com.emanga.emanga.app.models.AuthorManga; import com.emanga.emanga.app.models.Chapter; import com.ema...
package com.emanga.emanga.app.database; /** * Database helper class used to manage the creation and upgrading of your database. This class also usually provides * the DAOs used by the other classes. */ public class DatabaseHelper extends OrmLiteSqliteOpenHelper { private static final String DATABASE_NAME = "em...
private RuntimeExceptionDao<AuthorManga, String> authormangaRuntimeDao = null;
1
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/request/app/AppRename.java
[ "public class App implements Serializable {\n\n private static final long serialVersionUID = 1L;\n\n String id;\n String name;\n Domain domain_name;\n String created_at;\n App.Owner owner;\n String web_url;\n App.Stack stack;\n String requested_stack;\n String git_url;\n String buil...
import com.heroku.api.App; import com.heroku.api.Heroku; import com.heroku.api.exception.RequestFailedException; import com.heroku.api.http.Http; import com.heroku.api.request.Request; import com.heroku.api.request.RequestConfig; import java.util.Collections; import java.util.Map; import static com.heroku.api.parser.Js...
package com.heroku.api.request.app; /** * TODO: Javadoc * * @author Naaman Newbold */ public class AppRename implements Request<App> { private final RequestConfig config; public AppRename(String appName, String newName) { this.config = new RequestConfig().app(appName).with(Heroku.RequestKey.App...
throw new RequestFailedException("Unable to renameApp application.", status, bytes);
2
zhaozepeng/Android_framework
testsample/src/main/java/com/android/sample/test_utils/ImageActivity.java
[ "public class T {\n\n private volatile static T instance;\n private int mGravity = -1;\n private int xOffset = 0;\n private int yOffset = 0;\n private Toast mTemp;\n\n public static T getInstance() {\n if (instance == null){\n synchronized (T.class){\n if (instance...
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.view.View; import android.webkit.WebView; import android.widget.ImageView; import android.widget.TextView; imp...
package com.android.sample.test_utils; /** * Description: 测试{@link com.android.libcore.utils.ImageUtils}类 * * @author zzp(zhao_zepeng@hotmail.com) * @since 2015-09-04 */ public class ImageActivity extends BaseActivity implements View.OnClickListener{ private WebView webView; private ImageView centerSqu...
final LoadingDialog ld = new LoadingDialog(this);
4
pierre/ning-service-skeleton
base/src/main/java/com/ning/jetty/base/modules/BaseServerModule.java
[ "public class ServerModule extends ServletModule\n{\n protected Multibinder<HealthCheck> healthChecksBinder;\n\n @Override\n public void configureServlets()\n {\n installJackson();\n installJMX();\n installStats();\n }\n\n protected void installJackson()\n {\n final ...
import com.ning.arecibo.jmx.AreciboMonitoringModule; import com.ning.arecibo.metrics.guice.AreciboMetricsModule; import com.ning.jetty.core.modules.ServerModule; import com.ning.jetty.eventtracker.CollectorTracker; import com.ning.jetty.eventtracker.Tracker; import com.ning.jetty.eventtracker.config.TrackerConfig; impo...
/* * Copyright 2010-2011 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
this.configs.add(DaoConfig.class);
5
googleapis/java-pubsublite-spark
samples/snippets/src/test/java/pubsublite/spark/SamplesIntegrationTest.java
[ "public static void createSubscriptionExample(\n String cloudRegion, char zoneId, long projectNumber, String topicId, String subscriptionId)\n throws Exception {\n\n TopicPath topicPath =\n TopicPath.newBuilder()\n .setProject(ProjectNumber.of(projectNumber))\n .setLocation(CloudZone.o...
import static com.google.common.truth.Truth.assertThat; import static pubsublite.spark.AdminUtils.createSubscriptionExample; import static pubsublite.spark.AdminUtils.createTopicExample; import static pubsublite.spark.AdminUtils.deleteSubscriptionExample; import static pubsublite.spark.AdminUtils.deleteTopicExample; im...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
deleteSubscriptionExample(cloudRegion.value(), sourceSubscriptionPath);
2
tobyweston/tempus-fugit
src/test/java/com/google/code/tempusfugit/concurrency/DefaultTimeoutableCompletionServiceTest.java
[ "public interface Clock {\n\n Date now();\n\n}", "public interface Condition {\n boolean isSatisfied();\n}", "public class Duration implements Comparable<Duration> {\n\n private final Long value;\n private final TimeUnit unit;\n\n private Duration(Long value, TimeUnit unit) {\n this.value ...
import com.google.code.tempusfugit.temporal.Clock; import com.google.code.tempusfugit.temporal.Condition; import com.google.code.tempusfugit.temporal.Duration; import com.google.code.tempusfugit.temporal.RealClock; import org.hamcrest.Description; import org.jmock.Expectations; import org.jmock.Mockery; import org.jmoc...
/* * Copyright (c) 2009-2018, toby weston & tempus-fugit committers * * 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...
waitOrTimeout(interrupted::get, timeout(seconds(10)));
7
jferrater/Tap-And-Eat-MicroServices
FoodTrayService/src/main/java/com/github/joffryferrater/foodtrayservice/FoodTrayController.java
[ "@lombok.Getter\r\npublic class Item {\r\n\r\n\t@JsonProperty(\"Item Code\")\r\n\tprivate String itemCode;\r\n\t@JsonProperty(\"Name\")\r\n\tprivate String name;\r\n\t\r\n\tpublic Item() {\r\n\t\tsuper();\r\n\t}\r\n\t\r\n\tpublic Item(String itemCode, String name) {\r\n\t\tthis.itemCode = itemCode;\r\n\t\tthis.name...
import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.spr...
package com.github.joffryferrater.foodtrayservice; /** * * @author Joffry Ferrater * */ @RestController @RequestMapping("/foodtrays") public class FoodTrayController { @Autowired ItemServiceRepository itemServiceRepository; @Autowired PriceServiceRepository priceServiceRepo; privat...
public Price getPrice(@PathVariable("itemCode") String itemCode) {
1
andrewoma/dexx
collection/src/main/java/com/github/andrewoma/dexx/collection/internal/hashmap/ListMap.java
[ "public interface Builder<E, R> {\n @NotNull\n Builder<E, R> add(E element);\n\n @NotNull\n Builder<E, R> addAll(@NotNull Traversable<E> elements);\n\n @NotNull\n Builder<E, R> addAll(@NotNull java.lang.Iterable<E> elements);\n\n @NotNull\n Builder<E, R> addAll(@NotNull Iterator<E> iterator)...
import com.github.andrewoma.dexx.collection.Builder; import com.github.andrewoma.dexx.collection.BuilderFactory; import com.github.andrewoma.dexx.collection.Function; import com.github.andrewoma.dexx.collection.Pair; import com.github.andrewoma.dexx.collection.internal.base.AbstractMap; import com.github.andrewoma.dexx...
/* * Copyright (c) 2014 Andrew O'Malley * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, pub...
public Builder<Pair<K, V>, ListMap<K, V>> newBuilder() {
0
zegerhoogeboom/flysystem-java
src/main/java/com/flysystem/core/cache/CachedAdapter.java
[ "public interface Adapter extends Read, Write\n{\n}", "public class Config\n{\n\tprotected Map<String, Object> settings = new HashMap<String, Object>();\n\tprotected Config fallback;\n\n\tpublic Config(Map<String, Object> settings)\n\t{\n\t\tthis.settings = settings;\n\t}\n\n\tpublic Config()\n\t{\n\t\tthis.setti...
import com.flysystem.core.Adapter; import com.flysystem.core.Config; import com.flysystem.core.FileMetadata; import com.flysystem.core.Visibility; import com.flysystem.core.exception.FileExistsException; import com.flysystem.core.exception.FileNotFoundException; import java.util.HashMap; import java.util.List;
/* * Copyright (c) 2013-2015 Frank de Jonge * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge,...
public List<FileMetadata> listContents(String directory, boolean recursive)
2
izumin5210/Droidux
examples/todos-with-dagger/src/main/java/info/izumin/android/droidux/example/todoswithdagger/reducer/TodoListReducer.java
[ "public class AddTodoAction implements Action {\n public static final String TAG = AddTodoAction.class.getSimpleName();\n\n private final String text;\n\n public AddTodoAction(String text) {\n this.text = text;\n }\n\n public String getText() {\n return text;\n }\n\n @Override\n ...
import info.izumin.android.droidux.annotation.Dispatchable; import info.izumin.android.droidux.annotation.Reducer; import info.izumin.android.droidux.example.todoswithdagger.action.AddTodoAction; import info.izumin.android.droidux.example.todoswithdagger.action.ClearCompletedTodoAction; import info.izumin.android.droid...
package info.izumin.android.droidux.example.todoswithdagger.reducer; /** * Created by izumin on 11/4/15. */ @Reducer(TodoList.class) public class TodoListReducer { public static final String TAG = TodoListReducer.class.getSimpleName();
@Dispatchable(AddTodoAction.class)
0
yyxhdy/ManyEAs
src/jmetal/operators/crossover/PMXCrossover.java
[ "public class Solution implements Serializable {\n\t/**\n\t * Stores the problem\n\t */\n\tprivate Problem problem_;\n\n\t/**\n\t * Stores the type of the encodings.variable\n\t */\n\tprivate SolutionType type_;\n\n\t/**\n\t * Stores the decision variables of the solution.\n\t */\n\tprivate Variable[] variable_;\n\...
import java.util.List; import jmetal.core.Solution; import jmetal.encodings.solutionType.PermutationSolutionType; import jmetal.encodings.variable.Permutation; import jmetal.util.Configuration; import jmetal.util.JMException; import jmetal.util.PseudoRandom; import java.util.Arrays; import java.util.HashMap;
// PMXCrossover.java // // Author: // Antonio J. Nebro <antonio@lcc.uma.es> // Juan J. Durillo <durillo@lcc.uma.es> // // Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Publi...
Configuration.logger_.severe("PMCCrossover.execute: the solutions " +
3
eroshenkoam/htmlelements
src/main/java/io/qameta/htmlelements/annotation/FindBy.java
[ "public class Context {\n\n public static final String DESCRIPTION_KEY = \"description\";\n\n public static final String LISTENERS_KEY = \"listeners\";\n\n public static final String PROPERTIES_KEY = \"properties\";\n\n public static final String PARAMETERS_KEY = \"parameters\";\n\n public static fin...
import io.qameta.htmlelements.context.Context; import io.qameta.htmlelements.extension.ContextEnricher; import io.qameta.htmlelements.extension.HandleWith; import io.qameta.htmlelements.extension.MethodHandler; import io.qameta.htmlelements.handler.WebBlockMethodHandler; import io.qameta.htmlelements.proxy.Proxies; imp...
package io.qameta.htmlelements.annotation; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) @HandleWith(FindBy.Extension.class) public @interface FindBy { String value(); @SuppressWarnings("unchecked") class Extension implements MethodHandler<Object> { @Override publi...
return Proxies.simpleProxy(
4
offbynull/coroutines
instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/MethodInstrumenter.java
[ "public static InsnList entryPointLoader(MethodAttributes attrs) {\n Validate.notNull(attrs);\n\n Variable contArg = attrs.getCoreVariables().getContinuationArgVar();\n Variable methodStateVar = attrs.getCoreVariables().getMethodStateVar();\n Variable storageContainerVar = attrs.getStorageContainerVaria...
import static com.offbynull.coroutines.instrumenter.ContinuationGenerators.entryPointLoader; import static com.offbynull.coroutines.instrumenter.ContinuationGenerators.saveState; import java.util.List; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.InsnList; import org.objectweb.asm.tree.InsnNode; impo...
/* * Copyright (c) 2016, Kasra Faghihi, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3.0 of the License, or (at your option) any later ve...
InsnList entryPoint = entryPointLoader(attrs);
0
yammer/breakerbox
breakerbox-jdbi/src/main/java/com/yammer/breakerbox/jdbi/JdbiStore.java
[ "public class DateTimeArgumentFactory implements ArgumentFactory<DateTime> {\n @Override\n public boolean accepts(Class<?> expectedType, Object value, StatementContext ctx) {\n return value instanceof DateTime;\n }\n\n @Override\n public Argument build(Class<?> expectedType, final DateTime val...
import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; import com.yammer.breakerbox.jdbi.args.DateTimeArgumentFactory; import com.yammer.breakerbox.jdbi.args.DependencyIdArgumentFactory; import com.yammer.breakerbox.jdbi.args.ServiceIdArgumentFactory; import com.yammer.breakerbox.jdbi.args.Tenac...
package com.yammer.breakerbox.jdbi; public class JdbiStore extends BreakerboxStore { public static final String MIGRATIONS_FILENAME = "migrations.xml"; private static final Logger LOGGER = LoggerFactory.getLogger(JdbiStore.class); protected final ServiceDB serviceDB; protected final DependencyDB depe...
public boolean delete(ServiceId serviceId, DependencyId dependencyId) {
5
bhatti/PlexRBAC
src/test/java/com/plexobject/rbac/repository/bdb/PermissionRepositoryImplTest.java
[ "public interface DomainRepository extends BaseRepository<Domain, String> {\n\n /**\n * \n * @param domain\n * @return\n */\n Domain getOrCreateDomain(String domain);\n\n /**\n * \n * @param domain\n * @param subjectName\n * @return\n */\n boolean isSubjectOwner(Strin...
import java.io.File; import java.util.ArrayList; import java.util.Collection; import java.util.List; import junit.framework.Assert; import org.apache.commons.io.FileUtils; import org.apache.log4j.Logger; import org.junit.After; import org.junit.Before; import org.junit.Test; import com.plexobject.rbac.repository.Domain...
package com.plexobject.rbac.repository.bdb; public class PermissionRepositoryImplTest { private static final String USERNAME = "shahbhat"; private static final String APPNAME = "appname"; private static final String TEST_DB_DIR = "test_db_dir_perm"; private static final Logger LOGGER = Logger ...
CurrentRequest.startRequest(APPNAME, USERNAME, "127.0.0.1");
6
michaelmarconi/oncue
oncue-tests/src/test/java/oncue/tests/WorkRequestTest.java
[ "public abstract class AbstractWorkRequest implements Serializable {\n\n\tprivate static final long serialVersionUID = -3802453222882202468L;\n\n\tprivate final ActorRef agent;\n\tprivate final Set<String> workerTypes;\n\n\tpublic AbstractWorkRequest(ActorRef agent, Set<String> workerTypes) {\n\t\tthis.agent = agen...
import akka.testkit.JavaTestKit; import static junit.framework.Assert.assertEquals; import java.util.Arrays; import java.util.HashSet; import oncue.common.messages.AbstractWorkRequest; import oncue.common.messages.EnqueueJob; import oncue.common.messages.Job; import oncue.common.messages.WorkResponse; import oncue.test...
/******************************************************************************* * Copyright 2013 Michael Marconi * * 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.apa...
Job job = expectMsgClass(Job.class);
2
jnoessner/rockIt
src/main/java/com/googlecode/rockit/app/RockItAPI.java
[ "public class RockItResult\n{\n private BigDecimal probability;\n private String statement;\n private boolean mapState;\n\n private final int presicion = 10;\n\n\n public RockItResult(String statement)\n {\n this.probability = new BigDecimal(1);\n this.statement = statement;\...
import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map.Entry; import com.googlecode.rockit.app.result.RockItResult; import com.googlecode.rockit.app.result.RockItResultProbabilityComparer; ...
package com.googlecode.rockit.app; public class RockItAPI { private static Main main = new Main(); public RockItAPI(String propertyFile) throws ReadOrWriteToFileException { Parameters.PROPERTYFILE = propertyFile; Parameters.readPropertyFile(); } public RockItAPI() { ...
ArrayList<String> temp = main.doMapStateInternal(new SyntaxReader(), input, groundings);
8
DHager/jhllib
src/test/java/com/technofovea/hllib/ExtractTest.java
[ "public enum DirectoryItemType implements JnaEnum<DirectoryItemType> {\n\n \n NONE,\n FOLDER,\n FILE;\n\n\n private static int start = 0;\n\n public int getIntValue() {\n return this.ordinal()+start;\n }\n\n\n public DirectoryItemType getForValue(int i) {\n for(DirectoryItemTyp...
import com.sun.jna.Memory; import com.sun.jna.Native; import com.technofovea.hllib.enums.DirectoryItemType; import com.technofovea.hllib.enums.HlOption; import com.technofovea.hllib.enums.PackageType; import com.technofovea.hllib.enums.StreamType; import com.technofovea.hllib.masks.FileMode; import com.technofovea.hlli...
package com.technofovea.hllib; /** * * @author Darien Hager */ public class ExtractTest { private static final String TEST_FILE = "root\\readme.txt"; private static final int TEST_FILE_SIZE = 39818; private static final String TEST_FILE_START = "Half-Life\r\nVersion 1.1.1.1\r\nReadme File"; stati...
FileMode fm = new FileMode();
4
cloudera/director-spi
src/main/java/com/cloudera/director/spi/v2/provider/util/AbstractCloudProvider.java
[ "public static <T> T checkNotNull(T instance, String message) {\n if (instance == null) {\n throw new NullPointerException(message);\n }\n return instance;\n}", "public interface ConfigurationValidator {\n\n /**\n * Validates the specified configuration using the specified localization context,\n * acc...
import static com.cloudera.director.spi.v2.util.Preconditions.checkNotNull; import com.cloudera.director.spi.v2.model.ConfigurationValidator; import com.cloudera.director.spi.v2.model.Configured; import com.cloudera.director.spi.v2.model.LocalizationContext; import com.cloudera.director.spi.v2.model.exception.PluginExc...
// (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...
this.providerMetadata = checkNotNull(providerMetadata, "providerMetadata is null");
0
jordw/heftydb
src/test/java/com/jordanwilliams/heftydb/test/performance/db/ReadWritePerformance.java
[ "public enum CompactionStrategies implements CompactionStrategy {\n\n SIZE_TIERED_COMPACTION_STRATEGY {\n @Override\n public CompactionPlanner initialize(CompactionTables tables) {\n return new SizeTieredCompactionPlanner(tables);\n }\n },\n\n NULL_COMPACTION_STRATEGY {\n ...
import java.util.Random; import com.codahale.metrics.ConsoleReporter; import com.codahale.metrics.ExponentiallyDecayingReservoir; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; import com.jordanwilliams.heftydb.compact.CompactionStrategies; import com.jordanwilliams.heftydb.data.Value; i...
/* * Copyright (c) 2014. Jordan Williams * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
ConsoleReporter reporter = PerformanceHelper.consoleReporter(metrics);
6
ppicas/android-clean-architecture-mvp
app/src/main/java/cat/ppicas/cleanarch/ui/presenter/CityDetailPresenter.java
[ "public class City {\n\n private String mId;\n private String mName;\n private String mCountry;\n private CurrentWeatherPreview mCurrentWeatherPreview;\n\n public City(String id, String name, String country) {\n mId = id;\n mName = name;\n mCountry = country;\n }\n\n public...
import android.content.res.Resources; import android.text.format.DateFormat; import java.util.Calendar; import cat.ppicas.cleanarch.R; import cat.ppicas.cleanarch.model.City; import cat.ppicas.cleanarch.repository.CityRepository; import cat.ppicas.cleanarch.task.GetCityTask; import cat.ppicas.cleanarch.ui.vista.CityDet...
/* * 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...
private final CityRepository mCityRepository;
1
echocat/adam
src/main/java/org/echocat/adam/profile/GroupProvider.java
[ "@XmlRootElement(name = \"configuration\", namespace = SCHEMA_NAMESPACE)\n@XmlType(name = \"configuration\", namespace = SCHEMA_NAMESPACE)\npublic class Configuration {\n\n @Nullable\n private Profile _profile;\n @Nullable\n private List<Report> _reports;\n @Nullable\n private List<View> _views;\n...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.*; import static java.util.Collections.synchronizedMap; import static org.echocat.jomon.runtime.CollectionUtils.asIm...
/***************************************************************************************** * *** BEGIN LICENSE BLOCK ***** * * echocat Adam, Copyright (c) 2014 echocat * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as publi...
private final ConfigurationRepository _configurationRepository;
1