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
obazoud/elasticsearch-river-git
src/main/java/com/bazoud/elasticsearch/river/git/flow/FileIndexFunction.java
[ "@Data\n@SuppressWarnings(\"PMD.UnusedPrivateField\")\npublic class Context {\n private String name;\n private String uri;\n private File projectPath;\n private Repository repository;\n private String workingDir =\n System.getProperty(\"user.home\") + File.separator + \".elasticsearch-river-gi...
import java.util.Iterator; import java.util.List; import org.eclipse.jgit.revwalk.RevWalk; import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.Loggers; import com.bazoud.elasticsearch.river.git.beans.Context; import com.bazoud.elasticsearch.river.git.beans.IndexFile; import com.baz...
package com.bazoud.elasticsearch.river.git.flow; /** * @author Olivier Bazoud */ public class FileIndexFunction extends MyFunction<Context, Context> { private static ESLogger logger = Loggers.getLogger(FileIndexFunction.class); @Override public Context doApply(Context context) throws Throwable { ...
new BulkVisitor(context, FILE.name().toLowerCase())
4
tomayac/rest-describe-and-compile
src/com/google/code/apis/rest/client/Tree/ResponseItem.java
[ "public class GuiFactory implements WindowResizeListener {\r\n private static DockPanel blockScreen;\r\n public static Strings strings;\r\n public static Notifications notifications; \r\n private DockPanel dockPanel;\r\n public static final String restCompile = \"restCompile\";\r\n public static final String...
import java.util.Vector; import com.google.code.apis.rest.client.GUI.GuiFactory; import com.google.code.apis.rest.client.GUI.SettingsDialog; import com.google.code.apis.rest.client.Util.SyntaxHighlighter; import com.google.code.apis.rest.client.Wadl.MethodNode; import com.google.code.apis.rest.client.Wadl.Response...
package com.google.code.apis.rest.client.Tree; public class ResponseItem extends Composite { public ResponseItem(final MethodNode method, final TreeItem methodTreeItem) { HorizontalPanel containerPanel = new HorizontalPanel(); HTML response = new HTML(SyntaxHighlighter.highlight("<" + WadlXml.re...
Hyperlink removeResponseLink = new Hyperlink(GuiFactory.strings.remove(), true, "");
0
turn/sorcerer
src/main/java/com/turn/sorcerer/config/impl/SorcererConfiguration.java
[ "public interface AnnotationProcessor {\n\n\tvoid process(Collection<String> ... pkgs);\n}", "public interface ConfigReader {\n\n\t// returns addPackages to search for annotations parsed from config\n\tCollection<String> read(Collection<File> configFiles) throws SorcererException;\n\n\tFilenameFilter getFileFilte...
import com.turn.sorcerer.config.AnnotationProcessor; import com.turn.sorcerer.config.ConfigReader; import com.turn.sorcerer.exception.SorcererException; import com.turn.sorcerer.injector.SorcererInjector; import com.turn.sorcerer.pipeline.type.PipelineType; import com.turn.sorcerer.task.type.TaskType; import java.io.Fi...
/* * Copyright (c) 2015, Turn Inc. All Rights Reserved. * Use of this source code is governed by a BSD-style license that can be found * in the LICENSE file. */ package com.turn.sorcerer.config.impl; /** * Class Description Here * * @author tshiou */ public class SorcererConfiguration { private static final ...
private void process() throws SorcererException {
2
bmatthias/config-builder
src/test/java/com/tngtech/configbuilder/annotation/typetransformer/CollectionToArrayListTransformerTest.java
[ "public class CollectionToArrayListTransformer extends ValueTransformer<Collection,ArrayList> {\n\n @Override\n public ArrayList transform(Collection argument) {\n ArrayList result = Lists.newArrayList();\n for(Object value : argument) {\n result.add(fieldValueTransformer.performAppli...
import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.tngtech.configbuilder.annotation.valuetransformer.CollectionToArrayListTransformer; import com.tngtech.configbuilder.configuration.ErrorMessageSetup; import com.tngtech.configbuilder.util.ConfigBuilderFactory; import com.tngtech.c...
package com.tngtech.configbuilder.annotation.typetransformer; @RunWith(MockitoJUnitRunner.class) public class CollectionToArrayListTransformerTest { private CollectionToArrayListTransformer collectionToArrayListTransformer; @Mock private ParameterizedType type; @Mock
private FieldValueTransformer fieldValueTransformer;
3
bertrandmartel/speed-test-lib
jspeedtest/src/main/java/fr/bmartel/speedtest/SpeedTestSocket.java
[ "public interface IRepeatListener {\n\n /**\n * called when repeat download task is finished.\n *\n * @param report speed examples report\n */\n void onCompletion(SpeedTestReport report);\n\n /**\n * called when a speed examples report is sent.\n *\n * @param report speed exampl...
import fr.bmartel.speedtest.model.UploadStorageType; import java.math.RoundingMode; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import fr.bmartel.speedtest.inter.IRepeatListener; import fr.bmartel.speedtest.inter.ISpeedTestListener; import fr.bmartel.speedtest.inter.ISpeedTe...
/* * The MIT License (MIT) * <p/> * Copyright (c) 2016-2017 Bertrand Martel * <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 limitation the...
private ComputationMethod mComputationMethod = ComputationMethod.MEDIAN_ALL_TIME;
3
sewerk/Bill-Calculator
app/src/main/java/pl/srw/billcalculator/bill/SavedBillsRegistry.java
[ "public interface Bill {\n\n Long getId();\n Long getPricesId();\n\n Date getDateFrom();\n void setDateFrom(Date dateFrom);\n Date getDateTo();\n void setDateTo(Date dateTo);\n Double getAmountToPay();\n void setAmountToPay(Double value);\n}", "@Entity(active = true)\npublic class PgeG11Bi...
import android.support.v4.util.SimpleArrayMap; import org.threeten.bp.LocalDate; import java.util.Random; import javax.inject.Inject; import javax.inject.Singleton; import pl.srw.billcalculator.db.Bill; import pl.srw.billcalculator.db.PgeG11Bill; import pl.srw.billcalculator.db.PgeG12Bill; import pl.srw.billcalculator....
package pl.srw.billcalculator.bill; @Singleton public class SavedBillsRegistry { private final SimpleArrayMap<String, Long> registry; @Inject SavedBillsRegistry() { registry = new SimpleArrayMap<>(); } public String register(Bill bill) { Timber.d("register() called with: bil...
} else if (bill instanceof TauronG11Bill) {
4
IPEldorado/RemoteResources
src/com/eldorado/remoteresources/ui/wizard/AddDeviceWizard.java
[ "public class RemoteResourcesLocalization {\n\n\tpublic enum RemoteResourcesLocalization_Languages {\n\t\ten_US, pt_BR\n\t};\n\n\tprivate static ResourceBundle bundle = ResourceBundle.getBundle(\n\t\t\t\"com.eldorado.remoteresources.i18n.RemoteResourcesMessages\",\n\t\t\tLocale.getDefault());\n\n\t/**\n\t * Get a m...
import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Frame; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event....
/* * (C) Copyright 2014 Instituto de Pesquisas Eldorado (http://www.eldorado.org.br/). * * This file is part of the software Remote Resources * * All rights reserved. This file and the accompanying materials * are made available under the terms of the GNU Lesser General Public License * (LGPL) version 3.0 which ...
private final BasePanel content;
2
gengo/gengo-java
examples/TestClient.java
[ "public class GengoClient extends JsonHttpApi\n{\n /** Strings used to represent TRUE and FALSE in requests */\n public static final int GENGO_TRUE = 1;\n public static final int GENGO_FALSE = 0;\n\n final private boolean usesSandbox;\n\n /**\n * Initialize the client.\n * @param publicKey yo...
import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.lang.IllegalArgumentException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Random; import com.gengo.client.GengoClient; import com.gengo.client.exc...
package examples; public class TestClient { final private static String API_KEY_PUBLIC = ApiKeys.PUBLIC_KEY; final private static String API_KEY_PRIVATE = ApiKeys.PRIVATE_KEY;
final private GengoClient client;
0
SumoLogic/sumologic-jenkins-plugin
src/main/java/com/sumologic/jenkins/jenkinssumologicplugin/sender/SumoPeriodicPublisher.java
[ "@Extension\npublic final class PluginDescriptorImpl extends BuildStepDescriptor<Publisher> {\n\n private Secret url;\n private transient SumoMetricDataPublisher sumoMetricDataPublisher;\n private static LogSenderHelper logSenderHelper = null;\n private String queryPortal;\n private String sourceCate...
import com.sumologic.jenkins.jenkinssumologicplugin.PluginDescriptorImpl; import com.sumologic.jenkins.jenkinssumologicplugin.constants.EventSourceEnum; import com.sumologic.jenkins.jenkinssumologicplugin.constants.LogTypeEnum; import com.sumologic.jenkins.jenkinssumologicplugin.model.BuildModel; import com.sumologic.j...
package com.sumologic.jenkins.jenkinssumologicplugin.sender; /** * Created by deven on 8/6/15. * <p> * Periodically publish jenkins system metadata to sumo * <p> * Updated by Sourabh Jain 05/2019 */ @Extension public class SumoPeriodicPublisher extends AsyncPeriodicWork { private static final long recurr...
queueModel.setEventTime(DATETIME_FORMATTER.format(new Date()));
7
sing-group/bicycle
src/test/java/es/cnio/bioinfo/bicycle/test/NonDirectionalAnalysisTest.java
[ "public class Project {\n\n\tprivate static final Logger logger = Logger.getLogger(Project.class.getSimpleName());\n\n\tpublic static final String WORKING_DIRECTORY = \"workingDirectory\" + File.separator;\n\tpublic static final String OUTPUT_DIRECTORY = \"output\" + File.separator;\n\tpublic static final String CO...
import static org.junit.Assert.assertTrue; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.List; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized;...
/* Copyright 2012 Daniel Gonzalez Peña, Osvaldo Graña This file is part of the bicycle Project. bicycle Project is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opti...
for (Reference ref : p.getReferences()) {
1
priiduneemre/btcd-cli4j
core/src/main/java/com/neemre/btcdcli4j/core/client/ClientConfigurator.java
[ "@Getter\n@ToString\n@AllArgsConstructor\npublic enum NodeProperties {\n\t\n RPC_PROTOCOL(\"node.bitcoind.rpc.protocol\", \"http\"),\n RPC_HOST(\"node.bitcoind.rpc.host\", \"127.0.0.1\"),\n RPC_PORT(\"node.bitcoind.rpc.port\", \"8332\"),\n RPC_USER(\"node.bitcoind.rpc.user\", \"user\"),\n RPC_PASSWOR...
import java.util.EnumSet; import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; import lombok.Getter; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.slf4j...
package com.neemre.btcdcli4j.core.client; public class ClientConfigurator extends AgentConfigurator { private static final Logger LOG = LoggerFactory.getLogger(ClientConfigurator.class); @Getter private String nodeVersion; @Override public Set<NodeProperties> getRequiredProperties() { return EnumSet....
throw new IllegalArgumentException(Errors.ARGS_NULL.getDescription());
3
calrissian/flowmix
src/main/java/org/calrissian/flowmix/api/builder/AggregateBuilder.java
[ "public interface Aggregator extends Serializable {\n\n public static final String GROUP_BY = \"groupBy\";\n public static final String GROUP_BY_DELIM = \"\\u0000\";\n\n void configure(Map<String, String> configuration);\n\n void added(WindowItem item);\n\n void evicted(WindowItem item);\n\n List<...
import java.util.HashMap; import java.util.List; import java.util.Map; import org.calrissian.flowmix.api.Aggregator; import org.calrissian.flowmix.api.Policy; import org.calrissian.flowmix.core.model.op.AggregateOp; import org.calrissian.flowmix.core.model.op.FlowOp; import org.calrissian.flowmix.core.model.op.Partitio...
/* * Copyright (C) 2014 The Calrissian Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
getStreamBuilder().addFlowOp(new AggregateOp(aggregatorClass, triggerPolicy, triggerThreshold, evictionPolicy,
2
jmcampanini/gexf4j-core
src/test/java/com/ojn/gexf4j/core/testgraphs/HierarchyInlineBuilder.java
[ "public enum EdgeType {\n\n\tDIRECTED,\n\tUNDIRECTED,\n\tMUTUAL,\n}", "public interface Gexf {\n\n\tString getVersion();\n\t\n\tboolean hasVariant();\n\tGexf clearVariant();\n\tString getVariant();\n\tGexf setVariant(String variant);\n\t\n\tMetadata getMetadata();\n\t\n\tGraph getGraph();\n\t\n\tboolean hasVisual...
import com.ojn.gexf4j.core.EdgeType; import com.ojn.gexf4j.core.Gexf; import com.ojn.gexf4j.core.Mode; import com.ojn.gexf4j.core.Node; import com.ojn.gexf4j.core.impl.GexfImpl;
package com.ojn.gexf4j.core.testgraphs; public class HierarchyInlineBuilder extends GexfBuilder { @Override public String getSuffix() { return "hierarchyInline"; } @Override
public Gexf buildGexf() {
1
Samourai-Wallet/sentinel-android
app/src/main/java/com/samourai/sentinel/ReceiveActivity.java
[ "public class APIFactory\t{\n\n private static long xpub_balance = 0L;\n private static HashMap<String, Long> xpub_amounts = null;\n private static HashMap<String,List<Tx>> xpub_txs = null;\n private static HashMap<String,Integer> unspentAccounts = null;\n private static HashMap<String,Integer> unspe...
import android.app.ActionBar; import android.app.Activity; import android.app.AlertDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Bitmap; import android....
.setMessage(R.string.receive_address_to_share) .setCancelable(false) .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { ...
ReceiveLookAtUtil.getInstance().add(addr);
7
infovillasimius/amr2Fred
amr2Fred/src/webDemo/FredHandler.java
[ "public class DigraphWriter {\n\n /**\n * Returns root Node translated into .dot graphic language\n *\n * @param root Node\n * @return String\n */\n static public String nodeToDigraph(Node root) {\n\n String digraph = Glossary.DIGRAPH_INI;\n digraph += toDigraph(root);\n ...
import amr2fred.DigraphWriter; import amr2fred.Node; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileRea...
mode = FRED_RDF; } else if (par.contains(MODE + N_TRIPLES)) { par = par.replace(MODE + N_TRIPLES, ""); mode = FRED_N_TRIPLES; } else if (par.contains(MODE + TURTLE)) { par = par.replace(MODE + TURTLE, ""); mode = FRED_TURTLE; } ...
Node root = Converter.toNode(rdf2);
3
CMPUT301F14T14/android-question-answer-app
QuestionApp/src/ca/ualberta/cs/cmput301f14t14/questionapp/data/threading/UploaderService.java
[ "public class DataManager {\n\t\n\tprivate static DataManager instance;\n\n\tprivate IDataStore localDataStore;\n\tprivate IDataStore remoteDataStore;\n\tprivate List<UUID> recentVisit;\n\tprivate List<UUID> readLater;\n\tprivate Context context;\n\tString Username;\n\tstatic final String favQ = \"fav_Que\";\n\tsta...
import ca.ualberta.cs.cmput301f14t14.questionapp.data.DataManager; import ca.ualberta.cs.cmput301f14t14.questionapp.data.eventbus.EventBus; import ca.ualberta.cs.cmput301f14t14.questionapp.data.eventbus.events.AbstractEvent; import ca.ualberta.cs.cmput301f14t14.questionapp.data.eventbus.events.AnswerCommentPushDelayedE...
package ca.ualberta.cs.cmput301f14t14.questionapp.data.threading; public class UploaderService extends Service { private DataManager dm = null; private Context context = null; //Had to make this static. Little bit of evil hackery to get "singleton"-like behavior. //See DataManager.java:startUploaderService() f...
AbstractEvent youngestevent = eventbus.getYoungestEvent();
2
AdoptOpenJDK/mjprof
src/main/java/com/performizeit/mjprof/plugins/mappers/singlethread/stackframe/AtEliminator.java
[ "public class Profile {\n public boolean color = false;\n SFNode root = new SFNode();\n\n public Profile() {\n root.setColor(color);\n root.sf = null;\n }\n \n public String test(){\n \treturn root.sf;\n }\n public Profile(String parseString) {\n this();\n ...
import com.performizeit.mjprof.api.Plugin; import com.performizeit.mjprof.model.Profile; import com.performizeit.mjprof.model.ProfileVisitor; import com.performizeit.mjprof.model.SFNode; import com.performizeit.mjprof.parser.ThreadInfo; import com.performizeit.mjprof.plugins.mappers.singlethread.SingleThreadMapperBase;...
/* This file is part of mjprof. mjprof is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. mjpro...
public class AtEliminator extends SingleThreadMapperBase {
4
levin81/daelic
src/main/java/com/github/levin81/daelic/core/DruidClient.java
[ "@JsonInclude(JsonInclude.Include.NON_NULL)\npublic class GroupBy {\n\n private final String queryType = \"groupBy\";\n\n private DataSource dataSource;\n private List<Dimension> dimensions;\n private LimitSpec limitSpec;\n private Granularity granularity;\n private Filter filter;\n private Lis...
import com.fasterxml.jackson.databind.ObjectMapper; import com.github.levin81.daelic.druid.GroupBy; import com.github.levin81.daelic.druid.Timeseries; import com.github.levin81.daelic.druid.TopN; import com.github.levin81.daelic.druid.result.GroupByResult; import com.github.levin81.daelic.druid.result.TimeseriesResult;...
package com.github.levin81.daelic.core; public class DruidClient { private final DruidConfiguration configuration; private final ObjectMapper mapper; public DruidClient() { this(new DruidConfiguration()); } public DruidClient(DruidConfiguration configuration) { this(configurati...
public GroupByResult query(GroupBy groupBy) throws IOException, DruidException {
6
openthread/ot-registrar
src/main/java/com/google/openthread/masa/MASA.java
[ "public class BouncyCastleInitializer {\n\n public static void init() {\n Security.addProvider(new BouncyCastleProvider());\n X500Name.setDefaultStyle(RFC4519Style.INSTANCE);\n }\n}", "public class Constants {\n\n // BRSKI - EST\n public static final String WELL_KNOWN = \".well-known\";\n\n public stat...
import COSE.CoseException; import com.google.openthread.BouncyCastleInitializer; import com.google.openthread.Constants; import com.google.openthread.ExtendedMediaTypeRegistry; import com.google.openthread.RequestDumper; import com.google.openthread.SecurityUtils; import com.google.openthread.brski.CBORSerializer; impo...
/* * Copyright (c) 2019, The OpenThread Registrar Authors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright ...
(ConstrainedVoucherRequest) new CBORSerializer().deserialize(reqContent);
5
Semx11/Autotip
src/main/java/me/semx11/autotip/api/request/impl/LogoutRequest.java
[ "public class GetBuilder {\n\n private static final String BASE_URL = \"https://api.autotip.pro/\";\n\n private final RequestBuilder builder;\n\n private GetBuilder(Request request) {\n this.builder = RequestBuilder.get().setUri(BASE_URL + request.getType().getEndpoint());\n }\n\n public stati...
import java.util.Optional; import me.semx11.autotip.api.GetBuilder; import me.semx11.autotip.api.RequestHandler; import me.semx11.autotip.api.RequestType; import me.semx11.autotip.api.SessionKey; import me.semx11.autotip.api.reply.Reply; import me.semx11.autotip.api.reply.impl.LogoutReply; import me.semx11.autotip.api....
package me.semx11.autotip.api.request.impl; public class LogoutRequest implements Request<LogoutReply> { private final SessionKey sessionKey; private LogoutRequest(SessionKey sessionKey) { this.sessionKey = sessionKey; } public static LogoutRequest of(SessionKey sessionKey) { return...
HttpUriRequest request = GetBuilder.of(this)
0
games647/LagMonitor
src/main/java/com/github/games647/lagmonitor/command/minecraft/SystemCommand.java
[ "public class LagMonitor extends JavaPlugin {\n\n private static final int DETECTION_THRESHOLD = 10;\n private static final int HOURS_PER_DAY = 24;\n private static final int MINUTES_PER_HOUR = 60;\n private static final int SECONDS_PER_MINUTE = 60;\n\n private final BlockingActionManager actionManag...
import com.github.games647.lagmonitor.LagMonitor; import com.github.games647.lagmonitor.command.LagCommand; import com.github.games647.lagmonitor.traffic.TrafficReader; import com.github.games647.lagmonitor.util.LagUtils; import com.google.common.base.StandardSystemProperty; import java.io.File; import java.lang.manage...
package com.github.games647.lagmonitor.command.minecraft; public class SystemCommand extends LagCommand { public SystemCommand(LagMonitor plugin) { super(plugin); } @Override public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (!canEx...
usedWorldSize += LagUtils.getFolderSize(plugin.getLogger(), worldFolder.toPath());
3
andraus/BluetoothHidEmu
src/andraus/bluetoothhidemu/ui/Ps3KeypadUiControls.java
[ "public class ButtonClickListener implements OnClickListener, OnLongClickListener {\n \n private static final String TAG = BluetoothHidEmuActivity.TAG;\n \n private SocketManager mSocketManager = null;\n \n private HidPointerPayload mHidPayload = null;\n \n private Vibrator mVibrator;\n \...
import andraus.bluetoothhidemu.ButtonClickListener; import andraus.bluetoothhidemu.KeyboardKeyListener; import andraus.bluetoothhidemu.KeyboardTextWatcher; import andraus.bluetoothhidemu.R; import andraus.bluetoothhidemu.SpecialKeyListener; import andraus.bluetoothhidemu.TouchpadListener; import andraus.bluetoothhidemu...
package andraus.bluetoothhidemu.ui; /** * Controls layout for PS3 wireless keypad emulation. * Contains tabs for touchpad, navigation keys, etc. */ public class Ps3KeypadUiControls extends UiControls { private RadioGroup mTabsRadioGroup = null; private ViewFlipper mViewFlipper = null; privat...
private TouchpadListener mTouchpadListener = null;
4
juankysoriano/MaterialLife
material-life-android/src/main/java/com/juankysoriano/materiallife/navigation/MenuSwitcher.java
[ "public enum ContextRetriever {\n INSTANCE;\n\n private Application application;\n private FragmentActivity activity;\n\n public void inject(Application application) {\n this.application = application;\n }\n\n public void inject(FragmentActivity activity) {\n this.activity = activity...
import androidx.annotation.VisibleForTesting; import androidx.fragment.app.FragmentManager; import com.juankysoriano.materiallife.ContextRetriever; import com.juankysoriano.materiallife.R; import com.juankysoriano.materiallife.editor.WorldEditorMenu; import com.juankysoriano.materiallife.editor.WorldEditorMenuFragment;...
package com.juankysoriano.materiallife.navigation; public class MenuSwitcher { private final FragmentManager fragmentManager; public static MenuSwitcher newInstance() { return new MenuSwitcher(ContextRetriever.INSTANCE.getActivity().getSupportFragmentManager()); } @VisibleForTesting pr...
public WorldEditorMenu addEditorMenu() {
1
Lzw2016/fastdfs-java-client
src/main/java/org/cleverframe/fastdfs/mapper/FieldMateData.java
[ "public final class OtherConstants {\n /**\n * for overwrite all old metadata\n */\n public static final byte STORAGE_SET_METADATA_FLAG_OVERWRITE = 'O';\n\n /**\n * for replace, insert when the meta item not exist, otherwise update it\n */\n public static final byte STORAGE_SET_METADATA_...
import org.cleverframe.fastdfs.constant.OtherConstants; import org.cleverframe.fastdfs.exception.FastDfsColumnMapException; import org.cleverframe.fastdfs.model.MateData; import org.cleverframe.fastdfs.utils.BytesUtil; import org.cleverframe.fastdfs.utils.MetadataMapperUtils; import org.cleverframe.fastdfs.utils.Reflec...
package org.cleverframe.fastdfs.mapper; /** * 属性映射MateData定义 * 作者:LiZW <br/> * 创建时间:2016/11/20 1:48 <br/> */ public class FieldMateData { /** * 列 */ private Field field; /** * 列索引 */ private int index; /** * 单元最大长度 */ private int max; /** * 单元长度 ...
throw new FastDfsColumnMapException(field.getName() + "获取Field大小时未识别的FastDFSColumn类型" + field.getType());
1
schibsted/triathlon
src/main/java/com/schibsted/triathlon/operators/ClusterOperator.java
[ "public class ConstraintModel {\n static List<String> VALID_OPERATORS = new ArrayList<String>() {{\n add(\"UNIQUE\");\n add(\"CLUSTER\");\n add(\"GROUP_BY\");\n add(\"LIKE\");\n add(\"UNLIKE\");\n }};\n\n public String getField() {\n return field;\n }\n\n pub...
import com.netflix.eureka2.registry.instance.InstanceInfo; import com.schibsted.triathlon.model.ConstraintModel; import com.schibsted.triathlon.model.InstanceInfoModel; import com.schibsted.triathlon.model.generated.Marathon; import com.schibsted.triathlon.service.TriathlonService; import com.schibsted.triathlon.servic...
/* * Copyright (c) 2015 Schibsted Products and Technology * * 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...
InstanceInfo instanceInfo = Observable.from(InstanceInfoModel.getInstanceInfo().values())
1
LMAX-Exchange/parallel-junit
src/main/java/com/lmax/ant/paralleljunit/remote/controller/RemoteTestRunnerControllerFactory.java
[ "public interface ParallelJUnitTaskConfig\n{\n long NO_TIMEOUT = -1;\n\n Queue<JUnitTest> getTestQueue();\n\n List<String> getCommand(Class<?> mainClass, int workerId, int serverPort);\n\n File getDirectory(int workerId);\n\n boolean isNewEnvironment();\n\n Map<String, String> getEnvironment();\n\...
import org.apache.tools.ant.BuildException; import static java.util.concurrent.TimeUnit.SECONDS; import java.io.IOException; import java.net.ServerSocket; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.TimeoutE...
/** * Copyright 2012-2013 LMAX Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
private final TestSpecificationFactory testSpecificationFactory;
1
ameba-proteus/triton-server
src/main/java/com/amebame/triton/service/cassandra/TritonCassandraSetup.java
[ "@Singleton\npublic class TritonServerCleaner {\n\t\n\tprivate static final Logger log = LogManager.getLogger(TritonServerCleaner.class);\n\t\n\tprivate List<TritonCleaner> cleaners;\n\n\tpublic TritonServerCleaner() {\n\t\tthis.cleaners = new ArrayList<TritonCleaner>();\n\t}\n\n\tpublic void add(TritonCleaner clea...
import javax.inject.Inject; import javax.inject.Singleton; import com.amebame.triton.server.TritonServerCleaner; import com.amebame.triton.server.TritonServerContext; import com.amebame.triton.service.cassandra.method.TritonCassandraClusterMethods; import com.amebame.triton.service.cassandra.method.TritonCassandraTable...
package com.amebame.triton.service.cassandra; @Singleton public class TritonCassandraSetup { @Inject private TritonServerCleaner cleaner; @Inject private TritonCassandraClient client;
@Inject private TritonServerContext context;
1
Semx11/Autotip
src/main/java/me/semx11/autotip/api/request/impl/LoginRequest.java
[ "@Mod(modid = Autotip.MOD_ID, name = Autotip.NAME, version = Autotip.VERSION, acceptedMinecraftVersions = Autotip.ACCEPTED_VERSIONS, clientSideOnly = true)\npublic class Autotip {\n\n public static final Logger LOGGER = LogManager.getLogger(\"Autotip\");\n\n static final String MOD_ID = \"autotip\";\n stat...
import com.mojang.authlib.GameProfile; import java.util.Optional; import me.semx11.autotip.Autotip; import me.semx11.autotip.api.GetBuilder; import me.semx11.autotip.api.RequestHandler; import me.semx11.autotip.api.RequestType; import me.semx11.autotip.api.reply.Reply; import me.semx11.autotip.api.reply.impl.LoginReply...
package me.semx11.autotip.api.request.impl; public class LoginRequest implements Request<LoginReply> { private final Autotip autotip; private final GameProfile profile; private final String hash; private final int tips; private LoginRequest(Autotip autotip, GameProfile profile, String hash, int ...
Optional<Reply> optional = RequestHandler.getReply(this, request.getURI());
2
radkovo/CSSBox
src/main/java/org/fit/cssbox/demo/StyleImport.java
[ "public class DOMAnalyzer \n{\n private static Logger log = LoggerFactory.getLogger(DOMAnalyzer.class);\n\tprivate static final String DEFAULT_MEDIA = \"screen\";\n\t\n private Document doc; //the root node of the DOM tree\n private URL baseUrl; //base URL\n private MediaSpec media; //media type\...
import org.fit.cssbox.io.DocumentSource; import org.w3c.dom.Document; import org.xml.sax.SAXException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import org.fit.cssbox.css.DOMAnalyzer; import org.fit.cssbox.css.NormalOutput; import org.fit.cssbo...
/* * StyleImport.java * Copyright (c) 2005-2014 Radek Burget * * CSSBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. ...
DOMSource parser = new DefaultDOMSource(docSource);
3
winstonli/writelatex-git-bridge
src/main/java/uk/ac/ic/wlgitbridge/git/handler/WLReceivePackFactory.java
[ "public class Bridge {\n\n private final Config config;\n\n private final ProjectLock lock;\n\n private final RepoStore repoStore;\n private final DBStore dbStore;\n private final SwapStore swapStore;\n private final SwapJob swapJob;\n private final GcJob gcJob;\n\n private final SnapshotApi...
import com.google.api.client.auth.oauth2.Credential; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.transport.ReceivePack; import org.eclipse.jgit.transport.resolver.ReceivePackFactory; import uk.ac.ic.wlgitbridge.bridge.Bridge; import uk.ac.ic.wlgitbridge.bridge.repo.RepoStore; import uk.ac.ic.wlgitbr...
package uk.ac.ic.wlgitbridge.git.handler; /** * Created by Winston on 02/11/14. */ /** * One of the "big three" interfaces created by {@link WLGitServlet} to handle * user Git requests. * * This class just puts a {@link WriteLatexPutHook} into the {@link ReceivePack} * that it returns. */ public class WLRece...
Oauth2Filter.ATTRIBUTE_KEY));
5
ethlo/itu
src/main/java/com/ethlo/time/DateTime.java
[ "public static final char DATE_SEPARATOR = '-';", "public static final char SEPARATOR_UPPER = 'T';", "public static final char TIME_SEPARATOR = ':';", "public static String finish(char[] buf, int length, final TimezoneOffset tz)\n{\n int tzLen = 0;\n if (tz != null)\n {\n tzLen = writeTz(buf, ...
import java.time.YearMonth; import java.util.Optional; import com.ethlo.time.internal.LimitedCharArrayIntegerUtil; import static com.ethlo.time.internal.EthloITU.DATE_SEPARATOR; import static com.ethlo.time.internal.EthloITU.SEPARATOR_UPPER; import static com.ethlo.time.internal.EthloITU.TIME_SEPARATOR; import static c...
return minute; } public int getSecond() { return second; } public int getNano() { return nano; } /** * Returns the time offset, if available * * @return the time offset, if available */ public Optional<TimezoneOffset> getOffset() { ...
LimitedCharArrayIntegerUtil.toString(date.getYear(), buffer, 0, 4);
4
rapidftr/RapidFTR-Android
RapidFTR-Android/src/test/java/com/rapidftr/model/EnquiryTest.java
[ "public class CustomTestRunner extends RobolectricTestRunner {\n\n public static List<FormSection> formSectionSeed = Arrays.asList(\n new FormSection(new HashMap<String, String>() {{\n put(\"en\", \"Section 1\");\n }}, 1, true, new HashMap<String, String>() {{\n ...
import com.rapidftr.CustomTestRunner; import com.rapidftr.RapidFtrApplication; import com.rapidftr.database.DatabaseSession; import com.rapidftr.database.ShadowSQLiteHelper; import com.rapidftr.repository.ChildRepository; import com.rapidftr.repository.EnquiryRepository; import com.rapidftr.repository.PotentialMatchRep...
package com.rapidftr.model; @RunWith(CustomTestRunner.class) public class EnquiryTest { private DatabaseSession session; private ChildRepository childRepository;
private PotentialMatchRepository potentialMatchRepository;
4
patrickfav/density-converter
src/main/java/at/favre/tools/dconvert/converters/postprocessing/WebpProcessor.java
[ "public class Arguments implements Serializable {\n private static final long serialVersionUID = 7;\n\n public static final float DEFAULT_SCALE = 3f;\n public static final float DEFAULT_COMPRESSION_QUALITY = 0.9f;\n public static final int DEFAULT_THREAD_COUNT = 4;\n public static final int MAX_THREA...
import at.favre.tools.dconvert.arg.Arguments; import at.favre.tools.dconvert.arg.ImageType; import at.favre.tools.dconvert.converters.Result; import at.favre.tools.dconvert.util.MiscUtil; import at.favre.tools.dconvert.util.PostProcessorUtil; import java.io.File; import java.util.Collections;
/* * Copyright 2016 Patrick Favre-Bulle * * 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 ...
String[] finalArg = MiscUtil.concat(MiscUtil.concat(new String[]{"cwebp"}, additionalArgs), new String[]{"%%sourceFilePath%%", "-o", "%%outFilePath%%"});
3
AstartesGuardian/WebDAV-Server
WebDAV-Server/src/webdav/server/virtual/entity/standard/ResourceInterface.java
[ "public class FileSystemPath\r\n{\r\n public FileSystemPath(String fileName, FileSystemPath parent)\r\n {\r\n this.fileName = fileName;\r\n this.parent = parent;\r\n this.fileSystemPathManager = parent.fileSystemPathManager;\r\n }\r\n public FileSystemPath(String fileName, FileSyste...
import http.FileSystemPath; import http.server.exceptions.UserRequiredException; import http.server.message.HTTPEnvRequest; import java.time.Instant; import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.function.Function; import javafx.util.Pai...
package webdav.server.virtual.entity.standard; public class ResourceInterface implements IResource { public ResourceInterface(IResource resource) { this.resource = resource; } private IResource resource; protected boolean computeMutation(HTTPEnvRequest env, Function<IResour...
public ResourceType getResourceType(HTTPEnvRequest env) throws UserRequiredException
7
tunaemre/Face-Swap-Android
faceSwap/src/main/java/com/tunaemre/opencv/faceswap/DownloaderActivity.java
[ "public class FreshDownloadView extends View\n{\n\n\t// the circular radius\n\tprivate float radius;\n\tprivate int circular_color;\n\tprivate int circular_progress_color;\n\tprivate float circular_width;\n\n\tprivate float circular_edge;\n\n\tprivate Rect bounds;\n\tprivate RectF mTempBounds;\n\tprivate float mRea...
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import com.pitt.library.fresh.FreshDownloadView; import com.tunaemre.opencv.faceswap.app.ExtendedCompatActivity; imp...
package com.tunaemre.opencv.faceswap; public class DownloaderActivity extends ExtendedCompatActivity { private FreshDownloadView downloadView = null; private Animation tweenAnimation = null; private FileDownloader fileDownloaderTask = null;
private PermissionOperator permissionOperator = new PermissionOperator();
7
kislayverma/Rulette
rulette-core/src/main/java/com/github/kislayverma/rulette/core/metadata/RuleSystemMetaData.java
[ "public class RuleInputConfiguration {\n private final String ruleInputName;\n private final IInputValueBuilder inputValueBuilder;\n\n public RuleInputConfiguration(String ruleInputName, IInputValueBuilder inputValueBuilder) {\n this.ruleInputName = ruleInputName;\n this.inputValueBuilder = i...
import com.github.kislayverma.rulette.core.ruleinput.RuleInputConfiguration; import com.github.kislayverma.rulette.core.ruleinput.RuleInputConfigurator; import com.github.kislayverma.rulette.core.ruleinput.RuleInputValueFactory; import com.github.kislayverma.rulette.core.ruleinput.value.DefaultDataType; import com.gith...
package com.github.kislayverma.rulette.core.metadata; /** * This class represents the rule systems entity model. */ public class RuleSystemMetaData { private final DefaultBuilderRegistry BUILDER_REGISTRY = new DefaultBuilderRegistry(); private final String ruleSystemName; private final String tableName...
this.uniqueIdColumnName, BUILDER_REGISTRY.getDefaultBuilder(DefaultDataType.STRING.name()));
3
tevjef/Vapor
vapor-app/src/main/java/com/tevinjeffrey/vapor/okcloudapp/CloudAppService.java
[ "public class AccountModel {\n\n private static final String TAG = \"AccountModel\";\n private long id;\n private String email;\n private String domain;\n private String domain_home_page;\n private boolean private_items;\n private boolean subscribed;\n private String subscription_expires_at;...
import com.squareup.okhttp.RequestBody; import com.tevinjeffrey.vapor.okcloudapp.model.AccountModel; import com.tevinjeffrey.vapor.okcloudapp.model.AccountStatsModel; import com.tevinjeffrey.vapor.okcloudapp.model.CloudAppJsonAccount; import com.tevinjeffrey.vapor.okcloudapp.model.CloudAppJsonItem; import com.tevinjeff...
package com.tevinjeffrey.vapor.okcloudapp; public interface CloudAppService { @Headers("Accept: application/json") @GET("/{item-id}") Observable<ItemModel> getItem(@Path("item-id") String itemId); @Headers("Accept: application/json") @GET("/items") Observable<List<ItemModel>> listItems(@Que...
Observable<AccountModel> getAccount();
0
WANdisco/s3hdfs
src/main/java/com/wandisco/s3hdfs/rewrite/redirect/MultiPartFileRedirect.java
[ "public class S3HdfsPath {\n private final String rootDir;\n private final String userName;\n private final String bucketName;\n private final String objectName;\n private final String partNumber;\n\n private String version;\n\n public S3HdfsPath() throws UnsupportedEncodingException {\n this(null, null, ...
import java.text.SimpleDateFormat; import java.util.*; import static com.wandisco.s3hdfs.conf.S3HdfsConstants.HTTP_METHOD.*; import static com.wandisco.s3hdfs.conf.S3HdfsConstants.*; import static com.wandisco.s3hdfs.rewrite.filter.S3HdfsFilter.ADD_WEBHDFS; import com.wandisco.s3hdfs.path.S3HdfsPath; import com.wandisc...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Collections.sort(sources, new PartComparator(path.getHdfsRootUploadPath()));
1
jordw/heftydb
src/main/java/com/jordanwilliams/heftydb/index/IndexBlock.java
[ "public class TableBlockCache<T extends Offheap> {\n\n public static class Entry {\n\n private final Long tableId;\n private final Long offset;\n\n private Entry(Long tableId, Long offset) {\n this.tableId = tableId;\n this.offset = offset;\n }\n\n public ...
import java.util.List; import com.codahale.metrics.Gauge; import com.googlecode.concurrentlinkedhashmap.Weigher; import com.jordanwilliams.heftydb.cache.TableBlockCache; import com.jordanwilliams.heftydb.data.Key; import com.jordanwilliams.heftydb.data.Value; import com.jordanwilliams.heftydb.metrics.Metrics; import co...
/* * 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...
public IndexRecord get(Key key) {
1
RoboTricker/Transport-Pipes
src/main/java/de/robotricker/transportpipes/listener/PlayerListener.java
[ "public class GeneralConf extends Conf {\n\n @Inject\n public GeneralConf(Plugin configPlugin) {\n super(configPlugin, \"config.yml\", \"config.yml\", true);\n }\n\n public int getMaxItemsPerPipe() {\n return (int) read(\"max_items_per_pipe\");\n }\n\n public boolean isCraftingEnable...
import de.robotricker.transportpipes.config.GeneralConf; import de.robotricker.transportpipes.duct.Duct; import de.robotricker.transportpipes.duct.DuctRegister; import de.robotricker.transportpipes.duct.manager.DuctManager; import de.robotricker.transportpipes.duct.manager.GlobalDuctManager; import de.robotricker.trans...
package de.robotricker.transportpipes.listener; public class PlayerListener implements Listener { @Inject
private GlobalDuctManager globalDuctManager;
4
XYScience/StopApp
app/src/main/java/com/sscience/stopapp/presenter/AppsPresenter.java
[ "public class AppInfo implements Serializable, Cloneable {\n\n private static final long serialVersionUID = -2984090829607150673L;\n public final static String APP_PACKAGE_NAME = \"appPackageName\";\n public final static String APP_NAME = \"appName\";\n public final static String APP_ICON = \"appIcon\";...
import android.content.Context; import com.sscience.stopapp.bean.AppInfo; import com.sscience.stopapp.database.AppInfoDBController; import com.sscience.stopapp.database.AppInfoDBOpenHelper; import com.sscience.stopapp.model.AppsRepository; import com.sscience.stopapp.model.GetAppsCallback; import com.sscience.stopapp.m...
package com.sscience.stopapp.presenter; /** * @author SScience * @description * @email chentushen.science@gmail.com * @data 2017/1/29 */ public class AppsPresenter implements AppsContract.Presenter { private Context mContext; private AppsContract.View mView; private AppsRepository mAppsRepositor...
(isChecked ? AppsRepository.COMMAND_DISABLE : COMMAND_ENABLE) + appInfo.getAppPackageName(),
7
MyGrades/mygrades-app
app/src/main/java/de/mygrades/main/processor/LoginProcessor.java
[ "public class University {\n\n private Long universityId;\n /** Not-null value. */\n private String name;\n private Boolean published;\n private String updatedAtServer;\n\n /** Used to resolve relations */\n private transient DaoSession daoSession;\n\n /** Used for active entity operations. ...
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import com.securepreferences.SecurePreferences; import de.greenrobot.event.EventBus; import de.mygrades.R; import de.mygrades.database.dao.University; import de.mygrades.database.dao.UniversityDao; imp...
package de.mygrades.main.processor; /** * LoginProcessor is responsible to securely save the username and password * and start the scraping afterwards. */ public class LoginProcessor extends BaseProcessor { public LoginProcessor(Context context) { super(context); } /** * Saves the usern...
LoginDataEvent loginDataEvent = new LoginDataEvent(username, universityId, ruleId, universityName);
3
mleoking/LeoTask
leotask/src/core/org/leores/net/mod/Model.java
[ "public abstract class RandomEngine extends PersistentObject {\r\n\t/**\r\n\t * Makes this class non instantiable, but still let's others inherit from\r\n\t * it.\r\n\t */\r\n\tprotected RandomEngine() {\r\n\t}\r\n\r\n\t/**\r\n\t * Equivalent to <tt>raw()</tt>.\r\n\t * This has the effect that random engines can no...
import org.leores.math.rand.RandomEngine; import org.leores.net.Link; import org.leores.net.Network; import org.leores.net.Networks; import org.leores.net.Node; import org.leores.util.Logger; import org.leores.util.able.NewInstanceable;
package org.leores.net.mod; public abstract class Model extends Logger { public RandomEngine rand;
public NewInstanceable<Node> nIaNode;
4
AstartesGuardian/WebDAV-Server
WebDAV-Server/src/webdav/server/virtual/ResourceMutationRemote.java
[ "public class HTTPEnvRequest\r\n{\r\n public static Builder create()\r\n {\r\n return new Builder();\r\n }\r\n public static class Builder\r\n {\r\n public Builder()\r\n { }\r\n \r\n private HTTPRequest request;\r\n private HTTPCommand command;\r\n pri...
import http.server.message.HTTPEnvRequest; import java.io.IOException; import java.net.URL; import webdav.server.resource.IResource; import webdav.server.virtual.entity.local.RsLocal; import webdav.server.virtual.entity.local.RsLocalFile; import webdav.server.virtual.entity.remote.IRemoteInterface; import webdav...
package webdav.server.virtual; public class ResourceMutationRemote implements IResourceMutation { @Override public MutationResult renameInvolvesMutation(HTTPEnvRequest env, IResource entity, String newName) { if(!entity.isInstanceOf(IRemoteInterface.class)) return MutationRe...
if(entity instanceof ResourceInterface)
6
signalfx/signalfx-java
signalfx-java/src/main/java/com/signalfx/metrics/flush/AggregateMetricSender.java
[ "public class SignalFxMetricsException extends RuntimeException {\n private static final long serialVersionUID = 1L;\n\n public SignalFxMetricsException() {\n }\n\n public SignalFxMetricsException(String message) {\n super(message);\n }\n\n public SignalFxMetricsException(String message, Th...
import static java.util.Objects.requireNonNull; import com.signalfx.metrics.SignalFxMetricsException; import com.signalfx.metrics.auth.AuthToken; import com.signalfx.metrics.auth.NoAuthTokenException; import com.signalfx.metrics.connection.DataPointReceiver; import com.signalfx.metrics.connection.DataPointReceiverFacto...
} @Override public Session setCumulativeCounter(String metric, long value) { return setCumulativeCounter(defaultSourceName, metric, value); } @Override public Session setCumulativeCounter(String source, String metric, long value) { setDatapoint(s...
DataPointReceiver dataPointReceiver = dataPointReceiverFactory
3
ForeverWJY/CoolQ_Java_Plugin
src/main/java/com/wjyup/coolq/util/MessageHandle.java
[ "@Getter\n@Setter\npublic class GroupApplication implements Serializable {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate Integer id;\n\tprivate Integer type;// 类型\n\tprivate Integer subType;// 子类型\n\tprivate String qq;// qq\n\tprivate String group;// 群\n\tprivate String discuss;// 讨论组\n\tprivat...
import com.wjyup.coolq.entity.GroupApplication; import com.wjyup.coolq.entity.RequestData; import com.wjyup.coolq.event.GroupMsgEvent; import com.wjyup.coolq.event.PrivateMsgEvent; import com.wjyup.coolq.eventbus.XEventBus; import com.wjyup.coolq.vo.SettingVO; import org.apache.commons.lang3.StringUtils; import org.apa...
package com.wjyup.coolq.util; /** * 处理消息的线程 * @author WJY */ public class MessageHandle implements Runnable{ private final Logger log = LogManager.getLogger(MessageHandle.class); private RequestData data;
private XEventBus eventBus;
4
xyxyLiu/PluginM
PluginManager/src/main/java/com/reginald/pluginm/core/PluginContext.java
[ "public final class PluginInfo implements Parcelable {\n // install info\n public String packageName;\n public String apkPath;\n public String versionName;\n public int versionCode;\n public long fileSize;\n public long lastModified;\n public String dataDir;\n public String dexDir;\n p...
import com.reginald.pluginm.PluginInfo; import com.reginald.pluginm.PluginNotFoundException; import com.reginald.pluginm.stub.PluginContentResolver; import com.reginald.pluginm.stub.StubManager; import com.reginald.pluginm.utils.Logger; import android.content.ComponentName; import android.content.ContentResolver; impor...
package com.reginald.pluginm.core; /** * Created by lxy on 16-6-28. */ public class PluginContext extends ContextThemeWrapper { private static final String TAG = "PluginContext"; private Context mBaseContext; private PluginInfo mPluginInfo; private String mApkPath; private AssetManager mAsset...
mContentResolver = new PluginContentResolver(mBaseContext, super.getContentResolver());
2
aschaetzle/Sempala
sempala-loader/src/main/java/de/uni_freiburg/informatik/dbis/sempala/loader/ExtVPLoader.java
[ "public final class CreateStatement {\n\t\n\n\t/** An enumertation of the data types supported by impala 2.2 */\n\tpublic enum DataType {\n\t\tTINYINT,\n\t\tSMALLINT,\n\t\tINT,\n\t\tBIGINT,\n\t\tBOOLEAN,\n\t\tFLOAT,\n\t\tDOUBLE,\n\t\tDECIMAL,\n\t\tSTRING,\n\t\tCHAR,\n\t\tVARCHAR,\n\t\tTIMESTAMP\n\t}\n\n\t/** An enu...
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import de.uni_freiburg.in...
CreateStatsTables("TIME",hdfs_input_directory,HdfsUserPath); CreateStatsTables("EMPTY",hdfs_input_directory,HdfsUserPath); } catch (IllegalArgumentException | IOException e) { System.out.println("Stats tables could not be created. "); e.printStackTrace(); } System.out.println(String.format(" [%.3fs]",...
CreateStatement cstmtSO = CreateTable(p1, p2, ExtVPFormat, mainstmt);
0
RepreZen/KaiZen-OpenAPI-Editor
com.reprezen.swagedit.core/src/com/reprezen/swagedit/core/assist/contexts/ComponentContextType.java
[ "public class JsonReference {\n\n public static final String PROPERTY = \"$ref\";\n\n /**\n * Represents an unqualified reference, this class is used to support deprecated references.\n */\n public static class SimpleReference extends JsonReference {\n\n SimpleReference(URI baseURI, JsonPoin...
import java.util.Collection; import com.fasterxml.jackson.core.JsonPointer; import com.fasterxml.jackson.databind.JsonNode; import com.reprezen.swagedit.core.json.references.JsonReference; import com.reprezen.swagedit.core.model.AbstractNode; import com.reprezen.swagedit.core.model.Model; import com.reprezen.swagedit.c...
/******************************************************************************* * Copyright (c) 2016 ModelSolv, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
public boolean canProvideProposal(Model model, JsonPointer pointer) {
2
trezor/trezor-android
cgcmn-liban/src/main/java/com/circlegate/liban/base/CommonClasses.java
[ "public static abstract class ApiCreator<T> implements Parcelable.Creator<T> {\n @Override\n public final T createFromParcel(Parcel source) {\n ApiParcelInputWrp wrp = new ApiParcelInputWrp(source);\n return create(wrp);\n }\n\n public abstract T create(ApiDataInput d);\n}", "public stat...
import java.util.Map.Entry; import android.content.Context; import android.graphics.Bitmap; import com.circlegate.liban.base.ApiBase.ApiCreator; import com.circlegate.liban.base.ApiBase.ApiParcelable; import com.circlegate.liban.base.ApiDataIO.ApiDataInput; import com.circlegate.liban.base.ApiDataIO.ApiDataOutput; impo...
package com.circlegate.liban.base; public class CommonClasses { public interface IGlobalContext { Context getAndroidContext(); boolean getAppIsInProductionMode(); } public static class Couple<TFirst, TSecond> { private final TFirst first; private final TSecond second; ...
public LargeHash(ApiDataInput d) {
2
chudooder/FEMultiplayer
src/net/fe/builderStage/TeamBuilderStage.java
[ "public class FightStage extends Stage {\r\n\tprivate Unit left, right;\r\n\tprivate FightUnit leftFighter, rightFighter;\r\n\tprivate Healthbar leftHP, rightHP;\r\n\tprivate int range;\r\n\tprivate boolean done;\r\n\r\n\tprivate ArrayList<AttackRecord> attackQ;\r\n\r\n\tprivate Texture bg;\r\n\tprivate int current...
import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import net.fe.*; import net.fe.fightStage.FightStage; import net.fe.modifier.Modif...
// Send the server a PartyMessage FEMultiplayer.setCurrentStage(new ClientWaitStage(session)); PartyMessage pm = new PartyMessage(units); FEMultiplayer.getClient().sendMessage(pm); } public void cancel(){ control = true; refresh(); } }); } }; } e...
Renderer.drawBorderedRectangle(9, table_ystart-2, 471, table_ystart+14, 0.9f,
5
CvvT/DexTamper
src/com/cc/dextamper/builder/BuilderReference.java
[ "public class DexBackedDexFile extends BaseDexBuffer implements DexFile {\n private final Opcodes opcodes;\n\n private final int stringCount;\n private final int stringStartOffset;\n private final int typeCount;\n private final int typeStartOffset;\n private final int protoCount;\n private fina...
import java.util.List; import org.jf.dexlib2.dexbacked.DexBackedDexFile; import org.jf.dexlib2.iface.ClassDef; import org.jf.dexlib2.iface.Method; import org.jf.dexlib2.iface.MethodImplementation; import org.jf.dexlib2.iface.reference.Reference; import org.jf.dexlib2.writer.builder.BuilderAnnotationSet; import org.jf.d...
package com.cc.dextamper.builder; public class BuilderReference { public static Reference makeStringReference(String str){ if (str == null) return null; return new BuilderStringReference(str); } public static Reference makeTypeReference(String str){ return new BuilderTypeReference((BuilderStringRefer...
public static Reference makeMethodReference(DexBackedDexFile dexfile, String className, String methodName){
0
MyCATApache/Mycat-JCache
src/main/java/io/mycat/jcache/net/conn/handler/BinaryIOHandler2.java
[ "public final class BinaryProtocol {\r\n\t\r\n public final static int memcache_packetHeaderSize = 24; //二进制协议头 长度固定为 24字节\r\n \r\n\tpublic final byte[] BLAND_DATA_SIZE = \" \".getBytes();\r\n\tpublic static final int MARKER_BYTE = 1;\r\n\tpublic static final int MARKER_BOOLEAN = 8192;\r\n\tpublic stat...
import java.io.IOException; import java.nio.ByteBuffer; import io.mycat.jcache.enums.protocol.binary.BinaryProtocol; import io.mycat.jcache.enums.protocol.binary.ProtocolResponseStatus; import io.mycat.jcache.net.JcacheGlobalConfig; import io.mycat.jcache.net.command.BinaryCommand; import io.mycat.jcache.net.comm...
package io.mycat.jcache.net.conn.handler; public class BinaryIOHandler2 implements IOHandler{ @Override public boolean doReadHandler(Connection conn) throws IOException { BinaryCommand command = null; final ByteBuffer readbuffer = conn.getReadDataBuffer(); int offset = readbuffer.position(); ...
ProtocolResponseStatus.PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND.getStatus());
1
lucmoreau/OpenProvenanceModel
tupelo/src/test/java/org/openprovenance/rdf/Annotation1Test.java
[ "public class OPMFactory implements CommonURIs {\n\n public static String roleIdPrefix=\"r_\";\n public static String usedIdPrefix=\"u_\";\n public static String wasGenerateByIdPrefix=\"g_\";\n public static String wasDerivedFromIdPrefix=\"d_\";\n public static String wasTriggeredByIdPrefix=\"t_\";\n...
import java.io.File; import java.io.StringWriter; import java.util.Collection; import java.util.Collections; import java.util.LinkedList; import java.util.List; import javax.xml.bind.JAXBException; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.openprovenance....
package org.openprovenance.rdf; /** * Unit test for simple App. */ public class Annotation1Test extends TestCase { /** * Create the test case * * @param testName name of the test case */ public Annotation1Test( String testName ) { super( testName ); } /** ...
OPMFactory oFactory=new OPMFactory();
0
softwarespartan/TWS
src/apidemo/ContractInfoPanel.java
[ "public class HtmlButton extends JLabel {\n\tstatic Color light = new Color( 220, 220, 220);\n\t\n\tprivate String m_text;\n\tprotected boolean m_selected;\n\tprivate ActionListener m_al;\n\tprivate Color m_bg = getBackground();\n\n\tpublic boolean isSelected() { return m_selected; }\n\t\n\tpublic void setSelected(...
import java.awt.BorderLayout; import java.awt.Desktop; import java.io.File; import java.io.FileWriter; import java.util.ArrayList; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import apidemo.util...
/* Copyright (C) 2013 Interactive Brokers LLC. All rights reserved. This code is subject to the terms * and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable. */ package apidemo; public class ContractInfoPanel extends JPanel { private final NewContract m_contract =...
VerticalPanel rightPanel = new VerticalPanel();
4
hea3ven/BuildingBricks
src/main/java/com/hea3ven/buildingbricks/core/materials/loader/MaterialParser.java
[ "public class Material {\n\n\tprivate String materialId;\n\tprivate Map<String, String> textures = new HashMap<>();\n\tprivate StructureMaterial structureMaterial;\n\tprivate BlockRotation blockRotation;\n\tprivate float hardness = 1.0f;\n\tprivate float resistance = 5.0f;\n\tprivate String normalHarvestMaterial;\n...
import java.io.InputStream; import java.io.InputStreamReader; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.common.base.Charsets; import com.google.common.collect.ImmutableMap; import com.google.gson.*; import net.mine...
matBuilder = materials.get(matId); if (matBuilder == null) { matBuilder = new MaterialBuilderSimple(matId); materials.put(matId, (MaterialBuilderSimple) matBuilder); } } else if (json.get("meta").getAsString().equals("dye")) { matBuilder = new MaterialBuilderDyeMeta(materials, matId); } ...
private final Material[] materials;
0
setial/intellij-javadocs
src/main/java/com/github/setial/intellijjavadocs/generator/impl/AbstractJavaDocGenerator.java
[ "public interface JavaDocConfiguration {\n\n\n /**\n * The constant COMPONENT_NAME.\n */\n String COMPONENT_NAME = \"JavaDocConfiguration\";\n\n /**\n * The constant COMPONENT_VERSION.\n */\n String COMPONENT_CONFIG_VERSION = \"4.0.1\";\n\n /**\n * The constant COMPONENT_CONFIG_PA...
import com.github.setial.intellijjavadocs.configuration.JavaDocConfiguration; import com.github.setial.intellijjavadocs.generator.JavaDocGenerator; import com.github.setial.intellijjavadocs.model.JavaDoc; import com.github.setial.intellijjavadocs.model.settings.JavaDocSettings; import com.github.setial.intellijjavadocs...
package com.github.setial.intellijjavadocs.generator.impl; /** * The type Abstract java doc generator. * * @param <T> the type parameter * @author Sergey Timofiychuk */ public abstract class AbstractJavaDocGenerator<T extends PsiElement> implements JavaDocGenerator<T> { private DocTemplateManager docTempla...
Mode mode = configuration.getGeneralSettings().getMode();
4
idega/se.idega.idegaweb.commune.accounting
src/java/se/idega/idegaweb/commune/accounting/export/ifs/business/IFSCreateExcelFileUtil.java
[ "public class PaymentComparator implements Comparator {\n\n\tprivate Collator collator;\n\tprivate String compareString1;\n\tprivate String compareString2;\n\t/** \n\t * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)\n\t */\n\t\n\tpublic int compare(Object o1, Object o2) {\t\t\n\t\tthis.colla...
import java.io.FileOutputStream; import java.io.IOException; import java.rmi.RemoteException; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Locale; import javax.ejb.FinderException; import org.apache.poi....
createStyleAlignRight(); while (it.hasNext()) { PaymentRecord pRec = (PaymentRecord) it.next(); School school = pRec.getPaymentHeader().getSchool(); if (pRec.getTotalAmount() != 0.0f) { amount = AccountingUtil.roundAmount(pRec.getTotalAmount()); if (fileType == FILE_TYPE_OWN_POSTING || fileT...
PaymentHeader pHead = (PaymentHeader) it.next();
3
PPiMapBuilder/PPiMapBuilder
src/main/java/ch/picard/ppimapbuilder/networkbuilder/query/tasks/protein/FetchDirectInteractionOtherOrganismsTask.java
[ "public class UniProtEntry extends Protein {\n\n\tprivate final LinkedHashSet<String> accessions;\n\tprivate final String geneName;\n\tprivate final Set<String> synonymGeneNames;\n\tprivate final String proteinName;\n\tprivate final String ecNumber;\n\tprivate final boolean reviewed;\n\tprivate final GeneOntologyTe...
import java.util.*; import java.util.concurrent.Callable; import ch.picard.ppimapbuilder.data.interaction.client.web.PsicquicService; import ch.picard.ppimapbuilder.data.organism.Organism; import ch.picard.ppimapbuilder.data.protein.UniProtEntry; import ch.picard.ppimapbuilder.data.protein.UniProtEntrySet; import ch.pi...
/* * This file is part of PPiMapBuilder. * * PPiMapBuilder is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PPiMapBuilder is...
new ConcurrentExecutor<PrimaryInteractionQuery>(executorServiceManager, otherOrganisms.size()) {
3
gstreamer-java/gst1-java-core
src/org/freedesktop/gstreamer/Buffer.java
[ "public interface GstBufferAPI extends com.sun.jna.Library {\n \n GstBufferAPI GSTBUFFER_API = GstNative.load(GstBufferAPI.class);\n\n public static final int GST_LOCK_FLAG_READ = (1 << 0);\n public static final int GST_LOCK_FLAG_WRITE = (1 << 1);\n public static final int GST_MAP_READ = GST_LOCK_FLA...
import com.sun.jna.Pointer; import com.sun.jna.ptr.PointerByReference; import java.util.EnumSet; import java.util.Iterator; import java.util.NoSuchElementException; import org.freedesktop.gstreamer.glib.NativeFlags; import org.freedesktop.gstreamer.glib.Natives; import org.freedesktop.gstreamer.lowlevel.GType; import o...
/* * Copyright (c) 2020 Neil C Smith * Copyright (c) 2019 Christophe Lafolet * Copyright (C) 2014 Tom Greenwood <tgreenwood@cafex.com> * Copyright (C) 2007 Wayne Meissner * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> * 2000 Wim Taymans <wtay@chello.be> * * This file is part of...
private final MapInfoStruct mapInfo;
2
Wokdsem/Kinject
compiler/src/main/java/com/wokdsem/kinject/codegen/ModuleAdapterSpec.java
[ "public class Dependency {\n\n\tpublic final String canonicalClassName;\n\tpublic final String named;\n\n\tpublic Dependency(String canonicalClassName, String named) {\n\t\tthis.canonicalClassName = canonicalClassName;\n\t\tthis.named = named;\n\t}\n\n}", "public class Module {\n\n\tpublic final String canonicalM...
import com.squareup.javapoet.ClassName; import com.squareup.javapoet.MethodSpec; import com.squareup.javapoet.ParameterizedTypeName; import com.squareup.javapoet.TypeSpec; import com.wokdsem.kinject.annotations.Provides; import com.wokdsem.kinject.codegen.domains.Dependency; import com.wokdsem.kinject.codegen.domains.M...
package com.wokdsem.kinject.codegen; class ModuleAdapterSpec { static TypeSpec getModuleAdapterSpec(Module module, String adapterName) { List<MethodSpec> methods = getMethods(module.canonicalModuleName, module.provides); return TypeSpec .classBuilder(adapterName) .addModifiers(PUBLIC, FINAL) .addMeth...
.addSuperinterface(ParameterizedTypeName.get(ClassName.get(Provider.class), className))
4
DaanVanYperen/odb-little-fortune-planet
core/src/net/mostlyoriginal/game/system/planet/PlanetRenderGravityDebugSystem.java
[ "public class G {\n\n public static final int LOGO_WIDTH = 280;\n public static final int LOGO_HEIGHT = 221;\n public static final int LAYER_CURSOR = 2000;\n\n public static final boolean PRODUCTION = false;\n\n public static final boolean INTERLACING_SIMULATION = true;\n\n public static final boo...
import com.artemis.Aspect; import com.artemis.E; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureRegion; import net.mostlyoriginal.api.system.camera.CameraSystem; import net.mostlyoriginal.gam...
package net.mostlyoriginal.game.system.planet; /** * @author Daan van Yperen */ public class PlanetRenderGravityDebugSystem extends FluidIteratingSystem { private SpriteBatch batch; private TextureRegion planetPixel; public boolean active; public PlanetRenderGravityDebugSystem() { super(As...
batch.draw(planetPixel, x+PLANET_X, y+ PLANET_Y);
5
criticalmaps/criticalmaps-android
app/src/main/java/de/stephanlindauer/criticalmaps/Main.java
[ "@Singleton\npublic class PermissionCheckHandler {\n private Activity activity;\n private PermissionRequest activePermissionRequest;\n\n @Inject\n @SuppressWarnings(\"WeakerAccess\")\n public PermissionCheckHandler() {\n }\n\n public void attachActivity(Activity activity) {\n Timber.d(\"...
import android.animation.ArgbEvaluator; import android.animation.ValueAnimator; import android.annotation.TargetApi; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.drawable.GradientDrawable; import android.net.Uri; import android.os.Build; i...
package de.stephanlindauer.criticalmaps; public class Main extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { private final static String KEY_NAV_ID = "main_navid"; private final static String KEY_SAVED_FRAGMENT_STATES = "main_savedfragmentstate"; private final s...
public PermissionCheckHandler permissionCheckHandler;
0
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 filepath = UIHelper.getImageRoot(LNReaderApplication.getInstance().getApplicationContext()) + url.getFile();
1
Azanor/thaumcraft-api
internal/DummyInternalMethodHandler.java
[ "public interface ISeal {\n\t\n\t/**\n\t * @return\n\t * A unique string identifier for this seal. A good idea would be to append your modid before the identifier. \n\t * For example: \"thaumcraft:fetch\"\n\t * This will also be used to create the item model for the seal placer so you will have to define a json usi...
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.capabilities.IPlayerKnowledge.EnumKnowledgeType; import thaumcraft.api.capabilities.IPlayerWarp...
package thaumcraft.api.internal; public class DummyInternalMethodHandler implements IInternalMethodHandler { @Override public boolean completeResearch(EntityPlayer player, String researchkey) { // TODO Auto-generated method stub return false; } @Override public void addWarpToPlayer(EntityPlayer player, in...
public ISealEntity getSealEntity(int dim, SealPos pos) {
1
TrumanDu/AutoProgramming
src/main/java/com/aibibang/web/system/controller/SysUserController.java
[ "public class BaseController {\r\n\r\n\t/**\r\n\t * 将前台传递过来的日期格式的字符串,自动转化为Date类型\r\n\t * \r\n\t * @param binder\r\n\t */\r\n\t@InitBinder\r\n\tpublic void initBinder(ServletRequestDataBinder binder) {\r\n\r\n\t\tbinder.registerCustomEditor(Date.class, new DateConvertEditor());\r\n\t}\r\n\t\r\n\t/**\r\n\t * 抽取由逗号分隔的...
import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com....
package com.aibibang.web.system.controller; /** * * 用户管理controller * * <pre> * 历史记录: * 2016-07-17 21:17 King * 新建文件 * </pre> * * @author * <pre> * SD * King * PG * King * UT * * MA * </pre> * @version $Rev$ * * <p/> $Id$ * */ @Controller @RequestMapping("/user") public class SysUser...
private SysRoleService sysRoleService;
7
iostackproject/SDGen
src/com/ibm/scan/user/DataCompressibilityScanner.java
[ "public abstract class AbstractChunkCharacterization implements Serializable, Cloneable{\n\t\n\tprivate static final long serialVersionUID = 1L;\n\t/*Size of the chunk during the scan process*/\n\tprotected int size = 0; \n\t/*Amount of non unique data of this chunk across a dataset*/\n\tprotected int deduplicatedD...
import com.ibm.characterization.AbstractChunkCharacterization; import com.ibm.characterization.Histogram; import com.ibm.characterization.IntegersHistogram; import com.ibm.characterization.user.MotifChunkCharacterization; import com.ibm.compression.JZlibCompression; import com.ibm.scan.AbstractChunkScanner; import com....
/* * Copyright (C) 2014 Raul Gracia-Tinedo * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This progr...
RepetitionTracker repetitionTracker = repetitionFinder.getRepetitions();
6
Maximuspayne/NavyCraft2-Lite
src/com/maximuspayne/navycraft/MoveCraft_PlayerListener.java
[ "public class AimCannon{\n\tpublic static List<OneCannon> cannons = new ArrayList<OneCannon>();\n\tpublic static List<Weapon> weapons = new ArrayList<Weapon>();\n\t\n\tpublic static List<OneCannon> getCannons() {\n\t\treturn cannons;\n\t}\n\n\tpublic static List<Weapon> getWeapons() {\n\t\treturn weapons;\n\t}\n\n}...
import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.bukkit.ChatColor; import org.bukkit.Chunk; import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Sound; impo...
if (split[0].equalsIgnoreCase("movecraft") || split[0].equalsIgnoreCase("navycraft") || split[0].equalsIgnoreCase("nc")) { /*if (!PermissionInterface.CheckPermission(player, "navycraft." + event.getMessage().substring(1))) { return; }*/ if (split[0].equalsIgnoreCase("movecraft")) player.sendMessa...
for (Weapon w : AimCannon.weapons) {
0
tomayac/rest-describe-and-compile
src/com/google/code/apis/rest/client/GUI/DiscoveredItemsDialog.java
[ "public class WadlTreeRoot {\r\n public Tree tree = new Tree(); \r\n\r\n public WadlTreeRoot() { \r\n return; \r\n }\r\n \r\n public Tree buildTree(ApplicationNode application) {\r\n // application root item\r\n ApplicationItem applicationItem = new ApplicationItem(application);\r\n TreeItem ap...
import java.util.Iterator; import java.util.Vector; import com.google.code.apis.rest.client.Tree.WadlTreeRoot; import com.google.code.apis.rest.client.Wadl.Analyzer; import com.google.code.apis.rest.client.Wadl.GrammarsNode; import com.google.code.apis.rest.client.Wadl.NamespaceAttribute; import com.google.code.apis.re...
WadlPanel.wadlArea.clear(); WadlPanel.wadlArea.setWidget(wadlTree); } }); containerPanel.add(addNamespaceButton); } final Button addOtherNamespacesButton = new Button(GuiFactory.strings.addOtherNamespace()); // other namespaces if (!otherNamespaces.isEmp...
(!namespaceString.equals(WadlXml.xmlns_xsd)) &&
4
Nilhcem/droidcontn-2016
app/src/main/java/com/nilhcem/droidcontn/ui/speakers/list/SpeakersListFragment.java
[ "@DebugLog\npublic class DroidconApp extends Application {\n\n private AppComponent component;\n\n public static DroidconApp get(Context context) {\n return (DroidconApp) context.getApplicationContext();\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n AndroidTh...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; import com.nilhcem.droidcont...
package com.nilhcem.droidcontn.ui.speakers.list; public class SpeakersListFragment extends BaseFragment<SpeakersListPresenter> implements SpeakersListView { @Inject Picasso picasso; @Inject DataProvider dataProvider; @Bind(R.id.speakers_list_loading) ProgressBar loading; @Bind(R.id.speakers_list...
recyclerView.addItemDecoration(new MarginDecoration(getContext()));
4
googlemaps/java-fleetengine-auth
src/test/java/com/google/fleetengine/auth/token/factory/FleetEngineTokenFactoryTest.java
[ "@VisibleForTesting static final Duration TOKEN_EXPIRATION = Duration.ofMinutes(60);", "public class DeliveryVehicleClaims implements FleetEngineTokenClaims {\n private static final String WILDCARD = \"*\";\n static final String CLAIM_DELIVERY_VEHICLE_ID = \"deliveryvehicleid\";\n private final ImmutableMap<St...
import static com.google.common.truth.Truth.assertThat; import static com.google.fleetengine.auth.token.FleetEngineTokenType.CONSUMER; import static com.google.fleetengine.auth.token.FleetEngineTokenType.CUSTOM; import static com.google.fleetengine.auth.token.FleetEngineTokenType.DRIVER; import static com.google.fleete...
// 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 ...
FleetEngineToken signedToken = factory.createConsumerToken(TripClaims.create(TEST_TRIP_ID));
5
xia-st/JPython
src/pers/xia/jpython/parser/ParseToken.java
[ "public final class GramInit{\r\n\r\n public static Arc[] arcs_0_0 = {\r\n new Arc(4, 1),\r\n new Arc(2, 2),\r\n new Arc(3, 2),\r\n };\r\n\r\n public static Arc[] arcs_0_1 = {\r\n new Arc(2, 2),\r\n };\r\n\r\n public static Arc[] arcs_0_2 = {\r\n new Arc(1, -1),\r\n...
import java.io.File; import pers.xia.jpython.grammar.GramInit; import pers.xia.jpython.grammar.Grammar; import pers.xia.jpython.object.PyExceptions; import pers.xia.jpython.parser.Parser.ReturnCode; import pers.xia.jpython.tokenizer.TokState; import pers.xia.jpython.tokenizer.Token; import pers.xia.jpython.token...
package pers.xia.jpython.parser; public class ParseToken { public static Node parseFile(File file, Grammar grammar, int start) { try { Parser parser = new Parser(grammar, start);
Tokenizer tokenizer = new Tokenizer(file);
6
santoslab/aadl-translator
edu.ksu.cis.projects.mdcf.aadl-translator-test/src/test/java/edu/ksu/cis/projects/mdcf/aadltranslator/view/AppUserImplViewTests.java
[ "public final static String MAIN_PLUGIN_BUNDLE_ID = \"edu.ksu.cis.projects.mdcf.aadl-translator\";", "public final static String TEMPLATE_DIR = \"src/main/resources/templates/\";", "public static boolean initComplete = false;", "public static void runWriterTest(String testName, Object var, String varName,\n\t...
import static edu.ksu.cis.projects.mdcf.aadltranslator.test.AllTests.MAIN_PLUGIN_BUNDLE_ID; import static edu.ksu.cis.projects.mdcf.aadltranslator.test.AllTests.TEMPLATE_DIR; import static edu.ksu.cis.projects.mdcf.aadltranslator.test.AllTests.initComplete; import static edu.ksu.cis.projects.mdcf.aadltranslator.test...
package edu.ksu.cis.projects.mdcf.aadltranslator.view; public class AppUserImplViewTests { // Enable to overwrite existing expected values // Note that doing so will cause all tests to fail until this value is // re-disabled. private final static boolean GENERATE_EXPECTED = true; private final st...
URL appSuperClassStgUrl = Platform.getBundle(MAIN_PLUGIN_BUNDLE_ID)
0
citerus/bookstore-cqrs-example
order-context-parent/order-command/src/test/java/se/citerus/cqrs/bookstore/ordercontext/order/domain/OrderTest.java
[ "public abstract class DomainEvent<T extends GenericId> implements Serializable {\n\n public final T aggregateId;\n public final int version;\n public final long timestamp;\n\n protected DomainEvent(T aggregateId, int version, long timestamp) {\n this.aggregateId = aggregateId;\n this.version = version;\n...
import org.junit.Test; import se.citerus.cqrs.bookstore.event.DomainEvent; import se.citerus.cqrs.bookstore.ordercontext.order.BookId; import se.citerus.cqrs.bookstore.ordercontext.order.OrderId; import se.citerus.cqrs.bookstore.ordercontext.order.ProductId; import se.citerus.cqrs.bookstore.ordercontext.order.event.Ord...
package se.citerus.cqrs.bookstore.ordercontext.order.domain; public class OrderTest { private static final CustomerInformation JOHN_DOE = new CustomerInformation("John Doe", "john@acme.com", "Highway street 1"); @Test public void placingAnOrder() { Order order = new Order(); OrderLine orderLine = ne...
List<DomainEvent> uncommittedEvents = order.getUncommittedEvents();
0
emina/kodkod
test/kodkod/test/unit/IntTest.java
[ "public abstract class Expression extends Node {\n\t\n\t/** The universal relation: contains all atoms in a {@link kodkod.instance.Universe universe of discourse}. */\n\tpublic static final Expression UNIV = new ConstantExpression(\"univ\", 1);\n\t\n\t/** The identity relation: maps all atoms in a {@link kodkod.in...
import static kodkod.ast.operator.IntCompOperator.EQ; import static kodkod.ast.operator.IntCompOperator.GT; import static kodkod.ast.operator.IntCompOperator.GTE; import static kodkod.ast.operator.IntCompOperator.LT; import static kodkod.ast.operator.IntCompOperator.LTE; import static kodkod.ast.operator.IntOperator.AN...
package kodkod.test.unit; /** * Tests translation of cardinality expressions/formulas. * * @author Emina Torlak */ public class IntTest { private static final int SIZE = 16; private final TupleFactory factory; private final Solver solver; private final Relation r1; private Bounds bounds; public IntTest(...
private IntExpression[] constants() {
1
Qihoo360/RePlugin
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/loader2/PmHostSvc.java
[ "public class RePlugin {\n\n static final String TAG = \"RePlugin\";\n\n /**\n * 表示目标进程根据实际情况自动调配\n */\n public static final String PROCESS_AUTO = \"\" + IPluginManager.PROCESS_AUTO;\n\n /**\n * 表示目标为UI进程\n */\n public static final String PROCESS_UI = \"\" + IPluginManager.PROCESS_UI;...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ActivityInfo; import android.os.Binder; import android.os.IBinder; import android.os.Parcelable; import android.os.RemoteException; import android.suppo...
/* * Copyright (C) 2005-2017 Qihoo 360 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 ag...
public List<PluginInfo> listPlugins() throws RemoteException {
3
shixinzhang/GardenOfFeeling
app/src/main/java/sxkeji/net/dailydiary/common/activities/MainActivity.java
[ "public class BaseActivity extends AppCompatActivity {\n private final String TAG = \"BaseActivity\";\n private String mTheme;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n setTheme();\n super.onCreate(savedInstanceState);\n }\n\n\n /**\n * 根据设置选择主题\n ...
import android.animation.ObjectAnimator; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.os.Process; import android.os.SystemClock; import android.support.design.widget.AppBarLayout; import android.support.design.widget.Coord...
changeBgAndCloseDrawer(rlSetting); jumpToActivity(SettingActivity.class); // jumpToActivity(CreateGestureActivity.class); } }); rlAbout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v...
HttpClient.builder(MainActivity.this).get(Constant.URL_OPEN_EYE_DIALY, map, new HttpResponseHandler() {
2
jagrosh/MusicBot
src/main/java/com/jagrosh/jmusicbot/audio/AudioHandler.java
[ "public class JMusicBot \n{\n public final static String PLAY_EMOJI = \"\\u25B6\"; // ▶\n public final static String PAUSE_EMOJI = \"\\u23F8\"; // ⏸\n public final static String STOP_EMOJI = \"\\u23F9\"; // ⏹\n public final static Permission[] RECOMMENDED_PERMS = {Permission.MESSAGE_READ, Permission.M...
import com.jagrosh.jmusicbot.JMusicBot; import com.jagrosh.jmusicbot.playlist.PlaylistLoader.Playlist; import com.jagrosh.jmusicbot.settings.RepeatMode; import com.sedmelluq.discord.lavaplayer.player.AudioPlayer; import com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter; import com.sedmelluq.discord.lavapl...
/* * Copyright 2016 John Grosh <john.a.grosh@gmail.com>. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
Settings settings = manager.getBot().getSettingsManager().getSettings(guildId);
4
mediaworx/opencms-intellijplugin
src/com/mediaworx/intellij/opencmsplugin/listeners/OpenCmsModuleFileChangeListener.java
[ "@State(\r\n\tname = \"OpenCmsPluginConfigurationData\",\r\n\tstorages = {\r\n\t\t@Storage( StoragePathMacros.WORKSPACE_FILE),\r\n\t\t@Storage( \"opencms.xml\")\r\n\t}\r\n)\r\npublic class OpenCmsPlugin implements ProjectComponent, PersistentStateComponent<OpenCmsPluginConfigurationData> {\r\n\r\n\tprivate static f...
import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.newvfs.BulkFileListener; import com.intellij.o...
/* * This file is part of the OpenCms plugin for IntelliJ by mediaworx. * * For further information about the OpenCms plugin for IntelliJ, please * see the project website at GitHub: * https://github.com/mediaworx/opencms-intellijplugin * * Copyright (C) 2007-2016 mediaworx berlin AG (http://www.mediaworx.com) ...
catch (CmsConnectionException e) {
2
Spade-Editor/Spade
src/heroesgrave/spade/image/change/doc/NewLayer.java
[ "public class Document\n{\n\tpublic static int MAX_DIMENSION = 4096;\n\t\n\tprivate LinkedList<IDocChange> changes = new LinkedList<IDocChange>();\n\tprivate LinkedList<IDocChange> reverted = new LinkedList<IDocChange>();\n\t\n\tprivate int width, height;\n\tprivate File file;\n\tprivate Metadata info;\n\tprivate L...
import heroesgrave.spade.image.Document; import heroesgrave.spade.image.Layer; import heroesgrave.spade.image.RawImage; import heroesgrave.spade.image.change.IDocChange; import heroesgrave.spade.image.change.edit.ClearMaskChange; import heroesgrave.spade.main.Spade; import heroesgrave.utils.misc.Metadata;
// {LICENSE} /* * Copyright 2013-2015 HeroesGrave and other Spade developers. * * This file is part of Spade * * Spade 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, ...
parent.addChangeSilent(new ClearMaskChange());
4
yyxhdy/ManyEAs
src/jmetal/operators/crossover/BLXAlphaCrossover.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.ArrayRealSolutionType; import jmetal.encodings.solutionType.RealSolutionType; import jmetal.util.Configuration; import jmetal.util.JMException; import jmetal.util.PseudoRandom; import jmetal.util.wrapper.XReal; import java.util.Arr...
// BLXAlphaCrossover.java // // Author: // Antonio J. Nebro <antonio@lcc.uma.es> // // Copyright (c) 2012 Antonio J. Nebro // // 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...
private static final List VALID_TYPES = Arrays.asList(RealSolutionType.class,
2
scrutmydocs/scrutmydocs
src/main/java/org/scrutmydocs/webapp/api/settings/rivers/basic/facade/RiversApi.java
[ "public class RestAPIException extends Exception {\r\n\tprivate static final long serialVersionUID = 1L;\r\n\r\n\tpublic RestAPIException(String message) {\r\n\t\tsuper(message);\r\n\t}\r\n\r\n\tpublic RestAPIException(Exception e) {\r\n\t\tsuper(e.getMessage());\r\n\t}\r\n\r\n}\r", "public class Api implements S...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import java.util...
/* * Licensed to scrutmydocs.org (the "Author") under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Author licenses this * file to you under the Apache License, Version 2.0 (the * "License"); you ma...
public @ResponseBody RestResponseRivers get() throws Exception {
4
doanduyhai/killrvideo-java
src/main/java/killrvideo/service/StatisticsService.java
[ "public static final String mergeStackTrace(Throwable throwable) {\n StringJoiner joiner = new StringJoiner(\"\\n\\t\", \"\\n\", \"\\n\");\n joiner.add(throwable.getMessage());\n Arrays.asList(throwable.getStackTrace())\n .forEach(stackTraceElement -> joiner.add(stackTraceElement.toString()));\n\n ...
import static java.util.stream.Collectors.toList; import static killrvideo.utils.ExceptionUtils.mergeStackTrace; import java.util.List; import java.util.Map; import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; import javax.annotation.PostConstruct; import javax.inje...
package killrvideo.service; @Service //public class StatisticsService extends AbstractStatisticsService { public class StatisticsService extends StatisticsServiceImplBase { private static final Logger LOGGER = LoggerFactory.getLogger(StatisticsService.class); @Inject Mapper<VideoPlaybackStats> ...
FutureUtils.buildCompletableFuture(dseSession.executeAsync(bound))
4
yangting/openjtcc
tcc-core/src/main/java/org/bytesoft/openjtcc/supports/internal/TransactionLoggerImpl.java
[ "public class TerminatorArchive {\r\n\tpublic RemoteTerminator terminator;\r\n\tpublic boolean prepared;\r\n\tpublic boolean committed;\r\n\tpublic boolean rolledback;\r\n\tpublic boolean cleanup;\r\n\r\n\tpublic int hashCode() {\r\n\t\tint hash = 23;\r\n\t\thash += 29 * (this.terminator == null ? 0 : this.terminat...
import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import org.bytesoft.openjtcc.archive.CompensableArchive; import org.bytesoft.openjtcc.archive.TerminatorArchive; import org.bytesoft.openjtcc....
/** * Copyright 2014 yangming.liu<liuyangming@gmail.com>. * * This copyrighted material is made available to anyone wishing to use, modify, * copy, or redistribute it subject to the terms and conditions of the GNU * Lesser General Public License, as published by the Free Software Foundation. * * This prog...
public void registerTerminator(TransactionContext transactionContext, TerminatorArchive holder) {
0
juankysoriano/Zen
zen-android/src/main/java/zenproject/meditation/android/sketch/ZenSketch.java
[ "public class MusicPerformer implements StepPerformer {\n private static final MediaPlayer RELEASED_MUSIC_PERFORMER = null;\n private static final float MUSIC_STEP = 0.005f;\n private static final float MIN_VOLUME = 0.05f;\n private MediaPlayer mediaPlayer;\n private final RainbowInputController rain...
import com.juankysoriano.rainbow.core.Rainbow; import com.juankysoriano.rainbow.core.drawing.RainbowDrawer; import com.juankysoriano.rainbow.core.event.RainbowInputController; import com.novoda.notils.caster.Classes; import zenproject.meditation.android.ContextRetriever; import zenproject.meditation.android.R; import z...
package zenproject.meditation.android.sketch; /** * Orchestration class for all the performers responsible for specific artistic (lol) operations. */ public class ZenSketch extends Rainbow implements FlowerSelectedListener { private static final int DEFAULT_COLOR = ContextRetriever.INSTANCE.getResources().get...
BranchPerformer branchPerformer,
3
kaif-open/kaif-android
app/src/main/java/io/kaif/mobile/view/ArticlesFragment.java
[ "public class KaifApplication extends Application {\n\n private static KaifApplication INSTANCE;\n\n private Beans beans;\n\n @Override\n public void onCreate() {\n super.onCreate();\n INSTANCE = this;\n beans = Beans.Initializer.init(this);\n }\n\n public static KaifApplication getInstance() {\n ...
import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; 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 java.util.List; import javax.inject.Inje...
package io.kaif.mobile.view; public class ArticlesFragment extends BaseFragment { public static final int RELOAD_EXPIRE_INTERVAL = 5 * 60 * 1000; @BindView(R.id.article_list) RecyclerView articleListView; @BindView(R.id.pull_to_refresh) SwipeRefreshLayout pullToRefreshLayout; @Inject ArticleDaemo...
articleListView.addOnScrollListener(new OnScrollToLastListener() {
6
UweTrottmann/MovieTracker
SeriesGuideMovies/src/com/jakewharton/trakt/services/ListService.java
[ "public abstract class TraktApiBuilder<T> extends ApiBuilder {\n /** API key field name. */\n protected static final String FIELD_API_KEY = API_URL_DELIMITER_START + \"apikey\" + API_URL_DELIMITER_END;\n\n protected static final String FIELD_USERNAME = API_URL_DELIMITER_START + \"username\" + API_URL_DELIM...
import com.google.myjson.JsonArray; import com.google.myjson.JsonObject; import com.google.myjson.reflect.TypeToken; import com.jakewharton.trakt.TraktApiBuilder; import com.jakewharton.trakt.TraktApiService; import com.jakewharton.trakt.entities.ListItemsResponse; import com.jakewharton.trakt.entities.ListResponse; im...
package com.jakewharton.trakt.services; public class ListService extends TraktApiService { /** * Add a new custom list. * * @param name The list name. This must be unique. * @param privacy Privacy level. * @return Builder instance. */ public AddBuilder add(String name, ListPrivac...
public static final class AddBuilder extends TraktApiBuilder<ListResponse> {
0
marcocor/smaph
src/main/java/it/unipi/di/acube/smaph/main/experiments/TailQueriesExperiment.java
[ "public class CachedWAT2Annotator extends WAT2Annotator {\n\tprivate final static Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());\n\n\tprivate static HashMap<String, byte[]> url2jsonCache = new HashMap<>();\n\tprivate static long flushCounter = 0;\n\tprivate static final int FLUSH_EVERY ...
import java.util.HashSet; import java.util.Locale; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.GnuParser; import org.apache.commons.cli.Options; import it.unipi.di.acube.batframework.cache.BenchmarkCache; import it.unipi.di.acube.batframework.data.Tag; import it.unipi.di.acube.batframework....
package it.unipi.di.acube.smaph.main.experiments; public class TailQueriesExperiment { private static final Locale LOCALE = Locale.US; public static void main(String[] args) throws Exception { Options options = new Options().addOption("w", "websearch-piggyback", true, "What web search engine to piggy...
WikipediaToFreebase w2f = WikipediaToFreebase.open(c.getDefaultWikipediaToFreebaseStorage());
8
lemberg/d8androidsdk
sample/src/main/java/com/ls/drupal8demo/CategoryFragment.java
[ "public class DrupalClient implements OnResponseListener {\n public enum DuplicateRequestPolicy {ALLOW,ATTACH,REJECT}\n\n private final RequestFormat requestFormat;\n private String baseURL;\n private RequestQueue queue;\n private ResponseListenersSet listeners;\n private String defaultCharset;\n\...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ListView; import com.ls.drupal.DrupalClient; impo...
/** * The MIT License (MIT) * Copyright (c) 2014 Lemberg Solutions Limited * 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 *...
mClient = new DrupalClient(AppConstants.SERVER_BASE_URL, getActivity(), BaseRequest.RequestFormat.JSON,new AppLoginManager());
4
danielflower/app-runner
src/main/java/com/danielflower/apprunner/web/v1/AppResource.java
[ "public class AppEstate {\n public static final Logger log = LoggerFactory.getLogger(AppEstate.class);\n\n private final List<AppDescription> managers = new ArrayList<>();\n private final ProxyMap proxyMap;\n private final FileSandbox fileSandbox;\n private final List<AppChangedListener> appAddedList...
import com.danielflower.apprunner.AppEstate; import com.danielflower.apprunner.FileSandbox; import com.danielflower.apprunner.io.OutputToWriterBridge; import com.danielflower.apprunner.io.Zippy; import com.danielflower.apprunner.mgmt.*; import com.danielflower.apprunner.problems.AppNotFoundException; import com.danielf...
@Required InputStream requestBody) throws IOException { AppDescription ad = getAppDescription(name); if (ad.dataDir().listFiles().length > 0) { return Response.status(400).entity("File uploading is only supported for apps with empty data directories.").build();...
} catch (UnsupportedProjectTypeException e) {
5
jchampemont/notedown
src/main/java/com/jeanchampemont/notedown/note/NoteEventHelper.java
[ "@Entity\n@Table(name = \"note\")\npublic class Note {\n @Id\n @Type(type = \"uuid-char\")\n private UUID id;\n\n @Column(name = \"title\", length = 64, nullable = false)\n private String title;\n\n @Column(name = \"content\", nullable = false)\n @Lob\n @Type(type = \"org.hibernate.type.Stri...
import com.jeanchampemont.notedown.note.persistence.Note; import com.jeanchampemont.notedown.note.persistence.NoteEvent; import com.jeanchampemont.notedown.note.persistence.NoteEventId; import com.jeanchampemont.notedown.note.persistence.NoteEventType; import com.jeanchampemont.notedown.user.persistence.User; import di...
/* * Copyright (C) 2015 NoteDown * * This file is part of the NoteDown project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
result.setId(new NoteEventId(noteId, version));
2
yyqian/imagine
src/main/java/com/yyqian/imagine/service/impl/PostServiceImpl.java
[ "public class PostCreateForm {\n\n @NotEmpty\n private String title = \"\";\n\n private String url;\n\n private String text;\n\n public PostCreateForm() {\n }\n\n public String getTitle() {\n return title;\n }\n\n public void setTitle(String title) {\n this.title = title.trim();\n }\n\n public Stri...
import com.yyqian.imagine.dto.PostCreateForm; import com.yyqian.imagine.po.Post; import com.yyqian.imagine.po.User; import com.yyqian.imagine.repository.PostRepository; import com.yyqian.imagine.service.PostService; import com.yyqian.imagine.service.SecurityService; import com.yyqian.imagine.utility.StringUtility; impo...
package com.yyqian.imagine.service.impl; /** * Created on 12/15/15. * * @author Yinyin Qian */ @Service public class PostServiceImpl implements PostService { private final PostRepository postRepository; private final SecurityService securityService; @Autowired public PostServiceImpl(PostRepository post...
post.setSite(StringUtility.getSite(content));
6
reines/httptunnel
src/test/java/com/yammer/httptunnel/client/HttpTunnelClientChannelTest.java
[ "public class FakeChannelSink extends AbstractChannelSink {\n\n\tpublic final Queue<ChannelEvent> events;\n\n\tpublic FakeChannelSink() {\n\t\tevents = new LinkedList<ChannelEvent>();\n\t}\n\n\t@Override\n\tpublic void eventSunk(ChannelPipeline pipeline, ChannelEvent e) throws Exception {\n\t\tevents.add(e);\n\t}\n...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import java.net.*; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.channel.ChannelEvent; import org.jboss.netty.channel.Chann...
/* * Copyright 2009 Red Hat, Inc. * * Red Hat licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
private FakeSocketChannel sendChannel;
2
milenkovicm/netty-kafka-producer
src/test/java/com/github/milenkovicm/kafka/ControlBrokerTest.java
[ "public class ControlKafkaBroker extends AbstractKafkaBroker {\n\n public ControlKafkaBroker(String host, int port, String topicName, EventLoopGroup workerGroup, ProducerProperties properties) {\n super(host, port, topicName, workerGroup, properties);\n }\n\n @Override\n protected ChannelInitiali...
import static org.hamcrest.CoreMatchers.is; import com.github.milenkovicm.kafka.connection.ControlKafkaBroker; import com.github.milenkovicm.kafka.connection.KafkaPromise; import com.github.milenkovicm.kafka.protocol.Error; import com.github.milenkovicm.kafka.protocol.KafkaException; import com.github.milenkovicm.kafka...
/* * Copyright 2015 Marko Milenkovic (http://github.com/milenkovicm) * * 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 requir...
Assert.assertThat(e.error, is(Error.LEADER_NOT_AVAILABLE));
2
kunka/CoolAndroidBinding
src/com/kk/binding/kernel/Binding.java
[ "public interface IValueConverter {\r\n public Object converter(Object source) throws Exception;\r\n}\r", "public interface INotifyPropertyChanged {\r\n\tpublic void setPropertyChangedListener(IPropertyChanged listener);\r\n}\r", "public interface IPropertyChanged {\r\n\tpublic void propertyChanged(Object se...
import com.kk.binding.converter.IValueConverter; import com.kk.binding.property.INotifyPropertyChanged; import com.kk.binding.property.IPropertyChanged; import com.kk.binding.property.PropertyChangedEventArgs; import com.kk.binding.util.BindLog; import com.kk.binding.util.StringUtil;
/* * Copyright (C) 2013 kk-team.com. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
((INotifyPropertyChanged) this.dataContext).setPropertyChangedListener(new IPropertyChanged() {
2
jeick/jamod
src/main/java/net/wimpi/modbus/cmd/AIAOTest.java
[ "public interface Modbus {\n\n\t/**\n\t * JVM flag for debug mode. Can be set passing the system property\n\t * net.wimpi.modbus.debug=false|true (-D flag to the jvm).\n\t */\n\tpublic static final boolean debug = \"true\".equals(System\n\t\t\t.getProperty(\"net.wimpi.modbus.debug\"));\n\n\t/**\n\t * Defines the cl...
import net.wimpi.modbus.Modbus; import net.wimpi.modbus.io.ModbusTCPTransaction; import net.wimpi.modbus.io.ModbusTransaction; import net.wimpi.modbus.msg.ModbusRequest; import net.wimpi.modbus.msg.ReadInputRegistersRequest; import net.wimpi.modbus.msg.ReadInputRegistersResponse; import net.wimpi.modbus.msg.WriteSingle...
/*** * Copyright 2002-2010 jamod development team * * 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...
ModbusRequest ai_req = null;
3
Fivium/ScriptRunner
src/com/fivium/scriptrunner2/loader/SourceLoader.java
[ "public class PromotionFile\nextends ManifestEntry {\n \n private static final String UNKNOWN_VERSION_STRING = \"unknown\";\n \n private final int mSequencePosition; \n \n public PromotionFile(String pFilePath, String pLoaderName, int pSequencePosition, Map<String, String> pPropertyMap, boolean pIsForcedDup...
import com.fivium.scriptrunner2.Logger; import com.fivium.scriptrunner2.PromotionFile; import com.fivium.scriptrunner2.ScriptRunner; import com.fivium.scriptrunner2.database.PromotionController; import com.fivium.scriptrunner2.ex.ExFatalError; import com.fivium.scriptrunner2.ex.ExPromote; import com.fivium.scriptrunner...
package com.fivium.scriptrunner2.loader; /** * A <tt>SourceLoader</tt> is used to load any database source code or metadata onto the database, excluding DDL which is * handled by the {@link PatchScriptLoader}. Database source code typically includes packages, views, triggers, etc. * Metadata comprises any files wh...
public void promoteFile(ScriptRunner pScriptRunner, PromotionFile pPromotionFile)
1
lazyparser/xbot_head
app/src/main/java/cn/ac/iscas/xlab/droidfacedog/mvp/facesign/SignInPresenter.java
[ "public class RosConnectionService extends Service{\n\n public static final String TAG = \"RosConnectionService\";\n public static final String SUBSCRIBE_ROBOT_STATUS = \"/robot_status\";\n public static final String SUBSCRIBE_MUSEUM_POSITION = \"/museum_pos\";\n \n //解说词播放状态\n public static final...
import android.content.Context; import android.graphics.Bitmap; import android.os.Binder; import android.support.annotation.NonNull; import android.util.Log; import cn.ac.iscas.xlab.droidfacedog.RosConnectionService; import cn.ac.iscas.xlab.droidfacedog.entity.RobotStatus; import cn.ac.iscas.xlab.droidfacedog.entity.Si...
package cn.ac.iscas.xlab.droidfacedog.mvp.facesign; /** * Created by lisongting on 2017/9/12. */ public class SignInPresenter implements SignInContract.Presenter { public static final String TAG = "SignInPresenter"; private SignInContract.View view; private Context context; private YoutuConnectio...
private AiTalkModel aiTalkModel;
3
konachan700/JNekoImageDB
src/main/java/ui/dialogs/activities/TagsEditorActivity.java
[ "@Entity\n@Table(name=\"tags\", indexes = {\n\t\t@Index(columnList = \"tagText\", \t\t\tname = \"tagText_idx\"),\n\t\t@Index(columnList = \"tagCreateDate\", \tname = \"tagCreateDate_idx\")\n})\npublic class TagEntity implements Serializable {\n\t@Id\n\t@GeneratedValue(strategy= GenerationType.IDENTITY)\n\t@Column(n...
import java.util.ArrayList; import java.util.List; import java.util.Optional; import javafx.event.ActionEvent; import javafx.scene.Node; import javafx.scene.control.Label; import javafx.scene.control.ScrollPane; import javafx.scene.control.TextField; import javafx.scene.input.KeyCode; import javafx.scene.input.MouseEve...
package ui.dialogs.activities; public class TagsEditorActivity extends ActivityPage implements UseServices { @CssStyle({"tags_scroll_pane"}) private final ScrollPane scrollPane = new ScrollPane(); @CssStyle({"tags_null_pane"}) private final FlowPane flowPane = new FlowPane(); @CssStyle({"tag_text_field"}) pr...
private void onTagClick(MouseEvent me, String tag, TagElement te) {
7
x7hub/Calendar_lunar
src/edu/bupt/calendar/selectcalendars/SelectVisibleCalendarsFragment.java
[ "public class AsyncQueryService extends Handler {\n private static final String TAG = \"AsyncQuery\";\n static final boolean localLOGV = false;\n\n // Used for generating unique tokens for calls to this service\n private static AtomicInteger mUniqueToken = new AtomicInteger(0);\n\n private Context mC...
import edu.bupt.calendar.AsyncQueryService; import edu.bupt.calendar.CalendarController.EventInfo; import edu.bupt.calendar.CalendarController.EventType; import edu.bupt.calendar.R; import edu.bupt.calendar.CalendarController; import edu.bupt.calendar.Utils; import android.app.Activity; import android.app.Fragment; imp...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
public void handleEvent(EventInfo event) {
1