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
konachan700/JNekoImageDB
src/main/java/ui/dialogs/activities/ImageViewActivity.java
[ "public interface UseServices {\n\tInitService initService = new InitService();\n\n\tdefault <T> T getService(Class<T> clazz) {\n\t\tif (initService.getServices() == null || !initService.getServices().containsKey(clazz)) {\n\t\t\tthrow new IllegalStateException(\"Class \\\"\" + clazz + \"\\\" not found in list of s...
import javafx.beans.value.ObservableValue; import javafx.event.ActionEvent; import javafx.scene.Cursor; import javafx.scene.Node; import javafx.scene.control.ScrollPane; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.KeyCode; import javafx.scene.input.KeyEvent; import ja...
package ui.dialogs.activities; @HasStyledElements public abstract class ImageViewActivity extends ActivityPage implements UseServices { @CssStyle({"window_root_pane"}) private final HBox container = new HBox(); //@CssStyle({"window_root_pane"}) private final BorderPane imageContainer = new BorderPane();
private final VerticalIconsPanel verticalIconsPanel = new VerticalIconsPanel();
5
honghailiang/SpringMango
src/main/java/com/mango/jtt/servlet/InitService.java
[ "@Entity\n@Table(name = \"mango_user\")\npublic class MangoUser extends BaseBean {\n\n\t/**\n\t *\n\t */\n\tprivate static final long serialVersionUID = -9068362068362830589L;\n\t/**\n\t * 用户id\n\t */\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.AUTO)\n\tprivate Long userId;\n\t/**\n\t * 用户名称\n\t */\n\tpriva...
import com.mango.jtt.po.MangoUser; import com.mango.jtt.po.Product; import com.mango.jtt.service.IProductService; import com.mango.jtt.service.IUserService; import com.mango.jtt.util.StringUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.uti...
package com.mango.jtt.servlet; @Service public class InitService { @Autowired private IProductService productService; @Autowired private IUserService userService; public void setProductAndUser() {
List<Product> products = productService.getProductList();
1
Qualtagh/JBroTable
test/io/github/qualtagh/swing/table/view/JBroTableColumnModelTest.java
[ "public interface IModelFieldGroup extends Cloneable {\n String getCaption();\n void setCaption( String caption );\n \n String getIdentifier();\n void setIdentifier( String identifier );\n \n ModelFieldGroup getParent();\n \n int getColspan();\n \n int getRowspan();\n void setRowspan( int rowspan );\n ...
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel; import java.awt.FlowLayout; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing...
package io.github.qualtagh.swing.table.view; public class JBroTableColumnModelTest { private static final Logger LOGGER = Logger.getLogger( JBroTableColumnModelTest.class ); private ModelData data; private JBroTable table; public JBroTableColumnModelTest() { } @BeforeClass public static void setUp...
ModelRow rows[] = new ModelRow[ 10 ];
4
sooola/V2EX-Android
app/src/main/java/com/sola/v2ex_android/ui/TopicsDetialActivity.java
[ "public class NodeInfo {\n /**\n * id : 300\n * name : programmer\n * url : http://www.v2ex.com/go/programmer\n * title : 程序员\n * title_alternative : Programmer\n * topics : 13616\n * stars : 2688\n * header : While code monkeys are not eating bananas, they're coding.\n * foot...
import android.content.Context; import android.content.Intent; import android.view.View; import android.widget.TextView; import com.sola.v2ex_android.R; import com.sola.v2ex_android.model.NodeInfo; import com.sola.v2ex_android.model.Replies; import com.sola.v2ex_android.model.Topics; import com.sola.v2ex_android.networ...
package com.sola.v2ex_android.ui; /** * 主题详情 * Created by wei on 2016/10/20. */ public class TopicsDetialActivity extends BaseRecycleActivity<Replies> { public static final String KEY_TOPIC = "key_topic"; private Topics mTopics; private String mNodeNameStr; @BindView(R.id.tv_node_name) TextVie...
Observer<NodeInfo> observer = new Observer<NodeInfo>() {
0
idega/com.idega.block.category
src/java/com/idega/block/category/IWBundleStarter.java
[ "public abstract class CategoryBlock extends Block implements ICDynamicPageTriggerInheritable {\n\tprivate ICCategory icCategory;\n\tprivate int icCategoryId = -1;\n\tprivate int[] icCategoryIds = new int[0];\n\tpublic final static String prmCategoryId = \"catbl_catid\";\n\tprivate boolean autocreate = true;\n\tpro...
import com.idega.block.category.presentation.CategoryBlock; import com.idega.block.category.presentation.CategoryMetaDataWindow; import com.idega.block.category.presentation.CategoryWindow; import com.idega.block.category.presentation.FolderBlock; import com.idega.block.category.presentation.FolderBlockCategoryWindow; ...
package com.idega.block.category; /** * <p>Title: idegaWeb</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: idega Software</p> * @author <a href="thomas@idega.is">Thomas Hilbig</a> * @version 1.0 * Created on Jun 10, 2004 */ public class IWBundleStarter implements IWBundleStarta...
registry.registerRefactoredClass("com.idega.idegaweb.block.presentation.FolderBlockComponentIWAdminWindowLegacy", FolderBlockComponentIWAdminWindowLegacy.class);
6
mgoellnitz/dinistiq
src/test/java/dinistiq/test/QualifierTest.java
[ "public interface ClassResolver {\n\n /**\n * Get all available subclasses of a given class which are not abstract.\n *\n * @param <T> generic type variable for the result set\n * @param type type to search subclasses for\n * @return Set of classes implementing the given type\n */\n <T...
import java.util.Set; import javax.inject.Named; import javax.inject.Scope; import org.atinject.tck.auto.Car; import org.testng.Assert; import org.testng.annotations.Test; import dinistiq.ClassResolver; import dinistiq.Dinistiq; import dinistiq.SimpleClassResolver; import dinistiq.test.components.InitialBean; import di...
/** * * Copyright 2016-2020 Martin Goellnitz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This ...
initialBeans.put("initialBean", new InitialBean());
3
alechenninger/monarch
bin/src/io/github/alechenninger/monarch/apply/ApplyChangesOptionsFromInput.java
[ "public interface Change {\n static Change forVariables(Map<String, String> variables, Map<String, Object> set,\n Collection<String> remove) {\n return new DefaultChange(SourceSpec.byVariables(variables), set, remove);\n }\n\n static Change forPath(String path, Map<String, Object> set, Collection<String>...
import io.github.alechenninger.monarch.Change; import io.github.alechenninger.monarch.Hierarchy; import io.github.alechenninger.monarch.DataFormats; import io.github.alechenninger.monarch.SourceSpec; import io.github.alechenninger.monarch.yaml.YamlConfiguration; import java.nio.file.FileSystem; import java.nio.file.Pat...
/* * monarch - A tool for managing hierarchical data. * Copyright (C) 2016 Alec Henninger * * 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...
public Iterable<Change> changes() {
0
Doist/JobSchedulerCompat
library/src/main/java/com/doist/jobschedulercompat/scheduler/alarm/AlarmJobService.java
[ "public class JobInfo {\n private static final String LOG_TAG = \"JobInfoCompat\";\n\n @IntDef({\n NETWORK_TYPE_NONE,\n NETWORK_TYPE_ANY,\n NETWORK_TYPE_UNMETERED,\n NETWORK_TYPE_NOT_ROAMING,\n NETWORK_TYPE_CELLULAR\n })\n @Retention(RetentionPolicy...
import com.doist.jobschedulercompat.JobInfo; import com.doist.jobschedulercompat.JobParameters; import com.doist.jobschedulercompat.JobScheduler; import com.doist.jobschedulercompat.JobService; import com.doist.jobschedulercompat.job.JobStatus; import com.doist.jobschedulercompat.util.DeviceUtils; import android.app.Al...
// Update battery not low constraint. // ACTION_BATTERY_CHANGED cannot be received through a receiver declared in AndroidManifest. // AlarmReceiver will be scheduled to run by AlarmManager at most 30 minutes from now. boolean unsatisfiedBatteryNotLowConstraint = false; boolean ba...
JobInfo job = jobStatus.getJob();
0
CodeCrafter47/BungeeTabListPlus
bungee/src/main/java/codecrafter47/bungeetablistplus/managers/RedisPlayerManager.java
[ "public class BungeeTabListPlus {\n\n /**\n * Holds an INSTANCE of itself if the plugin is enabled\n */\n private static BungeeTabListPlus INSTANCE;\n @Getter\n private final Plugin plugin;\n\n public PlayerProvider playerProvider;\n @Getter\n private EventExecutor mainThreadExecutor;\n...
import codecrafter47.bungeetablistplus.BungeeTabListPlus; import codecrafter47.bungeetablistplus.common.BTLPDataKeys; import codecrafter47.bungeetablistplus.common.network.DataStreamUtils; import codecrafter47.bungeetablistplus.common.network.TypeAdapterRegistry; import codecrafter47.bungeetablistplus.data.BTLPBungeeDa...
/* * Copyright (C) 2020 Florian Stober * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * *...
BTLPDataKeys.class,
1
stackify/stackify-api-java
src/main/java/com/stackify/api/common/log/LogCollector.java
[ "@AllArgsConstructor\n@NoArgsConstructor\n@Builder(builderClassName = \"Builder\", builderMethodName = \"newBuilder\", toBuilder = true)\n@Data\n@JsonInclude(JsonInclude.Include.NON_NULL)\n@JsonIgnoreProperties(ignoreUnknown = true)\npublic class AppIdentity {\n\n /**\n * Device id\n */\n @JsonPropert...
import java.util.Queue; import com.stackify.api.AppIdentity; import com.stackify.api.EnvironmentDetail; import com.stackify.api.LogMsg; import com.stackify.api.LogMsgGroup; import com.stackify.api.common.AppIdentityService; import com.stackify.api.common.collect.SynchronizedEvictingQueue; import com.stackify.api.common...
/* * Copyright 2014 Stackify * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
private final RetryPolicy<LogMsgGroup> retryPolicy = new RetryPolicy<LogMsgGroup>()
3
xushaomin/apple-boot
apple-boot-jetty8-original/src/main/java/com/appleframework/boot/Main.java
[ "public interface Container {\r\n\t\r\n\tpublic static final String DEFAULT_TYPE = \"container\";\r\n\tpublic static final String TYPE_KEY = \"type\";\r\n\tpublic static final String ID_KEY = \"id\";\r\n\t\t\r\n\t/**\r\n * name.\r\n */\r\n\tpublic String getName();\r\n \r\n\t/**\r\n * type.\r\n *...
import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.appleframework.boot.core.Container; import com.appleframework.boot.core.ContainerFactory; import com.appleframework.boot.core.Container...
package com.appleframework.boot; /** * spring+Jetty的容器 * * @author Cruise.Xu */ public class Main { private static Logger logger = LoggerFactory.getLogger(Main.class); public static final String SHUTDOWN_HOOK_KEY = "shutdown.hook"; protected static volatile boolean running =...
containers.add(ContainerFactory.create(JettyContainer.class));
1
jimmc/HapiPodcastJ
src/info/xuluan/podcast/DownloadActivity.java
[ "public class FeedItem {\r\n\t\r\n\tpublic static final int MAX_DOWNLOAD_FAIL = 5;\r\n\t\r\n\tprivate final Log log = Log.getLog(getClass());\r\n\r\n\tpublic String url;\r\n\tpublic String title;\r\n\tpublic String author;\r\n\tpublic String date;\r\n\tpublic String content;\r\n\tpublic String resource;\r\n\tpublic...
import info.xuluan.podcast.provider.FeedItem; import info.xuluan.podcast.provider.ItemColumns; import info.xuluan.podcast.utils.DialogMenu; import info.xuluan.podcast.utils.IconCursorAdapter; import info.xuluan.podcast.utils.StrUtils; import info.xuluan.podcastj.R; import java.io.File; import java.util.HashMap; import ...
package info.xuluan.podcast; public class DownloadActivity extends PodcastBaseActivity implements PodcastTab { private static final int MENU_RESTART = Menu.FIRST + 1; private static final int MENU_ITEM_DETAILS = Menu.FIRST + 9; private static final int MENU_ITEM_REMOVE = Menu.FIRST + 10; private static final...
FeedItem item = mServiceBinder.getDownloadingItem();
0
T5750/poi
src/main/java/t5750/poi/service/impl/ProductServiceImpl.java
[ "public class ProductForm {\n\tprivate Long id;\n\t@NotBlank\n\tprivate String description;\n\tprivate BigDecimal price;\n\tprivate String imageUrl;\n\n\tpublic Long getId() {\n\t\treturn id;\n\t}\n\n\tpublic void setId(Long id) {\n\t\tthis.id = id;\n\t}\n\n\tpublic String getDescription() {\n\t\treturn description...
import java.io.*; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpEntit...
package t5750.poi.service.impl; @Service public class ProductServiceImpl implements ProductService { private ProductRepository productRepository; private ProductFormToProduct productFormToProduct; @Autowired
private ExcelService excelService;
4
apsun/QuoteLock
src/com/crossbowffs/quotelock/modules/ModuleManager.java
[ "public interface QuoteModule {\n /**\n * Gets the user-friendly name of the quote provider that this module uses.\n * Must not return {@code null}.\n */\n String getDisplayName(Context context);\n\n /**\n * Gets a {@link ComponentName} representing the configuration\n * {@link android....
import android.content.Context; import com.crossbowffs.quotelock.api.QuoteModule; import com.crossbowffs.quotelock.modules.brainyquote.BrainyQuoteQuoteModule; import com.crossbowffs.quotelock.modules.custom.CustomQuoteModule; import com.crossbowffs.quotelock.modules.freakuotes.FreakuotesQuoteModule; import com.crossbow...
package com.crossbowffs.quotelock.modules; public class ModuleManager { private static final Map<String, QuoteModule> sModules = new LinkedHashMap<>(); static { addLocalModule(new VnaasQuoteModule()); addLocalModule(new HitokotoQuoteModule()); addLocalModule(new GoodreadsQuoteModule(...
addLocalModule(new CustomQuoteModule());
2
Leviathan-Studio/CraftStudioAPI
src/dev/java/com/leviathanstudio/craftstudio/dev/util/UVMapCreator.java
[ "@SideOnly(Side.CLIENT)\npublic class CSResourceNotRegisteredException extends RuntimeException\n{\n private static final long serialVersionUID = -3495512420502365486L;\n\n /**\n * Create an exception for a resource not registered.\n *\n * @param resourceNameIn\n * The resource that...
import java.awt.Color; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import com.leviathanstudio.craftstudio.client.exception.CSResourceNotRegisteredException; import com.leviathanstudio.craftstudio.client.json.CSReadedMode...
package com.leviathanstudio.craftstudio.dev.util; /** * Object to help generate a UV Map for a model. * * @since 0.3.0 * * @author Timmypote */ @SideOnly(Side.CLIENT) public class UVMapCreator { private CSReadedModel rModel; private BufferedImage bi; private int maxu = 0, maxv = 0; ...
int[][] uvs = CSModelBox.getTextureUVsForRect(block.getTexOffset()[0], block.getTexOffset()[1], block.getSize().x, block.getSize().y,
3
metova/privvy
sample/src/main/java/com/metova/privvy/sample/ui/list/ListActivity.java
[ "public interface PrivvyHost {\n\n void initialize(RouteData... routes);\n\n void replace(RouteData oldComponent, RouteData newComponent);\n\n void goTo(RouteData newComponent);\n}", "public class PrivvyHostDelegate implements PrivvyHost {\n\n private AppCompatActivity hostActivity;\n\n public Priv...
import com.metova.privvy.PrivvyHost; import com.metova.privvy.PrivvyHostDelegate; import com.metova.privvy.RouteData; import com.metova.privvy.sample.R; import com.metova.privvy.sample.SampleApplication; import com.metova.privvy.sample.di.HostComponent; import com.metova.privvy.sample.di.HostModule; import android.os.B...
package com.metova.privvy.sample.ui.list; public class ListActivity extends AppCompatActivity implements PrivvyHost, ListContract.View, ListAdapter.ListClickCallback { @Inject ListComponent listComponent;
PrivvyHostDelegate hostDelegate;
1
Tonius/SimplyJetpacks
src/main/java/tonius/simplyjetpacks/item/ItemJetpackFueller.java
[ "@Mod(modid = SimplyJetpacks.MODID, version = SimplyJetpacks.VERSION, dependencies = SimplyJetpacks.DEPENDENCIES, guiFactory = SimplyJetpacks.GUI_FACTORY)\npublic class SimplyJetpacks {\n \n public static final String MODID = \"simplyjetpacks\";\n public static final String VERSION = \"@VERSION@\";\n pu...
import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDire...
package tonius.simplyjetpacks.item; public class ItemJetpackFueller extends ItemRegistered { public ItemJetpackFueller(String registryName) { super(registryName); this.setUnlocalizedName(SimplyJetpacks.PREFIX + "jetpackFueller"); this.setTextureName(SimplyJetpacks.RESOURCE_P...
FuelType fuelType = pack.fuelType;
2
karthikj1/JRegexPlus
karthik/regex/LookbehindRegexToken.java
[ "public class Matcher {\n\n private final NFASimulator transitions;\n private List<Integer[][]> results;\n private CharSequence search_string;\n private int startPos;\n private int region_end;\n private Map<String, Integer> group_names = new HashMap<>();\n\n Matcher(TransitionTable m) {\n\n ...
import java.util.List; import karthik.regex.Matcher; import karthik.regex.MatcherException; import karthik.regex.ParseObject; import karthik.regex.ParserException; import karthik.regex.Pattern; import karthik.regex.TransitionTable;
/* * Copyright (C) 2014 karthik * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distribute...
public boolean matches(final CharSequence search_string, final int pos) throws MatcherException {
1
pasqualesalza/elephant56
elephant56/src/main/java/it/unisa/elephant56/user/sample/operators/migration/StarRandomIndividualsMigration.java
[ "public class Pair<FirstElementType, SecondElementType> {\r\n\r\n private FirstElementType firstElement;\r\n private SecondElementType secondElement;\r\n\r\n /**\r\n * Constructs an empty pair.\r\n */\r\n public Pair() {\r\n this.firstElement = null;\r\n this.secondElement = null;\...
import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.HashMap; import it.unisa.elephant56.util.common.Pair; import org.apache.hadoop.conf.Configuration; import it.unisa.elephant56.core.common.IndividualWrapper; import it.unisa.elephant56.core.common.Properties; import it.unis...
package it.unisa.elephant56.user.sample.operators.migration; /** * Defines a migration function move the selected individuals to all the islands, one per each. It work only if the * number of the individuals to migrate is a multiple of the number of islands - 1. * * @param <IndividualType> * @param <...
public List<Pair<IndividualWrapper<IndividualType, FitnessValueType>, Integer>> assign(
0
CPPAlien/DaVinci
davinci/src/main/java/cn/hadcn/davinci/http/impl/HttpRequest.java
[ "public abstract class StringRequest extends Request<String> {\n protected static final String PROTOCOL_CHARSET = \"utf-8\";\n\n private final Listener<String> mListener;\n private final String mRequestBody;\n\n\n public StringRequest(int method, String url, String requestBody, Listener<String> listener...
import org.json.JSONObject; import java.util.HashMap; import java.util.Map; import cn.hadcn.davinci.log.VinciLog; import cn.hadcn.davinci.http.base.StringRequest; import cn.hadcn.davinci.http.OnDaVinciRequestListener; import cn.hadcn.davinci.volley.AuthFailureError; import cn.hadcn.davinci.volley.DefaultRetryPolicy; im...
package cn.hadcn.davinci.http.impl; /** * BaseRequest * Created by 90Chris on 2015/1/26. * */ public class HttpRequest { private RequestQueue mRequestQueue; private Map<String, String> mHeadersMap = new HashMap<>(); private String mContentType = null; private String mCharset = "utf-8"; priva...
private OnDaVinciRequestListener mRequestListener = null;
1
jandy-team/jandy
jandy-server/src/main/java/io/jandy/web/ProfileController.java
[ "@Repository\npublic interface ProjectRepository extends JpaRepository<Project, Long>, QueryDslPredicateExecutor<Project>, ProjectRepositoryCustom {\n Project findByGitHubId(long gitHubId);\n\n Project findByAccountAndName(String account, String name);\n\n List<Project> findByAccount(String account);\n}", "@En...
import com.google.common.collect.Iterables; import io.jandy.domain.Project; import io.jandy.domain.ProjectRepository; import io.jandy.domain.User; import io.jandy.exception.UserNotFoundException; import io.jandy.util.api.GitHubApi; import io.jandy.service.UserService; import io.jandy.util.api.json.GHOrg; import io.jand...
package io.jandy.web; /** * @author JCooky * @since 2015-06-30 */ @Controller @RequestMapping("/profile") public class ProfileController { private static final Logger logger = LoggerFactory.getLogger(ProfileController.class); @Autowired private UserService userService; @Autowired private GitHubApi git...
Map<String, List<GHRepo>> repositories = new LinkedHashMap<>();
5
CD4017BE/InductiveLogistics
src/java/cd4017be/indlog/item/ItemNameFilter.java
[ "public class GuiNameFilter extends AdvancedGui {\r\n\r\n\tprivate final InventoryPlayer inv;\r\n\r\n\tpublic GuiNameFilter(DataContainer container) {\r\n\t\tsuper(container);\r\n\t\tthis.inv = container.player.inventory;\r\n\t\tthis.MAIN_TEX = new ResourceLocation(\"indlog\", \"textures/gui/fluid_filter.png\");\r\...
import java.io.IOException; import java.util.List; import cd4017be.indlog.render.gui.GuiNameFilter; import cd4017be.indlog.util.filter.FluidFilterProvider; import cd4017be.indlog.util.filter.ItemFilterProvider; import cd4017be.indlog.util.filter.NameFilter.FluidFilter; import cd4017be.indlog.util.filter.NameFilte...
package cd4017be.indlog.item; /** * @author CD4017BE * */ public class ItemNameFilter extends BaseItem implements IGuiItem, ClientItemPacketReceiver, ItemFilterProvider, FluidFilterProvider { public static int MAX_LENGTH = 20; public ItemNameFilter(String id) { super(id); } @Override ...
FluidFilter filter = getFluidFilter(item);
3
Kroger-Technology/Snow-Globe
src/integration/java/com/kroger/oss/snowGlobe/integration/tests/AppPathTest.java
[ "public class AppServiceCluster {\n\n private final String clusterName;\n private final boolean useHttps;\n private int httpResponseCode = 200;\n private String matchingPaths = \"*\";\n private Map<String, String> responseHeaders = new HashMap<>();\n private int port;\n\n /**\n * The constr...
import com.kroger.oss.snowGlobe.AppServiceCluster; import com.kroger.oss.snowGlobe.NginxRpBuilder; import org.junit.Before; import org.junit.Test; import static com.kroger.oss.snowGlobe.AppServiceCluster.makeHttpsWebService; import static com.kroger.oss.snowGlobe.NginxRpBuilder.runNginxWithUpstreams; import static com....
/* * Snow-Globe * * Copyright 2017 The Kroger Co. * * 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 l...
public AppServiceCluster loginUpstreamApp = makeHttpsWebService("Login_Cluster");
0
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/type/CommonTypeFactory.java
[ "public class ParameterizedTypeImpl implements ParameterizedType {\n\n private final Type rawType;\n private final Type[] actualArguments;\n private final Type ownerType;\n\n public ParameterizedTypeImpl(final Type rawType, final Type... actualArguments) {\n this(rawType, actualArguments, null);\...
import ru.vyarus.java.generics.resolver.context.container.ParameterizedTypeImpl; import ru.vyarus.java.generics.resolver.context.container.WildcardTypeImpl; import ru.vyarus.java.generics.resolver.util.ArrayTypeUtils; import ru.vyarus.java.generics.resolver.util.GenericsResolutionUtils; import ru.vyarus.java.generics.r...
package ru.vyarus.java.generics.resolver.util.type; /** * Calculates common (base) type for provided types (maximum type to which both types could be downcasted). * Assumed to be used through {@link ru.vyarus.java.generics.resolver.util.TypeUtils#getCommonType(Type, Type)}. * Direct usage makes sense only when le...
if (TypeUtils.isCompatible(first, second)) {
6
biboudis/streamalg
src/test/java/algebras/TestAlgebrasPull.java
[ "public interface ExecIterateStreamAlg<E, C> extends ExecStreamAlg<E, C> {\n <T> App<C, T> iterate(final T seed, final UnaryOperator<T> f);\n}", "public class ExecPullFactory extends PullFactory implements ExecStreamAlg<Id.t, Pull.t> {\n\n @Override\n public <T> App<Id.t, Long> count(App<Pull.t, T> app) ...
import org.junit.Before; import org.junit.Test; import streams.algebras.ExecIterateStreamAlg; import streams.factories.ExecPullFactory; import streams.factories.ExecPullWithIterateFactory; import streams.higher.Id; import streams.higher.Pull; import java.util.Iterator; import java.util.stream.IntStream; import java.uti...
package algebras; public class TestAlgebrasPull { public Long[] v, v_small; @Before public void setUp() { v = IntStream.range(0, 15).mapToObj(Long::new).toArray(Long[]::new); v_small = IntStream.range(0, 5).mapToObj(Long::new).toArray(Long[]::new); } @Test public void test...
ExecPullFactory alg = new ExecPullFactory();
1
greipadmin/greip
org.greip/src/org/greip/label/StyledLabel.java
[ "public class Greip {\r\n\r\n\tpublic static final int LINK = 1;\r\n\tpublic static final int DECORATOR = 2;\r\n\tpublic static final int IMAGE = 2;\r\n\r\n\tpublic static final int JUSTIFY = 1 << 28;\r\n}\r", "public final class Util {\r\n\r\n\tprivate static final String ELLIPSES = \"...\"; //$NON-NLS-1$\r\n\r\...
import java.text.ParseException; import java.util.function.Consumer; import org.eclipse.swt.SWT; import org.eclipse.swt.SWTException; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import...
/** * Copyright (c) 2017 by Thomas Lorbeer * * All rights reserved. This program and the accompanying materials are made * available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * **/ package or...
super(parent, style & ~SWT.RIGHT & ~SWT.CENTER & ~Greip.JUSTIFY);
0
peshkira/c3po
c3po-core/src/main/java/com/petpet/c3po/adaptor/rules/InferDateFromFileNameRule.java
[ "public interface PostProcessingRule extends ProcessingRule {\n\n /**\n * This method does some processing over the passed element and returns it. It\n * can do any kind of post processing to the element.\n * \n * @param e\n * the element to process.\n * @return the processed element.\n */\n...
import com.petpet.c3po.api.adaptor.PostProcessingRule; import com.petpet.c3po.api.dao.ReadOnlyCache; import com.petpet.c3po.api.model.Element; import com.petpet.c3po.api.model.Property; import com.petpet.c3po.api.model.helper.MetadataRecord;
/******************************************************************************* * Copyright 2013 Petar Petrov <me@petarpetrov.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
public Element process( Element e ) {
2
ddcap/halvade
halvade/src/be/ugent/intec/halvade/tools/PreprocessingTools.java
[ "public class ChromosomeRange {\n protected class Range {\n protected String sequenceName;\n protected int alignmentStart;\n protected int alignmentEnd;\n\n protected Range(String sequenceName, int alignmentStart, int alignmentEnd) {\n this.sequenceName = sequenceName;\n ...
import be.ugent.intec.halvade.hadoop.mapreduce.HalvadeCounters; import be.ugent.intec.halvade.utils.ChromosomeRange; import be.ugent.intec.halvade.utils.CommandGenerator; import be.ugent.intec.halvade.utils.Logger; import be.ugent.intec.halvade.utils.HalvadeConf; import be.ugent.intec.halvade.utils.HalvadeFileUtils; im...
/* * Copyright (C) 2014 ddecap * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed...
public String filterDBSnps(String dict, String dbsnps, ChromosomeRange r, String prefix, int threads) throws IOException, InterruptedException {
0
Comcast/flume2storm
kryonet-flume2storm/src/main/java/com/comcast/viper/flume2storm/connection/receptor/KryoNetEventReceptorFactory.java
[ "@SuppressWarnings(\"javadoc\")\npublic class F2SConfigurationException extends Exception {\n private static final long serialVersionUID = 4941423443352427505L;\n\n /**\n * @param config\n * The configuration that contains the invalid parameter\n * @param parameter\n * The name of the co...
import org.apache.commons.configuration.Configuration; import com.comcast.viper.flume2storm.F2SConfigurationException; import com.comcast.viper.flume2storm.connection.KryoNetParameters; import com.comcast.viper.flume2storm.connection.parameters.KryoNetConnectionParameters; import com.comcast.viper.flume2storm.connectio...
/** * Copyright 2014 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
public EventReceptor<KryoNetConnectionParameters> create(KryoNetConnectionParameters connectionParams,
3
msteiger/trackviewer
trackviewer/src/main/java/main/MainFrame.java
[ "public class StatusBar extends JPanel {\n\n private static final long serialVersionUID = 706957128534249767L;\n private JLabel statusLabel;\n private JLabel extraLabel;\n\n /**\n * Default constructor\n */\n public StatusBar() {\n setPreferredSize(new Dimension(16, 16));\n setL...
import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.io.File; import java.io.IOException; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import java.util.concurrent.C...
package main; /** * A simple sample application that shows a OSM map of Europe * * @author Martin Steiger */ public class MainFrame extends JFrame { private static final long serialVersionUID = -9215006987029836062L; private MapViewer viewer; private JTable table; private StatusBar statusBar; ...
FormatRenderer timeRenderer = new FormatRenderer(new TimeFormat());
5
twothe/DaVincing
src/main/java/two/davincing/item/CanvasItem.java
[ "@Mod(modid = DaVincing.MOD_ID, name = DaVincing.MOD_NAME, version = DaVincing.MOD_VERSION)\npublic class DaVincing {\n\n /* Global logger that uses string format type logging */\n public static final Logger log = LogManager.getLogger(DaVincing.class.getSimpleName(), new StringFormatterMessageFactory());\n /* Ta...
import java.awt.image.BufferedImage; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import two.davincing.DaVincin...
package two.davincing.item; public class CanvasItem extends ItemBase { public CanvasItem() { super(); this.setFull3D(); this.setUnlocalizedName("canvas"); this.setTextureName("minepainter:canvas"); } @Override public boolean getShareTag() { return true; } @Override public boolean ...
DaVincing.log.warn("[CanvasItem.onItemUse] failed: expected PaintingEntity at %d, %d, %d, but got %s", x, y, z, Utils.getClassName(tileEntity));
0
drxaos/jvmvm
src/main/java/com/github/drxaos/jvmvm/vm/insn/TypeInsn.java
[ "public class SilentObjectCreator {\n public static <T> T create(Class<T> clazz) throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {\n return create(clazz, Object.class);\n }\n\n public static <T> T create(Class<T> clazz, Class<? super T> parent)...
import com.github.drxaos.jvmvm.vm.ref.FieldRef; import com.github.drxaos.jvmvm.vm.VirtualMachine; import com.github.drxaos.jvmvm.vm.ref.ClassRef; import java.io.Serializable; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; import sta...
/** * Copyright (c) 2005 Nuno Cruces * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditi...
Frame frame = vm.getFrame();
1
xyxyLiu/PluginM
PluginManager/src/main/java/com/reginald/pluginm/core/HostContext.java
[ "public class ActivityThreadCompat {\n private static final String TAG = \"ActivityThreadCompat\";\n private static final boolean DEBUG = true;\n\n private static Class<?> sClass_ActivityThread;\n private static Method sMtd_currentActivityThread;\n private static Method sMtd_getProcessName;\n priv...
import java.lang.reflect.Field; import java.util.List; import com.android.common.ActivityThreadCompat; import com.reginald.pluginm.PluginInfo; import com.reginald.pluginm.reflect.FieldUtils; import com.reginald.pluginm.reflect.MethodUtils; import com.reginald.pluginm.utils.Logger; import android.app.Application; import...
package com.reginald.pluginm.core; /** * Created by lxy on 18-6-26. * <p> * 替换ActivityThread中的mInitialApplication的 base context。 * 这个替换不是必须的,主要目的为hook系统通过ActivityThread获取到Context来进行插件资源获取,如: * 1. RemoteViews的创建过程 * 2. Webview中加载插件中的assets资源。 * 。。。。 * */ public class HostContext extends ContextWrapper { ...
Object target = ActivityThreadCompat.currentActivityThread();
0
real-logic/benchmarks
benchmarks-aeron/src/test/java/uk/co/real_logic/benchmarks/aeron/remote/ClusterTest.java
[ "public final class Configuration\n{\n /**\n * Default number of the warmup iterations.\n */\n public static final int DEFAULT_WARMUP_ITERATIONS = 10;\n\n /**\n * Default number of the messages to be sent duirng the warmup iterations.\n */\n public static final int DEFAULT_WARMUP_MESSAGE...
import io.aeron.archive.Archive; import io.aeron.archive.client.AeronArchive; import io.aeron.cluster.ConsensusModule; import io.aeron.cluster.client.AeronCluster; import io.aeron.cluster.service.ClusteredServiceContainer; import org.agrona.concurrent.NoOpLock; import org.junit.jupiter.api.AfterEach; import org.junit.j...
/* * Copyright 2015-2022 Real Logic Limited. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
try (ArchivingMediaDriver driver = launchArchivingMediaDriver();
4
Netflix/metacat
metacat-connector-polaris/src/test/java/com/netflix/metacat/connector/polaris/store/PolarisStoreConnectorTest.java
[ "@Configuration\n@EntityScan(\"com.netflix.metacat.connector.polaris.store.entities\")\n@EnableJpaRepositories(\"com.netflix.metacat.connector.polaris.store.repos\")\n@EnableTransactionManagement(proxyTargetClass = true)\n@ImportAutoConfiguration({DataSourceAutoConfiguration.class,\n DataSourceTransactionMan...
import com.netflix.metacat.connector.polaris.configs.PolarisPersistenceConfig; import com.netflix.metacat.connector.polaris.store.entities.PolarisDatabaseEntity; import com.netflix.metacat.connector.polaris.store.entities.PolarisTableEntity; import com.netflix.metacat.connector.polaris.store.repos.PolarisDatabaseReposi...
package com.netflix.metacat.connector.polaris.store; /** * Test persistence operations on Database objects. */ @ExtendWith(SpringExtension.class) @SpringBootTest(classes = {PolarisPersistenceConfig.class}) @ActiveProfiles(profiles = {"polaristest"}) @AutoConfigureDataJpa public class PolarisStoreConnectorTest { ...
private PolarisTableRepository tblRepo;
4
AstartesGuardian/WebDAV-Server
WebDAV-Server/src/webdav/server/virtual/entity/standard/RsDead.java
[ "public class FileSystemPath\r\n{\r\n public FileSystemPath(String fileName, FileSystemPath parent)\r\n {\r\n this.fileName = fileName;\r\n this.parent = parent;\r\n this.fileSystemPathManager = parent.fileSystemPathManager;\r\n }\r\n public FileSystemPath(String fileName, FileSyste...
import http.FileSystemPath; import http.server.exceptions.DeadResourceException; import http.server.exceptions.UserRequiredException; import http.server.message.HTTPEnvRequest; import java.time.Instant; import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.Map; impor...
package webdav.server.virtual.entity.standard; public class RsDead implements IResource { private RsDead() { } private static RsDead deadResource = null; public static RsDead getInstance() { if(deadResource == null) deadResource = new RsDead(); return ...
public boolean isVisible(HTTPEnvRequest env) throws UserRequiredException
2
Akshansh986/Webkiosk
Webkiosk/src/main/java/com/blackMonster/webkiosk/ui/Dialog/ModifyTimetableDialog.java
[ "public class MainPrefs {\n public static final String PREFS_NAME = \"MyPrefsFile\";\n\n public static final String ENROLL_NO = \"enroll\";\n public static final String PASSWORD = \"pass\";\n public static final String DOB = \"dob\";\n public static final String BATCH = \"batch\";\n public static ...
import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.support.v4.content.LocalBroadca...
package com.blackMonster.webkiosk.ui.Dialog; public class ModifyTimetableDialog extends DialogFragment { private static final String TAG = "ModifyTimetableDialog"; public static final String ARG_CURRENT_TIME = "ctime"; public static final String ARG_CURRENT_VENUE = "cvenue"; public static final ...
MainPrefs.setTimetableModified(getActivity());
0
mindwind/craft-armor
src/test/java/io/craft/armor/TestArmor.java
[ "public class ArmorDegradeException extends RuntimeException {\n\n\t\n\tprivate static final long serialVersionUID = -3156599947974023180L;\n\n\tpublic ArmorDegradeException() {}\n\n\tpublic ArmorDegradeException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}\n\n\tpublic ArmorDegradeException(S...
import io.craft.armor.api.ArmorDegradeException; import io.craft.armor.api.ArmorFactory; import io.craft.armor.api.ArmorService; import io.craft.armor.api.ArmorTimeoutException; import io.craft.armor.spi.ArmorInvocation; import io.craft.armor.spi.ArmorListener; import io.craft.atom.test.CaseCounter; import java.lang.re...
package io.craft.armor; /** * @author mindwind * @version 1.0, Dec 18, 2014 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:spring.xml") public class TestArmor extends AbstractJUnit4SpringContextTests { @Autowired private DemoService demoService ; ...
armorService = ArmorFactory.armorService();
1
echocat/gradle-golang-plugin
src/main/java/org/echocat/gradle/plugins/golang/tasks/BaseGetTools.java
[ "public enum GetResult {\n downloaded,\n alreadyExists\n}", "public enum Type {\n explicit,\n implicit,\n source,\n system\n}", "@Nonnull\npublic static GetTask by(@Nonnull String configuration) {\n return new GetTask(configuration);\n}", "@Nonnull\npublic static Platform currentPlatform(...
import org.echocat.gradle.plugins.golang.DependencyHandler.GetResult; import org.echocat.gradle.plugins.golang.model.*; import org.echocat.gradle.plugins.golang.model.GolangDependency.Type; import org.gradle.internal.logging.progress.ProgressLogger; import javax.annotation.Nonnull; import java.nio.file.Path; import jav...
package org.echocat.gradle.plugins.golang.tasks; public class BaseGetTools extends GolangTaskSupport { public BaseGetTools() { setGroup("tools"); setDescription("Download and build required tools for base artifacts."); dependsOn( "validate", "prepareToolchain" ...
final Platform platform = currentPlatform();
3
DaanVanYperen/odb-dynasty
core/src/net/mostlyoriginal/game/manager/EntitySetupSystem.java
[ "public class DynastyEntityBuilder {\n\n // Start duplication\n\n private final World world;\n private final EntityEdit edit;\n\n /**\n * Begin building new entity.\n */\n public DynastyEntityBuilder(World world) {\n this.world = world;\n edit = world.createEntity().edit();\n ...
import com.artemis.Entity; import com.artemis.annotations.Wire; import com.artemis.managers.TagManager; import com.artemis.utils.EntityBuilder; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.maps.MapProperties; import net.mostlyoriginal.api.component.basic.Bounds; import net.mostlyoriginal.api.component.basic.Pos...
package net.mostlyoriginal.game.manager; /** * Game specific entity factory. * * @author Daan van Yperen * @todo transform this into a manager. */ @Wire public class EntitySetupSystem extends AbstractEntityFactorySystem { public static final int MOUSE_CURSOR_LAYER = 9999; private TagManager tagManager; ...
new Button(animPrefix, listener, hint),
4
titorenko/quick-csv-streamer
src/main/java/uk/elementarysoftware/quickcsv/decoder/ParserFactory.java
[ "public interface DoubleParser {\r\n public double parse(byte[] in, int startIndex, int length);\r\n\r\n default public double parse(String s) {\r\n return parse(s.getBytes(), 0, s.length());\r\n };\r\n}\r", "public class JDKDoubleParserAdapter implements DoubleParser {\r\n\r\n public double pa...
import uk.elementarysoftware.quickcsv.decoder.doubles.DoubleParser; import uk.elementarysoftware.quickcsv.decoder.doubles.JDKDoubleParserAdapter; import uk.elementarysoftware.quickcsv.decoder.doubles.QuickDoubleParser; import uk.elementarysoftware.quickcsv.decoder.ints.IntParser; import uk.elementarysoftware.quickc...
package uk.elementarysoftware.quickcsv.decoder; class ParserFactory { private final boolean useQuickParsers; ParserFactory() { this.useQuickParsers = "true".equals(System.getProperty("uk.elementarysoftware.useQuickParsers", "true")); } public DoubleParser getDoubleParser(...
return new QuickLongParser();
6
RetroShare/AndroidClient
RetroShareAndroidIntegration/src/org/retroshare/android/RsSearchService.java
[ "public final class Core {\n private Core() {}\n public static void registerAllExtensions(\n com.google.protobuf.ExtensionRegistry registry) {\n }\n public enum ExtensionId\n implements com.google.protobuf.ProtocolMessageEnum {\n CORE(0, 0),\n ;\n \n public static final int CORE_VALUE = 0;...
import rsctrl.search.Search.RequestSearchResults; import rsctrl.search.Search.ResponseSearchIds; import rsctrl.search.Search.ResponseSearchResults; import rsctrl.search.Search.SearchHit; import rsctrl.search.Search.SearchSet; import android.annotation.SuppressLint; import org.retroshare.android.RsCtrlService.RsMessage;...
/** * @license * * Copyright (c) 2013 Gioacchino Mazzurco <gio@eigenlab.org>. * * 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...
msg.body = RequestBasicSearch.newBuilder().addTerms(term).build().toByteArray();
2
Belgabor/AMTweaker
src/main/java/mods/belgabor/amtweaker/mods/ss2/handlers/Sandpit.java
[ "public class SS2 {\n public static final String MODID = \"SextiarySector\";\n public static boolean available = false;\n \n public static boolean configIEHeatFurnaces = true;\n public static boolean configIEHeatSmokers = false;\n \n public SS2() {\n MineTweakerAPI.registerClass(Extracto...
import minetweaker.IUndoableAction; import minetweaker.MineTweakerAPI; import minetweaker.api.item.IIngredient; import minetweaker.api.item.IItemStack; import mods.belgabor.amtweaker.mods.ss2.SS2; import mods.belgabor.amtweaker.mods.ss2.util.SS2AccessHelper; import mods.belgabor.amtweaker.util.CommandLoggerBase; import...
package mods.belgabor.amtweaker.mods.ss2.handlers; @ZenClass("mods.ss2.Sandpit") public class Sandpit { @ZenMethod public static void add(IItemStack item, int weight) { doAdd(item, weight, 0, false); } @ZenMethod public static void add(IItemStack item, int weight, float damage) { ...
SS2AccessHelper.shellList.remove(entry);
1
JAVACAFE-STUDY/logjdbc
src/main/java/net/chandol/logjdbc/config/LogJdbcConfig.java
[ "public interface ResultSetPrinter {\n void printResultSet(LogContext context);\n}", "public class ResultSetTablePrinter implements ResultSetPrinter {\n private static ResultSetTablePrinter instance;\n\n public static ResultSetTablePrinter getInstance() {\n if (instance == null)\n insta...
import net.chandol.logjdbc.logging.printer.resultset.ResultSetPrinter; import net.chandol.logjdbc.logging.printer.resultset.ResultSetTablePrinter; import net.chandol.logjdbc.logging.printer.sql.DefaultSqlPrinter; import net.chandol.logjdbc.logging.printer.sql.SqlPrinter; import net.chandol.logjdbc.logging.printer.sql.f...
package net.chandol.logjdbc.config; /** * LogJdbc 설정 */ public class LogJdbcConfig { private DatabaseType type; private ParameterConverter converter; private SqlFormatter formatter; private SqlPrinter sqlPrinter;
private ResultSetPrinter resultSetPrinter;
0
cm-heclouds/JAVA-HTTP-SDK
javaSDK/src/main/java/cmcc/iot/onenet/javasdk/api/device/FindKeyRelDeviceListApi.java
[ "public abstract class AbstractAPI<T> {\n public String key;\n public String url;\n public Method method;\n public ObjectMapper mapper = initObjectMapper();\n\n private ObjectMapper initObjectMapper() {\n ObjectMapper objectMapper = new ObjectMapper();\n //关闭字段不识别报错\n objectMappe...
import cmcc.iot.onenet.javasdk.api.AbstractAPI; import cmcc.iot.onenet.javasdk.exception.OnenetApiException; import cmcc.iot.onenet.javasdk.http.HttpGetMethod; import cmcc.iot.onenet.javasdk.request.RequestInfo; import cmcc.iot.onenet.javasdk.response.BasicResponse; import cmcc.iot.onenet.javasdk.response.device.KeyRel...
package cmcc.iot.onenet.javasdk.api.device; /** * * @Description api-key关联/未关联的设备分页列表查询 * @author luowz * @date 2019/1/2 19:12 * @version 1.0 * **/ public class FindKeyRelDeviceListApi extends AbstractAPI{ private final Logger logger = LoggerFactory.getLogger(this.getClass()); private Integer page; ...
throw new OnenetApiException(e.getMessage());
1
Netflix/Nicobar
nicobar-core/src/main/java/com/netflix/nicobar/core/persistence/PathArchiveRepository.java
[ "public class GsonScriptModuleSpecSerializer implements ScriptModuleSpecSerializer {\n /** Default file name of the optional {@link ScriptModuleSpec} in the archive */\n public final static String DEFAULT_MODULE_SPEC_FILE_NAME = \"moduleSpec.json\";\n private static Gson SERIALIZER = new GsonBuilder()\n ...
import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.attribute.FileTime; import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.LinkedHashSet; ...
/* * * Copyright 2013 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
ScriptModuleSpec moduleSpec = jarScriptArchive.getModuleSpec();
3
tdomzal/junit-docker-rule
src/main/java/pl/domzal/junit/docker/rule/DockerRule.java
[ "public class ImagePullException extends IllegalStateException {\n\n public ImagePullException(String message, Throwable cause) {\n super(message, cause);\n }\n\n}", "public class PortNotExposedException extends IllegalStateException {\n\n public PortNotExposedException(String port) {\n sup...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.TimeoutException; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.junit.Rule; import org.junit.rules.ExternalResource; import org.slf4j.Log...
package pl.domzal.junit.docker.rule; /** * Simple docker container junit {@link Rule}.<br/> * Instances should be created via builder: * <pre> * &#064;Rule * DockerRule container = DockerRule.builder() * . //configuration directives * .build(); * </pre> * <br/> * Inspired by and loosely based...
List<StartConditionCheck> conditions = Lists.newArrayList();
6
tiefaces/TieFaces
tests/org/tiefaces/components/websheet/TieWebSheetBeanTest.java
[ "public final class TieConstants {\r\n\r\n\t/** The Constant COMPONENT_ID. */\r\n\tpublic static final String COMPONENT_ID = \"websheettable\";\r\n\r\n\t/** The Constant CONFIGURATION_SHEET. */\r\n\tpublic static final String CONFIGURATION_SHEET = \"Configuration\";\r\n\r\n\t/** The Constant ATTRS_WEBSHEETBEAN. */\...
import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.poi.ss.usermodel.Comment; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.junit.Before; import org.junit.BeforeClass...
/** * */ package org.tiefaces.components.websheet; /** * @author Jason Jiang * */ public class TieWebSheetBeanTest { /** * @throws Exception * java.lang.Exception. */ @BeforeClass public static void setUpBeforeClass() throws Exception { } /** * @throws Excepti...
assertEquals("$0=employee.name,$1=employee.birthDate,$2=employee.sex,$3=employee.worktime,$4=employee.payment,$5=employee.bonus,$6=employee.total,",SaveAttrsUtility.getSaveAttrListFromRow(sheet.getRow(7)));
5
chenjishi/usite
u148/app/src/main/java/com/chenjishi/u148/article/DetailsActivity.java
[ "public class BaseActivity extends AppCompatActivity {\n protected boolean mHideTitle;\n protected int mTitleResId = -1;\n\n protected LayoutInflater mInflater;\n protected FrameLayout mRootView;\n\n protected int mTheme;\n\n @Override\n protected void onCreate(@Nullable Bundle savedInstanceSta...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.util.SparseArray; import android.view.View; import android.webkit.JsResult; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.I...
package com.chenjishi.u148.article; /** * Created by jishichen on 2017/4/14. */ public class DetailsActivity extends BaseActivity implements Listener<String>, ErrorListener, JSCallback, View.OnClickListener { private static final int TAG_SHARE = 233; private static final int TAG_FAVORITE = 234; ...
UserInfo user = Config.getUser(this);
4
wangchongjie/multi-engine
src/test/java/com/baidu/unbiz/multiengine/transport/DistributedTaskTest.java
[ "public class HostConf {\n\n private String host = System.getProperty(\"host\", \"127.0.0.1\");\n private int port = Integer.parseInt(System.getProperty(\"port\", \"8007\"));\n private boolean ssl = System.getProperty(\"ssl\") != null;\n\n public HostConf() {\n try {\n InetAddress addr...
import java.util.List; import java.util.concurrent.CountDownLatch; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.util.Assert; import com.baidu.unbiz....
package com.baidu.unbiz.multiengine.transport; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/applicationContext-test.xml") public class DistributedTaskTest { @Test public void testRunDisTask() { HostConf hostConf = new HostConf(); TaskServer taskServer = TaskS...
TaskClient taskClient = TaskClientFactory.createTaskClient(hostConf);
3
nutritionfactsorg/daily-dozen-android
app/src/main/java/org/nutritionfacts/dailydozen/activity/ServingsHistoryActivity.java
[ "public class Common {\n public static final String FILE_PROVIDER_AUTHORITY = \"org.nutritionfacts.dailydozen.fileprovider\";\n public static final String PREFERENCES_FILE = \"org.nutritionfacts.dailydozen.preferences\";\n\n public static final int MAX_SERVINGS = 24;\n public static final int MAX_TWEAKS...
import android.app.ProgressDialog; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import androidx.appcompat.app.AppCompatActivity; import com.github.mikephil.charting.charts.CombinedChart; import com.github.mikephil.charting.data.CombinedData; import com.github.mikephil.charting....
package org.nutritionfacts.dailydozen.activity; public class ServingsHistoryActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener, OnChartValueSelectedListener, ProgressListener { private ActivityServingsHistoryBinding binding; private ProgressDialog progressDialog; ...
new TaskRunner().executeAsync(new LoadHistoryTask(this, this, loadHistoryTaskParams));
7
esmasui/deb-kitkat-storage-access-framework
KitKatStorageProject/LiveSDK-for-Android/sample/src/com/microsoft/live/sample/skydrive/SkyDriveActivity.java
[ "public class LiveConnectClient {\n\n /** Gets the ContentLength when a request finishes and sets it in the given operation. */\n private static class ContentLengthObserver implements ApiRequest.Observer {\n private final LiveDownloadOperation operation;\n\n public ContentLengthObserver(LiveDown...
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.Stack; import org.json.JSONArray; import org.json.JSONObject; import android.app.AlertDialog; import android.app.Dialog; import android.app.ListActivity; import android.app.Progr...
//------------------------------------------------------------------------------ // Copyright (c) 2012 Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ package com.microsoft.live.sample.skydrive; public class SkyDriveActivity extends List...
folder.put(JsonKeys.NAME, name.getText().toString());
5
jplu/stanfordNLPRESTAPI
src/test/java/fr/eurecom/stanfordnlprestapi/datatypes/SentenceImplTest.java
[ "public enum NlpProcess {\n NER,\n POS,\n TOKENIZE,\n COREF,\n DATE,\n NUMBER,\n GAZETTEER\n}", "public interface Sentence {\n void addToken(final Token newToken);\n\n void addEntity(final Entity newEntity);\n \n void addCoref(final Coref newCoref);\n\n void nextSentence(final Sentence newNextSentence...
import org.apache.jena.vocabulary.RDF; import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import fr.eurecom.stanfordnlprestapi.enums.NlpProcess; import fr.eurecom.stanfordnlprestapi.interfaces.Sentence; import fr.eurecom.stanfordnlprestapi.interfaces.Token; import f...
/** * StanfordNLPRESTAPI - Offering a REST API over Stanford CoreNLP to get results in NIF format. * Copyright © 2017 Julien Plu (julien.plu@redaction-developpez.com) * * 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 * t...
final Sentence sentence = new SentenceImpl("My favorite actress is: Natalie Portman.", context,
1
fuinorg/ddd-4-java
src/test/java/org/fuin/ddd4j/ddd/MethodExecutorTest.java
[ "public class AId implements ImplRootId {\r\n\r\n private static final long serialVersionUID = 1L;\r\n\r\n public static final EntityType TYPE = new StringBasedEntityType(\"A\");\r\n\r\n private final long id;\r\n\r\n public AId(final long id) {\r\n this.id = id;\r\n }\r\n\r\n @Override\r\n...
import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Method; import java.util.List; import org.fuin.ddd4j.test.AId; import org.fuin.ddd4j.test.ARoot; import org.fuin.ddd4j.test.BAddedEvent; import org.fuin.ddd4j.test.BId; import org.fuin.ddd4j.test.BaseRoot; import org.fuin.ddd4j.test.DEve...
/** * Copyright (C) 2015 Michael Schnell. All rights reserved. * http://www.fuin.org/ * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your...
final BId bid = new BId(2);
3
ls1110924/ImmerseMode
immerse/src/main/java/com/yunxian/immerse/impl/TlSbNNbwFCwARImmerseMode.java
[ "public final class ImmerseConfiguration {\n\n final ImmerseType mImmerseTypeInKK;\n final ImmerseType mImmerseTypeInL;\n\n public final boolean lightStatusBar;\n public final boolean coverCompatMask;\n public final int coverMaskColor;\n\n private ImmerseConfiguration(@NonNull ImmerseType immerseT...
import android.annotation.TargetApi; import android.app.Activity; import android.graphics.Color; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.os.Build; import android.view.View; import android.view.ViewGroup; import android.view.Window; import androidx.annotation.ColorInt; imp...
package com.yunxian.immerse.impl; /** * 半透明状态栏+普通导航栏+内容全屏+AdjustResize的EditText模式 * * @author AShuai * @email ls1110924@gmail.com * @date 17/2/3 下午5:14 */ @TargetApi(KITKAT) public class TlSbNNbwFCwARImmerseMode extends AbsImmerseMode { private final ConsumeInsetsFrameLayout mNewUserViewGroup; // 兼容...
WindowUtils.clearWindowFlags(window, FLAG_TRANSLUCENT_NAVIGATION);
3
superzanti/ServerSync
src/main/java/com/superzanti/serversync/communication/Requests.java
[ "public class ActionEntry {\n public final FileEntry target;\n public EActionType action;\n public String reason;\n\n public ActionEntry(FileEntry target, EActionType action, String reason) {\n this.target = target;\n this.action = action;\n this.reason = reason;\n }\n\n publi...
import com.superzanti.serversync.client.ActionEntry; import com.superzanti.serversync.client.ActionProgress; import com.superzanti.serversync.client.Server; import com.superzanti.serversync.communication.response.ServerInfo; import com.superzanti.serversync.files.FileManifest; import com.superzanti.serversync.util.Logg...
package com.superzanti.serversync.communication; public class Requests { private final Server server; private final ServerInfo info; private final ObjectInputStream input; private final ObjectOutputStream output; private Requests(Server server) { this.server = server; this.info =...
Logger.debug("Requesting file manifest");
5
CS-Worcester/TaskButler
src/edu/worcester/cs499summer2012/activity/EditTaskActivity.java
[ "public class TaskAlarm {\r\n\r\n\tpublic static final String ALARM_EXTRA =\"edu.worcester.cs499summer2012.TaskAlarm\";\r\n\tpublic static final int REPEATING_ALARM = 1;\r\n\tpublic static final int PROCRASTINATOR_ALARM =2;\r\n\r\n\t/**\r\n\t * Cancel alarm using the task id, PendingIntent is created using the Task...
import android.content.Intent; import android.os.Bundle; import edu.worcester.cs499summer2012.R; import edu.worcester.cs499summer2012.service.TaskAlarm; import edu.worcester.cs499summer2012.service.TaskButlerWidgetProvider; import edu.worcester.cs499summer2012.task.Category; import edu.worcester.cs499summer2012.task.Ta...
/* * EditTaskActivity.java * * Copyright 2012 Jonathan Hasenzahl, James Celona, Dhimitraq Jorgji * * 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 ...
TaskAlarm alarm = new TaskAlarm();
0
iloveeclipse/filesync4eclipse
FileSync-test/src/test/TestBuilder.java
[ "public class FileSyncPlugin extends AbstractUIPlugin {\r\n\r\n private static FileSyncPlugin plugin;\r\n\r\n public static final String PLUGIN_ID = \"de.loskutov.FileSync\";\r\n\r\n /**\r\n * The constructor.\r\n */\r\n public FileSyncPlugin() {\r\n super();\r\n if(plugin != null)...
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import junit.framework.TestCase...
package test; public class TestBuilder extends TestCase { private static final String PREFIX_EXCL_FROM_SYNC = "resources"; private static final String SUFFIX_ORIG_FILE = "_orig.txt"; protected List<IProject> destProjects; protected String[] destPaths; protected String defDestination; pr...
protected FileSyncBuilder createBuilder(IProject srcProject) throws Exception {
2
lucmoreau/OpenProvenanceModel
tupelo/src/main/java/org/openprovenance/rdf/OPMXml2Rdf.java
[ "public interface Edge extends Annotable, HasAccounts {\n Ref getCause();\n Ref getEffect();\n} ", "public interface Node extends Annotable, HasAccounts {\n} ", "public interface Ref {\n public Object getRef();\n} ", "public interface Identifiable {\n public void setId(String s);\n public Strin...
import javax.xml.bind.JAXBException; import javax.xml.bind.JAXBElement; import java.io.ByteArrayOutputStream; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStream; import java.util.List; import java.util.LinkedList; import jav...
break; } } if (!(thisRole.getAnnotation().isEmpty())) { RdfProvenanceRole rdfRole=(RdfProvenanceRole) role; Resource roleSubject=rdfRole.getSubject(); mc.addTriples(triplifyAnnotation...
String id=(((Identifiable)annotation.getLocalSubject()).getId());
3
CaMnter/EasyGank
app/src/main/java/com/camnter/easygank/views/PictureActivity.java
[ "public class EasyApplication extends Application {\n private static EasyApplication ourInstance = new EasyApplication();\n public boolean log = true;\n public Gson gson;\n\n public static final long ONE_KB = 1024L;\n public static final long ONE_MB = ONE_KB * 1024L;\n public static final long CAC...
import android.app.Activity; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityOptionsCompat; import android.support.v4.view.V...
/* * {EasyGank} Copyright (C) {2015} {CaMnter} * * This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. * This is free software, and you are welcome to redistribute it * under certain conditions; type `show c' for details. * * The hypothetical commands `show w' and `show c' should show th...
private PicturePresenter presenter;
2
hschott/Camdroid
app/src/main/java/org/hschott/camdroid/FrameProcessors.java
[ "public interface FrameDrawer {\n\tpublic void drawBitmap(Bitmap bitmap);\n\n\tpublic DisplayMetrics getDisplayMetrics();\n}", "public class AdaptiveThresholdProcessor extends AbstractOpenCVFrameProcessor {\n\n private static int reduction = 0;\n private static int blocksize = 15;\n\n public static class...
import org.hschott.camdroid.OnCameraPreviewListener.FrameDrawer; import org.hschott.camdroid.processor.AdaptiveThresholdProcessor; import org.hschott.camdroid.processor.CannyEdgesProcessor; import org.hschott.camdroid.processor.CascadeClassifierProcessor; import org.hschott.camdroid.processor.NormalizeGrayProcessor; im...
package org.hschott.camdroid; public enum FrameProcessors { ColorSpace, NormalizeGray, AdaptiveThreshold, CannyEdges, UnsharpenMask, MovementDetection, CascadeClassifier, OCR; public FrameProcessor newFrameProcessor(FrameDrawer drawer) { switch (this.ordinal()) { case 0: r...
return new UnsharpenMaskProcessor(drawer);
8
sing-group/bicycle
src/main/java/es/cnio/bioinfo/bicycle/operations/MethylationAnalysis.java
[ "public enum ErrorRateMode {\n\tFIXED, from_barcodes, from_control_genome;\n}", "public class MethylationCall {\n\tprivate Context context;\n\tprivate double pval;\n\tprivate int depth;\n\tprivate int CTdepth;\n\tprivate String pileup;\n\tprivate int cytosines;\n\tprivate String contig;\n\tprivate long position;\...
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.security.Permission; import java.util.Arrays; im...
/* Copyright 2012 Daniel Gonzalez Pe��a, Osvaldo Gra��a This file is part of the bicycle Project. bicycle Project is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation, either version 3 of the License, or (at your op...
public File getMethylationFile(Strand strand, Reference reference,
8
rubenlagus/Tsupport
TMessagesProj/src/main/java/org/telegram/ui/Cells/ProfileSearchCell.java
[ "public class AndroidUtilities {\n\n private static final Hashtable<String, Typeface> typefaceCache = new Hashtable<>();\n private static int prevOrientation = -10;\n private static boolean waitingForSms = false;\n private static final Object smsLock = new Object();\n\n public static int statusBarHei...
import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.drawable.Drawable; import android.text.Layout; import android.text.StaticLayout; import android.text.TextPaint; import android.tex...
lastAvatar = null; } } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), AndroidUtilities.dp(72)); } @Override protected void onLayout(boolean changed, int left, int top, int...
if (user != null && (user.id == UserConfig.getClientUserId() || user.status != null && user.status.expires > ConnectionsManager.getInstance().getCurrentTime())) {
6
gamblore/AndroidPunk
sample/AndroidPunkTest/src/com/gamblore/androidpunk/entities/StaticDanger.java
[ "public class Entity extends Tweener {\n\n\tprivate static final String TAG = \"Entity\";\n\t\n /**\n * If the Entity should render.\n */\n public boolean visible = true;\n\n /**\n * If the Entity should respond to collision checks.\n */\n public boolean collidable = true;\n\n /**\n ...
import java.util.Vector; import net.androidpunk.Entity; import net.androidpunk.FP; import net.androidpunk.Graphic; import net.androidpunk.graphics.atlas.AtlasGraphic; import net.androidpunk.graphics.atlas.GraphicList; import net.androidpunk.masks.Hitbox; import net.androidpunk.utils.TaskTimer; import com.gamblo...
package com.gamblore.androidpunk.entities; public class StaticDanger extends Entity { private int mAngle; private TaskTimer mTimer; public StaticDanger(int x, int y, int width, int height) { this(x, y, width, height, 0, 0, 0); } public StaticDanger(int x, int y, int width, int height, int...
setMask(new Hitbox(width, height));
5
RoboTricker/Transport-Pipes
src/main/java/de/robotricker/transportpipes/items/ItemService.java
[ "public class TransportPipes extends JavaPlugin {\n\n private Injector injector;\n\n private SentryService sentry;\n private ThreadService thread;\n private DiskService diskService;\n\n @Override\n public void onEnable() {\n\n if (Bukkit.getVersion().contains(\"1.13\")) {\n Legac...
import com.comphenix.protocol.wrappers.WrappedGameProfile; import com.comphenix.protocol.wrappers.WrappedSignedProperty; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.co...
package de.robotricker.transportpipes.items; public class ItemService { private ItemStack wrench; private YamlConfiguration tempConf; @Inject public ItemService(GeneralConf generalConf) { Material wrenchMaterial = Material.getMaterial(generalConf.getWrenchItem().toUpperCase(Locale.ENGLIS...
wrench = changeDisplayNameAndLoreConfig(wrench, LangConf.Key.WRENCH.getLines());
2
SilentChaos512/ScalingHealth
src/main/java/net/silentchaos512/scalinghealth/item/HeartCrystal.java
[ "@Mod(ScalingHealth.MOD_ID)\npublic class ScalingHealth {\n public static final String MOD_ID = \"scalinghealth\";\n public static final String MOD_NAME = \"Scaling Health\";\n public static final String VERSION = \"2.5.3\";\n\n public static final Random random = new Random();\n\n public static fina...
import net.minecraft.entity.player.PlayerEntity; import net.silentchaos512.lib.util.EntityHelper; import net.silentchaos512.scalinghealth.ScalingHealth; import net.silentchaos512.scalinghealth.client.particles.ModParticles; import net.silentchaos512.scalinghealth.init.ModSounds; import net.silentchaos512.scalinghealth....
/* * Scaling Health * Copyright (C) 2018 SilentChaos512 * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation version 3 * of the License. * * This library is distributed in the hope t...
SHPlayers.getPlayerData(player).getAllHearts() < SHPlayers.maxHeartCrystals();
5
dataiku/wt1
src/main/java/com/dataiku/wt1/storage/FlumeSourceProcessor.java
[ "public class ConfigConstants {\n public static final String DEFAULT_MAX_QUEUE_SIZE = \"5000\";\n public static final String MAX_QUEUE_SIZE_PARAM = \"maxQueueSize\";\n \n public static final String SEND_THIRD_PARTY_COOKIE = \"thirdPartyCookies\";\n public static final String OPTOUT_CALLBACK_URL = \"o...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Properties; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.flume.Event; import org.apache.flume.Eve...
package com.dataiku.wt1.storage; public class FlumeSourceProcessor implements TrackingRequestProcessor { private CSVFormatWriter csvWriter; private Properties flumeConfig; private RpcClient rpcClient; private long connectionDate; private int batchSize; private int flushInterval; private int maxBufferSize ...
Utils.parseCSVToSet(params.get(ConfigConstants.INLINED_VISITOR_PARAMS)),
0
caspar-chen/caswechat
caswechat-web/src/main/java/com/caspar/caswechat/web/service/impl/OAuthServiceImpl.java
[ "public class UserWechat {\r\n\t\r\n\t/**\r\n\t * 用户是否订阅该公众号标识,值为0时,代表此用户没有关注该公众号,拉取不到其余信息。\r\n\t */\r\n\tprivate Integer subscribe;\r\n\t\r\n\t/**\r\n\t * 用户的标识,对当前公众号唯一\r\n\t */\r\n\tprivate String openid;\r\n\t\r\n\t/**\r\n\t * 用户的昵称\r\n\t */\r\n\tprivate String nickname;\r\n\r\n\t/**\r\n\t * 用户的性别,值为1时是男性,值为2时是...
import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import com.alibaba.fastjson.JSONObject; import com.caspar.caswechat.user.entity.UserWechat; import com.caspar.caswechat.util.general.Con...
package com.caspar.caswechat.web.service.impl; /** * @author caspar.chen * @date 2017-5-15 */ @Service public class OAuthServiceImpl implements OAuthService{ private static final Logger log = LoggerFactory .getLogger(OAuthService.class); /** * wechat oauth url */ public static Strin...
public AccessTokenOAuth getOAuthAccessToken(String code) {
4
jenkinsci/analysis-core-plugin
src/main/java/hudson/plugins/analysis/core/BuildResult.java
[ "public abstract class AnnotationContainer implements AnnotationProvider, Serializable, Comparable<AnnotationContainer> {\n /** Unique identifier of this class. */\n private static final long serialVersionUID = 855696821788264261L;\n\n /** The hierarchy of a container. */\n public enum Hierarchy {\n ...
import javax.annotation.Nonnull; import java.io.File; import java.io.IOException; import java.io.Serializable; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; impo...
package hudson.plugins.analysis.core; // NOPMD /** * A base class for build results that is capable of storing a reference to the * current build. Provides support for persisting the results of the build and * loading and saving of annotations (all, new, and fixed) and delta * computation. * * @author Ulli ...
private transient WeakReference<Collection<FileAnnotation>> newWarningsReference;
2
liuyes/ssopay-qywx
ssopay-qywx-admin/src/main/java/com/ssopay/qywx/user/web/UserController.java
[ "public class Constants {\r\n\tpublic static final ResourceBundle bundle = ResourceBundle.getBundle(\"application\");\r\n\tpublic static final String HASH_ALGORITHM = \"SHA-1\";\r\n\tpublic static final int HASH_INTERATIONS = 1024;\r\n\tpublic static final int SALT_SIZE = 8;\r\n\t/**\r\n\t * 是否需要发送email\r\n\t */\r\...
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.anno...
package com.ssopay.qywx.user.web; /** * <p> * 用户表 前端控制器 * </p> * * @author ssopay * @since 2017-07-20 */ @Controller @RequestMapping("/user") public class UserController { private Result result = new Result(); @Autowired
private UserService userService;
7
Samourai-Wallet/sentinel-android
app/src/main/java/com/samourai/sentinel/XPUBListActivity.java
[ "public class ZBarScannerActivity extends Activity implements Camera.PreviewCallback, ZBarConstants {\n\n\tprivate static final String TAG = \"ZBarScannerActivity\";\n\tprivate CameraPreview mPreview;\n\tprivate Camera mCamera;\n\tprivate ImageScanner mScanner;\n\tprivate Handler mAutoFocusHandler;\n\tprivate boole...
import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.AsyncTask; import androi...
; } SamouraiSentinel.getInstance(XPUBListActivity.this).deleteFromPrefs(xpub); } else { if (label == null || label.length() < 1) { label = getString(R.string.new_account); } if(FormatsUtil.getInstance().isVa...
if(APIFactory.getInstance(XPUBListActivity.this).getXpubAmounts().containsKey(xpubs.get(position).second)) {
2
peterfuture/dttv-android
dttv/dttv-samples/src/main/java/dttv/app/PipTestActivity.java
[ "public class MediaPlayer {\n\n private final static String TAG = \"MediaPlayer\";\n\n private static final int MEDIA_NOP = 0;\n private static final int MEDIA_PREPARED = 1;\n private static final int MEDIA_PLAYBACK_COMPLETE = 2;\n private static final int MEDIA_BUFFERING_UPDATE = 3;\n private sta...
import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.provider.MediaStore; import android.util.DisplayMetrics; import android.util.Log; import android.view.Display; import android.view.MotionEvent; import android.view.S...
mPauseButton.setOnClickListener(this); mNextButton.setOnClickListener(this); mInfoButton.setOnClickListener(this); mRatioButton.setOnClickListener(this); mSeekBarProgress.setOnSeekBarChangeListener(seekLisenner); } // Click Touch SeekBar Handle public void onClick(...
mTextViewCurTime.setText(TimesUtil.getTime(mMediaPlayer.getCurrentPosition()));
4
NitorCreations/DomainReverseMapper
drm-core/src/test/java/com/nitorcreations/DomainMapperTest.java
[ "public class Selfie {\n private Selfie me;\n}", "public class Task {\n private final List<Employee> assignedEmployees = new ArrayList<>();\n private final Manager manager;\n private boolean completed;\n private final String description;\n\n public Task(final String description, final Manager ma...
import com.nitorcreations.testdomain.Selfie; import com.nitorcreations.testdomain.Task; import com.nitorcreations.testdomain.Timesheet; import com.nitorcreations.testdomain.person.DoubleReferer; import com.nitorcreations.testdomain.person.Employee; import com.nitorcreations.testdomain.person.Manager; import com.nitorcr...
package com.nitorcreations; public class DomainMapperTest { private DomainMapper domainMapper; @Test public void testDescribeDomain_singleClass() throws ClassNotFoundException { List<Class<?>> list = new ArrayList<>(); list.add(Employee.class); domainMapper = new DomainMapper(li...
domainMapper = new DomainMapper(Arrays.asList(Employee.class, Task.class, Manager.class, Timesheet.class, Person.class));
1
fluxroot/jcpi
src/main/java/com/fluxchess/jcpi/protocols/UciProtocol.java
[ "public final class GenericBoard {\n\n\tpublic static final int STANDARDSETUP = 518;\n\n\tprivate final Map<GenericPosition, GenericPiece> board = new HashMap<GenericPosition, GenericPiece>();\n\tprivate final Map<GenericColor, Map<GenericCastling, GenericFile>> castling = new EnumMap<GenericColor, Map<GenericCastl...
import com.fluxchess.jcpi.commands.*; import com.fluxchess.jcpi.models.GenericBoard; import com.fluxchess.jcpi.models.GenericColor; import com.fluxchess.jcpi.models.GenericMove; import com.fluxchess.jcpi.models.IllegalNotationException; import com.fluxchess.jcpi.options.AbstractOption; import java.io.BufferedReader; im...
// Try to parse the command. String[] tokens = line.trim().split("\\s", 2); while (tokens.length > 0) { if (tokens[0].equalsIgnoreCase("debug")) { parseDebugCommand(tokens); break; } else if (tokens[0].equalsIgnoreCase("isready")) { queue.add(new EngineReadyRequestCommand...
GenericBoard board = null;
0
yangwencan2002/MediaLoader
library/src/main/java/com/vincan/medialoader/download/DownloadTask.java
[ "public final class DownloadManager {\r\n\r\n private ExecutorService mDownloadExecutorService;\r\n\r\n private final Map<String, DownloadTask> mDownloaderTaskMap;\r\n\r\n private MediaLoaderConfig mMediaLoaderConfig;\r\n\r\n private volatile static DownloadManager sInstance;\r\n\r\n /**\r\n * 创建...
import com.vincan.medialoader.DownloadManager; import com.vincan.medialoader.MediaLoaderConfig; import com.vincan.medialoader.data.DefaultDataSourceFactory; import com.vincan.medialoader.data.file.FileDataSource; import com.vincan.medialoader.data.url.UrlDataSource; import com.vincan.medialoader.utils.LogUtil; im...
package com.vincan.medialoader.download; /** * 下载任务 * * @author vincanyang */ public class DownloadTask implements Runnable { private UrlDataSource mUrlDataSource; private FileDataSource mFileDataSource; private final Object mStopLock = new Object(); private volatile boolean st...
byte[] buffer = new byte[Util.DEFAULT_BUFFER_SIZE];
6
MineMaarten/IGW-mod
src/igwmod/gui/tabs/BlockAndItemWikiTab.java
[ "public class WikiRegistry{\n\n private static List<Map.Entry<String, ItemStack>> itemAndBlockPageEntries = new ArrayList<Map.Entry<String, ItemStack>>();\n private static Map<Class<? extends Entity>, String> entityPageEntries = new HashMap<Class<? extends Entity>, String>();\n public static List<IRecipeIn...
import igwmod.api.WikiRegistry; import igwmod.gui.GuiWiki; import igwmod.gui.IPageLink; import igwmod.gui.IReservedSpace; import igwmod.gui.LocatedStack; import igwmod.gui.LocatedTexture; import igwmod.lib.Textures; import java.util.ArrayList; import java.util.List; import net.minecraft.client.Minecraft; import net.min...
package igwmod.gui.tabs; public class BlockAndItemWikiTab implements IWikiTab{ private static ItemStack drawingStack = ItemStack.EMPTY; @Override public String getName(){ return "igwmod.wikitab.blocksAndItems.name"; } @Override public ItemStack renderTabIcon(GuiWiki gui){ ...
pages.add(new LocatedStack(itemStacks.get(i), 41 + i % 2 * 18, 75 + i / 2 * 18));
3
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/request/app/AppUpdate.java
[ "public class App implements Serializable {\n\n private static final long serialVersionUID = 1L;\n\n String id;\n String name;\n Domain domain_name;\n String created_at;\n App.Owner owner;\n String web_url;\n App.Stack stack;\n String requested_stack;\n String git_url;\n String buil...
import com.heroku.api.App; import com.heroku.api.Heroku; import com.heroku.api.exception.RequestFailedException; import com.heroku.api.http.Http; import com.heroku.api.request.Request; import com.heroku.api.request.RequestConfig; import java.util.Collections; import java.util.Map; import static com.heroku.api.parser.Js...
package com.heroku.api.request.app; /** * TODO: Javadoc * * @author Joe Kutner */ public class AppUpdate implements Request<App> { private final RequestConfig config; public AppUpdate(String appName, Boolean maintenance) { this.config = new RequestConfig().app(appName).with(Heroku.RequestKey.AppMainte...
throw new RequestFailedException("App update failed", code, in);
2
tliron/scripturian
components/scripturian/source/com/threecrickets/scripturian/adapter/SuccinctAdapter.java
[ "public class Executable\n{\n\t//\n\t// Constants\n\t//\n\n\t/**\n\t * Prefix prepended to on-the-fly scriptlets stored in the document source.\n\t */\n\tpublic static final String ON_THE_FLY_PREFIX = \"_ON_THE_FLY_\";\n\n\t//\n\t// Static operations\n\t//\n\n\t/**\n\t * If the executable does not yet exist in the ...
import java.util.Arrays; import com.threecrickets.scripturian.Executable; import com.threecrickets.scripturian.ExecutionContext; import com.threecrickets.scripturian.LanguageAdapter; import com.threecrickets.scripturian.Program; import com.threecrickets.scripturian.exception.LanguageAdapterException; import com.threecr...
/** * Copyright 2009-2017 Three Crickets LLC. * <p> * The contents of this file are subject to the terms of the LGPL version 3.0: * http://www.gnu.org/copyleft/lesser.html * <p> * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly f...
public SuccinctAdapter() throws LanguageAdapterException
4
axxepta/project-argon
src/main/java/de/axxepta/oxygen/actions/AddNewFileAction.java
[ "public enum BaseXSource {\r\n\r\n /**\r\n * Database.\r\n */\r\n DATABASE(\"argon\"),\r\n// /**\r\n// * RESTXQ.\r\n// */\r\n// RESTXQ(\"argonquery\"),\r\n /**\r\n * Repository.\r\n */\r\n REPO(\"argonrepo\");\r\n\r\n private final String protocol;\r\n\r\n BaseXSource...
import de.axxepta.oxygen.api.BaseXSource; import de.axxepta.oxygen.tree.ArgonTree; import de.axxepta.oxygen.tree.ArgonTreeNode; import de.axxepta.oxygen.tree.TreeListener; import de.axxepta.oxygen.tree.TreeUtils; import de.axxepta.oxygen.utils.ConnectionWrapper; import de.axxepta.oxygen.utils.DialogTools; import...
package de.axxepta.oxygen.actions; /** * @author Markus on 20.10.2015. */ public class AddNewFileAction extends AbstractAction { private static final Logger logger = LogManager.getLogger(AddNewFileAction.class); private final ArgonTree tree; private JDialog newFileDialog; private J...
TreeListener listener = ((TreeListener) tree.getTreeSelectionListeners()[0]);
3
kontalk/desktopclient-java
src/main/java/org/kontalk/model/message/OutMessage.java
[ "public final class Coder {\n private static final Logger LOGGER = Logger.getLogger(Coder.class.getName());\n\n private Coder() {\n }\n\n /**\n * Encryption status of a message.\n * Do not modify, only add! Ordinal used in database.\n */\n public enum Encryption {NOT, ENCRYPTED, DECRYPTED...
import org.kontalk.model.chat.Chat; import org.kontalk.util.EncodingUtils; import java.util.Collections; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.logging.Logger; import org.kontalk.crypto.Coder; im...
/* * Kontalk Java client * Copyright (C) 2016 Kontalk Devteam <devteam@kontalk.org> * * 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 ...
"Kon_" + EncodingUtils.randomString(8),
4
apache/creadur-rat
apache-rat-plugin/src/test/java/org/apache/rat/mp/util/ExclusionHelperTest.java
[ "public enum SourceCodeManagementSystems {\n SUBVERSION(\".svn\", null), //\n GIT(\".git\", \".gitignore\"), //\n BAZAAR(\".bzr\", \".bzrignore\"), //\n MERCURIAL(\".hg\", \".hgignore\"), //\n CVS(\"CVS\", \".cvsignore\")\n //\n ;\n\n /**\n * Technical directory of that SCM which contain...
import static org.apache.rat.mp.util.ExclusionHelper.addEclipseDefaults; import static org.apache.rat.mp.util.ExclusionHelper.addIdeaDefaults; import static org.apache.rat.mp.util.ExclusionHelper.addMavenDefaults; import static org.apache.rat.mp.util.ExclusionHelper.addPlexusAndScmDefaults; import static org.junit.Asse...
package org.apache.rat.mp.util; /* * 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...
addEclipseDefaults(log, false, exclusion);
4
greipadmin/greip
org.greip/src/org/greip/font/FontChooser.java
[ "public abstract class AbstractColorChooser extends Composite {\r\n\r\n\tprivate final ColorResolution colorResolution;\r\n\tprivate RGB newRGB;\r\n\tprivate RGB rgb;\r\n\r\n\tprivate Composite previewPanel;\r\n\tprivate final boolean showInfo;\r\n\tprivate ColorInfo colorInfo;\r\n\r\n\tprotected AbstractColorChoos...
import java.util.Optional; import java.util.stream.Stream; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.FontData; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.layout.GridData; import...
/** * Copyright (c) 2018 by Thomas Lorbeer. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * **/ package org.g...
final Separator line = new Separator(this, SWT.NONE);
5
MinecraftForge/ForgeGradle
src/patcher/java/net/minecraftforge/gradle/patcher/tasks/GenerateUserdevConfig.java
[ "public static class Function {\n protected String version; //Maven artifact for the jar to run\n @Nullable\n protected String repo; //Maven repo to download the jar from\n @Nullable\n protected List<String> args;\n @Nullable\n protected List<String> jvmargs;\n\n public String getVersion() {...
import net.minecraftforge.gradle.common.config.MCPConfigV1.Function; import net.minecraftforge.gradle.common.config.UserdevConfigV1; import net.minecraftforge.gradle.common.config.UserdevConfigV2; import net.minecraftforge.gradle.common.config.UserdevConfigV2.DataFunction; import net.minecraftforge.gradle.common.util.R...
/* * ForgeGradle * Copyright (C) 2018 Forge Development LLC * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later ver...
private DataFunction processor;
3
s4/core
src/main/java/io/s4/client/Adapter.java
[ "public class EventListener implements EventHandler {\n private static Logger logger = Logger.getLogger(EventListener.class);\n private int eventCount = 0;\n private AsynchronousEventProcessor eventProcessor;\n private io.s4.listener.EventListener rawListener;\n private Monitor monitor;\n\n public...
import io.s4.collector.EventListener; import io.s4.collector.EventWrapper; import io.s4.dispatcher.EventDispatcher; import io.s4.listener.EventHandler; import io.s4.message.Request; import io.s4.processor.AsynchronousEventProcessor; import io.s4.util.S4Util; import java.io.File; import java.io.IOException; import java....
/* * Copyright (c) 2010 Yahoo! 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...
public void processEvent(EventWrapper eventWrapper) {
1
jjhesk/LoyalNativeSlider
testApp/src/main/java/com/hkm/loyalns/demos/SliderAdjust1.java
[ "public abstract class BaseApp extends AppCompatActivity implements BaseSliderView.OnSliderClickListener, ViewPagerEx.OnPageChangeListener {\n @Override\n protected void onStop() {\n // To prevent a memory leak on rotation, make sure to call stopAutoCycle() on the slider before activity or fragment is ...
import android.support.v4.view.animation.LinearOutSlowInInterpolator; import android.view.View; import com.hkm.loyalns.R; import com.hkm.loyalns.mod.BaseApp; import com.hkm.slider.Animations.DescriptionAnimation; import com.hkm.slider.SliderLayout; import com.hkm.slider.SliderTypes.AdjustableSlide; import com.hkm.slide...
package com.hkm.loyalns.demos; /** * Created by hesk on 15/4/16. */ public class SliderAdjust1 extends BaseApp { @Override protected void setupSlider() { mDemoSlider.setPresetTransformer(TransformerL.Default); mDemoSlider.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);
mDemoSlider.setCustomAnimation(new DescriptionAnimation());
1
horizon-institute/artcodes-android
app/src/main/java/uk/ac/horizon/artcodes/adapter/ExperienceAdapter.java
[ "public class ArtcodeActivity extends ScannerActivity implements LoadCallback<Experience> {\n\tpublic static void start(Context context, Experience experience) {\n\t\tStaticActivityMessage.experience = experience;\n\t\tTaskStackBuilder.create(context)\n\t\t\t\t.addNextIntent(new Intent(context, NavigationActivity.c...
import uk.ac.horizon.artcodes.server.ArtcodeServer; import uk.ac.horizon.artcodes.server.LoadCallback; import android.content.Context; import android.view.LayoutInflater; import android.view.ViewGroup; import java.util.List; import uk.ac.horizon.artcodes.R; import uk.ac.horizon.artcodes.activity.ArtcodeActivity; import...
/* * Artcodes recognises a different marker scheme that allows the * creation of aesthetically pleasing, even beautiful, codes. * Copyright (C) 2013-2016 The University of Nottingham * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Pu...
final Experience experience = getExperience(position);
2
batir-akhmerov/hybricache
hybricache/src/test/java/org/hybricache/needRedisRunning/redisTests/RemoteMockCacheAppConfig.java
[ "public class HybriCache extends BaseCache implements Cache{\r\n\t\r\n\tprivate HybriKeyCache hybriKeyCache;\r\n\t\r\n\t\r\n\tpublic HybriCache(Ehcache ehCacheNative, HybriCacheConfiguration hybriCacheConfig, \r\n\t\t\tRemoteCacheFactory remoteCacheFactory, HybriKeyCache hybriKeyCache) {\r\n\t\tsuper(ehCacheNative,...
import java.util.ArrayList; import java.util.List; import org.easymock.EasyMock; import org.hybricache.HybriCache; import org.hybricache.HybriCacheConfiguration; import org.hybricache.HybriCacheManager; import org.hybricache.HybriCacheConfiguration.CacheType; import org.hybricache.needRedisRunning.ehCacheTests.T...
/** * */ package org.hybricache.needRedisRunning.redisTests; /** * The LocalCacheAppConfig1 class * * @author Batir Akhmerov * Created on Jan 26, 2017 */ @Configuration @ComponentScan({ "org.r3p.cache.*" }) @PropertySource("classpath:application.properties") public class RemoteMockCacheAppC...
public HybriCacheManager cacheManager() {
2
bourgesl/marlin-fx
src/main/java/com/sun/marlin/DoubleArrayCache.java
[ "static final int[] ARRAY_SIZES = new int[BUCKETS];", "static final int BUCKETS = 8;", "static final int MAX_ARRAY_SIZE;", "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: \")...
import java.lang.ref.WeakReference; import java.util.Arrays; import com.sun.marlin.ArrayCacheConst.BucketStats; import com.sun.marlin.ArrayCacheConst.CacheStats; import static com.sun.marlin.ArrayCacheConst.ARRAY_SIZES; import static com.sun.marlin.ArrayCacheConst.BUCKETS; import static com.sun.marlin.ArrayCacheConst.M...
/* * Copyright (c) 2015, 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 ...
final CacheStats stats;
6
yetanotherx/WorldEditCUI
src/main/java/wecui/event/cui/CUISelectionEvent.java
[ "public class WorldEditCUI {\n\n public static final String VERSION = \"1.4.5\";\n public static final String MCVERSION = \"1.4.5\";\n public static final int protocolVersion = 2;\n protected Minecraft minecraft;\n protected EventManager eventManager;\n protected Obfuscation obfuscation;\n prot...
import wecui.WorldEditCUI; import wecui.render.region.BaseRegion; import wecui.render.region.CuboidRegion; import wecui.render.region.CylinderRegion; import wecui.render.region.EllipsoidRegion; import wecui.render.region.PolygonRegion;
package wecui.event.cui; /** * Called when selection event is received * * @author lahwran * @author yetanotherx */ public class CUISelectionEvent extends CUIBaseEvent { public CUISelectionEvent(WorldEditCUI controller, String[] args) { super(controller, args); } @Override public CUIEv...
newRegion = new CuboidRegion(controller);
2
openintents/filemanager
FileManager/src/main/java/org/openintents/filemanager/dialogs/MultiCompressDialog.java
[ "public interface Overwritable {\n public void overwrite();\n}", "public class FileHolder implements Parcelable, Comparable<FileHolder> {\n public static final Parcelable.Creator<FileHolder> CREATOR = new Parcelable.Creator<FileHolder>() {\n public FileHolder createFromParcel(Parcel in) {\n ...
import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.os.Bundle; import androidx.fragment.app.DialogFragment; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.inputmethod.EditorInfo; import android.widget.EditText; import a...
package org.openintents.filemanager.dialogs; public class MultiCompressDialog extends DialogFragment implements Overwritable { private List<FileHolder> mFileHolders; private CompressManager mCompressManager; private File tbcreated; private String zipname; @Override public void onCreate(Bund...
((FileListFragment) getTargetFragment()).refresh();
2
turn/sorcerer
src/main/java/com/turn/sorcerer/config/impl/SorcererRegistry.java
[ "public class ModuleType {\n\tprivate String name;\n\n\tprivate List<String> pipelines;\n\n\tprivate EmailType email = new EmailType();\n\n\tprivate Integer retention = 0;\n\n\tprivate List<String> packages;\n\n\tprivate StatusStorageType storage;\n\n\tpublic String getName() {\n\t\treturn this.name;\n\t}\n\n\tpubl...
import com.turn.sorcerer.module.ModuleType; import com.turn.sorcerer.pipeline.Pipeline; import com.turn.sorcerer.pipeline.type.PipelineType; import com.turn.sorcerer.task.Task; import com.turn.sorcerer.task.type.TaskType; import java.util.List; import java.util.Map; import com.google.common.collect.Lists; import com.go...
/* * Copyright (c) 2015, Turn Inc. All Rights Reserved. * Use of this source code is governed by a BSD-style license that can be found * in the LICENSE file. */ package com.turn.sorcerer.config.impl; /** * Class Description Here * * @author tshiou */ public class SorcererRegistry { private static final L...
private List<ModuleType> modules = Lists.newArrayList();
0
bmoliveira/snake-yaml
src/test/java/examples/jodatime/JodaTimeFlowStylesTest.java
[ "public class DumperOptions {\n /**\n * YAML provides a rich set of scalar styles. Block scalar styles include\n * the literal style and the folded style; flow scalar styles include the\n * plain style and two quoted styles, the single-quoted style and the\n * double-quoted style. These styles of...
import org.yaml.snakeyaml.nodes.NodeId; import org.yaml.snakeyaml.nodes.Tag; import java.util.Date; import java.util.List; import junit.framework.TestCase; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.DumperOptions.FlowStyle; import...
/** * Copyright (c) 2008, http://www.snakeyaml.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
if (etalonEvent instanceof ScalarEvent) {
4
HackGSU/mobile-android
app/src/main/java/com/hackgsu/fall2016/android/activities/MainActivity.java
[ "public class DataStore {\n\tprivate static ArrayList<AboutPerson> aboutPeople;\n\tprivate static ArrayList<Announcement> announcements = new ArrayList<>();\n\tprivate static String openingCeremoniesRoomNumber;\n\tprivate static ArrayList<ScheduleEvent> scheduleEvents = new ArrayList<>();\n\n\tstatic {\n\t\taboutPe...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.ColorRes; import android.support.annotation.IdRes; import android.support.annotation.Nullable; import android.support.design.widget.AppBarLayout; import android.support.design.widget.NavigationView; import android.support.v4.app....
package com.hackgsu.fall2016.android.activities; public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, OnTabSelectListener, OnTabReselectListener, AppBarLayout.OnOffsetChangedListener { public static final String APP_SHORTCUT_INTENT_KEY = "app_shortcut"; ...
openingCeremoniesRoomNumber.setText(HackGSUApplication.isNullOrEmpty(DataStore.getOpeningCeremoniesRoomNumber())
0
smack42/ColorFill
src/colorfill/ui/PreferencesController.java
[ "public enum BoardColorNumbersEnum {\n\n NONE (0, \"pref.boardColorNumbers.none.txt\"),\n ALL (1, \"pref.boardColorNumbers.all.txt\"),\n NEXT (2, \"pref.boardColorNumbers.next.txt\");\n\n public final int intValue;\n public final String l10nKey;\n\n private BoardColorNumbersEnum(final int intValu...
import java.awt.Color; import colorfill.model.BoardColorNumbersEnum; import colorfill.model.GamePreferences; import colorfill.model.GameState; import colorfill.model.GridLinesEnum; import colorfill.model.HighlightColorEnum; import colorfill.model.StartPositionEnum;
/* ColorFill game and solver Copyright (C) 2014, 2015 Michael Henke 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...
GamePreferences.DEFAULT_BOARD_WIDTH,
1
CollapsedDom/Stud.IP-Client
core/client/src/main/java/de/danner_web/studip_client/view/subframe/GeneralSettingsView.java
[ "public class SettingsModel extends Observable {\n\n\tprivate Map<String, String> map = new HashMap<String, String>();\n\n\tprivate Preferences rootPref;\n\n\tprivate static Logger logger = LogManager.getLogger(SettingsModel.class);\n\n\t// Names for settings, also in registry/XML file\n\tprivate static final Strin...
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.ev...
package de.danner_web.studip_client.view.subframe; public class GeneralSettingsView extends JPanel implements Observer, DetachableView { private static final long serialVersionUID = 4827015066453761389L; private static Logger logger = LogManager.getLogger(GeneralSettingsView.class); private ResourceB...
private Map<String, NotificationOrientation> orientation = null;
1
Cloudhunter/OpenCCSensors
src/main/java/openccsensors/common/item/ItemSensorCard.java
[ "@Mod( modid = \"OCS\", name = \"OpenCCSensors\", version = \"1.7.5\", dependencies = \"required-after:ComputerCraft;after:CCTurtle;after:BuildCraft|Core;after:IC2;after:Thaumcraft;after:AppliedEnergistics;after:RailCraft;after:ArsMagica;after:UniversalElectricity;after:ThermalExpansion;after:RotaryCraft\")\npublic...
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map.Entry; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRari...
package openccsensors.common.item; public class ItemSensorCard extends Item implements ISensorCardRegistry { public List<IRequiresIconLoading> iconLoadList = new ArrayList<IRequiresIconLoading>();
public HashMap<Integer, SensorCard> cards = new HashMap<Integer, SensorCard>();
6
hillfly/WifiChat
src/hillfly/wifichat/common/socket/tcp/TcpClient.java
[ "public class BaseApplication extends Application {\n \n public static boolean isDebugmode = false;\n private boolean isPrintLog = true;\n private int logLevel = Log.DEBUG;\n\n /** 静音、震动默认开关 **/\n private static boolean isSlient = false;\n private static boolean isVIBRATE = true;\n\n /** 新消息...
import hillfly.wifichat.common.BaseApplication; import hillfly.wifichat.common.socket.udp.UDPMessageListener; import hillfly.wifichat.consts.Constant; import hillfly.wifichat.consts.IPMSGConst; import hillfly.wifichat.model.FileState; import hillfly.wifichat.model.FileStyle; import hillfly.wifichat.model.Message; impor...
package hillfly.wifichat.common.socket.tcp; public class TcpClient implements Runnable { private static final Logger logger = Logger.getLogger(TcpClient.class); private Thread mThread; private boolean IS_THREAD_STOP = false; // 是否线程开始标志 private boolean SEND_FLAG = false; // 是否发送广播标志 private sta...
public void sendFile(ArrayList<FileStyle> fileStyles, ArrayList<FileState> fileStates,
4
batsw/AndroidAnonymityChat
app/src/main/java/com/batsw/anonimitychat/persistence/operations/DbMyProfileOperations.java
[ "public class DBMyProfileEntity implements IDbEntity {\n private long mId;\n private String mMyAddress;\n private String mMyName;\n private String mMyNickName;\n private String mMyEmail;\n\n public long getId() {\n return mId;\n }\n\n public void setId(long id) {\n this.mId = i...
import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.batsw.anonimitychat.persistence.entities.DBMyProfileEntity; import com.batsw.anonimitychat.persistence.util.IDbEntity; import com.batsw.anonimitychat.persistence.util....
package com.batsw.anonimitychat.persistence.operations; /** * Created by tudor on 5/4/2017. */ public class DbMyProfileOperations implements IEntityDbOperations { private static final String LOG = DbMyProfileOperations.class.getSimpleName(); private SQLiteDatabase mSQLiteDatabase; public DbMyProfi...
values.put(PersistenceConstants.COLUMN_MY_ADDRESS, myAddress + TorConstants.TOR_ADDRESS_SUFFIX);
4
JessYanCoding/MVPArt
art/src/main/java/me/jessyan/art/integration/ActivityLifecycle.java
[ "public abstract class BaseFragment<P extends IPresenter> extends Fragment implements IFragment<P> {\r\n protected final String TAG = this.getClass().getSimpleName();\r\n private Cache<String, Object> mCache;\r\n protected Context mContext;\r\n protected P mPresenter;\r\n\r\n @NonNull\r\n @Overrid...
import me.jessyan.art.base.delegate.ActivityDelegateImpl; import me.jessyan.art.base.delegate.FragmentDelegate; import me.jessyan.art.base.delegate.IActivity; import me.jessyan.art.integration.cache.Cache; import me.jessyan.art.integration.cache.IntelligentCache; import me.jessyan.art.utils.Preconditions; import androi...
/* * Copyright 2017 JessYan * * 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 ...
if (activity instanceof IActivity) {
4
marcocor/smaph
src/main/java/it/unipi/di/acube/smaph/main/experiments/TailQueriesExperiment.java
[ "public class CachedWAT2Annotator extends WAT2Annotator {\n\tprivate final static Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());\n\n\tprivate static HashMap<String, byte[]> url2jsonCache = new HashMap<>();\n\tprivate static long flushCounter = 0;\n\tprivate static final int FLUSH_EVERY ...
import java.util.HashSet; import java.util.Locale; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.GnuParser; import org.apache.commons.cli.Options; import it.unipi.di.acube.batframework.cache.BenchmarkCache; import it.unipi.di.acube.batframework.data.Tag; import it.unipi.di.acube.batframework....
package it.unipi.di.acube.smaph.main.experiments; public class TailQueriesExperiment { private static final Locale LOCALE = Locale.US; public static void main(String[] args) throws Exception { Options options = new Options().addOption("w", "websearch-piggyback", true, "What web search engine to piggy...
EntityToAnchors e2a = EntityToAnchors.fromDB(c.getDefaultEntityToAnchorsStorage());
7