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
Semx11/Autotip
src/main/java/me/semx11/autotip/api/request/impl/SettingsRequest.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 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.SettingsReply; import me.semx11.autotip.api.reque...
package me.semx11.autotip.api.request.impl; public class SettingsRequest implements Request<SettingsReply> { private final Version version; private SettingsRequest(Autotip autotip) { this.version = autotip.getVersion(); } public static SettingsRequest of(Autotip autotip) { return ne...
Optional<Reply> optional = RequestHandler.getReply(this, request.getURI());
4
B2MSolutions/reyna
reyna-test/src/com/b2msolutions/reyna/services/ForwardServiceTest.java
[ "public enum Result {\n OK, PERMANENT_ERROR, TEMPORARY_ERROR, BLACKOUT, NOTCONNECTED\n}", "public class Message implements Serializable {\n private static final long serialVersionUID = 6230786319646630263L;\n\n private Long id;\n\n private String url;\n\n private String body;\n\n private Header[...
import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; import com.b2msolutions.reyna.*; import com.b2msolutions.reyna.Dispatcher.Result; import com.b2msolutions.reyna.system.Message; import com.b2msolutions.reyna.system.PeriodicBackoutCheck...
package com.b2msolutions.reyna.services; @Config(sdk = 18) @RunWith(RobolectricTestRunner.class) public class ForwardServiceTest { private ForwardService forwardService; @Mock Dispatcher dispatcher; @Mock Repository repository; @Mock Thread thread; @Mock NetworkInfo networkInfo; ...
assertEquals(MessageProvider.class, messageProvider.getClass());
7
cookpad/puree-android
demo/src/main/java/com/example/puree/logs/PureeConfigurator.java
[ "public class Puree {\n\n private static final String TAG = Puree.class.getSimpleName();\n\n private static PureeLogger logger;\n\n public static synchronized void initialize(PureeConfiguration conf) {\n if (logger != null) {\n Log.w(TAG, \"Puree has already been initialized; re-initializ...
import com.cookpad.puree.Puree; import com.cookpad.puree.PureeConfiguration; import com.cookpad.puree.PureeFilter; import com.cookpad.puree.plugins.OutLogcat; import com.example.puree.AddEventTimeFilter; import com.example.puree.logs.filters.SamplingFilter; import com.example.puree.logs.plugins.OutBufferedLogcatPurge; ...
package com.example.puree.logs; public class PureeConfigurator { public static void configure(Context context) { Puree.initialize(buildConf(context)); } public static PureeConfiguration buildConf(Context context) {
PureeFilter addEventTimeFilter = new AddEventTimeFilter();
4
koterpillar/android-sasl
classpath-0.98/gnu/javax/crypto/sasl/ClientFactory.java
[ "public class AnonymousClient\n extends ClientMechanism\n implements SaslClient\n{\n public AnonymousClient()\n {\n super(Registry.SASL_ANONYMOUS_MECHANISM);\n }\n\n protected void initMechanism() throws SaslException\n {\n }\n\n protected void resetMechanism() throws SaslException\n {\n }\n\n pu...
import gnu.java.security.Registry; import gnu.javax.crypto.sasl.anonymous.AnonymousClient; import gnu.javax.crypto.sasl.crammd5.CramMD5Client; import gnu.javax.crypto.sasl.plain.PlainClient; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Has...
/* ClientFactory.java -- Copyright (C) 2003, 2006 Free Software Foundation, Inc. Modified for Android (C) 2009, 2010 by Alexey Kotlyarov This file is a part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
if (hasPolicy(Sasl.POLICY_PASS_CREDENTIALS, props))
3
Rsgm/Hakd
core/src/gui/windows/dialogs/fileops/FileOpen.java
[ "public class Hakd extends Game {\n public static Hakd HAKD;\n\n private Preferences prefs;\n // private static Preferences save1; // save this for later // Use kryo\n\n private GamePlay gamePlay;\n\n public static final AssetManager assets = new AssetManager(new HakdFileHandleResolver());\n\n pub...
import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.ui.*; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import game.Hakd; import gui.windows.device.FileHandler; import networks.devices.Device; import other.File; import other.Util;
package gui.windows.dialogs.fileops; public class FileOpen extends Dialog { Skin skin = Hakd.assets.get("skins/uiskin.json", Skin.class); public FileOpen(final Device device, final FileHandler fileHandler) { super("Open", Hakd.assets.get("skins/uiskin.json", Skin.class)); final Tree fileTre...
if (fileTree.getSelection().isEmpty() || ((File) fileTree.getSelection().first().getObject()).isDirectory()) {
3
AtomicBlom/ShearMadness
src/integration/java/com/github/atomicblom/shearmadness/variations/silly/SillyVarations.java
[ "@SideOnly(Side.CLIENT)\npublic interface IVariationRegistry\n{\n /**\n * Registers a Model Maker that will be used when the function predicate matches\n * @param handlesVariant a function that should return true if your IModelMaker applies to the itemStack\n * @param variationModelMaker the model ma...
import com.github.atomicblom.shearmadness.api.IVariationRegistry; import com.github.atomicblom.shearmadness.api.ItemStackHelper; import com.github.atomicblom.shearmadness.api.events.RegisterShearMadnessVariationEvent; import com.github.atomicblom.shearmadness.variations.CommonReference; import com.github.atomicblom.she...
package com.github.atomicblom.shearmadness.variations.silly; @SuppressWarnings({"MethodMayBeStatic", "AnonymousInnerClass"}) @Mod.EventBusSubscriber(Side.CLIENT) public class SillyVarations { @SubscribeEvent(priority = EventPriority.LOW) @Optional.Method(modid = "shearmadness") @SideOnly(Side.CLIENT) ...
itemStack -> ItemStackHelper.isStackForBlock(itemStack, ChiselLibrary.marbleextra) && itemStack.getItemDamage() == 7,
1
killbill/killbill-meter-plugin
src/test/java/org/killbill/billing/plugin/meter/timeline/codec/TestTimelineChunkToJson.java
[ "public static class Compact extends Base {\n\n}", "public static class Loose extends Base {\n\n}", "public enum SampleOpcode {\n BYTE(1, 1),\n SHORT(2, 2),\n INT(3, 4),\n LONG(4, 8),\n FLOAT(5, 4),\n DOUBLE(6, 8),\n STRING(7, 0),\n NULL(8, 0, true),\n FLOAT_FOR_DOUBLE(10, 4, DOUBLE),...
import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.killbill.billing.plugin.meter.MeterTestSuiteNoDB; import org.killbill.billing.plugin.meter.timeline...
/* * Copyright 2010-2014 Ning, Inc. * Copyright 2014 The Billing Project, LLC * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/lice...
sampleCoder.encodeSample(output, new ScalarSample<Long>(SampleOpcode.LONG, 10L));
3
pnoker/mybatisGenerator
src/main/java/org/mybatis/generator/codegen/mybatis3/model/PrimaryKeyGenerator.java
[ "public interface CommentGenerator {\n\n /**\n * Adds properties for this instance from any properties configured in the\n * CommentGenerator configuration.\n * \n * <p>This method will be called before any of the other methods.\n * \n * @param properties\n * All properties...
import static org.mybatis.generator.internal.util.JavaBeansUtil.getJavaBeansField; import static org.mybatis.generator.internal.util.JavaBeansUtil.getJavaBeansGetter; import static org.mybatis.generator.internal.util.JavaBeansUtil.getJavaBeansSetter; import static org.mybatis.generator.internal.util.messages.Messages.g...
/** * Copyright 2006-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unle...
public List<CompilationUnit> getCompilationUnits() {
3
dmfs/xmlobjects
src/org/dmfs/xmlobjects/builder/ListObjectBuilder.java
[ "public final class ElementDescriptor<T>\n{\n\tpublic final static XmlContext DEFAULT_CONTEXT = new XmlContext()\n\t{\n\t};\n\n\t/**\n\t * The {@link QualifiedName} of this element.\n\t */\n\tpublic final QualifiedName qualifiedName;\n\n\t/**\n\t * An {@link IObjectBuilder} for elements of this type.\n\t */\n\tpubl...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Set; import org.dmfs.xmlobjects.ElementDescriptor; import org.dmfs.xmlobjects.QualifiedName; import org.dmfs.xmlobjects.XmlContext; import org.dmfs.xmlobjects.pull.ParserContext; import org.dmfs.xmlobjects.pull.XmlObjectPull...
/* * Copyright (C) 2014 Marten Gajda <marten@dmfs.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
public List<T> get(ElementDescriptor<List<T>> descriptor, List<T> recycle, ParserContext context)
3
zsoltk/overpasser
library/src/main/java/hu/supercluster/overpasser/library/query/OverpassQuery.java
[ "public enum OutputFormat {\n /**\n * Request the result in JSON format\n */\n JSON,\n\n /**\n * Request the result in XML format\n */\n XML,\n\n /**\n * Request the result in CSV format\n */\n CSV,\n}", "public enum OutputModificator {\n /**\n * Adds the bounding ...
import java.util.Locale; import hu.supercluster.overpasser.library.output.OutputFormat; import hu.supercluster.overpasser.library.output.OutputModificator; import hu.supercluster.overpasser.library.output.OutputOrder; import hu.supercluster.overpasser.library.output.OutputVerbosity; import static hu.supercluster.overpa...
package hu.supercluster.overpasser.library.query; /** * The main query class to create and build requests using the Overpass QL */ public class OverpassQuery extends AbstractOverpassQuery { public OverpassQuery() { super(); } OverpassQuery(OverpassQueryBuilder builder) { super(builder...
public OverpassQuery output(OutputVerbosity verbosity, OutputModificator modificator, OutputOrder order, int limit) {
4
games647/FlexibleLogin
src/main/java/com/github/games647/flexiblelogin/listener/ConnectionListener.java
[ "@Singleton\npublic class ProtectionManager {\n\n private static final String BRIDGE_CHANNEL = \"AuthMeBridge\";\n private static final String LOGIN_ACTION = \"PlayerLogin\";\n private static final int DISTANCE = 3;\n\n private final Map<UUID, ProtectionData> protections = new HashMap<>();\n\n @Injec...
import com.github.games647.flexiblelogin.ProtectionManager; import com.github.games647.flexiblelogin.storage.Account; import com.github.games647.flexiblelogin.FlexibleLogin; import com.github.games647.flexiblelogin.PomData; import com.github.games647.flexiblelogin.config.node.General; import com.github.games647.flexibl...
/* * This file is part of FlexibleLogin * * The MIT License (MIT) * * Copyright (c) 2015-2018 contributors * * 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, incl...
General config = settings.getGeneral();
4
google/gulava
javatests/gulava/lisp/LispTest.java
[ "public static Cons<?, ?> s(Object... o) {\n return Cons.list(Arrays.asList(o));\n}", "public static final Lisp O = new MakePredicates_Lisp(\n /*allowQuote=*/true,\n /*allowCase=*/true,\n /*allowLambda=*/true);", "@MakeLogicValue\npublic abstract class Cons<CAR, CDR> {\n /**\n * Package-protected c...
import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import static gulava.Cons.s; import static gulava.Goals.conj; import static gulava.Goals.same; import static gulava.lisp.Lisp.O; import gulava.Cons; import gulava.Var; import gulava.testing.LogicAsserter;
/* * Copyright (c) 2015 The Gulava Authors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, me...
new LogicAsserter()
4
sastix/cms
server/src/main/java/com/sastix/cms/server/services/content/impl/DistributedCacheServiceImpl.java
[ "public interface Constants {\n\n /**\n * Rest API Version.\n */\n static String REST_API_1_0 = \"1.0\";\n String GET_API_VERSION = \"/apiversion\";\n String DEFAULT_LANGUAGE = \"en\";\n\n /**\n * CONTENT API ENDPOINTS\n */\n static String CREATE_RESOURCE = \"createResource\";\n ...
import com.sastix.cms.common.Constants; import com.sastix.cms.common.cache.CacheDTO; import com.sastix.cms.common.cache.RemoveCacheDTO; import com.sastix.cms.common.content.exceptions.ResourceAccessError; import com.sastix.cms.server.services.cache.CacheService; import com.sastix.cms.server.services.content.Distributed...
/* * Copyright(c) 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
RemoveCacheDTO removeCacheDTO = new RemoveCacheDTO(uri);
2
caarmen/scrumchatter
app/src/main/java/ca/rmen/android/scrumchatter/meeting/detail/MeetingCursorAdapter.java
[ "public class Constants {\n public static final String TAG = \"ScrumChatter\";\n public static final String PREF_TEAM_ID = \"team_id\";\n public static final int DEFAULT_TEAM_ID = 1;\n public static final String DEFAULT_TEAM_NAME = \"Team A\";\n}", "public enum State {\n NOT_STARTED, IN_PROGRESS, F...
import android.content.Context; import android.databinding.DataBindingUtil; import android.graphics.drawable.AnimationDrawable; import android.os.Handler; import android.os.SystemClock; import android.support.annotation.ColorInt; import android.support.annotation.ColorRes; import android.support.v4.content.ContextCompa...
/* * Copyright 2013-2017 Carmen Alvarez * * This file is part of Scrum Chatter. * * Scrum Chatter 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) ...
MeetingMemberCursorWrapper cursorWrapper = new MeetingMemberCursorWrapper(getCursor());
2
sathipal/lwm2m_over_mqtt
src/com/ibm/lwm2m/objects/IntegerResource.java
[ "public class ObserveNotify implements Runnable {\n\n private static final long SECONDS_TO_MILLIS = 1000;\n\n private ObserveSpec observeSpec;\n private MQTTExchange exchange;\n private LocalResource node;\n private byte[] previousValue;\n private Date previousTime;\n private final static Sched...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.ibm.lwm2m.ObserveNotify; import com.ibm.lwm2m.ObserveSpec; import com.ibm.lwm2m.ObserveSpecParser; import com.ibm.lwm2m.client.LocalResource; import com.ibm.mqttv3.binding.MQTTExchange; import com.ibm.mqttv3.binding.MQTTResource; import com.ibm.mqttv3....
package com.ibm.lwm2m.objects; public class IntegerResource extends MQTTResource implements LocalResource { private static final Logger LOG = LoggerFactory.getLogger(IntegerResource.class); private int value = 0; private ObserveSpec observeSpec; private ObserveNotify observer; boolean bWrite; public Integ...
exchange.respond(ResponseCode.CONTENT, Integer.toString(this.value));
7
Falseclock/HtcOneTweaker
src/kz/virtex/htc/tweaker/preference/IconsColorPreference.java
[ "public class Const\n{\n\tpublic static final boolean DEBUG = true;\n\tpublic static final String TAG = \"HTC_Tweaker\";\n\t\n\tpublic static final String PACKAGE_NAME = \"kz.virtex.htc.tweaker\";\n\tpublic static final String WEATHER_PACKAGE_NAME = \"kz.virtex.htc.tweaker.weather\";\n\tpublic static final String W...
import kz.virtex.htc.tweaker.Const; import kz.virtex.htc.tweaker.Main; import kz.virtex.htc.tweaker.Misc; import kz.virtex.htc.tweaker.interfaces.ColorPreferenceView; import kz.virtex.htc.tweaker.interfaces.IconsRowView; import kz.virtex.htc.tweaker.utils.ColorFilterGenerator; import android.content.Context; import and...
package kz.virtex.htc.tweaker.preference; public class IconsColorPreference extends HtcDialogPreference implements ColorPreferenceView.OnColorChangeListener { private String mKey; private ColorPreferenceView colorView;
public IconsRowView iconRowView;
4
Bettehem/Messenger
app/src/main/java/com/github/bettehem/messenger/tools/fcm/MessengerGcmListenerServiceGcm.java
[ "public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, View.OnClickListener, ChatRequestListener, ChatItemListener, ProfileListener, View.OnLongClickListener, TopicListener, SettingsListener {\n\n private static final int PLAY_SERVICES_RESOLUTION_REQUEST ...
import android.content.Intent; import android.os.Handler; import com.github.bettehem.androidtools.Preferences; import com.github.bettehem.androidtools.misc.Time; import com.github.bettehem.messenger.MainActivity; import com.github.bettehem.messenger.tools.background.ReceivedMessage; import com.github.bettehem.messenger...
package com.github.bettehem.messenger.tools.fcm; public class MessengerGcmListenerServiceGcm extends FirebaseMessagingService implements GcmReceivedListener { private static MessageItemListener messageItemListener; @Override public void onMessageReceived(RemoteMessage message){ final Map data ...
MessageItem item = ChatsManager.saveDeliveryReport(getApplicationContext(), reportSender, messageId);
3
weiboad/fiery
server/src/main/java/org/weiboad/ragnar/server/kafka/Consumer.java
[ "@Component\n@ConfigurationProperties(prefix = \"fiery\")\npublic class FieryConfig {\n\n private int keepdataday;\n\n private String dbpath;\n\n private String indexpath;\n\n private Boolean kafkaenable;\n\n private String kafkaserver;\n\n private String kafkagroupid;\n\n private String mailfr...
import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonParser; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.ConsumerRecords; import org.apache.kafka.clients.consumer.KafkaConsumer; import org.apache.kafka.common.PartitionInfo; impor...
package org.weiboad.ragnar.server.kafka; @Component @Scope("singleton") public class Consumer implements DisposableBean, Runnable { @Autowired private FieryConfig fieryConfig; @Autowired BizLogProcessor bizLogProcessor; @Autowired
MetaLogProcessor metaLogProcessor;
2
JackyAndroid/Android-Architecture-Fairy
IntermediateLayer/app/src/main/java/tech/jackywang/intermediate/layer/BusinessDelegate.java
[ "public interface Business1Contract {\n\n interface View extends BaseView<Presenter> {\n\n }\n\n interface Presenter extends BasePresenter {\n\n }\n\n interface Model {\n\n }\n}", "public class Business1Model implements Business1Contract.Model {\n\n}", "public class Business1Presenter implemen...
import android.content.Context; import android.util.AttributeSet; import android.widget.RelativeLayout; import java.lang.ref.WeakReference; import tech.jackywang.intermediate.layer.business.business1.Business1Contract; import tech.jackywang.intermediate.layer.business.business1.Business1Model; import tech.jackywang.int...
package tech.jackywang.intermediate.layer; /** * 委托 * * @author jacky * @version v1.0 * @description 委托,隔离各业务间的耦合 * @since 2017/9/14 */ public class BusinessDelegate extends RelativeLayout implements IBusinessDelegate { private WeakReference<Context> mContextReference; private Business1Contract.Pr...
mBusiness2Presenter = new Business2Presenter(view, new Business2Model());
6
Matsv/PAaaS
src/main/java/nl/matsv/paaas/module/ModuleLoader.java
[ "@Data\n@AllArgsConstructor\npublic class VersionDataFile {\n private final MinecraftVersion version;\n private VersionMeta metadata;\n private BurgerOutput burgerData;\n private MetadataTree metadataTree;\n private List<String> sounds;\n // Store executed modules & versions\n // Store module d...
import com.google.gson.JsonElement; import com.google.gson.JsonObject; import nl.matsv.paaas.data.VersionDataFile; import nl.matsv.paaas.module.modules.BurgerModule; import nl.matsv.paaas.module.modules.JarModule; import nl.matsv.paaas.module.modules.SoundModule; import nl.matsv.paaas.module.modules.metadata.MetadataMo...
/* * Copyright (c) 2016 Mats & Myles * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
modules.add(JarModule.class);
2
momodalo/vimtouch
src/net/momodalo/app/vimtouch/VimTouch.java
[ "public class ColorScheme {\n private int foreColor;\n private int backColor;\n\n /**\n * Creates a <code>ColorScheme</code> object.\n *\n * @param foreColor The foreground color as an ARGB hex value.\n * @param backColor The background color as an ARGB hex value.\n */\n public Color...
import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.app.DownloadManager; import android.content.ComponentName; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.con...
return 13; } if (code.equals("Esc")) { return 27; } if (code.equals("Space")) { return 32; } if (code.equals("lt")) { return '<'; } if (code.equals("Bslash")) { return 92; } if (co...
new ToastExtension(this));
7
matrixcloud/SimpleReader
src/com/dreamteam/app/ui/AddDialog.java
[ "public class ItemListEntityParser extends DefaultHandler\n{\n\tprivate String tag = \"ItemListEntityParser\";\n\tprivate ItemListEntity itemListEntity;\n\tprivate FeedItem feedItem;\n\tprivate ArrayList<FeedItem> items = new ArrayList<FeedItem>();\n\tprivate StringBuffer sb = new StringBuffer();\n\tprivate boolean...
import java.io.File; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.database.sqlite.SQLiteDatabase; import android.os.AsyncTask; import android.os.Bundle; im...
package com.dreamteam.app.ui; public class AddDialog extends DialogFragment implements OnItemSelectedListener { private static final String tag = "AddDialog"; private Spinner mSpinner; private EditText urlEt; private RelativeLayout checkLayout; private String tableName_en; @Override public...
ItemListEntityParser parser = new ItemListEntityParser();
0
jaquadro/ForgeMods
ModularPots/src/com/jaquadro/minecraft/modularpots/block/BlockLargePotPlantProxy.java
[ "public final class UniqueMetaIdentifier\n{\n public final String modId;\n public final String name;\n public final int meta;\n\n public UniqueMetaIdentifier (String modId, String name, int meta) {\n this.modId = modId;\n this.name = name;\n this.meta = meta;\n }\n\n public Un...
import com.jaquadro.minecraft.modularpots.block.support.UniqueMetaIdentifier; import com.jaquadro.minecraft.modularpots.core.ModItems; import com.jaquadro.minecraft.modularpots.ModularPots; import com.jaquadro.minecraft.modularpots.addon.PlantHandlerRegistry; import com.jaquadro.minecraft.modularpots.block.support.Sapl...
package com.jaquadro.minecraft.modularpots.block; public class BlockLargePotPlantProxy extends Block { @SideOnly(Side.CLIENT) private IIcon transpIcon; // Scratch State private int scratchX; private int scratchY; private int scratchZ; private boolean applyingBonemeal; // Reentrant ...
TileEntityLargePot te = getAttachedPotEntity(world, x, y, z);
8
adiyoss/StructED
src/com/structed/models/algorithms/Perceptron.java
[ "public class Consts {\n\n // GENERALS\n\tpublic static final String SPACE = \" \";\n public static final String TAB = \"\\t\";\n public static final String COMMA_NOTE = \",\";\n\tpublic static final String CLASSIFICATION_SPLITTER = \"-\";\n\tpublic static final String COLON_SPLITTER = \":\";\n public s...
import com.structed.data.entities.Vector; import com.structed.data.Logger; import com.structed.utils.MathHelpers; import java.util.ArrayList; import com.structed.constants.Consts; import com.structed.models.ClassifierData; import com.structed.constants.ErrorConstants; import com.structed.data.entities.Example;
/* * The MIT License (MIT) * * StructED - Machine Learning Package for Structured Prediction * * Copyright (c) 2015 Yossi Adi, E-Mail: yossiadidrum@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), t...
Vector phiDifference = MathHelpers.subtract2Vectors(phiRealLabel.getFeatures(), phiPrediction.getFeatures());
6
dmfs/xmlobjects
test/org/dmfs/xml/objectpull/SetObjectBuilderTest.java
[ "public final class ElementDescriptor<T>\n{\n\tpublic final static XmlContext DEFAULT_CONTEXT = new XmlContext()\n\t{\n\t};\n\n\t/**\n\t * The {@link QualifiedName} of this element.\n\t */\n\tpublic final QualifiedName qualifiedName;\n\n\t/**\n\t * An {@link IObjectBuilder} for elements of this type.\n\t */\n\tpubl...
import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import org.dmfs.xmlobjects.ElementDescriptor; import org.dmfs.xmlobjects.QualifiedName; import org.dmfs.xmlobjects.XmlContext; import org.dmfs.xmlobjects.builder.SetObjectBuilder; import org.dmfs.xmlobj...
package org.dmfs.xml.objectpull; public class SetObjectBuilderTest { XmlContext testContext = new XmlContext(); ElementDescriptor<String> childElement = ElementDescriptor.register("child", StringObjectBuilder.INSTANCE, testContext); ElementDescriptor<Set<String>> setElement = ElementDescriptor.register("set", ...
ParserContext pc = new ParserContext();
5
EthACKdotOrg/orWall
app/src/main/java/org/ethack/orwall/adapter/AppListAdapter.java
[ "public class AppRule {\n private Boolean stored;\n private String pkgName;\n private Long appUID;\n private String onionType;\n private Boolean localHost;\n private Boolean localNetwork;\n\n // Variables dedicated for ListView\n // We need them for persistence across scroll\n private Str...
import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; import andr...
package org.ethack.orwall.adapter; /** * New adapter class * This will create the new application list, for the new tabbed layout. * It will provide, in the end, two lists: * - enabled application * - disabled application * <p/> * Enabled application will get the following information/characteristics: * - n...
private final NatRules natRules;
2
Aurilux/Cybernetica
src/main/java/com/vivalux/cyb/item/implant/ImplantCyberneticArm.java
[ "@Mod(modid = CYBModInfo.MOD_ID,\n name = CYBModInfo.MOD_NAME,\n guiFactory = CYBModInfo.GUI_FACTORY,\n version = CYBModInfo.MOD_VERSION)\npublic class Cybernetica {\n\t@Instance(CYBModInfo.MOD_ID)\n\tpublic static Cybernetica instance;\n\n\t@SidedProxy(clientSide = CYBModInfo.CLIENT_PROXY, serverSide = CY...
import com.vivalux.cyb.Cybernetica; import com.vivalux.cyb.api.Implant; import com.vivalux.cyb.client.model.ModelArmImplant; import com.vivalux.cyb.init.CYBItems; import com.vivalux.cyb.item.module.ModuleArmorPlate; import com.vivalux.cyb.item.module.ModuleBlastResist; import com.vivalux.cyb.item.module.ModuleFireResis...
package com.vivalux.cyb.item.implant; public class ImplantCyberneticArm extends Implant { // this implant provides modules equipped to the arm public ImplantCyberneticArm(String str, String str2, int renderIndex) { super(renderIndex, ImplantType.TORSO, 1); CYBItems.setItem(this, str, str2); } @Over...
ModelArmImplant model = (ModelArmImplant) Cybernetica.proxy.modelArm;
0
jescov/jescov
src/test/com/olabini/jescov/BranchCoverageStepdefs.java
[ "public static BranchCoverageMatcher hasBranchCoverage(int expected) {\n return new BranchCoverageMatcher(expected, false, null, null);\n}", "public static BranchCoverageMatcher hasNegativeBranchCoverage(int expected) {\n return new BranchCoverageMatcher(expected, true, 0, null);\n}", "public static Branc...
import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.util.HashMap; import java.util.Map; import java.util.Collection; import java.util.Iterator; import static org.junit.Assert.assertEquals; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Match...
/* * See LICENSE file in distribution for copyright and licensing information. */ package com.olabini.jescov; public class BranchCoverageStepdefs { private CucumberData data; public BranchCoverageStepdefs(CucumberData data) { this.data = data; } @Then("^the negative branch coverage on...
CoverageData cd = new JsonIngester().ingest(new StringReader(jsonToIngest));
4
gentoku/pinnacle-api-client
src/examples/PlaceTeaserBet.java
[ "public class Parameter extends ParameterCore {\n\n\t/**\n\t * Constructor.\n\t */\n\tprivate Parameter () {\n\t\tsuper();\n\t}\n\t\n\t/**\n\t * Factory\n\t * \n\t * @return\n\t */\n\tpublic static Parameter newInstance() {\n\t\treturn new Parameter();\n\t}\n\n\n\t/**\n\t * ID of the target sports.\n\t * \n\t * @pa...
import pinnacle.api.Parameter; import pinnacle.api.PinnacleAPI; import pinnacle.api.PinnacleException; import pinnacle.api.dataobjects.PlacedTeaserBet; import pinnacle.api.enums.BET_TYPE; import pinnacle.api.enums.ODDS_FORMAT; import pinnacle.api.enums.SIDE_TYPE; import pinnacle.api.enums.TEAM_TYPE; import pinnacle.api...
package examples; public class PlaceTeaserBet { public static void main(String[] args) throws PinnacleException { // settings String username = "yourUserName"; String password = "yourPassword"; PinnacleAPI api = PinnacleAPI.open(username, password); // parameter
Parameter leg1 = Parameter.newInstance();
0
GlitchCog/ChatGameFontificator
src/main/java/com/glitchcog/fontificator/gui/controls/panel/ControlPanelIrc.java
[ "public class ChatViewerBot extends PircBot\n{\n private static final Logger logger = Logger.getLogger(ChatViewerBot.class);\n\n /**\n * Debugging method to feed captured strings that include Twitch tags into the program\n * \n * @param filename\n * Name of a text file containing on...
import java.awt.Desktop; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.io.IOException; import java.net.URI; import java.util.Random; import jav...
package com.glitchcog.fontificator.gui.controls.panel; /** * Control Panel containing all the IRC connection options * * @author Matt Yanos */ public class ControlPanelIrc extends ControlPanelBase { private static final Logger logger = Logger.getLogger(ControlPanelIrc.class); private static final lon...
private ConfigIrc config;
1
domoinc/domo-java-sdk
domo-java-sdk-all/src/test/java/com/domo/sdk/tasks/RetrieveExample.java
[ "public class ExampleBase {\n\n protected DomoClient client;\n\n @Before\n public void setup() {\n Config config = Config.with()\n .clientId(\"MY_CLIENT_ID\")\n .clientSecret(\"MY_CLIENT_SECRET\")\n .apiHost(\"api.domo.com\")\n .useHttps(true)\n .scope(US...
import com.domo.sdk.ExampleBase; import com.domo.sdk.tasks.model.Attachment; import com.domo.sdk.tasks.model.Project; import com.domo.sdk.tasks.model.ProjectList; import com.domo.sdk.tasks.model.Task; import com.domo.sdk.users.UserClient; import com.domo.sdk.users.model.User; import org.apache.commons.io.IOUtils; impor...
package com.domo.sdk.tasks; public class RetrieveExample extends ExampleBase { @Test public void tasksClient_smokeTest() throws IOException { TasksClient tasksClient = new TasksClient(client.getUrlBuilder(), client.getTransport()); //Get User UserClient userClient = client.userClien...
Task task = new Task();
4
thlcly/Mini-JVM
src/main/java/com/aaront/exercise/jvm/method/Method.java
[ "@Data\npublic class ClassFile {\n private String magicNumber;\n private int majorVersion;\n private int minorVersion;\n private ClassIndex classIndex;\n private InterfaceIndex interfaceIndex;\n private ConstantPool constantPool;\n private List<ClassAccessFlag> accessFlags;\n private List<Fi...
import com.aaront.exercise.jvm.ClassFile; import com.aaront.exercise.jvm.accessflag.MethodAccessFlag; import com.aaront.exercise.jvm.attribute.AbstractAttribute; import com.aaront.exercise.jvm.attribute.CodeAttribute; import com.aaront.exercise.jvm.constant.ConstantPool; import lombok.Data; import org.apache.commons.la...
package com.aaront.exercise.jvm.method; /** * @author tonyhui * @since 17/6/12 */ @Data public class Method { private int accessFlag; private List<MethodAccessFlag> accessFlags = new ArrayList<>(); private int nameIndex; private String name; private int descriptorIndex; private String des...
private ConstantPool pool;
4
vineey/archelix-rsql
rsql-querydsl-parent/rsql-querydsl-filter/src/test/java/com/github/vineey/rql/querydsl/filter/QuerydslFilterBuilder_DateTimePath_Test.java
[ "public final class QRSQLOperators {\n public static final ComparisonOperator SIZE_EQ = new ComparisonOperator(\"=size=\");\n public static final ComparisonOperator SIZE_NOT_EQ = new ComparisonOperator(\"=sizene=\");\n private final static Logger LOGGER = LoggerFactory.getLogger(QRSQLOperators.class);\n\n ...
import com.github.vineey.rql.filter.operator.QRSQLOperators; import com.github.vineey.rql.filter.parser.DefaultFilterParser; import com.github.vineey.rql.filter.parser.FilterParser; import com.github.vineey.rql.querydsl.filter.converter.UnsupportedFieldClassException; import com.github.vineey.rql.querydsl.filter.util.D...
/* * MIT License * * Copyright (c) 2016 John Michael Vincent S. Rustia * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use,...
Predicate predicate = filterParser.parse(rqlFilter, withBuilderAndParam(new QuerydslFilterBuilder(), FilterAssertUtil.withFilterParam(LocalDateTime.class, selector)));
6
sumeetchhetri/gatf
alldep-jar/src/main/java/com/gatf/GatfPlugin.java
[ "public class AcceptanceTestContext {\r\n\r\n\tprivate Logger logger = Logger.getLogger(AcceptanceTestContext.class.getSimpleName());\r\n\t\r\n\tpublic final static String\r\n\t PROP_SOAP_ACTION_11 = \"SOAPAction\",\r\n\t PROP_SOAP_ACTION_12 = \"action=\",\r\n\t PROP_CONTENT_TYPE = \"Content-Type\",\r\n\t ...
import java.util.List; import java.util.Set; import com.gatf.executor.core.AcceptanceTestContext; import com.gatf.executor.core.GatfExecutorConfig; import com.gatf.executor.core.TestCase; import com.gatf.executor.executor.TestCaseExecutorUtil; import com.gatf.executor.report.TestCaseReport; import com.gatf.selen...
/* Copyright 2013-2019, Sumeet Chhetri 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...
void initilaizeContext(GatfExecutorConfig configuration, boolean flag) throws Exception;
1
ShawnShoper/x-job
xjob-scheduler/xjob-scheduler-registry/src/main/java/org/x/job/scheduler/registry/ScheduleRegistry.java
[ "public class LogFactory {\n //日志配置\n private static LogProperties logProperties;\n private static LogProcessor logProcessor;\n public final static String PERCENT = \"%\";\n\n public static LogProperties getLogProperties() {\n return logProperties;\n }\n\n private static void init() {\n ...
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.shoper.log.util.LogFactory; import org.shoper.log.util.Logger; import org.springframework.beans.factory.annotatio...
package org.x.job.scheduler.registry; @Component public class ScheduleRegistry extends ZKModule{ private static Logger logger = LogFactory.getLogger(ScheduleRegistry.class); @Autowired ZookeeperInfo zookeeperInfo; @Override public int start() { setZkInfo(zookeeperInfo); return s...
zkClient.createNode(SCHEDULE_MASTER_NODE + "/" + scheduled.getId(), objectMapper.writeValueAsString(scheduled), CreateMode.EPHEMERAL);
5
lingochamp/FileDownloader
library/src/main/java/com/liulishuo/filedownloader/message/MessageSnapshotTaker.java
[ "@SuppressWarnings({\"WeakerAccess\", \"UnusedReturnValue\"})\npublic interface BaseDownloadTask {\n\n int DEFAULT_CALLBACK_PROGRESS_MIN_INTERVAL_MILLIS = 10;\n\n /**\n * @param minIntervalUpdateSpeedMs The minimum interval millisecond for updating the downloading\n * s...
import com.liulishuo.filedownloader.BaseDownloadTask; import com.liulishuo.filedownloader.download.DownloadStatusCallback; import com.liulishuo.filedownloader.model.FileDownloadModel; import com.liulishuo.filedownloader.model.FileDownloadStatus; import com.liulishuo.filedownloader.util.FileDownloadLog; import com.liuli...
/* * Copyright (c) 2015 LingoChamp 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 agr...
public static MessageSnapshot catchPause(BaseDownloadTask task) {
0
grennis/MongoExplorer
app/src/main/java/com/innodroid/mongobrowser/ui/ConnectionEditDialogFragment.java
[ "public class Constants {\n\tpublic static final String LOG_TAG = \"mongoexp\";\n\n\tpublic static final String ARG_CONNECTION_ID = \"connid\";\n\tpublic static final String ARG_COLLECTION_INDEX = \"collname\";\n\tpublic static final String ARG_ACTIVATE_ON_CLICK = \"actonclick\";\n\tpublic static final String ARG_D...
import android.app.Activity; import android.app.Dialog; import android.content.ContentUris; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.LoaderManager.LoaderCallbacks; import android.support.v4.content.CursorLoader; import android.support.v4.content.Loa...
package com.innodroid.mongobrowser.ui; public class ConnectionEditDialogFragment extends BaseDialogFragment implements LoaderCallbacks<Cursor> { @Bind(R.id.edit_connection_name) TextView mNameView; @Bind(R.id.edit_connection_server) TextView mServerView; @Bind(R.id.edit_connection_port) TextView mPortView; @Bin...
Uri uri = ContentUris.withAppendedId(MongoBrowserProvider.CONNECTION_URI, args.getLong(Constants.ARG_CONNECTION_ID));
2
kinabalu/mysticpaste
web/src/test/java/com/mysticcoders/webapp/TestPastePage.java
[ "@SpringApplicationContext({\"/applicationContext.xml\", \"applicationContext-test.xml\"})\npublic abstract class AbstractIntegrationTest extends UnitilsJUnit4 {\n\n\n private ApplicationContext applicationContext;\n\n}", "public class MysticPasteApplication extends WebApplication {\n\n private final Logger...
import com.mysticcoders.integrations.AbstractIntegrationTest; import com.mysticcoders.mysticpaste.MysticPasteApplication; import com.mysticcoders.mysticpaste.web.pages.paste.PasteItemPage; import com.mysticcoders.mysticpaste.web.pages.view.ViewPublicPage; import com.mysticcoders.mysticpaste.web.pages.history.Histor...
package com.mysticcoders.webapp; /** * Simple test using the WicketTester */ public class TestPastePage extends AbstractIntegrationTest { @SpringBeanByType private PasteService svc; @SpringBeanByType private PasteItemDao dao; @SpringBeanByType // private PasteCommentDao co...
tester.assertRenderedPage(HistoryPage.class);
4
lacuna/bifurcan
src/io/lacuna/bifurcan/DurableInput.java
[ "public class BlockPrefix {\n\n public enum BlockType {\n // root (2 bits)\n PRIMITIVE,\n TABLE,\n DIFF, // continuation\n COLLECTION, // continuation\n\n // 3 bits preceded by COLLECTION\n HASH_MAP,\n SORTED_MAP,\n HASH_SET,\n SORTED_SET,\n LIST,\n COLLECTION_PLACEHOLDER_...
import io.lacuna.bifurcan.durable.BlockPrefix; import io.lacuna.bifurcan.durable.Bytes; import io.lacuna.bifurcan.durable.Util; import io.lacuna.bifurcan.durable.io.ConcatInput; import io.lacuna.bifurcan.utils.Iterators; import java.io.Closeable; import java.io.DataInput; import java.io.EOFException; import java.io.Inp...
package io.lacuna.bifurcan; /** * A cross between {@link DataInput} and {@link ByteBuffer}. Provides utility methods for writing Bifurcan-specific * values such as {@link #readVLQ} and {@link #readUVLQ()}, as well as ways to slice out delimited blocks via * {@link #sliceBlock(BlockPrefix.BlockType)} et al. * <p...
new Bounds(null, 0, Iterators.toStream(inputs.iterator()).mapToLong(DurableInput::size).sum())
4
Evolveum/connector-ldap
src/main/java/com/evolveum/polygon/connector/ldap/ad/AdSchemaTranslator.java
[ "public class LdapConstants {\n\n public static final String ATTRIBUTE_OBJECTCLASS_NAME = \"objectClass\";\n public static final String ATTRIBUTE_ENTRYUUID_NAME = \"entryUUID\";\n public static final String ATTRIBUTE_NSUNIQUEID_NAME = \"nsUniqueId\";\n public static final String ATTRIBUTE_MODIFYTIMESTAM...
import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.util.Collections; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang3.ArrayUtils; import org.apache.directory.api.ldap.model.constants.SchemaConstants; im...
/** * Copyright (c) 2015-2019 Evolveum * * 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 agr...
for(CtxCfgFlagsBitValues flag : CtxCfgFlagsBitValues.values()) {
3
yyxhdy/ManyEAs
src/jmetal/problems/Golinski.java
[ "public abstract class Problem implements Serializable {\n\n\t/**\n\t * Defines the default precision of binary-coded variables\n\t */\n\tprivate final static int DEFAULT_PRECISSION = 16;\n\n\t/**\n\t * Stores the number of variables of the problem\n\t */\n\tprotected int numberOfVariables_;\n\n\t/**\n\t * Stores t...
import jmetal.core.Problem; import jmetal.core.Solution; import jmetal.encodings.solutionType.BinaryRealSolutionType; import jmetal.encodings.solutionType.RealSolutionType; import jmetal.util.JMException;
// Golinski.java // // Author: // Antonio J. Nebro <antonio@lcc.uma.es> // Juan J. Durillo <durillo@lcc.uma.es> // // Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public Li...
solutionType_ = new RealSolutionType(this) ;
3
maxanier/MinecraftSecondScreenMod
src/main/java/de/maxgb/minecraft/second_screen/data/UserManager.java
[ "public class Configs {\n\n\tpublic static final String CATEGORY_UPDATE_TIMES = \"update times\";\n\tpublic static final String CATEGORY_CONNECTION_SETTINGS = \"connection settings\";\n\tpublic static final String CATEGORY_GENERAL = Configuration.CATEGORY_GENERAL;\n\tpublic static String hostname;\n\tpublic static ...
import de.maxgb.minecraft.second_screen.Configs; import de.maxgb.minecraft.second_screen.util.Constants; import de.maxgb.minecraft.second_screen.util.Helper; import de.maxgb.minecraft.second_screen.util.Logger; import de.maxgb.minecraft.second_screen.util.User; import net.minecraftforge.common.config.Configuration; imp...
package de.maxgb.minecraft.second_screen.data; /** * Manages the second screen users * @author Max * */ public class UserManager { private static final String TAG = "UserManager"; private static ArrayList<User> auth_users = new ArrayList<User>(); private static ArrayList<User> temp_users = new ArrayList<User>...
Logger.i(TAG, "Loaded " + auth_users.size() + " users");
3
bencvt/LibShapeDraw
projects/demos/src/main/java/libshapedraw/demos/mod_LSDDemoEvents.java
[ "public class LibShapeDraw {\n private final Set<Shape> shapes;\n private final Set<Shape> shapesReadonly;\n private final Set<LSDEventListener> eventListeners;\n private final Set<LSDEventListener> eventListenersReadonly;\n private final String instanceId;\n private final String ownerId;\n pri...
import libshapedraw.LibShapeDraw; import libshapedraw.event.LSDEventListener; import libshapedraw.event.LSDGameTickEvent; import libshapedraw.event.LSDPreRenderEvent; import libshapedraw.event.LSDRespawnEvent; import libshapedraw.primitive.Color; import libshapedraw.primitive.ReadonlyVector3; import libshapedraw.primit...
package libshapedraw.demos; /** * Demonstrates a couple basic things you can do with events: * 1) automatically clear all shapes owned by this mod when respawning; and * 2) dynamically create and update shapes, in this case based off the player's * position * <p> * This mod implements the LSDEventListener in...
private WireframeCuboid followBox;
8
msteindorfer/criterion
src/main/java/io/usethesource/criterion/impl/persistent/champ/ChampValueFactory.java
[ "public class MapFactory {\n\n // private final Class<? extends Immutable<?, ?>> targetClass;\n\n private final Method persistentMapOfEmpty;\n private final Method persistentMapOfKeyValuePairs;\n\n private final Method transientMapOfEmpty;\n private final Method transientMapOfKeyValuePairs;\n\n public MapFact...
import io.usethesource.capsule.MapFactory; import io.usethesource.capsule.SetFactory; import io.usethesource.capsule.SetMultimapFactory; import io.usethesource.criterion.api.JmhMap; import io.usethesource.criterion.api.JmhSet; import io.usethesource.criterion.api.JmhSetMultimap; import io.usethesource.criterion.api.Jmh...
/** * Copyright (c) Michael Steindorfer <Centrum Wiskunde & Informatica> and Contributors. * All rights reserved. * * This file is licensed under the BSD 2-Clause License, which accompanies this project * and is available under https://opensource.org/licenses/BSD-2-Clause. */ package io.usethesource.criterion.imp...
private final MapFactory mapFactory;
0
8Yards/Nebula_Android
src/org/nebula/activities/Edit.java
[ "public class RESTGroupManager extends Resource {\r\n\r\n\tpublic RESTGroupManager() {\r\n\t\tsuper(\"RESTGroups\");\r\n\t}\r\n\r\n\tpublic List<Group> retrieveAllGroupsMembers() throws JSONException,\r\n\t\t\tClientProtocolException, IOException {\r\n\t\tResponse r = this.get(\"retrieveAllGroupsMembers\");\r\n\t\t...
import java.util.ArrayList; import java.util.List; import org.nebula.R; import org.nebula.client.rest.RESTGroupManager; import org.nebula.main.NebulaApplication; import org.nebula.models.Group; import org.nebula.models.Profile; import org.nebula.models.Status; import android.app.Activity; import android.app.Al...
/* * author: saad ali, prajwol , sharique */ package org.nebula.activities; public class Edit extends Activity implements OnItemSelectedListener, DialogInterface.OnClickListener, DialogInterface.OnMultiChoiceClickListener { public static final int EDITGROUP_SUCCESSFUL = 0; public static final ...
private List<Group> myGroups;
2
MX-Futhark/hook-any-text
src/main/java/gui/views/HistoryDialog.java
[ "public class HistoryDialogActions {\n\n\tprivate HistoryDialog historyDialog;\n\n\tpublic HistoryDialogActions(HistoryDialog historyDialog) {\n\t\tthis.historyDialog = historyDialog;\n\t}\n\n\t/**\n\t * Sets the action for the \"set output as current\" button.\n\t *\n\t * @param setOutputButton\n\t * \t\t\tThe but...
import java.awt.Dimension; import java.util.Observable; import java.util.Observer; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.table.DefaultTableModel; import gui.actions.HistoryDialogActions; import gui.utils.Images; import gui.views.components.HistoryTable; import gui.views.components.T...
package gui.views; /** * The dialog containing the history of the lines. * * @author Maxime PIA */ @SuppressWarnings("serial") public class HistoryDialog extends JDialog implements Observer { private HistoryDialogActions acts = new HistoryDialogActions(this); private MainWindow mainWindow;
private HistoryTable historyTable;
2
raj10071997/Alexa-Voice-Service
app/src/main/java/com/game/dhanraj/myownalexa/Alarm/MyAlarm.java
[ "public interface ClickListener {\n public void onClick(View view, int position);\n public void onLongClick(View view,int position);\n}", "public class DataBase extends SQLiteOpenHelper {\n\n private ArrayList<AlarmConstants> myList = new ArrayList<>();\n\n private static final String create_alarm_ta...
import android.app.AlarmManager; import android.app.PendingIntent; import android.content.ComponentName; import android.content.DialogInterface; import android.content.Intent; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.os.Bundle; import android.os.IBinder; import ...
package com.game.dhanraj.myownalexa.Alarm; /** * Created by Dhanraj on 10-06-2017. */ public class MyAlarm extends AppCompatActivity { private RecyclerView recyclerView; private RecyclerViewForAlarmAndTimerAdapter recyclerViewForAlarmAndTimerAdapter; private DataBase db; private int idtoDelete; ...
recyclerView, new ClickListener() {
0
presidentio/test-data-generator
src/test/java/com/presidentio/testdatagenerator/ExtendProvidersTest.java
[ "public class PropConst {\n\n public static final String TYPE = \"type\";\n public static final String VALUE = \"value\";\n public static final String SIZE = \"size\";\n public static final String DOMAIN = \"domain\";\n public static final String EXPR = \"expr\";\n public static final String FILE ...
import java.util.Map; import com.presidentio.testdatagenerator.cons.PropConst; import com.presidentio.testdatagenerator.context.Context; import com.presidentio.testdatagenerator.model.Field; import com.presidentio.testdatagenerator.model.Output; import com.presidentio.testdatagenerator.model.Provider; import com.presid...
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed ...
executeSqlFile(output.getProps().get(PropConst.FILE));
0
kstateome/lti-attendance
src/main/java/edu/ksu/canvas/attendance/services/AttendanceService.java
[ "@Entity\n@Table(name = \"attendance\")\n@Check(constraints = \"minutes_missed >= 0 and status IN ('PRESENT', 'TARDY', 'ABSENT', 'EXCUSED', 'NA')\")\npublic class Attendance implements Serializable {\n\n private static final long serialVersionUID = 1L;\n\n @Id\n @GeneratedValue(generator = \"ATTENDANCE_SEQ...
import edu.ksu.canvas.attendance.entity.Attendance; import edu.ksu.canvas.attendance.entity.AttendanceStudent; import edu.ksu.canvas.attendance.enums.Status; import edu.ksu.canvas.attendance.form.RosterForm; import edu.ksu.canvas.attendance.model.AttendanceModel; import edu.ksu.canvas.attendance.model.SectionModel; imp...
package edu.ksu.canvas.attendance.services; @Component public class AttendanceService { private static final Logger LOG = LogManager.getLogger(AttendanceService.class); @Autowired private AttendanceRepository attendanceRepository; @Autowired private AttendanceStudentRepository studentReposito...
public void save(RosterForm rosterForm) {
3
BorjaSanchidrian/DarkOrbitServer
src/com/darkorbit/objects/Player.java
[ "public class LaserSystem extends AttackController {\n\tprivate Socket playerSocket, targetSocket;\n\tprivate Player target;\n\tprivate int minDamage, maxDamage;\n\t\n\tpublic LaserSystem(int playerID) {\n\t\tsuper(playerID);\n\t\t\n\t\tplayerSocket = super.getPlayerCM().getSocket();\n\t}\n\n\t@Override\n\tpublic v...
import java.net.Socket; import java.util.List; import com.darkorbit.attack.LaserSystem; import com.darkorbit.movement.PlayerMovement; import com.darkorbit.mysql.QueryManager; import com.darkorbit.net.GameManager; import com.darkorbit.net.Global; import com.darkorbit.utils.Extra; import com.darkorbit.utils.Vector;
package com.darkorbit.objects; /** * Player class * @author BoBn * */ public class Player { private int playerID, health, level, rank, rings, clanID, configNum, targetID, selectedAmmo; private String userName; private short shipID, factionID, mapID; private Vector position; private boolean moving, isPremiu...
this.playerShip = GameManager.getShip(shipID);
3
ttddyy/spring-social-evernote
src/test/java/org/springframework/social/evernote/api/impl/ThriftWrapperUnwrapTest.java
[ "public class Bar implements org.apache.thrift.TBase<Bar, Bar._Fields>, java.io.Serializable, Cloneable {\n private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"Bar\");\n\n private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.ap...
import org.junit.Test; import org.springframework.aop.support.AopUtils; import org.springframework.social.evernote.api.impl.entity.Bar; import org.springframework.social.evernote.api.impl.entity.Baz; import org.springframework.social.evernote.api.impl.entity.Foo; import java.util.ArrayList; import java.util.HashMap; im...
package org.springframework.social.evernote.api.impl; /** * @author Tadaya Tsuyukubo */ public class ThriftWrapperUnwrapTest { @Test public void testUnwrap() throws Exception { Foo foo = new Foo("foo", new ArrayList<String>(), new HashSet<String>(), new HashMap<String, String>()); Bar bar = new Bar();
Baz baz = new Baz();
1
xSAVIKx/AndroidScreencast
src/main/java/com/github/xsavikx/androidscreencast/app/DeviceChooserApplication.java
[ "@Singleton\npublic class AndroidDebugBridgeWrapper {\n private final String adbPath;\n private AndroidDebugBridge adb;\n\n @Inject\n public AndroidDebugBridgeWrapper(@Named(ADB_PATH_KEY) String adbPath) {\n this.adbPath = adbPath;\n }\n\n public IDevice[] getDevices() {\n return get...
import com.android.ddmlib.IDevice; import com.github.xsavikx.androidscreencast.api.adb.AndroidDebugBridgeWrapper; import com.github.xsavikx.androidscreencast.configuration.ApplicationConfiguration; import com.github.xsavikx.androidscreencast.exception.NoDeviceChosenException; import com.github.xsavikx.androidscreencast...
/* * Copyright 2020 Yurii Serhiichuk * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
final JDialogDeviceList jd = new JDialogDeviceList(devices);
4
stuart-warren/logit
src/main/java/com/stuartwarren/logit/tomcatvalve/Layout.java
[ "public class HttpField extends Field {\n \n private static final HttpField FIELD = new HttpField();\n \n private HttpField() {\n this.setSection(ROOT.HTTP);\n Field.register(this);\n }\n \n public final static void put(final IFieldName key, final Object s) {\n FIELD.put0(k...
import com.stuartwarren.logit.fields.HttpField; import com.stuartwarren.logit.fields.HttpField.HTTP; import com.stuartwarren.logit.layout.IFrameworkLayout; import com.stuartwarren.logit.layout.LayoutFactory; import com.stuartwarren.logit.layout.Log; import com.stuartwarren.logit.utils.LogitLog; import org.apache.catali...
/** * */ package com.stuartwarren.logit.tomcatvalve; /** * @author Stuart Warren * @date 6 Oct 2013 * */ public class Layout implements IFrameworkLayout { private String layoutType; private transient LayoutFactory layoutFactory; private transient LayoutFactory layout; private Strin...
final Log log = doFormat(request, response, time);
4
hamadmarri/Biscuit
main/java/com/biscuit/commands/userStory/AddUserStoryToBacklog.java
[ "public class ColorCodes {\n\n\t// with normal background\n\tpublic static final String RESET = \"\\u001B[0m\";\n\tpublic static final String BLACK = \"\\u001B[30;1m\";\n\tpublic static final String RED = \"\\u001B[31;1m\";\n\tpublic static final String GREEN = \"\\u001B[32;1m\";\n\tpublic static final String YELLO...
import java.io.IOException; import java.util.Date; import com.biscuit.ColorCodes; import com.biscuit.commands.Command; import com.biscuit.models.Project; import com.biscuit.models.UserStory; import com.biscuit.models.enums.BusinessValue; import com.biscuit.models.enums.Points; import com.biscuit.models.enums.Status; im...
package com.biscuit.commands.userStory; public class AddUserStoryToBacklog implements Command { ConsoleReader reader = null; Project project = null;
UserStory userStory = new UserStory();
3
onepf/OPFPush
samples/pushchat/src/main/java/org/onepf/pushchat/retrofit/PushService.java
[ "public final class RegistrationRequestBody extends RequestBody {\n\n @SerializedName(\"providerName\")\n @NonNull\n public final String providerName;\n\n @SerializedName(\"registrationId\")\n @NonNull\n public final String registrationId;\n\n public RegistrationRequestBody(@NonNull final Strin...
import retrofit.http.GET; import retrofit.http.POST; import retrofit.http.Query; import android.support.annotation.NonNull; import org.onepf.pushchat.model.request.RegistrationRequestBody; import org.onepf.pushchat.model.request.SubscribeOrUnsubscribeRequestBody; import org.onepf.pushchat.model.request.UnregistrationRe...
/* * Copyright 2012-2015 One Platform Foundation * * 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 ...
void register(@Body @NonNull final RegistrationRequestBody body,
0
diadoc/diadocsdk-java
src/main/java/Diadoc/Api/print/PrintFormClient.java
[ "public class DiadocSdkException extends Exception {\n public DiadocSdkException(Exception ex) {\n super(ex);\n }\n\n public DiadocSdkException(String message) {\n super(message);\n }\n\n private String formatMessage(Throwable[] exceptions) {\n String text = super.toString();\n ...
import Diadoc.Api.exceptions.DiadocSdkException; import Diadoc.Api.print.models.DocumentProtocolResult; import Diadoc.Api.print.models.DocumentZipResult; import Diadoc.Api.print.models.PrintFormContent; import Diadoc.Api.print.models.PrintFormResult; import Diadoc.Api.helpers.Tools; import Diadoc.Api.httpClient.DiadocH...
package Diadoc.Api.print; public class PrintFormClient { private DiadocHttpClient diadocHttpClient; public PrintFormClient(DiadocHttpClient diadocHttpClient) { this.diadocHttpClient = diadocHttpClient; } public PrintFormResult generatePrintForm(String boxId, String messageId, String docume...
if (Tools.isNullOrEmpty(boxId)) {
5
martji/AndroidDemo
app/src/main/java/com/example/maguoqing/androiddemo/activity/WeekPagerActivity.java
[ "public class SimplePagerAdapter extends WeekPagerAdapter {\n\n public SimplePagerAdapter(FragmentManager fm) {\n super(fm);\n }\n\n @Override protected Fragment createFragmentPager(int position) {\n return SimpleFragment.newInstance(mDays.get(position));\n }\n}", "public class ChineseCalendarGB {\n ...
import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.widget.TextView; import com.example.maguoqing.androiddemo.R; import com.example.maguoqing.androiddemo.adapter.SimplePagerAdapter; import com.example.maguoqing.androiddemo.utils.ChineseCalendarGB; import com.example.maguoqing.andro...
package com.example.maguoqing.androiddemo.activity; /** * Created by tudou on 15-5-19. */ public class WeekPagerActivity extends ActionBarActivity implements WeekDayViewPager.DayScrollListener { private final static String TAG = "WeekPagerActivity"; @InjectView(R.id.view_pager) WeekDayViewPager mViewPag...
mViewPagerContent.setCurrentPosition(DayUtils.calculateDayPosition(mWeekViewAdapter.getFirstShowDay(),
4
bcgov/sbc-qsystem
QSystem/src/ru/apertum/qsystem/server/controller/QIndicatorBoardMonitor.java
[ "public enum CustomerState {\n // значени� �о�то�ни� \"очередника\"\n\n /**\n * 0 удален по не�вке :: Was deleted by default\n */\n STATE_DEAD,\n /**\n * 1 �тоит и ждет в очереди :: Standing and waiting in line\n */\n STATE_WA...
import java.awt.event.ActionEvent; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.LinkedList; import java.util.PriorityQueue; import javax.imageio.ImageIO; import org.dom4j.DocumentException; import org.dom4j.DocumentHelper; impor...
/* * Copyright (C) 2010 {Apertum}Projects. web: www.apertum.ru email: info@apertum.ru * * 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 ...
.toPosition(QConfig.cfg().isDebug(),
1
siis/coal
src/main/java/edu/psu/cse/siis/coal/values/PathValue.java
[ "public class PropagationSolver extends\n IDESolver<Unit, Value, SootMethod, BasePropagationValue, JimpleBasedInterproceduralCFG> {\n\n public PropagationSolver(PropagationProblem propagationProblem) {\n super(propagationProblem);\n }\n\n}", "public abstract class FieldValue implements Internable<FieldVal...
import edu.psu.cse.siis.coal.field.values.NullFieldValue; import edu.psu.cse.siis.coal.field.values.ScalarFieldValue; import edu.psu.cse.siis.coal.field.values.SetFieldValue; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java....
/* * Copyright (C) 2015 The Pennsylvania State University and the University of Wisconsin * Systems and Internet Infrastructure Security Laboratory * * Author: Damien Octeau * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Y...
if (fieldValue instanceof ScalarFieldValue) {
4
jacobhyphenated/PokerServer
src/test/java/com/hyphenated/card/holder/CardEvaluatorTest.java
[ "@JsonSerialize(using=ToStringSerializer.class)\r\npublic enum Card {\r\n\r\n\tTWO_OF_CLUBS(TWO, CLUBS, 1),\r\n\tTHREE_OF_CLUBS(THREE, CLUBS, 5),\r\n\tFOUR_OF_CLUBS(FOUR, CLUBS, 9),\r\n\tFIVE_OF_CLUBS(FIVE, CLUBS, 13),\r\n\tSIX_OF_CLUBS(SIX, CLUBS, 17),\r\n\tSEVEN_OF_CLUBS(SEVEN, CLUBS, 21),\r\n\tEIGHT_OF_CLUBS(EIG...
import com.hyphenated.card.eval.HandRankEvaluator; import com.hyphenated.card.eval.TwoPlusTwoHandEvaluator; import junit.framework.TestCase; import org.junit.Test; import com.hyphenated.card.Card; import com.hyphenated.card.HandType; import com.hyphenated.card.eval.HandRank;
/* The MIT License (MIT) Copyright (c) 2013 Jacob Kanipe-Illig Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
HandRankEvaluator evaluator = TwoPlusTwoHandEvaluator.getInstance();
4
sritchie/kryo
src/com/esotericsoftware/kryo/serializers/FieldSerializer.java
[ "public class Kryo {\r\n\tstatic public final byte NAME = -1;\r\n\tstatic public final byte NULL = 0;\r\n\tstatic public final byte NOT_NULL = 1;\r\n\r\n\tprivate Class<? extends Serializer> defaultSerializer = FieldSerializer.class;\r\n\tprivate final ArrayList<DefaultSerializerEntry> defaultSerializers = new Arra...
import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.security.AccessControlException; import java.util.ArrayList; import java...
field.setAccessible(true); } catch (AccessControlException ex) { continue; } } Optional optional = field.getAnnotation(Optional.class); if (optional != null && !context.containsKey(optional.value())) continue; Class fieldClass = field.getType(); CachedField cachedField = n...
public void read (Kryo kryo, Input input, Object object) {
4
zzz40500/ThemeDemo
baselibrary/src/main/java/com/dim/widget/EditText.java
[ "public interface CircleRevealEnable {\n\n\n\n CRAnimation circularReveal(int centerX, int centerY, float startRadius, float endRadius);\n\n void superDraw(Canvas canvas);\n\n\n}", "public class CircleRevealHelper {\n\n private ValueAnimator mValueAnimator;\n\n public CircleRevealHelper(View view) {\n...
import android.content.Context; import android.graphics.Canvas; import android.support.v7.widget.AppCompatEditText; import android.util.AttributeSet; import com.dim.circletreveal.CircleRevealEnable; import com.dim.circletreveal.CircleRevealHelper; import com.dim.listener.SingleClickListener; import com.dim.skin.SkinSty...
package com.dim.widget; /** * Created by zzz40500 on 15/8/26. */ public class EditText extends AppCompatEditText implements CircleRevealEnable,SkinEnable { private CircleRevealHelper mCircleRevealHelper ; private SkinHelper mSkinHelper; public EditText(Context context) { super(context); ...
super.setOnClickListener(new SingleClickListener(l));
2
minnal/autopojo
src/test/java/org/minnal/autopojo/resolver/ArrayResolverTest.java
[ "public class AttributeMetaData {\n\n\tprivate String name;\n\t\n\tprivate List<Annotation> annotations = new ArrayList<Annotation>();\n\t\n\tprivate Class<?> type;\n\t\n\tprivate List<Type> typeArguments = new ArrayList<Type>();\n\t\n\tpublic AttributeMetaData(PropertyDescriptor descriptor) {\n\t\tthis(descriptor,...
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import java.beans.PropertyDescriptor; import org.minnal.autopojo.AttributeMetaData; import org.minnal.autopojo.CollectionModel; import org.minnal.autopojo.Configuration; import org.minnal.autopojo.GenerationStrategy; import org.mi...
/** * */ package org.minnal.autopojo.resolver; /** * @author ganeshs * */ public class ArrayResolverTest { private ArrayResolver resolver; private Configuration configuration; @BeforeMethod public void setup() { configuration = new Configuration(); resolver = new ArrayResolver(); resolver.ini...
PropertyDescriptor descriptor = PropertyUtil.getDescriptor(CollectionModel.class, propertyName);
5
drissamri/linkshortener
linkshortener-api/src/test/java/be/drissamri/service/LinkServiceImplTest.java
[ "public class LinkEntityBuilder {\n private final LinkEntity link;\n\n public LinkEntityBuilder() {\n link = new LinkEntity();\n }\n\n public final LinkEntityBuilder hash(String hash) {\n this.link.setHash(hash);\n return this;\n }\n\n public final LinkEntityBuilder url(String...
import be.drissamri.LinkEntityBuilder; import be.drissamri.entity.LinkEntity; import be.drissamri.repository.LinkRepository; import be.drissamri.service.exception.InvalidURLException; import be.drissamri.service.exception.LinkNotFoundException; import be.drissamri.service.impl.LinkServiceImpl; import be.drissamri.servi...
package be.drissamri.service; public class LinkServiceImplTest { private static final String HASH = "AZERTY"; private static final String LONG_URL = "http://www.drissamri.be"; private static final String LONG_PHISHING_URL = "http://www.drissamri.be/phishing"; private LinkService linkService; @Mock priv...
linkService = new LinkServiceImpl(shortenService, urlVerifiers, linkRepository);
5
julianthome/inmemantlr
inmemantlr-api/src/test/java/TestSimple.java
[ "public class GenericParser {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(GenericParser.class);\n\n public enum CaseSensitiveType {\n NONE,\n UPPER,\n LOWER\n }\n\n private InmemantlrTool antlr = new InmemantlrTool();\n private DefaultListener listener = new ...
import org.snt.inmemantlr.exceptions.IllegalWorkflowException; import org.snt.inmemantlr.exceptions.ParsingException; import org.snt.inmemantlr.listener.DefaultTreeListener; import org.snt.inmemantlr.tree.ParseTree; import org.snt.inmemantlr.tree.ParseTreeSerializer; import org.snt.inmemantlr.utils.FileUtils; import ja...
/** * Inmemantlr - In memory compiler for Antlr 4 * * The MIT License (MIT) * * Copyright (c) 2016 Julian Thome <julian.thome.de@gmail.com> * * 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 S...
} catch (IllegalWorkflowException | ParsingException e) {
3
lauriholmas/batmapper
src/main/java/com/glaurung/batMap/gui/search/SearchPanel.java
[ "public class SearchEngine extends MapperEngine implements ItemListener {\n\n private String areaName = \"\";\n private String mapperArea;\n private boolean savingAlreadyDisabled = false;\n\n public SearchEngine( SparseMultigraph<Room, Exit> graph, MapperPlugin plugin ) {\n this(plugin);\n ...
import java.awt.event.ActionEvent; import java.awt.event.ComponentEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.io.IOException; import java.util.Collection; import java.util.List; import javax.swing.DefaultComboBoxModel; import javax.swing.JButton; import javax.swing.JComboBox;...
package com.glaurung.batMap.gui.search; public class SearchPanel extends MapperPanel implements ItemListener { private static final long serialVersionUID = 1L; private final int ELEMENT_HEIGHT = 25; private JTextField searchText = new JTextField(); private SearchEngine engine; private DefaultC...
List<String> areas = AreaDataPersister.listAreaNames( this.engine.getBaseDir() );
2
danielshaya/reactivejournal
src/main/java/org/reactivejournal/examples/helloworld/HelloWorldApp_JournalPlayThrough.java
[ "public class PlayOptions {\n private String filter = \"\";\n private ReplayRate replayRate = ReplayRate.FAST;\n private PauseStrategy pauseStrategy = PauseStrategy.YIELD;\n private Object using = null;\n private boolean playFromNow = false;\n private long playFromTime = Long.MIN_VALUE;\n priva...
import io.reactivex.Flowable; import io.reactivex.flowables.ConnectableFlowable; import org.reactivejournal.impl.PlayOptions; import org.reactivejournal.impl.ReactiveJournal; import org.reactivejournal.impl.ReactiveRecorder; import org.reactivejournal.impl.rxjava.RxJavaPlayer; import org.reactivejournal.util.DSUtil; im...
package org.reactivejournal.examples.helloworld; /** * Class to run BytesToWordsProcessor */ public class HelloWorldApp_JournalPlayThrough { private static final Logger LOG = LoggerFactory.getLogger(HelloWorldApp_JournalPlayThrough.class.getName()); public final static String FILE_NAME = System.getPropert...
ReactiveRecorder reactiveRecorder = reactiveJournal.createReactiveRecorder();
2
adyliu/jafka
src/main/java/io/jafka/server/Server.java
[ "public class HttpRequestHandler {\n protected final Logger logger = LoggerFactory.getLogger(getClass());\n final String errorFormat = \"Error processing %s on %s:%d\";\n\n final LogManager logManager;\n public HttpRequestHandler(LogManager logManager){\n this.logManager = logManager;\n }\n ...
import java.io.File; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import io.jafka.http.HttpRequestHandler; import io.jafka.http.HttpServer; import io.jafka.log.LogManager; import io.jafka.mx.ServerInfo; import io.jafka.mx.SocketServerStats; import io.jafka.network.Socket...
/** * 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...
final Scheduler scheduler = new Scheduler(1, "jafka-logcleaner-", false);
5
petersenna/ccfinderx-gui
GemX/gemx/MainWindow.java
[ "public class ExecCommandline {\r\n\r\n\tpublic static int execCommandline(ArrayList<String> args, boolean echoToStderr) throws IOException {\r\n\t\tStringBuilder buf = new StringBuilder();\r\n\t\tbuf.append(\"exec:\");\r\n\t\tfor (String s : args) {\r\n\t\t\tbuf.append(\" \");\r\n\t\t\tbuf.append(s);\r\n\t\t}\r\n\...
import gemx.dialogs.*; import gemx.scatterplothelper.*; import java.io.*; import java.util.*; import model.*; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.*; import org.eclipse.swt.dnd.*; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import ...
package gemx; class CCFinderXHelper { private String[] preprocessorList; private String[] preprocessorHavingExtensionList; private final String tempFileName1 = TemporaryFileManager.createTemporaryFileName(); private MainWindow mainWindow; public CCFinderXHelper(MainWindow mainWindow) { ...
mainWindow.showErrorMessage(Messages.getString("gemx.MainWindow.S_FILE_IO_ERROR_IN_READING_PREPROCESSOR_LIST")); //$NON-NLS-1$
7
Labs64/NetLicensing-Gateway
src/main/java/com/labs64/netlicensing/gateway/integrations/mycommerce/MyCommerceController.java
[ "@Component\npublic class PersistingLogger {\n\n @Autowired\n private LogRepository logRepository;\n\n @Autowired\n private TimeStampTracker timeStampTracker;\n\n @Transactional(propagation = Propagation.NOT_SUPPORTED)\n public void log(final String key, final String secondaryKey, final StoredLog....
import java.util.List; import javax.ws.rs.DefaultValue; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import org.springframewor...
package com.labs64.netlicensing.gateway.integrations.mycommerce; @Component @Produces({ MediaType.TEXT_PLAIN }) @Path("/" + MyCommerce.MyCommerceConstants.ENDPOINT_BASE_PATH) public class MyCommerceController extends AbstractBaseController { @Autowired private MyCommerce myCommerce; @Autowired
private PersistingLogger persistingLogger;
0
cytomine/Cytomine-java-client
src/main/java/be/cytomine/client/collections/JobParameterCollection.java
[ "public class Cytomine {\n\n private static final Logger log = LogManager.getLogger(Cytomine.class);\n static Cytomine CYTOMINE;\n\n CytomineConnection defaultCytomineConnection;\n private String host;\n private String login;\n private String pass;\n private String publicKey;\n private Strin...
import be.cytomine.client.Cytomine; import be.cytomine.client.CytomineConnection; import be.cytomine.client.CytomineException; import be.cytomine.client.models.Job; import be.cytomine.client.models.JobParameter;
package be.cytomine.client.collections; /* * Copyright (c) 2009-2020. Authors: see NOTICE file. * * 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...
public static JobParameterCollection fetchByJob(Job job) throws CytomineException {
2
shixinzhang/GardenOfFeeling
app/src/main/java/sxkeji/net/dailydiary/http/HttpClient.java
[ "public class Article implements Serializable{\n\n private Long id;\n /** Not-null value. */\n private String date;\n private String address;\n private String weather;\n /** Not-null value. */\n private String title;\n /** Not-null value. */\n private String content;\n private Integer ...
import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.text.TextUtils; import android.util.Log; import android.view.View; import com.avos.avoscloud.AVCloudQueryResult; ...
} public void postImage(String url, Map<String, String> map, final HttpResponseHandler httpResponseHandler, UIProgressListener uiProgressRequestListener) { RequestBody requestBody = null; if (NetWorkUtils.isNetworkAvailable(context)) { if (isShowProgressDialog) { ...
public static AVObject uploadTodo2Cloud(final Context context, Todo todo) {
1
komamitsu/fluency
fluency-fluentd/src/test/java/org/komamitsu/fluency/buffer/BufferForFluentdTest.java
[ "@JsonSerialize(using = EventTime.Serializer.class)\npublic class EventTime\n{\n private final long seconds;\n private final long nanoseconds;\n\n /**\n * Constructs an <code>EventTime</code>.\n *\n * @param seconds the epoch seconds. This should be a 32-bit value.\n * @param nanoseconds th...
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.ObjectMapper; import org.hamcrest.CoreMatchers; import org.junit.jupiter.api.Test; import org.komamitsu.fluency.EventTime; import org.komamitsu.fluency.fluentd.ingester.FluentdIngester; import org.komamitsu.fluency.fluentd.ingester.send...
/* * Copyright 2018 Mitsunori Komatsu (komamitsu) * * 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 applicabl...
Ingester ingester = new FluentdIngester(new FluentdIngester.Config(), sender);
1
w3c/epubcheck
src/main/java/com/adobe/epubcheck/overlay/OverlayHandler.java
[ "public final class EPUBLocation implements Comparable<EPUBLocation>\n{\n\n public static EPUBLocation create(String fileName)\n {\n return new EPUBLocation(fileName, -1, -1, null);\n }\n\n public static EPUBLocation create(String fileName, String context)\n {\n return new EPUBLocation(fileName, -1, -1, ...
import java.util.EnumSet; import java.util.HashSet; import java.util.Map; import java.util.Set; import com.adobe.epubcheck.api.EPUBLocation; import com.adobe.epubcheck.api.Report; import com.adobe.epubcheck.messages.MessageId; import com.adobe.epubcheck.opf.OPFChecker30; import com.adobe.epubcheck.opf.ValidationContext...
package com.adobe.epubcheck.overlay; public class OverlayHandler implements XMLHandler { private static Map<String, Vocab> RESERVED_VOCABS = ImmutableMap.<String, Vocab> of("", AggregateVocab.of(StructureVocab.VOCAB, StructureVocab.UNCHECKED_VOCAB)); private static Map<String, Vocab> KNOWN_VOCAB_URIS = I...
report.message(MessageId.MED_008, EPUBLocation.create(path, parser.getLineNumber(), parser.getColumnNumber()));
2
eXfio/CucumberSync
CucumberSync/src/main/java/org/exfio/csyncdroid/syncadapter/CalendarsSyncAdapterService.java
[ "public class Constants {\n\tpublic static final String APP_VERSION = BuildConfig.VERSION_NAME;\n\tpublic static final String ACCOUNT_TYPE_CSYNC = \"org.exfio.csyncdroid.csync\";\n\tpublic static final String ACCOUNT_TYPE_FXACCOUNT = \"org.exfio.csyncdroid.fxaccount\";\n\tpublic static final String A...
import org.exfio.csyncdroid.resource.LocalCalendar; import org.exfio.csyncdroid.resource.LocalCollection; import org.exfio.csyncdroid.resource.WeaveCalendar; import org.exfio.csyncdroid.resource.WeaveCollection; import java.util.HashMap; import java.util.Map; import android.accounts.Account; import android.app.Service;...
/* * Copyright (C) 2015 Gerry Healy <nickel_chrome@exfio.org> and contributors * * 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 ...
if ( account.type.equals(Constants.ACCOUNT_TYPE_CSYNC) ) {
0
edmocosta/queryfy
queryfy-core/src/test/java/org/evcode/queryfy/core/operator/LogicalOperatorTest.java
[ "public class QueryParser extends BaseParser<Object> {\n\n final ParserConfig config;\n\n public QueryParser() {\n this.config = ParserConfig.DEFAULT;\n }\n\n public QueryParser(ParserConfig config) {\n this.config = config;\n }\n\n //Common rules\n Rule WS() {\n return One...
import org.evcode.queryfy.core.parser.QueryParser; import org.evcode.queryfy.core.parser.ast.AndNode; import org.evcode.queryfy.core.parser.ast.FilterNode; import org.evcode.queryfy.core.parser.ast.Node; import org.evcode.queryfy.core.parser.ast.OrNode; import org.evcode.queryfy.core.utils.ExpressionParserUtils; import...
/* * Copyright 2017 EVCode * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
QueryParser expressionParser = Parboiled.createParser(QueryParser.class);
0
tkonopka/GeneticThesaurus
src/thesaurus/make/ThesaurusFilter.java
[ "public class GeneticThesaurus {\n\n // set the version of this Genetic Thesaurus\n final static String version = \"0.2.1\";\n // set some default values\n public static final int DEFAULT_READLEN = 100;\n public static final int DEFAULT_DIVISOR = 10;\n public static final int DEFAULT_OFFSET = 0;\n...
import thesaurus.GeneticThesaurus; import thesaurus.util.ThesaurusLog; import thesaurus.util.ThesaurusIO; import thesaurus.util.SNVPosition; import thesaurus.util.SNVPositionDetails; import thesaurus.util.SNVPositionComparator; import thesaurus.util.SNVPositionDetailsList; import thesaurus.util.ThesaurusSAMRecord; impo...
public ThesaurusFilter(String[] args) { if (args.length == 0) { printFilterHelp(); mylog = null; return; } super.loadDefaults(); super.setOk(parseFilterParameters(args)); mylog = new ThesaurusLog(System.out); mylog.setVerbose(verbo...
SNVPositionDetailsList[] comparedetails = new SNVPositionDetailsList[numbams];
6
mikolajmitura/java-properties-to-json
src/main/java/pl/jalokim/propertiestojson/resolvers/primitives/adapter/PrimitiveJsonTypeResolverToNewApiAdapter.java
[ "public abstract class AbstractJsonType {\r\n\r\n /**\r\n * This one simply concatenate to rest of json. Simply speaking when will not converted then will not create whole json correctly.\r\n *\r\n * @return string for part of json.\r\n */\r\n public abstract String toStringJson();\r\n\r\n ...
import static java.util.Arrays.asList; import static pl.jalokim.utils.reflection.InvokableReflectionUtils.invokeMethod; import static pl.jalokim.utils.reflection.InvokableReflectionUtils.setValueForField; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import java.util.Optional; import...
package pl.jalokim.propertiestojson.resolvers.primitives.adapter; @SuppressWarnings("unchecked") @SuppressFBWarnings("UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR") public final class PrimitiveJsonTypeResolverToNewApiAdapter extends PrimitiveJsonTypeResolver<Object>
implements TextToConcreteObjectResolver<Object>, ObjectToJsonTypeConverter<Object> {
3
liuhangyang/StormMQ
src/main/java/com/ystruct.middleware/stormmq/broker/netty/FlushTool.java
[ "public class AckManager {\n //ConcurrentLinkedQueue是一个非阻塞的线程安全的队列,注意不要使用ConcurrentLinkQueue的size()方法,此方法会遍历所有的元素\n private static ConcurrentLinkedQueue<SendResult> ackQueue = new ConcurrentLinkedQueue<SendResult>();\n private static ConcurrentHashMap<String/*requestId*/,Channel> producerMap = new Concurre...
import broker.AckManager; import broker.SemaphoreManager; import file.MessageLog; import smq.SendResult; import smq.SendStatus; import tool.LogWriter; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Semaphore;
package broker.netty; /** * Created by yang on 16-11-26. */ public class FlushTool { public static MessageLog log = null; public static LogWriter logWriter = null; static { try { log = new MessageLog("message"); //初始化持久化文件的实例 logWriter = logWriter.getLogWriter(); ...
AckManager.pushAck(ack); //往ack队列里面放一个ack消息
0
msdx/AndroidPNClient
androidpn/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java
[ "public class XMPPException extends Exception {\n\n private StreamError streamError = null;\n private XMPPError error = null;\n private Throwable wrappedThrowable = null;\n\n /**\n * Creates a new XMPPException.\n */\n public XMPPException() {\n super();\n }\n\n /**\n * Creat...
import org.apache.harmony.javax.security.auth.callback.Callback; import org.apache.harmony.javax.security.auth.callback.NameCallback; import org.apache.harmony.javax.security.auth.callback.PasswordCallback; import org.apache.harmony.javax.security.sasl.RealmCallback; import org.apache.harmony.javax.security.sasl.Re...
/** * $RCSfile$ * $Revision: $ * $Date: $ * * Copyright 2003-2007 Jive Software. * * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www....
authenticationText = Base64.encodeBytes(response,Base64.DONT_BREAK_LINES);
3
Protino/Fad-Flicks
app/src/main/java/com/calgen/prodek/fadflicks/Fragment/GridFragment.java
[ "public class MainActivity extends AppCompatActivity implements GridFragment.ReloadCallback {\n\n //re-enable usage of vectors for devices(API 19 and lower)\n static {\n AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);\n }\n\n public static final String MOVIE_DETAIL_FRAGMENT_TAG = \"M...
import android.content.Context; import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.view.MenuItemCompat; import android.support.v7.widget.DefaultItemAnimator; import a...
searchView.setOnQueryTextListener(this); } @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); Icepick.saveInstanceState(this, outState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, ...
ApiClient apiClient = new ApiClient().setIsDebug(ApplicationConstants.DEBUG);
2
DeFuture/AmazeFileManager-master
src/main/java/com/amaze/filemanager/adapters/Recycleradapter.java
[ "public class Main extends android.support.v4.app.Fragment {\n public File[] file;\n public ArrayList<Layoutelements> list;\n public ArrayList<SmbFile> smbFiles;\n public Recycleradapter adapter;\n public Futils utils;\n public boolean selection;\n public boolean results = false,smbMode=false;\...
import android.app.Activity; import android.content.Context; import android.graphics.Color; import android.graphics.ColorMatrixColorFilter; import android.graphics.Typeface; import android.graphics.drawable.GradientDrawable; import android.os.Build; import android.support.v7.widget.RecyclerView; import android.util.Spa...
myChecked.put(i, b); } notifyDataSetChanged(); if(main.mActionMode!=null)main.mActionMode.invalidate(); if (getCheckedItemPositions().size() == 0) { main.selection = false; if(main.mActionMode!=null) main.mActionMode.finish(); ...
if (Icons.isPicture((rowItem.getDesc().toLowerCase()))) filetype = 0;
1
4FunApp/4Fun
server/4FunServer/src/com/mollychin/utils/TimerAction.java
[ "public final static String BEGIN_TIME = \"07:30:00\";", "public final static String END_TIME = \"07:31:00\";", "public class ArDailySpider {\n\t/**\n\t * @param args\n\t */\n\tpublic void arDailySpider() {\n\t\t// 作者\n\t\ttry {\n\t\t\tfor (int i = 0; i <= 4; i++) {\n\t\t\t\tArDailySpider arDailySpider = new Ar...
import static com.mollychin.utils.ConstantsUtil.BEGIN_TIME; import static com.mollychin.utils.ConstantsUtil.END_TIME; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimerTask; import com.mollychin.spider.ArDailySpider; import com.mollychin.spider.ArOneSpider;...
package com.mollychin.utils; public class TimerAction extends TimerTask { public final SimpleDateFormat Df = new SimpleDateFormat("HH:mm:ss"); @Override public void run() { // 设置日期格式 String currentDate = Df.format(new Date());
int touchFlag = compareDate(BEGIN_TIME, currentDate, END_TIME);
0
nisovin/Shopkeepers
src/main/java/com/nisovin/shopkeepers/shoptypes/BuyingPlayerShopkeeper.java
[ "public interface Filter<T> {\n\n\tpublic boolean accept(T object);\n}", "public class ItemCount {\n\n\tprivate final ItemStack item;\n\tprivate int amount;\n\n\tpublic ItemCount(ItemStack item, int initialAmount) {\n\t\tValidate.notNull(item, \"Item cannot be null!\");\n\t\tthis.item = item.clone();\n\t\tthis.it...
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.Chest; import org.bukkit.configuration.ConfigurationSection; import org.bu...
package com.nisovin.shopkeepers.shoptypes; public class BuyingPlayerShopkeeper extends PlayerShopkeeper { protected static class BuyingPlayerShopEditorHandler extends PlayerShopEditorHandler { protected BuyingPlayerShopEditorHandler(UIType uiType, BuyingPlayerShopkeeper shopkeeper) { super(uiType, shopkeepe...
Inventory inventory = Bukkit.createInventory(player, 27, Settings.editorTitle);
2
fadmaa/RDF-faceted-browser
functional_test/org/deri/rdf/browser/federated/functest/CountResourcesMissingPropertyTest.java
[ "public class RdfEngine {\n\t\n\tprivate static Logger logger = Logger.getLogger(\"org.deri.rdf.browser.RdfEngine\");\n\n\tpublic List<AnnotatedResultItem> getPropertiesWithCount(String sparql, String endpoint, String varname) {\n\t\tList<AnnotatedResultItem> propsWithCount = new ArrayList<AnnotatedResultItem>();\n...
import static org.testng.Assert.assertEquals; import java.util.HashSet; import java.util.Set; import org.deri.rdf.browser.RdfEngine; import org.deri.rdf.browser.model.AnnotatedResultItem; import org.deri.rdf.browser.model.Facet; import org.deri.rdf.browser.model.FacetFilter; import org.deri.rdf.browser.model.MainFilter...
package org.deri.rdf.browser.federated.functest; public class CountResourcesMissingPropertyTest { RdfEngine rdfEngine; NaiveFederatedSparqlEngine sparqlEngine; String[] endpoints = new String[]{ "http://localhost:3030/test/query", "http://localhost:3031/test/query" }; MainFilter mainFilter = new MainFil...
assertEquals(res.getValue().getType(), RdfDecoratedValue.NULL);
5
LonamiWebs/Stringlate
src/core/src/main/java/io/github/lonamiwebs/stringlate/classes/sources/GitSource.java
[ "@SuppressWarnings({\"WeakerAccess\", \"unused\", \"SameParameterValue\", \"SpellCheckingInspection\", \"deprecation\"})\npublic class FileUtils {\n // Used on methods like copyFile(src, dst)\n private static final int BUFFER_SIZE = 4096;\n\n public static String readTextFileFast(final File file) {\n ...
import net.gsantner.opoc.util.FileUtils; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import io.github.lonamiwebs.stringlate.classes.Messenger; import io.github.lonamiwebs.stringlate.classes.git.GitClone...
package io.github.lonamiwebs.stringlate.classes.sources; public class GitSource implements StringsSource { private File mWorkDir; private final String mGitUrl, mBranch; private final HashMap<String, ArrayList<File>> mLocaleFiles; private GitCloneProgressCallback mCloneCallback; private boolean ...
final Messenger.OnSyncProgress callback) {
1
AKSW/openQA
openqa.webserver/src/main/java/org/aksw/openqa/component/answerformulation/AnswerFormulation.java
[ "public interface IParams extends IObject {\n\tpublic IComponent getSource();\n}", "public interface IResult extends IParams {\n\tpublic IParams getInputParam();\n}", "public class InterpreterProvider extends PluginProcessProvider<Interpreter, IInterpreterFactory> {\n public InterpreterProvider(List<? extend...
import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.aksw.openqa.component.context.IContext; import org.aksw.openqa.component.object.IParams; import org.aksw.openqa.component.object.IResult; import org.aksw.openqa.component.object.Params; import org.aksw.openqa...
package org.aksw.openqa.component.answerformulation; public class AnswerFormulation { private static Logger logger = Logger.getLogger(AnswerFormulation.class); public List<? extends IResult> process(boolean skipRetriever, Map<String, Object> params, PluginManager pluginManager, IContext context) throws Ex...
InterpreterProvider interpreterProvider = (InterpreterProvider) pluginManager.getProvider(InterpreterProvider.class);
2
excelsior-oss/excelsior-jet-api
src/main/java/com/excelsiorjet/api/tasks/RunTask.java
[ "public class ExcelsiorJet {\n\n private final JetHome jetHome;\n private final Log logger;\n\n private JetEdition edition;\n private OS targetOS;\n private CpuArch targetCpu;\n\n public ExcelsiorJet(JetHome jetHome, Log logger) throws JetHomeException {\n this.jetHome = jetHome;\n t...
import java.util.stream.Collectors; import static com.excelsiorjet.api.log.Log.logger; import com.excelsiorjet.api.ExcelsiorJet; import com.excelsiorjet.api.cmd.CmdLineTool; import com.excelsiorjet.api.cmd.CmdLineToolException; import com.excelsiorjet.api.util.Txt; import com.excelsiorjet.api.util.Utils; import java.io...
/* * Copyright (c) 2017, Excelsior LLC. * * This file is part of Excelsior JET API. * * Excelsior JET API 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 * ...
errCode = new CmdLineTool(args)
1
talklittle/reddit-is-fun
src/com/andrewshu/android/reddit/common/tasks/SaveTask.java
[ "public class Common {\n\t\n\tprivate static final String TAG = \"Common\";\n\t\n\t// 1:subreddit 2:threadId 3:commentId\n\tprivate static final Pattern COMMENT_LINK = Pattern.compile(Constants.COMMENT_PATH_PATTERN_STRING);\n\tprivate static final Pattern REDDIT_LINK = Pattern.compile(Constants.REDDIT_PATH_PATTERN_...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpException; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apa...
package com.andrewshu.android.reddit.common.tasks; public class SaveTask extends AsyncTask<Void, Void, Boolean> { private static final String TAG = "SaveWorker"; private ThingInfo mTargetThreadInfo; private String mUserError = "Error voting."; private String mUrl; private boolean mSave; private RedditSetti...
Common.showErrorToast("You must be logged in to save.", Toast.LENGTH_LONG, mContext);
0
bzim/graphml-writer
src/main/java/de/graphml/writer/yed/graphics/AbstractBaseLabel.java
[ "public interface ElementWriter {\n\n\tvoid startData(Key key);\n\n\tvoid startElement(String localName);\n\n\tvoid startElement(String namespaceURI, String localName);\n\n\tvoid writeAttribute(String localName, String value);\n\n\tvoid writeAttribute(String localName, Boolean value);\n\n\tvoid writeAttribute(Strin...
import de.graphml.writer.model.ElementWriter; import de.graphml.writer.yed.style.Alignment; import de.graphml.writer.yed.style.AutoSizePolicy; import de.graphml.writer.yed.style.FontStyle; import de.graphml.writer.yed.style.ModelName; import de.graphml.writer.yed.style.ModelPosition;
/* * 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 n...
public FontStyle fontStyle = FontStyle.PLAIN;
3
tgobbens/fluffybalance
core/src/com/balanceball/enity/LeaderBoardGuiEntity.java
[ "public class GuiComponent implements Component {\n public Stage stage = null;\n}", "public class HighScoreController {\n\n // Warning, change this will break existing high scores!\n private static final String PREFERENCES_NAME = \"preferences\";\n private static final String PREFERENCES_SCORE_NAME = ...
import com.badlogic.gdx.Application; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.NinePatch; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx....
package com.balanceball.enity; public class LeaderBoardGuiEntity extends Entity { private static final Color COLOR_FONT = new Color(0xffffffff); private Skin mSkin; private BitmapFont mFont; private float mDefaultMargin; private Table mScrollPaneTable; private LeaderBoardController mCont...
addComponent(new GuiComponent());
0
matejdro/PebbleAndroidCommons
src/main/java/org/java_websocket/WebSocketImpl.java
[ "public abstract class Draft {\n\n\tpublic enum HandshakeState {\n\t\t/** Handshake matched this Draft successfully */\n\t\tMATCHED,\n\t\t/** Handshake is does not match this Draft */\n\t\tNOT_MATCHED\n\t}\n\tpublic enum CloseHandshakeType {\n\t\tNONE, ONEWAY, TWOWAY\n\t}\n\n\tpublic static int MAX_FAME_SIZE = 1000...
import org.java_websocket.drafts.Draft; import org.java_websocket.drafts.Draft_10; import org.java_websocket.drafts.Draft_75; import org.java_websocket.drafts.Draft_76; import org.java_websocket.exceptions.InvalidHandshakeException; import org.java_websocket.framing.CloseFrame; import org.java_websocket.framing.Frameda...
close( e ); } } catch ( IncompleteHandshakeException e ) { if( tmpHandshakeBytes.capacity() == 0 ) { socketBuffer.reset(); int newsize = e.getPreferedSize(); if( newsize == 0 ) { newsize = socketBuffer.capacity() + 16; } else { assert ( e.getPreferedSize() >= socketBuffer.remaining...
sendFrame( new CloseFrameBuilder( code, message ) );
6
hprose/hprose-j2me
cldc/1.1ext/src/hprose/client/HproseClient.java
[ "public interface HproseCallback {\r\n void handler(Object result, Object[] arguments);\r\n}\r", "public interface HproseInvoker {\r\n void invoke(String functionName, HproseCallback callback);\r\n void invoke(String functionName, HproseCallback callback, HproseErrorEvent errorEvent);\r\n void invoke(...
import java.io.OutputStream; import hprose.common.HproseErrorEvent; import hprose.common.HproseCallback; import hprose.common.HproseInvoker; import hprose.common.HproseException; import hprose.common.HproseResultMode; import hprose.common.HproseFilter; import hprose.io.HproseWriter; import hprose.io.HproseReade...
/**********************************************************\ | | | hprose | | | | Official WebSite: http://www.hprose.com/ | | ...
invoke(functionName, nullArgs, callback, null, null, false, HproseResultMode.Normal);
3
javaBin/AndroiditoJZ12
android/src/main/java/com/google/android/apps/iosched/appwidget/MyScheduleWidgetProvider.java
[ "public class ScheduleContract {\n\n /**\n * Special value for {@link SyncColumns#UPDATED} indicating that an entry\n * has never been updated, or doesn't exist yet.\n */\n public static final long UPDATED_NEVER = -2;\n\n /**\n * Special value for {@link SyncColumns#UPDATED} indicating that...
import android.accounts.Account; import android.annotation.TargetApi; import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; import android.cont...
ContentResolver.requestSync( new Account("JavaZone Schedule", "no.java.schedule"), ScheduleContract.CONTENT_AUTHORITY, extras); } // Update widget final AppWidgetManager m...
if (UIUtils.hasICS()) {
2
mitdbg/AdaptDB
src/main/java/core/adapt/spark/join/SparkJoinCopartitionedInputFormat.java
[ "public class JoinQuery implements Serializable {\n private static final long serialVersionUID = 1L;\n\n private Predicate[] predicates;\n private String table;\n private int joinAttribute;\n\n public JoinQuery(String queryString) {\n String[] parts = queryString.split(\"\\\\|\");\n thi...
import core.adapt.JoinQuery; import core.adapt.iterator.JoinRepartitionIterator; import core.adapt.iterator.PartitionIterator; import core.adapt.iterator.PostFilterIterator; import core.adapt.spark.SparkQueryConf; import core.utils.HDFSUtils; import core.utils.ReflectionUtils; import org.apache.hadoop.conf.Configuratio...
package core.adapt.spark.join; /** * Created by ylu on 4/25/16. */ public class SparkJoinCopartitionedInputFormat extends FileInputFormat<LongWritable, Text> implements Serializable { public static class SparkJoinCopartitionedFileSplit extends CombineFileSplit implements Serializable { ...
JoinQuery jq1 = new JoinQuery(conf.get("DATASET1_QUERY"));
0
wymarc/astrolabe-generator
src/main/java/com/wymarc/astrolabe/generator/printengines/postscript/EPSPrintEngine.java
[ "public class GeneratorGui extends JFrame implements ActionListener {\n public static Astrolabe MY_ASTROLABE = null;\n public static Config MY_CONFIG = null;\n public static boolean HAS_PRINTER_SUPPORT = false;\n public static String tabSelected = \"Front\";\n private static JLabel statusLabel = new ...
import javax.print.attribute.HashPrintRequestAttributeSet; import javax.print.attribute.PrintRequestAttributeSet; import javax.print.attribute.standard.MediaSizeName; import javax.swing.*; import java.io.*; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipOutputStream; import com.wymarc.astrol...
/** * $Id: AstrolabeGenerator.java,v 3.1 * <p/> * The Astrolabe Generator 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. * <p/> ...
SineQuadrant sineQuadrant = new SineQuadrant();
6
aleven/jpec-server
src/main/java/it/attocchi/jpec/server/bl/AzioneBL.java
[ "@Entity\r\n@Table(schema = \"\", name = \"pec01_messaggi\")\r\npublic class MessaggioPec extends AbstractEntityMarksWithIdLong<MessaggioPec> {\r\n\r\n\tpublic enum Folder {\r\n\t\tIN,\r\n\t\tOUT\r\n\t}\r\n\r\n\t/**\r\n\t * \r\n\t */\r\n\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t@Id\r\n\t@Generated...
import it.attocchi.jpec.server.entities.MessaggioPec; import it.attocchi.jpec.server.exceptions.PecException; import it.attocchi.jpec.server.protocollo.AzioneContext; import it.attocchi.jpec.server.protocollo.AzioneEsito; import it.attocchi.jpec.server.protocollo.AzioneGenerica; import java.util.Properties; import java...
package it.attocchi.jpec.server.bl; public class AzioneBL { protected static final Logger logger = LoggerFactory.getLogger(AzioneBL.class); // Message email, MessaggioPec pec, String mailboxName,
public static synchronized AzioneGenerica creaIstanzaAzione(EntityManagerFactory emf, String classe, AzioneContext context) throws PecException {
4
BracketCove/Profiler
app/src/main/java/com/wiseass/profiler/profilepage/ProfilePageFragment.java
[ "public class AuthInjection {\n\n public static AuthSource provideAuthSource(){\n return FirebaseAuthService.getInstance();\n }\n\n}", "public class DatabaseInjection {\n public static DatabaseSource provideDatabaseSource() {\n return FakeDatabaseService.getInstance();\n }\n}", "public...
import android.app.Fragment; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.annotation.StringRes; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.view.LayoutInflater; import android.view.Vie...
@Override public void onClick(View view) { presenter.onLogoutConfirmed(); } }) .show(); } @Override public void startProfileSettingsActivity() { Intent i = new Intent(getActivity(), P...
Intent i = new Intent(getActivity(), PhotoGalleryActivity.class);
4
TrumanDu/AutoProgramming
src/main/java/com/aibibang/web/generator/controller/CgTableConfigController.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.Date; 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.annota...
package com.aibibang.web.generator.controller; @Controller @RequestMapping("/tableConfig")
public class CgTableConfigController extends BaseController {
0
InteractiveSystemsGroup/GamificationEngine-Kinben
src/main/java/info/interactivesystems/gamificationengine/entities/rewards/Points.java
[ "@Named\n@Stateless\npublic class GoalDAO {\n\t@PersistenceContext(unitName = PersistenceUnit.PROJECT)\n\tprivate EntityManager em;\n\n\t/**\n\t * Stores a new goal in the data base.\n\t * \n\t * @param goal\n\t * The goal which should be stored in the data base.\n\t * @return The id of the {@link Goal}....
import info.interactivesystems.gamificationengine.dao.GoalDAO; import info.interactivesystems.gamificationengine.dao.RuleDAO; import info.interactivesystems.gamificationengine.entities.Player; import info.interactivesystems.gamificationengine.entities.PlayerGroup; import info.interactivesystems.gamificationengine.entit...
package info.interactivesystems.gamificationengine.entities.rewards; /** * Points class serves as a Reward-subclass, that allocates points to a player. * Points are a volatile reward which can be earned more than one time. The * awarded points are added to the current ones of a player. */ @Entity @Discriminato...
List<FinishedGoal> fGoalsList = new ArrayList<>();
5