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
ufoscout/properlty
properlty-common/src/test/java/com/ufoscout/properlty/reader/PropertiesResourceReaderTest.java
[ "public abstract class ProperltyBaseTest {\n\n\t@Rule\n\tpublic final TestName name = new TestName();\n\n\tprivate Date startTime;\n\n\t@Before\n\tpublic void setUpBeforeTest() {\n\t\tstartTime = new Date();\n\t\tSystem.out.println(\"===================================================================\");\n\t\tSyste...
import com.ufoscout.properlty.reader.PropertyValue; import com.ufoscout.properlty.util.FileUtils; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import ...
/******************************************************************************* * Copyright 2017 Francesco Cina' * * 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.apach...
PropertiesResourceReader.build(path).ignoreNotFound(ignoreNotFound).read();
2
excelsior-oss/excelsior-jet-api
src/main/java/com/excelsiorjet/api/tasks/config/excelsiorinstaller/InstallationDirectory.java
[ "public class ExcelsiorJet {\n\n private final JetHome jetHome;\n private final Log logger;\n\n private JetEdition edition;\n private OS targetOS;\n private CpuArch targetCpu;\n\n public ExcelsiorJet(JetHome jetHome, Log logger) throws JetHomeException {\n this.jetHome = jetHome;\n t...
import com.excelsiorjet.api.ExcelsiorJet; import com.excelsiorjet.api.tasks.JetProject; import com.excelsiorjet.api.tasks.JetTaskFailureException; import com.excelsiorjet.api.tasks.config.compiler.InlineExpansionType; import java.util.Objects; import java.util.stream.Stream; import static com.excelsiorjet.api.util.Txt....
/* * Copyright (c) 2017, Excelsior LLC. * * This file is part of Excelsior JET API. * * Excelsior JET API is free software: * you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * ...
void validate(ExcelsiorJet excelsiorJet) throws JetTaskFailureException {
2
calrissian/flowmix
src/test/java/org/calrissian/flowmix/core/storm/bolt/SortBoltIT.java
[ "public class Flow implements Serializable{\n\n String id;\n String name;\n String description;\n\n Map<String,StreamDef> streams = new HashMap<String, StreamDef>();\n\n public String getId() {\n return id;\n }\n\n public String getName() {\n return name;\n }\n\n public Stri...
import backtype.storm.Config; import backtype.storm.LocalCluster; import backtype.storm.generated.StormTopology; import com.google.common.collect.Iterables; import org.calrissian.flowmix.api.Flow; import org.calrissian.flowmix.api.FlowTestCase; import org.calrissian.flowmix.api.Policy; import org.calrissian.flowmix.api...
/* * Copyright (C) 2014 The Calrissian Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
conf.registerSerialization(BaseEvent.class, EventSerializer.class);
4
SalmanTKhan/MyAnimeViewer
app/src/main/java/com/taskdesignsinc/android/myanimeviewer/AnimeDetailsActivity.java
[ "public class AnimeMaterialListFragment extends HeaderGridCompatFragment\n implements OnQueryTextListener, OnCloseListener, SwipeRefreshLayout.OnRefreshListener,\n LoaderManager.LoaderCallbacks<Anime> {\n //private AnimeRecord mAnimeRecord = null;\n private boolean mIsSavedInParse = false;\n ...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.design.widget.CoordinatorLayout; import an...
package com.taskdesignsinc.android.myanimeviewer; /** * This is a secondary activity, to show what the user has selected when the * screen is not large enough to show it all in one activity. */ public class AnimeDetailsActivity extends AppCompatActivity { private BroadcastReceiver mReceiver; IntentFilt...
WriteLog.appendLog(mTAG + ": refresh called");
4
MrCrayfish/MrCrayfishSkateboardingMod
src/main/java/com/mrcrayfish/skateboarding/tricks/flip/Trick360Heelflip.java
[ "public enum Difficulty {\n\t\n\tEASY(6, 50), MEDIUM(8, 70), HARD(10, 100), IMPOSSIBLE(12, 150);\n\n\tprivate int performTime;\n\tprivate int extraComboTime;\n\n\tDifficulty(int performTime, int extraComboTime) {\n\t\tthis.performTime = performTime;\n\t\tthis.extraComboTime = extraComboTime;\n\t}\n\t\n\tpublic int ...
import net.minecraft.client.model.ModelRenderer; import com.mrcrayfish.skateboarding.api.Difficulty; import com.mrcrayfish.skateboarding.api.trick.Flip; import com.mrcrayfish.skateboarding.entity.EntitySkateboard; import com.mrcrayfish.skateboarding.util.TrickHelper; import com.mrcrayfish.skateboarding.util.TrickHelper...
package com.mrcrayfish.skateboarding.tricks.flip; public class Trick360Heelflip extends Flip { @Override public void updateBoard(EntitySkateboard skateboard) { TrickHelper.flipBoard(skateboard, -360F, performTime(), Axis.Z); TrickHelper.spinBoard(skateboard, -360F, performTime()); } @Override public Strin...
public Difficulty difficulty()
0
etheriau/jatetoolkit
src/main/java/uk/ac/shef/dcs/oak/jate/test/TestNCValue.java
[ "public class JATEException extends Exception {\r\n\tprivate static final long serialVersionUID = -4511571544868986419L;\r\n\r\n\tpublic JATEException(String exception){\r\n\t\tsuper(exception);\r\n\t}\r\n\r\n\tpublic JATEException(Exception e){\r\n\t\tsuper(e);\r\n\t}\r\n\r\n\tpublic JATEException(String exception...
import java.io.IOException; import java.util.Date; import java.util.Map; import uk.ac.shef.dcs.oak.jate.JATEException; import uk.ac.shef.dcs.oak.jate.JATEProperties; import uk.ac.shef.dcs.oak.jate.core.algorithm.NCValueAlgorithm; import uk.ac.shef.dcs.oak.jate.core.algorithm.NCValueFeatureWrapper; import uk.ac.shef.dcs...
/** Test file for NC-Value Algorithm. */ package uk.ac.shef.dcs.oak.jate.test; public class TestNCValue { public static void main(String[] args) throws IOException, JATEException { System.out.println("Started "+ TestNCValue.class+" at: " + new Date() + "... For detailed progress see log file jate.log."); ...
Corpus corpus = new CorpusImpl( JATEProperties.getInstance().getCorpusPath() );
5
Kesshou/Kesshou-Android
app/src/main/java/kesshou/android/daanx/util/network/api/AccountApi.java
[ "public class CheckRegist {\n\n\t@SerializedName(\"account\")\n\tpublic String account;\n\n\t@SerializedName(\"nick\")\n\tpublic String nick;\n\n\t@SerializedName(\"schoolAccount\")\n\tpublic String schoolAccount;\n\n\t@SerializedName(\"schoolPwd\")\n\tpublic String schoolPwd;\n}", "public class Login {\n\n @S...
import kesshou.android.daanx.util.network.api.holder.CheckRegist; import kesshou.android.daanx.util.network.api.holder.Login; import kesshou.android.daanx.util.network.api.holder.Register; import kesshou.android.daanx.util.network.api.holder.StatusResponse; import kesshou.android.daanx.util.network.api.holder.Token; im...
package kesshou.android.daanx.util.network.api; /* Author: Charles Lien(lienching) Description: Account Api interface */ public interface AccountApi { // Login @POST("actmanage/login") Call<Token> login(@Body Login usr); //Register @POST("actmanage/register") Call<Token> create(@Body ...
Call<StatusResponse> update(@Body Update usr);
5
mitdbg/AdaptDB
src/main/java/core/common/index/RobustTree.java
[ "public class Predicate {\n\tpublic enum PREDTYPE {\n\t\tLEQ, GEQ, GT, LT, EQ\n\t};\n\n\tpublic int attribute;\n\tpublic TYPE type;\n\tpublic Object value;\n\tpublic PREDTYPE predtype;\n\n\tpublic Predicate(int attr, TYPE t, Object val, PREDTYPE predtype) {\n\t\tthis.attribute = attr;\n\t\tthis.type = t;\n\t\tthis....
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Random; import java.util.Scanner; import core.adapt.Predicate; import core.common.globals.Globals; import core.common.globals.TableInfo; import core.c...
package core.common.index; public class RobustTree implements MDIndex { public TableInfo tableInfo; public int maxBuckets; public int numAttributes;
public ParsedTupleList sample;
3
Jannyboy11/CustomRecipes
src/main/java/com/gmail/jannyboy11/customrecipes/impl/crafting/vanilla/addremove/ShapedAdder.java
[ "public class CustomRecipesPlugin extends JavaPlugin implements CustomRecipesApi {\n\n\tprivate final NavigableMap<String, BiConsumer<? super Player, ? super List<String>>> adders = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\tprivate final NavigableMap<String, BiConsumer<? super Player, ? super List<String>>> ...
import java.util.List; import java.util.function.BiConsumer; import java.util.stream.Collectors; import org.bukkit.ChatColor; import org.bukkit.NamespacedKey; import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftInventoryCustom; import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack; import org.bukkit.craftbu...
package com.gmail.jannyboy11.customrecipes.impl.crafting.vanilla.addremove; public class ShapedAdder implements BiConsumer<Player, List<String>> { private final CustomRecipesPlugin plugin; public ShapedAdder (CustomRecipesPlugin plugin) { this.plugin = plugin; } @Override public void accept(Player player,...
.map((CRChoiceIngredient ingr) -> ingr.getChoices().stream()
2
Effervex/CycDAG
src/graph/inference/module/AndWorker.java
[ "public class OntologyFunction extends DAGNode implements Edge {\r\n\tprivate static final long serialVersionUID = 473544398260462641L;\r\n\tprivate boolean notAnonymous_ = true;\r\n\tprotected Node[] nodes_;\r\n\r\n\tpublic OntologyFunction() {\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic OntologyFunction(Node... nodes)...
import graph.core.Node; import graph.core.OntologyFunction; import graph.core.PrimitiveNode; import graph.inference.QueryObject; import graph.inference.QueryResult; import graph.inference.QueryWorker; import graph.inference.Substitution; import graph.inference.VariableNode; import graph.module.QueryModule; imp...
/******************************************************************************* * Copyright (C) 2013 University of Waikato, Hamilton, New Zealand. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this dist...
for (VariableNode v : component.getVariables()) {
5
snowleo/BleedingMobs
src/main/java/me/snowleo/bleedingmobs/commands/set/type/Amount.java
[ "public interface IBleedingMobs extends Plugin\n{\n\tStorage getStorage();\n\n\tboolean isWorldEnabled(World world);\n\n\tboolean isSpawning();\n\n\tvoid setSpawning(boolean set);\n\n\tSettings getSettings();\n\n\tvoid restartTimer();\n\n\tBloodStreamTask getTimer();\n\n\tboolean isParticleItem(final UUID uuid);\n}...
import me.snowleo.bleedingmobs.IBleedingMobs; import me.snowleo.bleedingmobs.commands.AbstractTypeCommand; import me.snowleo.bleedingmobs.commands.parser.FromToIntegerParser; import me.snowleo.bleedingmobs.commands.parser.LowerBoundIntegerParser; import me.snowleo.bleedingmobs.particles.ParticleType; import org.bukkit....
/* * BleedingMobs - make your monsters and players bleed * * Copyright (C) 2011-2012 snowleo * * 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...
super(type, plugin, new FromToIntegerParser(new LowerBoundIntegerParser(0)));
2
Mitchellbrine/DiseaseCraft-2.0
src/main/java/mc/Mitchellbrine/diseaseCraft/client/gui/GuiJournal.java
[ "public class Disease {\n\n\tprivate String identifier;\n\tprivate String domain;\n\tprivate String lore;\n\n\tprivate List<String> waysToContract;\n\tprivate Map<String,Object[]> contractParameters;\n\n\tpublic List<Integer> effects;\n\n\tpublic int level;\n\tprivate int deathRate = -1;\n\n\tprivate double minimum...
import mc.Mitchellbrine.diseaseCraft.api.Disease; import mc.Mitchellbrine.diseaseCraft.client.gui.book.GuiBook; import mc.Mitchellbrine.diseaseCraft.client.gui.book.GuiDiseaseTab; import mc.Mitchellbrine.diseaseCraft.client.gui.book.GuiIntroTab; import mc.Mitchellbrine.diseaseCraft.client.gui.book.GuiTab; import mc.Mit...
package mc.Mitchellbrine.diseaseCraft.client.gui; /** * Created by Mitchellbrine on 2015. */ public class GuiJournal extends GuiBook { private boolean isUser = false; public GuiJournal(EntityPlayer player) { super(player); } public GuiJournal(EntityPlayer player, boolean isUser) { super(player); this.i...
Disease disease = DiseaseHelper.getDiseaseInstance(id);
6
WMCAlliance/BukkitIRCd
src/com/Jdbye/BukkitIRCd/Utilities/ChatUtils.java
[ "static public final CriticalSection csServer = new CriticalSection();", "public static PrintStream out;", "public class BukkitIRCdPlugin extends JavaPlugin {\n\n\tstatic class CriticalSection extends Object {\n\t}\n\n\tstatic public CriticalSection csLastReceived = new CriticalSection();\n\tprivate final Playe...
import static com.Jdbye.BukkitIRCd.IRCd.csServer; import static com.Jdbye.BukkitIRCd.IRCd.out; import com.Jdbye.BukkitIRCd.BukkitIRCdPlugin; import com.Jdbye.BukkitIRCd.IRCd; import com.Jdbye.BukkitIRCd.Configuration.Config; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Server; import org.buk...
package com.Jdbye.BukkitIRCd.Utilities; /** A general collection of utilities used within the plugin, sometimes for transferring data between IRC and game. */ public class ChatUtils { static char IRC_Color = (char) 3; // ETX Control Code (^C) static char IRC_Bold = (char) 2; // STX Control Code (^B) static cha...
synchronized (csServer) {
0
shyampurk/bluemix-todo-app
Android-Client/app/src/main/java/controller/PubNubHelper.java
[ "public class AddCommentResponseTemplate {\n\n private int response_code=1;\n private String type=\"\";\n private LoginDetailsObject details= new LoginDetailsObject();\n private String response_message=\"\";\n private CommentResultTemplate result = new CommentResultTemplate();\n\n\n public int get...
import android.app.Activity; import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.os.Message; import android.provider.SyncStateContract; import android.support.v4.content.LocalBroadcastManager; import com.google.gson.Gson; import com...
@Override public void run() { HandlerResponseMessage responseMessage = new HandlerResponseMessage(); responseMessage.setResponseCode(ChannelConstants.HANDLER_CODE_FAILURE); ...
final TaskDetailsReponse responseTemplate = (TaskDetailsReponse) g.fromJson(message.toString(),
5
tusharm/WebStub
src/main/java/com/thoughtworks/webstub/StubServer.java
[ "public class WebConsoleContext extends ContextHandler {\n\n public WebConsoleContext(HttpServer httpServer, String webAppRootDir) {\n ResourceHandler handler = new ResourceHandler();\n handler.setBaseResource(Resource.newClassPathResource(webAppRootDir));\n handler.setDirectoriesListed(true...
import com.thoughtworks.webstub.server.context.WebConsoleContext; import com.thoughtworks.webstub.dsl.StubDsl; import com.thoughtworks.webstub.server.HttpServer; import com.thoughtworks.webstub.server.JettyHttpServer; import com.thoughtworks.webstub.server.context.ConfigurableContext;
package com.thoughtworks.webstub; public class StubServer { public static StubServer newServer(int port) { return new StubServer(new JettyHttpServer(port)); } public static StubServer newServer() { return new StubServer(new JettyHttpServer()); } private HttpServer httpServer; ...
public StubDsl stub(String contextRoot) {
1
mikolajmitura/java-properties-to-json
src/test/java/pl/jalokim/propertiestojson/util/PropertiesToJsonParsePropertiesExceptionTest.java
[ "public static final String PROPERTY_KEY_NEEDS_TO_BE_STRING_TYPE = \"Unsupported property key type: %s for key: %s, Property key needs to be a string type\";", "public static final String STRING_RESOLVER_AS_NOT_LAST = \"Added some type resolver after \" + StringJsonTypeResolver.class.getCanonicalName()\n + \"....
import static junit.framework.TestCase.fail; import static org.assertj.core.api.Assertions.assertThat; import static pl.jalokim.propertiestojson.util.exception.ParsePropertiesException.PROPERTY_KEY_NEEDS_TO_BE_STRING_TYPE; import static pl.jalokim.propertiestojson.util.exception.ParsePropertiesException.STRING_RESOLVER...
package pl.jalokim.propertiestojson.util; public class PropertiesToJsonParsePropertiesExceptionTest { @Rule public ExpectedException expectedEx = ExpectedException.none(); public static void setUpMockPickupKeysOrder(PropertiesToJsonConverter converter, String... keys) { PropertyKeysOrderResolve...
expectedEx.expectMessage(String.format(PROPERTY_KEY_NEEDS_TO_BE_STRING_TYPE, "class java.lang.Integer", "1555"));
0
Asqatasun/Contrast-Finder
engine/api/src/main/java/org/asqatasun/contrastfinder/AbstractColorFinder.java
[ "public interface ColorCombinaison {\n\n\n /**\n * @return Gap\n */\n Float getGap();\n\n /**\n * @return Color object\n */\n Color getColor();\n\n /**\n * @param color\n */\n void setColor(Color color);\n\n /**\n * @return contrast\n */\n Double getContrast()...
import java.awt.Color; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.asqatasun.contrastfinder.result.ColorCombinaison; import org.asqatasun.contrastfinder.result.ColorResult; import org.asqatasun.contrastfinder.result.factory.ColorCombinaisonFactory; import org.asqatasun.contrastfinder.result.fact...
/* * Contrast Finder * Copyright (C) 2008-2019 Contrast-Finder.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any la...
private ColorResult colorResult; /* the colorResult that handles the results of the test*/
1
chedim/minedriod
src/main/java/com/onkiup/minedroid/gui/drawables/TextDrawable.java
[ "@SideOnly(Side.CLIENT)\npublic class GuiManager {\n /**\n * Current MineDroid theme\n */\n public static HashMap<Integer, Style> themes = new HashMap<Integer, Style>();\n\n /**\n * Minecraft client instance\n */\n @SideOnly(Side.CLIENT)\n protected static Minecraft mc = Minecraft.get...
import com.onkiup.minedroid.gui.GuiManager; import com.onkiup.minedroid.gui.XmlHelper; import com.onkiup.minedroid.gui.primitives.GLColor; import com.onkiup.minedroid.gui.primitives.Point; import com.onkiup.minedroid.gui.resources.Style; import com.onkiup.minedroid.gui.resources.ValueLink; import com.onkiup.minedroid.g...
if (index == 0) { if (currentPosition + line.length() > position) { result[0].add(line.substring(0, position - currentPosition)); result[1].add(line.substring(position - currentPosition)); index = 1; continue; ...
public void drawShadow(Point where, GLColor color, int size) {
2
mesos/logstash
logstash-scheduler/src/main/java/org/apache/mesos/logstash/scheduler/TaskInfoBuilder.java
[ "public class ExecutorBootConfiguration implements Serializable {\n private static final long serialVersionUID = -7053478803581002057L;\n\n private String mesosAgentId;\n private String[] elasticSearchHosts;\n private String elasticsearchIndex;\n\n private boolean enableSyslog;\n private int syslo...
import com.containersolutions.mesos.scheduler.TaskInfoFactory; import com.google.protobuf.ByteString; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.SerializationUtils; import org.apache.log4j.Logger; import org.apache.mesos.Protos; import org.apache.mesos.logstash.common.ExecutorBootConfigurat...
package org.apache.mesos.logstash.scheduler; @Component public class TaskInfoBuilder implements TaskInfoFactory { public static final Logger LOGGER = Logger.getLogger(TaskInfoBuilder.class); private static final String LOGSTASH_VERSION = "2.1.1"; @Inject private Features features; @Inject ...
.setName(LogstashConstants.NODE_NAME + " executor")
1
philborlin/CSSBox
src/main/java/org/fit/cssbox/demo/BoxBrowser.java
[ "public class CSSNorm \n{\n\n /**\n * Defines a standard HTML style sheet defining the basic style of the individual elements.\n * It corresponds to the CSS2.1 recommendation (Appendix D).\n * @return the style string\n */\n public static String stdStyleSheet()\n {\n return\n ...
import javax.swing.*; import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Vector; import org.fit.cssbox.css.CSSNorm; import org.fit.cssbox.css.CSSUnits; import org.fit.cssbox.css.DOMAnalyzer; import org.fit.cssbox.io.DOMSource; import org.fit.cssbox.io....
/** * BoxBrowser.java * Copyright (c) 2005-2007 Radek Burget * * CSSBox is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. ...
if (root instanceof ElementBox)
6
hai-nguyen/Impala
impala/src/main/java/hainguyen/impala/injection/module/AppModule.java
[ "public class ApplicationBus {\n\n private boolean login;\n\n public boolean isLogin() {\n return login;\n }\n\n public void setLogin(boolean login) {\n this.login = login;\n }\n}", "public class ImpalaApplication extends Application {\n\n private AppComponent appComponent;\n pr...
import android.content.Context; import com.google.gson.Gson; import javax.inject.Singleton; import dagger.Module; import dagger.Provides; import hainguyen.impala.application.ApplicationBus; import hainguyen.impala.application.ImpalaApplication; import hainguyen.impala.injection.helper.ScopeHelper; import hainguyen.impa...
package hainguyen.impala.injection.module; @Singleton @Module public class AppModule {
private final ImpalaApplication application;
1
jlaw90/Grimja
grimedi/src/com/sqrt4/grimedi/ui/component/ColorMapSelector.java
[ "public class LabCollection {\n public final List<LabFile> labs = new LinkedList<LabFile>();\n\n /**\n * Creates an empty LAB file and adds it to the collection\n * @return the creation\n */\n public LabFile addEmptyLab() {\n LabFile lf = new LabFile(this);\n labs.add(lf);\n ...
import javax.swing.*; import java.awt.*; import java.awt.event.ItemListener; import java.io.IOException; import java.util.Vector; import com.sqrt.liblab.LabCollection; import com.sqrt.liblab.LabFile; import com.sqrt.liblab.codec.CodecMapper; import com.sqrt.liblab.entry.model.ColorMap; import com.sqrt.liblab.io.DataSou...
/* * Copyright (C) 2014 James Lawrence. * * This file is part of GrimEdi. * * GrimEdi 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...
MainWindow.getInstance().handleException(e);
5
tobyweston/tempus-fugit
src/test/java/com/google/code/tempusfugit/concurrency/InterruptCapturingThreadTest.java
[ "public static Condition isWaiting(Thread thread) {\n return () -> (thread.getState() == TIMED_WAITING) || (thread.getState() == WAITING);\n}", "public static Condition not(Condition condition) {\n return () -> !condition.isSatisfied();\n}", "public static Duration millis(long millis) {\n validate(mill...
import org.jmock.Expectations; import org.jmock.Mockery; import org.jmock.Sequence; import org.jmock.integration.junit4.JMock; import org.jmock.lib.legacy.ClassImposteriser; import org.junit.Test; import org.junit.runner.RunWith; import java.io.PrintStream; import java.util.List; import java.util.concurrent.TimeoutExce...
/* * Copyright (c) 2009-2018, toby weston & tempus-fugit committers * * 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...
waitOrTimeout(isWaiting(thread), timeout(millis(500)));
2
jenkinsci/gitlab-plugin
src/main/java/com/dabsquared/gitlabjenkins/connection/GitLabConnection.java
[ "public static List<GitLabClientBuilder> getAllGitLabClientBuilders() {\n List<GitLabClientBuilder> builders = new ArrayList<>(Jenkins.getInstance().getExtensionList(GitLabClientBuilder.class));\n sort(builders);\n return builders;\n}", "public static GitLabClientBuilder getGitLabClientBuilderById(String...
import static com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials; import static com.dabsquared.gitlabjenkins.gitlab.api.GitLabClientBuilder.getAllGitLabClientBuilders; import static com.dabsquared.gitlabjenkins.gitlab.api.GitLabClientBuilder.getGitLabClientBuilderById; import com.cloudbees.plugins....
package com.dabsquared.gitlabjenkins.connection; /** * @author Robin Müller */ public class GitLabConnection extends AbstractDescribableImpl<GitLabConnection> { private final String name; private final String url; private transient String apiToken; // TODO make final when migration code gets r...
new AutodetectGitLabClientBuilder(),
4
SQLPower/power-architect
src/main/java/ca/sqlpower/architect/swingui/action/ExportDDLAction.java
[ "public class ConflictResolver implements Monitorable {\n private static final Logger logger = Logger.getLogger(ConflictResolver.class);\n\n /**\n * A Conflict represents an existing database object which needs to be\n * removed for some operation to continue. \n */\n public class Conflict {\n ...
import java.awt.Dimension; import java.awt.event.ActionEvent; import java.sql.Connection; import java.sql.SQLException; import java.util.List; import java.util.concurrent.Callable; import javax.swing.AbstractAction; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swi...
public void actionPerformed(ActionEvent e) { warningDialog.dispose(); for (Criticism criticism : bucket.getCriticisms()) { if (!criticism.getFixes().isEmpty()) { for (Criti...
ConflictResolver cr;
0
raulh82vlc/Transactions-Viewer
android/src/main/java/com/raulh82vlc/TransactionsViewer/ui/activities/ProductsTransactionsActivity.java
[ "public class TransactionsViewerApp extends Application {\n\n private ApplicationComponent applicationComponent;\n\n @Override\n public void onCreate() {\n super.onCreate();\n applicationComponent = DaggerApplicationComponent.builder()\n .applicationModule(new ApplicationModule...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; imp...
/* * Copyright (C) 2017 Raul Hernandez Lopez @raulh82vlc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
} catch (CustomException e) {
3
baloise/egitblit
com.baloise.egitblit.plugin/src/com/baloise/egitblit/view/action/CloneOneClickAction.java
[ "public class GitBlitExplorerException extends Exception {\r\n\r\n\tprivate static final long serialVersionUID = 1L;\r\n\r\n\tpublic GitBlitExplorerException() {\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic GitBlitExplorerException(String arg0, Throwable arg1) {\r\n\t\tsuper(arg0, arg1);\r\n\t}\r\n\r\n\tpublic GitBlitExp...
import java.io.File; import java.lang.reflect.InvocationTargetException; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import org.eclipse.core.runtime.CoreEx...
package com.baloise.egitblit.view.action; /** * @see Action * @author culmat * */ public class CloneOneClickAction extends CloneAction{ public final static String ID = "com.baloise.egitblit.cmd.import"; public boolean mkPrefix = true; public boolean mkPostfix = true; public CloneOneClickAct...
List<GitBlitServer> serverList = PreferenceMgr.readConfig().getServerList();
4
almondtools/rexlex
src/main/java/com/almondtools/rexlex/automaton/GenericAutomaton.java
[ "public interface Token {\n\n\tString getLiteral();\n\tTokenType getType();\n\t\n}", "public interface TokenFactory<T extends Token> {\n\n\tT createToken(String literal, TokenType type);\n\n}", "public interface TokenType {\n\n\tboolean error();\n\tboolean accept();\n\n}", "public enum DefaultTokenType implem...
import static com.almondtools.rexlex.automaton.AutomatonProperty.ACYCLIC; import static com.almondtools.rexlex.automaton.AutomatonProperty.CYCLIC; import static com.almondtools.rexlex.automaton.AutomatonProperty.LINEAR; import static com.almondtools.rexlex.automaton.AutomatonProperty.UNKNOWN; import static net.amygdalu...
public GenericAutomaton addInitialSelfLoop() { GenericAutomaton nfa = clone(); State start = nfa.getStart(); start.addTransition(new RangeTransition(Character.MIN_VALUE, Character.MAX_VALUE, start)); return nfa; } public GenericAutomaton totalize() { TokenType errorType = tokenTypes.errorType(); Set<Sta...
return totalizeAndClean(DefaultTokenType.ERROR);
3
ChyengJason/NanCanOlympic
app/src/main/java/com/jscheng/mr_horse/ui/SearchActivity.java
[ "public class SearchRecyclerAdapter extends RecyclerView.Adapter<SearchRecyclerAdapter.SearchRecyclerViewHolder> {\n\n private List<QuestionModel> searchList;\n private String searchWord;\n\n public SearchRecyclerAdapter(){\n searchList = new ArrayList<>();\n searchWord = \"\";\n }\n\n ...
import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.KeyEvent; import android.view.View; import android.view.inputmethod.EditorInfo; import android.vi...
package com.jscheng.mr_horse.ui; /** * Created by cheng on 2017/3/21. */ public class SearchActivity extends BaseActivity implements SearchView,SearchRecyclerAdapter.OnClickItemListener { @BindView(R.id.title_search_edit) EditText searchEditText; @BindView(R.id.progress_wheel) ProgressWheel prog...
private SearchPresenter presenter = null;
2
flyhero/flyapi
src/main/java/cn/iflyapi/blog/controller/UserController.java
[ "public class User {\n private Long userId;\n\n private String username;\n\n private String password;\n\n private String nickName;\n\n private String avatar;\n\n private String phone;\n\n private String email;\n\n private Integer sex;\n\n private String sign;\n\n private String company...
import cn.iflyapi.blog.annotation.OpenApi; import cn.iflyapi.blog.entity.User; import cn.iflyapi.blog.model.JSONResult; import cn.iflyapi.blog.pojo.dto.LoginDto; import cn.iflyapi.blog.pojo.dto.ResetPwDto; import cn.iflyapi.blog.pojo.dto.Support; import cn.iflyapi.blog.pojo.dto.UserBaseDto; import cn.iflyapi.blog.servi...
package cn.iflyapi.blog.controller; /** * @author flyhero * @date 2018-12-13 9:55 AM */ @Api(value = "UserController", tags = "用户接口") @RestController public class UserController extends BaseController { @Autowired private UserService userService; @OpenApi("/users/*") @ApiOperation(value = "获取指定...
public JSONResult update(@RequestBody UserBaseDto user, @PathVariable Long userId) {
5
marcohc/android-clean-architecture
app/src/main/java/com/marcohc/architecture/app/domain/interactor/GetUsersUseCase.java
[ "public interface UserRepository {\n\n /**\n * Get all users with picture based on parameters.\n *\n * @param useCache use the cache\n * @return the Observable with a list of users\n */\n Observable<List<UserEntity>> getAllWithPicture(boolean useCache);\n\n /**\n * Get all users wit...
import android.support.annotation.NonNull; import com.marcohc.architecture.app.data.repository.user.UserRepository; import com.marcohc.architecture.app.data.repository.user.UserRepositoryImpl; import com.marcohc.architecture.app.domain.entity.UserEntity; import com.marcohc.architecture.app.domain.mapper.UserMapper; imp...
package com.marcohc.architecture.app.domain.interactor; /** * Get a list of users. * * @author Marco Hernaiz * @since 08/08/16 */ public class GetUsersUseCase extends BaseRxUseCase<List<UserModel>> { private final boolean mWithPicture; private final boolean mUseCache;
private final UserRepository mUserRepository;
0
mediashelf/fedora-client
fedora-client-core/src/test/java/com/yourmediashelf/fedora/client/request/GetDatastreamHistoryIT.java
[ "public static AddDatastream addDatastream(String pid, String dsId) {\n return new AddDatastream(pid, dsId);\n}", "public static GetDatastreamHistory getDatastreamHistory(String pid,\n String dsId) {\n return new GetDatastreamHistory(pid, dsId);\n}", "public static ModifyDatastream modifyDatastream...
import static com.yourmediashelf.fedora.client.FedoraClient.addDatastream; import static com.yourmediashelf.fedora.client.FedoraClient.getDatastreamHistory; import static com.yourmediashelf.fedora.client.FedoraClient.modifyDatastream; import static org.junit.Assert.assertEquals; import org.junit.Test; import com.yourme...
/** * Copyright (C) 2010 MediaShelf <http://www.yourmediashelf.com/> * * This file is part of fedora-client. * * fedora-client is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of ...
GetDatastreamHistoryResponse gdhResponse = null;
5
CS-SI/Stavor
stavor/src/main/java/cs/si/stavor/dialogs/CopyMissionDialogFragment.java
[ "public class MainActivity extends ActionBarActivity implements\n\t\tNavigationDrawerFragment.NavigationDrawerCallbacks {\n\n\t/**\n\t * Fragment managing the behaviors, interactions and presentation of the\n\t * navigation drawer.\n\t */\n\tprivate NavigationDrawerFragment mNavigationDrawerFragment;\n\t\n\t/**\n\t...
import java.io.IOException; import cs.si.stavor.R; import cs.si.stavor.MainActivity; import cs.si.stavor.StavorApplication; import cs.si.stavor.database.SerializationUtil; import cs.si.stavor.database.MissionReaderContract.MissionEntry; import cs.si.stavor.mission.Mission; import android.app.AlertDialog; import android...
package cs.si.stavor.dialogs; /** * Dialog to prevent unwilling mission removals * @author Xavier Gibert * */ public class CopyMissionDialogFragment extends DialogFragment { private static final String ARG_NAME = "mission_name"; private static final String ARG_ID = "mission_id"; private static final String AR...
values.put(MissionEntry.COLUMN_NAME_CLASS, SerializationUtil.serialize(mission));
2
citysearch/web-widgets
src/main/java/com/citysearch/webwidget/api/proxy/PFPProxy.java
[ "public class PFPAd {\n\tprivate String name;\n\tprivate String rating;\n\tprivate String reviewCount;\n\tprivate String distance;\n\tprivate String category;\n\tprivate String listingId;\n\tprivate String adDisplayUrl;\n\tprivate String imageUrl;\n\tprivate String phone;\n\tprivate String offers;\n\tprivate String...
import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.jdom.Document; import org.jdom.Element; import com.citysearch.webwidget.api.b...
private List<PFPAd> getAds(RequestBean request, Document doc) throws CitysearchException { log.info("PFPProxy.getAds: Begin"); List<PFPAd> pfpAds = new ArrayList<PFPAd>(); if (doc != null && doc.hasRootElement()) { SortedMap<Double, List<Element>> elmsSortedByDistance = new Tree...
Properties properties = PropertiesLoader.getAPIProperties();
7
ProtocolSupport/ProtocolSupportPocketStuff
src/protocolsupportpocketstuff/api/util/PocketPlayer.java
[ "public interface Modal {\n\n\t/***\n\t * @return the ModalType of this modal.\n\t */\n\tModalType getType();\n\n\t/***\n\t * @return the internal type of this modal.\n\t */\n\tString getPeType();\n\n\t/***\n\t * Converts this modal to JSON.\n\t * @return the JSON representation of this modal.\n\t */\n\tString toJS...
import org.bukkit.Bukkit; import org.bukkit.entity.Player; import protocolsupport.api.ProtocolSupportAPI; import protocolsupport.api.ProtocolType; import protocolsupportpocketstuff.api.modals.Modal; import protocolsupportpocketstuff.api.modals.ModalCallback; import protocolsupportpocketstuff.api.skins.PocketSkinModel; ...
package protocolsupportpocketstuff.api.util; /*** * Utility to send and retrieve pocket-specific things to a {@link Player}. */ public class PocketPlayer { //=====================================================\\ // Getting \\ //=====================================================\\ ...
public static void sendPocketPacket(Player player, PEPacket packet) {
3
SalmanTKhan/MyAnimeViewer
app/src/main/java/com/taskdesignsinc/android/myanimeviewer/model/helper/EpisodeUtils.java
[ "public class MAVApplication extends MultiDexApplication {\n\n static {\n AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);\n }\n\n private static MAVApplication application = null;\n\n private RefWatcher refWatcher;\n private BoxStore boxStore;\n private DataRepository mDataRepo...
import android.app.Activity; import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; import android.support.design.widget.CoordinatorLayout; import android.support.design.widget.Snackbar; import android.text.TextUtils; import com.taskdesignsinc.android.myanimeviewer.MAV...
package com.taskdesignsinc.android.myanimeviewer.model.helper; /** * Created by Salman T. Khan on 11/30/2015. */ public class EpisodeUtils { public static void viewEpisode(String tag, Context context, Anime anime, Episode episode, CoordinatorLayout coordinatorLayout) { if (context == null) { ...
Intent intent = new Intent(context, VideoPlayerActivity.class);
2
TheGoodlike13/hls-downloader
src/test/java/eu/goodlike/hls/download/m3u/data/builder/MasterPlaylistBuilderTest.java
[ "public final class MediaPlaylist implements DownloadableMediaPlaylist {\n\n @Override\n public CompletableFuture<?> download() {\n return getMediaPlaylistData().handlePlaylistData();\n }\n\n @Override\n public String toString() {\n return Str.of(getName())\n .andIf(resol...
import com.google.common.collect.ImmutableList; import eu.goodlike.hls.download.m3u.MediaPlaylist; import eu.goodlike.hls.download.m3u.MediaPlaylistFactory; import eu.goodlike.hls.download.m3u.MultiMediaPlaylist; import eu.goodlike.hls.download.m3u.MultiMediaPlaylistFactory; import eu.goodlike.hls.download.m3u.data.Mas...
package eu.goodlike.hls.download.m3u.data.builder; public class MasterPlaylistBuilderTest { private static final HttpUrl URL = HttpUrl.parse("https://localhost:8080/"); private static final String PLAYLIST_NAME = "source"; private static final String RESOLUTION = "1920x1080"; private static final St...
private final MasterPlaylistDataFactory masterFactory = playlists ->
5
atam4j/atam4j
atam4j/src/test/java/me/atam/atam4j/AcceptanceTestsRunnerTaskTest.java
[ "public class FailingTest {\n\n @Test\n public void testThatFails(){\n Assert.assertTrue(\"Was expecting false to be true\", false);\n }\n}", "@Monitor\npublic class PassingTestWithNoCategory {\n\n @Test\n public void testThatPasses(){\n Assert.assertTrue(true);\n }\n}", "public ...
import me.atam.atam4j.dummytests.FailingTest; import me.atam.atam4j.dummytests.PassingTestWithNoCategory; import me.atam.atam4j.dummytests.TestThatFailsOnInitialisation; import me.atam.atam4j.health.AcceptanceTestsState; import me.atam.atam4j.logging.LoggingListener; import org.junit.Test; import org.junit.runner.Resul...
package me.atam.atam4j; public class AcceptanceTestsRunnerTaskTest { AcceptanceTestsState acceptanceTestsState = new AcceptanceTestsState(); TestLogger logger = TestLoggerFactory.getTestLogger(LoggingListener.class); @Test public void testPassingTestsRun(){ assertTrue(runTestsAndGetResult(P...
assertFalse(runTestsAndGetResult(TestThatFailsOnInitialisation.class).wasSuccessful());
2
turn/sorcerer
src/main/java/com/turn/sorcerer/config/impl/YamlConfigReader.java
[ "public interface ConfigReader {\n\n\t// returns addPackages to search for annotations parsed from config\n\tCollection<String> read(Collection<File> configFiles) throws SorcererException;\n\n\tFilenameFilter getFileFilter();\n}", "public class SorcererException extends Exception {\n\n\tpublic SorcererException()...
import com.turn.sorcerer.config.ConfigReader; import com.turn.sorcerer.exception.SorcererException; import com.turn.sorcerer.module.ModuleType; import com.turn.sorcerer.pipeline.type.PipelineType; import com.turn.sorcerer.status.type.impl.HDFSStatusStorageType; import com.turn.sorcerer.status.type.impl.MemoryStatusStor...
/* * Copyright (c) 2015, Turn Inc. All Rights Reserved. * Use of this source code is governed by a BSD-style license that can be found * in the LICENSE file. */ package com.turn.sorcerer.config.impl; /** * Class Description Here * * @author tshiou */ public class YamlConfigReader implements ConfigReader { ...
YAML_CONFIG.setClassTag(MODULE_TAG, ModuleType.class);
2
redferret/planet
src/engine/surface/SurfaceMap.java
[ "public class MThread extends TaskRunner {\n\n private final TaskManager manager;\n /**\n * Other threads may want to update or apply an event to other cells\n * not belonging to that thread. The other thread will post an update to\n * this thread to process the event using the queue.\n */\n private fina...
import com.jme3.math.Vector2f; import com.jme3.renderer.Camera; import com.jme3.scene.Node; import com.jme3.scene.VertexBuffer; import com.jme3.terrain.geomipmap.TerrainLodControl; import com.jme3.terrain.geomipmap.TerrainPatch; import com.jme3.terrain.geomipmap.TerrainQuad; import com.jme3.terrain.geomipmap.lodcalc.Di...
package engine.surface; /** * The SurfaceMap is a generic map for all the systems on the planet. The map * contains generic cells that implement the Cell class. * A SurfaceMap by default doesn't setup any surface threads, therefore * the <code>setupThreads(int threadDivision, int delay)</code> needs to be * ca...
hotSpotThread = new MThread(1, new Boundaries(0, totalSize - 1));
2
idega/is.idega.idegaweb.msi
src/java/is/idega/idegaweb/msi/business/RaceReportWriter.java
[ "public interface Participant extends IDOEntity {\n\t\n\tpublic void setRentsTimeTransmitter(boolean rents);\n\tpublic boolean isRentsTimeTransmitter();\n\t/**\n\t * @see is.idega.idegaweb.msi.data.ParticipantBMPBean#getSeasonGroupID\n\t */\n\tpublic int getSeasonGroupID();\n\n\t/**\n\t * @see is.idega.idegaweb.msi...
import is.idega.idegaweb.msi.data.Participant; import is.idega.idegaweb.msi.data.Race; import is.idega.idegaweb.msi.data.RaceEvent; import is.idega.idegaweb.msi.data.RaceUserSettings; import is.idega.idegaweb.msi.presentation.RaceBlock; import is.idega.idegaweb.msi.util.MSIConstants; import java.io.ByteArrayOutputStrea...
/* * $Id: RaceReportWriter.java,v 1.3 2008/05/21 09:04:17 palli Exp $ Created on Jan 25, 2006 * * Copyright (C) 2006 Idega Software hf. All Rights Reserved. * * This software is the proprietary information of Idega hf. Use is subject to license terms. */ package is.idega.idegaweb.msi.business; public class ...
.getBundle(RaceBlock.IW_BUNDLE_IDENTIFIER)
4
TangXiaoLv/Surgeon
surgeon-core/src/main/java/com/surgeon/weaving/core/MasterFinder.java
[ "public class SurgeonException extends Exception {\n\n public SurgeonException() {\n super();\n }\n\n public SurgeonException(String message) {\n super(message);\n }\n\n public SurgeonException(String message, Throwable cause) {\n super(message, cause);\n }\n\n public Surge...
import com.surgeon.weaving.core.exceptions.SurgeonException; import com.surgeon.weaving.core.interfaces.Continue; import com.surgeon.weaving.core.interfaces.IMaster; import com.surgeon.weaving.core.interfaces.ISurgeon; import com.surgeon.weaving.core.interfaces.Replacer; import java.lang.reflect.InvocationTargetExcepti...
package com.surgeon.weaving.core; /** * The master {@link ReplaceAbleAspect},Used for find replace function. */ class MasterFinder { private static final String PREFIX = "com.surgeon.weaving.masters.Master_"; private MasterFinder() { } private static class Lazy { static MasterFinder sMa...
IMaster master = InnerCache.getInstance().getMaster(masterPath);
2
Appolica/Flubber
Flubber/demo/src/main/java/com/appolica/sample/ui/main/activity/MainActivity.java
[ "public class Flubber {\n public static final float[] FRACTIONS = new float[]{0f, 0.2f, 0.4f, 0.6f, 0.8f, 1f};\n public static final String SCALE = \"scale\";\n private static final String TAG = \"Flubber\";\n\n @Contract(\" -> !null\")\n public static AnimationBody.Builder with() {\n return A...
import android.animation.Animator; import android.animation.AnimatorSet; import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import androidx.databinding.DataBindingUtil; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx....
package com.appolica.sample.ui.main.activity; public class MainActivity extends AppCompatActivity implements FabClickListener, FlubberClickListener, MainPanelFragment.AnimationClickListener { public static final int SECOND = 1000; public static final int DURATION_REVEAL = 350; ...
Flubber.with()
0
jglrxavpok/CustomAI
org/jglrxavpok/mods/customai/common/aifactory/EntityCustomAIAddedWorker.java
[ "public class EntityAIFleeSunEvenNotBurning extends EntityAIBase\n{\n private EntityCreature theCreature;\n private double shelterX;\n private double shelterY;\n private double shelterZ;\n private double movementSpeed;\n\n public EntityAIFleeSunEvenNotBurning(EntityCreature par1EntityCreature, dou...
import cpw.mods.fml.common.ObfuscationReflectionHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry; import net.minecraft.entity.passi...
package org.jglrxavpok.mods.customai.common.aifactory; public class EntityCustomAIAddedWorker extends EntityAIWorker { @SuppressWarnings("unchecked") @Override public EntityAITaskEntry generateAIBaseWithExceptions(EntityLiving entity, JSONObject json) throws Exception { if(!json.has("type"))...
else if(c == EntityAIFollowEntity.class)
1
fwix/java-gearman
src/org/gearman/ServerInstructionSet.java
[ "public final class GearmanPacket {\n\n\tpublic static final GearmanPacket NO_JOB = new GearmanPacket(Magic.RES, Type.NO_JOB);\n\tpublic static final GearmanPacket NOOP = new GearmanPacket(Magic.RES, Type.NOOP);\n\tpublic static final GearmanPacket PRE_SLEEP = new GearmanPacket(Magic.REQ, Type.PRE_SLEEP);\n\tpublic...
import java.util.Arrays; import org.gearman.core.GearmanPacket; import org.gearman.core.GearmanConstants; import org.gearman.core.GearmanPacket.Magic; import org.gearman.core.GearmanPacket.Type; import org.gearman.util.ByteArray; import org.gearman.GMServerFunctionMap;
/* * Copyright (C) 2010 by Isaiah van der Elst <isaiah.v@comcast.net> * Use and distribution licensed under the BSD license. See * the COPYING file in the parent directory for full text. */ package org.gearman; /** * The GearmanProtocol class defines how packets will be processed in compliance * with the ge...
public final void execute(final GearmanPacket packet, final ServerClient client) {
0
excella-core/excella-reports
src/test/java/org/bbreak/excella/reports/AllTestSuite.java
[ "@RunWith(Suite.class)\n@SuiteClasses({\n ExcelExporterTest.class,\n ReportBookExporterTest.class,\n XLSExporterTest.class,\n XLSXExporterTest.class,\n ExcelOutputStreamExporterTest.class,\n})\npublic class ExporterTestSuite {\n\n}", "@RunWith(Suite.class)\n@SuiteClasses({\n RemoveAdapterTest.cl...
import org.bbreak.excella.reports.exporter.ExporterTestSuite; import org.bbreak.excella.reports.listener.ListenerTestSuite; import org.bbreak.excella.reports.model.ModelTestSuite; import org.bbreak.excella.reports.others.OthersTestSuite; import org.bbreak.excella.reports.processor.ProcessorTestSuite; import org.bbreak....
/*- * #%L * excella-reports * %% * Copyright (C) 2009 - 2019 bBreak Systems and contributors * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licen...
UtilTestSuite.class,
6
Xiaofei-it/Shelly
shelly/src/main/java/xiaofei/library/shelly/util/Player.java
[ "public interface Function {\n\n}", "public interface Function1<T, R> extends Function {\n R call(T input);\n}", "public abstract class StashFunction implements Function {\n\n //Initialized by setStash(DoubleKeyMap), otherwise NPE will be thrown.\n private DoubleKeyMap mStash;\n\n public void setSta...
import xiaofei.library.shelly.scheduler.DefaultScheduler; import xiaofei.library.shelly.scheduler.Scheduler; import java.util.Collections; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import xiaofei.library.concurrentutils.AugmentedListCanary; import xiaofei.library.concurrentutils.util.Acti...
/** * * Copyright 2016 Xiaofei * * 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 w...
public final <R> Player<R> playFunction(List<? extends Function1<CopyOnWriteArrayList<T>, CopyOnWriteArrayList<R>>> functions) {
1
horizon-institute/artcodes-android
app/src/main/java/uk/ac/horizon/artcodes/fragment/ActionEditDialogFragment.java
[ "public enum Features implements Feature {\n\tshow_welcome(true),\n\tshow_local(false),\n\tlog_scanned_images(true),\n\tedit_colour(false),\n\tedit_features(false),\n\tupload_to_artcodes_co_uk(false),\n\topen_without_touch(false);\n\n\n\tprivate final boolean defaultValue;\n\n\tFeatures(boolean defaultValue) {\n\t\...
import android.app.Activity; import android.app.Dialog; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.provider.Settings; import android.text.InputFilter; import android.text.InputType; import android.text.method.DigitsKeyListener; import android.util.Log; import android...
/* * Artcodes recognises a different marker scheme that allows the * creation of aesthetically pleasing, even beautiful, codes. * Copyright (C) 2013-2016 The University of Nottingham * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Pu...
if (Features.upload_to_artcodes_co_uk.isEnabled(getContext())) {
0
bibryam/semat
app/src/main/java/com/ofbizian/semat/app/DomainAppAppManifest.java
[ "public final class DomainAppDomainModule {\n}", "public final class DomainAppFixtureModule {\n\n\n}", "public class DemoFixture extends AbstractFixtureScript {\n public DemoFixture() {\n withDiscoverability(Discoverability.DISCOVERABLE);\n }\n\n private Set<Project> projects = Sets.newLinkedHas...
import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.ofbizian.semat.dom.DomainAppDomainModule; import com.ofbizian.semat.fixture.DomainAppFixtureModule; import com.ofbizian.semat.fixture....
package com.ofbizian.semat.app; /** * Bootstrap the application. */ public class DomainAppAppManifest implements AppManifest { /** * Load all services and entities found in (the packages and subpackages within) these modules */ @Override public List<Class<?>> getModules() { return Ar...
DomainAppDomainModule.class
0
guillaume-alvarez/ShapeOfThingsThatWere
core/src/com/galvarez/ttw/rendering/CounterRenderSystem.java
[ "public final class MapPosition extends Component {\r\n\r\n public final int x, y;\r\n\r\n public MapPosition(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n\r\n @Override\r\n public int hashCode() {\r\n return x + y * 31;\r\n }\r\n\r\n @Override\r\n public boolean equals(Object obj) {\r\...
import java.util.HashMap; import java.util.Map; import com.artemis.Aspect; import com.artemis.ComponentMapper; import com.artemis.Entity; import com.artemis.annotations.Wire; import com.artemis.utils.ImmutableBag; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.OrthographicCamera; import com.ba...
package com.galvarez.ttw.rendering; @Wire public final class CounterRenderSystem extends AbstractRendererSystem { private static final int SIZE = 32; private ComponentMapper<MapPosition> positions; private ComponentMapper<Counter> counters; private final BitmapFont font; private final Map<Color, Textu...
FloatPair drawPosition = MapTools.world2window(position);
4
jjoe64/GraphView-Demos
app/src/main/java/com/jjoe64/graphview_demos/categories/SecondScaleAndLabelsFragment.java
[ "public enum FullscreenExample {\n HELLO_WORLD(R.layout.fullscreen_example_simple, HelloWorld.class),\n SCALING_XY(R.layout.fullscreen_example_simple, ScalingXY.class),\n SCALING_X(R.layout.fullscreen_example_simple, ScalingX.class),\n SCROLLING_X(R.layout.fullscreen_example_simple, ScrollingX.class),\n...
import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.jjoe64.graphview.GraphView; import com.jjoe64.graphview_demos.FullscreenExample; import com.jjoe64.graphview_demos.ItemDetailFragment; import com.jjoe64.graphview_demos.R; import com.jjoe64....
package com.jjoe64.graphview_demos.categories; /** * Created by jonas on 07.09.16. */ public class SecondScaleAndLabelsFragment extends ItemDetailFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Vie...
new CustomLabelsGraph().initGraph(graph);
2
FAOSTAT/faostat-api
faostat-api-web/src/main/java/org/fao/faostat/api/web/rest/V10Rankings.java
[ "public class FAOSTATAPICore {\n\n private static final Logger LOGGER = Logger.getLogger(FAOSTATAPICore.class);\n\n private QUERIES queries;\n\n public FAOSTATAPICore() {\n this.setQueries(new QUERIES());\n }\n\n public OutputBean query(String queryCode, DatasourceBean datasourceBean, Metadata...
import javax.ws.rs.core.*; import java.util.List; import org.apache.log4j.Logger; import org.fao.faostat.api.core.FAOSTATAPICore; import org.fao.faostat.api.core.StreamBuilder; import org.fao.faostat.api.core.beans.DatasourceBean; import org.fao.faostat.api.core.beans.MetadataBean; import org.fao.faostat.api.core.const...
/** * GNU GENERAL PUBLIC LICENSE * Version 2, June 1991 * <p/> * Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/> * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Everyone is permitted to copy and distribute verbatim copies * of this license document, but changing it is no...
StreamBuilder sb = new StreamBuilder();
1
tony-Shx/Swface
app/src/main/java/com/henu/swface/activity/FaceDetailActivity.java
[ "public class FaceDetailAdapter extends RecyclerView.Adapter<FaceDetailAdapter.ViewHolder> {\n\n\tprivate List<Uri> imageList;\n\tprivate OnItemLongClickListener onItemLongClickListener;\n\tprivate static final String TAG = FaceDetailAdapter.class.getSimpleName();\n\tprivate OnDeleteClickListener onDeleteClickListe...
import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.content.Inten...
Log.e(TAG, "startDeleteFace: ", e); e.printStackTrace(); } if (JSON.isEmpty() || JSON.contains("error_message")) { Message message = Message.obtain(); message.arg1 = FinalUtil.REMOVE_FACE_IO_EXCEPTION; Log.i(TAG, "startDeleteUser: 3"); myHandler.sendMessage(message); return; } } ...
File file = new File(PictureUtil.getPictureStoragePath(null), faceTokenAndUrl[0] + ".jpg");
5
xargsgrep/PortKnocker
app/src/main/java/com/xargsgrep/portknocker/fragment/HostListFragment.java
[ "public class EditHostActivity extends ActionBarActivity\n{\n public static final int MENU_ITEM_SAVE = 2;\n public static final int MENU_ITEM_DEBUG_INFO = 4;\n\n public static final int TAB_INDEX_HOST = 0;\n public static final int TAB_INDEX_PORTS = 1;\n public static final int TAB_INDEX_MISC = 2;\n\...
import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.ListFragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.wid...
/* * Copyright 2014 Ahsan Rabbani * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
HostArrayAdapter hostAdapter = new HostArrayAdapter(this, hosts);
2
JoshuaD84/HypnosMusicPlayer
src/net/joshuad/hypnos/audio/VLCAudioPlayer.java
[ "public class Hypnos extends Application {\n\n\tprivate static final Logger LOGGER = Logger.getLogger( Hypnos.class.getName() );\n\t\n\tpublic enum ExitCode {\n\t\tNORMAL,\n\t\tUNKNOWN_ERROR,\n\t\tAUDIO_ERROR, \n\t\tUNSUPPORTED_OS\n\t}\n\t\n\tpublic enum OS {\n\t\tWIN_XP ( \"Windows XP\" ),\n\t\tWIN_VISTA ( \"Windo...
import java.io.File; import java.nio.file.Files; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; import com.sun.jna.NativeLibrary; import net.joshuad.hypnos.Hypnos; import ...
package net.joshuad.hypnos.audio; public class VLCAudioPlayer { private static final Logger LOGGER = Logger.getLogger( VLCAudioPlayer.class.getName() ); public enum PlayState { STOPPED, PAUSED, PLAYING; } PlayState state = PlayState.STOPPED; AudioSystem controller;
Track currentTrack = null;
4
thlcly/Mini-JVM
src/main/java/com/aaront/exercise/jvm/commands/IStoreNCommand.java
[ "@Data\npublic class ClassFile {\n private String magicNumber;\n private int majorVersion;\n private int minorVersion;\n private ClassIndex classIndex;\n private InterfaceIndex interfaceIndex;\n private ConstantPool constantPool;\n private List<ClassAccessFlag> accessFlags;\n private List<Fi...
import com.aaront.exercise.jvm.ClassFile; import com.aaront.exercise.jvm.constant.ConstantPool; import com.aaront.exercise.jvm.engine.ExecutionResult; import com.aaront.exercise.jvm.engine.JavaObject; import com.aaront.exercise.jvm.engine.JavaType; import com.aaront.exercise.jvm.engine.StackFrame; import java.util.Stac...
package com.aaront.exercise.jvm.commands; /** * @author tonyhui * @since 2017/8/23 */ public class IStoreNCommand extends NoOperandCommand { private int pos; public IStoreNCommand(ClassFile clzFile, String opCode, int pos) { super(clzFile, opCode); this.pos = pos; } @Override ...
public void execute(StackFrame frame, ExecutionResult result) {
5
jhclark/bigfatlm
src/bigfat/step5/InterpolateOrdersMapper.java
[ "public class BigFatLM extends Configured implements Tool {\n\n\tpublic static final String PROGRAM_NAME = \"BigFatLM\";\n\tpublic static final int ZEROTON_ID = 0;\n\tpublic static final String UNK = \"<unk>\";\n\tpublic static final int UNK_ID = -1;\n\tpublic static final String BOS = \"<s>\";\n\tpublic static fin...
import jannopts.Option; import java.io.IOException; import org.apache.hadoop.mapreduce.Counter; import org.apache.hadoop.mapreduce.Mapper; import bigfat.BigFatLM; import bigfat.datastructs.FastIntArrayList; import bigfat.datastructs.Ngram; import bigfat.hadoop.HadoopUtils; import bigfat.step4.UninterpolatedInfo;
package bigfat.step5; // TODO: Special class for InterpolatedIntermediateValue? public class InterpolateOrdersMapper extends Mapper<Ngram, UninterpolatedInfo, DuplicatableNgram, InterpolateOrdersIntermediateInfo> { private final FastIntArrayList ids = new FastIntArrayList(5); private final DuplicatableNgram r...
HadoopUtils.configure(context.getConfiguration(), this);
3
ThomasDaheim/ownNoteEditor
ownNoteEditor/src/main/java/tf/ownnote/ui/notes/NoteMetaData.java
[ "public class CommentDataMapper {\n private final static CommentDataMapper INSTANCE = new CommentDataMapper();\n \n private static final String COMMENT_STRING_PREFIX = \"<!-- \";\n private static final String COMMENT_STRING_SUFFIX = \" -->\";\n public static final String COMMENT_DATA_SEP = \"---\";\n...
import java.io.File; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBoolean...
/* * Copyright (c) 2014ff Thomas Feuster * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and...
private static enum CommentDataInfo implements ICommentDataInfo {
2
IceReaper/DesktopAdventuresToolkit
src/net/eiveo/Unpacker.java
[ "public class SNDS {\r\n\tpublic List<Sound> sounds = new ArrayList<>();\r\n\t\r\n\tpublic static SNDS read(SmartByteBuffer data, boolean isYoda, File root) throws Exception {\r\n\t\tSNDS instance = new SNDS();\r\n\t\t\r\n\t\tint length = data.getInt();\r\n\t\tint lengthStart = data.position();\r\n\r\n\t\tshort num...
import java.awt.Color; import java.io.File; import net.eiveo.original.sections.SNDS; import net.eiveo.original.sections.TILE; import net.eiveo.original.sections.todo.not_converted_yet.ZONE; import net.eiveo.structured.Palette; import net.eiveo.structured.Sound; import net.eiveo.structured.Tile; import net.eiveo...
package net.eiveo; public class Unpacker { public static void unpack(File container, File executable) throws Exception { // Step 1: Read net.eiveo.original.Game originalGame = net.eiveo.original.Game.read(container, executable); // Step 2: Convert net.eiveo.structured.Game structuredGame = new ...
for (SNDS.Sound oldSound : originalGame.container.SNDS.sounds) {
0
konradrenner/kolabnotes-android
app/src/main/java/org/kore/kolabnotes/android/MainActivity.java
[ "public class OnHeaderClicked implements View.OnClickListener {\n\n private final NavigationView navigationView;\n private final DrawerAccountsService drawerAccountsService;\n\n private boolean arrowDown;\n\n public OnHeaderClicked(NavigationView navigationView) {\n this.navigationView = navigati...
import android.accounts.Account; import android.accounts.AccountManager; import android.app.Fragment; import android.app.FragmentManager; import android.content.Intent; import android.content.SyncStatusObserver; import android.os.Build; import android.os.Bundle; import com.google.android.material.navigation.NavigationV...
package org.kore.kolabnotes.android; public class MainActivity extends AppCompatActivity implements SyncStatusObserver, OnFragmentCallback, OnAccountSwitchedListener, OnAccountSwitchedFromNavListener, AccountChooserActivity { public static final String AUTHORITY = "kore.kolabnotes"; private DrawerLayout m...
if(fragment instanceof DetailFragment){
2
jpush/jmessage-api-java-client
example/main/java/cn/jmessage/api/examples/UserExample.java
[ "public class JMessageConfig {\n\n private static ClientConfig clientConfig = ClientConfig.getInstance();\n\n private static JMessageConfig instance = new JMessageConfig();\n\n public static final String API_HOST_NAME = \"im.api.host.name\";\n public static final String API_REPORT_HOST_NAME = \"im.api.r...
import java.util.ArrayList; import java.util.List; import cn.jiguang.common.ClientConfig; import cn.jiguang.common.ServiceHelper; import cn.jiguang.common.connection.ApacheHttpClient; import cn.jiguang.common.resp.ResponseWrapper; import cn.jmessage.api.common.JMessageConfig; import cn.jmessage.api.common.model.friend....
LOG.info("Error Message: " + e.getMessage()); } } public static void testDeleteUser() { JMessageClient client = new JMessageClient(appkey, masterSecret); try { client.deleteUser("test_user_119"); } catch (APIConnectionException e) { LOG.error...
List<FriendNote> friendNotes = new ArrayList<FriendNote>();
1
wasiahmad/intent_aware_privacy_protection_in_pws
source_code/src/edu/virginia/cs/main/tIndex_v1.java
[ "public class DeploymentConfig {\n\n public static String AolIndexPath;\n public static String OdpIndexPath;\n public static String UserSearchLogPath;\n public static String ReferenceModelPath;\n public static String AolDocFreqRecord;\n public static String OdpHierarchyRecord;\n public static S...
import edu.virginia.cs.config.DeploymentConfig; import edu.virginia.cs.config.RunTimeConfig; import edu.virginia.cs.model.ClassifyIntent; import edu.virginia.cs.object.Session; import edu.virginia.cs.object.UserQuery; import edu.virginia.cs.user.Intent; import edu.virginia.cs.user.Profile; import edu.virginia.cs.utilit...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.virginia.cs.main; /** * * @author wua4nw */ public class tIndex_v1 { private final int interval_in_hours; pri...
if (query.getCover_queries().size() != RunTimeConfig.NumberOfCoverQuery) {
1
maofw/anetty_client
src/com/netty/client/handler/PushMessageHandler.java
[ "public class NettyServerManager {\n\n\t// 心跳監控週期 30s\n\tprivate EventLoopGroup group;\n\t// private ChannelFuture channelFuture;\n\n\t// private ApplicationContextClient applicationContextClient;\n\n\tprivate static NettyProcessorHandler mNettyProcessorHandler;\n\n\tprivate static NettyServerManager connectionMana...
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import android.os.Handler; import android.os.Message; import android.util.Log; import com.netty.client.android.NettyServerManager; import com.netty.client.android.dao.Device; import com.netty.client.android.handler.Messa...
package com.netty.client.handler; /** * 客户端消息处理Handler * * @author maofw * */ public class PushMessageHandler extends SimpleChannelInboundHandler<CommandProtoc.PushMessage> { private ApplicationContextClient applicationContextClient; private NettyServerManager mConnectionManager; private Handler mHandler;...
what = NettyProcessorHandler.REGISTRATION_RESULT;
3
jjoe64/GraphView-Demos
app/src/main/java/com/jjoe64/graphview_demos/categories/SecondScaleAndLabelsFragment.java
[ "public enum FullscreenExample {\n HELLO_WORLD(R.layout.fullscreen_example_simple, HelloWorld.class),\n SCALING_XY(R.layout.fullscreen_example_simple, ScalingXY.class),\n SCALING_X(R.layout.fullscreen_example_simple, ScalingX.class),\n SCROLLING_X(R.layout.fullscreen_example_simple, ScrollingX.class),\n...
import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.jjoe64.graphview.GraphView; import com.jjoe64.graphview_demos.FullscreenExample; import com.jjoe64.graphview_demos.ItemDetailFragment; import com.jjoe64.graphview_demos.R; import com.jjoe64....
package com.jjoe64.graphview_demos.categories; /** * Created by jonas on 07.09.16. */ public class SecondScaleAndLabelsFragment extends ItemDetailFragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Vie...
new SecondScaleGraph().initGraph(graph);
4
einsteinsci/betterbeginnings
src/main/java/net/einsteinsci/betterbeginnings/network/ClientProxy.java
[ "@Mod(modid = ModMain.MODID, version = ModMain.VERSION, name = ModMain.NAME,\n guiFactory = \"net.einsteinsci.betterbeginnings.config.BBConfigGuiFactory\")\npublic class ModMain\n{\n\tpublic static final String MODID = \"betterbeginnings\";\n\tpublic static final String VERSION = \"0.9.8-pre1\";\n\tpublic stati...
import net.einsteinsci.betterbeginnings.ModMain; import net.einsteinsci.betterbeginnings.client.InfusionRender; import net.einsteinsci.betterbeginnings.client.RegisterMetaItemRenders; import net.einsteinsci.betterbeginnings.client.RenderThrownKnife; import net.einsteinsci.betterbeginnings.entity.projectile.EntityThrown...
package net.einsteinsci.betterbeginnings.network; public class ClientProxy extends ServerProxy { @Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); registerTileEntitySpecialRenderers(); } @Override public void init(FMLInitializationEvent e) { super.init(e); RegisterMetaIte...
RenderingRegistry.registerEntityRenderingHandler(EntityThrownKnife.class, new RenderThrownKnife(Minecraft.getMinecraft()));
2
xdevs23/Cornowser
app/src/main/java/io/xdevs23/cornowser/browser/browser/modules/tabs/BlueListedTabSwitcher.java
[ "public class XquidLinearLayout extends LinearLayout {\n\n private AttributeSet attrs;\n private int defStyleAttr = 0;\n private int defStyleRes = 0;\n\n public XquidLinearLayout(Context context) {\n super(context);\n }\n\n public XquidLinearLayout(Context context, AttributeSet attrs...
import android.animation.Animator; import android.content.Context; import android.graphics.Color; import android.graphics.Typeface; import android.os.Handler; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.AppCompatActivity; import android.text.TextUtils; import android.view.Co...
package io.xdevs23.cornowser.browser.browser.modules.tabs; @SuppressWarnings("deprecation") public class BlueListedTabSwitcher extends BasicTabSwitcher {
public XquidRelativeLayout mainView, fabLayout;
1
idega/se.idega.idegaweb.commune.accounting
src/java/se/idega/idegaweb/commune/accounting/export/ifs/business/IFSFileCreationThread.java
[ "public interface ExportDataMapping extends IDOEntity {\n\n\t/**\n\t * @see se.idega.idegaweb.commune.accounting.export.data.ExportDataMappingBMPBean#getPrimaryKeyClass\n\t */\n\tpublic Class getPrimaryKeyClass();\n\n\t/**\n\t * @see se.idega.idegaweb.commune.accounting.export.data.ExportDataMappingBMPBean#getOpera...
import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.rmi.RemoteException; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.Locale; import javax.ejb.CreateException; import javax.ejb.EJBExcepti...
fileName7.append(now.getDateString("yyMMdd_HHmm")); fileName8.append(now.getDateString("yyMMdd_HHmm")); fileName9.append(now.getDateString("yyMMdd_HHmm")); } try { createPaymentFiles(fileName1.toString(), fileName2.toString(), fileName4.toString(), fileName5.toString(), fileName6.toSt...
rec = ((PaymentRecordHome) IDOLookup.getHome(PaymentRecord.class)).findByPaymentHeaders(phInCommune);
6
exoplatform/task
integration/src/main/java/org/exoplatform/task/integration/ActivityTaskCreationListener.java
[ "@Data\n@NoArgsConstructor\npublic class ProjectDto implements Serializable {\n private static final Log LOG = ExoLogger.getLogger(ProjectDto.class);\n\n\n private long id;\n\n private String name;\n\n private String description;\n\n private String color;\n\n private Set<St...
import org.apache.commons.lang.StringEscapeUtils; import org.exoplatform.social.core.activity.ActivityLifeCycleEvent; import org.exoplatform.social.core.activity.ActivityListenerPlugin; import org.exoplatform.social.core.activity.model.ActivityStream; import org.exoplatform.social.core.activity.model.ExoSocialActivity;...
/* * Copyright (C) 2003-2015 eXo Platform SAS. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
private UserService userService;
7
otto-de/jlineup
core/src/test/java/de/otto/jlineup/report/HTMLReportWriterTest.java
[ "@JsonDeserialize(builder = ScreenshotContext.Builder.class)\npublic final class ScreenshotContext {\n public final String url;\n public final String urlSubPath;\n public final DeviceConfig deviceConfig;\n public final List<Cookie> cookies;\n @JsonIgnore\n public final Step step;\n @JsonIgnore...
import com.google.common.collect.ImmutableMap; import de.otto.jlineup.browser.ScreenshotContext; import de.otto.jlineup.config.DeviceConfig; import de.otto.jlineup.config.JobConfig; import de.otto.jlineup.config.Step; import de.otto.jlineup.config.UrlConfig; import de.otto.jlineup.file.FileService; import org.junit.Bef...
package de.otto.jlineup.report; public class HTMLReportWriterTest { private HTMLReportWriter testee; @Mock private FileService fileServiceMock; private final List<ScreenshotComparisonResult> screenshotComparisonResults = singletonList(new ScreenshotComparisonResult(1887, "someurl/somepath", Devic...
when(fileServiceMock.getRecordedContext(anyInt())).thenReturn(ScreenshotContext.of("someUrl", "somePath", DeviceConfig.deviceConfig(1337,200), Step.before, UrlConfig.urlConfigBuilder().build()));
0
aaronjwood/PortAuthority
app/src/main/java/com/aaronjwood/portauthority/activity/HostActivity.java
[ "public class Database extends SQLiteOpenHelper {\n\n public static final String DATABASE_NAME = \"PortAuthority\";\n private static final int DATABASE_VERSION = 2;\n private static final String OUI_TABLE = \"ouis\";\n private static final String PORT_TABLE = \"ports\";\n private static final String ...
import android.app.Dialog; import android.app.ProgressDialog; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.util.SparseArray; import android.view.View; import android.view.ani...
/** * Click handler to open certain ports to the browser * @param parent * @param view * @param position * @param id */ @Override public void onItemClick(AdapterView<?> parent, View view, int position, long...
handler.post(() -> Errors.showError(getApplicationContext(), output.getLocalizedMessage()));
5
citysearch/web-widgets
src/main/java/com/citysearch/webwidget/api/proxy/OfferProxy.java
[ "public class OfferAPIBean {\n\tprivate String attributionSrc;\n\tprivate String rating;\n\tprivate String reviewCount;\n\tprivate String profileUrl;\n\tprivate String phone;\n\tprivate String imageUrl;\n\tprivate String listingId;\n\tprivate String listingName;\n\tprivate String offerId;\n\tprivate String offerDes...
import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import java.net.URLEncoder; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.SortedMap; import java.util.TreeMap; import org.apache.commons.lang.StringUtils; import org.apa...
package com.citysearch.webwidget.api.proxy; public class OfferProxy extends AbstractProxy { private final static String PROPERTY_OFFERS_URL = "offers.url"; private Logger log = Logger.getLogger(getClass()); private static final String OFFER = "offer"; private static final String RPP_OFFERS = "2"; private stati...
private OfferAPIBean toOffer(Element offerElement)
0
TranquilMarmot/spaceout
src/com/bitwaffle/spaceguts/graphics/gui/menu/PauseMenu.java
[ "public class Entities {\n\t/** player instance */\n\tpublic static Player player;\n\t/** camera instance */\n\tpublic static Camera camera;\n\t/** the skybox */\n\tpublic static Skybox skybox;\n\n\t/** all the current passive entities */\n\tpublic static ArrayList<Entity> passiveEntities = new ArrayList<Entity>(10...
import java.util.Map; import com.bitwaffle.spaceguts.entities.Entities; import com.bitwaffle.spaceguts.graphics.gui.GUI; import com.bitwaffle.spaceguts.graphics.gui.GUIObject; import com.bitwaffle.spaceguts.physics.Physics; import com.bitwaffle.spaceguts.util.menu.MenuPainter; import com.bitwaffle.spaceguts.util.menu.M...
package com.bitwaffle.spaceguts.graphics.gui.menu; /** * The pause menu! * * @author arthurdent * */ public class PauseMenu extends GUIObject { /** whether or not to go back to the main menu on the next update */ public static boolean backToMainMenu = false; private MenuPainter menuPainter; /** * Pau...
Physics.cleanup();
3
ptitfred/magrit
server/core/src/test/java/org/kercoin/magrit/core/build/StatusesServiceImplTest.java
[ "public class Pair<T, U> {\n\tprivate T t;\n\tprivate U u;\n\n\tpublic Pair(T t, U u) {\n\t\tsuper();\n\t\tthis.t = t;\n\t\tthis.u = u;\n\t}\n\t\n\tpublic T getT() {\n\t\treturn t;\n\t}\n\n\tpublic U getU() {\n\t\treturn u;\n\t}\n\n\t@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = ...
import static org.fest.assertions.Assertions.assertThat; import static org.mockito.BDDMockito.given; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import java.io.File; import java.util.Arrays; import junit.framework.Assert; import org.eclipse.jgit.lib.Repository; import org.junit.AfterC...
/* Copyright 2011-2012 Frederic Menou and others referred in AUTHORS file. This file is part of Magrit. Magrit is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your ...
@Mock Pipeline pipeline;
4
mikroskeem/Shuriken
instrumentation/src/test/java/eu/mikroskeem/test/shuriken/instrumentation/ValidatorTester.java
[ "public final class ClassDescriptor {\n private final Class<?> clazz;\n private final Class<?>[] extendingClasses;\n private ClassDescriptor(Class<?> clazz, Class<?>... arguments) {\n this.clazz = Ensure.notNull(clazz, \"Class shouldn't be null\");\n this.extendingClasses = arguments;\n }\...
import eu.mikroskeem.shuriken.instrumentation.validate.ClassDescriptor; import eu.mikroskeem.shuriken.instrumentation.validate.ConstructorDescriptor; import eu.mikroskeem.shuriken.instrumentation.validate.MethodDescriptor; import eu.mikroskeem.shuriken.instrumentation.validate.Validate; import eu.mikroskeem.shuriken.re...
package eu.mikroskeem.test.shuriken.instrumentation; public class ValidatorTester { @Test public void testClassValidator() throws Exception {
ClassDescriptor cd = ClassDescriptor.of(TestClass.class, Object.class);
6
komamj/KomaMusic
app/src/main/java/com/koma/music/main/MainActivity.java
[ "public class AlbumsFragment extends BaseLoadingFragment implements AlbumsConstract.View {\n private static final String TAG = AlbumsFragment.class.getSimpleName();\n\n @NonNull\n private AlbumsConstract.Presenter mPresenter;\n\n private AlbumsAdapter mAdapter;\n\n @Override public void onCreate(Bund...
import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.support.design.widget.AppBarLayout; import android.support.design.widget.NavigationView; import android.support.design.widget.TabLayout; import android.support.v4.view.GravityCompat; import android.support.v4.view.ViewPag...
/* * Copyright (C) 2017 Koma MJ * * 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...
AlbumsFragment albumsFragment = new AlbumsFragment();
0
tliron/scripturian
components/scripturian/source/com/threecrickets/scripturian/parser/MixedParser.java
[ "public class Executable\n{\n\t//\n\t// Constants\n\t//\n\n\t/**\n\t * Prefix prepended to on-the-fly scriptlets stored in the document source.\n\t */\n\tpublic static final String ON_THE_FLY_PREFIX = \"_ON_THE_FLY_\";\n\n\t//\n\t// Static operations\n\t//\n\n\t/**\n\t * If the executable does not yet exist in the ...
import java.util.Collection; import java.util.Iterator; import com.threecrickets.scripturian.Executable; import com.threecrickets.scripturian.ExecutableSegment; import com.threecrickets.scripturian.LanguageAdapter; import com.threecrickets.scripturian.LanguageManager; import com.threecrickets.scripturian.Parser; import...
/** * Copyright 2009-2017 Three Crickets LLC. * <p> * The contents of this file are subject to the terms of the LGPL version 3.0: * http://www.gnu.org/copyleft/lesser.html * <p> * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly f...
LanguageManager languageManager = parsingContext.getLanguageManager();
3
bitionaire/el-bombillo
el-bombillo-account-service/src/main/java/org/bitionaire/elbombillo/account/AccountServiceApplication.java
[ "public class AccountServiceAuthenticator implements Authenticator<BasicCredentials, AccountServiceCaller> {\n\n /** The information about this service. */\n private final ServiceInformation serviceInformation;\n\n /**\n * Constructs a new authenticator instance.\n * <p />\n * The provided serv...
import io.dropwizard.Application; import io.dropwizard.auth.AuthFactory; import io.dropwizard.auth.basic.BasicAuthFactory; import io.dropwizard.client.JerseyClientBuilder; import io.dropwizard.db.DataSourceFactory; import io.dropwizard.jdbi.DBIFactory; import io.dropwizard.setup.Bootstrap; import io.dropwizard.setup.En...
package org.bitionaire.elbombillo.account; /** * This application provides RESTful interfaces to manage user accounts. * <p /> * All initialization steps are documented within the {@link #run(AccountServiceConfiguration, Environment)} method. */ @Slf4j public class AccountServiceApplication extends Application<A...
environment.healthChecks().register("registry", new ServiceRegistryHealthCheck(accountServiceLifecycleListener));
3
MarcProe/lp2go
app/src/main/java/org/librepilot/lp2go/controller/ViewController.java
[ "public class MainActivity extends AppCompatActivity {\r\n public static final int CALLBACK_FILEPICKER_UAVO = 3456;\r\n public static final int CALLBACK_TTS = 6574;\r\n public static final int POLL_WAIT_TIME = 500;\r\n public static final int POLL_SECOND_FACTOR = 1000 / POLL_WAIT_TIME;\r\n public sta...
import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; import android.support.v7.app.ActionBar; import android.view.View; import android....
public MenuItem getMenuItem() { return mMenuItem; } public void update() { mBlink = !mBlink; //TTS if (SettingsHelper.mText2SpeechEnabled) { String statusArmed = getData("FlightStatus", "Armed").toString(); if (!mPreviousArmedStatus.equal...
boolean sendMetaObject(UAVTalkMetaData o) {
5
anqit/spanqit
src/main/java/com/anqit/spanqit/graphpattern/TriplesSameSubject.java
[ "public class Rdf {\n\t// not sure if other protocols are generally used in RDF iri's?\n\tprivate static final Set<String> IRI_PROTOCOLS = Stream.of(\"http://\", \"https://\", \"mailto:\").collect(Collectors.toSet());\n\n\tprivate Rdf() { \t}\n\n\t/**\n\t * Create a Spanqit Iri instance from a String iri\n\t * \n\t...
import com.anqit.spanqit.rdf.Rdf; import com.anqit.spanqit.rdf.RdfObject; import com.anqit.spanqit.rdf.RdfPredicate; import com.anqit.spanqit.rdf.RdfPredicateObjectList; import com.anqit.spanqit.rdf.RdfPredicateObjectListCollection; import com.anqit.spanqit.rdf.RdfSubject;
package com.anqit.spanqit.graphpattern; /** * A SPARQL Triple Pattern. * * @see <a * href="http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#QSynTriples"> * Triple pattern syntax</a> */ class TriplesSameSubject implements TriplePattern { private RdfSubject subject; private RdfPredi...
TriplesSameSubject(RdfSubject subject, RdfPredicate predicate, RdfObject... objects) {
1
RoboTricker/Transport-Pipes
src/main/java/de/robotricker/transportpipes/rendersystems/pipe/vanilla/model/VanillaPipeModelMID.java
[ "public class GoldenPipe extends Pipe {\n\n private ItemFilter[] itemFilters;\n\n public GoldenPipe(DuctType ductType, BlockLocation blockLoc, World world, Chunk chunk, DuctSettingsInventory settingsInv, GlobalDuctManager globalDuctManager, ItemDistributorService itemDistributor) {\n super(ductType, bl...
import org.bukkit.inventory.ItemStack; import org.bukkit.util.Vector; import java.util.ArrayList; import java.util.List; import de.robotricker.transportpipes.duct.pipe.GoldenPipe; import de.robotricker.transportpipes.hitbox.AxisAlignedBB; import de.robotricker.transportpipes.location.RelativeLocation; import de.robotri...
package de.robotricker.transportpipes.rendersystems.pipe.vanilla.model; public class VanillaPipeModelMID extends VanillaPipeModel { public VanillaPipeModelMID() { super(); aabb = new AxisAlignedBB(0.25d, 0.25d, 0.25d, 0.75d, 0.75d, 0.75d); } @Override public List<ArmorStandData> cr...
asd.add(new ArmorStandData(new RelativeLocation(0.5f, -0.43f, 0.5f), true, new Vector(1, 0, 0), new Vector(0, 0, 0), new Vector(0, 0, 0), block, null));
2
ihongs/HongsCORE
hongs-core/src/main/java/io/github/ihongs/action/serv/AuthFilter.java
[ "public final class Cnst {\n\n //** 默认取值 **/\n\n public static final String LANG_DEF = \"zh_CN\"; // 默认语言\n\n public static final String ZONE_DEF = \"GMT+8\"; // 默认时区\n\n public static final int RN_DEF = 20 ; // 默认每页行数\n\n //** 查询参数 **/\n\n public static final String ID_KEY = \"id\"; // 编号\n...
import io.github.ihongs.Cnst; import io.github.ihongs.Core; import io.github.ihongs.CoreConfig; import io.github.ihongs.CoreLocale; import io.github.ihongs.HongsException; import io.github.ihongs.HongsExemption; import io.github.ihongs.action.ActionDriver; import io.github.ihongs.action.ActionHelper; import io....
package io.github.ihongs.action.serv; /** * 动作权限过滤器 * * <h3>初始化参数(init-param):</h3> * <pre> * url-exclude 排除的 URL, 可用";"分割多个, 可用"*"为通配符 * url-include 包含的 URL, 可用";"分割多个, 可用"*"为通配符 * config-name 菜单配置, 注: 如存在同名动作, 则全区均需登录 * expire-time 登录超时(默认为永久) * index-page 起始页(为空则不跳转) * login-page 登录页...
private NaviMap siteMap;
3
strassl/Lampshade
lampshade/src/main/java/eu/prismsw/lampshade/fragments/SavedArticlesFragment.java
[ "public class RemoveActionMode {\n\tpublic Activity activity;\n\t\n\tpublic ActionMode mActionMode;\n\tpublic Uri selectedUrl;\n\n public Uri contentUri;\n\n\tpublic RemoveActionMode(Activity activity, Uri contentUri) {\n\t\tthis.activity = activity;\n this.contentUri = contentUri;\n\t}\n\t\n\tpublic void...
import android.app.Activity; import android.app.DialogFragment; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.v4.widget.CursorAdapter; import android.support.v4.widget.SimpleCursorAdapter; import android.view.LayoutInflater; import android.view.View; import and...
package eu.prismsw.lampshade.fragments; public class SavedArticlesFragment extends DialogFragment { public RemoveActionMode removeActionMode;
public TropesApplication application;
1
domenique/tripled-framework
eventbus-core/src/test/java/eu/tripledframework/eventbus/handler/TestCommandHandler.java
[ "public class AnCommandHandledByMultipleHandlers {\n\n}", "public class CommandHandledByAPrivateMethod {\n\n}", "public class FailingCommand {\n}", "public class FailingCommandWithCheckedException {\n\n}", "public class HelloCommand {\n\n private String name;\n\n public HelloCommand(String name) {\n th...
import eu.tripledframework.eventbus.Handler; import eu.tripledframework.eventbus.Handles; import eu.tripledframework.eventbus.command.AnCommandHandledByMultipleHandlers; import eu.tripledframework.eventbus.command.CommandHandledByAPrivateMethod; import eu.tripledframework.eventbus.command.FailingCommand; import eu.trip...
/* * Copyright 2015 TripleD framework. * * 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 a...
@Handles(FailingCommand.class)
2
osiefart/wicket-christmas
src/main/java/com/senacor/wicket/async/christmas/app/badheart/BadHeartPage.java
[ "public class PageRequestCounter extends Label {\n\n public PageRequestCounter(String id) {\n super(id);\n setOutputMarkupId(true);\n setDefaultModel(new CountingModel());\n }\n\n @Override\n public void onEvent(IEvent<?> event) {\n if (event.getPayload() instanceof AjaxRequestTarget) {\n ((Aja...
import org.apache.wicket.Component; import org.apache.wicket.ajax.AjaxSelfUpdatingTimerBehavior; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.model.IModel; import org.apache.wicket.util.time.Duration; import org.springframework.social.twitter.api.Tweet; import com.senacor.wicket.async.christma...
package com.senacor.wicket.async.christmas.app.badheart; /** * A Bad Heart pumps too much. By adding a Time-Behavior to each of the included * panels a request is generated for EACH ONE. The more panels the more requests * you got. A nice way to load-test your server. * * @author Jochen Mader, Senacor Technolo...
IAsyncModel<SyndFeed> dilbertFeedModel = new DilbertAsyncModel();
3
teivah/TIBreview
src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/CProcessorKeyStoreTest.java
[ "public class TIBResource {\n\tprivate String filePath;\n\tprivate String type;\n\t\n\tprivate static final String REQUEST_GET_TYPE = \"/jndi:namedResource/@type\";\n\t\n\tpublic TIBResource(String filePath) throws Exception {\n\t\tthis.filePath = filePath;\n\t\tthis.type = Util.xpathEval(filePath, Constants.RESOUR...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import org.apache.log4j.Logger; import org.junit.Test; import com.tibco.exchange.tibreview.common.TIBResource; import com.tibco.exchange.tibreview.engine.Context; import com.tibco.exchange.tibreview.mod...
package com.tibco.exchange.tibreview.processor.resourcerule; public class CProcessorKeyStoreTest { private static final Logger LOGGER = Logger.getLogger(CProcessorKeyStoreTest.class); @Test public void testCProcessorKeyStoreTest() { TIBResource fileresource; try { fileresource = new TIBRe...
Configuration Configuracion = resource.getRule().get(0).getConfiguration();
3
TeamAmeriFrance/Guide-API
src/main/java/amerifrance/guideapi/api/impl/Entry.java
[ "public interface IPage {\n\n @SideOnly(Side.CLIENT)\n void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRendererObj);\n\n @SideOnly(Side.CLIENT)\n void drawExtras(Book book, CategoryAbstract category, ...
import amerifrance.guideapi.api.IPage; import amerifrance.guideapi.api.impl.abstraction.CategoryAbstract; import amerifrance.guideapi.api.impl.abstraction.EntryAbstract; import amerifrance.guideapi.api.util.GuiHelper; import amerifrance.guideapi.gui.GuiBase; import amerifrance.guideapi.gui.GuiCategory; import amerifran...
package amerifrance.guideapi.api.impl; public class Entry extends EntryAbstract { public Entry(List<IPage> pageList, String name, boolean unicode) { super(pageList, name, unicode); } public Entry(List<IPage> pageList, String name) { super(pageList, name, false); } public Entry(...
public void onLeftClicked(Book book, CategoryAbstract category, int mouseX, int mouseY, EntityPlayer player, GuiCategory guiCategory) {
5
Vauff/Maunz-Discord
src/com/vauff/maunzdiscord/threads/ChatInputInteractionThread.java
[ "public abstract class AbstractCommand\n{\n\t/**\n\t * Holds all messages as keys which await a reaction by a specific user.\n\t * The values hold an instance of {@link Await}\n\t */\n\tpublic static final HashMap<Snowflake, Await> AWAITED = new HashMap<>();\n\n\t/**\n\t * Enum holding the different bot permissions...
import com.vauff.maunzdiscord.commands.templates.AbstractCommand; import com.vauff.maunzdiscord.commands.templates.AbstractSlashCommand; import com.vauff.maunzdiscord.core.Logger; import com.vauff.maunzdiscord.core.Main; import com.vauff.maunzdiscord.core.MainListener; import com.vauff.maunzdiscord.core.Util; import di...
package com.vauff.maunzdiscord.threads; public class ChatInputInteractionThread implements Runnable { private ChatInputInteractionEvent event; private Thread thread; private String name; public ChatInputInteractionThread(ChatInputInteractionEvent passedEvent, String passedName) { name = passedName; event ...
if (!(channel instanceof PrivateChannel) && !Util.hasPermission(author, guild))
5
Tyler1555/Mini-Bosses
me/tyler15555/minibosses/common/MBEventHandler.java
[ "public class EntityLivingBlock extends EntityMob implements IMiniboss {\n\t\n\tpublic EntityLivingBlock(World par1World) {\n\t\tsuper(par1World);\n\t\tthis.tasks.addTask(0, new EntityAIWander(this, 1.0D));\n\t\tthis.tasks.addTask(1, new EntityAISwimming(this));\n\t\tthis.tasks.addTask(2, new EntityAIAttackOnCollid...
import java.util.ArrayList; import java.util.Random; import me.tyler15555.minibosses.entity.EntityLivingBlock; import me.tyler15555.minibosses.item.MBItems; import me.tyler15555.minibosses.util.ConfigHelper; import me.tyler15555.minibosses.util.ExtendedPlayerProperties; import me.tyler15555.minibosses.util.IMiniboss; i...
package me.tyler15555.minibosses.common; public class MBEventHandler { private final Random random = new Random(); private final ArrayList playersToSave = new ArrayList(); @SubscribeEvent public void onEntitySpawn(EntityJoinWorldEvent event) { if(ConfigHelper.microBossesEnabled) { if(event.entity ins...
MicroBossProperties props = MicroBossProperties.generateRandomProperties();
5
magnusmickelsson/pokeraidbot
src/main/java/pokeraidbot/domain/tracking/TrackingService.java
[ "public class LocaleService {\n private static final Logger LOGGER = LoggerFactory.getLogger(LocaleService.class);\n public static final String NEW_EX_RAID_HELP = \"NEW_EX_RAID_HELP\";\n public static final String RAIDSTATUS = \"RAIDSTATUS\";\n public static final String NO_RAID_AT_GYM = \"NO_RAID_AT_GY...
import net.dv8tion.jda.api.entities.Guild; import net.dv8tion.jda.api.entities.User; import org.apache.commons.lang3.Validate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import p...
package pokeraidbot.domain.tracking; @Transactional(propagation = Propagation.REQUIRES_NEW) public class TrackingService { private static final transient Logger LOGGER = LoggerFactory.getLogger(TrackingService.class); private final LocaleService localeService; private final UserConfigRepository userConfi...
public void notifyTrackers(Guild guild, Raid raid, Config configForServer, User user, String rawMessage) {
5
timschlechter/swagger-for-elasticsearch
src/main/java/net/itimothy/elasticsearch/plugin/swagger/v1_2/SwaggerMetadataConverter.java
[ "public enum HttpMethod {\n GET,\n POST,\n PUT,\n PATCH,\n DELETE,\n OPTIONS,\n HEAD\n}", "public class Parameter extends DataType {\n\n /**\n * The model of the parameter (that is, the location of the parameter in the request).\n */\n private ParameterType paramType;\n\n /**...
import com.google.common.base.Function; import com.google.common.collect.ImmutableMap; import net.itimothy.elasticsearch.routes.model.*; import org.apache.commons.lang3.StringUtils; import net.itimothy.elasticsearch.plugin.swagger.v1_2.model.Items; import net.itimothy.elasticsearch.plugin.swagger.v1_2.model.apiDeclarat...
return null; } private String toNickname(Route route) { return StringUtils.isBlank(route.getName()) ? toCamelCase(String.format("%s %s", route.getMethod().name().toLowerCase(), route.getApiPath())) : route.getName(); } public Map<String, Model> toModels(List<Rou...
List<Resource> resources = new ArrayList<>();
3
OpenWatch/OpenWatch-Android
app/OpenWatch/src/org/ale/openwatch/gcm/OWGcmBroadcastReceiver.java
[ "public class FeedFragmentActivity extends SherlockFragmentActivity {\n private static String TAG = \"FeedFragmentActivity\";\n TabHost mTabHost;\n ViewPager mViewPager;\n TabsAdapter mTabsAdapter;\n TitlePageIndicator mTitleIndicator;\n int nextPagerViewId;\n\n public VideoView videoView;\n ...
import android.app.Activity; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.media.RingtoneManager; import android.os.Bundle; import android.support.v4.app.NotificationCompat...
package org.ale.openwatch.gcm; /** * Created by davidbrodsky on 5/29/13. */ public class OWGcmBroadcastReceiver extends BroadcastReceiver { static final String TAG = "GCMDemo"; public static final int NOTIFICATION_ID = 1; private NotificationManager mNotificationManager; NotificationCompat.Builder b...
DatabaseManager.registerModels(ctx);
3
Tonius/SimplyJetpacks
src/main/java/tonius/simplyjetpacks/item/meta/JetpackPotato.java
[ "@Mod(modid = SimplyJetpacks.MODID, version = SimplyJetpacks.VERSION, dependencies = SimplyJetpacks.DEPENDENCIES, guiFactory = SimplyJetpacks.GUI_FACTORY)\npublic class SimplyJetpacks {\n \n public static final String MODID = \"simplyjetpacks\";\n public static final String VERSION = \"@VERSION@\";\n pu...
import java.util.List; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityFireworkRocket; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.EntityDamageS...
package tonius.simplyjetpacks.item.meta; public class JetpackPotato extends Jetpack { protected static final String TAG_FIRED = "JetpackPotatoFired"; protected static final String TAG_ROCKET_TIMER = "JetpackPotatoRocketTimer"; protected static final String TAG_ROCKET_TIMER_SET = "JetpackPotatoRocket...
public ParticleType getDisplayParticleType(ItemStack itemStack, ItemPack item, EntityLivingBase user) {
4
codebling/VFSJFileChooser2
src/net/sf/vfsjfilechooser/filepane/VFSFilePane.java
[ "@SuppressWarnings(\"serial\")\r\npublic class VFSJFileChooser extends JComponent implements Accessible\r\n{\r\n private static final Frame SHARED_FRAME = new Frame();\r\n private static final FileObject[] EMPTY_FILEOBJECT_ARRAY = new FileObject[]{};\r\n\r\n // ******************************\r\n // ****...
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.ComponentOrientation; import java.awt.Container; import java.awt.Cursor; import java.awt.Dimension; import java.awt.Font; import java.awt.Insets; import java.awt.KeyboardFocusManager; import java.awt.Point; import java.awt.R...
* by first typed another letter. */ @Override public void keyTyped(KeyEvent e) { BasicVFSDirectoryModel model = getModel(); int rowCount = model.getSize(); if ((detailsTable == null) || (rowCount == 0) || e.is...
protected VFSJFileChooser getFileChooser()
0
MinecraftForge/ForgeGradle
src/userdev/java/net/minecraftforge/gradle/userdev/util/Deobfuscator.java
[ "public enum HashFunction {\n MD5(\"md5\", 32),\n SHA1(\"SHA-1\", 40),\n SHA256(\"SHA-256\", 64),\n SHA512(\"SHA-512\", 128);\n\n private final String algo;\n private final String pad;\n\n HashFunction(String algo, int length) {\n this.algo = algo;\n this.pad = String.format(Local...
import net.minecraftforge.gradle.common.util.HashFunction; import net.minecraftforge.gradle.common.util.HashStore; import net.minecraftforge.gradle.common.util.MavenArtifactDownloader; import net.minecraftforge.gradle.common.util.McpNames; import net.minecraftforge.gradle.common.util.Utils; import net.minecraftforge.gr...
/* * ForgeGradle * Copyright (C) 2018 Forge Development LLC * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later ver...
Utils.updateHash(output, HashFunction.SHA1);
4
magnifikus/modPLC
src/minecraft/de/squig/plc/logic/objects/LogicTimer.java
[ "public abstract class Circuit implements Serializable, ITickNotified {\n\tprotected List<CircuitObject> objects;\n\n\tprotected CircuitMap map;\n\n\tprotected TileController controller;\n\tprotected CircuitSimulator simulator;\n\n\tprotected List<CircuitElement> simulationList = null;\n\tprotected List<Object> com...
import java.util.ArrayList; import java.util.List; import de.squig.plc.logic.Circuit; import de.squig.plc.logic.Signal; import de.squig.plc.logic.elements.functions.ElementFunction; import de.squig.plc.logic.helper.LogHelper; import de.squig.plc.logic.objects.guiFunctions.GuiFunction; import de.squig.plc.logic.objects....
package de.squig.plc.logic.objects; /** * * timeBase - starttime to be used * timeTick - length of a tick * * long getNextActivated(long now) - to get next event * boolean paused - no next, on deactivation timeBase needs shift * long pauseStart - to restore timer after pause * * reset() * pause(boolean p...
public LogicTimer(Circuit circuit, short linkNumber) {
0
emersonmello/dummyuafclient
app/src/test/java/org/ebayopensource/fidouaf/marvin/client/OperationalParamsDummy.java
[ "public class Version {\n public int major;\n public int minor;\n \n public Version (int major, int minor){\n\t\tthis.major = major;\n\t\tthis.minor = minor;\n }\n}", "public enum AlgAndEncodingEnum {\n\t\n\tUAF_ALG_SIGN_SECP256R1_ECDSA_SHA256_RAW (0x01),\n\tUAF_ALG_SIGN_SECP256R1_ECDSA_SHA256_DER ...
import org.ebayopensource.fidouaf.marvin.client.msg.Version; import org.ebayopensource.fidouaf.marvin.client.tlv.AlgAndEncodingEnum; import org.ebayopensource.fidouaf.marvin.client.tlv.TagsEnum; import java.security.KeyPairGenerator; import java.security.KeyStore; import java.util.Enumeration; import java.util.HashMap;...
package org.ebayopensource.fidouaf.marvin.client; public class OperationalParamsDummy implements OperationalParamsIntf{ public static final String TEST_AAID = "TEST-AAID"; public static final String TestKeyId = "TEST-KEYID"; public static final byte[] TestPublicKey = "TEST_PUBLIC_KEY".getBytes(); public sta...
authenticator.attachmentHint = AttachmentHintEnum.ATTACHMENT_HINT_INTERNAL.getValue();
3
VernonLee/Theogony
app/src/main/java/com/nodlee/theogony/thirdparty/gson/SpellDeserializer.java
[ "public class Image {\n private String full;\n private String sprite;\n private String group;\n private int x;\n private int y;\n private int w;\n private int h;\n\n public String getFull() {\n return full;\n }\n\n public void setFull(String full) {\n this.full = full;\n ...
import android.text.TextUtils; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.reflect.TypeToken; import com.nodlee.theogony.bean.Image; im...
package com.nodlee.theogony.thirdparty.gson; /** * 作者:nodlee * 时间:2017/3/17 * 说明: */ public class SpellDeserializer implements JsonDeserializer<Spell> { @Override public Spell deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { if (jso...
LogHelper.LOGD("解析出错," + tooltip);
3
julianthome/inmemantlr
inmemantlr-api/src/test/java/TestMalformed.java
[ "public class GenericParser {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(GenericParser.class);\n\n public enum CaseSensitiveType {\n NONE,\n UPPER,\n LOWER\n }\n\n private InmemantlrTool antlr = new InmemantlrTool();\n private DefaultListener listener = new ...
import org.snt.inmemantlr.exceptions.CompilationException; import org.snt.inmemantlr.exceptions.IllegalWorkflowException; import org.snt.inmemantlr.exceptions.ParsingException; import org.snt.inmemantlr.listener.DefaultTreeListener; import org.snt.inmemantlr.utils.FileUtils; import java.io.File; import java.io.FileNotF...
/** * Inmemantlr - In memory compiler for Antlr 4 * * The MIT License (MIT) * * Copyright (c) 2016 Julian Thome <julian.thome.de@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the S...
} catch (CompilationException e) {
1
sing-group/bicycle
src/main/java/es/cnio/bioinfo/bicycle/cli/DifferentialMethylationAnalysisCommand.java
[ "public class Project {\n\n\tprivate static final Logger logger = Logger.getLogger(Project.class.getSimpleName());\n\n\tpublic static final String WORKING_DIRECTORY = \"workingDirectory\" + File.separator;\n\tpublic static final String OUTPUT_DIRECTORY = \"output\" + File.separator;\n\tpublic static final String CO...
import es.cnio.bioinfo.bicycle.Sample; import es.cnio.bioinfo.bicycle.gatk.Context; import es.cnio.bioinfo.bicycle.operations.DifferentialMethylationAnalysis; import es.cnio.bioinfo.bicycle.operations.MethylationAnalysis; import java.io.File; import java.util.HashSet; import java.util.LinkedList; import java.util.List;...
/* Copyright 2012 Daniel Gonzalez Peña, Osvaldo Graña This file is part of the bicycle Project. bicycle Project is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opti...
Set<Context> contexts = parseContextParameter(parameters.get(this.findOption("x")));
3
rsgoncalves/ecco
src/main/java/uk/ac/manchester/cs/diff/axiom/LogicalDiff.java
[ "public class LogicalChangeSet implements AxiomChangeSet {\n\tprivate Set<OWLAxiom> effectualAdditions, ineffectualAdditions, effectualRemovals, ineffectualRemovals;\n\tprivate StructuralChangeSet structuralChangeSet;\n\tprivate double diffTime;\n\t\n\t/**\n\t * Constructor\n\t * @param effectualAdditions\tEffectua...
import uk.ac.manchester.cs.diff.output.xml.XMLAxiomDiffReport; import uk.ac.manchester.cs.diff.utils.ReasonerLoader; import java.util.HashSet; import java.util.Set; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLEntity; import org.semanticweb.owlapi.model.OWLOntology; import org.se...
/******************************************************************************* * This file is part of ecco. * * ecco is distributed under the terms of the GNU Lesser General Public License (LGPL), Version 3.0. * * Copyright 2011-2014, The University of Manchester * * ecco is free software: you can redistr...
return new CSVAxiomDiffReport().getReport(logicalChangeSet);
3