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
DigAg/digag-server
src/main/java/com/digag/service/Impl/AuthServiceImpl.java
[ "@Component\npublic class JwtTokenUtil implements Serializable {\n\n private static final long serialVersionUID = -3301605591108950415L;\n\n private static final String CLAIM_KEY_USERNAME = \"sub\";\n private static final String CLAIM_KEY_CREATED = \"created\";\n\n @Value(\"${jwt.secret}\")\n private...
import com.digag.config.security.JwtTokenUtil; import com.digag.config.security.JwtUser; import com.digag.domain.Role; import com.digag.domain.Repository.RoleRepository; import com.digag.domain.User; import com.digag.domain.Repository.UserRepository; import com.digag.service.AuthService; import com.digag.util.JsonResul...
package com.digag.service.Impl; /** * Created by Yuicon on 2017/5/20. * https://segmentfault.com/u/yuicon */ @Service @SuppressWarnings("all") public class AuthServiceImpl implements AuthService { private Logger logger = LoggerFactory.getLogger(this.getClass()); @Value("${jwt.tokenHead}") private St...
if (userToAdd.getAccount() == null || !Util.checkEmail(userToAdd.getAccount())) {
8
ForeverWJY/CoolQ_Java_Plugin
src/main/java/com/wjyup/coolq/service/plugins/OSChinaService.java
[ "@Getter\n@Setter\npublic class RequestData implements Serializable {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\t/**\n\t * <pre>\n\t 代码(Type)\t说明\t\t含有的子消息类型(SubType)\n\t 1\t私聊信息\t\t11/来自好友 1/来自在线状态 2/来自群 3/来自讨论组\n\t 2\t群消息\t\t1/普通消息 2/匿名消息 3/系统消息\n\t 4\t讨论组信息\t目前固定为1\n\t 11\t上传群文件\t目前固定为1\n\t 101\t...
import com.google.common.eventbus.Subscribe; import com.wjyup.coolq.entity.RequestData; import com.wjyup.coolq.event.GroupMsgEvent; import com.wjyup.coolq.event.PrivateMsgEvent; import com.wjyup.coolq.eventbus.XEventBus; import com.wjyup.coolq.service.ResolveMessageService; import com.wjyup.coolq.util.LocalCache; impor...
package com.wjyup.coolq.service.plugins; @Component public class OSChinaService extends ResolveMessageService implements InitializingBean { @Autowired private XEventBus eventBus; private final String oschinaNews = "oschina_news"; private final String oschinaSoft = "oschina_soft"; @Subscribe ...
private void doit(GroupMsgEvent event) {
1
indvd00m/java-ascii-render
ascii-render/src/test/java/com/indvd00m/ascii/render/tests/TestDot.java
[ "public class Canvas implements ICanvas {\n\n\tpublic static final char NULL_CHAR = '\\0';\n\n\tprotected final int width;\n\tprotected final int height;\n\tprotected final List<StringBuilder> lines;\n\n\t// cache\n\tprotected String cachedText;\n\tprotected String cachedLines;\n\tprotected boolean needUpdateCache ...
import com.indvd00m.ascii.render.Canvas; import com.indvd00m.ascii.render.Point; import com.indvd00m.ascii.render.api.ICanvas; import com.indvd00m.ascii.render.api.IContext; import com.indvd00m.ascii.render.api.IPoint; import com.indvd00m.ascii.render.elements.Dot; import org.junit.Test; import static org.junit.Assert....
package com.indvd00m.ascii.render.tests; /** * @author indvd00m (gotoindvdum[at]gmail[dot]com) * @since 1.0.0 */ public class TestDot { @Test public void test01() {
IContext context = mock(IContext.class);
3
Nantes1900/Nantes-1900
src/fr/nantes1900/control/isletselection/IsletSelectionController.java
[ "public final class TextsKeys {\r\n\r\n /**\r\n * Text for the type of message status bar.\r\n */\r\n public static final String MESSAGETYPE_STATUSBAR = \"Statusbar\";\r\n /**\r\n * Text for the type of message tooltip for properties.\r\n */\r\n public static final String MESSAGETYPE_TOO...
import java.awt.Cursor; import java.io.File; import java.io.IOException; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.tree.DefaultMutableTreeNode; import fr.nantes1900.constants.TextsKeys; import fr.nantes1900.control.BuildingsIsletController; import fr.nantes1900.control.Global...
package fr.nantes1900.control.isletselection; /** * Controller for the islet selection window. Manages child components such as * the action panel, the tree and the 3D view. * @author Camille Bouquet * @author Luc Jallerat */ public class IsletSelectionController { /** * The controller ...
STLWriter writer = new STLWriter(this.openedDirectory.getPath()
3
Bernardo-MG/repository-pattern-java
src/test/java/com/wandrell/pattern/test/integration/repository/access/mysql/hibernate/ITQueryMySqlHibernateJpaRepository.java
[ "public class PersistenceContextPaths {\n\n /**\n * Eclipselink JPA persistence.\n */\n public static final String ECLIPSELINK = \"classpath:context/persistence/jpa-eclipselink.xml\";\n\n /**\n * Hibernate JPA persistence.\n */\n public static final String HIBERNATE = \"classpath:context...
import com.wandrell.pattern.test.util.config.properties.DatabaseScriptsPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.HibernateDialectPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.JdbcPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.JpaPropert...
/** * The MIT License (MIT) * <p> * Copyright (c) 2015 the original author or authors. * <p> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limi...
public final class ITQueryMySqlHibernateJpaRepository extends AbstractITQuery {
7
Gogolook-Inc/GogoMonkeyRun
UICompareRunner/com/james/uicomparerunner/ui/RecorderEditFrame.java
[ "public class R {\n\tpublic static class string {\n\t\tpublic static final String app_name = \"Gogo Monkey Run\";\n\n\t\tpublic static final String menu_file = Locale.getDefault().equals(Locale.TAIWAN) ? \"檔案\" : \"File\";\n\t\tpublic static final String menu_device = Locale.getDefault().equals(Locale.TAIWAN) ? \"裝...
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Event; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowEvent; import jav...
package com.james.uicomparerunner.ui; public class RecorderEditFrame extends JFrame implements ActionListener { private int monitorWidth; private int monitorHeight; private JMenu[] jMenu = {
new JMenu(R.string.menu_file)
0
gfk-ba/senbot
SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/selenium/SeleniumNavigationSteps.java
[ "public abstract class BaseServiceHub {\n\t\n\tpublic BaseServiceHub() {\n\t\t\n\t}\n\t\n\t/**\n\t * \n\t * @return the {@link SenBotContext} singleton\n\t */\n\tpublic SenBotContext getSenBotContext() {\n\t\treturn SenBotContext.getSenBotContext();\n\t}\n\n\t/**\n\t *\n\t * @return the {@link WebDriver} for the cu...
import static org.junit.Assert.assertEquals; import java.io.IOException; import javax.annotation.Resource; import org.openqa.selenium.By; import com.gfk.senbot.framework.BaseServiceHub; import com.gfk.senbot.framework.context.SenBotContext; import com.gfk.senbot.framework.cucumber.stepdefinitions.BaseStepDefinition; im...
package com.gfk.senbot.framework.cucumber.stepdefinitions.selenium; /** * All selenium Cucumber step definitions controlling selenium navigation * * @author joostschouten */ @StepDefAnnotation public class SeleniumNavigationSteps extends BaseServiceHub { @Resource
protected ElementService seleniumElementService;
3
UweTrottmann/tmdb-java
src/test/java/com/uwetrottmann/tmdb2/services/GuestSessionTest.java
[ "public static final Movie testMovie = new Movie();", "public static final TvEpisode testTvEpisode = new TvEpisode();", "public static final TvSeason testTvSeason = new TvSeason();", "public static final TvShow testTvShow = new TvShow();", "public abstract class BaseTestCase {\n\n private static final bo...
import static com.uwetrottmann.tmdb2.TestData.testMovie; import static com.uwetrottmann.tmdb2.TestData.testTvEpisode; import static com.uwetrottmann.tmdb2.TestData.testTvSeason; import static com.uwetrottmann.tmdb2.TestData.testTvShow; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.As...
package com.uwetrottmann.tmdb2.services; public class GuestSessionTest extends BaseTestCase { public static Boolean guestDataInitialized; // TODO ut: split up and only run for tests that require it @BeforeClass public static void initializeGuestData() throws IOException {
Tmdb tmdb = getAuthenticatedInstance();
5
graywolf336/Jail
src/main/java/com/graywolf336/jail/command/subcommands/JailPayCommand.java
[ "public class JailManager {\n private JailMain plugin;\n private HashMap<String, Jail> jails;\n private HashMap<String, CreationPlayer> jailCreators;\n private HashMap<String, CreationPlayer> cellCreators;\n private HashMap<String, ConfirmPlayer> confirms;\n private HashMap<UUID, CachePrisoner> ca...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.util.StringUtil; import com.graywolf336.jail.JailManager; import com.graywolf336...
package com.graywolf336.jail.command.subcommands; @CommandInfo( maxArgs = 2, minimumArgs = 0, needsPlayer = true, pattern = "pay", permission = "jail.usercmd.jailpay", usage = "/jail pay (amount) (name)" ) public class JailPayCommand implements Command {
public boolean execute(JailManager jm, CommandSender sender, String... args) throws Exception {
0
octavian-h/time-series-math
src/test/java/ro/hasna/ts/math/ml/distance/PlaaEuclideanDistanceTest.java
[ "public class DistanceTester {\n private GenericDistanceMeasure<double[]> distance;\n private int vectorLength = 128;\n private double offset;\n private double cutOffValue;\n private double expectedResult;\n\n /**\n * Private constructor.\n */\n public DistanceTester() {\n }\n\n p...
import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import ro.hasna.ts.math.ml.distance.util.DistanceTester; import ro.hasna.ts.math.normalization.ZNormalizer; import ro.hasna.ts.math.representation.PiecewiseLinearAggregateApproximation; import ro.hasna.ts.math.type.MeanSlop...
/* * Copyright 2015 Octavian Hasna * * 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...
private PiecewiseLinearAggregateApproximation plaa;
2
Simperium/simperium-android
Simperium/src/main/java/com/simperium/android/PersistentStore.java
[ "public class Bucket<T extends Syncable> {\n \n public interface Channel {\n Change queueLocalChange(String simperiumKey);\n Change queueLocalDeletion(Syncable object);\n void log(int level, CharSequence message);\n void start();\n void stop();\n void reset();\n ...
import android.content.ContentValues; import android.database.Cursor; import android.database.CursorWrapper; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import android.util.Log; import com.simperium.BuildConfig; import com.simperium.client.Bucket; import...
package com.simperium.android; public class PersistentStore implements StorageProvider { public static final String TAG="Simperium.Store"; public static final String OBJECTS_TABLE="objects"; public static final String INDEXES_TABLE="indexes"; public static final String REINDEX_QUEUE_TABLE="reindex_...
public <T extends Syncable> BucketStore<T> createStore(String bucketName, BucketSchema<T> schema) {
2
MontysCoconut/moco
src/main/java/de/uni/bremen/monty/moco/codegeneration/context/CodeContext.java
[ "public class FunctionSignature<T extends LLVMType> extends LLVMIdentifier<T> {\n\n\tprivate List<LLVMIdentifier<? extends LLVMType>> parameter;\n\n\tFunctionSignature(T type, String name, List<LLVMIdentifier<? extends LLVMType>> parameter) {\n\t\tsuper(type, name, false);\n\t\tthis.parameter = parameter;\n\t}\n\n\...
import de.uni.bremen.monty.moco.codegeneration.identifier.FunctionSignature; import de.uni.bremen.monty.moco.codegeneration.identifier.LLVMIdentifier; import de.uni.bremen.monty.moco.codegeneration.types.LLVMPointer; import de.uni.bremen.monty.moco.codegeneration.types.LLVMStructType; import de.uni.bremen.monty.moco.co...
/* * moco, the Monty Compiler * Copyright (c) 2013-2014, Monty's Coconut, All rights reserved. * * This file is part of moco, the Monty Compiler. * * moco 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...
LLVMIdentifier<? extends LLVMType> pointer, LLVMIdentifier<? extends LLVMType>... offsets) {
5
idega/com.idega.block.staff
src/java/com/idega/block/staff/business/StaffFinder.java
[ "public interface StaffEntity extends com.idega.data.IDOLegacyEntity\n{\n public void delete()throws java.sql.SQLException;\n public java.sql.Date getBeganWork();\n public java.lang.String getIDColumnName();\n public int getImageID();\n public void setBeganWork(java.sql.Date p0);\n public void setDefaultValues();\n...
import java.sql.SQLException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Vector; import com.idega.block.staff.data.StaffEntity; import com.idega.block.staff.data.StaffInfo; import com.idega.block.staff.data.StaffLocalized; import com.idega.block.staff.data.StaffMeta; ...
package com.idega.block.staff.business; /** * Title: User * Copyright: Copyright (c) 2000 idega.is All Rights Reserved * Company: idega margmiðlun * @author * @version 1.0 */ public class StaffFinder { public static User getUser(int userID) { try { return ((com.ideg...
public static StaffMetaData[] getMetaData(int userId) {
4
Kixeye/kixmpp
kixmpp-server/src/main/java/com/kixeye/kixmpp/server/module/roster/RosterKixmppServerModule.java
[ "public class KixmppJid {\n\tprivate final String node;\n\tprivate final String domain;\n\tprivate final String resource;\n\t\n\t/**\n\t * @param domain\n\t */\n\tpublic KixmppJid(String domain) {\n\t\tthis(null, domain, null);\n\t}\n\t\n\t/**\n\t * @param node\n\t * @param domain\n\t */\n\tpublic KixmppJid(String ...
import org.jdom2.Element; import org.jdom2.Namespace; import com.kixeye.kixmpp.KixmppJid; import com.kixeye.kixmpp.handler.KixmppStanzaHandler; import com.kixeye.kixmpp.server.KixmppServer; import com.kixeye.kixmpp.server.module.KixmppServerModule; import com.kixeye.kixmpp.server.module.bind.BindKixmppServerModule; imp...
package com.kixeye.kixmpp.server.module.roster; /* * #%L * KIXMPP * %% * Copyright (C) 2014 KIXEYE, 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.apac...
Promise<List<RosterItem>> promise = rosterProvider.getRoster(channel.attr(BindKixmppServerModule.JID).get());
4
copygirl/copycore
src/net/mcft/copy/core/util/InventoryUtils.java
[ "public class ItemIdentifier {\n\t\n\tprivate final Item item;\n\tprivate final int damage;\n\tprivate final NBTTagCompound data;\n\t\n\tprivate int hashCode;\n\tprivate boolean calculatedHashCode = false;\n\t\n\t// Since, in my opinion, null data and an empty compound are\n\t// equivalent, ItemIdentifiers should n...
import net.mcft.copy.core.api.ItemIdentifier; import net.mcft.copy.core.inventory.IInventoryEnumerable; import net.mcft.copy.core.inventory.IInventoryEnumerable.Element; import net.mcft.copy.core.inventory.InventoryWrapper; import net.mcft.copy.core.inventory.util.InventorySpaceEnumerator; import net.mcft.copy.core.mis...
package net.mcft.copy.core.util; public final class InventoryUtils { private InventoryUtils() { } /** Returns an enumerable version of the inventory. */ public static IInventoryEnumerable asIterable(IInventory inventory) { return ((inventory instanceof IInventoryEnumerable) ? (IInventoryEnumerable)inven...
: new InventoryWrapper(inventory));
3
minnal/autopojo
src/test/java/org/minnal/autopojo/resolver/CollectionResolverTest.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 java.util.Collection; import java.util.List; import java.util.Queue; import java.util.Set; import org.minnal.autopojo.AttributeMetaData; import org.minnal.autopojo.CollectionModel; impo...
/** * */ package org.minnal.autopojo.resolver; /** * @author ganeshs * */ public class CollectionResolverTest { private CollectionResolver resolver; private Configuration configuration; @BeforeMethod public void setup() { configuration = new Configuration(); resolver = new CollectionResolver();...
generateAndCheckCollection("genericObjectList", List.class, SimpleObject.class);
4
Mitchellbrine/DiseaseCraft-2.0
src/main/java/mc/Mitchellbrine/diseaseCraft/disease/effects/GenericEffects.java
[ "@SuppressWarnings(\"unchecked\")\n@Mod(modid = References.MODID, name = References.NAME, version = References.VERSION)\npublic class DiseaseCraft {\n\n\t@SidedProxy(clientSide = \"mc.Mitchellbrine.diseaseCraft.proxy.ClientProxy\", serverSide = \"mc.Mitchellbrine.diseaseCraft.proxy.CommonProxy\")\n\tpublic static C...
import mc.Mitchellbrine.diseaseCraft.DiseaseCraft; import mc.Mitchellbrine.diseaseCraft.api.Disease; import mc.Mitchellbrine.diseaseCraft.api.DiseaseEvent; import mc.Mitchellbrine.diseaseCraft.disease.DiseaseHelper; import mc.Mitchellbrine.diseaseCraft.disease.Diseases; import mc.Mitchellbrine.diseaseCraft.utils.Refere...
package mc.Mitchellbrine.diseaseCraft.disease.effects; /** * Created by Mitchellbrine on 2015. */ public class GenericEffects { public static Random rand = new Random(); public static DamageSource illness = new DamageSource("sickness").setDamageBypassesArmor().setDifficultyScaled(); private static GenericEff...
if (Diseases.acceptableModes.contains(effect)) {
4
kstateome/lti-attendance
src/test/java/edu/ksu/canvas/attendance/config/arquillian/ArquillianSpringMVCConfig.java
[ "@Repository\npublic interface AttendanceAssignmentRepository extends CrudRepository<AttendanceAssignment, Long> {\n\n AttendanceAssignment findByAssignmentId(Long assignmentId);\n\n AttendanceAssignment findByAttendanceSection(AttendanceSection section);\n\n}", "@Repository\npublic interface ConfigReposito...
import com.google.common.collect.ImmutableList; import edu.ksu.canvas.CanvasApiFactory; import edu.ksu.canvas.attendance.repository.AttendanceAssignmentRepository; import edu.ksu.canvas.attendance.repository.ConfigRepository; import edu.ksu.canvas.attendance.services.CanvasApiWrapperService; import edu.ksu.canvas.atten...
package edu.ksu.canvas.attendance.config.arquillian; @Configuration @EnableWebMvc @Profile("Arquillian") @ComponentScan( basePackages = { "edu.ksu.canvas.attendance.config.arquillian", "edu.ksu.canvas.attendance.controller", "edu.ksu.canvas.attendance.form", ...
@ComponentScan.Filter(value = SynchronizationService.class, type = FilterType.ASSIGNABLE_TYPE),
3
Baseform/Baseform-Epanet-Java-Library
src/org/addition/epanet/network/io/input/InputParser.java
[ "public class Constants {\n\n\n public static double PI = 3.141592654;\n\n /**\n * Max. # of disconnected nodes listed\n */\n public static int MAXCOUNT = 10;\n /**\n * Max. # title lines\n */\n public static int MAXTITLE = 3;\n /**\n * Max. input er...
import java.io.File; import java.util.ArrayList; import java.util.List; import org.addition.epanet.Constants; import org.addition.epanet.util.ENException; import org.addition.epanet.network.FieldsMap; import org.addition.epanet.network.FieldsMap.*; import org.addition.epanet.network.Network; import org.addition.epanet....
/* * Copyright (C) 2012 Addition, Lda. (addition at addition dot pt) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later ver...
public abstract Network parse(Network net, File f) throws ENException;
1
offa/NBCndUnit
src/test/java/bv/offa/netbeans/cnd/unittest/cpputest/CppUTestTestHandlerTest.java
[ "public final class TestSupportUtils\n{\n private static final RequestProcessor POOL = new RequestProcessor(\"NBCndUnit Utility Processor\", 1);\n private static final Logger LOGGER = Logger.getLogger(TestSupportUtils.class.getName());\n\n private TestSupportUtils()\n {\n /* Empty */\n }\n\n\n...
import bv.offa.netbeans.cnd.unittest.TestSupportUtils; import bv.offa.netbeans.cnd.unittest.api.CndTestSuite; import bv.offa.netbeans.cnd.unittest.api.ManagerAdapter; import bv.offa.netbeans.cnd.unittest.api.TestFramework; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit...
/* * NBCndUnit - C/C++ unit tests for NetBeans. * Copyright (C) 2015-2021 offa * * This file is part of NBCndUnit. * * NBCndUnit 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...
assertThat(m.group(1)).isNotNull();
8
epsilony/codec-modbus
src/main/java/net/epsilony/utils/codec/modbus/handler/ModbusSlaveRequestDecoder.java
[ "public enum ModbusRegisterType {\nCOIL, DISCRETE_INPUT, HOLDING, INPUT\n}", "public class UnsupportedFunctionCodeException extends DecoderException {\n\n public UnsupportedFunctionCodeException() {\n super();\n }\n\n public UnsupportedFunctionCodeException(String message, Throwable cause) {\n ...
import net.epsilony.utils.codec.modbus.ModbusRegisterType; import net.epsilony.utils.codec.modbus.UnsupportedFunctionCodeException; import net.epsilony.utils.codec.modbus.Utils; import net.epsilony.utils.codec.modbus.func.ModbusFunction; import net.epsilony.utils.codec.modbus.func.ReadBooleanRegistersFunction; import n...
/* * * The MIT License (MIT) * * Copyright (C) 2013 Man YUAN <epsilon@epsilony.net> * * 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 limitati...
function = new ReadBooleanRegistersFunction(ModbusRegisterType.COIL);
4
awslabs/amazon-sqs-java-messaging-lib
src/test/java/com/amazon/sqs/javamessaging/SQSMessageConsumerPrefetchTest.java
[ "public static class MessageManager {\n\n private final PrefetchManager prefetchManager;\n\n private final javax.jms.Message message;\n\n public MessageManager(PrefetchManager prefetchManager, javax.jms.Message message) {\n this.prefetchManager = prefetchManager;\n this.message = message;\n ...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyInt; import static org.mockito...
/* * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "lice...
SQSMessage sqsMessage = (SQSMessage)messageManager.getMessage();
4
cloudendpoints/endpoints-management-java
endpoints-framework-auth/src/test/java/com/google/api/server/spi/auth/EspAuthenticatorTest.java
[ "public class Authenticator {\n\n private static final FluentLogger logger = FluentLogger.forEnclosingClass();\n\n private static final String ACCESS_TOKEN_PARAM_NAME = \"access_token\";\n private static final String BEARER_TOKEN_PREFIX = \"Bearer \";\n private static final String EMAIL_CLAIM_NAME = \"email\";\...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.never; import static org.mockito.Moc...
/* * Copyright 2016 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
private static final Info INFO = new Info("selector", AUTH_INFO, QuotaInfo.DEFAULT);
6
JoostvDoorn/GlutenVrijApp
app/src/main/java/com/joostvdoorn/glutenvrij/scanner/DecodeHandler.java
[ "public final class BinaryBitmap {\n\n private final Binarizer binarizer;\n private BitMatrix matrix;\n\n public BinaryBitmap(Binarizer binarizer) {\n if (binarizer == null) {\n throw new IllegalArgumentException(\"Binarizer must be non-null.\");\n }\n this.binarizer = binarizer;\n matrix = null...
import java.util.Hashtable; import com.joostvdoorn.glutenvrij.R; import com.joostvdoorn.glutenvrij.scanner.core.BinaryBitmap; import com.joostvdoorn.glutenvrij.scanner.core.DecodeHintType; import com.joostvdoorn.glutenvrij.scanner.core.MultiFormatReader; import com.joostvdoorn.glutenvrij.scanner.core.ReaderException; i...
/* * Copyright (C) 2010 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
} catch (ReaderException re) {
3
bitnine-oss/octopus
octopus-core/src/main/java/kr/co/bitnine/octopus/schema/SchemaManager.java
[ "public interface MetaContext {\n /*\n * User\n */\n\n boolean userExists(String name) throws MetaException;\n\n MetaUser getUser(String name) throws MetaException;\n\n MetaUser createUser(String name, String password) throws MetaException;\n\n void alterUser(String name, String newPassword) ...
import kr.co.bitnine.octopus.meta.MetaContext; import kr.co.bitnine.octopus.meta.MetaException; import kr.co.bitnine.octopus.meta.MetaStore; import kr.co.bitnine.octopus.meta.model.MetaDataSource; import kr.co.bitnine.octopus.postgres.utils.PostgresErrorData; import kr.co.bitnine.octopus.postgres.utils.PostgresExceptio...
/* * 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 * distribut...
for (MetaDataSource dataSource : mc.getDataSources())
1
abstractj/kalium
src/main/java/org/abstractj/kalium/crypto/Box.java
[ "public class NaCl {\n\n public static Sodium sodium() {\n Sodium sodium = SingletonHolder.SODIUM_INSTANCE;\n checkVersion(sodium);\n return sodium;\n }\n\n private static final String LIBRARY_NAME = libraryName();\n\n private static String libraryName() {\n switch (Platform....
import static org.abstractj.kalium.crypto.Util.removeZeros; import org.abstractj.kalium.NaCl; import org.abstractj.kalium.encoders.Encoder; import org.abstractj.kalium.keys.PrivateKey; import org.abstractj.kalium.keys.PublicKey; import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_BOXZER...
/** * Copyright 2013 Bruno Oliveira, and individual contributors * * 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...
isValid(sodium().crypto_box_curve25519xsalsa20poly1305_beforenm(
4
crazycodeboy/TakePhoto
takephoto_library/src/main/java/org/devio/takephoto/uitl/TUtils.java
[ "public class CropOptions implements Serializable {\n /**\n * 使用TakePhoto自带的裁切工具进行裁切\n */\n private boolean withOwnCrop;\n private int aspectX;\n private int aspectY;\n private int outputX;\n private int outputY;\n\n private CropOptions() {\n }\n\n public int getAspectX() {\n ...
import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.support.v4.content.FileProvider; import android.text.TextUtils; import android.util.Log...
package org.devio.takephoto.uitl; /** * 工具类 * Author: JPH * Date: 2016/7/26 10:04 */ public class TUtils { private static final String TAG = IntentUtils.class.getName(); /** * 将Image集合转换成Uri集合 * * @param images * @return */ public static ArrayList<Uri> convertImageToUri(Co...
public static void startActivityForResult(TContextWrap contextWrap, TIntentWap intentWap) {
5
andrehertwig/spring-boot-starter-quartz
src/test/java/de/chandre/quartz/context/TestContextConfiguration11.java
[ "@Scope(scopeName=ConfigurableBeanFactory.SCOPE_PROTOTYPE)\r\npublic class CallbackQueuedJob implements Job, QueuedInstance\r\n{\r\n\tprivate final Log LOGGER = LogFactory.getLog(CallbackQueuedJob.class);\r\n\t\r\n\tpublic static String GROUP = \"myGroup\";\r\n\t\r\n\t@Autowired\r\n\tprivate QueueService<Future<Job...
import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.concurrent.Future; import org.quartz.CronTrigger; import org.quartz.JobDetail; import org.quartz.SimpleTrigger; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bea...
package de.chandre.quartz.context; @Configuration public class TestContextConfiguration11 { public static final String SIMPLE_JOB_NAME = "SimpleJobName"; public static final String SIMPLE_JOB_GROUP = "SimpleJobGroup"; public static final String CRON_JOB_NAME = "CronJobName"; public static final Str...
return QuartzUtils.createJobDetail(SimpleJob.class, SIMPLE_JOB_NAME, SIMPLE_JOB_GROUP, "Just a Simple Job", null);
2
bluejoe2008/elfinder-2.x-servlet
src/main/java/org/grapheco/elfinder/servlet/ConnectorServlet.java
[ "@Controller\n@RequestMapping(\"connector\")\npublic class ConnectorController {\n Logger _logger = Logger.getLogger(this.getClass());\n @Resource(name = \"commandExecutorFactory\")\n private CommandExecutorFactory _commandExecutorFactory;\n\n @Resource(name = \"fsServiceFactory\")\n private FsServic...
import java.io.File; import java.io.IOException; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.grapheco.elfinder.controller.ConnectorController; imp...
package org.grapheco.elfinder.servlet; /** * ConnectorServlet is an example servlet * it creates a ConnectorController on init() and use it to handle requests on doGet()/doPost() * * users should extend from this servlet and customize required protected methods * * @author bluejoe * */ public class Connec...
fsService.setSecurityChecker(new FsSecurityCheckForAll());
6
alistairdickie/BlueFlyVario_Android
src/com/bfv/view/component/VarioTraceViewComponent.java
[ "public class BufferData {\r\n private int position;\r\n private double[] data;\r\n\r\n\r\n public BufferData(int dataSize) {\r\n this.position = 0;\r\n this.data = new double[dataSize];\r\n }\r\n\r\n public int getPosition() {\r\n return position;\r\n }\r\n\r\n public void...
import java.text.DecimalFormatSymbols; import java.util.ArrayList; import java.util.Locale; import android.graphics.*; import com.bfv.model.BufferData; import com.bfv.DataBuffer; import com.bfv.model.KalmanFilteredVario; import com.bfv.model.Vario; import com.bfv.util.ArrayUtil; import com.bfv.view.VarioSurfac...
/* BlueFlyVario flight instrument - http://www.alistairdickie.com/blueflyvario/ Copyright (C) 2011-2012 Alistair Dickie BlueFlyVario 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 ...
private BufferData varBufferData;
0
jasonbaldridge/maul
src/main/java/edu/berkeley/nlp/lm/phrasetable/MosesPhraseTable.java
[ "public class StringWordIndexer implements WordIndexer<String>\n{\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate final Indexer<String> sparseIndexer;\n\n\tprivate String startSymbol;\n\n\tprivate String endSymbol;\n\n\tprivate String unkSymbol;\n\n\tprivate int unkIndex = -1...
import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import edu.berkeley.nlp.lm.StringWordIndexer; import edu.berkeley.nlp.lm.WordIndexer; import edu.berkeley.nlp.lm.map.HashNgramMap; import edu.berkeley.nlp.lm.phrasetable.PhraseTableValu...
package edu.berkeley.nlp.lm.phrasetable; /** * * Experimental class for reading Moses phrase tables and storing them * efficiently in memory using a trie. * * @author adampauls * */ public class MosesPhraseTable implements Serializable { /** * */ private static final long serialVersionUID = 1L; p...
private final WordIndexer<String> wordIndexer;
1
cuberact/cuberact-json
src/main/java/org/cuberact/json/parser/JsonScanner.java
[ "public class JsonException extends RuntimeException {\r\n\r\n private static final long serialVersionUID = 1L;\r\n\r\n public JsonException(String message) {\r\n super(message);\r\n }\r\n\r\n public JsonException(Throwable t) {\r\n super(t);\r\n }\r\n\r\n public JsonException(String...
import org.cuberact.json.JsonException; import org.cuberact.json.JsonNumber; import org.cuberact.json.input.JsonInput; import static org.cuberact.json.input.JsonInput.END_OF_INPUT; import static org.cuberact.json.optimize.CharTable.hexBitShift; import static org.cuberact.json.optimize.CharTable.toInt;
} String consumeString() { StringBuilder token = null; int count = 0; for (; ; ) { nextChar(); if (lastReadChar == '"') { nextImportantChar(); if (token == null) return new String(buffer, 0, count); token....
unicodeChar += (toInt(lastReadChar) << hexBitShift(h));
3
GoogleCloudPlatform/weasis-chcapi-extension
src/test/java/org/weasis/dicom/google/api/GoogleAPIClientTest.java
[ "public class Dataset {\n\n private Location parent;\n\n private final String name;\n\n public Dataset(Location parent, String name) {\n this.parent = parent;\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n\n public Location getParent() {\n ...
import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpTransport; import com.google.api.client.http.LowLevelHttpRequest; import com.google.api.client.http.LowLevelHttpResponse; import com.google.api.client.json.Json; import com.google.api.client.testing.http.HttpTesting; import com.google....
client.executeGetRequest(url); // Then Mockito.verify(client, Mockito.times(1)).signIn(); Mockito.verify(client, Mockito.times(1)).refresh(); Mockito.verify(client, Mockito.times(1)).executeGetRequest(Mockito.eq(url)); Mockito.verify(client, Mockito.times(1)).executeGetRequest(Mockito....
Location location = new Location(projectDescriptor, "projects/1/locations/1", "1");
2
ceefour/webdav-servlet
src/main/java/net/sf/webdav/methods/AbstractMethod.java
[ "public interface ITransaction {\n\n Principal getPrincipal();\n\n}", "public class StoredObject {\n\n private boolean isFolder;\n private Date lastModified;\n private Date creationDate;\n private long contentLength;\n private String mimeType;\n\n private boolean isNullRessource;\n\n /**\...
import java.io.IOException; import java.io.Writer; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Enumeration; import java.util.HashMap; import java.util.Hashtable; import java.util.Locale; import java.util.TimeZone; import javax.servlet.ServletException; import ...
/** * reads the depth header from the request and returns it as a int * * @param req * @return the depth from the depth header */ protected int getDepth(HttpServletRequest req) { int depth = INFINITY; String depthStr = req.getHeader("Depth"); if (depthStr != nu...
IResourceLocks resourceLocks, String path) throws IOException,
6
crazyhitty/Munch
app/src/main/java/com/crazyhitty/chdev/ks/munch/ui/adapters/SourcesRecyclerViewAdapter.java
[ "public class Categories {\n private Context mContext;\n\n public Categories(Context context) {\n this.mContext = context;\n }\n\n public List<CategoryItem> getCategoryItems() {\n List<CategoryItem> categoryItems = new ArrayList<>();\n\n String[] categoryNames = mContext.getResource...
import android.content.Context; import android.support.v4.content.ContextCompat; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.T...
package com.crazyhitty.chdev.ks.munch.ui.adapters; /** * Created by Kartik_ch on 12/10/2015. */ public class SourcesRecyclerViewAdapter extends RecyclerView.Adapter<SourcesRecyclerViewAdapter.SourcesViewHolder> { private Context mContext; private List<SourceItem> mSourceItems; private SourcesPresenter...
holder.mTxtSourceUrl.setText(UrlUtil.getWebsiteName(mSourceItems.get(position).getSourceUrl()));
6
zhengjunbase/codehelper.generator
src/main/java/com/ccnode/codegenerator/genCode/GenSqlService.java
[ "public enum FileType {\n SQL(0,\".sql\"),\n MAPPER(1,\".xml\"),\n SERVICE(2,\".java\"),\n DAO(3,\".java\"),\n NONE(-1,\"none\");\n\n private Integer code;\n private String suffix;\n\n private FileType(Integer code,String suffix){\n this.code = code;\n this.suffix = suffix;\n ...
import com.ccnode.codegenerator.enums.FileType; import com.ccnode.codegenerator.enums.SupportFieldClass; import com.ccnode.codegenerator.pojo.GenCodeResponse; import com.ccnode.codegenerator.pojo.GeneratedFile; import com.ccnode.codegenerator.pojo.OnePojoInfo; import com.ccnode.codegenerator.pojo.PojoFieldInfo; import ...
package com.ccnode.codegenerator.genCode; /** * What always stop you is what you always believe. * <p> * Created by zhengjun.du on 2016/05/17 20:12 */ public class GenSqlService { private final static Logger LOGGER = LoggerWrapper.getLogger(GenSqlService.class); public static void genSQL(GenCodeRespon...
for (PojoFieldInfo field : onePojoInfo.getPojoFieldInfos()) {
5
nullpointerexceptionapps/TeamCityDownloader
java/com/raidzero/teamcitydownloader/activities/BuildInfoActivity.java
[ "public class TeamCityBuild implements Parcelable {\n private static final String tag = \"TeamCityBuild\";\n\n private String number;\n private String status;\n private String url;\n private String webUrl;\n private String branch;\n\n public TeamCityBuild(String number, String status, String ur...
import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import com.raidzero.teamcitydownloader.R; import com.raidzero.teamcitydownloader.data.TeamCityBuild; import com.r...
package com.raidzero.teamcitydownloader.activities; /** * Created by raidzero on 8/14/14. */ public class BuildInfoActivity extends TeamCityActivity { private static final String tag = "BuildInfoActivity"; private TeamCityBuild build; private QueryUtility queryUtility; private TextView txt_trig...
TeamCityXmlParser parser = new TeamCityXmlParser(xml);
5
Anchormen/sql4es
src/main/java/nl/anchormen/sql4es/parse/sql/HavingParser.java
[ "public interface QueryState {\n\n\t/**\n\t * Provides the original query provided to the driver\n\t * @return\n\t */\n\tpublic String originalSql();\n\n\t/**\n\t * Returns the heading build for the query\n\t * @return\n\t */\n\tpublic Heading getHeading();\n\t\n\t/**\n\t * Adds exception to this state signaling so...
import com.facebook.presto.sql.tree.AstVisitor; import com.facebook.presto.sql.tree.BooleanLiteral; import com.facebook.presto.sql.tree.ComparisonExpression; import com.facebook.presto.sql.tree.DereferenceExpression; import com.facebook.presto.sql.tree.DoubleLiteral; import com.facebook.presto.sql.tree.Expression; impo...
package nl.anchormen.sql4es.parse.sql; /** * A Presto {@link AstVisitor} implementation that parses GROUP BY clauses * * @author cversloot * */ public class HavingParser extends AstVisitor<IComparison, QueryState>{ @Override protected IComparison visitExpression(Expression node, QueryState state) { if( ...
Column column = new SelectParser().visitExpression(compareExp.getLeft(), state);
1
jGleitz/JUnit-KIT
src/final2/subtests/CreateTest.java
[ "public class Input {\n\tprivate static HashMap<String, String[]> filesMap = new HashMap<>();\n\tprivate static HashMap<String[], String> reverseFileMap = new HashMap<>();\n\n\t/**\n\t * This class is not meant to be instantiated.\n\t */\n\tprivate Input() {\n\t}\n\n\t/**\n\t * Returns a path to a file containing t...
import static org.hamcrest.CoreMatchers.is; import org.junit.Test; import test.Input; import test.SystemExitStatus; import test.runs.ExactRun; import test.runs.NoOutputRun; import test.runs.Run;
package final2.subtests; /** * Tests command 'create'. * * @author Annika Berger * @author Roman Langrehr * */ public class CreateTest extends LangtonSubtest { public CreateTest() { setAllowedSystemExitStatus(SystemExitStatus.WITH_0); } /** * Asserts that northwards looking ants are inserted correct...
runs = new Run[] {
4
CMPUT301F14T14/android-question-answer-app
QuestionAppTests/src/ca/ualberta/cs/cmput301f14t14/questionapp/test/data/RemoteDataStoreTest.java
[ "public class MainActivity extends Activity {\n\n\tprivate DataManager dataManager;\n\tprivate QuestionListAdapter qla = null;\n\tprivate List<Question> qList = null;\n\t\n\tprivate ClientData cd = null;\n\tprivate Callback<List<Question>> listCallback = null;\n\tprivate Callback<Question> favouriteQuestionCallback...
import java.io.IOException; import java.util.List; import android.test.ActivityInstrumentationTestCase2; import ca.ualberta.cs.cmput301f14t14.questionapp.MainActivity; import ca.ualberta.cs.cmput301f14t14.questionapp.data.DataManager; import ca.ualberta.cs.cmput301f14t14.questionapp.data.LocalDataStore; import ca.ualbe...
package ca.ualberta.cs.cmput301f14t14.questionapp.test.data; public class RemoteDataStoreTest extends ActivityInstrumentationTestCase2<MainActivity> { private LocalDataStore localStore; private RemoteDataStore remoteStore; public RemoteDataStoreTest() { super(MainActivity.class); } protected void setUp()...
Comment<Answer> c = MockData.acomments.get(0);
5
AlexanderMisel/gnubridge
src/main/java/org/gnubridge/core/bidding/rules/Open1Color.java
[ "public class Hand {\n\tList<Card> cards;\n\n\t/**\n\t * Caching optimization for pruning played cards\n\t * and perhaps others\n\t */\n\tList<Card> orderedCards;\n\tSuit color;\n\tList<Card> colorInOrder;\n\n\tpublic Hand() {\n\t\tthis.cards = new ArrayList<Card>();\n\t}\n\n\tpublic Hand(Card... cards) {\n\t\tthis...
import org.gnubridge.core.Hand; import org.gnubridge.core.bidding.Auctioneer; import org.gnubridge.core.bidding.Bid; import org.gnubridge.core.bidding.PointCalculator; import org.gnubridge.core.deck.Clubs; import org.gnubridge.core.deck.Suit; import org.gnubridge.core.deck.Diamonds; import org.gnubridge.core.deck.Trump...
package org.gnubridge.core.bidding.rules; public class Open1Color extends BiddingRule { private PointCalculator pc;
public Open1Color(Auctioneer a, Hand h) {
1
nullpointerexceptionapps/TeamCityDownloader
java/com/raidzero/teamcitydownloader/activities/settings/SettingsServerActivity.java
[ "public class MainActivity extends ActionBarActivity implements NavigationDrawerFragment.NavigationDrawerCallbacks {\n\n private static final String tag = \"MainActivity\";\n\n public static AppHelper helper;\n\n private long lastBackPressTime = 0;\n\n private NavigationDrawerFragment mNavigationDrawerF...
import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.MenuItem; import com.raidzero.teamcitydownloader.R; import com.raidzero.teamcitydownloader.activities.MainActivity; import com.raidzero.teamcitydownloader.data...
package com.raidzero.teamcitydownloader.activities.settings; /** * Created by raidzero on 1/11/15. */ public class SettingsServerActivity extends ActionBarActivity implements QueryUtility.QueryCallbacks { private QueryUtility queryUtility; private boolean cameFromError; private ProgressDialog progDialo...
DialogUtility.showAlert(SettingsServerActivity.this, finalStatusCode, finalStatusReason);
3
rvt/cnctools
cnctools/src/main/java/com/rvantwisk/cnctools/controls/GCodeViewerControl.java
[ "public class BeadActor extends AbstractActor {\n public static final float colorDefaultDiffuse[] = {0.55f, 0.55f, 0.55f, 1.0f}; // default diffuse color\n public static final float colorDefaultSpecular[] = {0.7f, 0.7f, 0.7f, 1.0f}; // default ambient color\n public static final float colorDefaultLight[] =...
import com.rvantwisk.cnctools.controls.opengl.BeadActor; import com.rvantwisk.cnctools.controls.opengl.OpenGLRenderer; import com.rvantwisk.cnctools.opengl.AbstractActor; import com.rvantwisk.cnctools.opengl.Camera; import com.rvantwisk.cnctools.opengl.OpenGLImage; import com.rvantwisk.gcodeparser.exceptions.SimExcepti...
/* * Copyright (c) 2013, R. van Twisk * All rights reserved. * Licensed under the The BSD 3-Clause License; * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://opensource.org/licenses/BSD-3-Clause * * Redistribution and use in source and bina...
gCodeRender.addActor(new BeadActor());
0
ryankennedy/swagger-jaxrs-doclet
jaxrs-doclet/src/main/java/com/hypnoticocelot/jaxrs/doclet/parser/ApiClassParser.java
[ "public class DocletOptions {\n public static final String DEFAULT_SWAGGER_UI_ZIP_PATH = \"n/a\";\n private File outputDirectory;\n private String docBasePath = \"http://localhost:8080\";\n private String apiBasePath = \"http://localhost:8080\";\n private String swaggerUiZipPath = DEFAULT_SWAGGER_UI_...
import com.google.common.base.Function; import com.hypnoticocelot.jaxrs.doclet.DocletOptions; import com.hypnoticocelot.jaxrs.doclet.model.Api; import com.hypnoticocelot.jaxrs.doclet.model.Method; import com.hypnoticocelot.jaxrs.doclet.model.Model; import com.hypnoticocelot.jaxrs.doclet.model.Operation; import com.sun....
package com.hypnoticocelot.jaxrs.doclet.parser; public class ApiClassParser { private final DocletOptions options; private final ClassDoc classDoc; private final String rootPath; private final Set<Model> models; private final Collection<ClassDoc> classes; private final Method parentMethod; ...
Collection<Operation> operations = new ArrayList<Operation>(
4
jGleitz/JUnit-KIT
src/sheet6/c_bookDatabase/BookDatabaseTest.java
[ "public class BasicCommandsTest extends BookDatabaseSubTest {\n\n\t/**\n\t * Tests the {@code quit} command. Asserts that:\n\t * <ul>\n\t * <li>The program can be terminated using the {@code quit} command\n\t * <li>The program does not print anything to the console\n\t * <li>If the program calls {@code System.exit(...
import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; import sheet6.c_bookDatabase.subtests.BasicCommandsTest; import sheet6.c_bookDatabase.subtests.CommandLineArgumentsTest; import sheet6.c_bookDatabase.subtests.CompleteSearchScenarioTest; import sheet6.c_bookDat...
package sheet6.c_bookDatabase; /** * A test for the Interactive Console of the Book Database (Task C) <br> * This test consists of various subtests, all placed in the {@link sheet6.c_bookDatabase.subtests} package. See them * for documentation<br> * NOTE: This test is far from being complete and under heavy deve...
CompleteSearchScenarioTest.class,
2
osiefart/wicket-christmas
src/main/java/com/senacor/wicket/async/christmas/widgets/train/message/ZugmonitorMessageLoader.java
[ "public interface IMessageLoader<T> {\n\n @Async\n Future<List<T>> load();\n\n}", "@SuppressWarnings(\"serial\")\npublic class CitiesAndStations implements Serializable {\n public Map<String, Station> idToStationMap;\n public Map<String, City> idToCityMap;\n\n public CitiesAndStations(Map<String, Station> id...
import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Future; import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.type.TypeRefere...
package com.senacor.wicket.async.christmas.widgets.train.message; /** * @author Jochen Mader */ @Service("zugmonitorMessageLoader") @Scope("prototype") public class ZugmonitorMessageLoader implements IMessageLoader<String> { @Autowired private IStringSource source; public IStringSource getSource() { r...
WayPoint wayPoint = entry.getValue().getStations().get(entry.getValue().getStations().size() - 1);
5
ngageoint/disconnected-content-explorer-android
app/src/main/java/mil/nga/dice/ReportCollectionActivity.java
[ "public class FileUtils {\n private FileUtils() {} //private constructor to enforce Singleton pattern\n\n /** TAG for log messages. */\n static final String TAG = \"FileUtils\";\n private static final boolean DEBUG = false; // Set to true to enable logging\n\n public static final String MIME_TYPE_AUD...
import android.content.ClipData; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v...
getContent = Intent.createChooser(getContent, getString(R.string.action_add_content)); startActivityForResult(getContent, 0); return true; } else if (id == R.id.action_refresh) { onRefresh(); return true; } else if (id == R.id.a...
String path = FileUtils.getPath(this, uri);
0
RepreZen/KaiZen-OpenAPI-Editor
com.reprezen.swagedit.openapi3/src/com/reprezen/swagedit/openapi3/preferences/OpenApi3ValidationPreferences.java
[ "public static final String VALIDATION_PREFERENCE_PAGE = \"com.reprezen.swagedit.preferences.validation\";", "public enum Version {\n SWAGGER, OPENAPI;\n}", "public interface PreferenceProvider {\n\n public static final String ID = \"com.reprezen.swagedit.preferences\";\n\n /**\n * Returns a list o...
import static com.reprezen.swagedit.core.preferences.KaizenPreferencePage.VALIDATION_PREFERENCE_PAGE; import static com.reprezen.swagedit.openapi3.preferences.OpenApi3PreferenceConstants.ADVANCED_VALIDATION; import java.util.Set; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayou...
/******************************************************************************* * Copyright (c) 2016 ModelSolv, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
setPreferenceStore(Activator.getDefault().getPreferenceStore());
4
desht/ScrollingMenuSign
src/main/java/me/desht/scrollingmenusign/commands/DeleteMenuCommand.java
[ "public class SMSException extends DHUtilsException {\n\n private static final long serialVersionUID = 1L;\n\n public SMSException(String message) {\n super(message);\n }\n\n}", "public interface SMSHandler {\n /**\n * Creates a new menu\n *\n * @param name Unique name of the menu\...
import java.util.List; import me.desht.dhutils.MiscUtil; import me.desht.scrollingmenusign.SMSException; import me.desht.scrollingmenusign.SMSHandler; import me.desht.scrollingmenusign.SMSMenu; import me.desht.scrollingmenusign.ScrollingMenuSign; import me.desht.scrollingmenusign.views.SMSView; import org.bukkit.comman...
package me.desht.scrollingmenusign.commands; public class DeleteMenuCommand extends SMSAbstractCommand { public DeleteMenuCommand() { super("sms delete", 0, 1); setPermissionNode("scrollingmenusign.commands.delete"); setUsage("/sms delete <menu>"); } @Override public boolea...
SMSHandler handler = ((ScrollingMenuSign) plugin).getHandler();
1
rsgoncalves/ecco
src/main/java/uk/ac/manchester/cs/diff/test/SubconceptDiffAlternative.java
[ "public class ConceptChange {\n\tprivate OWLClass c;\n\tprivate Set<OWLAxiom> dirSpecWit, indirSpecWit, dirGenWit, indirGenWit, allWit;\n\tprivate Map<OWLAxiom,Set<OWLAxiom>> dirSpecWitsOfAx, dirGenWitsOfAx, indirSpecWitsOfAx, indirGenWitsOfAx;\n\n\t/**\n\t * Constructor\n\t * @param c\tConcept\n\t * @param specWit...
import java.io.File; import java.util.HashSet; import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import ja...
/******************************************************************************* * This file is part of ecco. * * ecco is distributed under the terms of the GNU Lesser General Public License (LGPL), Version 3.0. * * Copyright 2011-2014, The University of Manchester * * ecco is free software: you can redistr...
WitnessAxioms ls = new WitnessAxioms(lhs_spec.getDirectWitnesses(c), lhs_spec.getIndirectWitnesses(c));
4
hellojavaer/ddal
ddal-ddr/src/main/java/org/hellojavaer/ddal/ddr/datasource/manager/rw/DefaultReadWriteDataSourceManager.java
[ "public class WeightedDataSource {\n\n private DataSource dataSource;\n private Integer weight;\n private String name;\n private String desc;\n\n public WeightedDataSource() {\n }\n\n public WeightedDataSource(DataSource dataSource, Integer weight) {\n this(dataSource, weight,...
import org.hellojavaer.ddal.ddr.datasource.WeightedDataSource; import org.hellojavaer.ddal.ddr.datasource.exception.CrossDataSourceException; import org.hellojavaer.ddal.ddr.datasource.exception.DataSourceNotFoundException; import org.hellojavaer.ddal.ddr.datasource.jdbc.DataSourceWrapper; import org.hellojavaer.ddal.d...
/* * Copyright 2016-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 ap...
private MetaDataChecker metaDataChecker = null;
4
MummyDing/Leisure
app/src/main/java/com/mummyding/app/leisure/ui/reading/ReadingDetailsActivity.java
[ "public class ReadingApi {\n\n public static final int TAG_LEN = 3;\n public static String searchByTag = \"https://api.douban.com/v2/book/search?tag=\";\n public static String searchByText = \"https://api.douban.com/v2/book/search?q=\";\n public static String searchByID = \"https://api.douban.com/v2/boo...
import android.content.Intent; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.view.ViewPager; import...
/* * Copyright (C) 2015 MummyDing * * This file is part of Leisure( <https://github.com/MummyDing/Leisure> ) * * Leisure 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 Lice...
for(String title: ReadingApi.bookTab_Titles){
0
etsy/statsd-jvm-profiler
src/test/java/com/etsy/statsd/profiler/server/ProfilerServerTest.java
[ "public abstract class Profiler {\n public static final Class<?>[] CONSTRUCTOR_PARAM_TYPES = new Class<?>[]{Reporter.class, Arguments.class};\n\n private final Reporter<?> reporter;\n\n private long recordedStats = 0;\n public Profiler(Reporter reporter, Arguments arguments) {\n Preconditions.che...
import com.etsy.statsd.profiler.Profiler; import com.etsy.statsd.profiler.profilers.MockProfiler1; import com.etsy.statsd.profiler.profilers.MockProfiler2; import com.etsy.statsd.profiler.worker.ProfilerThreadFactory; import com.etsy.statsd.profiler.worker.ProfilerWorkerThread; import com.google.common.base.Joiner; imp...
package com.etsy.statsd.profiler.server; public class ProfilerServerTest { private Map<String, Profiler> activeProfilers; private int port; private AtomicReference<Boolean> isRunning; private List<String> errors; private CloseableHttpClient client; @Before public void setup() throws IOE...
(ScheduledThreadPoolExecutor) Executors.newScheduledThreadPool(2, new ProfilerThreadFactory()));
3
zdsiyan/watermelon
src/main/java/com/github/watermelon/module/weibo/web/TwiboController.java
[ "public class ResultVO<T> {\r\n\tprivate Integer status;\r\n\tprivate String message;\r\n\tprivate T result;\r\n\t\r\n\tpublic ResultVO(Integer status, String message, T result){\r\n\t\tthis.setStatus(status);\r\n\t\tthis.setMessage(message);\r\n\t\tthis.setResult(result);\r\n\t}\r\n\r\n\tpublic Integer getStatus()...
import java.util.List; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.bson.types.ObjectId; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.sp...
package com.github.watermelon.module.weibo.web; @Controller @RequestMapping("/twibo") public class TwiboController { /** * logger. */ private Logger logger=Logger.getLogger(getClass()); @Autowired
private TwiboService twiboService;
6
iconmaster5326/Source
src/com/iconmaster/source/link/Linker.java
[ "@LoadedPlatform\npublic class PlatformHPPL extends Platform {\n\t\n\tpublic PlatformHPPL() {\n\t\tthis.name = \"HPPL\";\n\t\t\n\t\t//load all the default library packages:\n\t\tSourcePackage lib = new LibraryCore();\n\t\tthis.registerLibrary(lib);\n\t\tHPPLCustomFunctions.loadCore(lib);\n\t\t\n\t\t//load code tran...
import com.iconmaster.source.link.platform.hppl.PlatformHPPL; import com.iconmaster.source.Source; import com.iconmaster.source.SourceOptions; import com.iconmaster.source.compile.SourceCompiler; import com.iconmaster.source.exception.SourceException; import com.iconmaster.source.exception.SourceImportException; import...
package com.iconmaster.source.link; /** * * @author iconmaster */ public class Linker { public static HashMap<String,Platform> platforms = new HashMap<>(); static { registerPlatform(new PlatformHPPL()); } public static void registerPlatform(Platform p) { platforms.put(p.name,p); } public LinkGraph ...
errs.add(new SourceImportException(imp.range, "Unresolved import "+imp.name, imp.name));
5
BennSandoval/Woodmin
app/src/main/java/app/bennsandoval/com/woodmin/fragments/CustomersFragment.java
[ "public class Woodmin extends Application {\n\n public final String LOG_TAG = Woodmin.class.getSimpleName();\n\n @Override\n public void onCreate() {\n super.onCreate();\n Fabric.with(this, new Crashlytics());\n\n Picasso.Builder picassoBuilder = new Picasso.Builder(getApplicationConte...
import android.app.SearchManager; import android.app.SearchableInfo; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.d...
} @Override public boolean onOptionsItemSelected(MenuItem item) { return super.onOptionsItemSelected(item); } @Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { Log.d(LOG_TAG, "onCreateLoader"); String sortOrder = WoodminContract.CustomerEntry.COLUMN...
startActivity(Intent.createChooser(emailIntent, "Woodmin"));
0
52Jolynn/MyTv
src/main/java/com/laudandjolynn/mytv/CrawlAction.java
[ "public class MyTvException extends RuntimeException {\r\n\tprivate static final long serialVersionUID = -2699920699817552410L;\r\n\r\n\tpublic MyTvException() {\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic MyTvException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}\r\n\r\n\tpublic MyTvException...
import java.util.Date; import java.util.List; import org.eclipse.jetty.util.ConcurrentHashSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.laudandjolynn.mytv.exception.MyTvException; import com.laudandjolynn.mytv.model.CrawlerTask; import com.laudandjolynn.mytv.model.ProgramTable; import...
/******************************************************************************* * Copyright 2015 htd0324@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:...
private TvService tvService = new TvServiceImpl();
5
idega/is.idega.idegaweb.egov.bpm
src/java/is/idega/idegaweb/egov/bpm/cases/presentation/beans/CasesBPMAssetsState.java
[ "public class IWBundleStarter implements IWBundleStartable {\n\t\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"is.idega.idegaweb.egov.bpm\";\n\n\tpublic void start(IWBundle starterBundle) {\n\t\t\n//\t\tEgovBPMViewManager viewManager = EgovBPMViewManager.getInstance(starterBundle.getApplication());\n//\t\t...
import is.idega.idegaweb.egov.bpm.IWBundleStarter; import is.idega.idegaweb.egov.bpm.cases.CasesBPMProcessView; import is.idega.idegaweb.egov.bpm.cases.CasesBPMProcessView.CasesBPMProcessViewBean; import is.idega.idegaweb.egov.bpm.cases.CasesBPMProcessView.CasesBPMTaskViewBean; import is.idega.idegaweb.egov.bpm.media.P...
.getName(); } return currentTaskInstanceName; } private CasesSearchResultsHolder getCasesSearchResultsHolder() { return ELUtil.getInstance().getBean(CasesSearchResultsHolder.SPRING_BEAN_IDENTIFIER); } public String getSpecialBackPage() { if (!specialBackPageDecoded) { specialBackPageDecoded = true;...
uriUtil.setParameter(MediaWritable.PRM_WRITABLE_CLASS, IWMainApplication.getEncryptedClassName(ProcessUsersExporter.class));
4
moagrius/TileView
demo/src/main/java/com/moagrius/TileViewDemoAdvanced.java
[ "public class TileView extends ScalingScrollView implements\n Handler.Callback,\n ScalingScrollView.ScaleChangedListener,\n Tile.DrawingView,\n Tile.Listener,\n TilingBitmapView.Provider {\n\n // constants\n private static final int RENDER_THROTTLE_ID = 0;\n private static final int RENDER_THROTTL...
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Color; import android.graphics.CornerPathEffect; import android.graphics.Paint; import android.graphics.Point; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.view.ViewCompat; i...
package com.moagrius; /** * @author Mike Dunn, 2/4/18. */ public class TileViewDemoAdvanced extends AppCompatActivity { public static final double NORTH = -75.17261900652977; public static final double WEST = 39.9639998777094; public static final double SOUTH = -75.12462846235614; public static final do...
.installPlugin(new LowFidelityBackgroundPlugin(getBackgroundBitmap()))
4
guardianproject/CameraV
cameraVApp/src/main/java/org/witness/informacam/app/screens/UserManagementFragment.java
[ "public class InformaCam extends MultiDexApplication {\n\t/*\n\t * set dynamic debug settings in initData\n\t */\n\t\n\tprivate final static String LOG = App.LOG;\n\n\tprivate List<InnerBroadcaster> broadcasters = new Vector<InnerBroadcaster>();\n\n\tpublic IMediaManifest mediaManifest = new IMediaManifest();\n\tpu...
import java.util.ArrayList; import java.util.List; import org.witness.informacam.InformaCam; import org.witness.informacam.app.PreferencesActivity; import org.witness.informacam.app.R; import org.witness.informacam.app.WipeActivity; import org.witness.informacam.app.utils.Constants.App; import org.witness.informacam.ap...
package org.witness.informacam.app.screens; public class UserManagementFragment extends Fragment implements OnClickListener, ListAdapterListener { View rootView; TabHost tabHost = null; ImageButton emergencyWipe, toSettings, thumbnail; Button exportCredentials; TextView alias, connectivity, notificationsNoNo...
InformaCam informaCam = InformaCam.getInstance();
0
xiprox/WaniKani-for-Android
WaniKani/src/tr/xip/wanikani/content/notification/NotificationPublisher.java
[ "public class Browser extends AppCompatActivity {\n\n public static final String ARG_ACTION = \"action\";\n public static final String ARG_ITEM = \"item\";\n public static final String ARG_ITEM_TYPE = \"itemtype\";\n\n public static final String ACTION_ITEM_DETAILS = \"itemdetails\";\n public static ...
import android.app.NotificationManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.support.v4.app.NotificationCompat; import android.support.v4.app.TaskStackBuilder; import android.util...
package tr.xip.wanikani.content.notification; /** * Created by Hikari on 12/16/14. */ public class NotificationPublisher extends BroadcastReceiver { public static final int REQUEST_CODE = 0; private static final int NOTIFICATION_ID = 0; private static final int BROWSER_TYPE_LESSONS = 0; private s...
Intent browserIntent = PrefManager.getWebViewIntent(context);
6
hpgrahsl/kafka-connect-mongodb
src/test/java/at/grahsl/kafka/connect/mongodb/cdc/debezium/mongodb/MongoDbHandlerTest.java
[ "public class MongoDbSinkConnectorConfig extends CollectionAwareConfig {\n\n public enum FieldProjectionTypes {\n NONE,\n BLACKLIST,\n WHITELIST\n }\n\n private static final Pattern CLASS_NAME = Pattern.compile(\"\\\\p{javaJavaIdentifierStart}\\\\p{javaJavaIdentifierPart}*\");\n pri...
import at.grahsl.kafka.connect.mongodb.MongoDbSinkConnectorConfig; import at.grahsl.kafka.connect.mongodb.cdc.CdcOperation; import at.grahsl.kafka.connect.mongodb.cdc.debezium.OperationType; import at.grahsl.kafka.connect.mongodb.cdc.debezium.rdbms.RdbmsHandler; import at.grahsl.kafka.connect.mongodb.converter.SinkDocu...
package at.grahsl.kafka.connect.mongodb.cdc.debezium.mongodb; @RunWith(JUnitPlatform.class) public class MongoDbHandlerTest { public static final MongoDbHandler MONGODB_HANDLER_DEFAULT_MAPPING = new MongoDbHandler(new MongoDbSinkConnectorConfig(new HashMap<>())); public static final MongoDbHan...
new HashMap<OperationType, CdcOperation>() {{
2
Velli20/Tachograph
app/src/main/java/com/velli20/tachograph/collections/ListAdapterFragmentNow.java
[ "public class App extends MultiDexApplication {\n private static App instance;\n\n public static App get() {\n return instance;\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n instance = this;\n }\n\n @Override\n protected void attachBaseContext(Contex...
import android.support.v7.widget.RecyclerView.ViewHolder; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.velli20.tachograph.App; import com.velli20.tachograph.CardsToShowInFragmentNow; import com.velli20.tachograph.Event; import com.velli20.tachograph.R; import c...
/* * * * MIT License * * * * Copyright (c) [2017] [velli20] * * * * 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 righ...
private ListItemActivityChooser mActivityChooser;
3
csuyzb/AndroidLinkup
LinkupCore/src/com/znv/linkup/core/map/GameMap.java
[ "public class GameSettings {\n\n /**\n * 地板卡片值\n */\n public static byte GroundCardValue = 0;\n\n /**\n * 游戏卡片值,用于地图模版\n */\n public static byte GameCardValue = 1;\n\n /**\n * 障碍卡片值\n */\n public static byte ObstacleCardValue = -1;\n\n /**\n * 空卡片值\n */\n publ...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import com.znv.linkup.core.GameSettings; import com.znv.linkup.core.card.Piece; import com.znv.linkup.core.config.LevelCfg; import com.znv.linkup.core.map.template.MapTemplate; import com.znv.linkup.core.map.template.RandomTemplate;
package com.znv.linkup.core.map; /** * 游戏地图类 * * @author yzb * */ public class GameMap extends BaseMap { private static final long serialVersionUID = 8129010267609099217L; protected GameMap() { super(); } public GameMap(int ySize, int xSize) { super(ySize, xSize); Tem...
public static Piece[][] createPieces(LevelCfg levelCfg) {
2
blinskey/greek-reference
GreekReference/src/main/java/com/benlinskey/greekreference/views/detail/lexicon/LexiconDetailFragment.java
[ "public class GreekTextView extends TextView \n implements SharedPreferences.OnSharedPreferenceChangeListener {\n\n private static final String NOTO_SERIF = \"NotoSerif-Regular.ttf\";\n private static final int TEXT_COLOR = \n android.support.v7.appcompat.R.color.primary_text_default_materia...
import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.app.FragmentManager; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.ConnectivityManager; impor...
/* * Copyright 2014 Benjamin Linskey * * 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...
LexiconXmlParser parser = new LexiconXmlParser();
2
kinnla/eniac
src/eniac/menu/action/OpenSkin.java
[ "public class Manager {\n\n\t/*\n\t * ========================= applet lifecycle states =======================\n\t */\n\n\tpublic enum LifeCycle {\n\n\t\t/**\n\t\t * Default lifecycle state on startup\n\t\t */\n\t\tDEFAULT,\n\n\t\t/**\n\t\t * Livecycle state indicating a successful initialization\n\t\t */\n\t\tINI...
import java.awt.event.ActionEvent; import java.util.List; import eniac.Manager; import eniac.io.Proxy; import eniac.lang.Dictionary; import eniac.menu.action.gui.OpenSkinPanel; import eniac.skin.SkinIO;
/******************************************************************************* * Copyright (c) 2003-2005, 2013 Till Zoppke. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available...
OpenSkinPanel panel = new OpenSkinPanel(proxies);
3
alphagov/locate-api
locate-api-service/src/test/uk/gov/gds/locate/api/services/AddressTransformationServiceTest.java
[ "public class AesEncryptionProduct {\n private final byte[] encryptedContent;\n\n private final byte[] initializationVector;\n\n public AesEncryptionProduct(byte[] encryptedContent, byte[] initializationVector) {\n this.encryptedContent = encryptedContent;\n this.initializationVector = initia...
import com.google.common.collect.ImmutableList; import org.apache.commons.codec.binary.Base64; import org.junit.Test; import uk.gov.gds.locate.api.encryption.AesEncryptionProduct; import uk.gov.gds.locate.api.helpers.DetailsBuilder; import uk.gov.gds.locate.api.helpers.OrderingBuilder; import uk.gov.gds.locate.api.help...
package uk.gov.gds.locate.api.services; public class AddressTransformationServiceTest { private Ordering o = new OrderingBuilder().build(); private final static SecureRandom random = new SecureRandom(); private String testKey = "QWVzS2B5QmVpbmdTb21lU3RyaW5nT2ZMZW5ndGgyNTY="; private static KeyGener...
List<VCard> transformed = AddressTransformationService.addressToVCard(ImmutableList.of(aOne, aTwo, aThree));
6
hoko/hoko-android
hoko/src/main/java/com/hokolinks/utils/networking/async/HttpRequest.java
[ "public class Hoko {\n\n public static final String VERSION = \"2.3.0\";\n\n // Static Instance\n private static Hoko sInstance;\n\n // Private modules\n private Deeplinking mDeeplinking;\n\n // Private variables\n private boolean mDebugMode;\n private String mToken;\n\n // Private initia...
import com.hokolinks.Hoko; import com.hokolinks.model.App; import com.hokolinks.model.Device; import com.hokolinks.model.exceptions.HokoException; import com.hokolinks.utils.log.HokoLog; import com.hokolinks.utils.networking.Networking; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObjec...
package com.hokolinks.utils.networking.async; /** * HttpRequest is a savable model around HttpRequests. * It contains the path, an operation type, parameters in the form of json and the number of * retries. */ public class HttpRequest implements Serializable, HostnameVerifier{ // Constants private sta...
return "HOKO/" + Hoko.VERSION + " (" + environment + "; Linux; " + Device.getPlatform() + " " +
0
jochen777/jFormchecker
src/main/java/de/jformchecker/elements/DateInputSelectCompound.java
[ "public interface FormCheckerElement {\n\n\t// RFE: check, if some methods can be protected\n\n\t// get internal name of this input-element\n\tpublic String getName();\n\t\n\t// set internal name\n\tpublic void setName(String name);\n\n\n\t// get the value that the user entered\n\tpublic String getValue();\n\n\t// ...
import java.time.DateTimeException; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; import java.util.Map; import de.jformchecker.FormCheckerElement; import de.jformchecker.StringUtils; import de.jformchecker.TagAttributes; import de.jformchecker.criteria.ValidationResult; import de.jformchec...
package de.jformchecker.elements; // DateInput Compound Element offering the date-inputs as select-boxes // TODO: allow individual order (for internationalisation) public class DateInputSelectCompound extends AbstractInput<DateInputSelectCompound> implements FormCheckerElement { SelectInput day; SelectInput ...
public void init(Request request, boolean firstRun, Validator validator) {
7
kinnla/eniac
src/eniac/menu/action/Faq.java
[ "public class Manager {\n\n\t/*\n\t * ========================= applet lifecycle states =======================\n\t */\n\n\tpublic enum LifeCycle {\n\n\t\t/**\n\t\t * Default lifecycle state on startup\n\t\t */\n\t\tDEFAULT,\n\n\t\t/**\n\t\t * Livecycle state indicating a successful initialization\n\t\t */\n\t\tINI...
import java.awt.event.ActionEvent; import eniac.Manager; import eniac.lang.Dictionary; import eniac.menu.action.gui.TextPanel; import eniac.util.EProperties; import eniac.util.StringConverter;
/******************************************************************************* * Copyright (c) 2003-2005, 2013 Till Zoppke. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available...
Manager.getInstance().makeDialog(panel, Dictionary.FAQ_NAME.getText());
0
difi/datahotel
src/test/java/no/difi/datahotel/resources/DefinitionResourceTest.java
[ "public class BaseTest {\r\n\r\n @BeforeClass\r\n public static void beforeClass() throws Exception {\r\n System.setProperty(\"datahotel.home\", new File(ChunkBeanTest.class.getResource(\"/\").toURI()).toString() + File.separator + \"datahotel\");\r\n }\r\n}\r", "@Component(\"field\")\npublic clas...
import com.sun.jersey.api.core.HttpRequestContext; import no.difi.datahotel.BaseTest; import no.difi.datahotel.logic.FieldBean; import no.difi.datahotel.model.Definition; import no.difi.datahotel.model.DefinitionLight; import no.difi.datahotel.model.Metadata; import no.difi.datahotel.util.DatahotelException; import org...
package no.difi.datahotel.resources; public class DefinitionResourceTest extends BaseTest { private FieldBean fieldBean; private DefinitionResource definitionResource; private UriInfo uriInfo; private HttpRequestContext httpRequestContext; private MultivaluedMap<String, String> parameterMap; ...
defs.add(new DefinitionLight(new Definition()));
2
carrotsearch/smartsprites
src/main/java/org/carrot2/labs/smartsprites/SpriteImageRenderer.java
[ "public enum PngDepth\n{\n AUTO, INDEXED, DIRECT;\n}", "public enum Ie6Mode\n{\n /** No IE6-friendly image will be created for this sprite, even if needed */\n NONE,\n\n /** IE6-friendly image will be generated for this sprite if needed */\n AUTO;\n\n private String value;\n\n private Ie6Mode...
import java.awt.Color; import java.awt.image.BufferedImage; import org.carrot2.labs.smartsprites.SmartSpritesParameters.PngDepth; import org.carrot2.labs.smartsprites.SpriteImageDirective.Ie6Mode; import org.carrot2.labs.smartsprites.SpriteImageDirective.SpriteImageFormat; import org.carrot2.labs.smartsprites.message.M...
package org.carrot2.labs.smartsprites; /** * Applies color quantization to the merged sprite image if required. */ public class SpriteImageRenderer { /** This builder's configuration */ public final SmartSpritesParameters parameters; /** This builder's message log */ private final MessageLog messa...
final ColorReductionInfo colorReductionInfo = ColorQuantizer
8
osiefart/wicket-christmas
src/main/java/com/senacor/wicket/async/christmas/app/websocket/WebsocketPage.java
[ "public class PageRequestCounter extends Label {\n\n public PageRequestCounter(String id) {\n super(id);\n setOutputMarkupId(true);\n setDefaultModel(new CountingModel());\n }\n\n @Override\n public void onEvent(IEvent<?> event) {\n if (event.getPayload() instanceof AjaxRequestTarget) {\n ((Aja...
import java.util.concurrent.ConcurrentHashMap; import org.apache.wicket.Component; import org.apache.wicket.ajax.WebSocketRequestHandler; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.protocol.ws.api.message.TextMessage; import com.senacor.wicket.async.christmas.core.counter.PageRequestCounter;...
package com.senacor.wicket.async.christmas.app.websocket; /** * Seite mit Websockets * * <p> * http://splitshade.wordpress.com/2012/11/04/wicket-6-2-websockets-und-jquery- * visualize-die-richtige-atmosphare-schaffen/ * </p> * <p> * http://wicketinaction.com/2012/07/wicket-6-native-websockets/ * </p> * ...
Component trainInformationPanel = new TrainInformationPanel("trainInformation", new TrainMessageAsyncModel());
4
theblindr/blindr
app/src/com/lesgens/blindr/ChooseRoomActivity.java
[ "public class TrendingAdapter extends BaseAdapter {\n\tprivate final ArrayList<Trend> mData;\n\n\tpublic TrendingAdapter(ArrayList<Trend> map) {\n\t\tmData = new ArrayList<Trend>();\n\t\tmData.addAll(map);\n\t}\n\n\t@Override\n\tpublic int getCount() {\n\t\treturn mData.size();\n\t}\n\n\t@Override\n\tpublic Trend g...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Typeface; import android.location.Address; import android.location.Geocoder; import and...
package com.lesgens.blindr; public class ChooseRoomActivity extends FragmentActivity implements OnClickListener, OnMapLongClickListener, ConnectionCallbacks, OnConnectionFailedListener, OnItemClickListener { private GoogleMap map; private GoogleApiClient mGoogleApiClient; private Location mLastLocation; private...
((ImageView) findViewById(R.id.avatar)).setImageBitmap(Controller.getInstance().getMyself().getAvatar());
1
EthanCo/Halo-Turbo
halo-turbo-mina/src/main/java/com/ethanco/halo/turbo/mina/MinaUdpServerSocket.java
[ "public abstract class AbstractSocket implements ISocket, ILog {\n protected Config config;\n protected ISession session = null;\n protected List<IHandler> handlers = new ArrayList<>();\n protected Handler M = new Handler(Looper.getMainLooper());\n protected ConvertManager convertManager;\n\n publ...
import android.content.Context; import android.net.wifi.WifiManager; import com.ethanco.halo.turbo.ads.AbstractSocket; import com.ethanco.halo.turbo.bean.Config; import org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder; import org.apache.mina.core.service.IoHandlerAdapter; import org.apache.mina.core.session...
package com.ethanco.halo.turbo.mina; /** * Mina Nio Tcp Server * * @author EthanCo * @since 2017/1/17 */ public class MinaUdpServerSocket extends AbstractSocket { private NioDatagramAcceptor acceptor; private InetSocketAddress address; private WifiManager.MulticastLock lock; public MinaUdp...
if (acceptor.getFilterChain().get(LOGGER) == null) {
4
CMPUT301F14T14/android-question-answer-app
QuestionApp/src/ca/ualberta/cs/cmput301f14t14/questionapp/data/threading/AddQuestionCommentTask.java
[ "public class DataManager {\n\t\n\tprivate static DataManager instance;\n\n\tprivate IDataStore localDataStore;\n\tprivate IDataStore remoteDataStore;\n\tprivate List<UUID> recentVisit;\n\tprivate List<UUID> readLater;\n\tprivate Context context;\n\tString Username;\n\tstatic final String favQ = \"fav_Que\";\n\tsta...
import java.io.IOException; import ca.ualberta.cs.cmput301f14t14.questionapp.data.DataManager; import ca.ualberta.cs.cmput301f14t14.questionapp.data.IDataStore; import ca.ualberta.cs.cmput301f14t14.questionapp.data.eventbus.EventBus; import ca.ualberta.cs.cmput301f14t14.questionapp.data.eventbus.events.QuestionCommentP...
package ca.ualberta.cs.cmput301f14t14.questionapp.data.threading; public class AddQuestionCommentTask extends AbstractDataManagerTask<Comment<Question>, Void, Void> { public AddQuestionCommentTask(Context c) { super(c); // TODO Auto-generated constructor stub } @Override protected Void doInBackground(Comme...
IDataStore remoteDataStore = DataManager.getInstance(this.getContext())
1
alexcojocaru/elasticsearch-maven-plugin
src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/step/ResolveElasticsearchStep.java
[ "public class ClusterConfiguration\n{\n private List<InstanceConfiguration> instanceConfigurationList;\n private PluginArtifactResolver artifactResolver;\n private PluginArtifactInstaller artifactInstaller;\n private Log log;\n\n private String flavour;\n private String version;\n private Strin...
import java.io.File; import java.io.FileFilter; import java.io.IOException; import java.util.UUID; import org.apache.commons.io.FileUtils; import com.github.alexcojocaru.mojo.elasticsearch.v2.ClusterConfiguration; import com.github.alexcojocaru.mojo.elasticsearch.v2.InstanceConfiguration; import com.github.alexcojocaru...
package com.github.alexcojocaru.mojo.elasticsearch.v2.step; /** * Download and unpack elasticsearch into the destination directory. * * @author Alex Cojocaru */ public class ResolveElasticsearchStep implements InstanceStep { @Override public void execute(InstanceConfiguration config) { ...
catch (ArtifactException | IOException e)
2
zetbaitsu/CodePolitan
app/src/main/java/id/zelory/codepolitan/controller/RandomContentController.java
[ "public abstract class BenihController<P extends BenihController.Presenter>\n{\n protected P presenter;\n\n public BenihController(P presenter)\n {\n this.presenter = presenter;\n Timber.tag(getClass().getSimpleName());\n }\n\n public abstract void saveState(Bundle bundle);\n\n publi...
import rx.Observable; import timber.log.Timber; import android.os.Bundle; import java.util.ArrayList; import java.util.List; import id.zelory.benih.controller.BenihController; import id.zelory.benih.util.BenihScheduler; import id.zelory.benih.util.BenihUtils; import id.zelory.codepolitan.controller.event.ErrorEvent; im...
/* * Copyright (c) 2015 Zelory. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
.compose(BenihScheduler.pluck().applySchedulers(BenihScheduler.Type.IO))
1
grt192/grtframework
src/deploy/robots/RobotTestingBase.java
[ "public class GRTSolenoid extends Actuator {\n\n private Solenoid sol;\n public static final double ON = 1.0;\n public static final double OFF = 0.0;\n\n /**\n * Instantiates a solenoid on the default HV digital module.\n *\n * @param channel channel solenoid is connected to\n * @param n...
import actuator.GRTSolenoid; import actuator.GRTVictor; import controller.ShiftingDriveController; import deploy.GRTRobot; import edu.wpi.first.wpilibj.Compressor; import java.util.Calendar; import java.util.TimeZone; import logger.GRTLogger; import mechanism.GRTRobotBase; import mechanism.ShiftingDriveTrain; import se...
package deploy.robots; /** * Constructor for the main robot. Put all robot components here. * * @author ajc */ public class RobotTestingBase extends GRTRobot { //Teleop Controllers private ShiftingDriveController shiftingControl; private GRTDriverStation driverStation;
private GRTRobotBase robotBase;
4
ryft/NetVis
workspace/netvis/src/netvis/visualisations/DataflowVisualisation.java
[ "public class DataController implements ActionListener {\n\tDataFeeder dataFeeder;\n\tTimer timer;\n\tfinal List<DataControllerListener> listeners;\n\tfinal List<PacketFilter> filters;\n\tfinal List<Packet> allPackets;\n\tfinal List<Packet> filteredPackets;\n\tprivate int noUpdated = 0;\n\tprotected int intervalsCo...
import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.util.Hashtable; import java.util.List; import javax.media.opengl.GL2; import javax.media.opengl.GL...
package netvis.visualisations; /** * <pre> * Data Flow Visualisation * * Saturation indicates time (the gray lines are past lines); the coloured lines * are more recent. * * All the lines are transparent therefore if a line stands out it means lots of * packets go through that line. * * The red triangl...
Packet p;
5
apache/activemq-activeio
activeio-core/src/main/java/org/apache/activeio/journal/howl/HowlJournal.java
[ "public class InvalidRecordLocationException extends Exception {\n\n\t/**\n * Comment for <code>serialVersionUID</code>\n */\n private static final long serialVersionUID = 3618414947307239475L;\n\n /**\n\t * \n\t */\n\tpublic InvalidRecordLocationException() {\n\t\tsuper();\n\t}\n\n\t/**\n\t * @param ...
import org.objectweb.howl.log.LogConfigurationException; import org.objectweb.howl.log.LogEventListener; import org.objectweb.howl.log.LogRecord; import org.objectweb.howl.log.Logger; import java.io.IOException; import java.io.InterruptedIOException; import org.apache.activeio.journal.InvalidRecordLocationException; im...
/** * * 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 ...
public RecordLocation write(Packet packet, boolean sync) throws IOException {
5
simo415/spc
src/com/sijobe/spc/command/Help.java
[ "public enum FontColour {\n \n BLACK(\"\\2470\"),\n DARK_BLUE(\"\\2471\"),\n DARK_GREEN(\"\\2472\"),\n DARK_AQUA(\"\\2473\"),\n DARK_RED(\"\\2474\"),\n PURPLE(\"\\2475\"),\n ORANGE(\"\\2476\"),\n GREY(\"\\2477\"),\n DARK_GREY(\"\\2478\"),\n BLUE(\"\\2479\"),\n GREEN(\"\\247a\"),\n AQUA(\"\...
import com.sijobe.spc.util.FontColour; import com.sijobe.spc.validation.Parameter; import com.sijobe.spc.validation.ParameterString; import com.sijobe.spc.validation.Parameters; import com.sijobe.spc.wrapper.CommandException; import com.sijobe.spc.wrapper.CommandManager; import com.sijobe.spc.wrapper.CommandSender; imp...
package com.sijobe.spc.command; /** * Help command provides help for all of the loaded commands * * @author simo_415 * @version 1.1 */ @Command ( name = "help", description = "Brings up the help message", example = "give", videoURL = "http://www.youtube.com/watch?v=mxU4p_vvjGw", version = "1.1", ...
new Parameter[] {
1
nchambers/probschemas
src/main/java/nate/probschemas/EventPairScores.java
[ "public class Pair<A,B> {\n A first;\n B second;\n\n public Pair(A one, B two) {\n first = one;\n second = two;\n }\n\n public A first() { return first; }\n public B second() { return second; }\n public void setFirst(A obj) { first = obj; }\n public void setSecond(B obj) { second = obj; }\n \n publi...
import java.io.BufferedReader; import java.io.FileReader; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import nate.util.Pair; import nate.WordEvent; import nate.Wor...
package nate.probschemas; /** * An interface to reading relation scores between pairs of events * * Reads event/dep pair scores from a score file. * 1.000 9351 comment:decline;obj:subj * 0.868 6546 buy:sell;subj:subj * 0.863 4992 fell:rise;subj:subj * */ public class EventPairScores implements S...
public static Pair split(String event) {
0
MatteoJoliveau/PlugFace
plugface-core/src/main/java/org/plugface/core/impl/DefaultPluginManager.java
[ "public interface PluginContext {\n /**\n * Return an instance of the plugin that is registered with the given name\n *\n * @param pluginName the name of the plugin\n * @param <T> the inferred type of the plugin\n * @return the plugin object or <code>null</code> if none exists\n */...
import org.plugface.core.annotations.Plugin; import org.plugface.core.factory.PluginManagers; import org.plugface.core.internal.AnnotationProcessor; import org.plugface.core.internal.DependencyResolver; import org.plugface.core.internal.di.MissingDependencyException; import org.plugface.core.internal.di.Node; import ja...
package org.plugface.core.impl; /*- * #%L * PlugFace :: Core * %% * Copyright (C) 2017 - 2018 PlugFace * %% * 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 w...
public Collection<PluginRef> getAllPlugins() {
2
igd-geo/mongomvcc
src/main/java/de/fhg/igd/mongomvcc/impl/MongoDBVCollection.java
[ "public interface VCollection {\n\t/**\n\t * @return the collection's name\n\t */\n\tString getName();\n\t\n\t/**\n\t * Inserts a new object to the collection. If the object does not have\n\t * a UID yet, a new one will be generated and saved in the object's\n\t * <code>uid</code> attribute.\n\t * @param obj the ob...
import de.fhg.igd.mongomvcc.impl.internal.Index; import de.fhg.igd.mongomvcc.impl.internal.MongoDBConstants; import java.util.Map; import com.mongodb.BasicDBObject; import com.mongodb.DBCollection; import com.mongodb.DBCursor; import com.mongodb.DBObject; import de.fhg.igd.mongomvcc.VCollection; import de.fhg.igd.mongo...
// This file is part of MongoMVCC. // // Copyright (c) 2012 Fraunhofer IGD // // MongoMVCC is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any l...
protected final static String OID = MongoDBConstants.ID;
7
CMPUT301F14T14/android-question-answer-app
QuestionApp/src/ca/ualberta/cs/cmput301f14t14/questionapp/data/threading/AddQuestionTask.java
[ "public class DataManager {\n\t\n\tprivate static DataManager instance;\n\n\tprivate IDataStore localDataStore;\n\tprivate IDataStore remoteDataStore;\n\tprivate List<UUID> recentVisit;\n\tprivate List<UUID> readLater;\n\tprivate Context context;\n\tString Username;\n\tstatic final String favQ = \"fav_Que\";\n\tsta...
import java.io.IOException; import ca.ualberta.cs.cmput301f14t14.questionapp.data.DataManager; import ca.ualberta.cs.cmput301f14t14.questionapp.data.IDataStore; import ca.ualberta.cs.cmput301f14t14.questionapp.data.eventbus.EventBus; import ca.ualberta.cs.cmput301f14t14.questionapp.data.eventbus.events.QuestionPushDela...
package ca.ualberta.cs.cmput301f14t14.questionapp.data.threading; public class AddQuestionTask extends AbstractDataManagerTask<Question, Void, Void>{ public AddQuestionTask(Context c) { super(c); } @Override protected Void doInBackground(Question... qin) { Question q = qin[0]; // Ignore other questions inp...
if (EventBus.getInstance().getEventQueue().contains(new QuestionPushDelayedEvent(q))){
2
vgoldin/cqrs-eventsourcing-kafka
services-infrastructure-messaging/src/main/java/io/plumery/messaging/kafka/KafkaCommandListener.java
[ "public interface Action extends Serializable {\n\n}", "public interface ActionHandler<T extends Action> {\n public void handle(T action);\n}", "public abstract class ApplicationException extends RuntimeException {\n private final int version;\n private ID aggregateRootId;\n private String action;\...
import com.fasterxml.jackson.databind.ObjectMapper; import io.dropwizard.lifecycle.Managed; import io.plumery.core.Action; import io.plumery.core.ActionHandler; import io.plumery.core.exception.ApplicationException; import io.plumery.core.exception.SystemException; import io.plumery.core.infrastructure.CommandListener;...
package io.plumery.messaging.kafka; public class KafkaCommandListener implements CommandListener, Managed { private static final Logger LOG = LoggerFactory.getLogger(KafkaCommandListener.class); public static final String APPLICATION_EVENTS = ".ApplicationEvents"; private final KafkaConsumer consumer; ...
targetException = new SystemException(errorEventId, ex);
3
AleksanderMielczarek/ObservableCache
app/src/main/java/com/github/aleksandermielczarek/observablecacheexample/module/Observable1Module.java
[ "public abstract class ObservableCache implements Cache {\n\n protected abstract <T> void cache(String key, Observable<T> observable);\n\n protected abstract <T> void cache(String key, Single<T> single);\n\n @Nullable\n protected abstract <T> Observable<T> getObservableFromCache(String key);\n\n @Nul...
import com.github.aleksandermielczarek.napkin.scope.AppScope; import com.github.aleksandermielczarek.observablecache.ObservableCache; import com.github.aleksandermielczarek.observablecache.LruObservableCache; import com.github.aleksandermielczarek.observablecache.service.ObservableCacheService; import com.github.aleksa...
package com.github.aleksandermielczarek.observablecacheexample.module; /** * Created by Aleksander Mielczarek on 30.10.2016. */ @Module @AppScope public class Observable1Module { @Provides @AppScope ObservableCache provideObservableCache() { return LruObservableCache.newInstance(); } ...
ObservableCacheService provideObservableCacheService(ObservableCache observableCache) {
2
MKLab-ITI/easIE
src/main/java/certh/iti/mklab/easie/executor/generators/StaticWrapperGenerator.java
[ "public final class Configuration {\r\n\r\n public URL url;\r\n\r\n public HashSet<String> group_of_urls;\r\n\r\n public String source_name;\r\n\r\n public String entity_name;\r\n\r\n public String table_selector;\r\n\r\n public ArrayList<ScrapableField> metrics;\r\n\r\n public ArrayList<Scrapa...
import certh.iti.mklab.easie.configuration.Configuration; import certh.iti.mklab.easie.exception.PaginationException; import certh.iti.mklab.easie.extractors.staticpages.GroupHTMLExtractor; import certh.iti.mklab.easie.extractors.staticpages.PaginationIterator; import certh.iti.mklab.easie.extractors.staticpages.St...
/* * Copyright 2016 vasgat. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
public void execute() throws InterruptedException, PaginationException, URISyntaxException, IOException, KeyManagementException, NoSuchAlgorithmException {
1
dedyk/JaponskiPomocnik
app/src/main/java/pl/idedyk/android/japaneselearnhelper/keigo/KeigoTable.java
[ "public class JapaneseAndroidLearnHelperApplication extends MultiDexApplication {\n\n\tpublic static final ThemeType defaultThemeType = ThemeType.BLACK;\n\t\n\tprivate static JapaneseAndroidLearnHelperApplication singleton;\n\n\tpublic static JapaneseAndroidLearnHelperApplication getInstance() {\n\t\treturn singlet...
import java.util.ArrayList; import java.util.List; import pl.idedyk.android.japaneselearnhelper.JapaneseAndroidLearnHelperApplication; import pl.idedyk.android.japaneselearnhelper.MenuShorterHelper; import pl.idedyk.android.japaneselearnhelper.R; import pl.idedyk.android.japaneselearnhelper.problem.ReportProblem; impor...
package pl.idedyk.android.japaneselearnhelper.keigo; public class KeigoTable extends Activity { @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); MenuShorterHelper.onCreateOptionsMenu(menu); return true; } @Override public boolean onOptionsItemSelected(Men...
final List<IScreenItem> report = new ArrayList<IScreenItem>();
3
hss01248/DialogUtil
dialog/src/main/java/com/hss01248/dialog/ios/IosActionSheetHolder.java
[ "public final class R {\n public static final class anim {\n public static int abc_fade_in=0x7f040000;\n public static int abc_fade_out=0x7f040001;\n public static int abc_grow_fade_in_from_bottom=0x7f040002;\n public static int abc_popup_enter=0x7f040003;\n public static int a...
import android.content.Context; import android.graphics.drawable.ColorDrawable; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.RelativeLayout; import android.wi...
package com.hss01248.dialog.ios; /** * Created by Administrator on 2016/10/9 0009. */ public class IosActionSheetHolder extends SuperLvHolder<ConfigBean> { public ListView lv; protected Button btnBottom; public TextView textView; private View line; public IosActionSheetHolder(Context context) ...
textView.setTextColor(StyledDialog.context.getResources().getColor(bean.titleTxtColor));
1
bourgesl/marlin-fx
src/main/java/com/sun/marlin/DMarlinRenderingEngine.java
[ "public static void logInfo(final String msg) {\n if (MarlinConst.USE_LOGGER) {\n LOG.info(msg);\n } else if (MarlinConst.ENABLE_LOGS) {\n System.out.print(\"INFO: \");\n System.out.println(msg);\n }\n}", "public abstract class ReentrantContextProvider<K extends ReentrantContext>\n{\...
import com.sun.javafx.geom.PathIterator; import com.sun.prism.BasicStroke; import java.security.PrivilegedAction; import java.security.AccessController; import static com.sun.marlin.MarlinUtils.logInfo; import com.sun.util.reentrant.ReentrantContextProvider; import com.sun.util.reentrant.ReentrantContextProviderCLQ; im...
/* * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
RDR_CTX_PROVIDER = new ReentrantContextProviderCLQ<DRendererContext>(REF_TYPE)
2
spacecowboy/NotePad
app/src/main/java/com/nononsenseapps/notepad/ui/settings/SyncPrefs.java
[ "public class DropboxFilePickerActivity extends\n AbstractFilePickerActivity<DropboxAPI.Entry> {\n\n // In the class declaration section:\n private DropboxAPI<AndroidAuthSession> mDBApi;\n\n @Override\n public void onCreate(Bundle b) {\n mDBApi = DropboxSyncHelper.getDBApi(this);\n ...
import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.AccountManagerCallback; import android.accounts.AccountManagerFuture; import android.accounts.AuthenticatorException; import android.accounts.OperationCanceledException; import android.annotation.SuppressLint; import androi...
// SD Card prefSdDir = findPreference(KEY_SD_DIR); setSdDirSummary(sharedPrefs); prefSdDir.setOnPreferenceClickListener(new OnPreferenceClickListener() { @Override public boolean onPreferenceClick(final Preference preference) { // Start the filepi...
Log.d("syncPrefs", "onChanged");
1
santoslab/aadl-translator
edu.ksu.cis.projects.mdcf.aadl-translator-test/src/test/java/edu/ksu/cis/projects/mdcf/aadltranslator/test/arch/DeviceModelTests.java
[ "public static boolean initComplete = false;", "public static HashSet<String> usedProperties = new HashSet<>();", "public class DeviceModel extends DevOrProcModel {\n\t\n\tprivate HashBiMap<String, String> inToOutPortNames = HashBiMap.create();\n\t\n\tpublic DeviceModel(){\n\t\tsuper();\n\t\tprocessType = Proce...
import static edu.ksu.cis.projects.mdcf.aadltranslator.test.AllTests.initComplete; import static edu.ksu.cis.projects.mdcf.aadltranslator.test.AllTests.usedProperties; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import org.junit.AfterClass; import org.junit.BeforeClass; im...
package edu.ksu.cis.projects.mdcf.aadltranslator.test.arch; public class DeviceModelTests { private static DeviceModel deviceModelFromSystem; // private static DeviceModel deviceModelStandalone; @BeforeClass public static void initialize() { if(!initComplete) AllTests.initialize(); usedProperties.add("M...
SystemModel fullSystemModel = AllTests.runArchTransTest("PulseOx", "PulseOx_Forwarding_System");
4
engswee/equalize-xpi-modules
com.equalize.xpi.af.modules.ejb/ejbModule/com/equalize/xpi/af/modules/base64/Base64EncodeConverter.java
[ "public abstract class AbstractModuleConverter {\n\tprotected final Message msg;\n\tprotected final XMLPayload payload;\n\tprotected final AuditLogHelper audit;\n\tprotected final ParameterHelper param;\n\tprotected final DynamicConfigurationHelper dyncfg;\n\tprotected final boolean debug;\n\t\n\tpublic AbstractMod...
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import com.equalize.xpi.af.modules.util.AbstractModuleConverter; import com.equalize.xpi.af.modules.util.AuditLogHelper; import com.equalize.xpi.af.modules.util.DynamicConfigurationHelper; import co...
package com.equalize.xpi.af.modules.base64; public class Base64EncodeConverter extends AbstractModuleConverter { private String outputType; private String documentName; private String documentNamespace; private String base64FieldName; private boolean compress; private byte[] content; public Base64EncodeConv...
AuditLogHelper audit, DynamicConfigurationHelper dyncfg, Boolean debug) {
1
Shirkit/all-inhonmodman
ModManager/src/modmanager/gui/developing/ManagerGUI1.java
[ "public class L10n {\n // This is where property files with translations are\n\n private static final String RESOURCE_NAME = \"modmanager.gui.l10n.HonModMan\";\n private static final String DEFAULT_LOCALE = \"en\";\n private static ResourceBundle resource;\n private static ResourceBundle defaultResou...
import java.awt.Component; import java.awt.event.ActionEvent; import java.io.IOException; import java.util.List; import java.util.logging.Level; import javax.swing.JButton; import javax.swing.JList; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import modmanager.gui.l10n.L10n; import javax.swing.JPanel;...
package modmanager.gui.developing; /** * Main form of the ModManager. This class is the 'view' part of the MVC framework * * @author Shirkit, Kovo */ public class ManagerGUI1 extends javax.swing.JFrame implements Observer { // Model for this View (part of MVC pattern) private static ManagerGUI1 instance ...
L10n.getString("table.modname"),
0
heribender/SocialDataImporter
SDI-core/src/main/java/ch/sdi/core/impl/target/TargetExecutor.java
[ "public class SdiDuplicatePersonException extends SdiSkipPersonException\n{\n private static final long serialVersionUID = 1L;\n\n /**\n * Constructor\n *\n * @param aExitCode\n */\n public SdiDuplicatePersonException( Person<?> aPerson )\n {\n super( aPerson );\n }\n\n /**\...
import java.io.File; import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.LinkedHashMap; import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log...
/** * Copyright (c) 2014 by the original author or authors. * * This code is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. ...
private TargetJobContext myTargetJobContext;
7
klaus7/jfastnet
src/main/java/com/jfastnet/PeerController.java
[ "public class DisabledStackedMessagesEvent implements Event {\n\n\tprivate final StackedMessage offendingStackedMessage;\n\n\tpublic DisabledStackedMessagesEvent(StackedMessage offendingStackedMessage) {\n\t\tthis.offendingStackedMessage = offendingStackedMessage;\n\t}\n\n\t@Override\n\tpublic void accept(EventVisi...
import com.jfastnet.events.DisabledStackedMessagesEvent; import com.jfastnet.messages.*; import com.jfastnet.processors.IMessageReceiverPostProcessor; import com.jfastnet.processors.IMessageReceiverPreProcessor; import com.jfastnet.processors.IMessageSenderPostProcessor; import com.jfastnet.processors.IMessageSenderPre...
/******************************************************************************* * Copyright 2018 Klaus Pfeiffer - klaus@allpiper.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
for (IMessageReceiverPostProcessor processor : state.getMessageReceiverPostProcessors()) {
1
Fedict/commons-eid
commons-eid-client/src/main/java/be/bosa/commons/eid/client/BeIDCard.java
[ "public interface BeIDCardListener {\n\n\tvoid notifyReadProgress(FileType fileType, int offset, int estimatedMaxSize);\n\n\tvoid notifySigningBegin(FileType fileType);\n\n\tvoid notifySigningEnd(FileType fileType);\n}", "public class BeIDException extends Exception {\n\n\tpublic BeIDException() {\n\t}\n\n\tpubli...
import be.bosa.commons.eid.client.event.BeIDCardListener; import be.bosa.commons.eid.client.exception.BeIDException; import be.bosa.commons.eid.client.exception.ResponseAPDUException; import be.bosa.commons.eid.client.impl.BeIDDigest; import be.bosa.commons.eid.client.impl.CCID; import be.bosa.commons.eid.client.impl.L...
/* * Commons eID Project. * Copyright (C) 2014 - 2018 BOSA. * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License version 3.0 as published by * the Free Software Foundation. * * This software is distributed in the hope that it will be usef...
MessageDigest messageDigest = BeIDDigest.SHA_256.getMessageDigestInstance();
3
ozwolf-software/raml-mock-server
src/main/java/net/ozwolf/mockserver/raml/internal/validator/ResponseValidator.java
[ "public enum ResponseObeyMode {\n STRICT,\n SAFE_ERRORS(\"(404|405|415|5.+)\"),\n ALL_ERRORS(\"(4|5).+\");\n\n private final Pattern alwaysAllowedCodes;\n\n ResponseObeyMode(String pattern) {\n this.alwaysAllowedCodes = Pattern.compile(pattern);\n }\n\n ResponseObeyMode() {\n this...
import net.ozwolf.mockserver.raml.ResponseObeyMode; import net.ozwolf.mockserver.raml.internal.domain.ApiExpectation; import net.ozwolf.mockserver.raml.internal.domain.ValidationErrors; import net.ozwolf.mockserver.raml.internal.validator.body.ResponseBodyValidator; import net.ozwolf.mockserver.raml.internal.validator....
package net.ozwolf.mockserver.raml.internal.validator; public class ResponseValidator implements Validator { private final ApiExpectation expectation; private final ResponseObeyMode obeyMode; public ResponseValidator(ApiExpectation expectation, ResponseObeyMode obeyMode) { ...
public ValidationErrors validate() {
2