Source
stringclasses
1 value
Date
int32
2.01k
2.01k
Text
stringlengths
3
15.9M
Token_count
int32
1
2.44M
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as...
1,923
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.io; import android.content.Context; import android.content.SharedPreferences; import android.util.Log; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; import java.security.G...
948
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as...
8,155
github-java-corpus
2,012
package com.iskrembilen.quasseldroid; import java.util.*; public class NetworkCollection extends Observable implements Observer { private static final String TAG = NetworkCollection.class.getSimpleName(); List<Network> networkList = new ArrayList<Network>(); HashMap<Integer, Network> networkMap = new HashMap<Integ...
421
github-java-corpus
2,012
package com.iskrembilen.quasseldroid; import java.util.Date; import java.util.GregorianCalendar; public class CoreInfo { private int coreFeatures; private String coreInfo; private boolean supportSsl; private Date coreDate; private GregorianCalendar coreStartTime; private String coreVersion; private boolean c...
470
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
3,904
github-java-corpus
2,012
package com.iskrembilen.quasseldroid; import android.app.Application; import android.content.Intent; import android.preference.PreferenceManager; import android.widget.Toast; import com.iskrembilen.quasseldroid.events.ConnectionChangedEvent; import com.iskrembilen.quasseldroid.events.ConnectionChangedEvent.Status; im...
272
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
1,008
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import android.R.color; import android.content.Context; import android.content.SharedPreferences; import android.content.res.Resources; import android.preference.PreferenceManager; import com.iskrembilen.quasseldroid.R; public class ThemeUtil { public static int theme; pu...
995
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import android.content.Context; import android.graphics.Rect; import android.util.AttributeSet; import android.widget.TextView; public final class AlwaysScrollingTextView extends TextView { public AlwaysScrollingTextView(Context context) { super(context); } public Al...
202
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import com.iskrembilen.quasseldroid.NetworkCollection; import com.iskrembilen.quasseldroid.R; import com.iskrembilen.quasseldroid.events.ManageChannelEvent; import com.isk...
501
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import android.graphics.Color; public class SenderColorHelper { private static double INTEGER_RANGE = 1L << 32; public static int getSenderColor(String nick) { double doubleHash = ((long) nick.hashCode() - Integer.MIN_VALUE) / INTEGER_RANGE; int color = hslToRgb(doubl...
403
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import com.squareup.otto.Bus; public final class BusProvider { private static final Bus BUS = new Bus(); public static Bus getInstance() { return BUS; } private BusProvider() { // No instances. } }
63
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import android.content.res.Resources; import com.iskrembilen.quasseldroid.R; import java.text.DecimalFormat; public class Helper { public static String formatLatency(float number, Resources res) { String latency; String unit; if(number >= 100) { unit = ...
163
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import android.widget.EditText; import android.widget.Filter; import com.iskrembilen.quasseldroid.IrcMode; import com.iskrembilen.quasseldroid.IrcUser; import java.util.ArrayList; import java.util.List; import java.util.Map; public class NickCompletionHelper extends Filter ...
637
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil 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...
675
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.preference.PreferenceMana...
1,297
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.util; import java.util.ArrayList; import java.util.List; public class InputHistoryHelper { private static List<String> history = new ArrayList<String>(); private static int currentIndex = -1; private static String tempStore; public static String getNextHistoryEntry(){ if (...
227
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.exceptions; public class UnsupportedProtocolException extends Exception { public UnsupportedProtocolException(String message) { super(message); } }
36
github-java-corpus
2,012
package com.iskrembilen.quasseldroid; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; /** * User: Stian * Date: 05.07.12 * Time: 20:14 */ public enum IrcMode { /* * Declare in order of rank, this way values() will naturally * return the different modes based on rank ...
286
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the L...
438
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class GetBacklogEvent { public final int bufferId; public final int backlogAmount; public GetBacklogEvent(int bufferId, int backlogAmount) { this.bufferId = bufferId; this.backlogAmount = backlogAmount; } }
67
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class ManageChannelEvent { public enum ChannelAction { TEMP_HIDE, PERM_HIDE, DELETE, MARK_AS_READ, HIGHLIGHTS_READ; } public final int bufferId; public final ChannelAction action; public ManageChannelEvent(int bufferId, ChannelAction action) { this.buffe...
90
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class CompleteNickEvent { }
20
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class BufferOpenedEvent { public final int bufferId; public BufferOpenedEvent(int bufferId) { this.bufferId = bufferId; } }
47
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; import com.iskrembilen.quasseldroid.Network; import com.iskrembilen.quasseldroid.NetworkCollection; public class NetworksAvailableEvent { public final NetworkCollection networks; public NetworksAvailableEvent(NetworkCollection networks) { this.networks = networks; ...
73
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class ConnectionChangedEvent { public enum Status { Connected, Connecting, Disconnected; } public final Status status; public final String reason; public ConnectionChangedEvent(Status status) { this(status, ""); } public ConnectionChangedEvent(Status st...
85
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class SendMessageEvent { public final String message; public final int bufferId; public SendMessageEvent(int bufferId, String message) { this.message = message; this.bufferId = bufferId; } }
59
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class UnsupportedProtocolEvent { }
21
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class DisconnectCoreEvent { }
20
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class LatencyChangedEvent { public final int latency; public LatencyChangedEvent(int latency) { this.latency = latency; } }
46
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; import crittercism.android.d; public class InitProgressEvent { public final String progress; public final Boolean done; public InitProgressEvent(boolean done, String progress) { this.progress = progress; this.done = done; } }
63
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class JoinChannelEvent { public final String networkName; public final String channelName; public JoinChannelEvent(String networkName, String channelName) { this.networkName = networkName; this.channelName = channelName; } }
64
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class ManageNetworkEvent { public enum NetworkAction { CONNECT, DISCONNECT; } public final int networkId; public final NetworkAction action; public ManageNetworkEvent(int networkId, NetworkAction action) { this.networkId = networkId; this.action = acti...
77
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class NewCertificateEvent { public final String certificateString; public NewCertificateEvent(String certificateString) { this.certificateString = certificateString; } }
46
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class BufferListFontSizeChangedEvent { }
22
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; public class UpdateReadBufferEvent { }
21
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; import com.iskrembilen.quasseldroid.IrcMessage.Type; public class FilterMessagesEvent { public final int bufferId; public final boolean filtered; public final Type filterType; public FilterMessagesEvent(int bufferId, Type type, boolean filtered) { this.bufferId =...
93
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.events; import com.iskrembilen.quasseldroid.events.ManageChannelEvent.ChannelAction; import com.iskrembilen.quasseldroid.qtcomm.serializers.quassel.MessageSerializer; public class ManageMessageEvent { public enum MessageAction { MARKER_LINE, LAST_SEEN; } public final int bu...
134
github-java-corpus
2,012
package com.iskrembilen.quasseldroid; import android.util.Log; import android.util.Pair; import java.util.*; public class UserCollection extends Observable implements Observer { private static final String TAG = UserCollection.class.getSimpleName(); private Map<IrcMode, ArrayList<IrcUser>> users; private Map<...
1,904
github-java-corpus
2,012
package com.iskrembilen.quasseldroid; import java.util.*; public class Network extends Observable implements Observer, Comparable<Network> { public enum ConnectionState { Disconnected(0), Connecting(1), Initializing(2), Initialized(3), Reconnecting(4), Disconnecting(5); int value; static final Map<In...
1,337
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.gui; import android.app.Activity; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.pm.ApplicationInfo; import android.os.Bundle; import android.os.Handler; import an...
613
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.gui.fragments; import java.util.List; import java.util.Observable; import java.util.Observer; import android.content.Context; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Pair; import android.view.LayoutInflater; import android.view.View; i...
1,834
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.gui.fragments; import com.actionbarsherlock.app.SherlockDialogFragment; import com.iskrembilen.quasseldroid.gui.LoginActivity; import com.iskrembilen.quasseldroid.gui.fragments.LoginProgressDialog.Callbacks; import android.app.Activity; import android.app.AlertDialog; import andro...
262
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.gui.fragments; import com.actionbarsherlock.app.SherlockFragment; import com.iskrembilen.quasseldroid.R; import com.iskrembilen.quasseldroid.events.InitProgressEvent; import com.iskrembilen.quasseldroid.gui.MainActivity.FragmentAdapter; import com.iskrembilen.quasseldroid.util.BusP...
305
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.gui.fragments; import java.util.ArrayList; import com.actionbarsherlock.app.SherlockDialogFragment; import com.iskrembilen.quasseldroid.Buffer; import com.iskrembilen.quasseldroid.IrcMessage; import com.iskrembilen.quasseldroid.events.FilterMessagesEvent; import com.iskrembilen.qu...
536
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.gui.fragments; import com.actionbarsherlock.app.SherlockDialogFragment; import com.iskrembilen.quasseldroid.Network; import com.iskrembilen.quasseldroid.R; import com.iskrembilen.quasseldroid.events.JoinChannelEvent; import com.iskrembilen.quasseldroid.gui.MainActivity; import com....
560
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
4,998
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.gui.fragments; import java.util.ArrayList; import java.util.List; import java.util.Observable; import java.util.Observer; import com.iskrembilen.quasseldroid.Buffer; import com.iskrembilen.quasseldroid.BufferInfo; import com.iskrembilen.quasseldroid.IrcMessage; import com.iskrembi...
4,513
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
2,828
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
3,251
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
496
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
480
github-java-corpus
2,012
package com.iskrembilen.quasseldroid.qtcomm; public class EmptyQVariantException extends Exception { private static final long serialVersionUID = -7231666901608987342L; }
40
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
614
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
514
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
603
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
493
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
550
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
389
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
437
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
397
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
403
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
545
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the ...
1,090
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
542
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
383
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
651
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> Copyright (C) 2011 Ken Børge Viktil This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public L...
737
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
409
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
469
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> Copyright (C) 2011 Ken Børge Viktil This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public L...
3,119
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free So...
1,479
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
294
github-java-corpus
2,012
/** QuasselDroid - Quassel client for Android Copyright (C) 2010 Frederik M. J. Vestre This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
945
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
456
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
1,035
github-java-corpus
2,012
/* QuasselDroid - Quassel client for Android Copyright (C) 2011 Ken Børge Viktil Copyright (C) 2011 Magnus Fjell Copyright (C) 2011 Martin Sandsmark <martin.sandsmark@kde.org> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
424
github-java-corpus
2,012
package models; import static domainservices.ServiceLocator.randomHorsesBreeder; import static models.PlayerBuilder.PLAYER_ACCESS_TOKEN; import static models.PlayerBuilder.PLAYER_AUTH_METHOD; import static models.PlayerBuilder.PLAYER_AVATAR_URL; import static models.PlayerBuilder.PLAYER_DISPLAY_NAME; import static mod...
768
github-java-corpus
2,012
package models.stock; import java.util.HashMap; import java.util.Map; import util.AbstractBuilder; public class StockBuilder extends AbstractBuilder<Stock> { private Map<Food, Integer> supplies = new HashMap<Food, Integer>(); @Override public Stock build() { Stock stock = new Stock(); for (Food supply : sup...
181
github-java-corpus
2,012
package models.stock; import litmus.unit.UnitTest; import org.junit.Test; public class StockTest extends UnitTest { @Test public void add() { Stock stock = new Stock(); Food supply = Food.HAY; stock.add(supply); assertThat(stock.items).hasSize(1); assertThat(stock.items.iterator().next().supply).isEqu...
450
github-java-corpus
2,012
package models; import litmus.Category; import litmus.unit.UnitTest; import org.junit.Before; import play.db.jpa.JPA; import play.test.Fixtures; @Category(value = "Integration Tests", priority = 10001) public abstract class IntegrationTest extends UnitTest { @Before public void cleanDB() { Fixtures.deleteDatabas...
92
github-java-corpus
2,012
package models; import models.randomizer.RandomizerProvider; import models.stock.Food; import util.AbstractBuilder; public class HorseBuilder extends AbstractBuilder<Horse> { private static final int DEFAULT_TRAINING = 20; private static final int DEFAULT_FITNESS = 20; private int fitness = DEFAULT_FITNESS; pri...
457
github-java-corpus
2,012
package models; import assertion.HoldYourHorseAssertions; import org.junit.Test; import play.db.jpa.JPA; public class RaceWeightsIntegrationTest extends IntegrationTest { @Test public void getAutoSetsDefaultValuesInDB() { RaceWeights weights = RaceWeights.get(); JPA.em().clear(); HoldYourHorseAssertions.a...
227
github-java-corpus
2,012
package models; import org.joda.time.DateTime; import org.mockito.internal.util.reflection.Whitebox; import util.AbstractBuilder; import java.util.Date; import java.util.Set; import static com.google.common.collect.Sets.newHashSet; public class RaceBuilder extends AbstractBuilder<Race> { private boolean withStart...
438
github-java-corpus
2,012
package models; import models.stable.Box; import org.fest.assertions.Assertions; import org.junit.Before; import org.junit.Test; import securesocial.provider.ProviderType; import securesocial.provider.UserId; import java.util.List; import static com.google.common.collect.Lists.newArrayList; import static models.Play...
1,073
github-java-corpus
2,012
package models.stable; import models.HorseNamePrefix; import models.HorseNameSuffix; import models.IntegrationTest; import org.junit.Before; import org.junit.Test; public class BoxIntegrationTest extends IntegrationTest { @Before public void initHorseNames() { new HorseNamePrefix("Windy").save(); new HorseNam...
194
github-java-corpus
2,012
package models.stable; import models.Horse; import util.AbstractBuilder; public class BoxBuilder extends AbstractBuilder<Box> { private Horse horse; private BoxBuilder() { } @Override public Box build() { Box box = new Box(); box.horse = horse; return box; } public static BoxBuilder aBox() { return...
106
github-java-corpus
2,012
package models; import models.stock.Food; public class PurchaseBuilder { private String amount = "0"; private Food foodId = Food.HAY; public Purchase build() { Purchase purchase = new Purchase(); purchase.amount = amount; purchase.foodId = foodId; return purchase; } public PurchaseBuilder withAmount...
112
github-java-corpus
2,012
package models; import litmus.unit.UnitTest; import org.fest.assertions.Assertions; import org.junit.After; import org.junit.Test; public class HorseTest extends UnitTest { @After public void resetWeights() { RaceWeights.reset(); } @Test public void calculateRaceScore_BasedOnTrainingAndFitness() { RaceWei...
505
github-java-corpus
2,012
package models; import assertion.HoldYourHorseAssertions; import litmus.unit.UnitTest; import models.stable.Box; import models.stable.BoxBuilder; import org.fest.assertions.Assertions; import org.joda.time.DateTime; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import o...
1,031
github-java-corpus
2,012
package models; import models.stock.Food; import org.fest.assertions.Assertions; import org.junit.Test; import static models.HorseBuilder.aHorse; import static models.RaceBuilder.aRace; public class HorseIntegrationTest extends IntegrationTest { @Test public void canBePersisted() { Horse horse = Hor...
417
github-java-corpus
2,012
package models; import org.fest.assertions.Assertions; import org.junit.Test; public class JockeyIntegrationTest extends IntegrationTest { @Test public void jockeyCanBePersisted() { Jockey savedJockey = new Jockey("Rappe Ronnie").save(); clearEntityContext(); Jockey loadedJockey = Jockey.findByI...
94
github-java-corpus
2,012
package models; import assertion.HoldYourHorseAssertions; import litmus.unit.UnitTest; import org.junit.After; import org.junit.Before; import org.junit.Test; import static models.RaceBuilder.aRace; public class RacesCalculateWinnerTest extends UnitTest { @Before public void setupFixedRaceWeights() { RaceWeight...
475
github-java-corpus
2,012
package models; import models.stable.Box; import models.stable.BoxBuilder; import org.fest.assertions.Assertions; import org.joda.time.DateTime; import org.junit.Test; import static models.PlayerBuilder.aPlayer; import static models.RaceBuilder.aRace; public class PlayerGetPastEnteredRacesIntegrationTest extends Int...
396
github-java-corpus
2,012
package models; import org.fest.assertions.Assertions; import org.joda.time.DateTime; import org.junit.Test; import static models.RaceBuilder.aRace; public class HorseGetPastEnteredRacesIntegrationTest extends IntegrationTest { @Test public void getPastEnteredRaces_ReturnsEmptySetWhenNoRacesEntered() { Horse ho...
307
github-java-corpus
2,012
package models; import static org.apache.commons.lang.time.DateUtils.addDays; import static securesocial.provider.AuthenticationMethod.USER_PASSWORD; import static securesocial.provider.ProviderType.userpass; import java.util.Date; import java.util.Set; import models.stable.Box; import org.mockito.internal.util.ref...
766
github-java-corpus
2,012
package models; import litmus.unit.UnitTest; import org.fest.assertions.Assertions; import org.joda.time.DateTime; import org.joda.time.DateTimeUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; public class RaceFactoryTest extends UnitTest { private RaceFactory raceFactory = new RaceFa...
228
github-java-corpus
2,012
package models; import org.joda.time.DateTime; import org.junit.Test; import java.util.List; import static models.HorseBuilder.aHorse; import static models.RaceBuilder.aRace; public class RaceIntegrationTest extends IntegrationTest { @Test public void canBePersisted() { Horse horse1 = aHorse().with...
472
github-java-corpus
2,012
package assertion; import models.Race; import org.fest.assertions.Assertions; public class HoldYourHorseAssertions extends Assertions { public static RaceAssert assertThat(Race actual) { return new RaceAssert(actual); } }
46