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
goribun/naive-rpc
naive-client/src/main/java/com/goribun/naive/client/poxy/RpcProxy.java
[ "public class OkHttpUtil {\n\n private static OkHttpClient CLIENT = new OkHttpClient();\n\n private OkHttpUtil() {\n }\n\n public static OkHttpClient getOkHttpClient() {\n return CLIENT;\n }\n\n}", "public enum SysErCode {\n IO_ERROR(0001, \"IO异常\"),\n OK_HTTP_ERROR(0002, \"okhttp请求错误\...
import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import com.alibaba.fastjson.JSON; import com.goribun.naive.client.http.OkHttpUtil; import com.goribun.naive.core.constants.SysErCode; import com.goribun.naive.core.exception.SysException; import com.goribun.naive.core.protocol.Protocol; import...
package com.goribun.naive.client.poxy; /** * Rpc代理 * * @author wangxuesong */ public class RpcProxy implements InvocationHandler { private String serviceName; private String host; public RpcProxy(String host, String serviceName) { this.host = host; this.serviceName = serviceName; ...
throw new SysException(SysErCode.OK_HTTP_ERROR);
1
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/dicom/ApplicationActivityEvent.java
[ "public abstract class DICOMActiveParticipantRoleIdCodes extends CodedValueType\n{\n\tprotected DICOMActiveParticipantRoleIdCodes(String value, String meaning)\n\t{\n\t\tsetCodeSystemName(\"DCM\");\n\t\tsetCode(value);\n\t\tsetOriginalText(meaning);\n\t}\n\t/**\n\t * \"DCM\",\"110150\", \"Application\"\n\t *\n\t * ...
import org.openhealthtools.ihe.atna.auditor.codes.dicom.DICOMActiveParticipantRoleIdCodes; import org.openhealthtools.ihe.atna.auditor.codes.dicom.DICOMEventIdCodes; import org.openhealthtools.ihe.atna.auditor.codes.dicom.DICOMEventTypeCodes; import org.openhealthtools.ihe.atna.auditor.codes.rfc3881.RFC3881EventCodes; ...
/******************************************************************************* * Copyright (c) 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
public ApplicationActivityEvent(RFC3881EventOutcomeCodes outcome, DICOMEventTypeCodes type)
4
blacklocus/jres
jres-test/src/test/java/com/blacklocus/jres/request/search/facet/JresTermsFacetTest.java
[ "public class BaseJresTest {\n\n @BeforeClass\n public static void startLocalElasticSearch() {\n ElasticSearchTestInstance.triggerStaticInit();\n }\n\n /**\n * Configured to connect to a local ElasticSearch instance created specifically for unit testing\n */\n protected Jres jres = new...
import com.blacklocus.jres.BaseJresTest; import com.blacklocus.jres.model.search.TermsFacet; import com.blacklocus.jres.request.index.JresCreateIndex; import com.blacklocus.jres.request.index.JresIndexDocument; import com.blacklocus.jres.request.index.JresRefresh; import com.blacklocus.jres.request.mapping.JresPutMappi...
/** * Copyright 2015 BlackLocus * * 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 i...
JresSearchReply reply = jres.quest(new JresSearch(index, type, search));
8
ds84182/OpenGX
src/main/java/ds/mods/opengx/Glasses.java
[ "public class ComponentButton extends Component implements ManagedEnvironment {\n\t\n\tpublic static final WeakHashMap<World,HashMap<UUID,ComponentButton>> serverCGX = new WeakHashMap<World,HashMap<UUID,ComponentButton>>();\n\tpublic static final WeakHashMap<World,HashMap<UUID,ComponentButton>> clientCGX = new Weak...
import java.util.ArrayList; import java.util.Iterator; import java.util.Map.Entry; import java.util.UUID; import java.util.WeakHashMap; import li.cil.oc.api.FileSystem; import li.cil.oc.api.Machine; import li.cil.oc.api.Network; import li.cil.oc.api.driver.Container; import li.cil.oc.api.machine.Owner; import li.cil.oc...
package ds.mods.opengx; public class Glasses implements Owner, Container { public static WeakHashMap<World, ArrayList<Glasses>> svmap = new WeakHashMap<World, ArrayList<Glasses>>(); public static WeakHashMap<World, ArrayList<Glasses>> clmap = new WeakHashMap<World, ArrayList<Glasses>>(); public static WeakHash...
public ComponentMonitor monitor;
2
CodeAndMagic/android-deferred-object
core/src/test/java/org/codeandmagic/promise/tests/PipePromisesTests.java
[ "public class DeferredObject<Success> extends AbstractPromise<Success> {\n\n public static <S> DeferredObject<S> successful(S value) {\n final DeferredObject<S> deferredObject = new DeferredObject<S>();\n deferredObject.success(value);\n return deferredObject;\n }\n\n public static <S>...
import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.*; import org.codeandmagic.promise.*; import org.codeandmagic.promise.impl.DeferredObject; import org.codeandmagic.promise.Pipe; import org.codeandmagic.promise.Promise; import org.codeandmagic.promise.Pipe3; import org.codeandmagic.promise.im...
/* * Copyright (c) 2014 Cristian Vrabie, Evelina Vrabie. * * This file is part of android-promise. * android-deferred-object 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...
Promise<Integer> number = exception.recoverWith(new Pipe<Throwable, Integer>() {
1
fiware-cybercaptor/cybercaptor-server
src/main/java/org/fiware/cybercaptor/server/remediation/DeployableRemediation.java
[ "public class AttackPath extends MulvalAttackGraph implements Cloneable {\n\n /**\n * The scoring of the attack path (should be between 0 and 1)\n */\n public double scoring = 0;\n /**\n * The goal of the attacker\n */\n Vertex goal = null;\n\n /**\n * @param leavesToCorrect ...
import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import org.fiware.cybercaptor.server.attackgraph.AttackPath; import org.fiware.cybercaptor.server.attackgraph.serializable.SerializableAttackPath; import org.fiware.cybercaptor.server.informationsystem.InformationSystem; import org....
/**************************************************************************************** * This file is part of FIWARE CyberCAPTOR, * * instance of FIWARE Cyber Security Generic Enabler * * Copyright (C) 2012-2015 Thales Services S.A.S....
private AttackPath correctedPath;
0
DiatomStudio/SketchChair
src/ShapePacking/spShapePack.java
[ "public class GLOBAL {\n\n\tpublic static boolean useMaskedUpdating = false;\n\n\tstatic SketchProperties sketchProperties = new SketchProperties();\n\t\n\tpublic static double CAM_OFFSET_X = 300;\n\tpublic static double CAM_OFFSET_Y = -900;\n\tpublic static int windowWidth;\n\tpublic static int windowHeight;\n\tpu...
import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import nu.xom.Attribute; import nu.xom.Document; import nu.xom.Eleme...
String[] cmd = {"/usr/bin/open", "-a" , "Cutting Master 2 for CraftROBO.app", "/Applications/Cutting Master 2 CraftROBO 1.86/Release/"}; p = rt.exec(cmd); }else{ craftRoboPath = "C:/Program Files/Cutting Master 2 for CraftROBO 1.60/Program/App2.exe"; p = rt.exec(craftRoboPath); } LOGGER.inf...
if( (_zoomDelta > 0 && this.ZOOM < SETTINGS.MIN_ZOOM)){
2
setial/intellij-javadocs
src/main/java/com/github/setial/intellijjavadocs/action/JavaDocGenerateAction.java
[ "public class SetupTemplateException extends RuntimeException {\n\n /**\n * Instantiates a new Setup template exception.\n *\n * @param cause the cause\n */\n public SetupTemplateException(Throwable cause) {\n super(cause);\n }\n}", "public class TemplateNotFoundException extends R...
import com.github.setial.intellijjavadocs.exception.SetupTemplateException; import com.github.setial.intellijjavadocs.exception.TemplateNotFoundException; import com.github.setial.intellijjavadocs.generator.JavaDocGenerator; import com.github.setial.intellijjavadocs.generator.impl.ClassJavaDocGenerator; import com.gith...
package com.github.setial.intellijjavadocs.action; /** * The type Java doc generate action. * * @author Sergey Timofiychuk */ public class JavaDocGenerateAction extends BaseAction { private static final Logger LOGGER = Logger.getInstance(JavaDocGenerateAction.class); private JavaDocWriter writer; ...
Messages.showErrorDialog("Javadocs plugin is not available", JAVADOCS_PLUGIN_TITLE_MSG);
7
calibre2opds/calibre2opds
OpdsOutput/src/main/java/com/gmail/dpierron/calibre/opds/TagListSubCatalog.java
[ "public class Book extends GenericDataObject {\r\n private final static Logger logger = LogManager.getLogger(Book.class);\r\n\r\n private File bookFolder;\r\n private final String id;\r\n private final String uuid;\r\n private String title;\r\n private String titleSort;\r\n private final String path;\r\n ...
import com.gmail.dpierron.calibre.configuration.Icons; import com.gmail.dpierron.calibre.datamodel.Book; import com.gmail.dpierron.calibre.datamodel.GenericDataObject; import com.gmail.dpierron.calibre.datamodel.Tag; import com.gmail.dpierron.tools.i18n.Localization; import com.gmail.dpierron.calibre.trook.TrookSp...
package com.gmail.dpierron.calibre.opds; /** * Class for defining methods that define a tag sub catalog */ public class TagListSubCatalog extends TagsSubCatalog { private final static Logger logger = LogManager.getLogger(TagListSubCatalog.class); public TagListSubCatalog(List<Object> stuffToFilterO...
List<Tag> listTags,
2
utapyngo/owl2vcs
src/main/java/owl2vcs/io/FunctionalChangesetSerializer.java
[ "public abstract class ChangeSet {\r\n\r\n protected ChangeSet() {\r\n }\r\n\r\n private SetOntologyFormatData formatChange;\r\n\r\n private Collection<PrefixChangeData> prefixChanges;\r\n\r\n private SetOntologyIDData ontologyIdChange;\r\n\r\n private Collection<ImportChangeData> importChanges;\r...
import java.io.PrintStream; import java.io.UnsupportedEncodingException; import org.semanticweb.owlapi.change.OWLOntologyChangeData; import org.semanticweb.owlapi.util.ShortFormProvider; import owl2vcs.changeset.ChangeSet; import owl2vcs.render.ChangeFormat; import owl2vcs.render.ChangeRenderer; import owl2vcs.r...
package owl2vcs.io; public class FunctionalChangesetSerializer { public void write(ChangeSet cs, PrintStream out) {
write(cs, out, new FullFormProvider(), ChangeFormat.COMPACT);
1
KodeMunkie/imagetozxspec
src/main/java/uk/co/silentsoftware/core/converters/spectrum/TapeConverter.java
[ "public static byte[] copyBytes(byte[] from, byte[] to, int fromIndex) {\n\tSystem.arraycopy(from, 0, to, fromIndex, from.length);\n\treturn to;\n}", "public static byte getChecksum(byte[] bytes) {\n\tint checksum = 0;\n\tfor (byte b: bytes) {\n\t\tchecksum^=b;\n\t}\n\treturn (byte)checksum;\n}\t", "public sta...
import uk.co.silentsoftware.config.OptionsObject; import uk.co.silentsoftware.core.helpers.ByteHelper; import static uk.co.silentsoftware.core.helpers.ByteHelper.copyBytes; import static uk.co.silentsoftware.core.helpers.ByteHelper.getChecksum; import static uk.co.silentsoftware.core.helpers.ByteHelper.put; import java...
/* Image to ZX Spec * Copyright (C) 2019 Silent Software (Benjamin Brown) * * 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) an...
OptionsObject oo = OptionsObject.getInstance();
3
ryft/NetVis
workspace/netvis/src/netvis/visualisations/DataflowVisualisation.java
[ "public class DataController implements ActionListener {\n\tDataFeeder dataFeeder;\n\tTimer timer;\n\tfinal List<DataControllerListener> listeners;\n\tfinal List<PacketFilter> filters;\n\tfinal List<Packet> allPackets;\n\tfinal List<Packet> filteredPackets;\n\tprivate int noUpdated = 0;\n\tprotected int intervalsCo...
import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.util.Hashtable; import java.util.List; import javax.media.opengl.GL2; import javax.media.opengl.GL...
GLUT.BITMAP_HELVETICA_12, normPasses.get(visHighlighted).denormalise((double)i/10) ); } } } @Override public void dispose(GLAutoDrawable arg0) { } @Override public void init(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); // Global settings. gl.glEnable(GL2....
UndoController.INSTANCE.addUndoMove(new UndoAction(){
3
gaffo/scumd
src/test/java/com/asolutions/scmsshd/commands/git/SCMCommandTest.java
[ "public class ServerSession extends AbstractSession {\n\n private Timer timer;\n private TimerTask authTimerTask;\n private State state = State.ReceiveKexInit;\n private String username;\n private int maxAuthRequests = 20;\n private int nbAuthRequests;\n private int authTimeout = 10 * 60 * 1000...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import java.io.InputStream; import java.io.OutputStream; import java.util.Properties; import org.apache.sshd.server.CommandFactory.ExitCallback; import org.apache.sshd.server.session.ServerSession; import org.jmock.Expectatio...
package com.asolutions.scmsshd.commands.git; public class SCMCommandTest extends MockTestCase { private static final String USERNAME = "username"; private static final String PROJECT = "proj-2"; private FilteredCommand filteredCommand; private IProjectAuthorizer mockProjectAuthorizer; private ...
private IPathToProjectNameConverter mockPathToProjectConverter;
5
JoostvDoorn/GlutenVrijApp
app/src/main/java/com/joostvdoorn/glutenvrij/scanner/core/oned/Code128Reader.java
[ "public final class BarcodeFormat {\n\n // No, we can't use an enum here. J2ME doesn't support it.\n\n private static final Hashtable VALUES = new Hashtable();\n\n /** Aztec 2D barcode format. */\n public static final BarcodeFormat AZTEC = new BarcodeFormat(\"AZTEC\");\n\n /** CODABAR 1D format. */\n public s...
import com.joostvdoorn.glutenvrij.scanner.core.BarcodeFormat; import com.joostvdoorn.glutenvrij.scanner.core.ChecksumException; import com.joostvdoorn.glutenvrij.scanner.core.FormatException; import com.joostvdoorn.glutenvrij.scanner.core.NotFoundException; import com.joostvdoorn.glutenvrij.scanner.core.Result; import ...
{2, 2, 1, 2, 1, 3}, {2, 2, 1, 3, 1, 2}, // 10 {2, 3, 1, 2, 1, 2}, {1, 1, 2, 2, 3, 2}, {1, 2, 2, 1, 3, 2}, {1, 2, 2, 2, 3, 1}, {1, 1, 3, 2, 2, 2}, // 15 {1, 2, 3, 1, 2, 2}, {1, 2, 3, 2, 2, 1}, {2, 2, 3, 2, 1, 1}, {2, 2, 1, 1, 3, 2}, {2, 2, 1, 2, 3, ...
private static int[] findStartPattern(BitArray row) throws NotFoundException {
6
JEEventStore/JEEventStore
core/src/test/java/org/jeeventstore/notifier/AsyncEventStoreCommitNotifierTest.java
[ "public interface EventStoreCommitNotification {\n\n /**\n * Returns the change set that has been committed to the event store.\n * \n * @return the committed {@link ChangeSet}\n */\n ChangeSet changes();\n \n}", "public interface EventStoreCommitNotifier {\n\n /**\n * Notifies al...
import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jeeventstore.ChangeSet; import org.jeeventstore.store.TestChangeSet; import org.jeeventstore.tests.DefaultDeployment; import static org.testng.Assert.*; i...
/* * Copyright (c) 2013-2014 Red Rainbow IT Solutions GmbH, Germany * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * u...
.addPackage(ChangeSet.class.getPackage())
2
UweTrottmann/thetvdb-java
src/main/java/com/uwetrottmann/thetvdb/TheTvdb.java
[ "public interface TheTvdbAuthentication {\n\n String PATH_LOGIN = \"login\";\n\n /**\n * Returns a session token to be included in the rest of the requests. Note that API key authentication is required\n * for all subsequent requests and user auth is required for routes in the User section.\n */\n...
import com.uwetrottmann.thetvdb.services.TheTvdbAuthentication; import com.uwetrottmann.thetvdb.services.TheTvdbEpisodes; import com.uwetrottmann.thetvdb.services.TheTvdbLanguages; import com.uwetrottmann.thetvdb.services.TheTvdbSearch; import com.uwetrottmann.thetvdb.services.TheTvdbSeries; import com.uwetrottmann.the...
package com.uwetrottmann.thetvdb; @SuppressWarnings("WeakerAccess") public class TheTvdb { public static final String API_HOST = "api.thetvdb.com"; public static final String API_URL = "https://" + API_HOST + "/"; public static final String HEADER_ACCEPT_LANGUAGE = "Accept-Language"; public static...
public TheTvdbUser user() {
6
almondtools/rexlex
src/main/java/com/almondtools/rexlex/automaton/ThompsonAutomatonBuilder.java
[ "public interface TokenType {\n\n\tboolean error();\n\tboolean accept();\n\n}", "static class EpsilonTransition extends BasicTransition implements EventlessTransition {\n\n\tpublic EpsilonTransition(State target) {\n\t\tsuper(target);\n\t}\n\n\t@Override\n\tpublic String toString() {\n\t\treturn new StringBuilder...
import static com.almondtools.rexlex.pattern.DefaultTokenType.ACCEPT; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.ListIterator; import com.almondtools.rexlex.TokenType; import com.almondtools.rexlex.automaton.GenericAutomaton.EpsilonTransition; import com.almondtools.rex...
package com.almondtools.rexlex.automaton; public class ThompsonAutomatonBuilder implements RegexNodeVisitor<ThompsonAutomaton>, AutomatonBuilder { public ThompsonAutomatonBuilder() { } public static ThompsonAutomaton match(char value) { GenericAutomaton automaton = new GenericAutomaton();
State s = new State();
4
jaredrummler/TrueTypeParser
lib-truetypeparser/src/main/java/com/jaredrummler/fontreader/complexscripts/scripts/ScriptProcessor.java
[ "public class GlyphSubstitutionTable extends GlyphTable {\n\n /** single substitution subtable type */\n public static final int GSUB_LOOKUP_TYPE_SINGLE = 1;\n /** multiple substitution subtable type */\n public static final int GSUB_LOOKUP_TYPE_MULTIPLE = 2;\n /** alternate substitution subtable type */\n pu...
import com.jaredrummler.fontreader.fonts.GlyphSubstitutionTable; import com.jaredrummler.fontreader.truetype.GlyphTable; import com.jaredrummler.fontreader.complexscripts.fonts.GlyphDefinitionTable; import com.jaredrummler.fontreader.complexscripts.fonts.GlyphPositioningTable; import com.jaredrummler.fontreader.complex...
/* * Copyright (C) 2016 Jared Rummler <jared.rummler@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require...
public final boolean position(GlyphPositioningTable gpos, GlyphSequence gs, String script, String language,
3
SOM-Research/EMFtoCSP
plugins/fr.inria.atlanmod.emftocsp.emf/src/fr/inria/atlanmod/emftocsp/emf/impl/UmlModelBuilder.java
[ "public interface IModelReader<R, P, C, AS, AT, OP> {\n\n\tpublic R getModelResource(); \n\n\tpublic List<P> getPackages();\n\n\tpublic List<C> getClasses();\n\n\tpublic List<String> getClassesNames();\n\n\tpublic List<AT> getClassAttributes(C c);\n\n\tpublic List<OP> getClassOperations(C c); \n\n\tpublic List<C> ...
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.eclipse.core.runtime.Assert; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import o...
/******************************************************************************* * Copyright (c) 2013 INRIA Rennes Bretagne-Atlantique. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, an...
public UmlModelBuilder(IModelReader<Resource, EPackage, EClass, EAssociation, EAttribute, EOperation> modelReader, CompoundTerm ct){
0
mpalourdio/SpringBootTemplate
src/test/java/com/mpalourdio/springboottemplate/controllers/MiscControllerTest.java
[ "@ExtendWith(SpringExtension.class)\n@TestPropertySource(locations = \"classpath:test.properties\")\n@Import({BeansFactory.class})\npublic abstract class AbstractTestRunner {\n\n protected Task task;\n protected People people;\n\n protected void initializeData() {\n task = new Task();\n task....
import com.mpalourdio.springboottemplate.AbstractTestRunner; import com.mpalourdio.springboottemplate.json.Account; import com.mpalourdio.springboottemplate.json.AccountDecorator; import com.mpalourdio.springboottemplate.json.Context; import com.mpalourdio.springboottemplate.mediatype.MediaType; import com.mpalourdio.s...
/* * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,...
class MiscControllerTest extends AbstractTestRunner {
0
DigiArea/es5-model
com.digiarea.es5/src/com/digiarea/es5/FunctionDeclaration.java
[ "public abstract class Statement extends Node {\r\n\r\n Statement() {\r\n super();\r\n }\r\n\r\n Statement(JSDocComment jsDocComment, int posBegin, int posEnd) {\r\n super(jsDocComment, posBegin, posEnd);\r\n }\r\n\r\n}\r", "public class Parameter extends Expression {\r\n\r\n /** \r\n...
import com.digiarea.es5.Statement; import com.digiarea.es5.Parameter; import com.digiarea.es5.NodeList; import com.digiarea.es5.Block; import com.digiarea.es5.JSDocComment; import com.digiarea.es5.visitor.VoidVisitor; import com.digiarea.es5.visitor.GenericVisitor;
package com.digiarea.es5; /** * The Class FunctionDeclaration. */ public class FunctionDeclaration extends Statement { /** * The name. */ private String name; /** * The parameters. */ private NodeList<Parameter> parameters; /** * The body. ...
public <C> void accept(VoidVisitor<C> v, C ctx) throws Exception {
5
jjhesk/LoyalNativeSlider
library/src/main/java/com/hkm/slider/SliderLayout.java
[ "public interface BaseAnimationInterface {\n\n /**\n * When the current item prepare to start leaving the screen.\n *\n * @param current view\n */\n void onPrepareCurrentItemLeaveScreen(View current);\n\n /**\n * The next item which will be shown in ViewPager/\n *\n * @param nex...
import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.database.DataSetObserver; import android.graphics.drawable.Drawable; import android.os.Handler; import android.os.Message; import android.support.annotation.IntDef; im...
} }; private Handler postHandler = new Handler(); private ImageView mButtonLeft, mButtonRight; private int mLWidthB, mRWidthB; private boolean mLopen, mRopen, button_side_function_flip = false; private ArrowControl arrow_instance; private void navigation_button_initialization() { ...
public <TN extends NumContainer> void setNumLayout(final TN container) {
1
stridercheng/chatui
app/src/main/java/com/rance/chatui/adapter/ChatAdapter.java
[ "public class BaseViewHolder<M> extends RecyclerView.ViewHolder {\n\n public BaseViewHolder(View itemView) {\n super(itemView);\n }\n\n public void setData(M data) {\n\n }\n}", "public class ChatAcceptViewHolder extends BaseViewHolder<MessageInfo> {\n private static final String TAG = \"Chat...
import android.os.Handler; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import com.rance.chatui.adapter.holder.BaseViewHolder; import com.rance.chatui.adapter.holder.ChatAcceptViewHolder; import com.rance.chatui.adapter.holder.C...
package com.rance.chatui.adapter; /** * 作者:Rance on 2016/11/29 10:46 * 邮箱:rance935@163.com */ public class ChatAdapter extends RecyclerView.Adapter<BaseViewHolder> { private onItemClickListener onItemClickListener; public Handler handler; private List<MessageInfo> messageInfoList; public ChatAd...
viewHolder = new ChatSendViewHolder(parent, onItemClickListener, handler);
2
rubenlagus/Tsupport
TMessagesProj/src/main/java/org/telegram/ui/ChangeChatNameActivity.java
[ "public class AndroidUtilities {\n\n private static final Hashtable<String, Typeface> typefaceCache = new Hashtable<>();\n private static int prevOrientation = -10;\n private static boolean waitingForSms = false;\n private static final Object smsLock = new Object();\n\n public static int statusBarHei...
import android.app.Activity; import android.content.SharedPreferences; import android.os.Bundle; import android.text.InputType; import android.util.TypedValue; import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import...
/* * This is the source code of Telegram for Android v. 1.3.2. * It is licensed under GNU GPL v. 2 or later. * You should have received a copy of the license in this archive (see LICENSE). * * Copyright Nikolai Kudashov, 2013. */ package org.telegram.ui; public class ChangeChatNameActivity extends BaseFragmen...
TLRPC.Chat currentChat = MessagesController.getInstance().getChat(chat_id);
3
KKorvin/uPods-android
app/src/main/java/com/chickenkiller/upods2/models/Episode.java
[ "public class ProfileManager {\n\n public static final String JS_SUBSCRIBED_PODCASTS = \"subscribedPodcasts\";\n public static final String JS_SUBSCRIBED_STATIONS = \"subscribedStations\";\n public static final String JS_RECENT_STATIONS = \"recentStations\";\n\n public static ProfileManager profileManag...
import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.text.format.Formatter; import com.chickenkiller.upods2.controllers.app.ProfileManager; import com.chickenkiller.upods2.controllers.app.UpodsApplication; import com.chickenkiller.upods2.uti...
package com.chickenkiller.upods2.models; /** * Created by Alon Zilberman on 8/31/15. */ public class Episode extends Track { private static final String TABLE = "episodes"; private static String EPISODE_LOG = "EPISODE"; private String summary; private String length; private String duration; ...
Logger.printError(EPISODE_LOG, "Can't parse episod from json");
3
iloveeclipse/anyedittools
AnyEditTools/src/de/loskutov/anyedit/actions/compare/CompareWithAction.java
[ "public class AnyEditToolsPlugin extends AbstractUIPlugin {\n\n private static AnyEditToolsPlugin plugin;\n\n private static boolean isSaveHookInitialized;\n\n /**\n * The constructor.\n */\n public AnyEditToolsPlugin() {\n super();\n if(plugin != null) {\n throw new Ill...
import org.eclipse.compare.CompareUI; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.runtime.CoreException; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; im...
/******************************************************************************* * Copyright (c) 2009 Andrey Loskutov. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at...
return new FileStreamContent(content);
4
recoilme/freemp
app/src/main/java/org/freemp/droid/player/ActPlayer.java
[ "public class ClsTrack implements Serializable {\n\n private static final long serialVersionUID = 1L;\n private String artist;\n private String title;\n private String album;\n private String composer;\n private int year;\n private int track;\n private int duration;\n private String path;...
import android.Manifest; import android.app.Activity; import android.app.AlertDialog; import android.content.ComponentName; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.ServiceConnection; import android.content.pm.PackageManager; import an...
package org.freemp.droid.player; /** * Created with IntelliJ IDEA. * User: recoilme * Date: 28/11/13 * Time: 15:10 * To change this template use File | Settings | File Templates. */ public class ActPlayer extends AppCompatActivity implements InterfacePlayer, ActivityCompat.OnRequestPermissionsResultCallback...
private ArrayList<ClsTrack> items;
0
jenkinsci/plugin-compat-tester
plugins-compat-tester/src/test/java/org/jenkins/tools/test/PluginCompatTesterTest.java
[ "public class PCTPlugin {\n private String name;\n private final String groupId;\n private VersionNumber version;\n\n public PCTPlugin(String name, String groupId, VersionNumber version) {\n this.name = name;\n this.groupId = groupId;\n this.version = version;\n }\n\n public S...
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse; import java.io.File; import org.jenkins.tools.test...
/* * The MIT License * * Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, * Erik Ramfelt, Koichi Fujikawa, Red Hat, Inc., Seiji Sogabe, * Stephen Connolly, Tom Huybrechts, Yahoo! Inc., Alan Harder, CloudBees, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy...
PluginCompatReport report = tester.testPlugins();
3
ErnestOrt/Trampoline
trampoline/src/main/java/org/ernest/applications/trampoline/controller/InstancesController.java
[ "@Component\npublic class InstanceInfoCollector {\n\n private static final Logger log = LoggerFactory.getLogger(InstanceInfoCollector.class);\n\n @Autowired\n EcosystemManager ecosystemManager;\n\n public InstanceGitInfo getInfo(String idInstance) {\n InstanceGitInfo info = new InstanceGitInfo();...
import org.ernest.applications.trampoline.collectors.InstanceInfoCollector; import org.ernest.applications.trampoline.entities.*; import org.ernest.applications.trampoline.exceptions.*; import org.ernest.applications.trampoline.services.EcosystemManager; import org.ernest.applications.trampoline.collectors.MetricsColle...
package org.ernest.applications.trampoline.controller; @Controller @RequestMapping("/instances") public class InstancesController { private static final String INSTANCES_VIEW = "instances"; @Autowired EcosystemManager ecosystemManager; @Autowired MetricsCollector metricsCollector; @Autowired TraceCollecto...
return declaredInstanceOnPort == false ? PortsChecker.available(port) : false;
4
mike10004/xvfb-manager-java
xvfb-manager/src/test/java/com/github/mike10004/xvfbmanager/XvfbManagerTest.java
[ "public class ProcessTrackerRule extends ExternalResource {\n\n private static final Duration DEFAULT_DESTROY_TIMEOUT = Duration.ofMillis(1000);\n\n private final TestWatcher watcher;\n private final AtomicBoolean passage;\n private BasicProcessTracker processTracker;\n private final Duration process...
import com.galenframework.rainbow4j.Rainbow4J; import com.galenframework.rainbow4j.Spectrum; import com.galenframework.rainbow4j.colorscheme.ColorDistribution; import com.github.mike10004.common.image.ImageInfo; import com.github.mike10004.common.image.ImageInfos; import com.github.mike10004.xvfbunittesthelp.ProcessTra...
package com.github.mike10004.xvfbmanager; public class XvfbManagerTest { private static final int _PRESUMABLY_VACANT_DISPLAY_NUM = 88; @Rule public ProcessTrackerRule processTrackerRule = new ProcessTrackerRule(); @Rule public XDiagnosticRule diagnostic = Tests.isDiagnosticEnabled() ? new XDi...
Assumptions.assumeTrue(program + " must be installed for these tests to be executed", installed);
2
ppasupat/web-entity-extractor-ACL2014
src/edu/stanford/nlp/semparse/open/model/feature/FeatureTypeHoleBased.java
[ "public class BrownClusterTable {\n public static class Options {\n @Option public String brownClusterFilename = null;\n }\n public static Options opts = new Options();\n\n public static Map<String, String> wordClusterMap;\n public static Map<String, Integer> wordFrequencyMap;\n \n public static void init...
import java.util.*; import edu.stanford.nlp.semparse.open.ling.BrownClusterTable; import edu.stanford.nlp.semparse.open.ling.LingData; import edu.stanford.nlp.semparse.open.ling.LingUtils; import edu.stanford.nlp.semparse.open.model.candidate.Candidate; import edu.stanford.nlp.semparse.open.model.candidate.CandidateGro...
package edu.stanford.nlp.semparse.open.model.feature; /** * Fire features based on the existence of holes in the selected nodes (or ancestors). * * This won't work for wildcard PathEntry. */ public class FeatureTypeHoleBased extends FeatureType { public static class Options { @Option public boolean holeUse...
List<KNode> currentKNodes = group.selectedNodes;
5
Azure/azure-storage-android
microsoft-azure-storage-test/src/com/microsoft/azure/storage/StorageUriTests.java
[ "public interface CloudTests {\n}", "public interface DevFabricTests {\n}", "public interface DevStoreTests {\n}", "public final class CloudBlobContainer {\n\n /**\n * Converts the ACL string to a BlobContainerPermissions object.\n * \n * @param aclString\n * A <code>String</code...
import com.microsoft.azure.storage.TestRunners.CloudTests; import com.microsoft.azure.storage.TestRunners.DevFabricTests; import com.microsoft.azure.storage.TestRunners.DevStoreTests; import com.microsoft.azure.storage.blob.CloudBlobClient; import com.microsoft.azure.storage.blob.CloudBlobContainer; import com.microsof...
/** * Copyright Microsoft Corporation * * 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 i...
CloudBlobContainer container = client.getContainerReference("container");
3
JavaMoney/javamoney-shelter
retired/format/src/main/java/org/javamoney/format/internal/DefaultTokenizeableFormatsSingletonSpi.java
[ "public interface ItemFormat<T> {\n\n\t/**\n\t * Return the target type this {@link ItemFormat} is expecting and capable\n\t * to format.\n\t * \n\t * @return the target type, never {@code null}.\n\t */\n\tpublic Class<T> getTargetClass();\n\n\t/**\n\t * Access the {@link LocalizationContext} configuring this {@lin...
import org.javamoney.format.ItemFormat; import org.javamoney.format.ItemFormatException; import org.javamoney.format.LocalizationContext; import org.javamoney.format.spi.ItemFormatFactorySpi; import org.javamoney.format.spi.TokenizeableFormatsSingletonSpi; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import...
/* * Copyright (c) 2012, 2013, Credit Suisse (Anatole Tresch), Werner Keil. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unle...
private Map<Class,Set<ItemFormatFactorySpi>> formatMap = new ConcurrentHashMap<Class,Set<ItemFormatFactorySpi>>();
3
agorava/agorava-twitter
agorava-twitter-cdi/src/main/java/org/agorava/twitter/impl/TwitterGeoServiceImpl.java
[ "public abstract class TwitterBaseService extends ProviderApiService {\n\n protected static final char MULTI_VALUE_SEPARATOR = ',';\n\n public static final String API_ROOT = \"https://api.twitter.com/1.1/\";\n\n public Map<String, String> buildPagingParametersWithCount(int page, int pageSize, long sinceId,...
import java.util.HashMap; import java.util.List; import java.util.Map; import org.agorava.TwitterBaseService; import org.agorava.twitter.Twitter; import org.agorava.twitter.TwitterGeoService; import org.agorava.twitter.jackson.PlacesList; import org.agorava.twitter.model.Place; import org.agorava.twitter.model.PlacePro...
/* * Copyright 2013 Agorava * * 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 wri...
PlacePrototype placePrototype = new PlacePrototype(response.getToken(), latitude, longitude, name, streetAddress,
4
SecUSo/privacy-friendly-memo-game
app/src/main/java/org/secuso/privacyfriendlymemory/ui/navigation/StatisticsActivity.java
[ "public final class Constants {\n\n private Constants(){} // this class should not be initialized\n\n // Preferences Constants\n public final static String FIRST_APP_START = \"FIRST_APP_START\";\n public final static String SELECTED_CARD_DESIGN = \"SELECTED_CARD_DESIGN\";\n public final ...
import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.design.widget.TabLayout; import android.supp...
package org.secuso.privacyfriendlymemory.ui.navigation; public class StatisticsActivity extends AppCompatActivity { private static StatisticsActivity statisticsActivity; private SectionsPagerAdapter mSectionsPagerAdapter; private ViewPager mViewPager; private SharedPreferences preferences = null; ...
List<String> resourceNamesDeckOne = ResIdAdapter.getResourceName(resIdsDeckOne, this);
2
ApplETS/applets-java-api
src/test/java/applets/etsmtl/ca/news/EventsResourcesTest.java
[ "@Path(\"events\")\npublic class EventsResources {\n\n private final EventDAO eventDAO;\n private final SourceDAO sourceDAO;\n\n @Inject\n public EventsResources(EventDAO eventDAO, SourceDAO sourceDAO) {\n this.eventDAO = eventDAO;\n this.sourceDAO = sourceDAO;\n }\n\n @GET\n @Pat...
import applets.etsmtl.ca.news.EventsResources; import applets.etsmtl.ca.news.db.EventDAO; import applets.etsmtl.ca.news.db.SourceDAO; import applets.etsmtl.ca.news.model.Event; import applets.etsmtl.ca.news.model.Source; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.test.JerseyTest; imp...
package news; public class EventsResourcesTest extends JerseyTest { @Mock private EventDAO eventDAO; @Mock private SourceDAO sourceDAO; @Override protected Application configure() { MockitoAnnotations.initMocks(this);
EventsResources resource = new EventsResources(eventDAO, sourceDAO);
0
wwfdoink/jolokia-web
src/main/java/prj/jolokiaweb/controller/ApiController.java
[ "public class JolokiaApp {\n private static final int DEFAULT_PORT = 8080;\n private static final String DEFAULT_CONTEXT_PATH = \"\";\n private static Tomcat tomcat;\n private static String baseUrl;\n private static String contextPath;\n\n /**\n * @param tomcatPort Web server listening port\n ...
import org.jolokia.client.exception.J4pException; import org.jolokia.client.request.*; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestBody; import org.sp...
package prj.jolokiaweb.controller; @RestController public class ApiController { @RequestMapping(value = "/api/checkPermissions", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<JSONObject> checkPermissions() { JSONObject result = new JSONObject(); ...
public ResponseEntity<JSONObject> execute(@RequestBody ExecForm execForm) {
1
Erudika/scoold
src/main/java/com/erudika/scoold/controllers/ReportsController.java
[ "@Component\n@Named\npublic class ScooldConfig extends Config {\n\n\tprivate static final Logger logger = LoggerFactory.getLogger(ScooldConfig.class);\n\n\t@Override\n\tpublic com.typesafe.config.Config getFallbackConfig() {\n\t\treturn Para.getConfig().getConfig(); // fall back to para.* config\n\t}\n\n\t@Override...
import com.erudika.para.client.ParaClient; import com.erudika.para.core.utils.Config; import com.erudika.para.core.utils.Pager; import com.erudika.para.core.utils.ParaObjectUtils; import com.erudika.para.core.utils.Utils; import com.erudika.scoold.ScooldConfig; import static com.erudika.scoold.ScooldServer.REPORTSLINK;...
/* * Copyright 2013-2022 Erudika. https://erudika.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
return "redirect:" + SIGNINLINK + "?returnto=" + REPORTSLINK;
2
novucs/factions-top
core/src/main/java/net/novucs/ftop/listener/WorthListener.java
[ "public final class FactionsTopPlugin extends JavaPlugin {\n\n private final ChunkWorthTask chunkWorthTask = new ChunkWorthTask(this);\n private final GuiManager guiManager = new GuiManager(this);\n private final PersistenceTask persistenceTask = new PersistenceTask(this);\n private final RecalculateTas...
import com.google.common.collect.ImmutableMap; import net.novucs.ftop.FactionsTopPlugin; import net.novucs.ftop.PluginService; import net.novucs.ftop.RecalculateReason; import net.novucs.ftop.WorthType; import net.novucs.ftop.entity.BlockPos; import net.novucs.ftop.entity.ChestWorth; import net.novucs.ftop.hook.event.*...
package net.novucs.ftop.listener; public class WorthListener extends BukkitRunnable implements Listener, PluginService { private final FactionsTopPlugin plugin; private final Map<BlockPos, ChestWorth> chests = new HashMap<>(); private final Set<String> recentDisbands = new HashSet<>(); public Worth...
updateWorth(event.getBlock(), RecalculateReason.PLACE, false);
2
Gocnak/Botnak
src/main/java/face/Icons.java
[ "public class ChatPane implements DocumentListener {\n\n private JFrame poppedOutPane = null;\n\n // The timestamp of when we decided to wait to scroll back down\n private long scrollbarTimestamp = -1;\n\n public void setPoppedOutPane(JFrame pane) {\n poppedOutPane = pane;\n }\n\n public JF...
import gui.ChatPane; import gui.forms.GUIMain; import lib.scalr.Scalr; import util.AnimatedGifEncoder; import util.GifDecoder; import util.Utils; import util.settings.Settings; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileOutputStream; ...
package face; /** * A class which specifies special chat icons, or 'badges'. * This allows for easier creation of custom icons, and * should be easily adaptable to create custom donation * levels. * * @author Joseph Blackman * @version 4/10/2015 */ public class Icons { /** * For a specified icon, ...
icon = sizeIcon(ChatPane.class.getResource("/image/prime.png"));
0
rla/while
src/com/infdot/analysis/cfg/node/AssignmentNode.java
[ "public abstract class AbstractNodeVisitor<V> {\n\t\n\tprivate Map<AbstractNode, DataflowExpression<V>> visited =\n\t\tnew HashMap<AbstractNode, DataflowExpression<V>>();\n\t\n\tprivate int currentVarId = 0;\n\tprivate Map<AbstractNode, Integer> variables =\n\t\tnew HashMap<AbstractNode, Integer>();\n\t\n\tpublic a...
import java.util.HashSet; import java.util.Set; import com.infdot.analysis.cfg.node.visitor.AbstractNodeVisitor; import com.infdot.analysis.examples.VariableNameTransform; import com.infdot.analysis.language.expression.Expression; import com.infdot.analysis.language.expression.Identifier; import com.infdot.analysis.lan...
package com.infdot.analysis.cfg.node; /** * CFG node for assignments. * * @author Raivo Laanemets */ public class AssignmentNode extends AbstractNode { private Assignment assignment; public AssignmentNode(Assignment assignment) { this.assignment = assignment; }
public Identifier getIdentifier() {
3
zer0Black/zer0MQTTServer
zer0MQTTServer/src/com/syxy/protocol/mqttImp/MQTTProcess.java
[ "public class ConnectMessage extends Message {\n\t\n\tpublic ConnectMessage(FixedHeader fixedHeader, ConnectVariableHeader variableHeader,\n\t\t\tConnectPayload payload) {\n\t\tsuper(fixedHeader, variableHeader, payload);\n\t}\n\t\n\t@Override\n\tpublic ConnectVariableHeader getVariableHeader() {\n\t\treturn (Conne...
import io.netty.channel.ChannelHandlerAdapter; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.timeout.IdleState; import io.netty.handler.timeout.IdleStateEvent; import io.netty.handler.timeout.IdleStateHandler; import com.syxy.protocol.mqttImp.message.ConnectMessage; import com.syxy.protocol.mqt...
package com.syxy.protocol.mqttImp; /** * MQTT协议业务处理 * * @author zer0 * @version 1.0 * @date 2015-2-16 */ public class MQTTProcess extends ChannelHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
ProtocolProcess process = ProtocolProcess.getInstance();
6
MHAVLOVICK/Sketchy
src/main/java/com/sketchy/image/ImageProcessingThread.java
[ "public class DrawingSize {\n\n\tprivate static final NumberFormat nf = NumberFormat.getInstance();\n\tstatic{\n\t\tnf.setGroupingUsed(false);\n\t\tnf.setMaximumFractionDigits(5);\n\t\tnf.setMaximumFractionDigits(0);\n\t\tnf.setMinimumIntegerDigits(1);\n\t\tnf.setMaximumIntegerDigits(5);\n\t}\n\t\n\tprivate double ...
import java.awt.Graphics2D; import java.awt.Image; import java.awt.RenderingHints; import java.awt.Toolkit; import java.awt.image.AreaAveragingScaleFilter; import java.awt.image.BufferedImage; import java.awt.image.FilteredImageSource; import java.awt.image.ImageProducer; import java.io.File; import javax.imageio.Image...
plugin.setAttribute("brightness", brightnessValue); plugin.setAttribute("contrast", contrastValue); plugin.process(image,image,null,MarvinImageMask.NULL_MASK, false); image.update(); bufferedImage = image.getBufferedImage(); } if (cancel){ throw new CancelledException(); } ...
SketchyImage sketchyImage = new SketchyImage(bufferedImage, dotsPerMM, dotsPerMM);
7
PathwayAndDataAnalysis/causalpath
src/main/java/org/panda/causalpath/run/TCGARecurrentCorrelationRun.java
[ "public class CausalitySearcher implements Cloneable\n{\n\t/**\n\t * If that is false, then we are interested in conflicting relations.\n\t */\n\tprivate int causal;\n\n\t/**\n\t * If this is false, then we don't care if the target site of a relation and the site on the data matches.\n\t */\n\tprivate boolean force...
import org.panda.causalpath.analyzer.CausalitySearcher; import org.panda.causalpath.analyzer.CorrelationDetector; import org.panda.causalpath.network.GraphWriter; import org.panda.causalpath.network.Relation; import org.panda.causalpath.resource.NetworkLoader; import org.panda.causalpath.resource.TCGALoader; import org...
package org.panda.causalpath.run; /** * For finding recurrent causative correlations in TCGA RPPA data. */ public class TCGARecurrentCorrelationRun { public static void main(String[] args) throws IOException { Kronometre k = new Kronometre(); String base = "/home/babur/Documents/RPPA/TCGA/basic-correlation-r...
TCGALoader loader = new TCGALoader(dir.getPath());
4
semanticvectors/semanticvectors
src/main/java/pitt/search/semanticvectors/ESP.java
[ "public class SigmoidTable {\n\n\t private int maxExponent = 6; //maximum permitted exponent\n\t private int tableSize\t\t = 1000;\n\t private double[] sigmoidTable;\n\t \n\t /**\n\t * \n\t */\n\t \n\t public SigmoidTable(int maxExponent, int tableSize)\n\t\t {\n\t\t \tthis.maxExponent \t= maxExponent;\n\...
import org.apache.lucene.document.Document; import org.apache.lucene.index.PostingsEnum; import org.apache.lucene.index.Term; import org.apache.lucene.index.Terms; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.store.FSDirectory; import org.apache.lucene.store.IOContext; import org.apache.lucene.sto...
int qb = randomStartpoints.poll(); //the index number of the first predication-document to be drawn int qe = qb + (100000); //the index number of the last predication-document to be drawn int qplus = 0; //the number of predication-documents added to the queue for (int qc=qb; qc < qe && qc < lucene...
((BinaryVector) ov.getVector()).tallyVotes();
1
DigiArea/es5-model
com.digiarea.es5/src/com/digiarea/es5/Project.java
[ "public abstract class Node {\r\n\r\n\t/**\r\n\t * The JSDoc comment.\r\n\t */\r\n\tprotected JSDocComment jsDocComment = null;\r\n\r\n\t/**\r\n\t * The position begin.\r\n\t */\r\n\tprotected int posBegin = 0;\r\n\r\n\t/**\r\n\t * The position end.\r\n\t */\r\n\tprotected int posEnd = 0;\r\n\r\n\tpublic JSDocComme...
import com.digiarea.es5.Node; import com.digiarea.es5.CompilationUnit; import com.digiarea.es5.NodeList; import com.digiarea.es5.JSDocComment; import com.digiarea.es5.visitor.VoidVisitor; import com.digiarea.es5.visitor.GenericVisitor;
package com.digiarea.es5; /** * The Class Project. */ public class Project extends Node { /** * The compilation units. */ private NodeList<CompilationUnit> compilationUnits = null; public NodeList<CompilationUnit> getCompilationUnits() { return compilationUnits; ...
public <C> void accept(VoidVisitor<C> v, C ctx) throws Exception {
4
gonmarques/cdi-properties
cdi-properties-test/cdi-properties-test-common/src/main/java/com/byteslounge/cdi/test/it/common/AbstractWarProvidedLocaleMethodThreadLocal.java
[ "public class LocaleThreadLocal {\n\n public static final ThreadLocal<LocaleThreadLocal> localeThreadLocal = new ThreadLocal<>();\n private final Locale locale;\n\n public LocaleThreadLocal(Locale locale) {\n this.locale = locale;\n }\n\n public Locale getLocale() {\n return locale;\n ...
import java.io.IOException; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.spec.WebArchive; import com.byteslounge.cdi.test.common.LocaleThreadLocal; import com.byteslounge.cdi.test.common.servlet.TestServlet; import com.byteslounge.cdi.test.it.common.IntegrationTestDeploymentUtils.Deployme...
/* * Copyright 2015 byteslounge.com (Gonçalo Marques). * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
TestServlet.class, LocaleThreadLocal.class);
1
alexandre-normand/blood-shepherd
dexcom-receiver/src/test/java/org/glukit/dexcom/sync/TestDexcomAdapterService.java
[ "public class DexcomG4Constants {\n\n public static final int DATA_BITS = 8;\n public static final int STOP_BITS = 1;\n public static final int NO_PARITY = 0;\n public static final int FIRMWARE_BAUD_RATE = 0x9600;\n public static final Instant DEXCOM_EPOCH = Instant.from(ZonedDateTime.of(2009, 1, 1, 0, 0, 0, 0...
import org.glukit.dexcom.sync.g4.DexcomG4Constants; import org.glukit.dexcom.sync.model.DexcomSyncData; import org.glukit.dexcom.sync.model.GlucoseReadRecord; import org.glukit.dexcom.sync.model.ManufacturingParameters; import org.glukit.dexcom.sync.model.UserEventRecord; import org.glukit.sync.api.*; import org.junit....
package org.glukit.dexcom.sync; /** * Unit test of {@link DexcomAdapterService}. * * @author alexandre.normand */ public class TestDexcomAdapterService { private static final String SERIAL_NUMBER = "serial"; private static final String HARDWARE_REVISION = "revision1"; private static final String HARDWARE...
private static final List<GlucoseReadRecord> EMPTY_GLUCOSE_READ_RECORDS = Collections.emptyList();
2
AVMf/avmf
src/main/java/org/avmframework/examples/inputdatageneration/line/LineTestObject.java
[ "public class Vector extends AbstractVector {\n\n public void addVariable(Variable variable) {\n variables.add(variable);\n }\n\n public List<Variable> getVariables() {\n return new ArrayList<>(variables);\n }\n\n public void setVariablesToInitial() {\n for (Variable var : variables) {\n var.setV...
import org.avmframework.Vector; import org.avmframework.examples.inputdatageneration.Branch; import org.avmframework.examples.inputdatageneration.BranchTargetObjectiveFunction; import org.avmframework.examples.inputdatageneration.TestObject; import org.avmframework.variable.FixedPointVariable;
package org.avmframework.examples.inputdatageneration.line; public class LineTestObject extends TestObject { static final int NUM_BRANCHING_NODES = 7; static final int PRECISION = 1; static final double INITIAL_VALUE = 0.0; static final double MIN = 0.0; static final double MAX = 100.0; @Override pub...
public BranchTargetObjectiveFunction getObjectiveFunction(Branch target) {
2
dannormington/appengine-cqrs
src/main/java/com/cqrs/appengine/core/persistence/EventRepository.java
[ "public interface AggregateRoot {\n\n /**\n * get the Id\n * \n * @return\n */\n UUID getId();\n\n /**\n * Gets all change events since the\n * original hydration. If there are no\n * changes then null is returned\n * \n * @return\n */\n Iterable<Event> getUncommi...
import java.util.UUID; import com.cqrs.appengine.core.domain.AggregateRoot; import com.cqrs.appengine.core.exceptions.AggregateNotFoundException; import com.cqrs.appengine.core.exceptions.EventCollisionException; import com.cqrs.appengine.core.exceptions.HydrationException; import com.cqrs.appengine.core.messaging.Even...
package com.cqrs.appengine.core.persistence; /** * Implementation of a simple event repository * * @param <T> */ public class EventRepository<T extends AggregateRoot> implements Repository<T> { /** * Instance of the event store */ private EventStore eventStore; /** * The class type ...
public void save(T aggregate) throws EventCollisionException {
2
highway-to-urhell/highway-to-urhell
h2hell-core/src/main/java/com/highway2urhell/service/ThunderExporterService.java
[ "public class CoreEngine {\n\n\tprivate static CoreEngine instance;\n\n\tprivate Map<String, LeechService> leechPluginRegistry = new HashMap<String, LeechService>();\n\tprivate Set<ReporterService> reporterPluginRegistry = new HashSet<ReporterService>();\n\tprivate final static String H2H_CONFIG = \"H2H_CONFIG\";\n...
import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.highway2urhell.CoreEngine; import com.highway2urhell.domain.EntryPathData; import com.highway2urhell.domain.MessageBreaker; import com.highway2urhell.domain.MessageMetrics; import com.highway2urhell.domain.MessageThunderApp; import com.sun.mana...
package com.highway2urhell.service; public class ThunderExporterService { private static ThunderExporterService instance; private BlockingQueue<MessageBreaker> queueRemoteBreaker = new LinkedBlockingQueue<MessageBreaker>(10000); private BlockingQueue<MessageMetrics> queueRemotePerformance = new LinkedBl...
if (CoreEngine.getInstance().getConfig().getPerformance()) {
0
DSH105/SparkTrail
src/main/java/com/dsh105/sparktrail/util/fanciful/FancyMessage.java
[ "public class ReflectionUtil {\n\n public static String NMS_PATH = getNMSPackageName();\n public static String CBC_PATH = getCBCPackageName();\n\n public static String getServerVersion() {\n return Bukkit.getServer().getClass().getPackage().getName().replace(\".\", \",\").split(\",\")[3];\n }\n\n...
import com.dsh105.sparktrail.util.ReflectionUtil; import com.dsh105.sparktrail.util.protocol.wrapper.WrapperPacketChat; import com.dsh105.sparktrail.util.reflection.SafeConstructor; import com.dsh105.sparktrail.util.reflection.SafeField; import com.dsh105.sparktrail.util.reflection.SafeMethod; import org.bukkit.Achieve...
/* * This file is part of SparkTrail 3. * * SparkTrail 3 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * SparkTrail 3 is di...
Object achievement = new SafeMethod(ReflectionUtil.getCBCClass("CraftStatistic"), "getNMSAchievement", Achievement.class).invoke(null, which);
0
ingwarsw/arquillian-suite-extension
src/test/java/org/eu/ingwar/tools/arquillian/extension/suite/Deployments.java
[ "public class EarGenericBuilder {\n\n private static final String RUN_AT_ARQUILLIAN_PATH = \"/runs-at-arquillian.txt\";\n private static final String RUN_AT_ARQUILLIAN_CONTENT = \"at-arquillian\";\n private static final Logger LOG = Logger.getLogger(EarGenericBuilder.class.getName());\n\n /**\n * Pr...
import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.EnterpriseArchive; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.eu.ingwar.tools.arquillian.extension.deployment.EarGenericBuilder; import org.eu.ingwar.tools.arquillian.exten...
package org.eu.ingwar.tools.arquillian.extension.suite; /* * #%L * Arquillian suite extension * %% * Copyright (C) 2013 Ingwar & co. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License a...
EnterpriseArchive ear = EarGenericBuilder.getModuleDeployment(ModuleType.EJB);
1
lacuna/bifurcan
src/io/lacuna/bifurcan/DurableEncodings.java
[ "public class BlockPrefix {\n\n public enum BlockType {\n // root (2 bits)\n PRIMITIVE,\n TABLE,\n DIFF, // continuation\n COLLECTION, // continuation\n\n // 3 bits preceded by COLLECTION\n HASH_MAP,\n SORTED_MAP,\n HASH_SET,\n SORTED_SET,\n LIST,\n COLLECTION_PLACEHOLDER_...
import io.lacuna.bifurcan.durable.BlockPrefix; import io.lacuna.bifurcan.durable.io.DurableBuffer; import io.lacuna.bifurcan.utils.Iterators; import java.util.Arrays; import java.util.Comparator; import java.util.NoSuchElementException; import java.util.Objects; import java.util.concurrent.atomic.AtomicLong; import jav...
Comparator<Object> comparator, Predicate<Object> isSingleton, Codec codec ) { return new IDurableEncoding.Primitive() { @Override public String description() { return description; } @Override public ToLongFunction<Object> hashFn() { return valueHash...
inner -> encodeBlock(Lists.lazyMap(arrays, t -> t[i]), e, inner)
4
teivah/TIBreview
src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/CProcessorRendezvousResourceReliableTest.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 CProcessorRendezvousResourceReliableTest { private static final Logger LOGGER = Logger.getLogger(CProcessorRendezvousResourceReliableTest.class); @Test public void testCProcessorRendezvousResourceReliableTest() { TIBResource...
List<Violation> b = a.process(new Context(), fileresource, resource.getRule().get(0), Configuracion);
1
Daskiworks/ghwatch
app/src/main/java/com/daskiworks/ghwatch/WatchedRepositoriesActivity.java
[ "public class PreferencesUtils {\n\n private static final String TAG = PreferencesUtils.class.getSimpleName();\n\n /*\n * Names of user edited preferences.\n */\n public static final String PREF_SERVER_CHECK_PERIOD = \"pref_serverCheckPeriod\";\n public static final String PREF_SERVER_CHECK_WIFI_ONLY = \"pr...
import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener; import android.util.Log; import android.view.Menu; import ...
/* * Copyright 2014 contributors as indicated by the @authors tag. * * 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 re...
private ImageLoader imageLoader;
2
Arjun-sna/Android-AudioRecorder-App
app/src/main/java/in/arjsna/audiorecorder/audiorecording/RecordFragment.java
[ "public class AppConstants {\n public static final String ACTION_PAUSE = \"in.arjsna.audiorecorder.PAUSE\";\n public static final String ACTION_RESUME = \"in.arjsna.audiorecorder.RESUME\";\n public static final String ACTION_STOP = \"in.arjsna.audiorecorder.STOP\";\n public static final String ACTION_IN_SERVICE...
import android.animation.FloatEvaluator; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.con...
package in.arjsna.audiorecorder.audiorecording; public class RecordFragment extends BaseFragment implements AudioRecordMVPView { private static final String LOG_TAG = RecordFragment.class.getSimpleName(); private FloatingActionButton mRecordButton = null; private FloatingActionButton mPauseButton = null; priv...
.subscribe(o -> startActivity(new Intent(mContext, SettingsActivity.class)));
2
onepf/OPFPush
opfpush/src/test/java/org/onepf/opfpush/OPFPushHelperTest.java
[ "@SuppressWarnings(\"PMD.MissingStaticMethodInNonInstantiatableClass\")\npublic final class Configuration {\n\n @NonNull\n private final List<PushProvider> providers;\n\n @Nullable\n private final EventListener eventListener;\n\n @Nullable\n private final CheckManifestHandler checkManifestHandler;...
import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.Log; import junit.framework.Assert; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; imp...
package org.onepf.opfpush; /** * @author antonpp * @since 14.04.15 */ @Config(sdk = JELLY_BEAN_MR2, manifest = Config.NONE) @RunWith(RobolectricTestRunner.class) public class OPFPushHelperTest extends Assert { private static final String TAG = OPFPushHelperTest.class.getSimpleName(); private static fi...
.setAvailabilityResult(new AvailabilityResult(true))
3
grennis/MongoExplorer
app/src/main/java/com/innodroid/mongobrowser/ui/ConnectionEditDialogFragment.java
[ "public class Constants {\n\tpublic static final String LOG_TAG = \"mongoexp\";\n\n\tpublic static final String ARG_CONNECTION_ID = \"connid\";\n\tpublic static final String ARG_COLLECTION_INDEX = \"collname\";\n\tpublic static final String ARG_ACTIVATE_ON_CLICK = \"actonclick\";\n\tpublic static final String ARG_D...
import android.app.Activity; import android.app.Dialog; import android.content.ContentUris; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.LoaderManager.LoaderCallbacks; import android.support.v4.content.CursorLoader; import android.support.v4.content.Loa...
package com.innodroid.mongobrowser.ui; public class ConnectionEditDialogFragment extends BaseDialogFragment implements LoaderCallbacks<Cursor> { @Bind(R.id.edit_connection_name) TextView mNameView; @Bind(R.id.edit_connection_server) TextView mServerView; @Bind(R.id.edit_connection_port) TextView mPortView; @Bin...
Events.postConnectionAdded(id);
1
kecskemeti/dissect-cf
src/test/java/at/ac/uibk/dps/cloud/simulator/test/simple/cloud/ResourceConsumptionTest.java
[ "public abstract class Timed implements Comparable<Timed> {\n\n\t/**\n\t * The main container for all recurring events in the system\n\t */\n\tprivate static final PriorityQueue<Timed> timedlist = new PriorityQueue<Timed>();\n\t/**\n\t * If set to true, the event loop is processing this object at the moment.\n\t */...
import at.ac.uibk.dps.cloud.simulator.test.ConsumptionEventAssert; import at.ac.uibk.dps.cloud.simulator.test.ConsumptionEventFoundation; import hu.mta.sztaki.lpds.cloud.simulator.DeferredEvent; import hu.mta.sztaki.lpds.cloud.simulator.Timed; import hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ConsumptionEven...
/* * ======================================================================== * DIScrete event baSed Energy Consumption simulaTor * for Clouds and Federations (DISSECT-CF) * ======================================================================== * * This file is part of DISSECT-CF. *...
MaxMinProvider offer;
2
sdenier/GecoSI
src/test/net/gecosi/dataframe/Si5DataFrameTest.java
[ "public class Si5DataFrame extends SiAbstractDataFrame {\n\t\n\tprivate static final int SI5_TIMED_PUNCHES = 30;\n\n\tpublic Si5DataFrame(SiMessage message) {\n\t\tthis.dataFrame = extractDataFrame(message);\n\t\tthis.siNumber = extractSiNumber();\n\t}\n\n\tprotected byte[] extractDataFrame(SiMessage message) {\n\t...
import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; import net.gecosi.dataframe.Si5DataFrame; import net.gecosi.dataframe.SiDataFrame; import net.gecosi.dataframe.SiPunch; import net.gecosi.internal.SiMessage; import org.junit.Test; import test.net.gecosi.SiMessageFixtures;
/** * Copyright (c) 2013 Simon Denier */ package test.net.gecosi.dataframe; /** * @author Simon Denier * @since Mar 15, 2013 * */ public class Si5DataFrameTest { @Test public void getSiCardNumber() { assertThat(subject304243().getSiNumber(), equalTo("304243")); assertThat(subject36353().getSiNumber(),...
return new Si5DataFrame(SiMessageFixtures.sicard5_data).startingAt(0);
4
brutusin/wava
wava-core/src/main/java/org/brutusin/wava/core/io/CommandLineRequestExecutor.java
[ "public enum OpName {\n submit,\n cancel,\n jobs,\n group,\n exit\n}", "public enum Event {\r\n\r\n id,\r\n queued,\r\n priority,\r\n running,\r\n niceness,\r\n retcode,\r\n cancelled,\r\n ping,\r\n error,\r\n exceed_tree,\r\n shutdown,\r\n maxrss,\r\n maxswap...
import org.brutusin.wava.io.LineListener; import org.brutusin.wava.io.RequestExecutor; import org.brutusin.wava.utils.ANSICode; import org.brutusin.wava.io.OpName; import org.brutusin.wava.io.Event; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; impo...
/* * Copyright 2016 Ignacio del Valle Alles idelvall@brutusin.org. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Un...
LineListener sterrListener = new LineListener() {
6
naotawool/salary-calculation
src/test/java/salarycalculation/database/EmployeeDaoTest.java
[ "public static EmployeeRecordAssert assertThat(EmployeeRecord actual) {\n return new EmployeeRecordAssert(actual);\n}", "public static RecordNotFoundExceptionMatcher isClass(Class<?> expectEntityClass) {\n return new RecordNotFoundExceptionMatcher(expectEntityClass, null, null);\n}", "public static Record...
import static com.ninja_squad.dbsetup.Operations.deleteAllFrom; import static com.ninja_squad.dbsetup.Operations.insertInto; import static com.ninja_squad.dbsetup.Operations.sequenceOf; import static com.ninja_squad.dbsetup.destination.DriverManagerDestination.with; import static org.assertj.core.api.Assertions.assertT...
package salarycalculation.database; /** * {@link EmployeeDao}に対するテストクラス。 * * @author naotake */ @RunWith(Enclosed.class) public class EmployeeDaoTest { public static class 社員情報を1件取得する場合 extends EmployeeDaoTestBase { @BeforeClass public static void setUpOnce() throws Exception { ...
assertThat(actual).isNotNull().hasNo(1).hasName("愛媛 蜜柑");
0
TrumanDu/AutoProgramming
src/main/java/com/aibibang/web/system/service/impl/SysRoleServiceImpl.java
[ "public class Page<T> extends RowBounds {\r\n\r\n\tprivate int pageNo = 1;\t\t\t\t// 当前页数\r\n\tprivate int pageSize = 10;\t\t\t// 每页显示行数\r\n\tprivate int totalCount;\t\t\t\t// 总行数\r\n\tprivate int totalPages;\t\t\t\t// 总页数\r\n\t\r\n\tprivate List<T> result = new ArrayList<T>();// 查询结果\r\n\t\r\n\tprivate int offset;...
import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Service; import com.aibibang.common.persistence.Page; import com.aibibang.web.system.dao.SysRoleDao; import com.aibibang.web.system.dao.SysRoleMenuDao; i...
package com.aibibang.web.system.service.impl; /** * * 角色管理service实现类 * * <pre> * 历史记录: * 2016-08-01 22:42 King * 新建文件 * </pre> * * @author * <pre> * SD * King * PG * King * UT * * MA * </pre> * @version $Rev$ * * <p/> $Id$ * */ @Service("sysRoleService") public class SysRoleServiceIm...
public Page<SysRole> findByPage(SysRole sysRole, Page<SysRole> page) {
3
nullpointerexceptionapps/TeamCityDownloader
java/com/raidzero/teamcitydownloader/activities/BuildInfoActivity.java
[ "public class TeamCityBuild implements Parcelable {\n private static final String tag = \"TeamCityBuild\";\n\n private String number;\n private String status;\n private String url;\n private String webUrl;\n private String branch;\n\n public TeamCityBuild(String number, String status, String ur...
import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; import com.raidzero.teamcitydownloader.R; import com.raidzero.teamcitydownloader.data.TeamCityBuild; import com.r...
package com.raidzero.teamcitydownloader.activities; /** * Created by raidzero on 8/14/14. */ public class BuildInfoActivity extends TeamCityActivity { private static final String tag = "BuildInfoActivity"; private TeamCityBuild build; private QueryUtility queryUtility; private TextView txt_trig...
Debug.Log(tag, "onCreateOptionsMenu()");
3
trond-arve-wasskog/nytt-folkeregister-atom
datomic/src/main/java/ske/folkeregister/dw/Server.java
[ "@SuppressWarnings(\"unchecked\")\npublic class FeedGenerator implements Runnable {\n\n private static final Logger log = LoggerFactory.getLogger(FeedGenerator.class);\n\n private static final Abdera abdera = Abdera.getInstance();\n private static final String attr_query =\n \"[:find ?attrname :in $ ?att...
import com.bazaarvoice.dropwizard.webjars.WebJarBundle; import com.sun.jersey.api.client.Client; import datomic.Connection; import io.dropwizard.Application; import io.dropwizard.assets.AssetsBundle; import io.dropwizard.client.JerseyClientBuilder; import io.dropwizard.setup.Bootstrap; import io.dropwizard.setup.Enviro...
package ske.folkeregister.dw; public class Server extends Application<ServerConfig> { public static void main(String[] args) throws Exception { new Server().run(new String[]{"server", "src/main/conf/config.yml"}); } @Override public void initialize(Bootstrap<ServerConfig> bootstrap) { bootst...
final Connection conn = IO.newMemConnection();
3
BoD/irondad
src/main/java/org/jraf/irondad/handler/commitstrip/CommitstripHandler.java
[ "public class Config {\n\n public static final boolean LOGD = true;\n\n}", "public class Constants {\n public static final String TAG = \"irondad/\";\n\n public static final String PROJECT_FULL_NAME = \"BoD irondad\";\n public static final String PROJECT_URL = \"https://github.com/BoD/irondad\";\n ...
import org.jraf.irondad.Config; import org.jraf.irondad.Constants; import org.jraf.irondad.handler.CommandHandler; import org.jraf.irondad.handler.HandlerContext; import org.jraf.irondad.protocol.Command; import org.jraf.irondad.protocol.Connection; import org.jraf.irondad.protocol.Message; import org.jraf.irondad.util...
/* * This source is part of the * _____ ___ ____ * __ / / _ \/ _ | / __/___ _______ _ * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / * /___/ * repository. * * Copyright (C) 2016 Nicolas Pomepuy * Copyright (C) 2013 Benoit 'BoD' Lubek (BoD@JR...
if (Config.LOGD) Log.d(TAG, "handleChannelMessage");
0
BottleRocketStudios/Android-GroundControl
GroundControl/groundcontrol/src/main/java/com/bottlerocketstudios/groundcontrol/convenience/StandardExecutionBuilder.java
[ "public class AgentExecutor implements InactivityCleanupListener {\n\n private static final String TAG = AgentExecutor.class.getSimpleName();\n\n public static final String DEFAULT_AGENT_EXECUTOR_ID = \"<def>\";\n\n private static final ConcurrentHashMap<String, AgentExecutor> sAgentExecutorMap = new Concu...
import android.text.TextUtils; import android.util.Log; import com.bottlerocketstudios.groundcontrol.AgentExecutor; import com.bottlerocketstudios.groundcontrol.agent.Agent; import com.bottlerocketstudios.groundcontrol.executor.JobPriority; import com.bottlerocketstudios.groundcontrol.listener.AgentListener; import com...
/* * Copyright (c) 2016. Bottle Rocket LLC * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
private final Class<? extends AgentPolicyBuilder> mAgentPolicyBuilderClass;
6
DDoS/JICI
src/main/java/ca/sapon/jici/lexer/literal/number/LongLiteral.java
[ "public class Environment {\n // TODO make me thread safe\n private static final Map<String, Class<?>> DEFAULT_CLASSES = new HashMap<>();\n private final Map<String, Class<?>> classes = new LinkedHashMap<>(DEFAULT_CLASSES);\n private final Map<String, Variable> variables = new LinkedHashMap<>();\n\n ...
import ca.sapon.jici.lexer.TokenID; import ca.sapon.jici.util.StringUtil; import ca.sapon.jici.evaluator.Environment; import ca.sapon.jici.evaluator.EvaluatorException; import ca.sapon.jici.evaluator.type.PrimitiveType; import ca.sapon.jici.evaluator.type.Type; import ca.sapon.jici.evaluator.value.Value; import ca.sapo...
/* * This file is part of JICI, licensed under the MIT License (MIT). * * Copyright (c) 2015-2016 Aleksi Sapon <http://sapon.ca/jici/> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software...
throw new EvaluatorException(exception.getMessage(), this);
1
lumag/JBookReader
src/org/jbookreader/book/parser/FB2Parser.java
[ "public interface IBinaryData {\n\n\t/**\n\t * Returns the content-type of the blob.\n\t * @return the content-type.\n\t */\n\tString getContentType();\n\n\t/**\n\t * Sets the content-type of the blob.\n\t * @param contentType new content-type\n\t */\n\tvoid setContentType(String contentType);\n\t\n\t/**\n\t * Retu...
import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import org.jbookreader.book.bom.IBinaryData; import org.jbookreader.book.bom.IBook; import org.jbookreader.book.bom.IContainerNode; import org.jbookreader.book.bom.IImageNode; import org.jbookreader.book.bom...
/* * JBookReader - Java FictionBook Reader * Copyright (C) 2006 Dmitry Baryshkov * * 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 2 of the License, or * (at your o...
public static IBook parse(String uri) throws IOException, SAXException {
1
dinosaurwithakatana/hacker-news-android
app/src/main/java/io/dwak/holohackernews/app/ui/storylist/StoryListFragment.java
[ "public class HackerNewsApplication extends SugarApp {\n private static boolean mDebug = BuildConfig.DEBUG;\n private static HackerNewsApplication sInstance;\n private Context mContext;\n private static AppComponent sAppComponent;\n\n private static AppModule sAppModule;\n\n @Override\n public ...
import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.ActionBar; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompa...
package io.dwak.holohackernews.app.ui.storylist; public class StoryListFragment extends BaseViewModelFragment<StoryListViewModel> { public static final String FEED_TO_LOAD = "feed_to_load"; private static final String TAG = StoryListFragment.class.getSimpleName(); public static final String TOP_OF_LI...
.appComponent(HackerNewsApplication.getAppComponent())
0
52North/SensorPlanningService
52n-sps-testplugin/src/test/java/org/n52/sps/sensor/cite/CiteTaskResultAccessTest.java
[ "public class ResultAccessDataServiceReference {\r\n \r\n private Long id; // database id\r\n \r\n private String reference;\r\n \r\n private String role;\r\n \r\n private String title;\r\n \r\n private String identifier;\r\n \r\n private String referenceAbstract;\r\n \r\n ...
import org.apache.xmlbeans.XmlException; import org.apache.xmlbeans.XmlObject; import org.junit.Before; import org.junit.Test; import org.n52.sps.sensor.model.ResultAccessDataServiceReference; import org.n52.sps.sensor.model.SensorTask; import org.n52.sps.service.admin.MissingSensorInformationException; import o...
/** * Copyright (C) 2012-${latestYearOfContribution} 52°North Initiative for Geospatial Open Source * Software GmbH * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as publishedby the Free * Software Foundation. * ...
SensorTask validTask = new SensorTask(taskId, procedure);
1
VladThodo/behe-keyboard
app/src/main/java/com/vlath/keyboard/latin/settings/Settings.java
[ "public final class KeyboardTheme implements Comparable<KeyboardTheme> {\n private static final String TAG = KeyboardTheme.class.getSimpleName();\n\n static final String KLP_KEYBOARD_THEME_KEY = \"pref_keyboard_layout_20110916\";\n static final String LXX_KEYBOARD_THEME_KEY = \"pref_keyboard_theme_20140509...
import com.vlath.keyboard.latin.AudioAndHapticFeedbackManager; import com.vlath.keyboard.latin.InputAttributes; import com.vlath.keyboard.latin.utils.AdditionalSubtypeUtils; import com.vlath.keyboard.latin.utils.ResourceUtils; import com.vlath.keyboard.latin.utils.RunInLocale; import android.content.Context; import and...
private final ReentrantLock mSettingsValuesLock = new ReentrantLock(); private static final Settings sInstance = new Settings(); public static Settings getInstance() { return sInstance; } public static void init(final Context context) { sInstance.onCreate(context); } priv...
final String predefinedPrefSubtypes = AdditionalSubtypeUtils.createPrefSubtypes(
3
SynBioDex/SBOLDesigner
src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/OldInputDialog.java
[ "public class CharSequenceUtil {\r\n\tprivate CharSequenceUtil() {}\r\n\t\r\n\tpublic static CharSequence shorten(final CharSequence seq, final int maxLength) {\r\n\t\tint length = seq.length();\r\n\t\tif (length < maxLength) {\r\n\t\t\treturn seq;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tint endLength = maxLength / 3;\r\n\...
import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.BorderFactory; import javax.swing...
/* * Copyright (c) 2012 - 2015, Clark & Parsia, LLC. <http://www.clarkparsia.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * ...
Registries registries = Registries.get();
1
andrewflynn/bettersettlers
app/src/main/java/com/nut/bettersettlers/logic/MapLogic.java
[ "public static final int[] PROBABILITY_MAPPING = {\n\t0, // 0\n 0, // 1\n 1, // 2\n 2, // 3\n 3, // 4\n 4, // 5\n 5, // 6\n 0, // 7\n 5, // 8\n 4, // 9\n 3, // 10\n 2, // 11\n 1 // 12\n};", "public final class CatanMap {\n\t/** ...
import static com.nut.bettersettlers.util.Consts.PROBABILITY_MAPPING; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Random; import java.util.Set; import com.nut.bettersettlers.data.CatanMap; imp...
Resource nextResource; if (nextProb == 0) { set.add(Resource.DESERT); placedRecently = true; continue; } else if (nextProb < -1 && whitelistName != null && allowedWhitelists.containsKey(whitelistName) && allowedWhitelists.get(whitelistName).contains(Resource.DESERT)) { // Special c...
public static ArrayList<Harbor> getHarbors(CatanMap currentMap, int currentType,
2
pedrovgs/Nox
sample/src/main/java/com/github/pedrovgs/nox/sample/MainActivity.java
[ "public class NoxItem {\n\n private final String url;\n private final Integer resourceId;\n private final Integer placeholderId;\n\n public NoxItem(String url) {\n validateUrl(url);\n this.url = url;\n this.resourceId = null;\n this.placeholderId = null;\n }\n\n public NoxItem(int resourceId) {\n ...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.util.Log; import com.github.pedrovgs.nox.NoxItem; import com.github.pedrovgs.nox.NoxView; import com.github.pedrovgs.nox.OnNoxItemClickListener; import com.github.pedrovgs.nox.shape.Shape; import com...
/* * Copyright (C) 2015 Pedro Vicente Gomez Sanchez. * * 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 ...
Shape verticalLinearShape = new VerticalLinearShape(shapeConfig);
3
cert-se/megatron-java
src/se/sitic/megatron/fileprocessor/MultithreadedDnsProcessor.java
[ "public class AppProperties {\n // -- Keys in properties file --\n\n // Implicit\n public static final String JOB_TYPE_NAME_KEY = \"implicit.jobTypeName\";\n\n // General\n public static final String LOG4J_FILE_KEY = \"general.log4jConfigFile\";\n public static final String LOG_DIR_KEY = \"general...
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.UnknownHostException; import java.text.DecimalFormat; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; ...
package se.sitic.megatron.fileprocessor; /** * Extracts hostnames or IP addresses from the input file, and makes DNS lookups * respective reverse DNS lookups in multiple threads to improve performance. * <p> * The result is saved in a map, which is used by IpAddressDecorator and * HostnameDecorator. * <p> ...
long ipAddress = IpAddressUtil.dnsLookup(itemStr);
4
HackGSU/mobile-android
app/src/main/java/com/hackgsu/fall2016/android/views/AnnouncementsRecyclerView.java
[ "public class DataStore {\n\tprivate static ArrayList<AboutPerson> aboutPeople;\n\tprivate static ArrayList<Announcement> announcements = new ArrayList<>();\n\tprivate static String openingCeremoniesRoomNumber;\n\tprivate static ArrayList<ScheduleEvent> scheduleEvents = new ArrayList<>();\n\n\tstatic {\n\t\taboutPe...
import android.content.Context; import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.support.design.widget.Snackbar; import android.support.v4.content.ContextCompat; import android.support.v4.graphics.drawab...
package com.hackgsu.fall2016.android.views; public class AnnouncementsRecyclerView extends ThemedEmptyStateRecyclerView { private AnnouncementEventAdapter adapter; private SmoothLinearLayoutManager layoutManager; private boolean showOnlyBookmarked; public AnnouncementsRecyclerView (Context co...
holder.loadAnnouncement(DataStore.getAnnouncements(shouldShowOnlyBookmarked()).get(position));
0
loopfz/Lucki
src/shaft/poker/agent/handranges/weightedrange/PlayerWTRange.java
[ "public interface IHandEvaluator {\n public void compute(List<Card> holecards, List<Card> board, IHandRange range, int numPlayers);\n \n public double effectiveHandStrength();\n public double rawHandStrength();\n public double posPotential();\n public double negPotential();\n }", "public inte...
import shaft.poker.game.table.IPlayerActionListener; import shaft.poker.game.ITable; import shaft.poker.game.ITable.*; import shaft.poker.game.table.*; import java.util.List; import shaft.poker.agent.IHandEvaluator; import shaft.poker.agent.IHandRange; import shaft.poker.agent.enumerationtools.EnumCandidate; import sha...
/* * The MIT License * * Copyright 2013 Thomas Schaffer <thomas.schaffer@epitech.eu>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitatio...
List<EnumCandidate> holeCards = EnumCandidate.buildCandidates(null, board);
2
sweer/hex-image-compress
src/pipeline/Decoder.java
[ "public class DoubleLattice extends Lattice {\r\n\t/**\r\n\t * @uml.property name=\"data\"\r\n\t */\r\n\tprivate final double[][] data;\r\n\tpublic DoubleLattice(double[][] data, int ox, int oy) {\r\n\t\tsuper(ox,oy);\r\n\t\tthis.data = data;\r\n\t}\r\n\t\r\n public DoubleLattice(DoubleLattice lattice) {\r\n ...
import util.ImageUtils; import filter.H2O; import filter.HexByteRavelet; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.EOFException; import java.io.IOException; import java.util.LinkedList; import java.util.List; import lattice.DoubleLattice; im...
package pipeline; /* * Copyright (C) 2012 Aleksejs Truhans * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *...
private HexByteRavelet ravelet;
6
RedMadRobot/Chronos
chronos/src/main/java/com/redmadrobot/chronos/gui/fragment/dialog/ChronosDialogFragment.java
[ "public final class ChronosConnector {\n\n private final static String KEY_CHRONOS_LISTENER_ID = \"chronos_listener_id\";\n\n private ChronosListener mChronosListener;\n\n private Object mGUIClient;\n\n /**\n * GUI client should call this method in its own onCreate() method.\n *\n * @param c...
import com.redmadrobot.chronos.ChronosConnector; import com.redmadrobot.chronos.ChronosOperation; import com.redmadrobot.chronos.gui.ChronosConnectorWrapper; import com.redmadrobot.chronos.gui.fragment.ChronosFragment; import com.redmadrobot.chronos.gui.fragment.ChronosSupportFragment; import org.jetbrains.annotations....
package com.redmadrobot.chronos.gui.fragment.dialog; /** * A DialogFragment that is connected to Chronos. * * @author maximefimov * @see ChronosFragment * @see ChronosSupportDialogFragment * @see ChronosSupportFragment */ @SuppressWarnings("unused") @TargetApi(Build.VERSION_CODES.HONEYCOMB) public abstract c...
ChronosConnectorWrapper {
2
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...
return MavenArtifactDownloader.generate(project, desc, false);
2
graywolf336/Jail
src/main/java/com/graywolf336/jail/command/subcommands/JailStatusCommand.java
[ "public class JailManager {\n private JailMain plugin;\n private HashMap<String, Jail> jails;\n private HashMap<String, CreationPlayer> jailCreators;\n private HashMap<String, CreationPlayer> cellCreators;\n private HashMap<String, ConfirmPlayer> confirms;\n private HashMap<UUID, CachePrisoner> ca...
import java.util.Collections; import java.util.List; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import com.graywolf336.jail.JailManager; import com.graywolf336.jail.Util; import com.graywolf336.jail.beans.Prisoner; import com.graywolf336.jail.command.Command; import com.graywolf336.jail.c...
package com.graywolf336.jail.command.subcommands; @CommandInfo( maxArgs = 0, minimumArgs = 0, needsPlayer = true, pattern = "status|s", permission = "jail.usercmd.jailstatus", usage = "/jail status" )
public class JailStatusCommand implements Command{
3
gomathi/merkle-tree
test/org/hashtrees/test/HashTreesStoreTest.java
[ "@ThreadSafe\npublic class HashTreesMemStore extends HashTreesBaseStore {\n\n\tprivate final ConcurrentMap<Long, HashTreeMemStore> treeIdAndIndHashTree = new ConcurrentHashMap<>();\n\n\tprivate static class HashTreeMemStore {\n\t\tprivate final ConcurrentMap<Integer, ByteBuffer> segmentHashes = new ConcurrentSkipLi...
import org.hashtrees.thrift.generated.SegmentData; import org.hashtrees.thrift.generated.SegmentHash; import org.hashtrees.util.ByteUtils; import org.junit.Assert; import org.junit.Test; import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; import java.util.Ha...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ma...
ByteBuffer digest = ByteBuffer.wrap(ByteUtils.sha1("digest1"
6
ryantenney/passkit4j
src/main/java/com/ryantenney/passkit4j/Pass.java
[ "public interface NamedInputStreamSupplier extends InputStreamSupplier {\n\n\tpublic String getName();\n\n}", "@Data\n@Accessors(chain=true, fluent=true)\n@RequiredArgsConstructor\npublic class Barcode {\n\n\t@NonNull private BarcodeFormat format;\n\n\t@NonNull private String message;\n\n\tprivate String messageE...
import lombok.Data; import lombok.NoArgsConstructor; import lombok.NonNull; import lombok.experimental.Accessors; import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.List; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude.I...
package com.ryantenney.passkit4j; @Data @NoArgsConstructor @Accessors(chain=true, fluent=true) public class Pass { // Standard Keys @NonNull private String description; @NonNull private String organizationName; @NonNull private String passTypeIdentifier; @NonNull private String serialNumber; @NonNull priva...
@JsonIgnore private PassInformation passInformation;
6
quartzweb/quartz-web
src/main/java/com/github/quartzweb/service/strategy/JobServiceStrategy.java
[ "public class UnsupportedClassException extends RuntimeException {\n public UnsupportedClassException() {\n }\n\n public UnsupportedClassException(String message) {\n super(message);\n }\n\n public UnsupportedClassException(String message, Throwable cause) {\n super(message, cause);\n ...
import com.github.quartzweb.exception.UnsupportedClassException; import com.github.quartzweb.job.MethodInvoker; import com.github.quartzweb.manager.web.JobInfosVO; import com.github.quartzweb.manager.web.QuartzWebManager; import com.github.quartzweb.service.JSONResult; import com.github.quartzweb.service.QuartzWebURL; ...
/** * Licensed under the Apache License, Version 2.0 (the "License"); */ package com.github.quartzweb.service.strategy; /** * @author quxiucheng [quxiuchengdev@gmail.com] */ public class JobServiceStrategy implements ServiceStrategy<JobServiceStrategyParameter> { @Override public JSONResult service(Serv...
Assert.notEmpty(jobClassMethodName, "jobClassMethodName can not be null");
6
ArcadiaPlugins/Arcadia-Spigot
src/main/java/me/redraskal/arcadia/game/WingRushGame.java
[ "public class Arcadia extends JavaPlugin {\n\n private ArcadiaAPI api;\n public Configuration mainConfiguration;\n\n public void onEnable() {\n this.api = new ArcadiaAPI(this);\n new File(this.getDataFolder().getPath() + \"/translations/\").mkdirs();\n if(new File(this.getDataFolder()....
import me.redraskal.arcadia.Arcadia; import me.redraskal.arcadia.Freeze; import me.redraskal.arcadia.Utils; import me.redraskal.arcadia.api.game.BaseGame; import me.redraskal.arcadia.api.map.GameMap; import me.redraskal.arcadia.api.scoreboard.SidebarSettings; import me.redraskal.arcadia.api.scoreboard.WinMethod; import...
package me.redraskal.arcadia.game; public class WingRushGame extends BaseGame { private Location startLocationCenter; private List<Freeze> freezeList = new ArrayList<>(); public WingRushGame(GameMap gameMap) { super(Arcadia.getPlugin(Arcadia.class).getAPI().getTranslationManager().fetchTranslat...
new SidebarSettings(ScoreSidebar.class,
7
aponom84/MetrizedSmallWorld
src/main/java/org/latna/msw/evaluation/WikiSparseAggregationTest.java
[ "public abstract class MetricElement {\n private final List<MetricElement> friends;\n\n public MetricElement() {\n friends = Collections.synchronizedList(new ArrayList());\n }\n \n /**\n * Calculate metric between current object and another.\n * @param gme any element for whose metric ...
import org.latna.msw.MetricElement; import org.latna.msw.MaskValidator; import org.latna.msw.MetrizedSmallWorld; import org.latna.msw.AlgorithmLib; import org.latna.msw.euclidian.EuclidianFactory; import org.latna.msw.wikisparse.WikiSparse; import org.latna.msw.wikisparse.WikiSparseFactory; import java.io.File; import ...
package org.latna.msw.evaluation; /** * V02.05.2014 * @author Alexander Ponomarenko aponom84@gmail.com */ public class WikiSparseAggregationTest { public static final int NUMBER_OF_THREADS = 4; public static final String outFileName = "WikiSparceAggregate.txt"; /* public static SearchResu...
List <MetricElement> testQueries = queryFactory.getShortQueries(querySetSize, 2, 10000);
0
desht/ScrollingMenuSign
src/main/java/me/desht/scrollingmenusign/views/SMSSpoutView.java
[ "public class SMSException extends DHUtilsException {\n\n private static final long serialVersionUID = 1L;\n\n public SMSException(String message) {\n super(message);\n }\n\n}", "public class SMSMenu extends Observable implements SMSPersistable, SMSUseLimitable, ConfigurationListener, Comparable<S...
import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Observable; import java.util.UUID; import me.desht.dhutils.ConfigurationManager; import me.desht.dhutils.Debugger; import me.desht.dhutils.LogUtils; import me.desht.dhutils.PermissionUtils; import me.desht.scrollingmenusign.SMS...
package me.desht.scrollingmenusign.views; /** * This view draws menus on a popped-up Spout view. */ public class SMSSpoutView extends SMSScrollableView implements PoppableView { // attributes public static final String AUTOPOPDOWN = "autopopdown"; public static final String SPOUTKEYS = "spoutkeys"; ...
ViewUpdateAction vu = ViewUpdateAction.getAction(arg1);
7
panhainan/BookHouse
src/main/java/com/phn/bookhouse/service/impl/OrderServiceImpl.java
[ "public interface AddressDao {\n\n\t/**\n\t * @author pan\n\t * @param addressid\n\t * @return\n\t */\n\tpublic Address selectAddressById(long addressid);\n\n\t/**\n\t * @author pan\n\t * @param addressid\n\t * @return\n\t */\n\tpublic int deleteAddress(long addressid);\n\n\t/**\n\t * @author pan\n\t * @param addre...
import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.phn.bookhouse.dao.AddressDao; import com.phn.bookhouse.dao.BookDao; import com.phn.bookhouse.dao.OrderDao; import com.phn.bookho...
/** * */ package com.phn.bookhouse.service.impl; /** * @file OrderServiceImpl.java * @author pan * @date 2014年11月17日 * @email panhainan@yeah.net */ @Service("orderService") public class OrderServiceImpl implements OrderService { @Autowired
private OrderDao orderDao;
2
TechzoneMC/NPCLib
nms-v1_7_R4/src/main/java/net/techcable/npclib/nms/versions/v1_7_R4/HumanNPCHook.java
[ "@RequiredArgsConstructor\npublic enum Animation {\n /**\n * Makes the npc act hurt\n * <p/>\n * Only applicable to living entities\n */\n HURT,\n /**\n * Makes the npc lie on the ground\n * <p/>\n * Only applicable to living entities\n */\n DEAD,\n\n // Human Animatio...
import java.lang.reflect.Field; import java.util.List; import java.util.UUID; import net.minecraft.server.v1_7_R4.EntityPlayer; import net.minecraft.server.v1_7_R4.Packet; import net.minecraft.server.v1_7_R4.PacketPlayOutAnimation; import net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo; import net.minecraft.util.c...
package net.techcable.npclib.nms.versions.v1_7_R4; public class HumanNPCHook extends LivingNPCHook implements IHumanNPCHook { public HumanNPCHook(HumanNPC npc, Location toSpawn) { super(npc, toSpawn, EntityType.PLAYER); getNmsEntity().setHook(this); getNmsEntity().getWorld().players.re...
public EntityNPCPlayer getNmsEntity() {
3
Integreight/1Sheeld-Android-App
oneSheeld/src/main/java/com/integreight/onesheeld/appFragments/SheeldsList.java
[ "public class MainActivity extends FragmentActivity {\n public static final int PREMISSION_REQUEST_CODE = 1;\n public static final int DRAW_OVER_APPS_REQUEST_CODE = 2;\n public static final String IS_CONTEXT_MENU_BUTTON_TUTORIAL_SHOWN_SP = \"com.integreight.onesheeld.IS_CONTEXT_MENU_BUTTON_TUTORIAL_SHOWN_S...
import android.app.Activity; import android.app.ActivityManager; import android.app.ActivityManager.RunningServiceInfo; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.graphics.Color; import android.os.Bundle...
if (activity.getSupportFragmentManager() .getBackStackEntryCount() > 1) { activity.getSupportFragmentManager() .popBackStack(); ...
((FaceDetectionShield) activity.getThisApplication().getRunningShields().get(UIShield.FACE_DETECTION.name())).hidePreview();
7
btk5h/skript-mirror
src/main/java/com/btk5h/skriptmirror/skript/reflect/ExprProxy.java
[ "public class FunctionWrapper {\n private final String name;\n private final Object[] arguments;\n\n public FunctionWrapper(String name, Object[] arguments) {\n this.name = name;\n this.arguments = arguments;\n }\n\n public String getName() {\n return name;\n }\n\n public Object[] getArguments() {\n...
import ch.njol.skript.Skript; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionType; import ch.njol.skript.lang.SkriptParser; import ch.njol.skript.lang.Variable; import ch.njol.skript.lang.function.Function; import ch.njol.skript.lang.function.FunctionEvent; import ch.njol.skript.lang.util.S...
package com.btk5h.skriptmirror.skript.reflect; public class ExprProxy extends SimpleExpression<Object> { static { Skript.registerExpression(ExprProxy.class, Object.class, ExpressionType.COMBINED, "[a] [new] proxy [instance] of %javatypes% (using|from) %objects%"); } private Expression<JavaType> in...
if (!Consent.Feature.PROXIES.hasConsent(SkriptUtil.getCurrentScript())) {
5
Dynious/Biota
src/main/java/com/dynious/biota/command/CommandBiota.java
[ "public class BioSystem\n{\n private static final Random RANDOM = new Random();\n\n public final WeakReference<Chunk> chunkReference;\n private int tick = RANDOM.nextInt(Settings.TICKS_PER_BIOSYSTEM_UPDATE);\n\n /**\n * Stores the amount of plants in the chunk. Plant blocks can have different amount...
import com.dynious.biota.biosystem.BioSystem; import com.dynious.biota.biosystem.BioSystemHandler; import com.dynious.biota.biosystem.BioSystemInitThread; import com.dynious.biota.lib.Commands; import com.dynious.biota.network.NetworkHandler; import com.dynious.biota.network.message.MessageBioSystemUpdate; import net.m...
package com.dynious.biota.command; public class CommandBiota extends CommandBase { @Override public String getCommandName() { return Commands.BIOTA; } @Override public int getRequiredPermissionLevel() { return 2; } @Override public String getCommandUsage(ICom...
NetworkHandler.INSTANCE.sendToPlayersWatchingChunk(new MessageBioSystemUpdate(bioSystem), (WorldServer) world, chunk.xPosition, chunk.zPosition);
4
mjuhasz/BDSup2Sub
src/main/java/bdsup2sub/supstream/dvd/IfoParser.java
[ "public class Palette {\n /** Number of palette entries */\n private final int size;\n /** Byte buffer for RED info */\n private final byte[] r;\n /** Byte buffer for GREEN info */\n private final byte[] g;\n /** Byte buffer for BLUE info */\n private final byte[] b;\n /** Byte buffer for...
import bdsup2sub.bitmap.Palette; import bdsup2sub.core.CoreException; import bdsup2sub.core.Logger; import bdsup2sub.tools.FileBuffer; import bdsup2sub.tools.FileBufferException; import bdsup2sub.utils.ToolBox; import java.util.Arrays; import static bdsup2sub.core.Constants.DEFAULT_DVD_PALETTE; import static bdsup2sub....
/* * Copyright 2014 Volker Oth (0xdeadbeef) / Miklos Juhasz (mjuhasz) * * 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 req...
logger.trace("Reading palette from offset: " + ToolBox.toHexLeftZeroPadded(VTS_PGCITI_ofs, 8) + "\n");
5
deephacks/westty
westty-protobuf/src/main/java/org/deephacks/westty/internal/protobuf/ProtobufPipelineFactory.java
[ "@ConfigScope\n@Config(name = \"protobuf\",\n desc = \"Protobuf configuration. Changes requires server restart.\")\npublic class ProtobufConfig {\n\n @Id(desc=\"Name of this server\")\n private String serverName = ServerConfig.DEFAULT_SERVER_NAME;\n\n public ProtobufConfig(){\n }\n\n public Pr...
import com.google.protobuf.MessageLite; import org.deephacks.westty.config.ProtobufConfig; import org.deephacks.westty.config.ServerSpecificConfigProxy; import org.deephacks.westty.protobuf.FailureMessages.Failure; import org.deephacks.westty.protobuf.ProtobufClient; import org.deephacks.westty.protobuf.ProtobufSeriali...
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribut...
public void startup(@Observes ProviderStartupEvent event) {
6
lingochamp/FileDownloader
library/src/main/java/com/liulishuo/filedownloader/FileDownloader.java
[ "public class CustomComponentHolder {\n private DownloadMgrInitialParams initialParams;\n\n private FileDownloadHelper.ConnectionCountAdapter connectionCountAdapter;\n private FileDownloadHelper.ConnectionCreator connectionCreator;\n private FileDownloadHelper.OutputStreamCreator outputStreamCreator;\n ...
import com.liulishuo.filedownloader.util.FileDownloadProperties; import com.liulishuo.filedownloader.util.FileDownloadUtils; import java.io.File; import java.util.List; import android.app.Application; import android.app.Notification; import android.content.ComponentName; import android.content.Context; import android.c...
/* * Copyright (c) 2015 LingoChamp Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
final File intermediateFile = new File(FileDownloadUtils.getTempPath(targetFilePath));
8
Azure/azure-storage-android
microsoft-azure-storage/src/com/microsoft/azure/storage/blob/CloudBlobContainer.java
[ "public final class Constants {\n /**\n * Defines constants for ServiceProperties requests.\n */\n public static class AnalyticsConstants {\n\n /**\n * The XML element for the CORS Rule AllowedHeaders\n */\n public static final String ALLOWED_HEADERS_ELEMENT = \"AllowedHe...
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringWriter; import java.net.HttpURLConnection; import java.net.URI; import java.net.URISyntaxException; import java.security.InvalidKeyException; import java.util.Calendar; import java.util.Date; import java.util.EnumSet; import java.util...
* @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public boolean exists(final AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException { return this.exists(false, accessC...
if (!StorageCredentialsHelper.canCredentialsSignRequest(this.blobServiceClient.getCredentials())) {
7
tgobbens/fluffybalance
core/src/com/balanceball/system/PhysicsSystem.java
[ "public class GravityComponent implements Component {\n public Vector2 normalisedGravity = new Vector2();\n}", "public class GravityEntity extends Entity {\n\n public GravityEntity() {\n addComponent(new GravityComponent());\n }\n}", "public class PhysicsComponent implements Component {\n pub...
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.physics.box2d.Box2D; import com.badlogic.gdx.physics.box2d.Contact; import com.badlogic.gdx.physics.box2d.ContactImpulse; import com.badlogic.gdx.physics.box2d.ContactListener; import com.b...
package com.balanceball.system; /** * Created by tijs on 14/07/2017. */ public class PhysicsSystem extends System { public interface BallPointContactListener { void onPointContact(int type); } public final static int BODY_USER_DATA_TYPE_BALL = 0; public final static int BODY_USER_DATA_TYP...
GravityEntity.class, GravityComponent.class);
1
jaychang0917/SimpleRecyclerView
app/src/main/java/com/jaychang/demo/srv/DragAndDropActivity.java
[ "public class BookCell extends SimpleCell<Book, BookCell.ViewHolder>\n implements Updatable<Book> {\n\n private static final String KEY_TITLE = \"KEY_TITLE\";\n private boolean showHandle;\n\n public BookCell(Book item) {\n super(item);\n }\n\n @Override\n protected int getLayoutRes() {\n return R.layo...
import android.os.Bundle; import android.view.View; import android.widget.TextView; import com.jaychang.demo.srv.cell.BookCell; import com.jaychang.demo.srv.model.Book; import com.jaychang.demo.srv.util.DataUtils; import com.jaychang.srv.SimpleCell; import com.jaychang.srv.SimpleRecyclerView; import com.jaychang.srv.be...
package com.jaychang.demo.srv; public class DragAndDropActivity extends BaseActivity { @BindView(R.id.linearRecyclerView) SimpleRecyclerView linearRecyclerView; @BindView(R.id.gridRecyclerView) SimpleRecyclerView gridRecyclerView; @BindView(R.id.resultView) TextView resultView; @Override protecte...
BookCell cell = new BookCell(book);
0