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
codelibs/fess-suggest
src/main/java/org/codelibs/fess/suggest/index/contents/DefaultContentsParser.java
[ "public interface SuggestAnalyzer {\n List<AnalyzeToken> analyze(String text, String field, String lang);\n\n List<AnalyzeToken> analyzeAndReading(String text, String field, String lang);\n}", "public interface ReadingConverter {\n default int getMaxReadingNum() {\n return 10;\n }\n\n void i...
import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import org.codelibs.core.lang.StringUtil; import org.codelibs.fess.suggest.analysis.SuggestAnalyzer; import org.codelibs.fess.suggest.converter.ReadingConverter; import org.codelibs.fess.suggest...
/* * Copyright 2012-2022 CodeLibs Project and the Others. * * 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...
final String[] roles, final long score, final ReadingConverter readingConverter, final Normalizer normalizer,
5
Belgabor/AMTweaker
src/main/java/mods/belgabor/amtweaker/mods/amt/handlers/TeaMaker.java
[ "public class AMTListAddition extends BaseListAddition {\n private Object amt_recipe = null;\n\n public AMTListAddition(String description, List list, AMTRecipeWrapper recipe) {\n super(description, list, recipe);\n }\n\n @Override\n public void apply() {\n if (amt_recipe == null) {\n ...
import mods.defeatedcrow.api.recipe.RecipeRegisterManager; import net.minecraft.item.ItemStack; import stanhebben.zenscript.annotations.ZenClass; import stanhebben.zenscript.annotations.ZenMethod; import static mods.belgabor.amtweaker.helpers.InputHelper.toStack; import static mods.belgabor.amtweaker.helpers.StackHelpe...
/* * The MIT License (MIT) * * Copyright (c) 2015 Belgabor * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, cop...
private static class TeaRecipeWrapper extends AMTRecipeWrapper {
1
JanWiemer/jacis
src/test/java/org/jacis/objectadapter/cloning/JacisStoreWithCloningAdapterTest.java
[ "@JacisApi\r\npublic class JacisTransactionHandle {\r\n\r\n /** The id of the transaction */\r\n private final String txId;\r\n /** Description for the transaction giving some more information about the purpose of the transaction (for logging and debugging) */\r\n private final String txDescription;\r\n /** A ...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertTrue; import java.util.concurrent.atomic.AtomicInteger; import org.jacis.container.JacisTransactionHandle; import org.jacis.exception.ReadOn...
TestObject testObject = new TestObject("obj-1", 1); assertEquals(0, store.size()); store.getContainer().withLocalTx(() -> { store.update(testObject.getName(), testObject); assertEquals(testObject, store.get(testObject.getName())); assertTrue(store.containsKey(testObject.getName())); ...
@Test(expected = ReadOnlyException.class)
1
jenshadlich/s3srv
src/main/java/de/jeha/s3srv/operations/buckets/GetBucketACL.java
[ "@XmlRootElement(name = \"AccessControlPolicy\")\npublic class AccessControlPolicy {\n\n @XmlElement(name = \"Owner\")\n private Owner owner;\n\n @XmlElement(name = \"AccessControlList\")\n private List<AccessControlPolicy.Grant> acl = new ArrayList<>();\n\n public AccessControlPolicy() {\n }\n\n ...
import de.jeha.s3srv.api.AccessControlPolicy; import de.jeha.s3srv.api.Grantee; import de.jeha.s3srv.api.Owner; import de.jeha.s3srv.common.acl.ACLPermissions; import de.jeha.s3srv.common.errors.ErrorCodes; import de.jeha.s3srv.common.security.AuthorizationContext; import de.jeha.s3srv.operations.AbstractOperation; imp...
package de.jeha.s3srv.operations.buckets; /** * @author jenshadlich@googlemail.com */ public class GetBucketACL extends AbstractOperation { private static final Logger LOG = LoggerFactory.getLogger(GetBucketACL.class); public GetBucketACL(StorageBackend storageBackend) { super(storageBackend); ...
ACLPermissions.FULL_CONTROL.name())));
3
KostyaSha/github-integration-plugin
github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/multibranch/handler/GitHubBranchHandler.java
[ "public class GitHubBranchCause extends AbstractGitHubBranchCause<GitHubBranchCause> {\n private static final Logger LOG = LoggerFactory.getLogger(GitHubBranchCause.class);\n\n private final String branchName;\n\n public GitHubBranchCause(@NonNull GitHubBranch localBranch, @NonNull GitHubBranchRepository l...
import com.github.kostyasha.github.integration.branch.GitHubBranchCause; import com.github.kostyasha.github.integration.branch.GitHubBranchRepository; import com.github.kostyasha.github.integration.branch.events.GitHubBranchEvent; import com.github.kostyasha.github.integration.branch.webhook.BranchInfo; import com.gith...
package com.github.kostyasha.github.integration.multibranch.handler; /** * @author Kanstantsin Shautsou */ public class GitHubBranchHandler extends GitHubHandler { private List<GitHubBranchEvent> events = new ArrayList<>(); @DataBoundConstructor public GitHubBranchHandler() { } public List<G...
GitHubBranchCause c = toGitHubBranchCause(localRepo, listener, this, source).apply(b);
5
SOM-Research/EMFtoCSP
plugins/fr.inria.atlanmod.emftocsp.emf/src/fr/inria/atlanmod/emftocsp/emf/impl/UmlModelBuilder.java
[ "public interface IModelReader<R, P, C, AS, AT, OP> {\n\n\tpublic R getModelResource(); \n\n\tpublic List<P> getPackages();\n\n\tpublic List<C> getClasses();\n\n\tpublic List<String> getClassesNames();\n\n\tpublic List<AT> getClassAttributes(C c);\n\n\tpublic List<OP> getClassOperations(C c); \n\n\tpublic List<C> ...
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.eclipse.core.runtime.Assert; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import o...
/******************************************************************************* * Copyright (c) 2013 INRIA Rennes Bretagne-Atlantique. * 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, an...
Assert.isTrue(eAttribute instanceof EAttributeUMLAdapter, eAttribute+ "is not instanceof EAttributeUMLAdapter");
1
stalk-io/stalk-server
src/main/java/io/stalk/common/oauth/provider/GoogleImpl.java
[ "public class OAuthConfig {\r\n\r\n private final String _consumerKey;\r\n private final String _consumerSecret;\r\n private final String _callbackUrl;\r\n private final String _signatureMethod;\r\n private final String _transportName;\r\n private String id;\r\n private Class<?> providerImplCla...
import io.stalk.common.oauth.OAuthConfig; import io.stalk.common.oauth.Profile; import io.stalk.common.oauth.exception.UserDeniedPermissionException; import io.stalk.common.oauth.strategy.Hybrid; import io.stalk.common.oauth.strategy.OAuthStrategyBase; import io.stalk.common.oauth.strategy.RequestToken; import io...
package io.stalk.common.oauth.provider; public class GoogleImpl extends AbstractProvider implements AuthProvider { private static final String OAUTH_SCOPE = "http://www.google.com/m8/feeds/"; private static final Map<String, String> ENDPOINTS; private OAuthConfig config; private OAuthStra...
public Profile connect(AccessGrant requestToken, final Map<String, String> requestParams)
1
Gigigo-Android-Devs/gigigo-utils-suite
ggglib/src/main/java/com/gigigo/ggglib/network/executors/RetrofitApiServiceExcecutor.java
[ "public interface ErrorConverter<ErrResponse, ResponseBody> {\n ErrResponse convert(ResponseBody value) throws IOException;\n}", "public interface RetryOnErrorPolicy<Error> {\n\n boolean shouldRetryWithErrorAndTries(int tries, Error error, HttpResponse httpResponse);\n\n boolean shouldRetryOnException(int tri...
import com.gigigo.ggglib.network.converters.ErrorConverter; import com.gigigo.ggglib.network.defaultelements.RetryOnErrorPolicy; import com.gigigo.ggglib.network.responses.ApiGenericExceptionResponse; import com.gigigo.ggglib.network.responses.ApiGenericResponse; import com.gigigo.ggglib.network.responses.HttpResponse;...
/* * Created by Gigigo Android Team * * Copyright (C) 2016 Gigigo Mobile Services SL * * 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 *...
@Override public <ApiResponse extends ApiGenericResponse> ApiGenericResponse
3
thedudeguy/JukeIt
src/main/java/com/chrischurchwell/jukeit/material/blocks/MachineBlock.java
[ "public class JukeIt extends JavaPlugin {\r\n\t\r\n\tprivate static JukeIt instance;\r\n\tpublic Server HTTPserver;\r\n\tSelectChannelConnector HTTPconnector;\r\n\t\r\n\tBlocks blocks;\r\n\tItems items;\r\n\t\r\n\tpublic static JukeIt getInstance() {\r\n\t\treturn instance;\r\n\t}\r\n\t\r\n\tpublic static void info...
import com.chrischurchwell.jukeit.gui.machine.MachineGUI; import com.chrischurchwell.jukeit.material.Items; import com.chrischurchwell.jukeit.permission.CraftPermissible; import com.chrischurchwell.jukeit.permission.UsePermissible; import com.chrischurchwell.jukeit.texture.TextureFile; import com.chrischurchwell.m...
/** * This file is part of JukeIt * * Copyright (C) 2011-2013 Chris Churchwell * * 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 o...
player.getMainScreen().attachPopupScreen(new MachineGUI(player, block));
1
y1j2x34/spring-influxdb-orm
spring-influxdb-orm/src/main/java/com/vgerbot/orm/influxdb/exec/ExecuteExecutor.java
[ "public class MapperMethod {\n\tprivate final Executor executor;\n\tprivate final ParameterProducer producer;\n\tprivate final MethodSignature methodSignature;\n\tprivate final MapperInterface mapperInterface;\n\tprivate final InfluxDBRepository repository;\n\n\tpublic MapperMethod(Class<?> mapperInterface, InfluxD...
import java.util.Map; import com.vgerbot.orm.influxdb.annotations.InfluxDBExecute; import com.vgerbot.orm.influxdb.binding.MapperMethod; import com.vgerbot.orm.influxdb.param.ParameterValue; import com.vgerbot.orm.influxdb.repo.InfluxDBRepository; import com.vgerbot.orm.influxdb.result.ResultContext; import com.vgerbot...
package com.vgerbot.orm.influxdb.exec; public class ExecuteExecutor extends AnnotationExecutor<InfluxDBExecute> { public ExecuteExecutor(InfluxDBRepository repository, InfluxDBExecute annotation) { super(repository, annotation); } @Override
public ResultContext execute(MapperMethod method, Map<String, ParameterValue> parameters) {
3
otto-de/edison-hal
example-springboot/src/main/java/de/otto/edison/hal/example/web/ProductsHalJson.java
[ "@JsonSerialize(using = Embedded.EmbeddedSerializer.class)\n@JsonDeserialize(using = Embedded.EmbeddedDeserializer.class)\npublic class Embedded {\n /**\n * The embedded items, mapped by link-relation type.\n *\n * <p>\n * The values are either List&lt;HalRepresentation&gt; or single HalRepre...
import de.otto.edison.hal.Embedded; import de.otto.edison.hal.HalRepresentation; import de.otto.edison.hal.example.shop.Product; import java.util.List; import static de.otto.edison.hal.Embedded.embeddedBuilder; import static de.otto.edison.hal.Embedded.emptyEmbedded; import static de.otto.edison.hal.Link.linkBuilder; i...
package de.otto.edison.hal.example.web; /** * HAL reprensentation of a list of products. */ class ProductsHalJson extends HalRepresentation { private static final String REL_EXAMPLE_TEMPLATE = "http://localhost:8080/rels/{rel}"; private static final String REL_EXAMPLE_PRODUCT = REL_EXAMPLE_TEMPLATE.repla...
.single(linkBuilder(REL_SEARCH, "/api/products{?q,embedded}")
5
pierre/ning-service-skeleton
base/src/main/java/com/ning/jetty/base/modules/BaseServerModule.java
[ "public class ServerModule extends ServletModule\n{\n protected Multibinder<HealthCheck> healthChecksBinder;\n\n @Override\n public void configureServlets()\n {\n installJackson();\n installJMX();\n installStats();\n }\n\n protected void installJackson()\n {\n final ...
import com.ning.arecibo.jmx.AreciboMonitoringModule; import com.ning.arecibo.metrics.guice.AreciboMetricsModule; import com.ning.jetty.core.modules.ServerModule; import com.ning.jetty.eventtracker.CollectorTracker; import com.ning.jetty.eventtracker.Tracker; import com.ning.jetty.eventtracker.config.TrackerConfig; impo...
/* * Copyright 2010-2011 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
filter("*").through(TrackerFilter.class);
4
rinde/RinLog
src/test/java/com/github/rinde/logistics/pdptw/mas/SingleTruckTest.java
[ "@AutoValue\npublic abstract static class TestTruckFactory implements TruckFactory {\n\n private static final long serialVersionUID = 7021922386391250575L;\n\n @Override\n public void handleTimedEvent(AddVehicleEvent event,\n SimulatorAPI simulator) {\n final RoutePlanner rp =\n getRoutePlanner().ge...
import static com.google.common.collect.Lists.newArrayList; import static com.google.common.truth.Truth.assertThat; import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert...
assertEquals(trucks, roadModel.getObjectsOfType(Truck.class).size()); // make sure there are no parcels yet assertTrue(roadModel.getObjectsOfType(Parcel.class).isEmpty()); truck = roadModel.getObjectsOfType(TestTruck.class).iterator().next(); assertNotNull(truck); assertEquals(1000, simulator....
CheapestInsertionHeuristic
7
flipper83/protohipster
protohipster/src/main/java/com/flipper83/protohipster/feed/view/ui/HipsterListFragment.java
[ "public class FeedProvider {\n\n FeedViewModel viewModel;\n\n public FeedProvider(FeedViewModel viewModel) {\n this.viewModel = viewModel;\n }\n\n public FeedViewModel getFeed() {\n return viewModel;\n }\n\n}", "public class FeedViewModel {\n\n HipsterViewMapper hipsterViewMapper;\...
import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ListView; import com.flipper83.protohipster.R; import com.flipper83.protohipster.feed.view.provider.FeedProvider; import com.flipper83.protohips...
package com.flipper83.protohipster.feed.view.ui; /** * A placeholder fragment containing a simple view. */ public class HipsterListFragment extends BaseFragment { @Inject FeedProvider feedProvider; @Inject Picasso picasso; @Inject
TransformationBuilder transformationBuilder;
4
forax/dragon
grammar/gen-src/fr/umlv/dragon/grammar/tools/Analyzers.java
[ "public enum RuleEnum {\r\nassign,\ndot,\nsemicolon,\nantislash,\narrow,\neol,\nlpar,\nrpar,\nlopt,\nropt,\nlcurl,\nrcurl,\nadd,\nsub,\nmul,\ndiv,\nrem,\neq,\nne,\nlt,\nle,\ngt,\nge,\n_if,\n_while,\n_return,\ntext,\ninteger,\nid,\nspace;\r\n}\r", "public enum TerminalEnum {\n assign,\ndot,\nsemicolon,\nantislash...
import java.io.InputStreamReader; import java.io.Reader; import fr.umlv.dragon.grammar.lexer.RuleEnum; import fr.umlv.dragon.grammar.parser.TerminalEnum; import fr.umlv.dragon.grammar.parser.NonTerminalEnum; import fr.umlv.dragon.grammar.parser.ProductionEnum; import fr.umlv.dragon.grammar.parser.VersionEnum; import fr...
package fr.umlv.dragon.grammar.tools; /** Helper methods that can be used to run a couple lexer/parser on a text. * * This class is generated - please do not edit it */ public class Analyzers { /** * Runs the analyzer (lexer+parser) on a reader and print recognized tokens and * applied parser rules on ...
public static Builder.ParserTableBuilder<TerminalEnum,NonTerminalEnum,ProductionEnum,VersionEnum> parserBuilder() {
1
PhantomThief/more-lambdas-java
core/src/main/java/com/github/phantomthief/pool/impl/KeyAffinityExecutorImpl.java
[ "static final Map<KeyAffinityExecutor<?>, KeyAffinityExecutor<?>> ALL_EXECUTORS = new ConcurrentHashMap<>();", "public interface KeyAffinityExecutor<K> extends KeyAffinity<K, ListeningExecutorService> {\n\n int DEFAULT_QUEUE_SIZE = 100;\n\n /**\n * 创建{@link KeyAffinityExecutorBuilder}构造器来构造KeyAffinityEx...
import static com.github.phantomthief.pool.impl.KeyAffinityExecutorBuilder.ALL_EXECUTORS; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Throwables.throwIfUnchecked; import static com.google.common.util.concurrent.Futures.addCallback; import static com.google.commo...
package com.github.phantomthief.pool.impl; /** * @author w.vela * Created on 2018-11-30. */ class KeyAffinityExecutorImpl<K> extends LazyKeyAffinity<K, ListeningExecutorService> implements KeyAffinityExecutor<K> { private ConcurrentMap<K, SubstituentCallable<?>> substituentTaskMap; private bool...
public void executeEx(K key, @Nonnull ThrowableRunnable<Exception> task) {
4
commsen/EM
em-maven-extension/src/main/java/com/commsen/em/maven/plugins/BndExportPlugin.java
[ "public static final String INTERNAL_DISTRO_FILE = INTERNAL_PREFIX + \"distro\";", "public static final String PROP_CONTRACTS = PROP_PREFIX + \"contracts\";", "public static final String PROP_EXECUTABLE_RUN_PROPERTIES = PROP_ACTION_EXECUTABLE + \".properties\";", "public static final String PROP_RESOLVE_OUTPU...
import static com.commsen.em.maven.util.Constants.INTERNAL_DISTRO_FILE; import static com.commsen.em.maven.util.Constants.PROP_CONTRACTS; import static com.commsen.em.maven.util.Constants.PROP_EXECUTABLE_RUN_PROPERTIES; import static com.commsen.em.maven.util.Constants.PROP_RESOLVE_OUTPUT; import static com.commsen.em....
package com.commsen.em.maven.plugins; @Component(role = BndExportPlugin.class) public class BndExportPlugin extends DynamicMavenPlugin { private Logger logger = LoggerFactory.getLogger(BndExportPlugin.class); @Requirement private Dependencies dependencies; @Requirement private Templates templates; priva...
project.getProperties().setProperty(PROP_RESOLVE_OUTPUT, Constants.getExportedModulesFolder(project).toString());
3
googleads/adwords-scripts-linkchecker
src/main/java/com/google/adwords/scripts/solutions/linkchecker/tasks/UrlCheckTask.java
[ "public class Datastore {\n static {\n ObjectifyService.register(BatchOperation.class);\n ObjectifyService.register(BatchSubOperation.class);\n ObjectifyService.register(UrlCheckStatus.class);\n ObjectifyService.register(SharedKey.class);\n ObjectifyService.register(Settings.class);\n ObjectifySe...
import com.google.adwords.scripts.solutions.linkchecker.datastore.Datastore; import com.google.adwords.scripts.solutions.linkchecker.model.BatchSubOperation; import com.google.adwords.scripts.solutions.linkchecker.model.Settings; import com.google.adwords.scripts.solutions.linkchecker.service.SettingsService; import co...
// Copyright 2017, Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
List<UrlCheckStatus> statuses = subOp.getUrlStatuses();
5
christophesmet/ledsgetIton
app/src/main/java/com/getiton/android/app/core/dependency/MainViewModelProvider.java
[ "public class NamedLanModulesViewModel {\n\n private NamedLanModuleRepo mRepo;\n\n public NamedLanModulesViewModel() {\n mRepo = new NamedLanModuleRepo();\n }\n\n @NonNull\n public NamedLanModule addNewModule(@NonNull String name, @NonNull String macId) {\n NamedLanModule module = new N...
import android.content.Context; import com.getiton.android.app.core.data.NamedLanModulesViewModel; import com.getiton.android.app.overview.OverviewActivity; import com.getiton.android.app.rgb.RgbV1Activity; import com.getiton.android.app.tutorial.TutorialRegisterFlowActivity; import com.getiton.android.app.tutorial.Tut...
package com.getiton.android.app.core.dependency; /** * Created by christophesmet on 07/09/15. */ @Module( injects = {RgbV1Activity.class, OverviewActivity.class , TutorialSetupInfoActivity.class, TutorialRegisterFlowActivity.class}, complete = true) public class MainViewModelProvi...
NamedLanModulesViewModel provideNamedLanViewModel() {
0
spotify/spydra
spydra/src/main/java/com/spotify/spydra/submitter/api/DynamicSubmitter.java
[ "public static final String OPTION_CLUSTER = \"cluster\";", "public static final String OPTION_PROJECT = \"project\";", "public static final String OPTION_ZONE = \"zone\";", "public class DataprocApi {\n private final Metrics metrics;\n private final GcloudExecutor gcloud;\n\n public DataprocApi() {\n g...
import static com.spotify.spydra.model.SpydraArgument.OPTION_CLUSTER; import static com.spotify.spydra.model.SpydraArgument.OPTION_PROJECT; import static com.spotify.spydra.model.SpydraArgument.OPTION_ZONE; import com.spotify.spydra.api.DataprocApi; import com.spotify.spydra.api.model.Cluster; import com.spotify.spydra...
/*- * -\-\- * Spydra * -- * Copyright (C) 2016 - 2018 Spotify AB * -- * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
OPTION_PROJECT,
1
ppasupat/web-entity-extractor-ACL2014
src/edu/stanford/nlp/semparse/open/model/feature/FeatureTypeNodeBased.java
[ "public class FeatureVector {\n // These features map to the value 1 (most common case in NLP).\n private List<String> indicatorFeatures;\n // General features\n private StringDoubleArrayList generalFeatures;\n \n // ============================================================\n // Add features\n // =======...
import java.util.*; import edu.stanford.nlp.semparse.open.model.FeatureVector; import edu.stanford.nlp.semparse.open.model.candidate.Candidate; import edu.stanford.nlp.semparse.open.model.candidate.CandidateGroup; import edu.stanford.nlp.semparse.open.model.tree.KNode; import edu.stanford.nlp.semparse.open.util.Multise...
package edu.stanford.nlp.semparse.open.model.feature; /** * Extract features by looking at the selected nodes in the knowledge tree. */ public class FeatureTypeNodeBased extends FeatureType { public static class Options { @Option public boolean rangeUseCollapsedTimestamp = true; @Option public boolean so...
Set<KNode> currentKNodes = new HashSet<>(group.selectedNodes);
3
butter-fly/belling-admin
src/main/java/com/belling/admin/controller/houtai/RoleController.java
[ "@Data\n@EqualsAndHashCode(callSuper = false)\npublic class Role extends PersistentObject {\n\n\t/**\n\t * 序列化ID\n\t */\n\tprivate static final long serialVersionUID = 564115576254799088L;\n\n\t/** 名称 */\n\tprivate String name;\n\t\n\t/** 编码 */\n\tprivate String code;\n\t\n\t/** 排序 */\n\tprivate Integer sort = Inte...
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.RequestMapping; import org.springframework.web.bind.annotatio...
package com.belling.admin.controller.houtai; /** * <pre> * Description * Copyright: Copyright (c)2017 * Company: Sunny * Author: Administrator * Version: 1.0 * Create at: 2017年6月23日 上午8:48:33 * * Modification History: * Date Author Version Description * -----------------------...
Pagination<Role> page = new Pagination<Role>((start / length) + 1, length);
3
compasses/elastic-rabbitmq
rabbitmqservice/src/main/java/sync/handler/impl/ESAbstractHandler.java
[ "public final class ESQueryBodyBuilder {\r\n private static final Logger log = Logger.getLogger(ESQueryBodyBuilder.class);\r\n\r\n public static class SimpleUpdateBodyBuilder {\r\n JsonObject updateDoc = new JsonObject();\r\n JsonObject updateBody = new JsonObject();\r\n\r\n public Simple...
import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import elasticsearch.ESQueryBodyBuilder; import elasticsearch.constant.ESConstants; import elasticsearch.esapi.DocumentService; import elasticsearch.esapi.HotDocumentService; import elasticsearch.esapi.resp....
package sync.handler.impl; /** * Created by I311352 on 10/18/2016. */ public abstract class ESAbstractHandler implements ESHandler { public static final Logger logger = Logger.getLogger(ESAbstractHandler.class); protected JsonParser jsonParser = new JsonParser(); private static final DateTime...
String fields = new ESQueryBodyBuilder.SourceFieldsListBuilder().addField("version").build();
0
webdriverextensions/webdriverextensions
src/main/java/com/github/webdriverextensions/internal/generator/WebRepositoryBuilder.java
[ "public abstract class WebRepository {\n\n public void initElements() {\n PageFactory.initElements(new WebDriverExtensionFieldDecorator(WebDriverExtensionsContext.getDriver()), this);\n }\n\n public void initElements(WebDriver driver) {\n PageFactory.initElements(new WebDriverExtensionFieldDe...
import com.github.webdriverextensions.WebRepository; import static com.github.webdriverextensions.internal.generator.GeneratorUtils.annotateFieldWithFindByAnnotation; import static com.github.webdriverextensions.internal.generator.GeneratorUtils.annotateFieldWithFindBysAnnotation; import static com.github.webdriverexte...
package com.github.webdriverextensions.internal.generator; public class WebRepositoryBuilder implements Builder<Boolean> { // Input Elements final private ProcessingEnvironment processingEnv; final private Set<TypeElement> webSiteElements; final private Set<TypeElement> webPageElements; final pri...
generatedWebRepositoryClass._extends(codeModel.ref(WebRepository.class));
0
HackGSU/mobile-android
app/src/main/java/com/hackgsu/fall2016/android/services/FirebaseService.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.app.Service; import android.content.Intent; import android.content.SharedPreferences; import android.os.IBinder; import android.support.annotation.NonNull; import android.util.Log; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Tas...
package com.hackgsu.fall2016.android.services; public class FirebaseService extends Service { public FirebaseService () { } @Override public IBinder onBind (Intent intent) { return null; } @Override public int onStartCommand (Intent intent, int flags, int startId) { final SharedPreferences firebasePrefs...
dbRef.child(AnnouncementController.getAnnouncementsTableString(getApplicationContext()))
2
szegedi/dynalink
src/test/java/org/dynalang/dynalink/beans/TestSimpleDynamicMethod.java
[ "enum Comparison {\n INDETERMINATE,\n TYPE_1_BETTER,\n TYPE_2_BETTER,\n}", "public class GuardedInvocation {\n private static final SwitchPoint[] NO_SWITCH_POINTS = new SwitchPoint[0];\n\n private final MethodHandle invocation;\n private final MethodHandle guard;\n private final Class<? exten...
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodType; import junit.framework.TestCase; import org.dynalang.dynalink.linker.ConversionComparator.Comparison; import org.dynalang.dynalink.linker.GuardedInvocation; import org.dynalang.dynalink.linker.LinkRequest; import org.dynalang.dynalink.linker.Link...
/* Copyright 2009-2013 Attila Szegedi Licensed under both the Apache License, Version 2.0 (the "Apache License") and the BSD License (the "BSD License"), with licensee being free to choose either of the two at their discretion. You may not use this file except in compliance with either the Apache Li...
private abstract static class MockLinkerServices implements LinkerServices {
3
chedim/minedriod
src/main/java/com/onkiup/minedroid/gui/XmlHelper.java
[ "public interface Context {\n /**\n * @return Context id\n */\n int contextId();\n\n}", "public class Contexted implements Context {\n\n private Context context;\n\n public Contexted(Context context) {\n this.context = context;\n }\n\n @Override\n public int contextId() {\n ...
import com.onkiup.minedroid.Context; import com.onkiup.minedroid.Contexted; import com.onkiup.minedroid.gui.drawables.Drawable; import com.onkiup.minedroid.gui.primitives.Point; import com.onkiup.minedroid.gui.primitives.Rect; import com.onkiup.minedroid.gui.resources.ResourceLink; import com.onkiup.minedroid.gui.resou...
package com.onkiup.minedroid.gui; /** * Some useful methods for XML parsing */ public class XmlHelper extends Contexted { /** * Wrapped XML Node */ protected Node node; public XmlHelper(Context context, Node node) { super(context); this.node = node; } /** * Ret...
Object v = ResourceManager.get(this, val);
6
schibsted/triathlon
src/main/java/com/schibsted/triathlon/operators/GroupByOperator.java
[ "public class ConstraintModel {\n static List<String> VALID_OPERATORS = new ArrayList<String>() {{\n add(\"UNIQUE\");\n add(\"CLUSTER\");\n add(\"GROUP_BY\");\n add(\"LIKE\");\n add(\"UNLIKE\");\n }};\n\n public String getField() {\n return field;\n }\n\n pub...
import java.util.stream.Collectors; import com.netflix.eureka2.registry.instance.InstanceInfo; import com.schibsted.triathlon.model.ConstraintModel; import com.schibsted.triathlon.model.InstanceInfoModel; import com.schibsted.triathlon.model.generated.Marathon; import com.schibsted.triathlon.service.TriathlonService; i...
/* * Copyright (c) 2015 Schibsted Products and Technology * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
private final ConstraintModel constraint;
0
mikelewis0/easyccg
src/uk/ac/ed/easyccg/rebanking/CCGBankParseReader.java
[ "public abstract class Category {\n private final String asString;\n private final int id;\n private final static String WILDCARD_FEATURE = \"X\"; \n private final static Set<String> bracketAndQuoteCategories = ImmutableSet.of(\"LRB\", \"RRB\", \"LQU\", \"RQU\");\n\n private Category(String asString, String se...
import java.util.concurrent.atomic.AtomicInteger; import uk.ac.ed.easyccg.syntax.Category; import uk.ac.ed.easyccg.syntax.Category.Slash; import uk.ac.ed.easyccg.syntax.SyntaxTreeNode; import uk.ac.ed.easyccg.syntax.SyntaxTreeNode.SyntaxTreeNodeFactory; import uk.ac.ed.easyccg.syntax.Util;
package uk.ac.ed.easyccg.rebanking; /** * Reads in gold-standard parses from CCGBank. */ public class CCGBankParseReader {
public final static SyntaxTreeNodeFactory factory = new SyntaxTreeNodeFactory(1000, 10000);
3
pcalouche/spat
spat-services/src/test/java/com/pcalouche/spat/api/controller/TeamControllerTest.java
[ "@ExtendWith(SpringExtension.class)\n@Import({\n SpatProperties.class,\n SecurityUtils.class,\n SecurityConfig.class\n})\npublic abstract class AbstractControllerTest {\n @Autowired\n protected ObjectMapper objectMapper;\n @Autowired\n protected MockMvc mockMvc;\n @Autowired\n ...
import com.pcalouche.spat.AbstractControllerTest; import com.pcalouche.spat.api.EndpointMessages; import com.pcalouche.spat.api.Endpoints; import com.pcalouche.spat.api.dto.TeamDto; import com.pcalouche.spat.api.dto.TeamEditRequest; import com.pcalouche.spat.service.TeamService; import org.junit.jupiter.api.BeforeEach;...
package com.pcalouche.spat.api.controller; @WebMvcTest(TeamController.class) public class TeamControllerTest extends AbstractControllerTest { @MockBean
private TeamService teamService;
5
RandoApp/Rando-android
src/main/java/com/github/randoapp/service/BaseAuthService.java
[ "public class MainActivity extends FragmentActivity {\n\n\n private BroadcastReceiver receiver = new BroadcastReceiver() {\n\n @Override\n public void onReceive(Context context, Intent intent) {\n Log.i(BroadcastReceiver.class, \"Recieved event:\", intent.getAction());\n\n swi...
import android.app.Activity; import android.content.Context; import android.content.Intent; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Toast; import com.android.volley.Response; import com.android.volley.VolleyError; import com.github.randoapp.MainActivity; impor...
package com.github.randoapp.service; public abstract class BaseAuthService { protected Activity activity; protected Progress progress; public BaseAuthService(Activity activity, Progress progress) { this.activity = activity; this.progress = progress; } public void done() { ...
API.syncUserAsync(activity.getBaseContext(), new Response.Listener<JSONObject>() {
1
EthanCo/Halo-Turbo
sample/src/main/java/com/ethanco/sample/MinaTcpServerByteActivity.java
[ "public class Halo extends AbstractHalo {\n private ISocket haloImpl;\n\n public Halo() {\n this(new Builder());\n }\n\n public Halo(Builder builder) {\n this.haloImpl = SocketFactory.create(builder);\n }\n\n @Override\n public boolean start() {\n return this.haloImpl.start...
import android.databinding.DataBindingUtil; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Toast; import com.ethanco.halo.turbo.Halo; import com.ethanco.halo.turbo.ads.IHandlerAdapter; import com.ethanco.halo.turbo.ads.ISession; import com.etha...
package com.ethanco.sample; public class MinaTcpServerByteActivity extends AppCompatActivity { private static final String TAG = "Z-MinaTcpServerByteActivity"; private ActivityMinaTcpServerBinding binding; private ScrollBottomTextWatcher watcher; private Halo halo; @Override protected void...
public void messageReceived(ISession session, Object message) {
2
suguru/mongo-java-async-driver
src/main/java/jp/ameba/mongo/MongoCollectionImpl.java
[ "public enum Consistency {\n\n\tNONE(null),\n\tSAFE(new BasicBSONObject(\"getlasterror\", 1)),\n\tFSYNC(new BasicBSONObject(\"getlasterror\", 1).append(\"fsync\", true)),\n\tREPLICATION(new BasicBSONObject(\"getlasterror\", 1).append(\"w\", 2))\n\t\n\t;\n\t\n\tprivate BSONObject getLastError;\n\n\tprivate Consisten...
import java.util.Arrays; import jp.ameba.mongo.protocol.Consistency; import jp.ameba.mongo.protocol.Delete; import jp.ameba.mongo.protocol.FindAndModify; import jp.ameba.mongo.protocol.Insert; import jp.ameba.mongo.protocol.Query; import jp.ameba.mongo.protocol.Response; import jp.ameba.mongo.protocol.Update; import or...
package jp.ameba.mongo; /** * {@link MongoCollection} 実装 * * @author suguru */ public class MongoCollectionImpl implements MongoCollection { // デフォルトで使用する Consistency レベル private Consistency defaultConsistency = Consistency.SAFE; // 使用するクライアント private MongoClient client; // 対象のデータベース名 private String da...
new Query(
4
ScreenBasedSimulator/ScreenBasedSimulator
sbs/src/main/java/edu/cmu/lti/bic/sbs/web/Server.java
[ "public class DBHelper {\n\tprivate static Statement statement = null;\n\tprivate static PreparedStatement preparedStatement = null;\n\tprivate static ResultSet resultSet = null;\n\tprivate static Connection conn = null;\n\t\n\tpublic static Record[] displayDataBase(String username) throws Exception {\n\t\ttry {\n\...
import static spark.Spark.*; import java.util.HashMap; import com.google.gson.Gson; import edu.cmu.lti.bic.sbs.db.DBHelper; import edu.cmu.lti.bic.sbs.engine.Engine; import edu.cmu.lti.bic.sbs.gson.Patient; import edu.cmu.lti.bic.sbs.gson.Record; import edu.cmu.lti.bic.sbs.gson.Report;
package edu.cmu.lti.bic.sbs.web; public class Server { private Gson gson = new Gson(); private HashMap<String, Engine> engineMap; // Constructor public Server() { engineMap = new HashMap<String, Engine>(); } // Each user holds a distinguished engine, relationship stored in engineMap public Engine getO...
Record[] records = DBHelper.displayDataBase(name);
3
kristian/JDigitalSimulator
src/main/java/lc/kra/jds/components/plugin/ExamplePluginQuick.java
[ "public abstract class Component implements Paintable, Locatable, Moveable, Cloneable, Serializable {\n\tprivate static final long serialVersionUID = 1l;\n\n\tpublic static final ComponentAttributes componentAttributes = null;\n\n\tprivate Point location;\n\tprotected PropertyChangeSupport change;\n\n\tpublic Compo...
import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Point; import lc.kra.jds.components.Component; import lc.kra.jds.components.Component.HiddenComponent; import lc.kra.jds.components.Sociable; import lc.kra.jds.contacts.Contact; import lc.kra.jds.contacts.InputContact; import lc...
/* * JDigitalSimulator * Copyright (C) 2017 Kristian Kraljic * * 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. *...
private InputContact input = new InputContact(this, new Point(0, 25)); /** at position 0, 25, left side */
3
aestasit/slidery
src/main/java/com/aestasit/markdown/slidery/converters/BaseConverter.java
[ "public static int PEGDOWN_ENABLE_ALL_EXTENSIONS = Extensions.ALL; ", "public static int PEGDOWN_ENABLE_ALL_EXTENSIONS_AND_SUPPRESS_HTML = Extensions.ALL + Extensions.SUPPRESS_ALL_HTML;", "public static Document toDom(String text) throws IOException {\n return Jsoup.parse(toSlides(text));\n}", "public inter...
import static com.aestasit.markdown.slidery.Slidery.PEGDOWN_ENABLE_ALL_EXTENSIONS; import static com.aestasit.markdown.slidery.Slidery.PEGDOWN_ENABLE_ALL_EXTENSIONS_AND_SUPPRESS_HTML; import static com.aestasit.markdown.slidery.Slidery.toDom; import static org.apache.commons.io.FileUtils.copyFileToDirectory; import sta...
/* * Copyright (C) 2011-2014 Aestas/IT * * 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 ...
convert(new OutputStreamWriter(outputStream), toDom(inputFile, parserOptions), config);
2
tassioauad/GameCheck
app/src/androidTest/java/com/tassioauad/gamecheck/presenter/SearchGamePresenterTest.java
[ "public class GameBuilder {\n\n public static final Integer DEFAULT_ID = 999;\n\n public static final String DEFAULT_NAME = \"raider\";\n\n public static final String WRONG_NAME = \"hooyah\";\n\n private Integer id;\n\n private String name;\n\n private String aliases;\n\n private Image image;\n...
import android.test.AndroidTestCase; import com.tassioauad.gamecheck.entity.GameBuilder; import com.tassioauad.gamecheck.model.api.GameApi; import com.tassioauad.gamecheck.model.api.asynctask.ApiResultListener; import com.tassioauad.gamecheck.model.entity.Game; import com.tassioauad.gamecheck.view.SearchGameView; impor...
package com.tassioauad.gamecheck.presenter; public class SearchGamePresenterTest extends AndroidTestCase { SearchGamePresenter presenter; SearchGameView view;
GameApi gameApi;
1
XFY9326/FloatText
app/src/main/java/tool/xfy9326/floattext/Setting/FloatWebSetting.java
[ "public abstract class AppCompatPreferenceActivity extends PreferenceActivity {\n\n private AppCompatDelegate mDelegate;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n getDelegate().installViewFactory();\n getDelegate().onCreate(savedInstanceState);\n super.onCr...
import android.Manifest; import android.annotation.TargetApi; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.os.Build; import android...
package tool.xfy9326.floattext.Setting; public class FloatWebSetting extends AppCompatPreferenceActivity { private static final int REQUEST_CODE = 1; private static final int FILE_SELECT_REQUEST_CODE = 2; private static final int FILE_SELECT_PREMISSION_GOT = 3; private String WebUrl; private View...
private FloatLinearLayout linearlayout;
6
idega/com.idega.block.email
src/java/com/idega/block/email/parser/DefaultMessageParser.java
[ "public class EmailConstants {\n\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"com.idega.block.email\";\n\t\n\tpublic static final String MAILING_LIST_MESSAGE_RECEIVER = CoreConstants.PROP_SYSTEM_ACCOUNT;\n\t\n\tpublic static final String MULTIPART_MIXED_TYPE = \"multipart/Mixed\";\n\tpublic static final S...
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logg...
package com.idega.block.email.parser; public abstract class DefaultMessageParser implements EmailParser { private static final Logger LOGGER = Logger.getLogger(DefaultMessageParser.class.getName()); @Autowired private EmailSubjectPatternFinder emailsFinder; @Override
public Map<String, Collection<? extends EmailMessage>> getParsedMessages(Map<String, FoundMessagesInfo> messages, EmailParams params) {
3
mistodev/processing-idea
src/org/idea/processing/plugin/project_creation/ProcessingModuleBuilder.java
[ "public enum ProcessingPluginUtil {\n INSTANCE;\n\n public Collection<VirtualFile> filterFilesAtRoot(@NotNull String path, @NotNull Predicate<VirtualFile> predicate) {\n VirtualFile importableRoot = LocalFileFinder.findFile(path);\n\n if (importableRoot == null) {\n return new HashSet...
import com.intellij.icons.AllIcons; import com.intellij.ide.util.projectWizard.JavaModuleBuilder; import com.intellij.ide.util.projectWizard.ModuleWizardStep; import com.intellij.ide.util.projectWizard.WizardContext; import com.intellij.openapi.application.Application; import com.intellij.openapi.application.Applicatio...
/* * Copyright (c) 2017 mistodev * * This file is part of "Processing IDEA plugin" and 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 2 * of the License, or (at your option) any later ve...
new CreateVersionedProcessingPom(DependencyResolutionBundle.getCentralRepos(),
2
games647/ScoreboardStats
plugin/src/main/java/com/github/games647/scoreboardstats/ScoreboardStats.java
[ "public class SidebarCommands implements TabExecutor {\n\n private final ScoreboardStats plugin;\n\n private final Map<String, CommandHandler> commands = Maps.newHashMap();\n private final List<String> subCommands = Lists.newArrayList();\n\n public SidebarCommands(ScoreboardStats plugin) {\n this...
import com.github.games647.scoreboardstats.commands.SidebarCommands; import com.github.games647.scoreboardstats.config.Settings; import com.github.games647.scoreboardstats.defaults.TicksPerSecondTask; import com.github.games647.scoreboardstats.pvp.Database; import com.github.games647.scoreboardstats.scoreboard.PacketMa...
package com.github.games647.scoreboardstats; /** * Represents the main class of this plugin. */ public class ScoreboardStats extends JavaPlugin { private final Logger logger = createLoggerFromJDK(getLogger()); //don't create instances here that accesses the bukkit API - it will be incompatible with olde...
getCommand(getName().toLowerCase()).setExecutor(new SidebarCommands(this));
0
wakhub/monodict
app/src/main/java/com/github/wakhub/monodict/activity/bean/DatabaseHelper.java
[ "@DatabaseTable(tableName = \"bookmark\")\npublic class Bookmark extends Model {\n\n public static class Column extends Model.Column {\n public static final String URL = \"url\";\n public static final String TITLE = \"title\";\n public static final String DESCRIPTION = \"description\";\n ...
import android.app.Activity; import android.database.Cursor; import com.github.wakhub.monodict.db.Bookmark; import com.github.wakhub.monodict.db.Card; import com.github.wakhub.monodict.db.DatabaseOpenHelper; import com.github.wakhub.monodict.db.Model; import com.github.wakhub.monodict.preferences.Dictionaries; import c...
/* * Copyright (C) 2014 wak * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
@OrmLiteDao(helper = DatabaseOpenHelper.class, model = Card.class)
2
ebolwidt/cassowary-java
src/main/java/org/klomp/cassowary/awt/constraint/BelowConstraint.java
[ "public class CL {\n protected final static boolean fDebugOn = false;\n public static boolean fTraceOn = false; // true;\n protected final static boolean fTraceAdded = false;\n protected final static boolean fGC = false;\n\n protected static void debugprint(String s) {\n System.err.println(s);...
import org.klomp.cassowary.CL; import org.klomp.cassowary.CLInternalError; import org.klomp.cassowary.ClSimplexSolver; import org.klomp.cassowary.RequiredConstraintFailureException; import org.klomp.cassowary.awt.component.ConstrComponent; import org.klomp.cassowary.awt.component.SelPoint; import org.klomp.cassowary.cl...
/* * Below relational constraint. The target CC (the second) is to be * below the first (source) CC at all times, with respect to their bounding * boxes. * * $Id: BelowConstraint.java,v 1.4 1999/12/16 02:10:00 gjb Exp $ * */ package org.klomp.cassowary.awt.constraint; public class BelowConstraint extends Ad...
} catch (CLInternalError e) {
1
Toberumono/WRF-Runner
src/toberumono/wrf/timing/NamelistTiming.java
[ "public class WRFRunnerComponentFactory<T> {\n\tprivate static final Map<Class<?>, WRFRunnerComponentFactory<?>> factories = new HashMap<>();\n\tprivate final Map<String, BiFunction<ScopedMap, Scope, T>> components;\n\tprivate String defaultComponentType;\n\tprivate BiFunction<ScopedMap, Scope, T> disabledComponent...
import java.util.Calendar; import java.util.List; import java.util.stream.Collectors; import toberumono.namelist.parser.Namelist; import toberumono.namelist.parser.NamelistSection; import toberumono.wrf.WRFRunnerComponentFactory; import toberumono.wrf.scope.AbstractScope; import toberumono.wrf.scope.Scope; import tober...
package toberumono.wrf.timing; /** * Implementation of {@link Timing} that uses static data from a {@link Namelist} file instead of computing the timing data at runtime. * * @author Toberumono */ public class NamelistTiming extends AbstractScope<Scope> implements Timing { private static final List<String> TIM...
private final Round round;
7
eshioji/trident-tutorial
src/main/java/tutorial/storm/trident/example/RealTimeTextSearch.java
[ "public class ElasticSearchStateFactory implements StateFactory {\n\n @Override\n public State makeState(Map map, IMetricsContext iMetricsContext, int partitionIndex, int numPartitions) {\n /**\n * Here, we're using a singleton because we're connecting to a local in-memory ES-cluster.\n ...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.LocalDRPC; import backtype.storm.StormSubmitter; import backtype.storm.generated.StormTopology; import backtype.storm.spout.SchemeAsMultiScheme; import backtype.storm.tuple.Fields; import com.google.common.base.Preconditions; import...
package tutorial.storm.trident.example; /** * This topology shows how to index on a search engine (ElasticSearch) a stream made of * tweets and how to query it, using DRPC calls. This example should be intended as * an example of {@link TridentState} custom implementation. * * @author Davide Palmisano (davide.palmis...
.each(new Fields("str"), new ParseTweet(), new Fields("text", "content", "user"))
3
tim-group/karg
src/test/java/com/timgroup/karg/examples/RecordTypeExample.java
[ "public static final Keyword<String> DISPLAY_NAME = newKeyword();", "public interface Keyword<T> extends KeywordArgumentsLens<T> {\n\n KeywordArguments metadata();\n KeywordArgument of(T value);\n T from(KeywordArguments keywordArguments);\n T from(KeywordArguments keywordArguments, T defaultValue);\n...
import static com.timgroup.karg.keywords.Keywords.DISPLAY_NAME; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import java.util.List; import java.util.Map; import org.hamcrest.Matcher; import org.hamcrest.Matchers; import org.junit.Test; import com.google.common.collect.Lis...
package com.timgroup.karg.examples; public class RecordTypeExample { private static abstract class RecordType { // Metadata keywords used to tag keywords that will identify data columns used by a record type.
public static final Keyword<String> COLUMN_NAME = Keywords.newKeyword();
1
Wisebite/wisebite_android
app/src/main/java/dev/wisebite/wisebite/activity/EditUserActivity.java
[ "@Getter\n@Setter\n@AllArgsConstructor(suppressConstructorProperties = true)\n@NoArgsConstructor\n@ToString\n@Builder\npublic class User implements Entity {\n\n private String id;\n private String email;\n private String name;\n private String lastName;\n private String location;\n private String ...
import android.app.ProgressDialog; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; import android.view.WindowManager; imp...
package dev.wisebite.wisebite.activity; public class EditUserActivity extends BaseActivity { public static final String USER_ID = "USER_ID"; private static final int RESULT_LOAD_IMAGE = 1; private UserService userService; private User user;
private FirebaseStorageService storageService;
1
richardtynan/thornsec
src/profile/router/IntWiFi.java
[ "public interface INetworkData extends IData {\n\n\tpublic String[] getServerLabels();\n\n\tpublic String[] getDeviceLabels();\n\n\tpublic String[] getDeviceMacs();\n\n\tpublic String[] getServerProfiles(String server);\n\n\tpublic String getServerData(String server, String label);\n\n\tpublic String getServerUser(...
import java.util.Vector; import core.iface.INetworkData; import core.iface.IProfile; import core.profile.CompoundProfile; import core.unit.SimpleUnit; import profile.Router; import unit.fs.ChildFileUnit; import unit.pkg.InstalledUnit; import unit.pkg.RunningUnit;
package profile.router; public class IntWiFi extends SimpleUnit { public String getLabel() { return "router_int_wifi"; } public Vector<IProfile> getInstalled(String server, INetworkData model) { Vector<IProfile> vec = new Vector<IProfile>();
vec.addElement(new InstalledUnit("hostapd", "hostapd"));
6
gauthierj/dsm-webapi-client
dsm-webapi-client-filestation/src/main/java/com/github/gauthierj/dsm/webapi/client/filestation/delete/DeleteServiceImpl.java
[ "public class DsmWebapiResponse<T> {\n\n private boolean success;\n private T data;\n private DsmWebApiResponseError error;\n\n @JsonCreator\n public DsmWebapiResponse(@JsonProperty(\"success\") boolean success,\n @JsonProperty(\"data\") T data,\n ...
import com.fasterxml.jackson.annotation.JsonProperty; import com.github.gauthierj.dsm.webapi.client.DsmWebapiResponse; import com.github.gauthierj.dsm.webapi.client.AbstractDsmServiceImpl; import com.github.gauthierj.dsm.webapi.client.DsmWebApiResponseError; import com.github.gauthierj.dsm.webapi.client.DsmWebapiReques...
package com.github.gauthierj.dsm.webapi.client.filestation.delete; @Component public class DeleteServiceImpl extends AbstractDsmServiceImpl implements DeleteService { public static final String API_ID = "SYNO.FileStation.Delete"; public static final String API_VERSION = "1"; public static final String P...
public StartDeleteResponse(@JsonProperty("success") boolean success, @JsonProperty("data") TaskId data, @JsonProperty("error") DsmWebApiResponseError error) {
2
matburt/mobileorg-android
MobileOrg/src/main/java/com/matburt/mobileorg/synchronizers/Synchronizer.java
[ "@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\npublic class SynchronizerNotification extends SynchronizerNotificationCompat {\n\tprivate NotificationManager notificationManager;\n\tprivate Notification notification;\n\tprivate int notifyRef = 1;\n\tprivate Context context;\n\n\tpublic SynchronizerNotification...
import android.content.ContentResolver; import android.content.Context; import android.text.TextUtils; import com.matburt.mobileorg.gui.SynchronizerNotification; import com.matburt.mobileorg.gui.SynchronizerNotificationCompat; import com.matburt.mobileorg.orgdata.OrgFile; import com.matburt.mobileorg.orgdata.OrgFilePar...
package com.matburt.mobileorg.synchronizers; /** * The base class of all the synchronizers. * The singleton instance of the class can be retreived using getInstance() * This class implements many of the operations that need to be done on * synching. Instead of using it directly, create a {@link SyncManager}. *...
OrgFileParser.parseFile(orgFile, bufferedReader, context);
3
codeforkjeff/refine_viaf
src/main/java/com/codefork/refine/controllers/ReconcileController.java
[ "@Service\npublic class Config {\n\n public static final String DEFAULT_SERVICE_NAME = \"VIAF Reconciliation Service\";\n private static final String CONFIG_FILENAME = \"refine_viaf.properties\";\n\n private Log log = LogFactory.getLog(Config.class);\n private String serviceName = DEFAULT_SERVICE_NAME;\...
import com.codefork.refine.Config; import com.codefork.refine.NameType; import com.codefork.refine.SearchQuery; import com.codefork.refine.resources.SearchResponse; import com.codefork.refine.resources.ServiceMetaDataResponse; import com.codefork.refine.resources.SourceMetaDataResponse; import com.codefork.refine.viaf....
package com.codefork.refine.controllers; /** * Controller to handle all /reconcile/viaf paths. */ @Controller @RequestMapping("/reconcile") public class ReconcileController { /** * Time to wait for all search threads to finish in a single web request. */ private static final int REQUEST_TIMEOUT_...
private final VIAF viaf;
6
Netflix/netflix-graph
src/main/java/com/netflix/nfgraph/build/NFBuildGraph.java
[ "public static final String CONNECTION_MODEL_GLOBAL = \"global\";", "public abstract class NFGraph {\n\t\n protected final NFGraphSpec graphSpec;\n protected final NFGraphModelHolder modelHolder;\n\n\n protected NFGraph(NFGraphSpec graphSpec) {\n this.graphSpec = graphSpec;\n this.modelHold...
import static com.netflix.nfgraph.NFGraphModelHolder.CONNECTION_MODEL_GLOBAL; import com.netflix.nfgraph.NFGraph; import com.netflix.nfgraph.OrdinalIterator; import com.netflix.nfgraph.OrdinalSet; import com.netflix.nfgraph.compressed.NFCompressedGraph; import com.netflix.nfgraph.compressor.NFCompressedGraphBuilder; im...
/* * 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 appli...
protected OrdinalSet getConnectionSet(int connectionModelIndex, String nodeType, int ordinal, String propertyName) {
3
EndlessCodeGroup/RPGInventory
src/main/java/ru/endlesscode/rpginventory/event/listener/HandSwapListener.java
[ "public enum ActionType {\n SET,\n GET,\n DROP,\n OTHER;\n\n @NotNull\n @Contract(pure = true)\n public static ActionType getTypeOfAction(InventoryAction action) {\n if (action == InventoryAction.PLACE_ALL || action == InventoryAction.PLACE_ONE\n || action == InventoryActi...
import ru.endlesscode.rpginventory.item.ItemManager; import ru.endlesscode.rpginventory.utils.ItemUtils; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryType; import org.bukkit.even...
/* * This file is part of RPGInventory. * Copyright (C) 2015-2017 Osip Fatkullin * * RPGInventory 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) a...
Slot offHandSlot = SlotManager.instance().getShieldSlot();
3
hermannhueck/reactive-mongo-access
src/main/java/shopJava/queries/QueryJ10RxStreamsWithAkkaStreams.java
[ "public class Credentials {\n\n public final String username;\n public final String password;\n\n public Credentials(final String username, final String password) {\n this.username = username;\n this.password = password;\n }\n}", "public class Order {\n\n private static final String I...
import akka.Done; import akka.NotUsed; import akka.actor.ActorSystem; import akka.stream.ActorMaterializer; import akka.stream.javadsl.Source; import com.mongodb.rx.client.MongoClient; import com.mongodb.rx.client.MongoClients; import com.mongodb.rx.client.MongoCollection; import com.mongodb.rx.client.MongoDatabase; im...
package shopJava.queries; @SuppressWarnings("Convert2MethodRef") public class QueryJ10RxStreamsWithAkkaStreams { public static void main(String[] args) throws Exception { new QueryJ10RxStreamsWithAkkaStreams(); } private final DAO dao = new DAO(); private class DAO { private fina...
private Single<User> _findUserByName(final String name) {
3
lrscp/ControlAndroidDeviceFromPC
src/com/android/ddmuilib/handler/MethodProfilingHandler.java
[ "public interface IMethodProfilingHandler {\n /**\n * Called when a method tracing was successful.\n * @param remoteFilePath the device-side path of the trace file.\n * @param client the client that was profiled.\n */\n void onSuccess(String remoteFilePath, Client client);\n\n /**\n * C...
import com.android.ddmlib.Client; import com.android.ddmlib.ClientData.IMethodProfilingHandler; import com.android.ddmlib.DdmConstants; import com.android.ddmlib.IDevice; import com.android.ddmlib.Log; import com.android.ddmlib.SyncException; import com.android.ddmlib.SyncService; import com.android.ddmlib.SyncService....
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
SyncProgressHelper.run(new SyncRunnable() {
3
TarsierMessenger/TarsierMessenger
app/src/main/java/ch/tarsier/tarsier/util/TarsierMessageFactory.java
[ "public class Tarsier extends Application {\n\n private static final String TARSIER_TAG = \"TarsierApp\";\n private static Tarsier app;\n\n private UserPreferences mUserPreferences;\n private Database mDatabase;\n private EventHandler mEventHandler;\n\n private PeerRepository mPeerRepository;\n ...
import com.google.protobuf.ByteString; import ch.tarsier.tarsier.Tarsier; import ch.tarsier.tarsier.crypto.CBCEncryptionProduct; import ch.tarsier.tarsier.crypto.PeerCipher; import ch.tarsier.tarsier.exception.PeerCipherException; import ch.tarsier.tarsier.network.messages.MessageType; import ch.tarsier.tarsier.network...
package ch.tarsier.tarsier.util; /** * TarsierMessageFactory is the class that provides utilities for the Proto. * * @author FredericJacobs */ public class TarsierMessageFactory { public static byte[] wirePrivateProto(byte[] peerPublicKey, byte[] message) throws PeerCipherException { by...
TarsierPrivateMessage.Builder privateMessage = TarsierPrivateMessage.newBuilder();
5
Tubitv/TubiPlayer
lib/src/main/java/com/tubitv/media/controller/PlayerAdLogicController.java
[ "public class AdPlayingMonitor extends EventLogger {\n\n public FsmAdController fsmPlayer;\n\n public AdPlayingMonitor(@NonNull FsmPlayer fsmPlayer) {\n super(null);\n this.fsmPlayer = fsmPlayer;\n }\n\n @Override\n public void onPlayerStateChanged(EventTime eventTime, boolean playWhenR...
import android.support.annotation.Nullable; import com.tubitv.media.fsm.listener.AdPlayingMonitor; import com.tubitv.media.fsm.listener.CuePointMonitor; import com.tubitv.media.interfaces.DoublePlayerInterface; import com.tubitv.media.interfaces.PlaybackActionCallback; import com.tubitv.media.models.VpaidClient;
package com.tubitv.media.controller; /** * Created by allensun on 8/11/17. * on Tubitv.com, allengotstuff@gmail.com */ public class PlayerAdLogicController { private AdPlayingMonitor adPlayingMonitor;
private PlaybackActionCallback playbackActionCallback;
3
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentPlainImpl.java
[ "public interface ComponentPlain extends Component {\n\n\tpublic abstract PropertiesPlain getProperties();\n}", "public interface PropertiesPlain extends PropertiesComponent {\n\n\tpublic abstract LocalizedStringBean getText();\n\n\tpublic abstract void setText(LocalizedStringBean text);\n}", "public class Comp...
import com.idega.documentmanager.business.component.ComponentPlain; import com.idega.documentmanager.business.component.properties.PropertiesPlain; import com.idega.documentmanager.component.properties.impl.ComponentPropertiesPlain; import com.idega.documentmanager.component.properties.impl.ConstUpdateType; import com....
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.9 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentPlainImpl extends FormComponentImpl implements ComponentPlain { @O...
public XFormsManagerPlain getXFormsManager() {
4
rodolfodpk/myeslib
inventory-hazelcast/src/main/java/org/myeslib/example/hazelcast/modules/CamelModule.java
[ "@SuppressWarnings(\"serial\")\n@Value\npublic class Snapshot<A extends AggregateRoot> implements Serializable {\n\t\n\tprivate A aggregateInstance;\n\tprivate Long version;\n\n}", "public interface SnapshotReader<K, A extends AggregateRoot> {\n\t\n\tpublic Snapshot<A> get(final K id) ;\n\n}", "@Data\npublic st...
import java.util.UUID; import javax.inject.Singleton; import lombok.AllArgsConstructor; import org.myeslib.core.data.Snapshot; import org.myeslib.core.storage.SnapshotReader; import org.myeslib.example.SampleDomain.InventoryItemAggregateRoot; import org.myeslib.example.hazelcast.infra.HazelcastData; import org.myeslib....
package org.myeslib.example.hazelcast.modules; @AllArgsConstructor public class CamelModule extends AbstractModule { int jettyMinThreads; int jettyMaxThreads; int eventsQueueConsumers; @Provides @Singleton @Named("commandsDestinationUri") public String commandsDestinationUri() { ...
public HzConsumeCommandsRoute hzConsumeCommandsRoute(
4
ajonkisz/TraVis
src/travis/view/playback/PlaybackPanel.java
[ "public class UIGraphicsHelper {\n\n private static final UIGraphicsHelper INSTANCE = new UIGraphicsHelper();\n\n private UIGraphicsHelper() {\n }\n\n public static UIGraphicsHelper getInstance() {\n return INSTANCE;\n }\n\n public void resetConnectionsAndRepaintGraph() {\n resetConn...
import travis.controller.UIHelper; import travis.model.attach.AttacherFactory; import travis.model.attach.Playback; import travis.model.attach.Playback.Mode; import travis.model.script.FileParser; import travis.view.Util; import travis.view.settings.Settings; import java.awt.Graphics; import java.awt.event.ActionEvent;...
/* * PlaybackPanel.java * * Copyright (C) 2011-2012, Artur Jonkisz, <travis.source@gmail.com> * * This file is part of TraVis. * See https://github.com/ajonkisz/TraVis for more info. * * TraVis is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as pub...
private Playback playback;
3
y1j2x34/spring-influxdb-orm
spring-influxdb-orm/src/main/java/com/vgerbot/orm/influxdb/exec/ExecuteExecutor.java
[ "public class MapperMethod {\n\tprivate final Executor executor;\n\tprivate final ParameterProducer producer;\n\tprivate final MethodSignature methodSignature;\n\tprivate final MapperInterface mapperInterface;\n\tprivate final InfluxDBRepository repository;\n\n\tpublic MapperMethod(Class<?> mapperInterface, InfluxD...
import java.util.Map; import com.vgerbot.orm.influxdb.annotations.InfluxDBExecute; import com.vgerbot.orm.influxdb.binding.MapperMethod; import com.vgerbot.orm.influxdb.param.ParameterValue; import com.vgerbot.orm.influxdb.repo.InfluxDBRepository; import com.vgerbot.orm.influxdb.result.ResultContext; import com.vgerbot...
package com.vgerbot.orm.influxdb.exec; public class ExecuteExecutor extends AnnotationExecutor<InfluxDBExecute> { public ExecuteExecutor(InfluxDBRepository repository, InfluxDBExecute annotation) { super(repository, annotation); } @Override
public ResultContext execute(MapperMethod method, Map<String, ParameterValue> parameters) {
1
ralscha/eds-starter6-jpa
src/main/java/ch/rasc/eds/starter/config/security/JsonAuthSuccessHandler.java
[ "@JsonInclude(Include.NON_NULL)\npublic class UserDetailDto {\n\n\tprivate final String firstName;\n\n\tprivate final String lastName;\n\n\tprivate final String locale;\n\n\tprivate final String autoOpenView;\n\n\tprivate final boolean preAuth;\n\n\tprivate final String csrf;\n\n\tpublic UserDetailDto(JpaUserDetail...
import java.io.IOException; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.security.core.Authentica...
package ch.rasc.eds.starter.config.security; @Component public class JsonAuthSuccessHandler implements AuthenticationSuccessHandler { private final JPAQueryFactory jpaQueryFactory; private final ObjectMapper objectMapper; public JsonAuthSuccessHandler(JPAQueryFactory jpaQueryFactory, ObjectMapper objectM...
User user = jpaUserDetails.getUser(this.jpaQueryFactory);
1
cs2103jan2015-w13-3j/main
src/udo/logic/Logic.java
[ "public class Gui extends Application {\n \n private static final Logger logger = Logger.getLogger(Gui.class.getName());\n\n private static final String _NAME_APP = \"JustU\";\n\n private static final int _MAX_WORDS = 5;\n\n private static final int _OFFSET_DISPLAY = 250;\n\n private static final ...
import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import udo.gui.Gui; import udo.logic.command.Command; import udo.storage.Storage; import udo.storage.Task; import udo.testdriver.GuiStub; import udo.util.Config; import udo.util.Utility;
package udo.logic; //@author A0093587M public class Logic { private Gui gui; private static Logic logicObj = null; private Storage storage; private Reminder reminder; private static final String ERR_FORMAT = "Error: %s"; public static final String ERR_INVALID_CMD_NAME = "invalid command name...
if (tokens[0].equals(Config.CMD_STR_MODIFY)) {
5
carrotsearch/hppc
hppc/src/main/templates/com/carrotsearch/hppc/KTypeWormSet.java
[ "public final class KTypeCursor<KType> {\n /**\n * The current value's index in the container this cursor belongs to. The\n * meaning of this index is defined by the container (usually it will be an\n * index in the underlying storage buffer).\n */\n public int index;\n\n /**\n * The current value.\n ...
import com.carrotsearch.hppc.cursors.KTypeCursor; import com.carrotsearch.hppc.predicates.KTypePredicate; import com.carrotsearch.hppc.procedures.KTypeProcedure; import java.util.Arrays; import java.util.Iterator; import static com.carrotsearch.hppc.Containers.DEFAULT_EXPECTED_ELEMENTS; import static com.carrotsearch.h...
/*! #set($TemplateOptions.ignored = ($TemplateOptions.isKTypeAnyOf("DOUBLE", "FLOAT", "BYTE"))) !*/ package com.carrotsearch.hppc; /** * A hash set of <code>KType</code>s, implemented using Worm Hashing strategy. * * <p>This strategy is appropriate for a medium sized set (less than 2M keys). It takes more time ...
public <T extends KTypeProcedure<? super KType>> T forEach(T procedure) {
2
MatejVancik/amaroKontrol
amaroKontrol_wear/mobile/src/main/java/com/mv2studio/amarok/kontrol/ui/Fragment/ArtistFragment.java
[ "public class PlaylistAdapter extends ArrayAdapter<Song> {\n\n\tprotected static final int ALBUM = 0;\n\tprotected static final int SONG = 1;\n\n protected ArrayList<Song> mData;\n\tprotected BaseActivity mBaseActivity;\n\tprotected LayoutInflater mInflater;\n\n\tprotected BitmapConcurrencyHandler mBch;\n\n p...
import android.content.Context; import android.graphics.Color; import android.os.AsyncTask; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animat...
package com.mv2studio.amarok.kontrol.ui.Fragment; public class ArtistFragment extends BaseFragment { public static final String ARG_ARTIST_ID = "id"; private ListView mListView; private ArtistDetailAdapter mArtistDetailAdapter; View header; private static int sLastArtistId = -1; @Override ...
.setMaxHeight(CommonHelper.getScreenSize(getActivity())[1] / 2);
3
tndatacommons/android-app
compass/src/main/java/org/tndata/android/compass/adapter/GoalAdapter.java
[ "public final class R {\n}", "public interface ResultSet{\n\n}", "public class Reward implements Parcelable{\n private static final String QUOTE = \"quote\";\n private static final String FORTUNE = \"fortune\";\n private static final String FACT = \"fact\";\n private static final String JOKE = \"jok...
import android.content.Context; import android.graphics.Color; import android.os.Build; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewTreeObserver; import android.widget.Button; import org.tndata.android.compass.R; import org....
package org.tndata.android.compass.adapter; /** * Adapter for GoalActivity. * * @author Ismael Alonso * @version 1.0.0 */ public class GoalAdapter extends MaterialAdapter implements View.OnClickListener, HttpRequest.RequestCallback, Parser.Parser...
private TDCGoal mGoal;
3
spring-cloud/spring-cloud-zookeeper
spring-cloud-zookeeper-discovery/src/main/java/org/springframework/cloud/zookeeper/discovery/configclient/ZookeeperConfigServerBootstrapper.java
[ "public abstract class CuratorFactory {\n\n\tprivate static final Log log = LogFactory.getLog(ZookeeperAutoConfiguration.class);\n\n\tpublic static CuratorFramework curatorFramework(ZookeeperProperties properties, RetryPolicy retryPolicy,\n\t\t\tSupplier<Stream<CuratorFrameworkCustomizer>> optionalCuratorFrameworkC...
import org.apache.curator.framework.CuratorFramework; import org.apache.curator.x.discovery.ServiceDiscovery; import org.apache.curator.x.discovery.ServiceDiscoveryBuilder; import org.apache.curator.x.discovery.details.InstanceSerializer; import org.apache.curator.x.discovery.details.JsonInstanceSerializer; import org....
/* * Copyright 2015-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
registry.registerIfAbsent(ZookeeperDiscoveryClient.class, context -> {
1
PeterisP/morphology
src/test/java/lv/semti/morphology/Testi/MorphologyTest.java
[ "public class Analyzer extends Lexicon {\r\n\r\n\tpublic boolean enablePrefixes = true;\r\n\tpublic boolean meklētsalikteņus = false;\r\n\tpublic boolean enableGuessing = false;\r\n\tpublic boolean enableDiminutive = true;\r\n\tpublic boolean enableDerivedNouns = true; // FIXME - šim vajag saprast korektu terminu\r...
import org.junit.Test; import java.io.*; import java.util.*; import java.util.Map.Entry; import static org.junit.Assert.*; import lv.semti.morphology.analyzer.Analyzer; import lv.semti.morphology.analyzer.Splitting; import lv.semti.morphology.analyzer.Word; import lv.semti.morphology.analyzer.Wordform; import ...
/****************************************************************************** Copyright 2008, 2009, 2014 Institute of Mathematics and Computer Science, University of Latvia Author: Pēteris Paikens This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Publ...
Word analysis = locītājs.analyze(word);
2
liaozhoubei/NetEasyNews
app/src/main/java/cn/bproject/neteasynews/fragment/SettingFragment.java
[ "public class DataCleanManager {\n /**\n * 清除本应用内部缓存(/data/data/com.xxx.xxx/cache) * *\n *\n * @param context\n */\n public static void cleanInternalCache(Context context) {\n deleteFilesByDirectory(context.getCacheDir());\n }\n\n /**\n * * 清除本应用所有数据库(/data/data/com.xxx.xxx/d...
import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.ListPreference; import android.preference.PreferenceFragment; import android.preference.PreferenceManager; import java.io.File; import cn.bproject.neteasynews.R; import cn.bproject.neteasynews.U...
package cn.bproject.neteasynews.fragment; /** * Created by Administrator on 2017/2/17. */ public class SettingFragment extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener, DefineView { private final String TAG = SettingFragment.class.getSimpleName(); private MyDialogP...
LogUtils.d(TAG, "取消清除缓存");
1
jbossas/jboss-vfs
src/main/java/org/jboss/vfs/VFS.java
[ "public class AssemblyFileSystem implements FileSystem {\n\n private final VirtualFileAssembly assembly;\n\n public AssemblyFileSystem(VirtualFileAssembly assembly) {\n this.assembly = assembly;\n VFSLogger.ROOT_LOGGER.tracef(\"Constructed a new assembly filesystem for %s\", assembly);\n }\n\...
import java.io.Closeable; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.AbstractSet; import java.util.Collection; import java.util.Collections; import java.util....
* @throws IOException for any problem accessing the virtual file system */ public static List<VirtualFile> getChildren(VirtualFileFilter filter) throws IOException { return getRootVirtualFile().getChildren(filter); } /** * Get all the children recursively<p> * <p/> * This a...
final MountHandle handle = doMount(new JavaZipFileSystem(zipFile, tempDir), mountPoint);
2
PedroGomes/TPCw-benchmark
TPCW_Riak_Implementation/src/pt/fct/di/benchmarks/TPCW_Riak/database/TPCWRiakExecutorFactory.java
[ "public class NodeKeyGenerator implements KeyGenerator {\n\n int nodeID;\n\n\n public NodeKeyGenerator(int nodeID) {\n this.nodeID = nodeID;\n }\n\n public synchronized Object getNextKey() {\n\n long timestamp = Long.MAX_VALUE - System.currentTimeMillis();\n //max long as 19 charact...
import org.uminho.gsd.benchmarks.generic.helpers.NodeKeyGenerator; import org.uminho.gsd.benchmarks.benchmark.BenchmarkExecutor; import org.uminho.gsd.benchmarks.helpers.TPM_counter; import org.uminho.gsd.benchmarks.helpers.ThinkTime; import org.uminho.gsd.benchmarks.interfaces.executor.AbstractDatabaseExecutorFactory;...
/* * ********************************************************************* * Copyright (c) 2010 Pedro Gomes and Universidade do Minho. * 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...
TPM_counter tpm_counter = new TPM_counter();
2
beerbong/com_beerbong_zipinst
src/com/beerbong/zipinst/core/plugins/superuser/SuperUserPlugin.java
[ "public interface Core extends Serializable {\n\n public static final String PLUGIN_UI = \"UIPlugin\";\n public static final String PLUGIN_SUPERUSER = \"SuperUserPlugin\";\n public static final String PLUGIN_RECOVERY = \"RecoveryPlugin\";\n public static final String PLUGIN_STORAGE = \"StoragePlugin\";\...
import android.os.AsyncTask; import com.beerbong.zipinst.R; import com.beerbong.zipinst.core.Core; import com.beerbong.zipinst.core.CoreImpl; import com.beerbong.zipinst.core.Plugin; import com.beerbong.zipinst.ui.widget.Dialog; import com.beerbong.zipinst.ui.widget.Dialog.OnDialogClosedListener;
/* * Copyright 2014 ZipInstaller Project * * This file is part of ZipInstaller. * * ZipInstaller 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) a...
((CoreImpl) getCore()).setMessage(R.string.requesting_su);
1
Nilhcem/devoxxfr-2016
app/src/main/java/com/nilhcem/devoxxfr/ui/schedule/day/ScheduleDayFragment.java
[ "@DebugLog\npublic class DevoxxApp extends Application {\n\n private AppComponent component;\n\n public static DevoxxApp get(Context context) {\n return (DevoxxApp) context.getApplicationContext();\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n AndroidThreeTen...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.hannesdorfmann.fragmentargs.annotation.Arg; i...
package com.nilhcem.devoxxfr.ui.schedule.day; @FragmentWithArgs public class ScheduleDayFragment extends BaseFragment<ScheduleDayPresenter> implements ScheduleDayView, ScheduleDayEntry.OnSessionClickListener { @Arg boolean allSessions; @Arg ScheduleDay scheduleDay; @Inject Picasso picasso;
@Inject SelectedSessionsMemory selectedSessionsMemory;
1
lukasniemeier/mensaapp
MensaApp/src/main/java/de/lukasniemeier/mensa/parser/WeeklyMenuParser.java
[ "public class Meal implements Serializable {\n\n private final Menu menu;\n private final String name;\n private final String description;\n private final Collection<MealType> types;\n private final Collection<String> additives;\n private final String price;\n\n public Meal(Menu menu, String na...
import android.content.Context; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import de.lukasnieme...
package de.lukasniemeier.mensa.parser; /** * Created on 17.09.13. */ public abstract class WeeklyMenuParser { public static final String SPECIAL_MEAL_NOODLE = "Nudeltheke"; public static String mapAdditive(Context context, String additiveKey) { String[] additiveNames = context.getResources().ge...
public WeeklyMenu parse() throws WeeklyMenuParseException {
4
iobeam/iobeam-client-java
src/test/java/com/iobeam/api/client/IobeamTest.java
[ "@Deprecated\npublic class DataPoint implements Serializable {\n\n private static final String KEY_TIME = \"time\";\n private static final String KEY_VALUE = \"value\";\n\n public static final byte TYPE_LONG = 0x0;\n public static final byte TYPE_DOUBLE = TYPE_LONG + 1;\n public static final byte TYP...
import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertFalse; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertNull; import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertNotEquals; import com....
package com.iobeam.api.client; public class IobeamTest { private static final long PROJECT_ID = 1; private static final String PROJECT_TOKEN = "fake_token"; private static final String DEVICE_ID = "fake_device_identifier"; private static final String FILE_PATH = new File(".").getAbsolutePath(); ...
Import ds = iobeam.getDataStore();
2
ceylon/ceylon-module-resolver
maven/src/test/java/com/redhat/ceylon/test/maven/test/AetherTestCase.java
[ "@SuppressWarnings(\"serial\")\npublic class ArtifactContext implements Serializable, ContentOptions {\n public static final String CAR = \".car\";\n public static final String JAR = \".jar\";\n public static final String JS_MODEL = \"-model.js\";\n public static final String JS = \".js\";\n public s...
import com.redhat.ceylon.model.cmr.ArtifactResult; import org.junit.Assert; import org.junit.Test; import java.io.File; import java.net.URISyntaxException; import java.net.URL; import java.util.List; import com.redhat.ceylon.cmr.api.ArtifactContext; import com.redhat.ceylon.cmr.api.CmrRepository; import com.redhat.ceyl...
/* * Copyright 2011 Red Hat inc. and third party contributors as noted * by the author tags. * 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/LICENS...
RepositoryManager manager = new SimpleRepositoryManager(repository, log);
4
TalkingData/Myna
Android/lib-Myna/src/main/java/com/talkingdata/myna/MynaTrainTest.java
[ "public class Feature {\n private int batchSize;\n private SensorFeature feature;\n\n public Feature() {\n feature = new SensorFeature();\n batchSize = 0;\n }\n\n /**\n * Get selected feature\n * @return selected feature\n */\n public SensorFeature getSelectedFeatures(){\...
import android.content.Context; import android.os.Environment; import android.util.Log; import android.util.SparseArray; import android.util.SparseIntArray; import com.talkingdata.myna.sensor.Feature; import com.talkingdata.myna.sensor.SensorData; import com.talkingdata.myna.sensor.SensorFeature; import com.talkingdata...
package com.talkingdata.myna; class MynaTrainTest { private MynaTrainTestCallback ttcallback; private Context context; private int attrSize = 30; private int labelNum = 6; private int maxS = 10; private int treeNum = 3; private int maxTreeDepth = 15; private Node[] trees = new Node...
private SparseArray<Feature> rfFeatures = new SparseArray<>();
0
MCBans/MCBans
src/main/java/com/mcbans/plugin/actions/UnbanSync.java
[ "public class ActionLog {\n private final Logger logger = Logger.getLogger(\"Minecraft\");\n private final String logPrefix = \"[MCBans] \";\n\n private final MCBans plugin;\n private static ActionLog instance;\n\n public ActionLog(final MCBans plugin){\n instance = this;\n this.plugin ...
import com.mcbans.plugin.ActionLog; import com.mcbans.plugin.MCBans; import com.mcbans.utils.ReadFromInputStream; import com.mcbans.utils.TooLargeException; import com.mcbans.utils.WriteToOutputStream; import org.bukkit.BanList; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import...
package com.mcbans.plugin.actions; public class UnbanSync { private final MCBans plugin; private final ActionLog log; public UnbanSync(MCBans plugin){ this.plugin = plugin; this.log = plugin.getLog(); } public void handle(InputStream is, OutputStream os) throws IOException, TooLargeException { ...
WriteToOutputStream.writeBoolean(os,true);
4
MinecraftForge/Srg2Source
src/test/java/net/minecraftforge/srg2source/test/MinecraftTest.java
[ "public class RangeApplierBuilder {\n private PrintStream logStd = System.out;\n private PrintStream logErr = System.err;\n private List<InputSupplier> inputs = new ArrayList<>();\n private OutputSupplier output = null;\n private Consumer<RangeApplier> range = null;\n private List<Consumer<RangeAp...
import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintStream; import java.lang.reflect.Constructor; import java.net.URI; import java.n...
/* * Srg2Source * Copyright (c) 2020. * * 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 2.1 * of the License. * * This library is distributed in the hope that it will be u...
RangeApplierBuilder builder = new RangeApplierBuilder()
0
mzule/AndroidWeekly
app/src/main/java/com/github/mzule/androidweekly/ui/activity/FavoriteActivity.java
[ "public class FavoriteDao extends SQLiteOpenHelper {\n private static final String NAME = \"favorite\";\n private static final int VERSION = 1;\n private static final int INDEX_TITLE = 1;\n private static final int INDEX_BRIEF = 2;\n private static final int INDEX_LINK = 3;\n private static final ...
import android.content.Context; import android.content.Intent; import android.support.v4.widget.DrawerLayout; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import android.widget.Toast; import com.github.mzule.androidweekly.R; import com.github.mzule.androidweekly.dao.Favor...
package com.github.mzule.androidweekly.ui.activity; /** * Created by CaoDongping on 3/28/16. */ @Layout(R.layout.activity_favorite) public class FavoriteActivity extends BaseActivity { private static final int REQUEST_CODE_OPEN_ARTICLE = 0x1; @Bind(R.id.drawerLayout) DrawerLayout drawerLayout; @B...
String time = DateUtil.format(favorite.getTime());
4
IcarPA-TBlab/BioGraph
biograph-etl/src/main/java/it/cnr/icar/biograph/neo4j/Uniprot.java
[ "@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"commentType\", propOrder = {\n \"molecule\",\n \"absorption\",\n \"kinetics\",\n \"phDependence\",\n \"redoxPotential\",\n \"temperatureDependence\",\n \"cofactor\",\n \"subcellularLocation\",\n \"conflict\",\n \"link\",\n \"...
import java.io.FileReader; import javax.xml.bind.JAXBContext; import javax.xml.bind.Unmarshaller; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamReader; import org.neo4j.graphdb.DynamicLabel; import org.neo4j.graphdb.GraphDatabaseService; import org...
package it.cnr.icar.biograph.neo4j; public class Uniprot extends Importer { protected void importer(GraphDatabaseService graphDb, String fileName) throws Exception { System.out.print("\nReading proteins entries from " + fileName + " "); //Label PUBMED = DynamicLabel.label( "Pubmed" ); Label PR...
ProteinType prot = entry.getProtein();
5
OOjDREW/OOjDREW
src/main/java/org/ruleml/oojdrew/util/TaxonomyQueryAPI.java
[ "public enum SyntaxFormat {\n\tRDFS,\n\tRULEML,\n\tPOSL\n}", "public class POSLTypeQueryException extends Exception {\r\n\t\r\n\t/**\r\n\t * Id of the Exception\r\n\t */\r\n\tprivate static final long serialVersionUID = 1L;\r\n\t\r\n\t/**\r\n\t * Constructor for a RuleMLTypeQueryExcetion\r\n\t * \r\n\t * @param m...
import org.ruleml.oojdrew.parsing.RDFSParser; import org.ruleml.oojdrew.parsing.RuleMLTypeQueryException; import org.ruleml.oojdrew.parsing.SubsumesException; import org.ruleml.oojdrew.parsing.SubsumesParser; import org.ruleml.oojdrew.parsing.TypeQueryParserPOSL; import org.ruleml.oojdrew.parsing.TypeQueryParserRu...
// OO jDREW - An Object Oriented extension of the Java Deductive Reasoning Engine for the Web // Copyright (C) 2005 Marcel Ball // // 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; ...
RDFSParser.parseRDFSString(taxonomy);
3
iostackproject/SDGen
src/com/ibm/utils/Utils.java
[ "public abstract class AbstractCompression {\n\t\n\t//We measure bits of entropy in a byte basis\n\tpublic static final int MIN_ENTROPY_BITS = 0;\n\tpublic static final int MAX_ENTROPY_BITS = 8; \t\n\n\tpublic static final String compressionPackagePath = \"com.ibm.compression.\";\n\t\n\tpublic static final int read...
import com.ibm.compression.AbstractCompressionFactory; import com.ibm.config.PropertiesStore; import com.ibm.config.PropertyNames; import com.ibm.deduplication.Finger; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; ...
/* * Copyright (C) 2014 Raul Gracia-Tinedo * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This progr...
PropertiesStore.getAppProperties().get(
2
fredg02/se.bitcraze.crazyflie.lib
se.bitcraze.crazyflie.lib/src/main/java/se/bitcraze/crazyflie/lib/bootloader/Cloader.java
[ "public class Utilities {\n\n private Utilities() {\n throw new IllegalStateException(\"Utility class\");\n }\n\n /**\n * Returns byte array as comma separated string\n * (for debugging purposes)\n *\n * @param data\n * @return\n */\n public static String getByteString(byt...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import se.bitcraze.crazyflie.lib.Utilities; import se.bitcraze.crazyflie.lib.bootloader.Target.TargetTypes; import se.bitcraze.crazyflie.lib.crazyradio.ConnectionDa...
//time.sleep(0.1) return updateInfo(TargetTypes.STM32); //TODO: which targetId?? } /** * Reset to firmware. * * @param targetId * @return true if the reset has been done */ public boolean resetToFirmware(int targetId) { /* * The fake CPU ID is lega...
mLogger.debug("Setting bootloader radio address to {}", Utilities.getHexString(newAddress));
0
elvis-liu/dummie
src/main/java/com/exmertec/dummie/DummyBuilderFactory.java
[ "public abstract class DataGenerator {\n\n private final List<FieldValueGenerator> generators;\n\n private final Set<String> randomFieldKeys;\n\n private final Set<Class<?>> randomFieldType;\n\n protected DataCache dataCache;\n\n protected GenerationStrategy strategy;\n\n public DataGenerator(Gene...
import com.exmertec.dummie.generator.data.DataGenerator; import com.exmertec.dummie.generator.data.impl.DefaultGenerator; import com.exmertec.dummie.generator.data.impl.LevelGenerator; import com.exmertec.dummie.configuration.Configuration; import com.exmertec.dummie.configuration.CycleLogic; import com.exmertec.dummie...
package com.exmertec.dummie; public class DummyBuilderFactory { private Configuration configuration; public DummyBuilderFactory() {
configuration = new Configuration(CycleLogic.CYCLE, GenerationStrategy.DEFAULT);
5
SERG-Delft/jpacman-framework
src/main/java/nl/tudelft/jpacman/level/Level.java
[ "public class Board {\n\n /**\n * The grid of squares with board[x][y] being the square at column x, row y.\n */\n private final Square[][] board;\n\n /**\n * Creates a new board.\n *\n * @param grid\n * The grid of squares with grid[x][y] being the square at column\n ...
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import nl.tude...
package nl.tudelft.jpacman.level; /** * A level of Pac-Man. A level consists of the board with the players and the * AIs on it. * * @author Jeroen Roosen */ @SuppressWarnings("PMD.TooManyMethods") public class Level { /** * The board of this level. */ private final Board board; /** ...
public void move(Unit unit, Direction direction) {
1
martincooper/java-datatable
src/test/java/QuickSortTests.java
[ "public class DataTable implements IBaseTable {\n\n private final String name;\n private final DataRowCollectionModifiable rows;\n private final DataColumnCollection columns;\n\n /**\n * Private DataTable constructor. Empty Table with no columns.\n * Use 'build' to create instance.\n *\n ...
import com.github.martincooper.datatable.DataTable; import com.github.martincooper.datatable.DataTableBuilder; import com.github.martincooper.datatable.DataView; import com.github.martincooper.datatable.sorting.SortItem; import com.github.martincooper.datatable.sorting.SortOrder; import io.vavr.collection.List; import ...
/** * Tests for Quick Sorting. * Created by Martin Cooper on 29/07/2017. */ public class QuickSortTests { @Test public void testSimpleQuickSort() { DataTable table = DataTableBuilder .create("NewTable") .withColumn(Integer.class, "IntCol", List.of(3, 20, 4, 18, 0, ...
Try<DataView> view = table.quickSort("IntCol", SortOrder.Descending);
4
Beloumi/PeaFactory
src/peafactory/gui/ProjectSelection.java
[ "public final class PeaFactory {\n\n\t// i18n: \t\n\tprivate static String language; \n\tprivate static Locale currentLocale;\n\tprivate static Locale defaultLocale = Locale.getDefault();\n\tprivate static ResourceBundle languageBundle;\n\tpublic static final Charset UTF_8 = Charset.forName(\"UTF-8\");\n\t\n\tpriva...
import javax.swing.border.EmptyBorder; import cologne.eck.peafactory.PeaFactory; import cologne.eck.peafactory.peagen.*; import cologne.eck.peafactory.peas.editor_pea.EditorType; import cologne.eck.peafactory.peas.file_pea.FileType; import cologne.eck.peafactory.peas.image_pea.ImageType; import cologne.eck.peafactory.p...
notesButton.setActionCommand("notes"); notesButton.addItemListener(this); simpleNotesCheck = new JCheckBox(); simpleNotesCheck.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 12)); simpleNotesCheck.setText(languageBundle.getString("selection_simple_notes")); simpleNotesCheck.setToolTi...
DataType.setCurrentType( new FileType() );
2
JoshuaD84/HypnosMusicPlayer
src/net/joshuad/hypnos/fxui/TagWindow.java
[ "public class CurrentListTrack extends Track {\n\t@SuppressWarnings(\"unused\")\n\tprivate static final Logger LOGGER = Logger.getLogger(CurrentListTrack.class.getName());\n\tprivate static final long serialVersionUID = 1L;\n\tprivate boolean isCurrentTrack = false;\n\tprivate boolean lastCurrentListTrack = false;\...
import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; import java.util.ArrayList; import java.util.Arrays; import j...
List <Album> albumList = ui.library.getAlbumsSorted(); if ( albumList == null || albumList.size() == 0 ) return; int thisIndex = albumList.indexOf( albums.get ( 0 ) ); int targetIndex = 0; if ( thisIndex != -1 ) targetIndex = ( thisIndex + albumList.size() + offset ) % albumList.size(); FieldKey[] hid...
for ( ImageFieldKey key : ImageFieldKey.values() ) {
6
wisedog/Whoochoo
src/net/wisedog/android/whooing/activity/AccountsSetting.java
[ "public class AccountsEntity implements Parcelable{\n /** String for Asset, liabilities and so on*/\n public String accountType = null;\n /** account id like X1, X2*/\n public String account_id = null;\n /** account type - 'account' or 'group*/\n public String type = null;\n /** The name of the...
import android.widget.Button; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TableRow.LayoutParams; import android.widget.Toast; import java.util.ArrayList; import net.wisedog.android.whooing.R; import net.wisedog.android.whooing.db.AccountsEntity; import net.wisedog.android.wh...
/* * Copyright (C) 2013 Jongha Kim * * 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...
AccountDeleteConfirmDialog newFragment = AccountDeleteConfirmDialog.newInstance(entity.account_id, entity.accountType);
1
zhouphenix/Multi-SwipeToRefreshLayout
app/src/main/java/lib/phenix/com/views/MainActivity.java
[ "public class NormalFragment extends Fragment {\n\n\n public NormalFragment() {\n // Required empty public constructor\n }\n\n\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.i...
import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.NavigationView; import android.support.design.widget.Snackbar; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDra...
package lib.phenix.com.views; public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { NormalFragment normal; ScrollFragment scroll; RecyclerFragment recycler; WebViewFragment web; ViewPagerFragment pager;
RefreshFragment refresh;
2
aponom84/MetrizedSmallWorld
src/main/java/org/latna/msw/SelfAdapted/Ranger.java
[ "public abstract class AbstractMetricStructure {\n protected List <MetricElement> elements; //list of all elemets in the structure in the explicit form. \n\n protected EnterPointProvider provider; //object to obtain random \"enter point\"\n protected int size = 0; //number of elements\n \n public Abs...
import java.util.ArrayList; import java.util.List; import java.util.TreeSet; import org.latna.msw.AbstractMetricStructure; import org.latna.msw.AlgorithmLib; import org.latna.msw.EvaluatedElement; import org.latna.msw.MetricElement; import org.latna.msw.SearchResult;
package org.latna.msw.SelfAdapted; /** * One of the simplest implementation of the Metrized Small World Data Structure * This implementation uses nn closest elements as an approximation of Voronoi * neighborhood. * @author Alexander Ponomarenko aponom84@gmail.com */ public class Ranger extends AbstractMetricS...
SearchResult sr = AlgorithmLib.kSearchElementsWithAttempts(newElement, this.getProvider(), 1, 1);
1
PascalUrso/ReplicationBenchmark
src/jbenchmarker/trace/Trace2XML.java
[ "public abstract class MergeAlgorithm {\n // Replica identifier\n private int replicaNb;\n \n // Supported Document\n private Document doc;\n \n // Local operations generated\n private List<TraceOperation> localHistory; \n\n // All operations executed\n private List<Operation> history;\...
import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.LineNumberReader; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.u...
/** * This file is part of ReplicationBenchmark. * * ReplicationBenchmark 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 versio...
Element VH = document.createElement("VectorClock");
3
MewX/light-novel-library_Wenku8_Android
studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/adapter/NovelItemAdapter.java
[ "public class MyApp extends Application {\n @SuppressLint(\"StaticFieldLeak\")\n private static Context context;\n\n @Override\n public void onCreate() {\n super.onCreate();\n context = getApplicationContextLocal();\n }\n\n /**\n * wrap the getApplicationContext() function for ea...
import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; import com.nostra13.universalimageloader.core.ImageLoader; import org.mewx.we...
package org.mewx.wenku8.adapter; /** * Created by MewX on 2015/1/20. * Olde Novel Item Adapter. */ public class NovelItemAdapter extends RecyclerView.Adapter<NovelItemAdapter.ViewHolder> { private MyItemClickListener mItemClickListener; private MyOptionClickListener mMyOptionClickListener;
private MyItemLongClickListener mItemLongClickListener;
6
duke605/DiscordCE
src/main/java/com/github/duke605/dce/DiscordCE.java
[ "public class DiscordEventHandler extends CustomListenerAdapter {\n\n @Override\n public void onReady(ReadyEvent e)\n {\n // Updating player status\n ConcurrentUtil.executor.execute(() -> e.getJDA().getAccountManager().setGame(\"Minecraft [Menus]\"));\n DiscordCE.client = (JDAClient) e...
import com.github.duke605.dce.command.*; import com.github.duke605.dce.handler.DiscordEventHandler; import com.github.duke605.dce.handler.MinecraftEventHandler; import com.github.duke605.dce.lib.Config; import com.github.duke605.dce.lib.Preferences; import com.github.duke605.dce.lib.Reference; import com.github.duke605...
package com.github.duke605.dce; @Mod( modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, clientSideOnly = true, guiFactory = "com.github.duke605.dce.gui.factory.GuiFactoryDiscordConfig" ) public class DiscordCE { @Mod.Instance(Reference.MODID) ...
Preferences.load(new File(e.getModConfigurationDirectory(), "dce.json.tar.gz"));
3
dariober/ASCIIGenome
src/test/java/samTextViewer/MainTest.java
[ "public class BamIndexNotFoundException extends Exception {\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = 1L;\n\n}", "public class InvalidColourException extends Exception {\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = 1L;\n\n}", "public class InvalidCommandLin...
import static org.junit.Assert.*; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.junit.Test; import com.itextpdf.text.DocumentException; import exceptions.BamIndexNotFoundException;...
package samTextViewer; public class MainTest { @Test
public void canSuggestCommand() throws ClassNotFoundException, IOException, InvalidGenomicCoordsException, InvalidCommandLineException, InvalidRecordException, BamIndexNotFoundException, SQLException, DocumentException, UnindexableFastaFileException, InvalidColourException, InvalidConfigException {
4
agune/flyJenkins
flyJenkins/src/main/java/com/agun/flyJenkins/ui/DeployHistory.java
[ "public class FlyFactory {\r\n\r\n\tpublic static PeriodWork getPeriodWork(){\r\n\t\tJenkins jenkins = Jenkins.getInstance();\r\n\t\tExtensionList<PeriodWork> extensionList = jenkins.getExtensionList(PeriodWork.class);\r\n\t\tPeriodWork periodWork = extensionList.get(PeriodWork.class);\r\n\t\treturn periodWork;\r\...
import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import hudson.Extension; import com.agun.flyJenkins.FlyFactory; import com.agun.flyJenkins.model.DeployLog; import com.agun.flyJenkins.model.DeployReport; import com.agun.flyJenkins.model.ServiceGroup; import com.agun....
package com.agun.flyJenkins.ui; @Extension public class DeployHistory extends FlyUI { @Override public String getDescription() { return "you can see deploy history info"; } @Override public DescriptorImpl getDescriptor() { return (DescriptorImpl)super.getDescriptor(); } public List<DeployLog...
ServiceGroup serviceGroup = ServiceGroupSaveableUtil.getServiceGroup(groupId);
6
caiovidaln/ifcalc
app/src/main/java/ifcalc/beta/adapters/DisciplinasAdapter.java
[ "public final class R {\n public static final class anim {\n public static final int abc_fade_in=0x7f040000;\n public static final int abc_fade_out=0x7f040001;\n public static final int abc_grow_fade_in_from_bottom=0x7f040002;\n public static final int abc_popup_enter=0x7f040003;\n ...
import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.support.v7.app.AlertDialog; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.Vi...
package ifcalc.beta.adapters; public class DisciplinasAdapter extends RecyclerView.Adapter<DisciplinasAdapter.DisciplinaViewHolder> { private List<Disciplina> disciplinaList; private boolean zeroACem; private Context context; public DisciplinasAdapter(Context context, List<Disciplina> disciplinas,...
disciplinaViewHolder.tituloDisciplina.setTypeface(Util.getFontTheme(context));
4
StumbleUponArchive/hbase
security/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java
[ "public class KeyValue implements Writable, HeapSize {\n static final Log LOG = LogFactory.getLog(KeyValue.class);\n // TODO: Group Key-only comparators and operations into a Key class, just\n // for neatness sake, if can figure what to call it.\n\n /**\n * Colon character in UTF-8\n */\n public static fin...
import java.io.IOException; import java.net.InetAddress; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; impor...
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribut...
final HRegion region = e.getRegion();
3
daneren2005/Subsonic
app/src/main/java/github/daneren2005/dsub/service/sync/SubsonicSyncAdapter.java
[ "public class CachedMusicService implements MusicService {\n\tprivate static final String TAG = CachedMusicService.class.getSimpleName();\n\n private static final int MUSIC_DIR_CACHE_SIZE = 20;\n private static final int TTL_MUSIC_DIR = 5 * 60; // Five minutes\n\tpublic static final int CACHE_UPDATE_LIST = 1;...
import android.accounts.Account; import android.annotation.TargetApi; import android.content.AbstractThreadedSyncAdapter; import android.content.ContentProviderClient; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import and...
/* This file is part of Subsonic. Subsonic 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. Subsonic is distributed in the hope that i...
DownloadFile file = new DownloadFile(context, song, save);
1