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 |
|---|---|---|---|---|---|---|
Alex1304/ultimategdbot | app/src/main/java/ultimategdbot/command/ProfileCommand.java | [
"public final class Strings {\n\n public static final String GENERAL = \"GeneralStrings\";\n public static final String GD = \"GDStrings\";\n\n private Strings() {\n throw new AssertionError();\n }\n}",
"@Value.Immutable\n@Criteria\n@Criteria.Repository(facets = { ReactorReadable.class, Reactor... | import botrino.api.util.MessageUtils;
import botrino.interaction.InteractionFailedException;
import botrino.interaction.annotation.Acknowledge;
import botrino.interaction.annotation.ChatInputCommand;
import botrino.interaction.annotation.UserCommand;
import botrino.interaction.context.ChatInputInteractionContext;
impor... | package ultimategdbot.command;
@RdiService
@Acknowledge(Acknowledge.Mode.NONE)
@ChatInputCommand(name = "profile", description = "View the profile of any player in Geometry Dash.")
@UserCommand("View GD Profile")
public final class ProfileCommand implements ChatInputInteractionListener, UserInteractionListener {
... | .flatMap(user -> userService.buildProfile(ctx, user, EmbedType.USER_PROFILE) | 5 |
oakesville/mythling | src/com/oakesville/mythling/SearchActivity.java | [
"@SuppressLint(\"SetJavaScriptEnabled\")\npublic class FireTvEpgActivity extends EpgActivity {\n private static final String TAG = FireTvEpgActivity.class.getSimpleName();\n\n private static final String EPG_FIRETV_JS = \"<script src=\\\"js/epg-firetv.js\\\"></script>\";\n private static final String MYTHL... | import java.net.URL;
import java.util.List;
import java.util.Map;
import com.oakesville.mythling.firetv.FireTvEpgActivity;
import com.oakesville.mythling.media.SearchResults;
import com.oakesville.mythling.util.HttpHelper;
import com.oakesville.mythling.util.MythTvParser;
import com.oakesville.mythling.util.Myth... | /**
* Copyright 2015 Donald Oakes
*
* 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 o... | startActivity(new Intent(this, getAppSettings().isFireTv() ? FireTvEpgActivity.class : EpgActivity.class));
| 0 |
legobmw99/Stormlight | src/main/java/com/legobmw99/stormlight/modules/powers/client/ClientPowerUtils.java | [
"public class ShardbladeItem extends SwordItem {\n\n private static final int ATTACK_DAMAGE = 12;\n private static final float ATTACK_SPEED = 10.0f;\n\n private static final Tier SHARD = new Tier() {\n @Override\n public int getUses() {\n return -1;\n }\n\n @Override\... | import com.legobmw99.stormlight.modules.combat.item.ShardbladeItem;
import com.legobmw99.stormlight.modules.powers.PowersSetup;
import com.legobmw99.stormlight.modules.powers.data.SurgebindingCapability;
import com.legobmw99.stormlight.network.Network;
import com.legobmw99.stormlight.network.packets.SummonBladePacket;
... | package com.legobmw99.stormlight.modules.powers.client;
public class ClientPowerUtils {
private static final Minecraft mc = Minecraft.getInstance();
/**
* Adapted from vanilla, allows getting mouseover at given distances
*
* @param dist the distance requested
* @return a RayTraceResult ... | Network.sendToServer(new SurgePacket(surge, pos, shiftDown)); | 5 |
witwall/sfntly-java | src/main/java/com/google/typography/font/sfntly/table/bitmap/BitmapSizeTable.java | [
"public abstract class FontData {\n\n protected final static int GROWABLE_SIZE = Integer.MAX_VALUE;\n\n /**\n * Note: Enum names intended to match the names used in the OpenType and sfnt specs.\n */\n public enum DataSize {\n BYTE(1),\n CHAR(1),\n USHORT(2),\n SHORT(2),\n UINT24(3),\n ULONG... | import com.google.typography.font.sfntly.data.FontData;
import com.google.typography.font.sfntly.data.ReadableFontData;
import com.google.typography.font.sfntly.data.WritableFontData;
import com.google.typography.font.sfntly.math.FontMath;
import com.google.typography.font.sfntly.table.SubTable;
import com.google.typog... | }
return this.subTableGlyphInfoIter.next();
}
@Override
public void remove() {
throw new UnsupportedOperationException("Unable to remove a glyph info.");
}
}
Iterator<BitmapGlyphInfo> iterator() {
return new BitmapGlyphInfoIterator();
}
protected ... | FontMath.paddingRequired(Math.abs(subTableSize), FontData.DataSize.ULONG.size()); | 0 |
kkung/kakao-android-sdk-standalone | sdk/src/com/kakao/http/KakaoAsyncHandler.java | [
"public class APIErrorResult {\n /**\n * ์๋ฌ๋ฅผ ์ผ์ผํจ ์์ฒญ URL\n */\n private String requestURL;\n // {@link com.kakao.helper.ServerProtocol.ERROR_CODE_KEY}์ ๊ฐ์ ๋ณ์ ์ด๋ฆ ์ ์ง. for jackson parsing\n /**\n * ์ซ์๋ก ๊ตฌ์ฑ๋ ์๋ฌ ์ฝ๋\n */\n protected int errorCode;\n\n //{@link com.kakao.helper.ServerProtoc... | import java.io.IOException;
import java.net.URI;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import android.os.Message;
import com.kakao.APIErrorResult;
import com.kakao.KakaoStoryProfile;
import com.kakao.KakaoStoryUpload;
import com.kakao.KakaoTalkProfile;
import ... | /**
* Copyright 2014 Minyoung Jeong <kkungkkung@gmail.com>
* Copyright 2014 Kakao Corp.
*
* Redistribution and modification in source or binary forms are not permitted without specific prior written permission.ย
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file excep... | if (APIErrorResult.class.equals(returnType)) { | 0 |
ReplayMod/jGui | src/main/java/de/johni0702/minecraft/gui/popup/GuiInfoPopup.java | [
"public interface GuiContainer<T extends GuiContainer<T>> extends ComposedGuiElement<T> {\n\n T setLayout(Layout layout);\n Layout getLayout();\n\n void convertFor(GuiElement element, Point point);\n\n /**\n * Converts the global coordinates of the point to ones relative to the element.\n * @par... | import de.johni0702.minecraft.gui.layout.VerticalLayout;
import de.johni0702.minecraft.gui.utils.Colors;
import de.johni0702.minecraft.gui.utils.lwjgl.Dimension;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint;
import de.johni0702.minecraft.gui.versions.MCVer.Keyboard;
import de.johni0702.minecraft.gui.cont... | /*
* This file is part of jGui API, licensed under the MIT License (MIT).
*
* Copyright (c) 2016 johni0702 <https://github.com/johni0702>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softw... | labels[i] = new GuiLabel().setI18nText(info[i]).setColor(Colors.BLACK); | 7 |
sewerk/Bill-Calculator | app/src/main/java/pl/srw/billcalculator/bill/SavedBillsRegistry.java | [
"public interface Bill {\n\n Long getId();\n Long getPricesId();\n\n Date getDateFrom();\n void setDateFrom(Date dateFrom);\n Date getDateTo();\n void setDateTo(Date dateTo);\n Double getAmountToPay();\n void setAmountToPay(Double value);\n}",
"@Entity(active = true)\npublic class PgeG11Bi... | import android.support.v4.util.SimpleArrayMap;
import org.threeten.bp.LocalDate;
import java.util.Random;
import javax.inject.Inject;
import javax.inject.Singleton;
import pl.srw.billcalculator.db.Bill;
import pl.srw.billcalculator.db.PgeG11Bill;
import pl.srw.billcalculator.db.PgeG12Bill;
import pl.srw.billcalculator.... | package pl.srw.billcalculator.bill;
@Singleton
public class SavedBillsRegistry {
private final SimpleArrayMap<String, Long> registry;
@Inject
SavedBillsRegistry() {
registry = new SimpleArrayMap<>();
}
public String register(Bill bill) {
Timber.d("register() called with: bil... | key = getKey(Provider.PGNIG, b.getReadingFrom(), b.getReadingTo(), 0, 0, Dates.toLocalDate(b.getDateFrom()), Dates.toLocalDate(b.getDateTo()), b.getPgnigPrices()); | 6 |
Condroidapp/android | Condroid/src/main/java/cz/quinix/condroid/ui/fragments/TimetableFragment.java | [
"public class SearchProvider {\r\n\r\n\tprivate static Map<String, SearchQueryBuilder> map;\r\n\r\n\tstatic {\r\n\t\tmap = new HashMap<String, SearchQueryBuilder>();\r\n\t}\r\n\r\n\tpublic static SearchQueryBuilder getSearchQueryBuilder(String tag) {\r\n\t\tif (!map.containsKey(tag)) {\r\n\t\t\tmap.put(tag, new Sea... | import java.util.List;
import cz.quinix.condroid.database.SearchProvider;
import cz.quinix.condroid.database.SearchQueryBuilder;
import cz.quinix.condroid.model.Annotation;
import cz.quinix.condroid.ui.adapters.EndlessAdapter;
import cz.quinix.condroid.ui.adapters.GroupedAdapter;
import cz.quinix.condroid.ui.adap... | package cz.quinix.condroid.ui.fragments;
public class TimetableFragment extends NewCondroidFragment {
private GroupedAdapter wrapped;
public static NewCondroidFragment newInstance() {
return new TimetableFragment();
}
@Override
protected EndlessAdapter createListViewAdapter() {
| final SearchQueryBuilder sb = SearchProvider.getSearchQueryBuilder(this.getClass().getName());
| 0 |
FedericoPecora/coordination_oru | src/main/java/se/oru/coordination/coordination_oru/tests/TestTrajectoryEnvelopeCoordinatorWithMotionPlanner3.java | [
"public class ConstantAccelerationForwardModel implements ForwardModel {\n\t\t\n\tprivate double maxAccel, maxVel;\n\tprivate double temporalResolution = -1;\n\tprivate int trackingPeriodInMillis = 0;\n\tprivate int controlPeriodInMillis = -1;\n\t\n\tpublic ConstantAccelerationForwardModel(double maxAccel, double m... | import java.io.File;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Comparator;
import java.util.Random;
import org.metacsp.multi.spatioTemporal.paths.Pose;
import org.metacsp.multi.spatioTemporal.paths.PoseSteering;
import org.metacsp.multi.spatioTemporal.paths.TrajectoryEnvelope;
import com.v... | package se.oru.coordination.coordination_oru.tests;
@DemoDescription(desc = "Coordination of 2 robots along wave-like paths obtained with the ReedsSheppCarPlanner in opposing directions.")
public class TestTrajectoryEnvelopeCoordinatorWithMotionPlanner3 {
public static void main(String[] args) throws Interrupted... | Missions.enqueueMission(new Mission(1, robot1path)); | 8 |
ni3po42/traction.mvc | traction/src/main/java/traction/mvc/implementations/ViewBindingFactory.java | [
"public class GenericViewBinding<V extends View>\nimplements IViewBinding\n{\n private final ViewBindingHelper<V> helper = new ViewBindingHelper<V>()\n {\n @Override\n public V getWidget() {\n return GenericViewBinding.this.getWidget();\n }\n };\n private WeakReference<V>... | import android.view.View;
import java.util.Hashtable;
import java.util.Map;
import traction.mvc.R;
import traction.mvc.implementations.ui.viewbinding.GenericViewBinding;
import traction.mvc.interfaces.IProxyViewBinding;
import traction.mvc.interfaces.IViewBinding;
import traction.mvc.observables.BindingInventory;
impor... | /* Copyright 2013 Tim Stratton
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... | public IViewBinding createSyntheticFor(final View view, String viewBindingType, BindingInventory inventory) | 3 |
snazy/ohc | ohc-core/src/main/java/org/caffinitas/ohc/chunked/OffHeapChunkedMap.java | [
"public interface CacheSerializer<T>\n{\n /**\n * Serialize the specified type into the specified {@code ByteBuffer} instance.\n *\n * @param value non-{@code null} object that needs to be serialized\n * @param buf {@code ByteBuffer} into which serialization needs to happen.\n */\n void ... | import java.nio.ByteBuffer;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import com.google.common.collect.AbstractIterator;
import com.google.common.primitives.Ints;
import org.caffinitas.ohc.CacheSerializer;
import org.caffinitas.ohc.OHCacheBuilder;
import org.caffinitas.ohc.Ti... | /*
* Copyright (C) 2014 Robert Stupp, Koeln, Germany, robert-stupp.de
*
* 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
*
... | private final Ticker ticker; | 2 |
stackify/stackify-api-java | src/main/java/com/stackify/api/common/log/LogTransportAgentSocket.java | [
"@AllArgsConstructor\n@NoArgsConstructor\n@Builder(builderClassName = \"Builder\", builderMethodName = \"newBuilder\", toBuilder = true)\n@Data\n@JsonInclude(JsonInclude.Include.NON_NULL)\n@JsonIgnoreProperties(ignoreUnknown = true)\npublic class LogMsgGroup {\n\n /**\n * Client device id\n */\n @Json... | import com.stackify.api.LogMsgGroup;
import com.stackify.api.common.ApiConfiguration;
import com.stackify.api.common.mask.Masker;
import com.stackify.api.common.proto.LogMsgGroupConverter;
import com.stackify.api.common.proto.StackifyProto;
import com.stackify.api.common.socket.HttpSocketClient;
import lombok.NonNull;
... | /*
* Copyright 2019 Stackify
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writ... | public void send(@NonNull final LogMsgGroup group) throws Exception { | 0 |
snooplsm/njtransit | scheduler/src/com/njtransit/StationListActivity.java | [
"public static interface OnJumpListener {\n\tvoid onJump(String c);\n}",
"public static interface OnStationListener {\n\tvoid onStationSelected(Station station);\n}",
"public class Station {\n\n\tprivate Integer id;\n\t\n\tprivate String name;\n\t\n\tprivate String alternateId;\n\t\n\tprivate String descriptive... | import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import com.njtransit.JumpDialog.OnJumpListener;
import com.njtransit.StationListView.OnStationListener;
import com.njtransit.domain.Station;
import com.njtransit.rail.R;
import co... | package com.njtransit;
/**
* List for display all the stations in a particular order.
*
* @author rgravener
*
*/
public class StationListActivity extends SchedulerActivity implements OnJumpListener {
private final Set<Character> stationLetters = new HashSet<Character>();
private StationListView stations;
... | setContentView(R.layout.station_list_home); | 3 |
mesosphere/mesos-rxjava | mesos-rxjava-test/src/test/java/com/mesosphere/mesos/rx/java/test/simulation/MesosServerSimulationScenariosTest.java | [
"public final class Async extends Verifier {\n\n @NotNull\n private final AtomicInteger counter;\n\n @NotNull\n private final ExecutorService executor;\n\n @NotNull\n private final List<Task> tasks;\n\n public Async() {\n counter = new AtomicInteger(0);\n executor = Executors.newC... | import com.mesosphere.mesos.rx.java.test.Async;
import com.mesosphere.mesos.rx.java.test.RecordIOUtils;
import com.mesosphere.mesos.rx.java.test.StringMessageCodec;
import com.mesosphere.mesos.rx.java.util.MessageCodec;
import io.netty.buffer.ByteBuf;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.rea... | final HttpClientRequest<ByteBuf> request = createRequest(uri, SUBSCRIBE);
final Observable<byte[]> observable = openStream(httpClient, request);
final TestSubscriber<byte[]> testSubscriber = new TestSubscriber<>();
final AwaitableEventSubscriberDecorator<byte[]> sub = new AwaitableEven... | final MessageCodec<String> receiveCodec = new MessageCodec<String>() { | 3 |
ilmila/J2EEScan | src/main/java/burp/j2ee/issues/impl/ApacheAxis.java | [
"public class HTTPMatcher {\n\n private static final Pattern SERVICES_PATTERN = Pattern.compile(\"services/(.*?)\\\\?wsdl\", Pattern.MULTILINE);\n\n private static final Pattern SERVLET_CLA_PATTERN = Pattern.compile(\"<servlet-class>(.*?)</servlet-class>\", Pattern.DOTALL | Pattern.MULTILINE);\n\n /**\n ... | import burp.CustomHttpRequestResponse;
import burp.HTTPMatcher;
import static burp.HTTPMatcher.URIMutator;
import static burp.HTTPMatcher.getMatches;
import burp.IBurpExtenderCallbacks;
import burp.IExtensionHelpers;
import burp.IHttpRequestResponse;
import burp.IRequestInfo;
import burp.IResponseInfo;
import burp.ISca... | // Test for happy axies
URL happyAxisUrlToTest = new URL(protocol, url.getHost(), url.getPort(), HAPPY_AXIS_PATH);
byte[] happyAxisTest = helpers.buildHttpRequest(happyAxisUrlToTest);
byte[] happyAxisResponse = callbacks.makeHttpRequest(url.getHost(),
... | List<String> wsNames = HTTPMatcher.getServicesFromAxis(respBody); | 0 |
ToroCraft/NemesisSystem | src/main/java/net/torocraft/nemesissystem/util/NemesisActions.java | [
"public class NemesisConfig {\n\n\tprivate static final String CATEGORY = \"NemesisSystem Settings\";\n\tprivate static Configuration config;\n\tprivate static final String[] DEFAULT_MOB_LIST = {\n\t\t\t\"minecraft:zombie\",\n\t\t\t\"minecraft:zombie_pigman\",\n\t\t\t\"minecraft:zombie_villager\",\n\t\t\t\"minecraf... | import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityEnderP... | package net.torocraft.nemesissystem.util;
public class NemesisActions {
public static void promote(World world, NemesisEntry nemesis) {
if (nemesis.getLevel() >= 10) {
return;
}
nemesis.setLevel(nemesis.getLevel() + 1);
NemesisUtil.enchantEquipment(nemesis);
if (shouldGainAdditionalTrait(nemesis)) {
... | MinecraftForge.EVENT_BUS.post(new DemotionEvent(nemesis, slayerName)); | 2 |
saveendhiman/XMPPSample_Studio | app/src/main/java/com/xmpp/chat/data/DataProvider.java | [
"@SuppressWarnings(\"serial\")\n@DatabaseTable\npublic class ChatItem implements Serializable {\n\t@DatabaseField\n\tpublic String groupID = \"-1\";\n\t// @DatabaseField\n\t// public String id;\n\t@DatabaseField\n\tpublic boolean isGroup = false;\n\t@DatabaseField(id = true)\n\tpublic String jid;\n\t@DatabaseField\... | import android.os.Environment;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.webkit.MimeTypeMap;
import com.j256.ormlite.stmt.QueryBuilder;
import com.xmpp.chat.dao.ChatItem;
import com.xmpp.chat.dao.ContactItem;
import com.xmpp.chat.dao.MessageItem;
import com.xmpp.chat.d... | package com.xmpp.chat.data;
public class DataProvider {
// Listeners
StanzaListener packetListener;
LastActivityManager lastActivityManager;
FileTransferListener fileListener;
ChatManagerListener chatListener;
RosterListener rosterListener;
// Data storage
List<ChatItem> chats = new ArrayList<ChatItem>... | HashMap<String, MessageItem> lastMessages = new HashMap<String, MessageItem>(); | 2 |
blinkfox/zealot | src/main/java/com/blinkfox/zealot/core/concrete/ImportHandler.java | [
"public final class BuildSource {\n\n /** xmlๆไปถๅฏนๅบ็ๅฝๅ็ฉบ้ด. */\n private String nameSpace;\n\n /** SQLๆผๆฅไฟกๆฏ. */\n private SqlInfo sqlInfo;\n\n /** XML่็น. */\n private Node node;\n\n /** ๅๆฐๅฏน่ฑกไธไธๆ๏ผไธ่ฌไธบBeanๆ่
Map. */\n private Object paramObj;\n\n /** ๆผๆฅSQL็ๆฎต็ๅ็ผ๏ผๅฆ:andใor็ญ. */\n private String pre... | import com.blinkfox.zealot.bean.BuildSource;
import com.blinkfox.zealot.bean.SqlInfo;
import com.blinkfox.zealot.consts.ZealotConst;
import com.blinkfox.zealot.core.IConditHandler;
import com.blinkfox.zealot.core.Zealot;
import com.blinkfox.zealot.helpers.ParseHelper;
import com.blinkfox.zealot.helpers.StringHelper;
im... | package com.blinkfox.zealot.core.concrete;
/**
* ๅผ็จimportๆ ็ญพๅฏนๅบ็ๅจๆsql็ๆๅค็ๅจ็ๅฎ็ฐ็ฑป.
* <p>ๅผ็จๆ ็ญพ็ไธป่ฆๅ
ๅฎน๏ผ`[import match="" namespace="" zealotid="" value="" /]`</p>
* @author blinkfox on 2017/8/15.
*/
public class ImportHandler implements IConditHandler {
/**
* ๆๅปบimportๆ ็ญพ็sqlInfoไฟกๆฏ.
* @param source ๆๅปบๆ้็่ตๆบๅฏน่ฑก
... | if (ParseHelper.isNotMatch(matchText, source.getParamObj())) { | 5 |
exoplatform/task | services/src/main/java/org/exoplatform/task/util/TaskUtil.java | [
"public interface StatusService {\n\n /**\n * Create initial statuses for given <code>project</code>.\n * <p>\n * The initial statuses can be configured via a system exo property <code>exo.tasks.default.status</code>.\n * If it's not configured, the default <code>{\"To Do\", \"In Progress\", \"Wa... | import java.text.*;
import java.util.*;
import java.util.stream.Collectors;
import org.exoplatform.portal.localization.LocaleContextInfoUtils;
import org.exoplatform.services.resources.LocaleContextInfo;
import org.exoplatform.services.resources.LocalePolicy;
import org.exoplatform.services.resources.ResourceBundleServ... | /*
* Copyright (C) 2003-2015 eXo Platform SAS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This progra... | public static TaskQuery buildTaskQuery(TaskQuery query, String keyword, | 5 |
marcocor/smaph | src/main/java/it/unipi/di/acube/smaph/linkback/IndividualLinkback.java | [
"public class QueryInformation {\n\tpublic boolean includeSourceNormalSearch;\n\tpublic boolean includeSourceWikiSearch;\n\tpublic boolean includeSourceSnippets;\n\tpublic Double webTotalNS;\n\tpublic List<String> allBoldsNS;\n\tpublic HashMap<Integer, Integer> idToRankNS;\n\tpublic List<Pair<String, Integer>> bold... | import it.unipi.di.acube.batframework.data.Annotation;
import it.unipi.di.acube.batframework.data.ScoredAnnotation;
import it.unipi.di.acube.batframework.data.Tag;
import it.unipi.di.acube.batframework.utils.Pair;
import it.unipi.di.acube.batframework.utils.WikipediaInterface;
import it.unipi.di.acube.smaph.QueryInform... | package it.unipi.di.acube.smaph.linkback;
public class IndividualLinkback implements LinkBack {
private AnnotationRegressor ar;
private FeatureNormalizer annFn;
private WikipediaInterface wikiApi;
private double edthreshold;
private WikipediaToFreebase w2f; | private EntityToAnchors e2a; | 3 |
NuVotifier/NuVotifier | common/src/test/java/com/vexsoftware/votifier/net/protocol/TestVotifierPlugin.java | [
"public class Vote {\n\n /**\n * The name of the vote service.\n */\n private String serviceName;\n\n /**\n * The username of the voter.\n */\n private String username;\n\n /**\n * The address of the voter.\n */\n private String address;\n\n /**\n * The date and time... | import com.vexsoftware.votifier.model.Vote;
import com.vexsoftware.votifier.net.VotifierSession;
import com.vexsoftware.votifier.platform.LoggingAdapter;
import com.vexsoftware.votifier.platform.VotifierPlugin;
import com.vexsoftware.votifier.platform.scheduler.VotifierScheduler;
import com.vexsoftware.votifier.util.Ke... | package com.vexsoftware.votifier.net.protocol;
public class TestVotifierPlugin implements VotifierPlugin {
private static final byte[] PUBLIC_KEY;
private static final byte[] PRIVATE_KEY;
static byte[] r(String u) throws Exception {
URL resourceUrl = TestVotifierPlugin.class.getResource(u);
... | public LoggingAdapter getPluginLogger() { | 2 |
tzaeschke/TinSpin | src/main/java/ch/ethz/globis/tinspin/TestRunner.java | [
"public enum IDX implements IndexHandle {\n\t//Our implementations\n\t//===================\n\t/** Naive array implementation, for verification only */\n\tARRAY(PointArray.class.getName(), RectangleArray.class.getName()),\n\t/** PH-Tree */\n\tPHC(PointPHC.class.getName(), RectanglePHC.class.getName()),\n\t/** PH-Tr... | import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Random;
import ch.ethz.globis.phtree.PhTreeHelper;
import ch.ethz.globis.tinspin.TestInstances.IDX;
import ch.ethz.globis.tinspin.TestInstances.TST;
import ch.ethz.globis.tinspin.data.AbstractTest;
import ch.ethz.glob... | S.statTqp2E = toNSPerOp(t1, t2, repeat);
S.statPSqp2 = opsPerSec(repeat, t1, t2);
S.statNqp2 = control;
}
S.statGcDiffPq = JmxTools.getDiff();
S.statGcTimePq = JmxTools.getTime();
}
private double[][] preparePointQuery(int repeat) {
int dims = S.cfgNDims;
double[][] qA;
if (!S.isRangeData) {
... | TestPerf.resetStats(); | 4 |
mokszr/ultimate-geojson | ugeojson-builder/src/main/java/org/ugeojson/builder/geometry/CommonGeometryBuilder.java | [
"public interface BuilderConstants {\n\n\tpublic static final String OPEN_BRACKET = \"[\";\n\tpublic static final String CLOSE_BRACKET = \"]\";\n\tpublic static final String OPEN_CURLY_BRACE = \"{\";\n\tpublic static final String CLOSE_CURLY_BRACE = \"}\";\n\t\n\tpublic static final String COMMA_SPACE = \", \";\n\t... | import java.util.HashMap;
import java.util.Map;
import org.ugeojson.builder.common.BuilderConstants;
import org.ugeojson.model.geometry.GeometryCollectionDto;
import org.ugeojson.model.geometry.GeometryDto;
import org.ugeojson.model.geometry.LineStringDto;
import org.ugeojson.model.geometry.MultiLineStringDto;
import o... | package org.ugeojson.builder.geometry;
/**
* Find suitable geometry builder
*
* @author moksuzer
*
*/
public final class CommonGeometryBuilder {
private static Map<Class<? extends GeometryDto>, GeometryBuilder<?>> builders = new HashMap<>();
static { | builders.put(PointDto.class, PointBuilder.getInstance()); | 7 |
GoogleCloudPlatform/grpc-gcp-java | end2end-test-examples/firestore/src/main/java/org/roguewave/grpc/apimethods/UpdateDocument.java | [
"public static final class FirestoreBlockingStub extends io.grpc.stub.AbstractStub<FirestoreBlockingStub> {\n private FirestoreBlockingStub(io.grpc.Channel channel) {\n super(channel);\n }\n\n private FirestoreBlockingStub(io.grpc.Channel channel,\n io.grpc.CallOptions callOptions) {\n super(channel, ... | import com.google.firestore.v1beta1.*;
import com.google.firestore.v1beta1.FirestoreGrpc.FirestoreBlockingStub;
import org.roguewave.grpc.util.GRPCFirebaseClientFactory;
import org.roguewave.grpc.util.gfx.DrawDocument;
import org.roguewave.grpc.util.gfx.MakeFieldsMap;
import org.roguewave.grpc.util.gfx.Menu;
import jav... | package org.roguewave.grpc.apimethods;
public class UpdateDocument {
public void updateDocumentCall() {
System.out.println("\n:: Updating a Document ::\n");
| FirestoreBlockingStub blockingStub = new GRPCFirebaseClientFactory().createFirebaseClient().getBlockingStub(); | 0 |
ProxyPrint/proxyprint-kitchen | src/test/java/controllers/RegisterRequestTests.java | [
"@Configuration\r\n@EnableAutoConfiguration\r\n@ComponentScan\r\n@EnableCaching\r\n@EnableSwagger2\r\n@EnableAsync\r\npublic class WebAppConfig extends SpringBootServletInitializer {\r\n\r\n private static final Class<WebAppConfig> APP_CLASS = WebAppConfig.class;\r\n \r\n @Override\r\n protected Spr... | import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import io.github.proxyprint.kitchen.WebAppConfig;
import io.github.proxyprint.kitchen.models.Admin;
import io.github.proxyprint.kitchen.models.printshops.Manager;
import io.gith... | package controllers;
@ActiveProfiles("test")
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(WebAppConfig.class)
@WebIntegrationTest
public class RegisterRequestTests {
@Autowired
private WebApplicationContext wac;
@Autowired
private FilterChainProxy springSecurityFilterChain;... | Admin admin = admins.save(new Admin("admin", "admin", "admin@mail.pt")); | 1 |
mruffalo/seal | src/IndelFrequencyEvaluation.java | [
"public class AlignmentResults\n{\n\tpublic AlignmentResults()\n\t{\n\t\tpositives = new TreeMap<Integer, Integer>();\n\t\tnegatives = new TreeMap<Integer, Integer>();\n\t}\n\n\t/**\n\t * Quality values of alignments that are at the correct location in the\n\t * genome\n\t */\n\tpublic Map<Integer, Integer> positiv... | import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import external.AlignmentResults;
import external.AlignmentToolService;
import external.AccuracyEvaluationProgram;
import generator.Fragmentizer;
import generator.SequenceGenerator;
import generator.errors.FragmentErrorGenerator;
import gene... |
public class IndelFrequencyEvaluation extends AccuracyEvaluationProgram
{
@Parameter(names = "--indel-frequencies")
/**
* This is a String because JCommander keeps wanting to <b>append</b> to a collection
* instead of replacing it with command line arguments.
*/
protected String indelFrequencies = "1e-5,3e-5... | AlignmentToolService ats = new AlignmentToolService(getToolNames()); | 1 |
webdriverextensions/webdriverextensions | src/main/java/com/github/webdriverextensions/WebDriverExtensionFieldDecorator.java | [
"public class WebDriverExtensionAnnotations extends Annotations {\n\n private Field field;\n\n public WebDriverExtensionAnnotations(Field field) {\n super(field);\n this.field = field;\n }\n\n boolean isSearchContextReset() {\n return field.getAnnotation(ResetSearchContext.class) !=... | import com.github.webdriverextensions.internal.WebDriverExtensionAnnotations;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
import com.github.webdriverextensions.internal.DefaultWebComponentFactory;
import com.github.webdriverextensions... | package com.github.webdriverextensions;
public class WebDriverExtensionFieldDecorator extends DefaultFieldDecorator {
private final WebDriver driver;
private final ObjectPool pool;
private final WebComponentFactory webComponentFactory;
private final WebComponentListFactory webComponentListFactory;
... | this.webComponentFactory = new DefaultWebComponentFactory(); | 1 |
NickstaDB/BaRMIe | src/nb/barmie/modes/attack/attacks/Axiom/WriteFile.java | [
"public abstract interface FileBrowserStub extends Remote {\n\tpublic abstract FileInformation[] listFilesOnServer(String paramString) throws RemoteException;\n\tpublic abstract byte[] readFile(String paramString, long paramLong, int paramInt) throws IOException;\n\tpublic abstract void writeFile(String paramString... | import axiomsl.server.rmi.FileBrowserStub;
import axiomsl.server.rmi.FileInformation;
import java.io.File;
import java.io.FileInputStream;
import nb.barmie.exceptions.BaRMIeAttackException;
import nb.barmie.exceptions.BaRMIeException;
import nb.barmie.exceptions.BaRMIeRemoteMethodCallException;
import nb.barmie.modes.a... | package nb.barmie.modes.attack.attacks.Axiom;
/***********************************************************
* Write a fie to a server running AxiomSL.
*
* Written by Nicky Bloor (@NickstaDB).
**********************************************************/
public class WriteFile extends RMIAttack {
/*****************... | FileBrowserStub fbs; | 0 |
PearsonEducation/StatsPoller | src/main/java/com/pearson/statspoller/internal_metric_collectors/linux/Connections/ConnectionsCollector.java | [
"public abstract class InternalCollectorFramework {\n \n private static final Logger logger = LoggerFactory.getLogger(InternalCollectorFramework.class.getName());\n \n protected final int NUM_FILE_WRITE_RETRIES = 3;\n protected final int DELAY_BETWEEN_WRITE_RETRIES_IN_MS = 100;\n \n private fin... | import com.pearson.statspoller.internal_metric_collectors.InternalCollectorFramework;
import com.pearson.statspoller.metric_formats.graphite.GraphiteMetric;
import com.pearson.statspoller.utilities.core_utils.StackTrace;
import com.pearson.statspoller.utilities.core_utils.Threads;
import com.pearson.statspoller.utiliti... | package com.pearson.statspoller.internal_metric_collectors.linux.Connections;
/**
* @author Jeffrey Schmidt
*
* Collects TCP & UDP connection count metrics
* Reads from /proc/net/sockstat & /proc/net/sockstat6
*/
public class ConnectionsCollector extends InternalCollectorFramework implements Runnable {
... | logger.error(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e)); | 2 |
leavjenn/Hews | app/src/main/java/com/leavjenn/hews/ui/adapter/CommentAdapter.java | [
"public final class Constants {\n public static final String KEY_POST_PARCEL = \"post\";\n public static final String KEY_IS_BOOKMARKED = \"is_bookmarked\";\n public static final String YCOMBINATOR_ITEM_URL = \"https://news.ycombinator.com/item?id=\";\n public static final String TYPE_SEARCH = \"search\... | import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.net.Uri;
import android.support.customtabs.CustomTabsIntent;
import android.support.v7.widget.LinearLayoutManager;
import android.support... | package com.leavjenn.hews.ui.adapter;
public class CommentAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private static final int VIEW_TYPE_HEADER = 0;
private static final int VIEW_TYPE_COMMENT = 1;
private static final int VIEW_TYPE_FOOTER = 2;
private int mLoadingState;
priv... | private ArrayList<HNItem> mItemList; | 6 |
xcltapestry/XCL-Charts | lib/src/main/java/org/xclcharts/renderer/AxesChart.java | [
"public interface IFormatterDoubleCallBack {\n\t\n\tpublic String doubleFormatter(Double value);\n\t\n\t\n}",
"public class CategoryAxis extends XYAxis {\n\t\n\t//ๅ็ฑป่ฝดๅ้ๅผ\t\n\tprivate double mAxisSteps = 0.0d;\n\t\n\tprivate boolean mAxisBindStd = false;\n\t\n\tpublic CategoryAxis()\n\t{\n\t\t\n\t}\n\t\n\t/**\n\t... | import org.xclcharts.renderer.plot.AxisTitle;
import org.xclcharts.renderer.plot.AxisTitleRender;
import android.graphics.Canvas;
import android.graphics.Paint.Align;
import android.util.Log;
import java.util.ArrayList;
import org.xclcharts.common.IFormatterDoubleCallBack;
import org.xclcharts.renderer.axis.CategoryAxi... | /**
* Copyright 2014 XCL-Charts
*
* 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... | private AxisTitleRender axisTitle = null; | 7 |
shilongdai/LSChatServer | src/main/java/net/viperfish/chatapplication/handlers/AssociateLookupHandler.java | [
"public final class JsonGenerator {\n\n protected ObjectMapper objectMapper;\n\n public JsonGenerator() {\n objectMapper = new ObjectMapper();\n objectMapper.configure(SerializationFeature.INDENT_OUTPUT, true);\n\n }\n\n public String toJson(Object o) throws JsonGenerationException, JsonMa... | import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.databind.JsonMappingException;
import net.vipe... | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package net.viperfish.chatapplication.handlers;
/**
*
* @author sdai
*/
public class AssociateLookupHandler extends ValidatedRe... | private final UserRegister register; | 6 |
calrissian/flowmix | src/main/java/org/calrissian/flowmix/core/storm/bolt/FlowInitializerBolt.java | [
"public class Flow implements Serializable{\n\n String id;\n String name;\n String description;\n\n Map<String,StreamDef> streams = new HashMap<String, StreamDef>();\n\n public String getId() {\n return id;\n }\n\n public String getName() {\n return name;\n }\n\n public Stri... | import static org.calrissian.flowmix.api.builder.FlowmixBuilder.fields;
import static org.calrissian.flowmix.core.Constants.FLOW_LOADER_STREAM;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import backtype.storm.task.OutputCollector;
import backtype.storm.task.TopologyContext;
import back... | /*
* Copyright (C) 2014 The Calrissian Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | FlowmixBuilder.declareOutputStreams(outputFieldsDeclarer, fields); | 1 |
Lambda-3/DiscourseSimplification | src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/RestrictiveRelativeClauseWhomExtractor.java | [
"public enum Relation {\n\n UNKNOWN,\n\n // Coordinations\n UNKNOWN_COORDINATION, // the default for coordination\n CONTRAST,\n CAUSE_C,\n RESULT_C,\n LIST,\n DISJUNCTION,\n TEMPORAL_AFTER_C,\n TEMPORAL_BEFORE_C,\n\n // Subordinations\n UNKNOWN_SUBORDINATION, // the default for s... | import org.lambda3.text.simplification.discourse.utils.parseTree.ParseTreeExtractionUtils;
import org.lambda3.text.simplification.discourse.utils.words.WordsUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import edu.stanford.nlp.ling.Word;
import edu.stanfor... | /*
* ==========================License-Start=============================
* DiscourseSimplification : SubordinationPostExtractor
*
* Copyright ยฉ 2017 Lambdaยณ
*
* GNU General Public License 3
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public Lic... | public Optional<Extraction> extract(Leaf leaf) throws ParseTreeException { | 1 |
Tristan971/EasyFXML | easyfxml/src/main/java/moe/tristan/easyfxml/FxUiManager.java | [
"public interface FxmlComponent {\n\n FxmlFile getFile();\n\n Class<? extends FxmlController> getControllerClass();\n\n}",
"public interface FxmlStylesheet {\n\n /**\n * @return the CSS file that composes the stylesheet as a {@link Path}. See {@link\n * Resources#getResourcePath(String)}\n */... | import moe.tristan.easyfxml.util.Stages;
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.util.Optional;
import java.util.function.Function;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import javafx.scene.Scene;
import jav... | /*
* Copyright 2017 - 2019 EasyFXML project and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unl... | .mapTry(stylesheetUri -> Stages.setStylesheet(mainStage, stylesheetUri)) | 4 |
projectbuendia/buendia | openmrs/omod/src/main/java/org/projectbuendia/openmrs/web/controller/DataHelper.java | [
"public class Intl implements Doc {\n private static final Pattern BRACKETED_PATTERN = Pattern.compile(\"\\\\[(.*?)\\\\]\");\n private static final Pattern EXTRA_SPACES = Pattern.compile(\"^ *| *$\");\n\n public final String base;\n public final Map<String, String> options;\n\n public Intl(String pac... | import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.Duration;
import org.joda.time.Instant;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.openmrs.BaseOpenmrsData;
import org.openmrs.BaseOpenmrsMetadata;
import org.openmrs.BaseOpe... | package org.projectbuendia.openmrs.web.controller;
public class DataHelper {
protected final ProjectBuendiaService buendiaService;
protected final ConceptService conceptService;
protected final EncounterService encounterService;
protected final FormService formService;
protected final LocationSe... | private static final String ADMISSION_DATETIME_UUID = Utils.toUuid(8001640); | 5 |
cmusatyalab/elijah-provisioning | android/android/src/edu/cmu/cs/cloudlet/android/test/BatchSynthesisTest.java | [
"public class CloudletActivity extends Activity {\n\tpublic static String CLOUDLET_SYNTHESIS_IP = \"cloudlet.krha.kr\";\n\tpublic static int CLOUDLET_SYNTHESIS_PORT = 8021;\n\n\tprivate static final int SYNTHESIS_MENU_ID_SETTINGS = 11123;\n\tprivate static final int SYNTHESIS_MENU_ID_CLEAR = 12311;\n\n\tprotected B... | import java.io.File;
import java.util.ArrayList;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.M... | package edu.cmu.cs.cloudlet.android.test;
public class BatchSynthesisTest extends Activity {
private static String ADDRESS = "128.2.210.197";
private static final int PORT = 8021;
private ArrayList<VMInfo> overlayVMList;
private CloudletConnector connector;
private ProgressDialog progDialog;
@Override
pub... | CloudletActivity.TEST_CLOUDLET_APP_MOPED_PORT); | 0 |
onepf/OPFPush | opfpush-providers/adm/src/main/java/org/onepf/opfpush/adm/ADMProvider.java | [
"public interface CheckManifestHandler {\n\n /**\n * Called when some check manifest error occurred.\n *\n * @param reportMessage The information about error.\n */\n void onCheckManifestError(@NonNull final String reportMessage);\n}",
"public final class AvailabilityResult {\n\n private b... | import android.content.Context;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import org.onepf.opfpush.listener.CheckManifestHandler;
import org.onepf.opfpush.model.AvailabilityResult;
import org.onepf.opfpush.notification.NotificationMaker;
import org.o... | /*
* Copyright 2012-2015 One Platform Foundation
*
* 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 ... | if (Build.MANUFACTURER.equals(AMAZON_MANUFACTURER)) { | 4 |
PowerBack/AnKey | AnKey/presenter/src/main/java/net/qiujuer/powerback/ankey/presenter/EditPresenter.java | [
"@Table(name = \"Info\")\npublic class InfoModel extends Model implements ModelStatus {\n\n @Column(name = \"InfoId\")\n private UUID infoId;\n\n @Column(name = \"Description\")\n private String description;\n\n @Column(name = \"Site\")\n public SiteModel site;\n\n @Column(name = \"Color\")\n ... | import android.text.TextUtils;
import net.qiujuer.genius.kit.util.Tools;
import net.qiujuer.genius.kit.util.UiKit;
import net.qiujuer.powerback.ankey.model.db.InfoModel;
import net.qiujuer.powerback.ankey.model.view.InfoDecryptModel;
import net.qiujuer.powerback.ankey.presenter.tool.InfoModelTool;
import net.qiujuer.po... | package net.qiujuer.powerback.ankey.presenter;
/**
* Created by qiujuer
*/
public class EditPresenter {
private EditView mView;
public EditPresenter(EditView view) {
mView = view;
}
public void load() {
mView.showLoading();
Thread thread = new Thread("AnKey-EditPresenter-L... | final InfoDecryptModel decryptModel = InfoModelTool.decryptModel(model); | 2 |
mengdd/TodoRealm | app/src/main/java/com/ddmeng/todorealm/home/HomeListFragment.java | [
"public class MainActivity extends AppCompatActivity {\n\n private TodoRepository todoRepository;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n showHomeList();\n\n todoReposi... | import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.vie... | package com.ddmeng.todorealm.home;
public class HomeListFragment extends Fragment implements HomeListContract.View, HomeListAdapter.HomeListCallback {
public static final String TAG = "HomeListFragment";
@BindView(R.id.toolbar)
Toolbar toolbar;
@BindView(R.id.home_list)
RecyclerView homeList;... | private MultiSelector multiSelector; | 6 |
idega/is.idega.idegaweb.msi | src/java/is/idega/idegaweb/msi/business/ConverterUtility.java | [
"public interface Race extends IDOEntity, Group {\n\t/**\n\t * @see is.idega.idegaweb.msi.data.RaceBMPBean#getRaceDate\n\t */\n\tpublic Timestamp getRaceDate();\n\n\t/**\n\t * @see is.idega.idegaweb.msi.data.RaceBMPBean#getLastRegistrationDate\n\t */\n\tpublic Timestamp getLastRegistrationDate();\n\n\t/**\n\t * @se... | import is.idega.idegaweb.msi.data.Race;
import is.idega.idegaweb.msi.data.RaceEvent;
import is.idega.idegaweb.msi.data.RaceEventHome;
import is.idega.idegaweb.msi.data.RaceHome;
import is.idega.idegaweb.msi.data.Season;
import is.idega.idegaweb.msi.data.SeasonHome;
import javax.ejb.FinderException;
import com.idega.dat... | /*
* $Id: ConverterUtility.java,v 1.1 2007/06/11 12:14:20 palli Exp $
* Created on May 22, 2005
*
* Copyright (C) 2005 Idega Software hf. All Rights Reserved.
*
* This software is the proprietary information of Idega hf.
* Use is subject to license terms.
*/
package is.idega.idegaweb.msi.business;
/**
* L... | RaceEventHome home = (RaceEventHome) IDOLookup.getHome(RaceEvent.class); | 2 |
hanks-zyh/HTextView | htextview-fall/src/main/java/com/hanks/htextview/fall/FallText.java | [
"public class CharacterDiffResult {\n public char c;\n public int fromIndex;\n public int moveIndex;\n}",
"public class CharacterUtils {\n\n public static List<CharacterDiffResult> diff(CharSequence oldText, CharSequence newText) {\n\n List<CharacterDiffResult> differentList = new ArrayList<>... | import android.animation.Animator;
import android.animation.ValueAnimator;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.anim... | package com.hanks.htextview.fall;
/**
* Created by hanks on 2017/3/16.
*/
public class FallText extends HText {
float mostCount = 20;
float charTime = 400;
OvershootInterpolator interpolator = new OvershootInterpolator(); | private List<CharacterDiffResult> differentList = new ArrayList<>(); | 0 |
geosolutions-it/geonetwork-manager | src/test/java/it/geosolutions/geonetwork/online/GeonetworkInsertTest.java | [
"public interface GNClient {\n\n boolean ping();\n\n long insertMetadata(GNInsertConfiguration cfg, File metadataFile) throws GNLibException, GNServerException;\n\n long insertRequest(File requestFile) throws GNLibException, GNServerException;\n\n void setPrivileges(long metadataId, GNPrivConfiguration ... | import org.junit.Test;
import it.geosolutions.geonetwork.GNClient;
import it.geosolutions.geonetwork.util.GNInsertConfiguration;
import it.geosolutions.geonetwork.util.GNPriv;
import it.geosolutions.geonetwork.util.GNPrivConfiguration;
import it.geosolutions.geonetwork.util.GNSearchRequest;
import static org.junit.Asse... | /*
* GeoNetwork-Manager - Simple Manager Library for GeoNetwork
*
* Copyright (C) 2007,2016 GeoSolutions S.A.S.
* http://www.geo-solutions.it
*
* 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 t... | pcfg.addPrivileges(GNPrivConfiguration.GROUP_GUEST, EnumSet.of(GNPriv.FEATURED)); | 2 |
vibe-project/vibe-java-platform | bridge-atmosphere2/src/main/java/org/atmosphere/vibe/platform/bridge/atmosphere2/VibeAtmosphereServlet.java | [
"public interface Action<T> {\n\n /**\n * Some action is taken.\n */\n void on(T object);\n\n}",
"public interface Actions<T> {\n\n /**\n * Adds an action.\n */\n Actions<T> add(Action<T> action);\n\n /**\n * Disables any operation on the actions. This method is useful when\n ... | import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import org.atmosphere.cpr.AtmosphereResource;
import org.atmosphere.cpr.AtmosphereResponse;
import org.atmosphere.cpr.AtmosphereServlet;
import org.atmosphere.handler.AtmosphereHandlerAdapter;
import org.atmosphere.vi... | /*
* Copyright 2014 The Vibe Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | private Actions<ServerHttpExchange> httpActions = new ConcurrentActions<>(); | 3 |
AChep/HeadsUp | project/app/src/main/java/com/achep/acdisplay/ui/activities/MainActivity.java | [
"public class App extends Application {\n\n private static final String TAG = \"App\";\n\n public static final int ID_NOTIFY_INIT = 30;\n public static final int ID_NOTIFY_TEST = 40;\n\n public static final String ACTION_ENABLE = \"com.achep.headsup.ENABLE\";\n public static final String ACTION_DISAB... | import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.BitmapF... | /*
* Copyright (C) 2014 AChep@xda <artemchep@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* Th... | DialogHelper.showCryDialog(this); | 2 |
confabulation/symbolic | java_sentence_completion/src/confabulation/ConfabulationStub.java | [
"public class GenericSymbolParser {\r\n\r\n\tprotected FileInputStream fis;\r\n\t// private BufferedInputStream bis;\r\n\t// private DataInputStream stream;\r\n\tprotected BufferedReader stream;\r\n\r\n\tString file;\r\n\tprotected Tokenizer tok;\r\n\t/**\r\n\t * whether the parser is at the beginning of the file\r... | import static java.util.Arrays.copyOfRange;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeSet;
import java.util.Vector;
import java.util.con... | // clean the groups with less than MIN_OCC occurrences
// start at two: keep all the single word symbols
for (int n_words = 2; n_words <= MAX_WORDS; n_words++) {
HashMap<List<String>, Integer> occ_count = occurrence_counts
.get(n_words);
Set<Entry<List<String>, Integer>> counts = new HashSet<Entry<List... | protected void learn(GenericSymbolParser parser, SymbolOrganizer org) | 1 |
Whiley/Jasm | src/main/java/jasm/attributes/StackMapTable.java | [
"public class BinaryOutputStream extends OutputStream {\t\r\n\tprotected OutputStream output;\r\n\tprotected int value;\r\n\tprotected int count;\r\n\t\r\n\t/**\r\n\t * Write out data in big-endian format.\r\n\t * @param output\r\n\t */\r\n\tpublic BinaryOutputStream(OutputStream output) {\t\t\r\n\t\tthis.output = ... | import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;
import java.util.Set;
import jasm.io.BinaryOutputStream;
import jasm.lang.BytecodeAttribute;
import jasm.lang.Constant;
import jasm.lang.JvmType;
import jasm.lang.Constant.Info; | // Copyright (c) 2011, David J. Pearce (djp@ecs.vuw.ac.nz)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice... | writer.write_u16(constantPool.get(new Constant.Utf8(name()))); | 2 |
simo415/spc | src/com/sijobe/spc/command/Teleport.java | [
"public enum FontColour {\n \n BLACK(\"\\2470\"),\n DARK_BLUE(\"\\2471\"),\n DARK_GREEN(\"\\2472\"),\n DARK_AQUA(\"\\2473\"),\n DARK_RED(\"\\2474\"),\n PURPLE(\"\\2475\"),\n ORANGE(\"\\2476\"),\n GREY(\"\\2477\"),\n DARK_GREY(\"\\2478\"),\n BLUE(\"\\2479\"),\n GREEN(\"\\247a\"),\n AQUA(\"\... | import com.sijobe.spc.util.FontColour;
import com.sijobe.spc.validation.Parameter;
import com.sijobe.spc.validation.ParameterDouble;
import com.sijobe.spc.validation.Parameters;
import com.sijobe.spc.wrapper.CommandException;
import com.sijobe.spc.wrapper.CommandSender;
import com.sijobe.spc.wrapper.Coordinate;
import ... | package com.sijobe.spc.command;
/**
* Allows you to teleport the player to the specified set of coordinates
*
* @author simo_415
* @version 1.0
*/
@Command (
name = "teleport",
description = "Teleports the player to the destination specified",
example = "0 66 0",
videoURL = "http://www.youtube.com/w... | Player player = super.getSenderAsPlayer(sender); | 7 |
SkaceKamen/sqflint | src/cz/zipek/sqflint/sqf/operators/ForEachOperator.java | [
"public class Linter extends SQFParser {\n\tpublic static final int CODE_OK = 0;\n\tpublic static final int CODE_ERR = 1;\n\t\n\tprivate final List<SQFParseException> errors = new ArrayList<>();\n\tprivate final List<Warning> warnings = new ArrayList<>();\n\t\n\tprivate final List<SQFInclude> includes = new ArrayLi... | import cz.zipek.sqflint.linter.Linter;
import cz.zipek.sqflint.linter.SQFParseException;
import cz.zipek.sqflint.sqf.SQFBlock;
import cz.zipek.sqflint.sqf.SQFContext;
import cz.zipek.sqflint.sqf.SQFExpression; | /*
* The MIT License
*
* Copyright 2016 Jan Zรญpek (jan at zipek.cz).
*
* 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
* t... | public void analyze(Linter source, SQFContext context, SQFExpression expression) { | 4 |
chms/jdotxt | src/com/chschmid/jdotxt/gui/JdotxtGUItest.java | [
"@SuppressWarnings(\"serial\")\r\npublic class JdotxtDateField extends JTextField {\r\n\tpublic final static String DEFAULT_DATE_STRING = \"----------\";\r\n\tpublic final static String NAV_PREV_ACTION = \"NAV_PREV_ACTION\";\r\n\tpublic final static String NAV_NEXT_ACTION = \"NAV_NEXT_ACTION\";\r\n\tprivate Color f... | import javax.swing.text.BadLocationException;
import com.chschmid.jdotxt.gui.controls.JdotxtDateField;
import com.chschmid.jdotxt.gui.controls.JdotxtImageButton;
import com.chschmid.jdotxt.gui.controls.JdotxtImageCheckBox;
import com.chschmid.jdotxt.gui.controls.JdotxtPriorityField;
import com.chschmid.jdotxt.gui.contr... | /**
* Copyright (C) 2013-2015 Christian M. Schmid
*
* This file is part of the jdotxt.
*
* jdotxt 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 late... | JdotxtImageCheckBox cb; | 2 |
CycloneAxe/phphub-android | app/src/main/java/org/estgroup/phphub/ui/presenter/RecommendedPresenter.java | [
"public class TopicEntity {\n protected List<Topic> data;\n\n public List<Topic> getData() {\n return data;\n }\n\n public void setData(List<Topic> data) {\n this.data = data;\n }\n\n public class ATopic {\n protected Topic data;\n\n public Topic getData() {\n ... | import android.os.Bundle;
import com.github.pwittchen.prefser.library.Prefser;
import org.estgroup.phphub.api.entity.TopicEntity;
import org.estgroup.phphub.api.entity.element.Topic;
import org.estgroup.phphub.common.base.BaseRxPresenter;
import org.estgroup.phphub.common.transformer.SchedulerTransformer;
import org.es... | package org.estgroup.phphub.ui.presenter;
public class RecommendedPresenter extends BaseRxPresenter<RecommendedFragment> {
private static final int REQUEST_ID = 1;
@Inject
TopicModel topicModel;
@Inject
TokenModel tokenModel;
@Inject
Prefser prefser;
protected int pageIndex = ... | .compose(new SchedulerTransformer<List<Topic>>()) | 3 |
thasmin/Podax | src/main/java/com/axelby/podax/ui/SearchFragment.java | [
"public class Constants {\n\tpublic static final int NOTIFICATION_UPDATE = 1;\n\tpublic static final int SUBSCRIPTION_UPDATE_ERROR = 2;\n\tpublic static final int NOTIFICATION_PLAYING = 3;\n\tpublic static final int NOTIFICATION_GPODDER_ERROR = 4;\n\tpublic static final int NOTIFICATION_DOWNLOAD_ERROR = 5;\n\n\t// ... | import android.app.Activity;
import android.app.SearchManager;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.SearchRecentSuggestions;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransacti... | package com.axelby.podax.ui;
public class SearchFragment extends ListFragment implements LoaderManager.LoaderCallbacks<Cursor> {
protected static final int OPTION_UNSUBSCRIBE = 4;
static final int OPTION_ADDTOQUEUE = 1;
static final int OPTION_REMOVEFROMQUEUE = 2;
static final int OPTION_PLAY = 3;
private stati... | SearchSuggestionProvider.AUTHORITY, SearchSuggestionProvider.MODE); | 4 |
common-workflow-language/cwlviewer | src/test/java/org/commonwl/view/workflow/WorkflowServiceTest.java | [
"@Service\npublic class CWLService {\n\n private final Logger logger = LoggerFactory.getLogger(this.getClass());\n private final IRIFactory iriFactory = IRIFactory.iriImplementation();\n\n // Autowired properties/services\n private final RDFService rdfService;\n private final CWLTool cwlTool;\n pr... | import org.commonwl.view.cwl.CWLService;
import org.commonwl.view.cwl.CWLToolRunner;
import org.commonwl.view.git.GitDetails;
import org.commonwl.view.git.GitSemaphore;
import org.commonwl.view.git.GitService;
import org.commonwl.view.graphviz.GraphVizService;
import org.commonwl.view.researchobject.ROBundleFactory;
im... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | GitService mockGitService = Mockito.mock(GitService.class); | 4 |
Lzw2016/fastdfs-java-client | src/main/java/org/cleverframe/fastdfs/client/DefaultStorageClient.java | [
"public interface CommandExecutor {\n\n /**\n * ๅจTracker Serverไธๆง่กๅฝไปค\n *\n * @param command Tracker Serverๅฝไปค\n * @param <T> ่ฟๅๆฐๆฎ็ฑปๅ\n * @return ่ฟๅๆฐๆฎ\n */\n <T> T execute(TrackerCommand<T> command);\n\n /**\n * ๅจStorage Serverไธๆง่กๅฝไปค\n *\n * @param address Storage Server... | import org.cleverframe.fastdfs.conn.CommandExecutor;
import org.cleverframe.fastdfs.constant.ErrorCodeConstants;
import org.cleverframe.fastdfs.exception.FastDfsServerException;
import org.cleverframe.fastdfs.model.*;
import org.cleverframe.fastdfs.protocol.storage.*;
import org.cleverframe.fastdfs.protocol.storage.cal... | package org.cleverframe.fastdfs.client;
/**
* ๅญๅจๆๅก(Storage)ๅฎขๆท็ซฏๆฅๅฃ ้ป่ฎคๅฎ็ฐ<br/>
* <b>ๆณจๆ: ๅฝๅ็ฑปๆๅฅฝไฝฟ็จๅไพ๏ผไธไธชๅบ็จๅช้่ฆไธไธชๅฎไพ</b>
* ไฝ่
๏ผLiZW <br/>
* ๅๅปบๆถ้ด๏ผ2016/11/21 16:25 <br/>
*/
public class DefaultStorageClient implements StorageClient {
/**
* ๆฅๅฟ
*/
private static final Logger logger = LoggerFactory.getLogger(D... | public <T> T downloadFile(String groupName, String path, DownloadCallback<T> callback) { | 3 |
alphagov/locate-api | locate-api-service/src/test/uk/gov/gds/locate/api/LocateApiServiceTest.java | [
"public class BearerTokenAuthProvider implements InjectableProvider<Auth, Parameter> {\n\n private final LocateApiConfiguration configuration;\n private final UsageDao usageDao;\n private final Authenticator<String, AuthorizationToken> authenticator;\n\n\n public BearerTokenAuthProvider(LocateApiConfigu... | import com.mongodb.MongoException;
import com.sun.jersey.api.core.ResourceConfig;
import com.yammer.dropwizard.config.Environment;
import com.yammer.dropwizard.config.FilterBuilder;
import com.yammer.dropwizard.json.ObjectMapperFactory;
import org.eclipse.jetty.servlets.CrossOriginFilter;
import org.junit.Before;
impor... | package uk.gov.gds.locate.api;
public class LocateApiServiceTest {
private LocateApiService locateApiService = new LocateApiService();
private Environment environment = mock(Environment.class);
private LocateApiConfiguration configuration = mock(LocateApiConfiguration.class);
private MongoConfigura... | verify(environment, times(1)).addProvider(isA(BearerTokenAuthProvider.class)); | 0 |
henryblue/TeaCup | app/src/main/java/com/app/teacup/MoviePlayActivity.java | [
"public class TvPlayRecyclerAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {\n\n private final Context mContext;\n private final List<TvItemInfo> mDatas;\n private OnItemClickListener mListener;\n\n public interface OnItemClickListener {\n void onItemClick(View view, int position);... | import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.suppo... | package com.app.teacup;
public class MoviePlayActivity extends BaseActivity {
private static final String TAG = "MoviePlayActivity";
private List<MoviePlayInfo> mMoreDatas; | private List<TvItemInfo> mTvListDatas; | 2 |
neva-dev/felix-search-webconsole-plugin | src/main/java/com/neva/felix/webconsole/plugins/search/core/provider/BundleSearchProvider.java | [
"public class SearchParams {\n\n\tprivate static final int RESULT_LIMIT_DEFAULT = 60;\n\n\tprivate static final boolean CACHED_DEFAULT = true;\n\n\tprivate final String phrase;\n\n\tprivate final int resultLimit;\n\n\tprivate final List<String> providers;\n\n\tprivate final boolean cached;\n\n\tpublic SearchParams(... | import com.neva.felix.webconsole.plugins.search.core.SearchParams;
import com.neva.felix.webconsole.plugins.search.core.SearchResult;
import com.neva.felix.webconsole.plugins.search.core.SearchUtils;
import com.neva.felix.webconsole.plugins.search.rest.BundleClassesServlet;
import com.neva.felix.webconsole.plugins.sear... | package com.neva.felix.webconsole.plugins.search.core.provider;
public class BundleSearchProvider extends AbstractSearchProvider {
public static final String LABEL = "Bundle";
private static final int RESULT_RANK = 350;
private static final Logger LOG = LoggerFactory.getLogger(BundleSearchProvider.class);
pu... | public List<SearchResult> search(SearchParams params) { | 0 |
PearsonEducation/StatsPoller | src/main/java/com/pearson/statspoller/internal_metric_collectors/linux/Uptime/UptimeCollector.java | [
"public abstract class InternalCollectorFramework {\n \n private static final Logger logger = LoggerFactory.getLogger(InternalCollectorFramework.class.getName());\n \n protected final int NUM_FILE_WRITE_RETRIES = 3;\n protected final int DELAY_BETWEEN_WRITE_RETRIES_IN_MS = 100;\n \n private fin... | import com.pearson.statspoller.internal_metric_collectors.InternalCollectorFramework;
import com.pearson.statspoller.metric_formats.graphite.GraphiteMetric;
import com.pearson.statspoller.utilities.core_utils.StackTrace;
import com.pearson.statspoller.utilities.core_utils.Threads;
import com.pearson.statspoller.utiliti... | package com.pearson.statspoller.internal_metric_collectors.linux.Uptime;
/**
* @author Jeffrey Schmidt
*/
public class UptimeCollector extends InternalCollectorFramework implements Runnable {
private static final Logger logger = LoggerFactory.getLogger(UptimeCollector.class.getName());
public Upti... | logger.error(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e)); | 2 |
GoogleCloudPlatform/healthcare-api-dicom-fuse | src/main/java/com/google/dicomwebfuse/dao/spec/SingleDicomStorePathBuilder.java | [
"public static final String DATASETS = \"/datasets/\";",
"public static final String DICOM_STORES = \"/dicomStores/\";",
"public static final String LOCATIONS = \"/locations/\";",
"public static final String PROJECTS = \"/projects/\";",
"public class DicomFuseException extends Exception {\n\n private int s... | import static com.google.dicomwebfuse.dao.Constants.DATASETS;
import static com.google.dicomwebfuse.dao.Constants.DICOM_STORES;
import static com.google.dicomwebfuse.dao.Constants.LOCATIONS;
import static com.google.dicomwebfuse.dao.Constants.PROJECTS;
import com.google.dicomwebfuse.exception.DicomFuseException; | // Copyright 2019 Google 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 agreed to in ... | return stage + PROJECTS + project + LOCATIONS + location + DATASETS + dataset + DICOM_STORES | 0 |
betroy/xifan | app/src/main/java/com/troy/xifan/adapter/ConversationListAdapter.java | [
"@Route({ Constants.Router.PROFILE, Constants.Router.SCHEME + Constants.Router.PROFILE })\npublic class ProfileActivity extends BaseActivity {\n public static final String BUNDLE_USER = \"user\";\n public static final String BUNDLE_USER_ID = \"userid\";\n private Bundle mUserBundle;\n\n @Override\n p... | import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.bumptech.glide.Glide;
import com.chenenyu.router.Router;
import com.... | package com.troy.xifan.adapter;
/**
* Created by chenlongfei on 2017/1/13.
*/
public class ConversationListAdapter extends RecyclerArrayAdapter<DirectMessagesListRes> {
private Context mContext;
public ConversationListAdapter(Context context) {
super(context);
mContext = context;
}
... | userBundle.putParcelable(ProfileActivity.BUNDLE_USER, | 0 |
mziccard/secureit | src/main/java/me/ziccard/secureit/service/UploadService.java | [
"public class MonitorActivity extends FragmentActivity {\n\t\n\tprivate SecureItPreferences preferences = null;\n\t\n\tprivate static final String[] CONTENT = new String[] { \"Accel.\", \"Camera\",\n\t\t\t\"Mic.\"};\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstan... | import me.ziccard.secureit.MonitorActivity;
import me.ziccard.secureit.R;
import me.ziccard.secureit.SecureItPreferences;
import me.ziccard.secureit.async.MicrophoneTaskFactory;
import me.ziccard.secureit.async.BluetoothServerTask;
import me.ziccard.secureit.async.MicrophoneTaskFactory.RecordLimitExceeded;
import me.zi... | /*
* Copyright (c) 2013-2015 Marco Ziccardi, Luca Bonato
* Licensed under the MIT license.
*/
package me.ziccard.secureit.service;
@SuppressLint("HandlerLeak")
public class UploadService extends Service {
/**
* Task used to upload position, is periodic, when we close the app
* we need to stop the service ... | } catch (RecordLimitExceeded e) { | 4 |
HopEdia/android-client | app/src/main/java/io/github/hopedia/fragments/BeerListFragment.java | [
"public class BaseActivity extends AppCompatActivity {\n\n\tprivate View inflated;\n\tprivate ViewStub stub;\n\tpublic AccountManager am;\n\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tam = new AccountManager(this);\n\t\tsetContentView(R.layout... | import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.BaseColumns;
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import... | package io.github.hopedia.fragments;
/** Hop Edia android client
Copyright (C) 2016 koko-ng <koko.fr.mu@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the Li... | private BeerCardAdapter adapter; | 1 |
adelnoureddine/jalen | trunk/src/main/java/jalen/Agent.java | [
"public class CPUFormulaDVFS implements CPUFormulasInterface {\n\n\t/**\n\t * Thermal Design Power of the CPU (given by constructors)\n\t */\n\tprivate double TDP;\n\n\t/**\n\t * TDP factor for CMOS formula\n\t * By default, it is at 0.7\n\t */\n\tprivate double TDPFactor = 0.7;\n\n\t/**\n\t * The CPU sensor used t... | import jalen.formulas.cpu.CPUFormulaDVFS;
import jalen.formulas.cpu.CPUFormulasInterface;
import jalen.formulas.disk.DiskFormulasInterface;
import jalen.formulas.disk.DiskFormulasProc;
import jalen.sensors.cpu.CPUSensorDVFS;
import jalen.sensors.cpu.CPUSensorsInterface;
import jalen.sensors.disk.DiskSensorProc;
import ... | /*
* Copyright (c) 2014, Inria, University Lille 1.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Affero General Public License v3.0
* which accompanies this distribution, and is available at
* https://www.gnu.org/licenses/agpl-3.0.html
*
* Aut... | Agent.cpuSensor = new CPUSensorDVFS(appPid, frequenciesMap); | 4 |
axxepta/project-argon | src/main/java/de/axxepta/oxygen/tree/ArgonPopupMenu.java | [
"public class ClassFactory {\r\n\r\n private static final Logger logger = LogManager.getLogger(ClassFactory.class);\r\n private static final ClassFactory ourInstance = new ClassFactory();\r\n\r\n public static ClassFactory getInstance() {\r\n return ourInstance;\r\n }\r\n\r\n private ClassFact... | import de.axxepta.oxygen.actions.*;
import de.axxepta.oxygen.core.ClassFactory;
import de.axxepta.oxygen.customprotocol.CustomProtocolURLHandlerExtension;
import de.axxepta.oxygen.utils.ImageUtils;
import de.axxepta.oxygen.utils.Lang;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
i... | package de.axxepta.oxygen.tree;
/**
* PopupMenu class which holds extra ArrayLists for MenuItems and their names, providing access methods
* for enabling the items via name keys.
*/
//@SuppressWarnings("all") // CAVE: keep access modifiers public because class is subject to modification by AspectJ
public class ... | final Action open = new OpenFileAction(Lang.get(cm_open), getIcon(ImageUtils.BASEX_LOCKED), tListener); | 2 |
hai-nguyen/Impala | impala/src/test/java/hainguyen/impala/UserDetailsPresenterShould.java | [
"public class ApplicationBus {\n\n private boolean login;\n\n public boolean isLogin() {\n return login;\n }\n\n public void setLogin(boolean login) {\n this.login = login;\n }\n}",
"public class UserDetailsPresenterImpl implements UserDetailsPresenter {\n\n UserDetailsView details... | import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import hainguyen.impala.application.ApplicationBus;
import hainguyen.impala.feature.userdetails.presenter.UserDetailsPresenterImpl;
import hainguyen.impala.feature.userdetails.view.UserDetailsView;
import hainguyen.impala.model.User;
import hai... | package hainguyen.impala;
public class UserDetailsPresenterShould {
ApplicationBus bus = mock(ApplicationBus.class);
LoginResponse response = LoginResponse.create(1, "TestName", "", "", "", "");
User user = new User().transformFrom(response);
UserDetailsPresenterImpl userDetailsPresenter = new Use... | UserDetailsView view = mock(UserDetailsView.class); | 2 |
dperezcabrera/jpoker | src/main/java/org/poker/sample/strategies/SlowlyStrategy.java | [
"@NotThreadSafe\npublic class BetCommand {\n\n private final BetCommandType type;\n private long chips;\n\n public BetCommand(BetCommandType type) {\n this(type, 0);\n }\n\n public BetCommand(BetCommandType type, long chips) {\n ExceptionUtil.checkNullArgument(type, \"type\");\n ... | import org.poker.api.game.BetCommand;
import org.poker.api.game.GameInfo;
import org.poker.api.game.IStrategy;
import org.poker.api.game.PlayerInfo;
import org.poker.api.game.TexasHoldEmUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory; | /*
* Copyright (C) 2016 David Pรฉrez Cabrera <dperezcabrera@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ve... | public BetCommand getCommand(GameInfo<PlayerInfo> state) { | 1 |
gamblore/AndroidPunk | sample/AndroidPunkTripZone/src/com/gamblore/tripzone/objects/Player.java | [
"public class FP {\n\n\tprivate static final String TAG = \"FP\";\n\t\n /**\n * The FlashPunk major version.\n */\n public static final String VERSION = \"1.6\";\n \n /**\n * The default Typeface to use.\n */\n public static Typeface typeface = Typeface.DEFAULT;\n \n /**\n *... | import net.androidpunk.FP;
import net.androidpunk.graphics.atlas.AtlasGraphic;
import net.androidpunk.graphics.atlas.SpriteMap;
import net.androidpunk.utils.Input;
import android.graphics.Color;
import android.graphics.Point;
import com.gamblore.tripzone.Main;
import com.gamblore.tripzone.OgmoEditorWorld;
| package com.gamblore.tripzone.objects;
public abstract class Player extends Physics {
public static final String TYPE_PLAYER = "Player";
public static boolean INPUT_LEFT = false;
public static boolean INPUT_RIGHT = false;
public static boolean INPUT_JUMP = false;
public static boolean LAST_INPU... | Main.player = this;
| 4 |
PowerBack/AnKey | AnKey/app/src/main/java/net/qiujuer/powerback/ankey/ui/adapter/InfoListAdapter.java | [
"public class InfoViewModel {\n private UUID id;\n private String description;\n private int color;\n private long lastDate;\n\n public InfoViewModel() {\n\n }\n\n public InfoViewModel(InfoModel model) {\n this.id = model.getInfoId();\n this.lastDate = model.getLastDate();\n }\... | import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import net.qiujuer.powerback.ankey.R;
import net.qiujuer.powerback.ankey.model.view.InfoViewModel;
import net.qiujuer.powerback.ankey.presenter.InfoListPresenter;
import net.qiujue... | package net.qiujuer.powerback.ankey.ui.adapter;
/**
* Created by qiujuer
* on 15/10/29.
*/
public class InfoListAdapter extends RecyclerView.Adapter<InfoHolder> implements InfoListView {
private InfoListPresenter mPresenter;
private InfoListAdapterCallback mCallback; | private List<InfoViewModel> mDataSet; | 0 |
concentricsky/android-viewer-for-khan-academy | src/com/concentricsky/android/khanacademy/app/CaptionFragment.java | [
"public class KADataService extends Service {\n \n\tpublic final String LOG_TAG = getClass().getSimpleName();\n\t\n\tpublic static final int RESULT_SUCCESS = 0;\n\tpublic static final int RESULT_ERROR = 1;\n\tpublic static final int RESULT_CANCELLED = 2;\n\t\n\tprivate KADataBinder mBinder = new KADataBinder(thi... | import static com.concentricsky.android.khanacademy.Constants.PARAM_VIDEO_ID;
import static com.concentricsky.android.khanacademy.Constants.PARAM_VIDEO_POSITION;
import java.sql.SQLException;
import java.util.List;
import android.app.Fragment;
import android.graphics.Color;
import android.os.AsyncTask;
import android.o... | /*
Viewer for Khan Academy
Copyright (C) 2012 Concentric Sky, Inc.
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... | private List<Caption> captions; | 1 |
kbase/kb_sdk | src/java/us/kbase/mobu/ModuleBuilder.java | [
"public class RunCompileCommand {\n\n public static void generate(File specFile, String url, boolean jsClientSide, \n String jsClientName, boolean perlClientSide, String perlClientName, \n boolean perlServerSide, String perlServerName, String perlImplName, \n String perlPsgiName,... | import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properti... | Map<String,Object> kbaseYmlConfig = (Map<String, Object>)new Yaml().load(kbaseYml);
semanticVersion = (String)kbaseYmlConfig.get("module-version");
}
} catch (Exception ex) {
System.out.println("WARNING! Couldn't collect semantic version: " + ex.getMessage... | return new ModuleRenamer().rename(renameArgs.newModuleName.get(0)); | 3 |
BlochsTech/BitcoinCardTerminal | src/com/blochstech/bitcoincardterminal/ViewModel/SettingsPageVM.java | [
"public class AppSettings {\n\tpublic static final double DUST_LIMIT = 0.00005460;\n\tpublic static final double MIN_FEE_BITCOINS = 0.0001;\n}",
"public class Model implements IModel{\n\t//Singleton pattern:\n\tprivate static Model instance = null;\n\tpublic static Model Instance()\n\t{\n\t\tif(instance == null)\... | import com.blochstech.bitcoincardterminal.Model.AppSettings;
import com.blochstech.bitcoincardterminal.Model.Model;
import com.blochstech.bitcoincardterminal.Model.Communication.CurrencyApiConnector;
import com.blochstech.bitcoincardterminal.Model.Communication.TypeConverter;
import com.blochstech.bitcoincardterminal.U... | package com.blochstech.bitcoincardterminal.ViewModel;
//VM class, holds state of a 1-1 corresponding view class.
//Is stored in PageManager.
//VMs should handle input and expose update events to the View. VMs can also call the model layer or utils.
public class SettingsPageVM {
private EventListener<Object> modelLi... | MessageManager.Instance().AddMessage(ex.toString(), true); | 7 |
txusballesteros/Android-Clean-Testing | app/src/test/java/com/txusballesteros/testing/data/DashboardRepositoryUnitTest.java | [
"@RunWith(JUnit4.class)\n@SmallTest\npublic abstract class UnitTest {\n @Before\n public final void setup() {\n initializeMocks();\n onSetup();\n }\n\n private void initializeMocks() {\n MockitoAnnotations.initMocks(this);\n }\n\n protected abstract void onSetup();\n}",
"pub... | import com.txusballesteros.testing.domain.repository.DashboardRepository;
import org.junit.Test;
import org.mockito.Mock;
import java.util.List;
import static org.mockito.Matchers.anyListOf;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
imp... | /*
* Copyright Txus Ballesteros 2016 (@txusballesteros)
*
* This file is part of some open source application.
*
* 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 copyrig... | @Mock List<ImageEntity> entitiesListMock; | 3 |
sregg/spotify-tv | app/src/main/java/com/sregg/android/tv/spotifyPlayer/views/SpotifyCardView.java | [
"public class AbsPlayingEvent {\n private final ContentState mContentState;\n\n public AbsPlayingEvent(ContentState contentState) {\n mContentState = contentState;\n }\n\n public ContentState getPlayingState() {\n return mContentState;\n }\n}",
"public class ContentState {\n privat... | import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.support.annotation.ColorInt;
import android.support.v17.leanback.widget.BaseCardView;
import android.support.v4.content.ContextCompat;
import android.util.AttributeSet;
import android.view.Co... | package com.sregg.android.tv.spotifyPlayer.views;
public class SpotifyCardView extends BaseCardView {
private FrameLayout mMainContainer;
private ImageView mImageView;
private NowPlayingIndicatorView mNowPlayingView;
private FrameLayout mNowPlayingContainer;
private Integer mSelectedInfoAreaBa... | public void onPause(OnPause onPause) { | 2 |
hceylan/guava | guava/src/com/google/common/net/MediaType.java | [
"public static final CharMatcher ASCII = inRange('\\0', '\\u007f')\n .withToString(\"CharMatcher.ASCII\");",
"public static final CharMatcher JAVA_ISO_CONTROL =\n inRange('\\u0000', '\\u001f').or(inRange('\\u007f', '\\u009f'))\n .withToString(\"CharMatcher.JAVA_ISO_CONTROL\");",
"public static final Ch... | import static com.google.common.base.CharMatcher.ASCII;
import static com.google.common.base.CharMatcher.JAVA_ISO_CONTROL;
import static com.google.common.base.Charsets.UTF_8;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static... | /*
* Copyright (C) 2011 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | return Optional.of(Charset.forName(Iterables.getOnlyElement(charsetValues))); | 7 |
mozilla-metrics/bagheera | src/main/java/com/mozilla/bagheera/consumer/KafkaReplayConsumer.java | [
"public abstract class App {\n private static boolean healthChecksInitialized = false;\n\n public static synchronized void prepareHealthChecks() {\n if (healthChecksInitialized) {\n return;\n }\n HealthChecks.register(new DeadlockHealthCheck());\n healthChecksInitialized... | import com.mozilla.bagheera.sink.ReplaySink;
import com.mozilla.bagheera.sink.SinkConfiguration;
import com.mozilla.bagheera.util.ShutdownHook;
import com.mozilla.bagheera.metrics.MetricsManager;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.Gn... | /*
* Copyright 2013 Mozilla Foundation
*
* 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 Licen... | options.addOption(optFactory.create("d", "dest", true, "Destination host / url pattern (include '" + ReplaySink.KEY_PLACEHOLDER + "' for key placeholder)").required()); | 3 |
52North/SensorPlanningService | 52n-sps-api/src/main/java/org/n52/sps/tasking/TaskingRequest.java | [
"public interface SweEncoderDecoder<T, E> {\r\n\r\n public static class Factory {\r\n\r\n public static TextEncoderDecoder createTextEncoderDecoder(AbstractEncodingType encoding) {\r\n// XmlHelper.qualifyWith(TextEncodingDocument.type, encoding); TODO check this qualifying principle and add tes... | import net.opengis.sps.x20.TaskingRequestDocument;
import net.opengis.sps.x20.TaskingRequestType;
import net.opengis.swe.x20.AbstractEncodingType;
import org.apache.xmlbeans.XmlObject;
import org.n52.oxf.swes.request.ExtensibleRequest;
import org.n52.sps.util.encoding.SweEncoderDecoder;
import org.n52.sps.util.en... | /**
* ๏ปฟ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.
*
... | return SweEncoderDecoder.Factory.createTextEncoderDecoder(encoding);
| 0 |
cgrotz/kademlia | src/main/java/de/cgrotz/kademlia/client/KademliaClient.java | [
"@Data\n@Builder\npublic class Configuration {\n\n private final Key nodeId;\n\n private final long getTimeoutMs;\n private final long networkTimeoutMs;\n private final int kValue;\n\n @Singular\n private final List<Listener> listeners;\n @Singular\n private final List<Listener> advertisedLi... | import de.cgrotz.kademlia.Configuration;
import de.cgrotz.kademlia.config.ListenerType;
import de.cgrotz.kademlia.config.UdpListener;
import de.cgrotz.kademlia.exception.NoMatchingListener;
import de.cgrotz.kademlia.exception.KademliaTimeoutException;
import de.cgrotz.kademlia.node.Key;
import de.cgrotz.kademlia.node.N... | package de.cgrotz.kademlia.client;
/**
* Created by Christoph on 21.09.2016.
*/
public class KademliaClient {
private final Logger LOGGER;
private static SecureRandom random = new SecureRandom();
private final KademliaClientHandler kademliaClientHandler;
private final Configuration config;
p... | private void send(Node node, long seqId, Message msg, Consumer<Message> consumer) throws KademliaTimeoutException, NoMatchingListener { | 4 |
rhmoller/embrace | webapis/src/main/java/com/giddyplanet/embrace/webapis/internal/Generator.java | [
"public class WebIdlToJava {\n\n public interface Options {\n @Option(description = \"HTML (.html) files containing WebIDL fragments or WebIDL (.idl) files\", defaultToNull = true)\n List<File> getIdlFiles();\n\n @Option(description = \"Folder containing the .idl files to convert\", defaultT... | import com.giddyplanet.embrace.tools.WebIdlToJava;
import com.giddyplanet.embrace.tools.javawriter.JavaWriter;
import com.giddyplanet.embrace.tools.model.java.JClass;
import com.giddyplanet.embrace.tools.model.java.JavaModel;
import com.giddyplanet.embrace.tools.model.webidl.Definition;
import com.giddyplanet.embrace.t... | package com.giddyplanet.embrace.webapis.internal;
public class Generator {
public static void main(String[] args) throws IOException, KeyManagementException, NoSuchAlgorithmException {
Trust.trustAllCertificates();
ModelBuildingListener listener = new ModelBuildingListener();
File folde... | for (JClass definition : javaModel.getTypes().values()) { | 2 |
galan/verjson | src/test/java/de/galan/verjson/core/ProxyStepComparatorTest.java | [
"public class DummyTransformation extends Transformation {\n\n\t@Override\n\tprotected void transform(JsonNode node) {\n\t\t//nada\n\t}\n\n}",
"public class DummyValidation extends Validation {\n\n\tpublic DummyValidation(String schema, String description) {\n\t\tsuper(schema, description);\n\t}\n\n\n\tpublic Dum... | import static org.assertj.core.api.Assertions.*;
import java.util.Collections;
import java.util.List;
import org.assertj.core.util.Lists;
import org.junit.Before;
import org.junit.Test;
import de.galan.commons.test.AbstractTestParent;
import de.galan.verjson.DummyTransformation;
import de.galan.verjson.DummyValidation;... | package de.galan.verjson.core;
/**
* CUT ProxyStepComparator
*
* @author daniel
*/
public class ProxyStepComparatorTest extends AbstractTestParent {
ProxyStepComparator psc;
Validation validation;
Transformation transformation;
OtherStep other;
@Before
public void before() {
psc = new ProxyStepCom... | public void assertCompare(Long sourceVersion1, Step s1, Long sourceVersion2, Step s2, int expected) { | 3 |
artiomchi/Dual-Battery-Widget | src/org/flexlabs/widgets/dualbattery/app/BatteryHistoryActivity.java | [
"public class GraphicalView extends View {\n /** The chart to be drawn. */\n private AbstractChart mChart;\n /** The chart renderer. */\n private DefaultRenderer mRenderer;\n /** The view bounds. */\n private Rect mRect = new Rect();\n /** The user interface thread handler. */\n private Handler mHandler;\n ... | import android.content.Intent;
import android.database.Cursor;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.actionbarsherlock.ap... | /*
* Copyright 2012 Artiom Chilaru (http://flexlabs.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer(); | 2 |
shillner/unleash-maven-plugin | plugin/src/main/java/com/itemis/maven/plugins/unleash/util/scm/ScmPomVersionsMergeClient.java | [
"public class ScmException extends RuntimeException {\n private static final long serialVersionUID = -8864350557327681422L;\n\n private ScmOperation operation;\n\n public ScmException(String message) {\n this(ScmOperation.UNKNOWN, message);\n }\n\n public ScmException(ScmOperation operation, String message)... | import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.w3c.dom.Document;
import com.google.common.base.Objects;
import com.google.common.base.Optional... | package com.itemis.maven.plugins.unleash.util.scm;
/**
* An implementation of the {@link MergeClient} used while committing changes during the release process.<br>
* This merge client is only able to merge versions and parent versions if conflicting POM files. This is sufficient at
* this point as in the release... | throw new ScmException(ScmOperation.MERGE, "Unable to merge non-POM changes."); | 1 |
OleksandrKucherenko/binding-tc | binder/src/main/java/com/artfulbits/binding/toolbox/Views.java | [
"@SuppressWarnings(\"unused\")\npublic class Selector<I, V> implements Notifications {\n /* ============================================================================================================== */\n\n /** Instance of the class which we use as source/destination of data. */\n private final I mInstance;\n... | import android.app.Activity;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.wi... | package com.artfulbits.binding.toolbox;
/** Methods for simplifying access to different types of UI controls/View's. */
@SuppressWarnings({"unused", "unchecked"})
public final class Views {
/* [ VIEW SELECTOR ] ============================================================================================ */
/** ... | final Property<Integer> property = integer("getCheckedRadioButtonId", Property.NO_NAME); | 4 |
xspec/xspec-maven-plugin-1 | src/main/java/io/xspec/maven/xspecMavenPlugin/utils/XmlStuff.java | [
"public class Resolver implements javax.xml.transform.URIResolver, EntityResolver {\n private final URIResolver saxonResolver;\n private final Log log;\n org.xmlresolver.Resolver cr;\n private static final boolean LOG_ENABLE = false;\n private final Pattern protocolPattern;\n\n /**\n * Creates... | import io.xspec.maven.xspecMavenPlugin.resolver.Resolver;
import io.xspec.maven.xspecMavenPlugin.resources.SchematronImplResources;
import io.xspec.maven.xspecMavenPlugin.resources.XSpecImplResources;
import io.xspec.maven.xspecMavenPlugin.resources.XSpecPluginResources;
import net.sf.saxon.lib.ExtensionFunctionDefinit... | /**
* Copyright ยฉ 2017, Christophe Marchand
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list ... | private final SchematronImplResources schematronResources; | 1 |
ferstl/pedantic-pom-enforcers | src/main/java/com/github/ferstl/maven/pomenforcers/PedanticPluginManagementLocationEnforcer.java | [
"public class ArtifactModel {\r\n\r\n private static final Joiner TO_STRING_JOINER = Joiner.on(\":\").useForNull(\"\");\r\n private static final String WILDCARD = \"*\";\r\n private static final char WILDCARD_CHAR = WILDCARD.charAt(0);\r\n\r\n @XmlElement(namespace = \"http://maven.apache.org/POM/4.0.0\")\r\n ... | import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import org.apache.maven.project.MavenProject;
import com.github.ferstl.maven.pomenforcers.model.ArtifactModel;
import com.github.ferstl.maven.pomenforcers.model.functions.StringToArtifactTransformer;
import com.github.ferstl.maven.pomenforcer... | /*
* Copyright (c) 2012 - 2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | CommaSeparatorUtils.splitAndAddToCollection(pluginManagingPoms, this.pluginManagingPoms, StringToArtifactTransformer::toArtifactModel); | 2 |
aredee/accumulo-mesos | accumulo-mesos-common/src/main/java/aredee/mesos/frameworks/accumulo/initialize/AccumuloInitializer.java | [
"public final class Constants {\n\n // bundler used for items defined by Maven\n private static final ResourceBundle rb = ResourceBundle.getBundle(\"accumulo-mesos\");\n public static final String FRAMEWORK_VERSION = rb.getString(\"application.version\");\n public static final String EXE_NAME = rb.getSt... | import aredee.mesos.frameworks.accumulo.configuration.Constants;
import aredee.mesos.frameworks.accumulo.configuration.Environment;
import aredee.mesos.frameworks.accumulo.model.Accumulo;
import aredee.mesos.frameworks.accumulo.model.ServerProfile;
import aredee.mesos.frameworks.accumulo.process.AccumuloProcessFactory;... | package aredee.mesos.frameworks.accumulo.initialize;
public class AccumuloInitializer {
private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloInitializer.class);
private Accumulo config;
private String accumuloHome;
public AccumuloInitializer(Accumulo config) {
this.confi... | this.accumuloHome = Environment.get(Environment.ACCUMULO_HOME); | 1 |
geoparser/geolocator-2.0 | geo-locator/src/edu/cmu/test/GeocoderTrainingGen/TweetGen.java | [
"public class GlobalParam {\n \n public static String gazIndex=\"GazIndex\";\n public static String geoNames=\"GeoNames\";\n public static String getGazIndex() {\n return gazIndex;\n }\n public static void setGazIndex(String gazIndex) {\n GlobalParam.gazIndex = gazIndex;\n return;\n }\n public stat... | import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;
import twitter4j.GeoLocation;
import twitter4j.Status;
import twitter4j.TwitterException;
import twitte... | package edu.cmu.test.GeocoderTrainingGen;
public class TweetGen {
public static String norm(String text) {
return text.replace("\n", " ").replace("\r", "").replace("\t", " ");
}
public static void main(String argv[]) throws FileNotFoundException, UnsupportedEncodingException {
GlobalParam.setGazIndex... | br = GetReader.getUTF8FileReader(path+"coord/"+fileEntry.getName()); | 1 |
reines/httptunnel | src/test/java/com/yammer/httptunnel/client/HttpTunnelClientPollHandlerTest.java | [
"public class FakeChannelSink extends AbstractChannelSink {\n\n\tpublic final Queue<ChannelEvent> events;\n\n\tpublic FakeChannelSink() {\n\t\tevents = new LinkedList<ChannelEvent>();\n\t}\n\n\t@Override\n\tpublic void eventSunk(ChannelPipeline pipeline, ChannelEvent e) throws Exception {\n\t\tevents.add(e);\n\t}\n... | import org.junit.Test;
import com.yammer.httptunnel.FakeChannelSink;
import com.yammer.httptunnel.FakeSocketChannel;
import com.yammer.httptunnel.client.HttpTunnelClientChannelPollHandler;
import com.yammer.httptunnel.util.HttpTunnelMessageUtils;
import com.yammer.httptunnel.util.NettyTestUtils;
import static org.junit... | /*
* Copyright 2009 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ... | .createRecvDataResponse(NettyTestUtils.createData(1234L)); | 4 |
indeedeng/lsmtree | recordcache/src/main/java/com/indeed/lsmtree/recordcache/tools/OperationLogCat.java | [
"public final class Checkpoint implements Operation {\n\n private final long timestamp;\n\n public Checkpoint(final long timestamp) {\n this.timestamp = timestamp;\n }\n\n public long getTimestamp() {\n return timestamp;\n }\n}",
"public final class Delete<K> implements Operation {\n\... | import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.indeed.util.compress.CompressionCodec;
import com.indeed.lsmtree.recordcache.Checkpoint;
import com.indeed.lsmtree.recordcache.Delete;
import com.indeed.lsmtree.recordcache.Operation;
import com.indeed.lsmtree.recordcache.Operatio... | /*
* Copyright (C) 2014 Indeed 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 agreed to in ... | } else if (op.getClass() == Checkpoint.class) { | 0 |
SergioDim3nsions/RealmContactsForAndroid | app/src/main/java/sergio/vasco/realmforandroid/app/section/main/di/MainActivityModule.java | [
"public interface Bus {\n void post(Object object);\n void postInmediate(Object object);\n void register(Object object);\n void unregister(Object object);\n}",
"public interface InteractorInvoker {\n void execute(Interactor interactor);\n void execute(Interactor interactor, InteractorPriority priority);\n}"... | import dagger.Module;
import dagger.Provides;
import sergio.vasco.androidforexample.domain.abstractions.Bus;
import sergio.vasco.androidforexample.domain.interactors.InteractorInvoker;
import sergio.vasco.androidforexample.domain.interactors.main.GetContactsFromDataBaseInteractor;
import sergio.vasco.androidforexample.... | package sergio.vasco.realmforandroid.app.section.main.di;
/**
* Name: Sergio Vasco
* Date: 15/1/16.
*/
@Module
public class MainActivityModule {
private final MainActivity mainActivity;
public MainActivityModule(MainActivity mainActivity) {
this.mainActivity = mainActivity;
}
| @PerActivity @Provides MainPresenter providedMainPresenter(Bus bus,InteractorInvoker interactorInvoker, InsertContactsIntoDataBaseInteractor insertContactsIntoDataBaseInteractor,GetContactsFromDataBaseInteractor getContactsFromDataBaseInteractor, PresentationContactMapper presentationContactMapper){ | 3 |
OlgaKuklina/GitJourney | app/src/main/java/com/oklab/gitjourney/activities/PersonalActivity.java | [
"public class UserProfileDetailAdapter extends RecyclerView.Adapter<UserProfileDetailAdapter.UserProfileDetailViewHolder> {\n private static final String TAG = UserProfileDetailAdapter.class.getSimpleName();\n private final ArrayList<ReposDataEntry> reposDataEntries = new ArrayList<>(1000);\n private final... | import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
... | package com.oklab.gitjourney.activities;
public class PersonalActivity extends AppCompatActivity implements UserProfileAsyncTask.OnProfilesLoadedListener<GitHubUserProfileDataEntry> {
private static final String TAG = PersonalActivity.class.getSimpleName();
UserProfileDetailAdapter userProfileDetailAdapter;... | Parser<GitHubUserProfileDataEntry> parser = new GitHubUserProfileDataParser(); | 3 |
SkaceKamen/sqflint | src/cz/zipek/sqflint/sqf/operators/PathLoader.java | [
"public class Linter extends SQFParser {\n\tpublic static final int CODE_OK = 0;\n\tpublic static final int CODE_ERR = 1;\n\t\n\tprivate final List<SQFParseException> errors = new ArrayList<>();\n\tprivate final List<Warning> warnings = new ArrayList<>();\n\t\n\tprivate final List<SQFInclude> includes = new ArrayLi... | import java.nio.file.Paths;
import cz.zipek.sqflint.linter.Linter;
import cz.zipek.sqflint.linter.Warning;
import cz.zipek.sqflint.sqf.SQFBlock;
import cz.zipek.sqflint.sqf.SQFContext;
import cz.zipek.sqflint.sqf.SQFExpression;
import cz.zipek.sqflint.sqf.SQFString;
import java.nio.file.Files; | /*
* The MIT License
*
* Copyright 2016 Jan Zรญpek (jan at zipek.cz).
*
* 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
* t... | public void analyze(Linter source, SQFContext context, SQFExpression expression) { | 3 |
suguru/mongo-java-async-driver | src/main/java/jp/ameba/mongo/MongoConnection.java | [
"public class Delete extends Request {\n\t\n\tprivate int flags;\n\t\n\tprivate BSONObject selector;\n\t\n\t/**\n\t * Update\n\t * \n\t * @param collectionName\n\t * @param upsert\n\t * @param multiUpdate\n\t * @param selector\n\t * @param update\n\t */\n\tpublic Delete(\n\t\t\tString databaseName,\n\t\t\tString co... | import jp.ameba.mongo.protocol.Delete;
import jp.ameba.mongo.protocol.GetMore;
import jp.ameba.mongo.protocol.Insert;
import jp.ameba.mongo.protocol.KillCursors;
import jp.ameba.mongo.protocol.Query;
import jp.ameba.mongo.protocol.Response;
import jp.ameba.mongo.protocol.Update; | package jp.ameba.mongo;
/**
* MongoDB ใซๅฏพใใๆฅ็ถใใใณ้ไฟกใ่กใใใใฎใคใณใฟใผใใงใคใน
* ไฝใฌใคใคใผใฎใใญใใณใซๅฆ็ใๅฎ่กใใใใใฎใกใฝใใใๆไพใใพใใ
*
* @author suguru
*/
public interface MongoConnection {
/**
* ใใฎๆฅ็ถใ่ญๅฅใใใใใฎ ID ใๅๅพใใพใใ
* @return
*/
int getChannelId();
/**
* ๆฅ็ถใใชใผใใณใใพใใ
* @throws MongoException
*/
void open() throws MongoExce... | Response getMore(GetMore getMore); | 1 |
DarrenMowat/PicSync | src/com/darrenmowat/gdcu/service/MediaThread.java | [
"public class GDCU extends Application {\n\n\tpublic static final boolean DEVEL_BUILD = true;\n\n\tpublic static final String APP_NAME = \"PicSync Beta\";\n\n\tpublic static int VERSION;\n\tpublic static String VERSION_STRING;\n\tpublic static final String BUILD_TYPE = DEVEL_BUILD ? \"Development Build\" : \"Beta B... | import java.io.File;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import org.json.JSONException;
import android.database.Cursor;
import android.net.Uri;
import android.provider.MediaStore;
import android.provider.... | package com.darrenmowat.gdcu.service;
public class MediaThread extends Thread {
private Database database;
private CloudSyncer syncer;
private MediaService service;
private String email;
private boolean shouldWait;
private long lastTouchedAt;
private boolean waiting;
public boolean running = false;
... | private static final Uri PHOTO_URI = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; | 4 |
anand1st/sshd-shell-spring-boot | sshd-shell-spring-boot-starter/src/main/java/sshd/shell/springboot/console/BaseUserInputProcessor.java | [
"public class ShellException extends Exception {\n\n private static final long serialVersionUID = 7114130906989289480L;\n\n public ShellException(String message) {\n super(message);\n }\n\n public ShellException(String message, Throwable cause) {\n super(message, cause);\n }\n}",
"@lo... | import java.util.Collection;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.regex.Pattern;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import sshd.shell.springboot.ShellException;... | /*
* Copyright 2017 anand.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | private Map<String, Map<String, CommandExecutableDetails>> commandMap; | 1 |
PinaeOS/rafiki | src/example/java/org/pinae/rafiki/PressureTest.java | [
"public class DelayJob implements Job {\n\n\tprivate static Logger logger = Logger.getLogger(DelayJob.class);\n\t\n\tprivate int jobId = 0;\n\t\n\tpublic DelayJob() {\n\t\t\n\t}\n\t\n\tpublic DelayJob(int jobId) {\n\t\tthis.jobId = jobId;\n\t}\n\t\n\tpublic String getName() {\n\t\treturn \"DelayJob\";\n\t}\n\n\tpub... | import java.util.concurrent.TimeUnit;
import org.apache.log4j.Logger;
import org.pinae.rafiki.job.DelayJob;
import org.pinae.rafiki.task.Task;
import org.pinae.rafiki.task.TaskContainer;
import org.pinae.rafiki.task.TaskException;
import org.pinae.rafiki.trigger.impl.SimpleTrigger; | package org.pinae.rafiki;
public class PressureTest {
private static Logger logger = Logger.getLogger(PressureTest.class);
public static void main(String arg[]) throws TaskException {
int taskNum = 5;
int repeat = 3;
| TaskContainer container = new TaskContainer(); | 2 |
documaster/noark-extraction-validator | noark-extraction-validator/src/main/java/com/documaster/validator/validation/ValidationFactory.java | [
"public abstract class Command<T extends InternalProperties> {\n\n\tprivate JCommander argParser;\n\n\tpublic Command() {\n\n\t}\n\n\tpublic Command(JCommander argParser) {\n\n\t\tthis.argParser = argParser;\n\t}\n\n\t/**\n\t * Validates all {@link ParametersDelegate}s in this {@link Command}.\n\t *\n\t * @throws P... | import com.documaster.validator.config.commands.Command;
import com.documaster.validator.config.commands.Noark53Command;
import com.documaster.validator.config.commands.Noark54Command;
import com.documaster.validator.config.commands.Noark55Command;
import com.documaster.validator.exceptions.ValidationException;
import ... | /**
* Noark Extraction Validator
* Copyright (C) 2016, Documaster AS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any la... | throw new ValidationException("Validator not implemented: " + validatorType.getName()); | 4 |
FTC7393/EVLib | sample/v3/SampleVuforiaOp.java | [
"public class Telem {\n //this will fail silently and move on if you write to it before it is set by the opmode\n public static Telemetry telemetry = Fake.TELEMETRY;\n\n //this will cause errors if you write to it before it is set by the opmode\n// public static Telemetry telemetry = null;\n\n /**\n ... | import com.google.common.collect.ImmutableList;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import org.firstinspires.ftc.teamcode.R;
import ftc.electronvolts.statemachine.EndConditions;
import ftc.electronvolts.statemachine.StateMachine;
import ftc.electronvolts.statemachine.StateMachineBuilder;
import f... | package org.firstinspires.ftc.teamcode.sample.v3;
/**
* This file was made by the electronVolts, FTC team 7393
* Date Created: 12/15/16
*/
@Autonomous(name = "SampleVuforiaOp V3")
public class SampleVuforiaOp extends AbstractAutoOp<RobotCfg> {
//get a key (for free) and paste it below by creating an account ... | b.add(EVStates.findBeaconColorState(S.FIND_BEACON_COLOR, S.DISPLAY, S.UNKNOWN_BEACON_COLOR, S.BEACON_COLOR_TIMEOUT, Time.fromSeconds(10), vuforiaReceiver, beaconColorResult, TeamColor.RED, 4, true)); | 3 |
XFY9326/FloatText | app/src/main/java/tool/xfy9326/floattext/View/ListViewAdapter.java | [
"public class FloatManage extends AppCompatActivity {\n private ListViewAdapter listadapter = null;\n private ArrayList<String> FloatDataName;\n private AlertDialog ag_loading;\n private Handler mHandler;\n\n //ๆพ็คบSnackBar\n public static void snackshow(Activity ctx, String str) {\n Coordina... | import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.preference.PreferenceManager;
import android.support.v7.app.AlertDialog;
import android.support.v... | package tool.xfy9326.floattext.View;
/*
็ฎก็ๅ่กจๆไฝ
*/
public class ListViewAdapter extends RecyclerView.Adapter<ListViewAdapter.ViewHolder> {
private final Context context;
private final Activity activity;
private ArrayList<String> textshow;
private ArrayList<FloatTextView> floatdata;
private Arr... | String ttf = FloatTextSettingMethod.typeface_fix(context); | 3 |
pivio/pivio-web | src/main/java/io/pivio/view/app/overview/detail/DetailService.java | [
"@Component\npublic class PivioServerConnector {\n\n private final Logger log = LoggerFactory.getLogger(PivioServerConnector.class);\n\n @Autowired\n ServerConfig serverConfig;\n\n public <T> ResponseEntity query(String path, String query, Class<T> type) throws UnsupportedEncodingException {\n St... | import io.pivio.view.PivioServerConnector;
import io.pivio.view.app.overview.detail.serverresponse.Document;
import io.pivio.view.app.overview.detail.serverresponse.Internal;
import io.pivio.view.app.overview.detail.view.DocumentViewModel;
import io.pivio.view.app.overview.detail.view.ProvidesModel;
import io.pivio.vie... | package io.pivio.view.app.overview.detail;
@Service
public class DetailService {
@Autowired
PivioServerConnector pivioServerConnector;
@Autowired
ServiceListGenerator serviceListGenerator;
public DocumentViewModel getDetail(String id) {
Document document = new Document();
try ... | for (ProvidesModel provide : result.service.provides) { | 4 |
otto-de/edison-jobtrigger | src/test/java/de/otto/edison/jobtrigger/trigger/TriggerServiceTest.java | [
"@Component\n@ConfigurationProperties(prefix = \"edison.jobtrigger\")\npublic class JobTriggerProperties {\n\n @Valid\n private Jobresults jobresults = new Jobresults();\n\n @Valid\n private Scheduler scheduler = new Scheduler();\n\n @Valid\n private Security security = new Security();\n\n\n pu... | import com.google.common.base.Equivalence;
import com.google.common.collect.ImmutableList;
import de.otto.edison.jobtrigger.configuration.JobTriggerProperties;
import de.otto.edison.jobtrigger.definition.JobDefinition;
import de.otto.edison.jobtrigger.definition.JobDefinitionBuilder;
import de.otto.edison.jobtrigger.di... | package de.otto.edison.jobtrigger.trigger;
@RunWith(MockitoJUnitRunner.class)
public class TriggerServiceTest {
Logger log = LoggerFactory.getLogger(TriggerService.class);
@Mock
private DiscoveryService discoveryService;
@Mock
private JobScheduler scheduler;
@Mock
private AsyncHttpCl... | final JobDefinition fixedDelayDefinition = new JobDefinitionBuilder().setFixedDelay(Optional.of(Duration.ofDays(2))).createJobDefinition(); | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.