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
aschaaff/savot
src/main/java/cds/savot/binary/DataBinaryReader.java
[ "public final class FieldSet extends SavotSet<SavotField> {\n\n /**\n * Constructor\n */\n public FieldSet() {\n }\n}", "public final class SavotField extends MarkupComment implements IDSupport, NameSupport, RefSupport {\n\n // ID attribute\n private String id = null;\n // unit attribute...
import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; im...
/** * <p>Extracts the encoding of the data from the protocol header.</p> * * <p>For instance: if the protocol is HTTP, the header <code>Content-Encoding</code> gives the data encoding.</p> * * <p>WARNING: By default, <code>rights</code> is not considered.</p> * * @param dataUr...
TDSet tds = new TDSet();
5
Lambda-3/DiscourseSimplification
src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/AdjectivalAdverbialInitialExtractor.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...
rightConstituentWords.addAll(ParseTreeExtractionUtils.getPrecedingWords(leaf.getParseTree(), matcher.getNode("ad"), false));
5
bbottema/outlook-message-parser
src/main/java/org/simplejavamail/outlookmessageparser/OutlookMessageParser.java
[ "public interface OutlookAttachment {\n\n}", "public class OutlookFieldInformation {\n\n\t/**\n\t * The default value for both the {@link #clazz} and the {@link #type} properties.\n\t */\n\tpublic static final String UNKNOWN = \"unknown\";\n\n\t/**\n\t * The default value for the {@link #mapiType}\n\t */\n\tpubli...
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.apache.poi.poifs.filesystem.DirectoryEntry; import org.apache.poi.poifs.filesystem.DocumentEntry; import org.apache.poi.poifs.filesystem.DocumentInputStream; import org.apache.poi.poifs.filesystem.Entry; import org.apache.poi.poifs.filesystem.POIFSFi...
package org.simplejavamail.outlookmessageparser; /** * Main parser class that does the actual parsing of the Outlook .msg file. It uses the <a href="http://poi.apache.org/poifs/">POI</a> library for parsing the * .msg container file and is based on a description posted by Peter Fiskerstrand at <a href="http://www...
final OutlookMessageProperty msgProp = getMessagePropertyFromDocumentEntry(deFromProps);
4
AndyGu/ShanBay
src/com/shanbay/words/review/experience/ExpReviewActivity.java
[ "public class ModelResponseException extends Exception\n{\n public static final int STATUS_CODE_CONNECT_EXCEPTION = 983040;\n public static final int STATUS_CODE_JSON_PARSE_EXCEPTION = 268369920;\n public static final int STATUS_CODE_NETWORK_404 = 268369921;\n public static final int STATUS_CODE_NETWORK_EXCEPTI...
import android.content.Context; import android.content.Intent; import android.graphics.Typeface; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v7.app.ActionBar; import android.uti...
bool = true; } else { bool = false; } return bool; } private void renderPanel(String tag) { ExpReviewFragment expReviewFragment = (ExpReviewFragment)getSupportFragmentManager().findFragmentByTag(tag); if (expReviewFragment == null){ Log.e("renderPanel", "expReviewFragment == null"); ...
startActivity(new Intent(this, WelcomeActivity.class));
5
briandilley/jsonrpc4j
src/main/java/com/googlecode/jsonrpc4j/JsonRpcBasicServer.java
[ "@SuppressWarnings({\"WeakerAccess\", \"unused\"})\nclass JsonError {\n\t\t\n\tpublic static final JsonError OK = new JsonError(0, \"ok\", null);\n\tpublic static final JsonError PARSE_ERROR = new JsonError(-32700, \"JSON parse error\", null);\n\tpublic static final JsonError INVALID_REQUEST = new JsonError(-32600,...
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import com.googlecode.jsonrpc4j.ErrorResolver.JsonError; import net.iharder.Base64; import org.slf4j.Logger; import org.slf4j.LoggerF...
final ClassLoader classLoader = JsonRpcBasicServer.class.getClassLoader(); try { WEB_PARAM_ANNOTATION_CLASS = classLoader.loadClass(WEB_PARAM_ANNOTATION_CLASS_LOADER).asSubclass(Annotation.class); WEB_PARAM_NAME_METHOD = WEB_PARAM_ANNOTATION_CLASS.getMethod(NAME); } catch (ClassNotFoundException | NoSuchMet...
JsonResponse responseError = createResponseError(VERSION, NULL, JsonError.PARSE_ERROR);
0
indvd00m/java-ascii-render
ascii-render/src/test/java/com/indvd00m/ascii/render/tests/TestContext.java
[ "public class Render implements IRender {\n\n\tprotected boolean pseudoCanvas;\n\n\t@Override\n\tpublic IContextBuilder newBuilder() {\n\t\treturn ContextBuilder.newBuilder();\n\t}\n\n\t@Override\n\tpublic ICanvas render(IContext context) {\n\t\tfinal ICanvas canvas;\n\t\tif (pseudoCanvas) {\n\t\t\tcanvas = new Pse...
import com.indvd00m.ascii.render.Render; import com.indvd00m.ascii.render.api.IContext; import com.indvd00m.ascii.render.api.IContextBuilder; import com.indvd00m.ascii.render.api.IElement; import com.indvd00m.ascii.render.api.IRender; import com.indvd00m.ascii.render.elements.Dot; import com.indvd00m.ascii.render.eleme...
package com.indvd00m.ascii.render.tests; /** * @author indvd00m (gotoindvdum[at]gmail[dot]com) * @since 1.2.0 */ public class TestContext { @Test public void test01() { IRender render = new Render(); IContextBuilder builder = render.newBuilder(); builder.width(20).height(10); Rectangle r1 = new Rectang...
IContext context = builder.build();
1
SEMERU-WM/ChangeScribe
CommitSummarizer/CommitSummarizer.core/src/main/java/co/edu/unal/colswe/changescribe/core/listener/SummarizeVersionChangesListener.java
[ "public class PreferenceConstants {\n\n\tpublic static final String P_FILTER_COMMIT_MESSAGE = \"filterCommitMessagePreference\";\n\n\tpublic static final String P_AUTHOR = \"authorPreference\";\n\t\n\tpublic static final String P_COMMITER = \"commiterPreference\";\n\t\n\tpublic static final String P_FILTER_FACTOR =...
import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import changescribe.core.preferences.PreferenceConstants; import co.edu.unal.colswe.changescribe.core.Activator; import co....
package co.edu.unal.colswe.changescribe.core.listener; public class SummarizeVersionChangesListener implements SelectionListener { private IDialog changedListDialog; public SummarizeVersionChangesListener(IDialog changedListDialog) { super(); this.changedListDialog = changedListDialog; } public void widg...
SummarizeChanges summarizer = new SummarizeChanges(changedListDialog.getGit(), filtering, factor,
3
Catherine22/MobileManager
app/src/main/java/com/itheima/mobilesafe/fragments/TaskFragment.java
[ "public class TaskInfoListAdapter extends RecyclerView.Adapter<TaskInfoListAdapter.MyViewHolder> implements OnItemTouch {\n\n private Context ctx;\n private List<TaskInfo> taskInfos;\n private OnItemClickLitener mOnItemClickLitener;\n private OnItemMoveListener mOnItemMoveListener;\n\n public TaskInf...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutManager; import android.support.v7.widget.helper.ItemTouchHelper; import android.view.LayoutInflater; import an...
package com.itheima.mobilesafe.fragments; /** * Created by Catherine on 2016/9/11. * Soft-World Inc. * catherine919@soft-world.com.tw */ public class TaskFragment extends Fragment { private static final String TAG = "TaskFragment"; private AutoResizeTextView tv_memory_info; private TextView tv_prog...
private TaskInfoListAdapter userAdapter, sysAdapter;
0
dan-zx/tedroid
tests/online_tests/src/mx/udlap/is522/tedroid/test/ScorePersistenceTest.java
[ "public class ClassicGameActivity extends BaseGoogleGamesActivity {\n \n private int totalLines;\n private int totalScore;\n private int level;\n private NextTetrominoView nextTetrominoView;\n private GameBoardView gameBoardView;\n private TextView gameOverTextView;\n private TextView scoreT...
import android.test.ActivityInstrumentationTestCase2; import android.util.Log; import android.widget.TextView; import com.robotium.solo.Solo; import mx.udlap.is522.tedroid.R; import mx.udlap.is522.tedroid.activity.ClassicGameActivity; import mx.udlap.is522.tedroid.activity.MainMenuActivity; import mx.udlap.is522.tedroi...
/* * Copyright 2014 Tedroid developers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
GameBoardView gameBoardView = (GameBoardView) solo.getView(R.id.game_board);
5
magott/spring-social-yammer
spring-social-yammer/src/test/java/org/springframework/social/yammer/api/impl/MessageTemplateTest.java
[ "public class MessageInfo {\n\n\tprivate List<YammerMessage> messages;\n\tprivate YammerMessageMeta metadata;\n\tprivate List<YammerReference> references;\n\t\n\tpublic MessageInfo(List<YammerMessage> messages, YammerMessageMeta meta, List<YammerReference> references) {\n\t\tthis.messages=messages;\n\t\tthis.metada...
import org.junit.Test; import org.springframework.http.MediaType; import org.springframework.social.yammer.api.MessageInfo; import org.springframework.social.yammer.api.YammerMessage; import org.springframework.social.yammer.api.YammerMessage.Attachment; import org.springframework.social.yammer.api.YammerMessageMeta; i...
assertMessageInfo(messageInfo); } @Test public void testGetMessagesPrivate() { mockServer.expect(requestTo("https://www.yammer.com/api/v1/messages/private.json")).andExpect(method(GET)) .andRespond(withSuccess(jsonResource("testdata/yammer-messages"), APPLICATION_JSON)); MessageInfo messageInfo = yammerTempl...
List<YammerMessage> messages = messageInfo.getMessages();
1
NasaGeek/utexas-utilities
app/src/main/java/com/nasageek/utexasutilities/fragments/ExamScheduleFragment.java
[ "public class AuthCookie {\n\n protected String prefKey;\n protected String authCookie;\n protected String authCookieKey;\n protected String userNameKey;\n protected String passwordKey;\n protected boolean cookieHasBeenSet;\n protected OkHttpClient client;\n protected SharedPreferences setti...
import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.view.ActionMode; import android.text.Html; import android.text.Spanned; import android.view.LayoutInflater; import android.view.Menu; import android.view.Me...
examListview.setVisibility(View.VISIBLE); break; case FAILED: progressLayout.setVisibility(View.GONE); errorLayout.setVisibility(View.VISIBLE); examListview.setVisibility(View.GONE); b...
static class FetchExamDataTask extends UTLoginTask<Boolean, Void, List<String>> {
3
idega/com.idega.formbuilder
src/java/com/idega/formbuilder/presentation/beans/Workspace.java
[ "public class IWBundleStarter implements IWBundleStartable {\n\t\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"com.idega.formbuilder\";\n\tpublic static final String FB_CFG_FILE = \"formbuilder-properties.xml\";\n\t\n\tpublic void start(IWBundle starterBundle) {\n\t\tFormbuilderViewManager cViewManager = F...
import java.io.Serializable; import java.rmi.RemoteException; import java.util.Locale; import org.jdom.Document; import org.springframework.beans.factory.annotation.Autowired; import com.idega.block.web2.business.JQuery; import com.idega.block.web2.business.Web2Business; import com.idega.block.web2.business.Web2Busines...
package com.idega.formbuilder.presentation.beans; public class Workspace implements Serializable { private static final long serialVersionUID = -7539955904708793992L; public static final String BEAN_ID = "workspace"; private String view; private Long parentFormId; private Long processId; private String tas...
return BuilderLogic.getInstance().getRenderedComponent(CoreUtil.getIWContext(), new FBComponentProperties(),true);
2
FedUni/caliko
caliko-demo/src/main/java/au/edu/federation/caliko/demo/CalikoDemo2D.java
[ "public class FabrikStructure2D implements FabrikStructure<FabrikChain2D,Vec2f>, Serializable\r\n{\r\n\tprivate static final long serialVersionUID = 1L;\r\n\t\r\n\tprivate static final Vec2f UP = new Vec2f(0.0f, 1.0f);\r\n\t\r\n\t// ---------- Private Properties ----------\r\n\t\r\n\t/** The string name of this Fab...
import au.edu.federation.caliko.FabrikStructure2D; import au.edu.federation.caliko.demo2d.CalikoDemoStructure2D; import au.edu.federation.caliko.demo2d.CalikoDemoStructure2DFactory; import au.edu.federation.caliko.visualisation.FabrikLine2D; import au.edu.federation.caliko.visualisation.Point2D; import au.edu.federatio...
package au.edu.federation.caliko.demo; /** * Class to demonstrate some of the features of the Caliko library in 2D. * * @author Al Lansley * @version 0.8 - 02/08/2016 */ public class CalikoDemo2D implements CalikoDemo { /** Each demo works with a single structure composed of one or more IK chains. */ static ...
private CalikoDemoStructure2D demoStructure2d;
1
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...
}); //锁定监听设置 view.lock_button.setOnClickListener(new OnClickListener() { public void onClick(View v) { if (FloatManageMethod.LockorUnlockWin(context, view.getLayoutPosition())) { FloatManage.snackshow((Activity) context, context.getString(R.string...
FloatServiceMethod.ReloadDynamicUse(context);
2
waldheinz/fat32-lib
src/main/java/de/waldheinz/fs/util/ImageBuilder.java
[ "public final class FatFile extends AbstractFsObject implements FsFile {\n private final FatDirectoryEntry entry;\n private final ClusterChain chain;\n \n private FatFile(FatDirectoryEntry myEntry, ClusterChain chain) {\n super(myEntry.isReadOnly());\n \n this.entry = myEntry;\n ...
import de.waldheinz.fs.fat.FatFile; import de.waldheinz.fs.fat.FatFileSystem; import de.waldheinz.fs.fat.FatLfnDirectory; import de.waldheinz.fs.fat.FatLfnDirectoryEntry; import de.waldheinz.fs.fat.FatType; import de.waldheinz.fs.fat.SuperFloppyFormatter; import java.io.File; import java.io.IOException; import java.io....
package de.waldheinz.fs.util; /** * * @author Matthias Treydte &lt;mt at waldheinz.de&gt; */ public final class ImageBuilder { public static ImageBuilder of(File rootDir) throws IOException { if (!rootDir.isDirectory()) { throw new IOException("root must be a directory"); } ...
final FatFileSystem fs = SuperFloppyFormatter
5
Martin20150405/Pano360
vrlib/src/main/java/com/martin/ads/vrlib/ui/PanoPlayerActivity.java
[ "public class PanoMediaPlayerWrapper implements\n SurfaceTexture.OnFrameAvailableListener,\n MediaPlayer.OnCompletionListener,\n MediaPlayer.OnErrorListener,\n MediaPlayer.OnPreparedListener,\n MediaPlayer.OnVideoSizeChangedListener,\n MediaPlayer.OnInfoListener,\n M...
import android.app.Activity; import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.net.Uri; import android.opengl.GLSurfaceView; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import android.widget.ImageView; impor...
package com.martin.ads.vrlib.ui; /** * Created by Ads on 2016/11/10. * UI is modified from UtoVR demo */ //FIXME:looks so lame. public class PanoPlayerActivity extends Activity { public static final String CONFIG_BUNDLE = "configBundle"; private PanoUIController mPanoUIController; private PanoViewWr...
if((configBundle.getMimeType() & MimeType.BITMAP)!=0){
2
sing-group/bicycle
src/test/java/es/cnio/bioinfo/bicycle/test/AnalysisTest.java
[ "public class Project {\n\n\tprivate static final Logger logger = Logger.getLogger(Project.class.getSimpleName());\n\n\tpublic static final String WORKING_DIRECTORY = \"workingDirectory\" + File.separator;\n\tpublic static final String OUTPUT_DIRECTORY = \"output\" + File.separator;\n\tpublic static final String CO...
import static org.junit.Assert.assertTrue; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import java.util.Arrays; import java.util.Collection; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners...
/* Copyright 2012 Daniel Gonzalez Peña, Osvaldo Graña This file is part of the bicycle Project. bicycle Project is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation, either version 3 of the License, or (at your opti...
for (Reference ref : p.getReferences()) {
1
CodeCrafter47/BungeeTabListPlus
bungee/src/main/java/codecrafter47/bungeetablistplus/command/CommandDebug.java
[ "public class BungeeTabListPlus {\n\n /**\n * Holds an INSTANCE of itself if the plugin is enabled\n */\n private static BungeeTabListPlus INSTANCE;\n @Getter\n private final Plugin plugin;\n\n public PlayerProvider playerProvider;\n @Getter\n private EventExecutor mainThreadExecutor;\n...
import codecrafter47.bungeetablistplus.BungeeTabListPlus; import codecrafter47.bungeetablistplus.command.util.CommandBase; import codecrafter47.bungeetablistplus.command.util.CommandExecutor; import codecrafter47.bungeetablistplus.data.BTLPBungeeDataKeys; import codecrafter47.bungeetablistplus.player.BungeePlayer; impo...
/* * Copyright (C) 2020 Florian Stober * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * *...
player.addDataChangeListener(BTLPBungeeDataKeys.DATA_KEY_IS_HIDDEN, dummyListener);
3
imagej/imagej-server
src/main/java/net/imagej/server/ImageJServer.java
[ "public class ImageJServerHealthCheck extends HealthCheck {\n\n\t@Override\n\tprotected Result check() throws Exception {\n\t\t// NB: not implemented yet\n\t\treturn Result.healthy();\n\t}\n}", "@Path(\"/admin\")\npublic class AdminResource {\n\t\n\t@Inject\n\tprivate Environment env;\t\n\n\t/**\n\t * Stop the im...
import net.imagej.server.health.ImageJServerHealthCheck; import net.imagej.server.resources.AdminResource; import net.imagej.server.resources.ModulesResource; import net.imagej.server.resources.ObjectsResource; import net.imagej.server.services.DefaultJsonService; import net.imagej.server.services.DefaultObjectService;...
/* * #%L * ImageJ server for RESTful access to ImageJ. * %% * Copyright (C) 2013 - 2016 Board of Regents of the University of * Wisconsin-Madison. * %% * 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...
jsonService = new DefaultJsonService(ctx, objectService);
4
timeforcoffee/timeforcoffee-android
wear/src/main/java/ch/liip/timeforcoffee/TimeForCoffeeWearModule.java
[ "public class ConnectionService {\n\n private final EventBus eventBus;\n private final BackendService backendService;\n\n @Inject\n public ConnectionService(EventBus eventBus, BackendService backendService) {\n this.backendService = backendService;\n this.eventBus = eventBus;\n this...
import com.google.gson.Gson; import com.google.gson.GsonBuilder; import org.greenrobot.eventbus.EventBus; import java.util.Date; import javax.inject.Singleton; import ch.liip.timeforcoffee.api.ConnectionService; import ch.liip.timeforcoffee.api.DepartureService; import ch.liip.timeforcoffee.api.StationService; import c...
package ch.liip.timeforcoffee; @Module( injects = { WearPresenter.class, StationListFragment.class,
DepartureListFragment.class,
6
mojohaus/mrm
mrm-servlet/src/main/java/org/codehaus/mojo/mrm/servlet/FileSystemServlet.java
[ "public class DefaultDirectoryEntry\n extends AbstractEntry\n implements DirectoryEntry\n{\n /**\n * Ensure consistent serialization.\n *\n * @since 1.0\n */\n private static final long serialVersionUID = 1L;\n\n /**\n * Creates an entry in the specified file system with the speci...
import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.io.Reader; import java.net.HttpURLConnection; import java.net.InetAddress; import java.net.UnknownHostException; import java.text.SimpleDateFormat; import java.util.Collections; import java....
if ( dirEntry.getParent() != null ) { w.println( "<a href='../'>../</a>" ); } SimpleDateFormat format = new SimpleDateFormat( "dd-MMM-yyyy hh:mm" ); if ( entries != null ) { for ( int i = 0; i < entries.length; i++ )...
parent = new DefaultDirectoryEntry( fileSystem, parent, parts[i] );
0
wanasit/chrono-java
src/main/java/com/wanasit/chrono/parser/en/ENMonthNameLittleEndianParser.java
[ "public class ChronoOption {\n\n public static final ChronoOption sharedOptions = standardOptions();\n\n public final List<Parser> parsers = new ArrayList<Parser>();\n public final List<Refiner> refiners = new ArrayList<Refiner>();\n\n public final Map<String, Integer> timezoneMap = new HashMap<String, ...
import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.wanasit.chrono.ChronoOption; import com.wanasit.chrono.ParsedDateComponent; import com.wanasit.chrono.ParsedDateComponent.Components; import com.wanasit.chrono.parser.Par...
package com.wanasit.chrono.parser.en; public class ENMonthNameLittleEndianParser extends ParserAbstract { protected static String regPattern = "(\\W|^)((Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sun|Mon|Tue|Wed|Thu|Fri|Sat)\\s*,?\\s*)?([0-9]{1,2})(st|nd|rd|th)?(\\s*(to|\\-|\\s)\\s*([0-9]{1,2})(st...
result.start.assign(Components.Year, calendar.get(Calendar.YEAR));
2
RestComm/sctp
sctp-impl/src/main/java/org/mobicents/protocols/sctp/ManagementImpl.java
[ "public interface Association {\n\n\t/**\n\t * Return the Association channel type TCP or SCTP\n\t * \n\t * @return\n\t */\n\tpublic IpChannelType getIpChannelType();\n\n\t/**\n\t * Return the type of Association CLIENT or SERVER\n\t * \n\t * @return\n\t */\n\tpublic AssociationType getAssociationType();\n\n\t/**\n...
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.Selector; import java.nio.channels.spi.SelectorProvider; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import ja...
Double valTB1 = reader .read(NettySctpManagementImpl.CONG_CONTROL_BACK_TO_NORMAL_DELAY_THRESHOLD_1, Double.class); Double valTB2 = reader .read(NettySctpManagementImpl.CONG_CONTROL_BACK_TO_NORMAL_DELAY_THRESHOLD_2, Double.class); ...
return addServer(serverName, hostAddress, port, IpChannelType.SCTP, false, 0, null);
3
limdingwen/space-cubes
src/com/github/limdingwen/SpaceCubes/World/World.java
[ "public class Debug {\n\tpublic static final int LVL_INFO = 2;\n\tpublic static final int LVL_WARN = 1;\n\tpublic static final int LVL_ERROR = 0;\n\n\tpublic static final int LEVEL_OF_LOG = 1;\n\n\t// -1: Turn off debugging\n\t// 0: Errors\n\t// 1: Warnings and errors\n\t// 2: Info, warnings and errors\n\t\n\tstati...
import org.lwjgl.util.vector.Vector3f; import com.github.limdingwen.SpaceCubes.Debug; import com.github.limdingwen.SpaceCubes.BlockTypes.Block; import com.github.limdingwen.SpaceCubes.BlockTypes.Material; import com.github.limdingwen.SpaceCubes.DataTypes.Vector2i; import com.github.limdingwen.SpaceCubes.DataTypes.Vecto...
package com.github.limdingwen.SpaceCubes.World; public class World { public static final int WORLD_LENGTH = 30; public Chunk[][] chunks = new Chunk[WORLD_LENGTH][WORLD_LENGTH]; public static final int CHUNK_LENGTH = 16; public static final int CHUNK_HEIGHT = 128; public int time = 0; public static final ...
(int) Math.floor(pos.x / (BlockRenderEngine.doubleBs)),
5
LTTPP/Eemory
org.lttpp.eemory/src/org/lttpp/eemory/exception/ThrowableHandler.java
[ "public final class Constants {\n\n private Constants() {\n\n }\n\n public static final String EVERNOTE_INTERNATIONAL = \"Evernote International\";\n public static final String EVERNOTE_YINXIANG = \"印象笔记\";\n public static final String EVERNOTE_SANDBOX = \"Evernote Sandbox\";\n\n // Command IDs\n ...
import org.apache.commons.lang3.exception.ExceptionUtils; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.runtime.IStatus; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.lttpp.eemory.Constants; import org.lttpp.eemory.EemoryPlugin; import org.lttpp....
package org.lttpp.eemory.exception; public class ThrowableHandler { public static void openError(final Shell shell, final String message) { EclipseUtil.openErrorSyncly(shell, Messages.Plugin_Error_Occurred, message); } public static boolean handleDesignTimeErr(final Shell shell, final Throwable...
return new EDAMNotFoundHandler(EncryptionUtil.decrypt(IDialogSettingsUtil.get(Constants.PLUGIN_SETTINGS_KEY_TOKEN))).fixNotFoundException((EDAMNotFoundException) e, args);
7
roshakorost/Phial
phial-overlay/src/main/java/com/mindcoders/phial/internal/share/ShareView.java
[ "public interface OverlayCallback {\n\n /**\n * Called to close phial debug window\n */\n void finish();\n\n\n /**\n * Finds view in application view hierarchy\n *\n * @param id view id.\n * @return view or null if view is missing\n */\n @Nullable\n View findViewById(int i...
import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.content.Context; import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; import android.support.annotation.VisibleForTesting; import android.view.LayoutInflater; import android.view.View; ...
package com.mindcoders.phial.internal.share; /** * Created by rost on 10/22/17. */ public class ShareView extends FrameLayout implements PageView { private final GridView contentGV; private final EditText messageTV; private final ShareManager shareManager;
private final AttachmentManager attachmentManager;
4
kwatters/solrgraph
src/test/java/com/kmwllc/search/graph/GraphQueryOldTest.java
[ "public class AndExpression extends Expression {\r\n\r\n\tpublic AndExpression() {\r\n\t\tsuper(Operator.AND);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}\r\n\r\n}\r", "public class Expression {\r\n\r\n\tprivate ArrayList<Expression> expressions;\r\n\t\r\n\t// TODO: an expression should have at minimum ...
import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.request.SolrQueryRequest; import org.junit.BeforeClass; import org.junit.Test; import com.kmwllc.search.solr.client.AndExpression; import com.kmwllc.search....
package com.kmwllc.search.graph; /* * Licensed to KMW Technology LLC - All rights reserved. */ public class GraphQueryOldTest extends SolrTestCaseJ4 { @BeforeClass public static void beforeTests() throws Exception { initCore("solrconfig.xml","schema.xml", "solr", "graph"); } @Te...
startNodes.add(new PhraseTerm("id", "doc_1"));
3
ShprAlex/SproutLife
src/com/sproutlife/gamesteplistener/WarmupGameStepListener.java
[ "public class GameModel {\n private Echosystem echosystem;\n private GameClock clock;\n private GameStep gameStep;\n private GameThread gameThread;\n private Settings settings;\n private Stats stats;\n\n public GameModel(Settings settings, ReentrantReadWriteLock interactionLock) {\n this...
import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import com.sproutlife.model.GameModel; import com.sproutlife.model.GameThread; import com.sproutlife.model.step.GameStep.StepType; import...
package com.sproutlife.gamesteplistener; public class WarmupGameStepListener implements GameStepListener{ PanelController pc; boolean autoAdjustSpeed; boolean autoAdjustDisplayLayers; public WarmupGameStepListener(PanelController panelController) { this.pc = panelController; this.au...
private GameThread getGameThread() {
1
spullara/mysql-connector-java
src/test/java/testsuite/regression/ResultSetRegressionTest.java
[ "public abstract class BaseTestCase extends TestCase {\n\tprivate final static String ADMIN_CONNECTION_PROPERTY_NAME = \"com.mysql.jdbc.testsuite.admin-url\";\n\n\tprivate final static String NO_MULTI_HOST_PROPERTY_NAME = \"com.mysql.jdbc.testsuite.no-multi-hosts-tests\";\n\n\t/**\n\t * JDBC URL, initialized from c...
import java.io.Reader; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.math.BigDecimal; import java.sql.CallableStatement; import java.sql.Clob; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.Date; import jav...
createTable("testBug26173", "(fkey int, fdate date, fprice decimal(15, 2), fdiscount decimal(5,3))"); this.stmt .executeUpdate("insert into testBug26173 values (1, '2007-02-23', 99.9, 0.02)"); Connection fetchConn = null; Statement stmtRead = null; Properties props = new Properties(); props.setPr...
throw new RuntimeException(Util.stackTraceToString(ex),
4
apache/geronimo-gshell
gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/EchoCommand.java
[ "public interface Command\n{\n /** Standard command success status code. */\n int SUCCESS = 0;\n\n /** Standard command failure status code. */\n int FAILURE = -1;\n\n String getName();\n\n void init(CommandContext context); // throws Exception ?\n\n Object execute(Object... args) throws Except...
import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.OptionBuilder; import org.apache.commons.cli.Options; import org.apache.geronimo.gshell.command.Command; import org.apache.geronimo.gshell.command.CommandSupport; import org.apache.geronimo.gshell.command.MessageSource; import org.apache.geronimo....
/* * 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 ...
return Command.SUCCESS;
0
jpush/jmessage-android-uikit
Chatting/src/cn/jmessage/android/uikit/chatting/ChatActivity.java
[ "public class BitmapLoader {\n\n public static Bitmap getBitmapFromFile(String path, int width, int height) {\n BitmapFactory.Options opts = null;\n if (path != null) {\n if (width > 0 && height > 0) {\n opts = new BitmapFactory.Options();\n opts.inJustDecod...
import android.app.Activity; import android.app.Dialog; import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.content.Intent; import android.content.IntentFilter...
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(mPhotoPath))); try { startActivityForResult(intent, REQUEST_CODE_TAKE_PHOTO); } catch (ActivityNotFoundException anf) { Toast.makeText(mContext, IdHelper.getString(mContext, "camera_not_pre...
Bitmap bitmap = BitmapLoader.getBitmapFromFile(originPath, 720, 1280);
0
jjhesk/slideSelectionList
SmartSelectionList/app/src/main/java/com/tradlulu/demoCollectionList/SimpleFast.java
[ "public abstract class DynamicAdapter<H extends LevelResources> extends FragmentStatePagerAdapter {\n private int level_current;\n protected ArrayList<H> levelObjects = new ArrayList<>();\n protected Fragment firstPage;\n protected H firstPageListConfiguration;\n private ArrayList<SimpleSingleList> v...
import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import com.hkm.slideselection.V1.DynamicAdapter; import com.hkm.slideselection.app.SimpleStepSelectionFragment; import com.hkm.slideselection.worker.SelectChoice; import com.hkm.slideselection.app.HbSelectionFragment; ...
package com.tradlulu.demoCollectionList; /** * Created by hesk on 16/9/15. */ public class SimpleFast extends AppCompatActivity implements bridgeChanger { SimpleStepSelectionFragment thecontroller; Handler uiHandler = new Handler(); @Override protected void onCreate(Bundle savedInstanceState) { ...
public void SelectNow(final ViewPagerHolder pager, final DynamicAdapter mAdapter, final SelectChoice choice) {
0
abego/treelayout
org.abego.treelayout.demo/src/main/java/org/abego/treelayout/demo/swing/SwingDemo.java
[ "public interface TreeForTreeLayout<TreeNode> {\n\n\t/**\n\t * Returns the the root of the tree.\n\t * <p>\n\t * Time Complexity: O(1)\n\t * \n\t * @return the root of the tree\n\t */\n\tTreeNode getRoot();\n\n\t/**\n\t * Tells if a node is a leaf in the tree.\n\t * <p>\n\t * Time Complexity: O(1)\n\t * \n\t * @par...
import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JDialog; import org.abego.treelayout.TreeForTreeLayout; import org.abego.treelayout.TreeLayout; import org.abego.treelayout.demo.SampleTreeFactory; import org.abego.treelayout.demo.TextInBox; import org.abego.treelayout.demo.TextInBoxNo...
/* * [The "BSD license"] * Copyright (c) 2011, abego Software GmbH, Germany (http://www.abego.org) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code ...
private static TreeForTreeLayout<TextInBox> getSampleTree(String treeName) {
3
aserg-ufmg/ModularityCheck
modularitycheck/src/br/ufmg/dcc/labsoft/aserg/modularitycheck/bugparser/parser/Parser.java
[ "public class Bug {\n\n\tprivate String id;\n\tprivate String text;\n\tprivate Set<String> modifiedFiles;\n\n\t@Override\n\tpublic int hashCode() {\n\t\tint result = HashCodeUtils.SEED;\n\t\tresult = HashCodeUtils.hash(result, id);\n\t\treturn result;\n\t}\n\n\tpublic Bug(String id) {\n\t\tthis.id = id;\n\t\ttext =...
import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.ArrayList; import java.util.Set; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Display; import org.jdom.JDOMExce...
package br.ufmg.dcc.labsoft.aserg.modularitycheck.bugparser.parser; public class Parser { // Repository manager: public static final int MANAGER_GIT = 1; public static final int MANAGER_SVN = 2; // Repository type: public static final int TYPE_BUGZILLA = 1; public static final int TYPE_TIGRIS = 3; public s...
Set<Bug> linkedBugs = null;
0
jesse-gallagher/frostillic.us-Blog
frostillicus-blog/frostillicus-blog-j2ee/src/main/java/api/atompub/BlogResource.java
[ "@RequestScoped\n@Named(\"userInfo\")\npublic class UserInfoBean {\n\tpublic static final String ROLE_ADMIN = \"admin\"; //$NON-NLS-1$\n\n\t@Inject @Named(\"darwinoContext\")\n\tDarwinoContext context;\n\n\t@SneakyThrows\n\tpublic String getImageUrl(final String userName) {\n\t\tString md5 = StringUtil.md5Hex(Strin...
import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.ResourceBundle; import java.util.stream.Collectors; import java.util.stream.IntStream; import javax.annotation.security.RolesAllowed; import javax....
/* * Copyright © 2012-2020 Jesse Gallagher * * 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...
var postsRoot = PostController.class.getAnnotation(Path.class).value();
1
cmongis/psfj
src/knop/psfj/exporter/HTMLDataSetExporter.java
[ "public class BeadFrameList extends ArrayList<BeadFrame> {\n\n\t/**\n\t * The bead hashmap. This hashmap is used for retrieving beads by there id.\n\t * However, it becomes useless when mixing beads from different sources.\n\t * */\n\tHashMap<Integer, BeadFrame> beadHash = new HashMap<Integer, BeadFrame>();\n\n\t\n...
import knop.psfj.resolution.Microscope; import knop.psfj.utils.MathUtils; import knop.psfj.utils.TextUtils; import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; import org.w3c.dom.Document; import org.xml.sax.InputSource; import java.io.StringReader; import java.util.HashMap; import javax.xml.parsers...
/* This file is part of PSFj. PSFj is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. PSFj is distributed in the hope ...
PSFj.getHeatmapName(PSFj.FWHM_KEY,0, i-1),
4
arantius/TiVo-Commander
src/com/arantius/tivocommander/NowShowing.java
[ "public enum MindRpc {\n INSTANCE;\n\n private static class AlwaysTrustManager implements X509TrustManager {\n public void checkClientTrusted(X509Certificate[] cert, String authType)\n throws CertificateException {\n }\n\n public void checkServerTrusted(X509Certificate[] cert, String authType)\n ...
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import android.app.Activity; import android.content.Intent; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Tex...
if (range.activeMax > range.max + 30000) { Utils.logDebug(String.format(Locale.US, "Adjusting end forward becase %d >> %d", range.activeMax, range.max)); range.absoluteEnd += millisHalfHour; range.max += millisHalfHour; } else if (range.activeMax > range.max) { range.acti...
WhatsOnSearch whatsOnRequest = new WhatsOnSearch();
5
skyem123/skyeZ80emu
src/main/java/uk/co/skyem/projects/emuZ80/asm/Assembler.java
[ "public static class InvalidASMDirectiveException extends AssemblerException {\n\tpublic InvalidASMDirectiveException(String name, int lineNumber, String line) {\n\t\tsuper(lineNumber, line, \"Found an invalid ASM directive \\\"\" + name + \"\\\", Specified greedy for ASM directive, maybe you are looking for a norm...
import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; import uk.co.skyem.projects.emuZ80.asm.AssemblerException.InvalidASMDirectiveException; import uk.co.skyem.projects.emuZ80.asm.AssemblerException.InvalidInstructionException; import uk.co.skyem.projects.emuZ80.asm.Token.*; ...
package uk.co.skyem.projects.emuZ80.asm; public class Assembler { private static final HashMap<String, Supplier<Instruction>> instructions = new HashMap<>(); private static final HashMap<String, Supplier<ASMDirective>> asmDirectives = new HashMap<>(); static { registerInstruction("LD", LD::new); registerIn...
private ASMDirective getASMDirective(String name, String arguments) throws InvalidASMDirectiveException {
0
mfit/PdfTableAnnotator
src/main/java/at/tugraz/kti/pdftable/cli/Batch.java
[ "public class DocumentTables {\n\t\n\tpublic HashMap<Integer, ArrayList<DocumentTable>> annotationsOnPage;\n\t\n\tpublic DocumentTables() {\n\t\tannotationsOnPage = new HashMap<Integer, ArrayList<DocumentTable>>();\n\t}\n\t\n\t/**\n\t * Remove a table by specifying page number and table id.\n\t * @param pagen\n\t *...
import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerFactoryConfigurationError; import at.tugraz.kti.pdftable.document.DocumentTables; import at.tugraz.kti.pdftable.document.RichDo...
package at.tugraz.kti.pdftable.cli; /** * Command-line user interface. * You can: * - import directories * - examine a repository / working-set * - create exports of single files * - create exports of all the documents in a repository / working-set * @author "matthias frey" */ public class Batch { /** ...
RepositoryAccess repo = app.getRepositoryAccess(reponame, workingset);
7
asaflevy/SelenuimExtend
src/test/java/com/outbrain/selenium/extjs/core/tests/GridComponentTest.java
[ "public class Grid extends Component {\r\n /**\r\n * Field gridExp.\r\n */\r\n String gridExp = \"\";\r\n\r\n /**\r\n * Constructor for Grid.\r\n * @param locator ComponentLocator\r\n */\r\n public Grid(final ComponentLocator locator) {\r\n super(locator);\r\n gridExp = getExpression();\r\n }\r...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import junit.framework.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; import com.outbrain.selenium.extjs.components.Grid; import com.outbrain.selenium.extjs.core.locators.ComponentLocator;...
package com.outbrain.selenium.extjs.core.tests; /** * @author Asaf Levy * @version $Revision: 1.0 */ public class GridComponentTest { /** * Field loc. */ ComponentLocatorFactory loc; /** * Field sel. */ Selenium sel; /** * Method setUp. * @throws Exception ...
final Grid grid = new Grid(locator);
0
idega/is.idega.idegaweb.egov.company
src/java/is/idega/idegaweb/egov/company/presentation/institution/ApplicationApproverRejecter.java
[ "public class EgovCompanyConstants {\n\n\tprivate EgovCompanyConstants() {}\n\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"is.idega.idegaweb.egov.company\";\n\n\tpublic static final String COMPANY_SUPER_ADMIN_ROLE = \"company_super_admin\";\n\tpublic static final String COMPANY_ADMIN_ROLE = \"company_admi...
import is.idega.idegaweb.egov.application.data.Application; import is.idega.idegaweb.egov.application.presentation.ApplicationCreator; import is.idega.idegaweb.egov.company.EgovCompanyConstants; import is.idega.idegaweb.egov.company.business.CompanyApplicationBusiness; import is.idega.idegaweb.egov.company.data.Company...
package is.idega.idegaweb.egov.company.presentation.institution; public class ApplicationApproverRejecter extends CompanyBlock { private static final String CLOSURE_TEXT = "application_closure_explanation_text"; private static final String REJECTION_EXPLANATION_TEXT = "application_rejection_explanation_text"; ...
CompanyApplicationViewer appViewer = new CompanyApplicationViewer();
4
webpagebytes/demo-cms-app
src/main/java/com/webpagebytes/wpbsample/controllers/PerformDepositController.java
[ "public class Account {\r\n\tprivate int user_id;\r\n\tprivate long balance;\r\n\t\r\n\tpublic int getUser_id() {\r\n\t\treturn user_id;\r\n\t}\r\n\tpublic void setUser_id(int user_id) {\r\n\t\tthis.user_id = user_id;\r\n\t}\r\n\tpublic long getBalance() {\r\n\t\treturn balance;\r\n\t}\r\n\tpublic void setBalance(l...
import com.webpagebytes.wpbsample.data.DepositWithdrawal.OperationType; import com.webpagebytes.wpbsample.data.Session; import com.webpagebytes.wpbsample.data.User; import com.webpagebytes.wpbsample.utility.HashService; import java.io.IOException; import java.security.NoSuchAlgorithmException; import java.sql.SQL...
/* * Copyright 2015 Webpagebytes * * 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 ...
DepositWithdrawal operation = database.createDepositOrWithdrawal(user_id, OperationType.DEPOSIT, amount);
2
turbomanage/storm-gen
storm-apt/api/src/main/java/com/turbomanage/storm/query/Query.java
[ "public abstract class SQLiteDao<T> {\n\n\tprivate static final String TAG = SQLiteDao.class.getName();\n\n\tprivate final Context mContext;\n\tprotected final TableHelper<T> th;\n\n\t/**\n\t * Constructor requires the {@link Context}, which you typically\n\t * obtain by calling {@link Activity#getApplicationContex...
import java.util.ArrayList; import java.util.List; import android.database.Cursor; import com.turbomanage.storm.SQLiteDao; import com.turbomanage.storm.TableHelper.Column; import com.turbomanage.storm.types.BooleanConverter; import com.turbomanage.storm.types.ByteConverter; import com.turbomanage.storm.types.CharConver...
/******************************************************************************* * Copyright 2012 Google, 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.o...
String sqlValue = EnumConverter.GET.toSql(param);
5
ibcn-cloudlet/firefly
be.iminds.iot.things.rule.engine.provider/src/be/iminds/iot/things/rule/command/RuleCommands.java
[ "public interface Rule extends Serializable {\n\n\t/**\n\t * Evaluates the rule, returns whether it is triggered or not\n\t * \n\t * @param change the change that can cause the rule to trigger\n\t */\n\tpublic boolean evaluate(Change change);\n\t\n\t/**\n\t * Get the type identifier of this Rule\n\t */\n\tpublic St...
import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import be.iminds.iot.things.rule.api.Rule; import be.iminds.iot.things.rule.api.RuleDTO; import be.iminds.iot.things.rule.api.RuleEngine; import be.iminds.iot.things.rule.api.RuleFactory; import be.iminds.i...
/******************************************************************************* * Copyright (c) 2015, Tim Verbelen * Internet Based Communication Networks and Services research group (IBCN), * Department of Information Technology (INTEC), Ghent University - iMinds. * All rights reserved. * * Redistribution ...
((SimpleRuleEngine)engine).load(file);
4
MarcProe/lp2go
app/src/main/java/org/librepilot/lp2go/ui/opengl/OpenGl3DMagCalView.java
[ "public class VisualLog {\r\n\r\n //private static Activity activity;\r\n private static String nullstring = \"null\";\r\n //private static TextView txtDebugLog;\r\n\r\n static private String checkNull(String msg) {\r\n return msg == null ? nullstring : msg;\r\n }\r\n\r\n static public void...
import android.content.Context; import android.opengl.GLSurfaceView; import android.opengl.GLU; import android.opengl.Matrix; import android.util.AttributeSet; import android.widget.Toast; import com.badlogic.gdx.math.Quaternion; import com.badlogic.gdx.math.Vector3; import org.librepilot.lp2go.VisualLog; import org.li...
/* * @file OpenGl3DMagCalView.java * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016. * @see The GNU Public License (GPL) Version 3 * * 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 *...
public FitPoints fit(boolean isAuxMag) {
2
jpaoletti/jPOS-Presentation-Manager
modules/pm_struts/src/org/jpos/ee/pm/struts/PMEntitySupport.java
[ "public class Entity extends PMCoreObject {\n\n /**Represents the entity id. This must me unique.*/\n private String id;\n /**The full name of the class represented by the entity.*/\n private String clazz;\n /**A filter for the list of instances of the entity.\n * <br/>{@code <listfilter class=\"...
import org.jpos.ee.pm.core.EntityContainer; import javax.servlet.http.HttpServletRequest; import org.jpos.ee.pm.core.Entity; import org.jpos.ee.pm.core.EntityFilter; import org.jpos.ee.pm.core.EntitySupport; import org.jpos.ee.pm.core.PMSession; import org.jpos.ee.pm.core.PaginatedList;
/* * jPOS Project [http://jpos.org] * Copyright (C) 2000-2010 Alejandro P. Revilla * * 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 (a...
public Entity getEntity() throws PMStrutsException {
0
SecUSo/privacy-friendly-pedometer
app/src/main/java/org/secuso/privacyfriendlyactivitytracker/utils/StepDetectionServiceHelper.java
[ "public class Factory {\n\n /**\n * Returns the class of the step detector service which should be used\n *\n * The used step detector service depends on different soft- and hardware preferences.\n * @param context An instance of the calling Context\n * @return The class of step detector\n ...
import org.secuso.privacyfriendlyactivitytracker.receivers.StepCountPersistenceReceiver; import org.secuso.privacyfriendlyactivitytracker.receivers.WidgetReceiver; import org.secuso.privacyfriendlyactivitytracker.services.AccelerometerStepDetectorService; import org.secuso.privacyfriendlyactivitytracker.services.Hardwa...
/* Privacy Friendly Pedometer is licensed under the GPLv3. Copyright (C) 2017 Tobias Neidig 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 ...
Intent motivationAlertIntent = new Intent(context, MotivationAlertReceiver.class);
2
godrin/TowerDefense
defend/src/com/cdm/defend/DefendGame.java
[ "public interface Game {\n\tvoid setScreen(Screen newScreen);\n\n\tvoid setScreen(String string);\n\n\tvoid play(Type soundType);\n}", "public class SoundFX {\n\n\tpublic enum Type {\n\t\tKLICK, SHOT, SHOT2, HIT, HIT2, HURT, STUNRAY, LOOSE, WIN, WIN2, LEVEL1, LEVEL2\n\t};\n\n\tprivate static Map<Type, Sound> soun...
import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.GL10; import com.cdm.Game; import com.cdm.gui.effects.SoundFX; import com.cdm.gui.effects.SoundFX.Type; import com.cdm.view.Campaign; import com.cdm.view.HighScoreScreen; import com.cdm.view.InputScreen; ...
package com.cdm.defend; // review1 public class DefendGame implements ApplicationListener, Game { private static final long serialVersionUID = 1L; private boolean running = false; private Screen screen; boolean stop = false; private LevelScreen levelScreen; private LevelScreen demoScreen; privat...
public void play(Type soundType) {
2
flapdoodle-oss/de.flapdoodle.embed.process
src/test/java/de/flapdoodle/embed/process/store/StaticArtifactStoreTest.java
[ "@Value.Immutable\npublic abstract class Distribution {\n\n\t@Parameter\n\tpublic abstract Version version();\n\n\t@Parameter\n\tpublic abstract Platform platform();\n\n\t@Override\n\tpublic String toString() {\n\t\treturn \"\" + version() + \":\" + platform();\n\t}\n\n\tpublic static Distribution detectFor(Version...
import org.junit.Test; import de.flapdoodle.embed.process.distribution.Distribution; import de.flapdoodle.embed.process.distribution.Version; import de.flapdoodle.embed.process.extract.ExtractedFileSet; import de.flapdoodle.embed.process.io.directories.PropertyOrPlatformTempDir; import de.flapdoodle.embed.process.io.fi...
/** * Copyright (C) 2011 * Michael Mosmann <michael@mosmann.de> * Martin Jöhren <m.joehren@googlemail.com> * * with contributions from * konstantin-ba@github, Archimedes Trajano (trajano@github), Kevin D. Keck (kdkeck@github), Ben McCann (benmccann@github) * * Licensed under the Apache License, Version ...
Distribution distribution=Distribution.detectFor(Version.of("13.7.121"));
1
Effervex/CycDAG
src/graph/module/cli/QueryCommand.java
[ "public class EdgeModifier {\r\n\t/**\r\n\t * Returns the encapsulated nodes in an array of nodes if they are modified.\r\n\t *\r\n\t * @param nodes\r\n\t * The possibly encapsulated nodes to return (without modifier).\r\n\t * @param dag\r\n\t * The DAG access.\r\n\t * @return Either the same ...
import graph.core.EdgeModifier; import graph.core.ErrorEdge; import graph.core.Node; import graph.core.cli.CollectionCommand; import graph.core.cli.DAGPortHandler; import graph.inference.QueryObject; import graph.inference.QueryResult; import graph.inference.Substitution; import graph.inference.VariableNode; i...
/******************************************************************************* * Copyright (C) 2013 University of Waikato, Hamilton, New Zealand. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this dist...
QueryModule queryModule = (QueryModule) dagHandler.getDAG().getModule(
5
JANNLab/JANNLab
examples/de/jannlab/examples/recurrent/DifferentialEvolutionExample.java
[ "public interface Net extends Serializable {\n //\n /**\n * Resets the network, which means that all inner\n * states (activations, derivations) are set to 0.0.\n * The method also resets the time index which is 0\n * after doing reset.\n */\n public void reset();\n /**\n * Initi...
import de.jannlab.core.CellType; import de.jannlab.examples.tools.OnlineDiagram; import de.jannlab.generator.RNNGenerator; import de.jannlab.optimization.BasicIterationListener; import de.jannlab.optimization.Objective; import de.jannlab.optimization.diffevo.DifferentialEvolution; import de.jannlab.optimization.diffevo...
/******************************************************************************* * JANNLab Neural Network Framework for Java * Copyright (C) 2012-2013 Sebastian Otte * * 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 * th...
final OnlineDiagram diagram = new OnlineDiagram(
2
dpr-odoo/trainee-om-shop
app/src/main/java/com/odoo/core/service/OSyncAdapter.java
[ "public class IrModel extends OModel {\n public static final String TAG = IrModel.class.getSimpleName();\n public static String AUTHORITY = App.APPLICATION_ID + \".core.provider.content.sync.ir_model\";\n OColumn name = new OColumn(\"Model Description\", OVarchar.class).setSize(100);\n OColumn model = n...
import android.accounts.Account; import android.content.AbstractThreadedSyncAdapter; import android.content.ContentProviderClient; import android.content.Context; import android.content.SyncResult; import android.os.Bundle; import android.util.Log; import com.odoo.App; import com.odoo.R; import com.odoo.base.addons.ir....
/** * Odoo, Open Source Management Solution * Copyright (C) 2012-today Odoo SA (<http:www.odoo.com>) * <p/> * 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 ...
private OPreferenceManager preferenceManager;
6
NaikSoftware/J2meLoader
app/src/main/java/javax/microedition/lcdui/event/CommandActionEvent.java
[ "public class Command implements Comparable<Command>\r\n{\r\n\tpublic static final int SCREEN = 1;\r\n\tpublic static final int BACK = 2;\r\n\tpublic static final int CANCEL = 3;\r\n\tpublic static final int OK = 4;\r\n\tpublic static final int HELP = 5;\r\n\tpublic static final int STOP = 6;\r\n\tpublic static fin...
import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Event; import javax.microedition.lcdui.Item; import javax.microedition.lcdui.ItemCommandListener; import javax.microedition.util.ArrayStack;
/* * Copyright 2012 Kulikov Dmitriy * * 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 ...
private Item item;
4
sandrios/sandriosCamera
sandriosCamera/src/main/java/com/sandrios/sandriosCamera/internal/controller/impl/Camera2Controller.java
[ "public final class CameraConfiguration {\n\n public static final int MEDIA_QUALITY_AUTO = 10;\n public static final int MEDIA_QUALITY_LOWEST = 15;\n public static final int MEDIA_QUALITY_LOW = 11;\n public static final int MEDIA_QUALITY_MEDIUM = 12;\n public static final int MEDIA_QUALITY_HIGH = 13;...
import android.annotation.TargetApi; import android.os.Build; import android.os.Bundle; import android.util.Log; import android.view.TextureView; import com.sandrios.sandriosCamera.internal.configuration.CameraConfiguration; import com.sandrios.sandriosCamera.internal.configuration.ConfigurationProvider; import com.san...
package com.sandrios.sandriosCamera.internal.controller.impl; /** * Created by Arpit Gandhi on 7/6/16. */ @TargetApi(Build.VERSION_CODES.LOLLIPOP) public class Camera2Controller implements CameraController<String>, CameraOpenListener<String, TextureView.SurfaceTextureListener>, CameraPhotoListener...
private CameraManager<String, TextureView.SurfaceTextureListener> camera2Manager;
3
mokszr/ultimate-geojson
ugeojson-parser/src/main/java/org/ugeojson/parser/deserializer/MultiPolygonDeserializer.java
[ "public class PositionDto implements Serializable {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate double[] numbers;\n\n\t/**\n\t * This constructor initializes numbers field to hold two double numbers. Do\n\t * not use this constructor if you need the third elevation parameter.\n\t */\n\tpublic...
import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import org.ugeojson.model.PositionDto; import org.ugeojson.model.geometry.LineStringDto; import org.ugeojson.model.geometry.MultiPolygonDto; import org.ugeojson.model.geometry.PolygonDto; import org.ugeojson.parser.util.BoundingBoxParser;...
package org.ugeojson.parser.deserializer; /** * Deserializer for MultiPolygon * * @author moksuzer * */ public class MultiPolygonDeserializer implements JsonDeserializer<MultiPolygonDto> { @Override public MultiPolygonDto deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) { ...
Type positionCollectionType = new TypeToken<List<PositionDto>>() {
0
codingricky/marvel-rest-client
src/test/java/com.github.codingricky.marvel/StoriesRestTest.java
[ "public class Comic {\n private int id;\n private int digitalId;\n private String title;\n private double issueNumber;\n private String variantDescription;\n private String description;\n private String modified;\n private String isbn;\n private String upc;\n private String diamondCode...
import com.github.codingricky.marvel.model.Comic; import com.github.codingricky.marvel.model.Creator; import com.github.codingricky.marvel.model.MarvelCharacter; import com.github.codingricky.marvel.model.Result; import com.github.codingricky.marvel.model.Story; import com.github.codingricky.marvel.parameter.StoryParam...
package com.github.codingricky.marvel; public class StoriesRestTest extends AbstractRestTest { @Test public void testGetStories() throws Exception {
Result<Story> stories = restClient.getStories();
3
wisedog/Whoochoo
src/net/wisedog/android/whooing/activity/MountainFragment.java
[ "public class Define {\n public static boolean DEBUG = false;\n \n\tpublic static String APP_ID = \"125\";\n\tpublic static String APP_SECRET = \"1c5224ad2961704a6076c0bda127003933828a16\";\n\tpublic static String PIN = null;\n\tpublic static String REAL_TOKEN = null;\n\tpublic static int USER_ID = -1;\n\tpub...
import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import org.json.JSONException; import org.json.JSONObject; import net.wisedog.android.whooing.Define; import net.wisedog.android.whooing.R; import net.wisedog.android.whooing.WhooingApplicati...
/* * Copyright (C) 2013 Jongha Kim * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
+ "&start_date=" + WhooingCalendar.getPreMonthYYYYMM(6)
4
jGleitz/JUnit-KIT
src/final1/subtests/ExportCommandTest.java
[ "public class Input {\n\tprivate static HashMap<String, String[]> filesMap = new HashMap<>();\n\tprivate static HashMap<String[], String> reverseFileMap = new HashMap<>();\n\n\t/**\n\t * This class is not meant to be instantiated.\n\t */\n\tprivate Input() {\n\t}\n\n\t/**\n\t * Returns a path to a file containing t...
import static org.hamcrest.CoreMatchers.anyOf; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; ...
package final1.subtests; /** * Performs calls to the {@code export} command and checks the results. */ public class ExportCommandTest extends RecommendationSubtest { public ExportCommandTest() { setAllowedSystemExitStatus(SystemExitStatus.WITH_0); } /** * Asserts correct results for the example given on...
class ExportRun extends LineRun {
3
khasang/SmartForecast
Forecast/app/src/main/java/com/khasang/forecast/location/CurrentLocationManager.java
[ "public class MyApplication extends Application {\n\n private static Context context;\n\n public static Context getAppContext() {\n return MyApplication.context;\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n\n /** Проверяет, если Debug mode, то не отправляет ...
import android.Manifest; import android.content.Context; import android.content.pm.PackageManager; import android.location.Criteria; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.support.v4.app.ActivityCompat...
package com.khasang.forecast.location; /** * Created by roman on 30.01.16. */ public class CurrentLocationManager { private LocationManager locationManager; private boolean isGpsAccessGranted; private boolean gps_enabled; private boolean network_enabled; public CurrentLocationManager() { ...
PositionManager.getInstance().setCurrentLocationCoordinates(location);
5
xdrop/jRand
jrand-core/src/main/java/me/xdrop/jrand/generators/location/PhoneGenerator.java
[ "public abstract class Generator<T> {\n\n private Rand randGen;\n\n public Generator() {\n this.randGen = new Rand();\n }\n\n public Rand random() {\n return this.randGen;\n }\n\n public abstract T gen();\n\n public String repeat(int times) {\n StringBuilder sb = new String...
import me.xdrop.jrand.Generator; import me.xdrop.jrand.annotation.Facade; import me.xdrop.jrand.annotation.PropertyFlag; import me.xdrop.jrand.data.Assets; import me.xdrop.jrand.generators.basics.NaturalGenerator; import me.xdrop.jrand.generators.basics.StringGenerator; import me.xdrop.jrand.utils.Choose; import java.u...
package me.xdrop.jrand.generators.location; @Facade(accessor = "phone") public class PhoneGenerator extends Generator<String> { @PropertyFlag("Enable formatting the phone number") protected boolean formatted; @PropertyFlag("Return a mobile number") protected boolean mobile; @PropertyFlag("Retu...
this.prefixesUKLand = Assets.UK_PHONE_LAND.loadItems();
1
hdweiss/codemap
tests/src/com/hdweiss/codemap/test/CscopeWrapperTest.java
[ "public class Cscope {\n\tpublic final static boolean WITH_INDEX = true;\n\tpublic final static boolean NO_INDEX = false;\n\tpublic final static boolean WITH_REFFILE = true;\n\tpublic final static boolean NO_REFFILE = false;\n\t\n\tprivate final static String EXE_FILENAME = \"cscope\";\n\tprivate final static Strin...
import java.util.ArrayList; import java.util.HashMap; import android.content.Context; import android.test.AndroidTestCase; import com.hdweiss.codemap.data.Cscope; import com.hdweiss.codemap.data.CscopeEntry; import com.hdweiss.codemap.data.CscopeWrapper; import com.hdweiss.codemap.data.Project; import com.hdweiss.codem...
package com.hdweiss.codemap.test; /** * Tests cscope source. */ public class CscopeWrapperTest extends AndroidTestCase { private static final String PROJECT_NAME = "Testproject"; private static final int NUMBER_OF_FILES = 87; private static final String ADDTOTALS_FIRSTLINE = "extern void addTotals"; private...
private Cscope cscope;
0
dbasedow/prospecter
src/main/java/de/danielbasedow/prospecter/benchmark/IntegerIndexTest.java
[ "public enum MatchCondition {\n EQUALS,\n LESS_THAN,\n GREATER_THAN,\n LESS_THAN_EQUALS,\n GREATER_THAN_EQUALS,\n NONE,\n IN,\n RADIUS\n}", "public class Matcher {\n protected final TIntObjectHashMap<BitSet> hits = new TIntObjectHashMap<BitSet>();\n protected final TIntObjectHashMap<...
import de.danielbasedow.prospecter.core.MatchCondition; import de.danielbasedow.prospecter.core.Matcher; import de.danielbasedow.prospecter.core.Token; import de.danielbasedow.prospecter.core.document.Field; import de.danielbasedow.prospecter.core.index.IntegerIndex; import de.danielbasedow.prospecter.core.query.QueryM...
package de.danielbasedow.prospecter.benchmark; public class IntegerIndexTest { public static void main(String[] args) { IntegerIndex index = new IntegerIndex("foo"); System.out.print((new Date()).getTime()); System.out.println(" start filling index"); fillIndex(index, 1000000, Mat...
index.addPosting(token, QueryPosting.pack(i, 1, false));
6
excella-core/excella-reports
src/test/java/org/bbreak/excella/reports/listener/BreakAdapterTest.java
[ "public class ReportsTestUtil {\n\n /**\n * ログ\n */\n private static Log log = LogFactory.getLog( ReportsTestUtil.class);\n\n /**\n * XSSF最大列数\n */\n public static final int XSSF_MAX_COLUMN_NUMBER = 16384; // 2^14\n\n /**\n * HSSF最大列数\n */\n public static final int HSSF_MAX...
import org.bbreak.excella.core.exception.ParseException; import org.bbreak.excella.core.util.PoiUtil; import org.bbreak.excella.reports.ReportsTestUtil; import org.bbreak.excella.reports.processor.ReportCreateHelper; import org.bbreak.excella.reports.processor.ReportsCheckException; import org.bbreak.excella.repor...
/*- * #%L * excella-reports * %% * Copyright (C) 2009 - 2019 bBreak Systems and contributors * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
} catch ( ReportsCheckException e) {
2
mmberg/nadia
src/net/mmberg/nadia/processor/ui/RESTInterface.java
[ "public class NadiaProcessor extends UIConsumerFactory{\r\n\r\n\t\r\n\tprivate final static Logger logger = Logger.getLogger(\"nadia\"); \r\n\tprivate static boolean init=false;\r\n\tprivate static NadiaProcessorConfig config = NadiaProcessorConfig.getInstance();\r\n\tprivate static String default_dialog=config.get...
import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.Map; impo...
package net.mmberg.nadia.processor.ui; @Path("/") public class RESTInterface extends UserInterface{ private static Server server; private static int instance_counter=0; protected static HashMap<String, UIConsumer> instances = new HashMap<String, UIConsumer>(); private final static Logger logge...
if (message.getMeta()==Meta.UNCHANGED) return Response.noContent().build();
6
mjeanroy/node-maven-plugin
src/test/java/com/github/mjeanroy/maven/plugins/node/mojos/TestE2EMojoTest.java
[ "public class Command {\n\n\t/**\n\t * Command executable file, this executable will be run on operating system.\n\t */\n\tprivate final String executable;\n\n\t/**\n\t * Optional arguments (each arguments will be unique).\n\t */\n\tprivate final List<CommandArg> arguments;\n\n\t/**\n\t * Create new command providi...
import java.io.File; import static com.github.mjeanroy.maven.plugins.node.tests.ReflectTestUtils.readPrivate; import static com.github.mjeanroy.maven.plugins.node.tests.ReflectTestUtils.writePrivate; import static java.util.Collections.singletonMap; import static org.mockito.ArgumentMatchers.any; import static org.mock...
/** * The MIT License (MIT) * * Copyright (c) 2015-2021 Mickael Jeanroy * * 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...
writePrivate(mojo, "skipTestE2E", true);
4
isisaddons/isis-app-todoapp
fixture/src/main/java/todoapp/fixture/scenarios/RecreateDickUserAndRolesAndToDoItems.java
[ "public class ToDoAppFixtureServiceRoleAndPermissions extends AbstractRoleAndPermissionsFixtureScript {\n\n public static final String ROLE_NAME = \"todoapp-fixture-scripts\";\n\n public ToDoAppFixtureServiceRoleAndPermissions() {\n super(ROLE_NAME, \"Execute the ToDoApp fixture scripts\");\n }\n\n ...
import java.util.Arrays; import org.isisaddons.module.security.seed.scripts.IsisModuleSecurityRegularUserRoleAndPermissions; import todoapp.dom.seed.roles.ToDoAppFixtureServiceRoleAndPermissions; import todoapp.dom.seed.roles.ToDoAppRegularRoleAndPermissions; import todoapp.fixture.module.DeleteUserAndUserRolesAndToDoI...
/* * Copyright 2014 Dan Haywood * * Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
ec.executeChild(this, new DeleteUserAndUserRolesAndToDoItems());
2
zeevy/grblcontroller
app/src/main/java/in/co/gorest/grblcontroller/ui/ProbingTabFragment.java
[ "public class IconButton extends Button implements HasOnViewAttachListener {\n\n private HasOnViewAttachListenerDelegate delegate;\n\n public IconButton(Context context) {\n super(context);\n init();\n }\n\n public IconButton(Context context, AttributeSet attrs) {\n super(context, a...
import android.app.AlertDialog; import android.content.DialogInterface; import androidx.databinding.DataBindingUtil; import android.os.Bundle; import android.os.Handler; import androidx.annotation.NonNull; import androidx.appcompat.widget.SwitchCompat; import android.view.LayoutInflater; import android.view.View; impor...
/* * /** * * Copyright (C) 2017 Grbl Controller Contributors * * * * 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...
fragmentInteractionListener.onGcodeCommandReceived(GrblUtils.GCODE_CANCEL_TOOL_OFFSETS);
7
comtel2000/mokka7
mokka7-client/src/main/java/org/comtel2000/mokka7/client/presentation/chart/ChartViewPresenter.java
[ "public class StatusBinding {\n\n private final BooleanProperty connected = new SimpleBooleanProperty(false);\n private final BooleanProperty progress = new SimpleBooleanProperty(false);\n private final BooleanProperty pingWatchdog = new SimpleBooleanProperty(false);\n private final StringProperty statu...
import java.net.URL; import java.util.ResourceBundle; import java.util.concurrent.atomic.LongAdder; import javax.inject.Inject; import org.comtel2000.mokka7.client.presentation.StatusBinding; import org.comtel2000.mokka7.client.service.SessionManager; import org.comtel2000.mokka7.metrics.MonitoredS7Client; import org.c...
/* * PROJECT Mokka7 (fork of Snap7/Moka7) * * Copyright (c) 2017 J.Zimmermann (comtel2000) * * All rights reserved. This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at * http://www.eclipse.org...
private MonitoredS7Client client;
2
jprante/elasticsearch-knapsack
src/test/java/org/xbib/elasticsearch/plugin/knapsack/tar/KnapsackTarTests.java
[ "public class KnapsackExportRequestBuilder extends ActionRequestBuilder<KnapsackExportRequest, KnapsackExportResponse, KnapsackExportRequestBuilder> {\n\n public KnapsackExportRequestBuilder(ElasticsearchClient client) {\n super(client, KnapsackExportAction.INSTANCE, new KnapsackExportRequest());\n }\n...
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.index.qu...
package org.xbib.elasticsearch.plugin.knapsack.tar; public class KnapsackTarTests extends NodeTestUtils { private final static ESLogger logger = ESLoggerFactory.getLogger(KnapsackTarTests.class.getName()); @Test public void testTar() throws Exception { File exportFile = File.createTempFile("kn...
KnapsackStateResponse knapsackStateResponse = knapsackStateRequestBuilder.execute().actionGet();
5
ToxicBakery/Screenshot-Redaction
app/src/main/java/com/ToxicBakery/app/screenshot_redaction/dictionary/impl/DictionaryEnglishNames.java
[ "public class CopyBus extends ADefaultBus<ICopyConfiguration> {\n\n private static volatile CopyBus instance;\n\n public static CopyBus getInstance() {\n if (instance == null) {\n synchronized (CopyBus.class) {\n if (instance == null) {\n instance = new Copy...
import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.VisibleForTesting; import android.util.Log; import com.ToxicBakery.app.screenshot_redaction.R; import com.ToxicBakery.app.screenshot_redaction.bus.CopyBus; import com.ToxicBakery.app.screenshot_redaction.copy.Co...
package com.ToxicBakery.app.screenshot_redaction.dictionary.impl; public class DictionaryEnglishNames implements IDictionary { private static final String TAG = "DictionaryEnglishNames"; private static DictionaryEnglishNames instance; @VisibleForTesting
final ICopyConfiguration copyConfiguration;
2
mleoking/LeoTask
leotask/src/core/org/leores/util/data/DataTable.java
[ "public class TRuntimeException extends RuntimeException {\r\n\tprivate static final long serialVersionUID = -1540271937983801068L;\r\n\r\n\tpublic TRuntimeException() {\r\n\t\tsuper();\r\n\t\treturn;\r\n\t}\r\n\r\n\tpublic TRuntimeException(Object obj) {\r\n\t\tsuper(U.toStr(obj));\r\n\t\treturn;\r\n\t}\r\n\r\n\tp...
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import org.leores.ecpt.TRuntimeException; import org.leores.util.ObjArray; import org.leores.util.ObjArray.ObjArrayComparator; import org.leores.util.U; import org.leores.util.able.Processable2;
public boolean insert(int index, Object... objs) { boolean rtn = false; if (objs != null && objs.length == nColumns) { rtn = true; rows.add(index, objs); } return rtn; } public boolean add(Object... objs) { boolean rtn = false; if (objs != null && objs.length == nColumns) { rtn = tr...
sort(new ObjArrayComparator<Object>(bAscending));
2
Comcast/flume2storm
dynamic-location-service/src/test/java/com/comcast/viper/flume2storm/location/DynamicLocationServiceTest.java
[ "public interface TestCondition {\n\t/**\n\t * @return True when the condition is fulfilled, false otherwise\n\t */\n\tboolean evaluate();\n}", "public class TestUtils {\n private static final int DEFAULT_RETRY_TIMEOUT = 100;\n private static Random random = new Random();\n\n /**\n * @return An ephemeral por...
import com.comcast.viper.flume2storm.zookeeper.ZkTestServer; import com.comcast.viper.flume2storm.zookeeper.ZkTestUtils; import static org.assertj.core.api.Assertions.assertThat; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import junit.framework.Assert; import or...
/** * Copyright 2014 Comcast Cable Communications Management, 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 requir...
config.setConnectionTimeout(ZkTestUtils.TEST_TIMEOUT);
4
netmelody/ci-eye
src/main/java/org/netmelody/cieye/server/response/CiEyeResourceEngine.java
[ "public final class LandscapeObservation {\n\n private final List<TargetDetail> targets = new ArrayList<TargetDetail>();\n private final Set<Sponsor> dohGroup;\n \n public LandscapeObservation() {\n this(new TargetDetailGroup());\n }\n \n public LandscapeObservation(TargetDetailGroup tar...
import com.google.common.base.Function; import org.netmelody.cieye.core.domain.LandscapeObservation; import org.netmelody.cieye.core.domain.Sponsor; import org.netmelody.cieye.server.CiEyeNewVersionChecker; import org.netmelody.cieye.server.CiEyeServerInformationFetcher; import org.netmelody.cieye.server.CiSpyIntermedi...
package org.netmelody.cieye.server.response; public final class CiEyeResourceEngine implements ResourceEngine { private final CiSpyIntermediary spyIntermediary; private final LandscapeFetcher landscapeFetcher; private final PictureFetcher pictureFetcher; private final CiEyeServerInformationFetch...
return new LandscapeListResponder(landscapeFetcher);
1
xda/XDA-One
android/src/main/java/com/xda/one/ui/CreateThreadFragment.java
[ "public interface ThreadClient {\n\n public EventBus getBus();\n\n public ResponseUnifiedThreadContainer getThreads(final int forumId, final int page);\n\n public ResponseUnifiedThreadContainer getParticipatedThreads(final int page);\n\n public ResponseUnifiedThreadContainer getSubscribedThreads(final i...
import com.squareup.picasso.Picasso; import com.xda.one.R; import com.xda.one.api.inteface.ThreadClient; import com.xda.one.api.misc.Consumer; import com.xda.one.api.misc.Result; import com.xda.one.api.retrofit.RetrofitThreadClient; import com.xda.one.auth.XDAAccount; import com.xda.one.util.AccountUtils; import androi...
package com.xda.one.ui; public class CreateThreadFragment extends DialogFragment implements TextWatcher { private EditText mPostTitle; private EditText mPostContent; private int mForumId;
private ThreadClient mClient;
0
open-erp-systems/erp-backend
erp-data/src/main/java/com/jukusoft/data/repository/GroupRepository.java
[ "public class Group implements JsonSerializable {\n\n //database row\n protected JsonObject row = null;\n\n /**\n * default constructor\n *\n * @param row database row of user\n */\n public Group (JsonObject row) {\n if (row == null) {\n throw new NullPointerException(\...
import com.jukusoft.data.entity.Group; import com.jukusoft.data.entity.GroupMember; import com.jukusoft.data.entity.User; import com.jukusoft.erp.lib.cache.CacheTypes; import com.jukusoft.erp.lib.cache.ICache; import com.jukusoft.erp.lib.cache.InjectCache; import com.jukusoft.erp.lib.database.AbstractMySQLRepository; i...
package com.jukusoft.data.repository; public class GroupRepository extends AbstractMySQLRepository { @InjectCache(name = "group-cache", type = CacheTypes.LOCAL_MEMORY_CACHE) protected ICache groupCache; @InjectCache(name = "group-members-cache", type = CacheTypes.HAZELCAST_CACHE) protected ICache g...
public void getGroupsOfUser (long userID, Handler<AsyncResult<List<GroupMember>>> handler) {
1
danielshaya/reactivejournal
src/main/java/org/reactivejournal/examples/helloworld/HelloWorldTest.java
[ "public class ReactiveValidator {\n private static final Logger LOG = LoggerFactory.getLogger(ReactiveValidator.class.getName());\n private ValidationResult validationResult;\n private DataItemProcessor dataItemProcessor = new DataItemProcessor();\n\n public void validate(String fileName, Publisher flow...
import io.reactivex.Flowable; import io.reactivex.flowables.ConnectableFlowable; import org.junit.Assert; import org.junit.Test; import org.reactivejournal.impl.ReactiveValidator; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; import org.reactivejournal.impl.PlayOptions; import org.reac...
package org.reactivejournal.examples.helloworld; /** * A demo example Junit test class to test BytesToWordsProcessor. * Make sure you have run the HelloWorldApp_JounalAsObserver first to generate the journal. */ public class HelloWorldTest { private static final Logger LOG = LoggerFactory.getLogger(HelloWor...
ReactiveValidator reactiveValidator = reactiveJournal.createReactiveValidator();
0
fluxroot/jcpi
src/main/java/com/fluxchess/jcpi/AbstractEngine.java
[ "public class EngineQuitCommand implements IEngineCommand {\n\n\tpublic void accept(IEngine engine) {\n\t\tengine.receive(this);\n\t}\n\n}", "public interface IEngine {\n\n\tvoid receive(EngineInitializeRequestCommand command);\n\n\tvoid receive(EngineSetOptionCommand command);\n\n\tvoid receive(EngineQuitCommand...
import com.fluxchess.jcpi.commands.EngineQuitCommand; import com.fluxchess.jcpi.commands.IEngine; import com.fluxchess.jcpi.commands.IEngineCommand; import com.fluxchess.jcpi.commands.IProtocol; import com.fluxchess.jcpi.protocols.IOProtocolHandler; import com.fluxchess.jcpi.protocols.IProtocolHandler; import java.io.B...
/* * Copyright 2007-2019 The Java Chess Protocol Interface Project 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 * * Unle...
private final IProtocolHandler handler;
5
olemartin/chess-tournament
src/main/java/net/olemartin/service/person/PersonService.java
[ "@NodeEntity\npublic class Person {\n\n @GraphId\n private Long id;\n\n @Relationship(type = \"IS_PLAYER\", direction = Relationship.OUTGOING)\n private Set<Player> players = new HashSet<>();\n\n @Relationship(type = \"RATING\", direction = Relationship.OUTGOING)\n private Rating rating;\n\n pr...
import com.google.common.collect.Lists; import net.olemartin.domain.Person; import net.olemartin.domain.Rating; import net.olemartin.domain.view.PersonInTournamentView; import net.olemartin.domain.view.PersonView; import net.olemartin.repository.PersonRepository; import org.springframework.beans.factory.annotation.Auto...
package net.olemartin.service.person; @Service @Transactional public class PersonService { private final PersonRepository personRepository; @Autowired public PersonService(PersonRepository personRepository) { this.personRepository = personRepository; } public List<PersonView> getPerso...
List<PersonInTournamentView> tournamentViews = person.getPlayers().stream()
2
eviltester/testtoolhub
src/main/java/uk/co/compendiumdev/javafortesters/gui/javafx/stages/BinaryChopifierStage.java
[ "public class BinaryChopReporter {\n private final BinaryChopResults binaryChop;\n\n public BinaryChopReporter(BinaryChopResults binaryChop) {\n this.binaryChop = binaryChop;\n }\n\n public String getStringReport() {\n StringBuilder theReport = new StringBuilder();\n\n theReport.app...
import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import...
package uk.co.compendiumdev.javafortesters.gui.javafx.stages; public class BinaryChopifierStage extends Stage { private static BinaryChopifierStage htmlCommentsGridSingletonStage=null; public static void singletonActivate() { if(htmlCommentsGridSingletonStage==null) htmlCommentsGridSin...
Scene scene = new Scene(root, Config.getDefaultWindowWidth(), Config.getDefaultWindowHeight());
3
xbynet/crawler
crawler-core/src/test/java/net/xby1993/crawler/NeihanshequCrawler.java
[ "public abstract class Processor implements Closeable{\n\tprivate FileDownloader fileDownloader=null;\n\tprivate Spider spider=null;\n\t\n\tpublic abstract void process(Response resp);\n\t\n\tpublic boolean download(Request req,String savePath){\n\t\treturn fileDownloader.download(req, savePath);\n\t}\n\tpublic boo...
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.co...
package net.xby1993.crawler; public class NeihanshequCrawler extends Processor{ private static final int maxCount=100; private AtomicInteger count=new AtomicInteger(0); @Override public void process(Response resp) { String currentUrl=resp.getRequest().getUrl(); if(currentUrl.equals("http://neihanshequ...
JsoupParser parser=resp.html();
5
PedroGomes/TPCw-benchmark
src/org/uminho/gsd/benchmarks/interfaces/executor/AbstractDatabaseExecutorFactory.java
[ "public class BenchmarkExecutor {\n\n //Node id\n private BenchmarkNodeID nodeId;\n\n //Benchmark interfaces\n private AbstractWorkloadGeneratorFactory workloadInterface;\n private AbstractDatabaseExecutorFactory databaseInterface;\n\n /**\n * number of clients on each benchmarking node *\n ...
import org.uminho.gsd.benchmarks.benchmark.BenchmarkExecutor; import org.uminho.gsd.benchmarks.benchmark.BenchmarkNodeID; import org.uminho.gsd.benchmarks.dataStatistics.ResultHandler; import org.uminho.gsd.benchmarks.helpers.JsonUtil; import org.uminho.gsd.benchmarks.helpers.TPM_counter; import java.io.*; import java....
/* * ********************************************************************* * Copyright (c) 2010 Pedro Gomes and Universidade do Minho. * All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy...
protected BenchmarkNodeID nodeID;
1
AstartesGuardian/WebDAV-Server
WebDAV-Server/src/webdav/server/virtual/contentmutation/CryptedContentMutation.java
[ "public class HTTPEnvRequest\r\n{\r\n public static Builder create()\r\n {\r\n return new Builder();\r\n }\r\n public static class Builder\r\n {\r\n public Builder()\r\n { }\r\n \r\n private HTTPRequest request;\r\n private HTTPCommand command;\r\n pri...
import http.server.message.HTTPEnvRequest; import java.util.ArrayList; import java.util.List; import java.util.function.BiFunction; import webdav.server.tools.Helper; import webdav.server.crypter.CipherCrypter; import webdav.server.crypter.AbstractCrypter; import webdav.server.resource.IResource;
package webdav.server.virtual.contentmutation; public class CryptedContentMutation implements IContentMutation { public CryptedContentMutation( AbstractCrypter.Algorithm algo, String username, String password, BiFunction<IResource, HTTPEnvRequest, byte[]> k...
this.crypter = new CipherCrypter(algo);
2
appfoundry/android-nfc-lib
nfclib/src/androidTest/java/be/appfoundry/nfclibrary/utilities/sync/WriteUriSucceedsTests.java
[ "public class NfcPayloadHeader {\n\n public static final byte CUSTOM_SCHEME = 0x00;\n /**\n * This URI is in the format of http://www.\n */\n public static final byte HTTP_WWW = 0x01;\n /**\n * This URI is in the format of https://www.\n */\n public static final byte HTTPS_WWW = 0x02;...
import be.appfoundry.nfclibrary.exceptions.TagNotPresentException; import be.appfoundry.nfclibrary.utilities.TestUtilities; import be.appfoundry.nfclibrary.utilities.interfaces.NfcWriteUtility; import android.content.Intent; import android.nfc.FormatException; import android.nfc.NfcAdapter; import android.nfc.Tag; impo...
/* * WriteUriSucceedsTests.java * NfcLibrary project. * * Created by : Daneo van Overloop - 17/6/2014. * * The MIT License (MIT) * * Copyright (c) 2014 AppFoundry. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documenta...
public void testWriteUriNdef() throws IllegalAccessException, NoSuchFieldException, ClassNotFoundException, InsufficientCapacityException, FormatException, ReadOnlyTagException, TagNotPresentException {
3
darrenfoong/candc
src/model/FeatureRuleHead.java
[ "public class SuperCategory {\n\tpublic final Category cat;\n\n\tpublic ArrayList<Dependency> unfilledDeps = null;\n\tpublic ArrayList<FilledDependency> filledDeps = null;\n\n\t/*\n\t * used to record how the category was built (eg coordination) which then\n\t * gets used by rule restrictions in the combinators\n\t...
import java.util.ArrayList; import java.util.HashMap; import cat_combination.SuperCategory; import cat_combination.Variable; import io.Sentence; import lexicon.Categories; import lexicon.Category; import utils.Hash;
package model; public class FeatureRuleHead implements Feature<FeatureRuleHead> { final short featureType; final Category leftCat; final Category rightCat; final Category resultCat; final int head; final int hashCode; public FeatureRuleHead(short featureType, Category leftCat, Category rightCat, Category res...
Hash h = new Hash(featureType);
5
Nanopublication/nanopub-java
src/main/java/org/nanopub/op/Build.java
[ "public class MalformedNanopubException extends Exception {\n\n\tprivate static final long serialVersionUID = -1022546557206977739L;\n\n\tpublic MalformedNanopubException(String message) {\n\t\tsuper(message);\n\t}\n\n}", "public interface Nanopub {\n\n\t// URIs in the nanopub namespace:\n\tpublic static final IR...
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.zip.GZIPInputStream;...
package org.nanopub.op; public class Build { @com.beust.jcommander.Parameter(description = "input-rdf-files", required = true) private List<File> inputRdfdFiles = new ArrayList<File>(); @com.beust.jcommander.Parameter(names = "-d", description = "Point to the URI of the resource the created nanopublications a...
NanopubImpl.ensureLoaded();
3
irccloud/android
src/com/irccloud/android/fragment/ServerReorderFragment.java
[ "public abstract class AsyncTaskEx<Params, Progress, Result> {\n private static final String LOG_TAG = \"AsyncTaskEx\";\n\n private static final int CORE_POOL_SIZE = 10;\n private static final int MAXIMUM_POOL_SIZE = 50;\n private static final int KEEP_ALIVE = 10;\n\n private static final LinkedBlock...
import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.util.SparseArray; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; impor...
/* * Copyright (c) 2015 IRCCloud, Ltd. * * 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 ...
holder.icon.setTypeface(FontAwesome.getTypeface());
2
bourgesl/marlin-fx
src/main/java/com/sun/marlin/IntArrayCache.java
[ "static final int[] ARRAY_SIZES = new int[BUCKETS];", "static final int BUCKETS = 8;", "static final int MAX_ARRAY_SIZE;", "public static void logInfo(final String msg) {\n if (MarlinConst.USE_LOGGER) {\n LOG.info(msg);\n } else if (MarlinConst.ENABLE_LOGS) {\n System.out.print(\"INFO: \")...
import java.lang.ref.WeakReference; import java.util.Arrays; import com.sun.marlin.ArrayCacheConst.BucketStats; import com.sun.marlin.ArrayCacheConst.CacheStats; import static com.sun.marlin.ArrayCacheConst.ARRAY_SIZES; import static com.sun.marlin.ArrayCacheConst.BUCKETS; import static com.sun.marlin.ArrayCacheConst.M...
/* * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
buckets[i] = new Bucket(clean, ARRAY_SIZES[i], bucketCapacity,
0
jillesvangurp/jsonj
src/main/java/com/github/jsonj/JsonArray.java
[ "public class JsonTypeMismatchException extends IllegalArgumentException {\n private static final long serialVersionUID = 3714595790951144032L;\n\n public JsonTypeMismatchException(final String message) {\n super(message);\n }\n}", "public class JsonBuilder {\n private final @Nonnull JsonObject...
import com.github.jsonj.exceptions.JsonTypeMismatchException; import com.github.jsonj.tools.JsonBuilder; import com.github.jsonj.tools.JsonSerializer; import org.apache.commons.lang3.StringUtils; import javax.annotation.Nonnull; import java.io.IOException; import java.io.Writer; import java.util.ArrayList; import java....
/** * Copyright (c) 2011, Jilles van Gurp * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, p...
add(fromObject(o));
3
StumbleUponArchive/hbase
src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java
[ "public class HBaseAdmin implements Abortable, Closeable {\n private final Log LOG = LogFactory.getLog(this.getClass().getName());\n// private final HConnection connection;\n private HConnection connection;\n private volatile Configuration conf;\n private final long pause;\n private final int numRetries;\n /...
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect....
/** * Copyright 2009 The Apache Software 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...
HBaseAdmin admin = new HBaseAdmin(new Configuration(TEST_UTIL.getConfiguration()));
0
CCob/bittrex4j
src/main/java/com/github/ccob/bittrex4j/BittrexExchange.java
[ "public class CloudFlareAuthorizer {\n\n private static Logger log = LoggerFactory.getLogger(CloudFlareAuthorizer.class);\n\n private HttpClient httpClient;\n private HttpClientContext httpClientContext;\n private Pattern jsChallenge = Pattern.compile(\"name=\\\"jschl_vc\\\" value=\\\"(.+?)\\\"\");\n ...
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import com.github.ccob.bittrex4j.cloudflare.C...
.onEvent(mapper.readerFor(updateExchangeStateType).readValue(decode(exchangeState))); }); } public void disconnectFromWebSocket(){ hubConnection.stop(); } private void connectedToWebSocket(){ if(apiKeySecret != null && apiKeySecret.getKey() ...
public Response<?> getOrderBook(String market, OrderBook.TYPE type) {
2
anthonyu/Sizzle
src/test/sizzle/compiler/TestFunctionTrie.java
[ "public class SizzleAny extends SizzleType {\n\t/** {@inheritDoc} */\n\t@Override\n\tpublic boolean assigns(final SizzleType that) {\n\t\t// anything can be assigned to a variable of type 'any'\n\t\treturn true;\n\t}\n\n\t/** {@inheritDoc} */\n\t@Override\n\tpublic boolean accepts(final SizzleType that) {\n\t\t// a...
import junit.framework.Assert; import org.junit.Test; import sizzle.types.SizzleAny; import sizzle.types.SizzleBool; import sizzle.types.SizzleFloat; import sizzle.types.SizzleFunction; import sizzle.types.SizzleInt; import sizzle.types.SizzleString; import sizzle.types.SizzleType; import sizzle.types.SizzleVarargs;
package sizzle.compiler; public class TestFunctionTrie { @Test public void testFunctionTrieSingleParameter() { final FunctionTrie functionTrie = new FunctionTrie(); final SizzleFunction sizzleFunction = new SizzleFunction(new SizzleBool(), new SizzleType[] { new SizzleString() }); functionTrie.addFunction...
new SizzleType[] { new SizzleString(), new SizzleVarargs(new SizzleString()) });
7
spring-cloud/spring-cloud-bus
spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScanTests.java
[ "@SuppressWarnings(\"serial\")\npublic class FooBarTestRemoteApplicationEvent extends RemoteApplicationEvent {\n\n\t@SuppressWarnings(\"unused\")\n\tprivate FooBarTestRemoteApplicationEvent() {\n\t}\n\n\tprotected FooBarTestRemoteApplicationEvent(final Object source, final String originService,\n\t\t\tfinal String ...
import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.jsontype.NamedType; import org.junit.Test; import test.foo.bar.FooBarTestRemoteApplicationEvent; import org.springframewor...
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
AnotherRemoteApplicationEvent.class, MyRemoteApplicationEvent.class, TestRemoteApplicationEvent.class,
5
Simperium/simperium-android
Simperium/src/androidTestSupport/java/com/simperium/WebSocketManagerTest.java
[ "public class WebSocketManager implements ChannelProvider, Channel.OnMessageListener {\n\n public enum ConnectionStatus {\n DISCONNECTING, DISCONNECTED, CONNECTING, CONNECTED\n }\n\n public interface Connection {\n public void close();\n public void send(String message);\n }\n\n ...
import com.simperium.android.WebSocketManager; import com.simperium.client.Bucket; import com.simperium.client.ChannelProvider; import com.simperium.models.Note; import com.simperium.test.MockBucket; import com.simperium.test.MockConnection; import com.simperium.test.MockChannelSerializer; import com.simperium.test.Moc...
package com.simperium; public class WebSocketManagerTest extends TestCase { static public final String APP_ID = "mock-app-id"; static public final String SESSION_ID = "mock-session-id"; WebSocketManager mSocketManager; MockChannelSerializer mChannelSerializer; MockConnection mConnection;
Bucket<?> mBucket;
1
napstr/SqlSauce
sqlsauce-core/src/test/java/space/npstr/sqlsauce/wrapper/ApplyFindMergeTest.java
[ "@ExtendWith(LogExceptionExtension.class)\npublic abstract class BaseTest {\n\n public static final String TEST_JDBC_URL_ENV = \"TEST_DB_JDBC\";\n\n protected static final Logger log = LoggerFactory.getLogger(BaseTest.class);\n\n // general purpose reusable sql statements\n //language=PostgreSQL\n pr...
import space.npstr.sqlsauce.entities.SaucedEntity; import space.npstr.sqlsauce.fp.types.EntityKey; import space.npstr.sqlsauce.fp.types.Transfiguration; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import static org.junit.jupiter.api.Assertions.assertEquals; import stati...
/* * MIT License * * Copyright (c) 2017-2018, Dennis Neufeld * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
wrapper.findApplyAndMerge(Transfiguration.of(EntityKey.of(42L, E.class),
5
Rubentxu/DreamsLibGdx
core/src/main/java/com/rubentxu/juegos/core/pantallas/ScoreScreen.java
[ "public class DreamsGame extends BaseGame {\n\n public static boolean DEBUG = false;\n public static FPSLogger log;\n\n @Override\n public void create() {\n Gdx.input.setCatchBackKey(true);\n resourcesManager =new ResourcesManager();\n preferencesManager = PreferencesManager.instanc...
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.math.Interpolation; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; impo...
package com.rubentxu.juegos.core.pantallas; public class ScoreScreen extends BaseScreen { private Profile profile; private Level currentLevel; private int coins; private int kills; private int stars; public ScoreScreen(DreamsGame game) { super(game, new Stage(0, 0, true)); CU...
game.setGameState(GameState.GAME_SHOW_LEVEL_MENU);
2
centralperf/centralperf
src/main/java/org/centralperf/controller/HomeController.java
[ "@Entity\npublic class Project {\n\n @Id\n @GeneratedValue\n private Long id;\n\n @NotNull\n @Size(min = 1, max = 33)\n private String name;\n\n @JsonIgnore\n @OneToMany(cascade=CascadeType.ALL, mappedBy = \"project\")\n private List<Run> runs;\n\n @JsonIgnore\n @OneToMany(cascade=C...
import org.centralperf.model.dao.Project; import org.centralperf.model.dao.Run; import org.centralperf.repository.ProjectRepository; import org.centralperf.repository.RunRepository; import org.centralperf.service.BootstrapService; import org.centralperf.service.RunService; import org.springframework.stereotype.Controll...
/* * Copyright (C) 2014 The Central Perf authors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * T...
model.addAttribute("newRun",new Run());
1
flixel-gdx/flixel-gdx-box2d
flixel-gdx-box2d-examples/src/org/flxbox2d/examples/TestCCD.java
[ "public class B2FlxBox extends B2FlxShape\n{\n\t/**\n\t * Holds the center of an oriented box.\n\t */\n\tprivate Vector2 _center;\n\t\n\t/**\n\t * If the center is filled, it will be a oriented box, otherwise \n\t * it will be an axis-aligned box.\n\t * @param x\t\t\tThe X-coordinate of the point in space.\n\t * @p...
import org.flixel.FlxG; import org.flxbox2d.collision.shapes.B2FlxBox; import org.flxbox2d.collision.shapes.B2FlxCircle; import org.flxbox2d.collision.shapes.B2FlxShape; import org.flxbox2d.collision.shapes.B2FlxSprite; import org.flxbox2d.common.B2FlxV2; import com.badlogic.gdx.physics.box2d.FixtureDef;
package org.flxbox2d.examples; /** * * @author Ka Wing Chin */ public class TestCCD extends PlayState { @Override public void create() { super.create(); title.setText("Continuous Collision Detection"); // These values are used for all the parts of the 'basket' FixtureDef fd = new FixtureDef(); fd....
add(new B2FlxCircle(FlxG.random()*300+250, FlxG.random()*320+20, FlxG.random()*10+5)
1
cyriux/mpcmaid
MpcMaid/src/com/mpcmaid/gui/Widget.java
[ "public interface Element {\n\n\tParameter[] getParameters();\n\n\tObject get(Parameter parameter);\n\n\tvoid set(Parameter parameter, Object value);\n\n}", "public final class Layer extends BaseElement {\n\n\t// offset for each sample\n\tprivate static final int SAMPLE_LENGTH = 0x18;\n\n\t// ----- parameter ----...
import java.awt.Font; import java.awt.GridLayout; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusEvent; import java.awt.event.FocusListener; import java.text.NumberFormat; import java.util.Locale; import javax.swing.JComboBox; import javax.sw...
package com.mpcmaid.gui; /** * Dedicated JPanel to contain an input together with its label, and the binding * logic to/from an Element and a Parameter. Represents * * @author cyrille martraire */ public abstract class Widget extends JPanel implements ActionListener, FocusListener, BindingCapable { private ...
public Type getType() {
5
redsolution/bst
bst/src/main/java/ru/redsolution/bst/ui/ChooseActivity.java
[ "public class BST extends Application {\n\n\tprivate static final String HOST_URL = \"https://online.moysklad.ru\";\n\tprivate static final String IMPORT_URL = HOST_URL\n\t\t\t+ \"/exchange/rest/ms/xml/%s/list?start=%d&count=%d\";\n\tprivate static final String INVENTORY_URL = HOST_URL\n\t\t\t+ \"/exchange/rest/ms/...
import ru.redsolution.bst.R; import ru.redsolution.bst.data.BST; import ru.redsolution.bst.data.table.BaseDatabaseException; import ru.redsolution.bst.data.table.BaseGoodTable; import ru.redsolution.bst.data.table.CustomGoodTable; import ru.redsolution.bst.data.table.GoodFolderTable; import ru.redsolution.bst.data.tabl...
/** * Copyright (c) 2013, Redsolution LTD. All rights reserved. * * This file is part of Barcode Scanner Terminal project; * you can redistribute it and/or modify it under the terms of * * Barcode Scanner Terminal is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the imp...
} else if (tableName.equals(CustomGoodTable.getInstance()
3
ykaragol/checkersmaster
CheckersMaster/src/checkers/algorithm/MinimaxAlgorithm.java
[ "public class CalculationContext{\r\n\r\n\tprivate int depth;\r\n\tprivate Player player;\r\n\tprivate IEvaluation evaluationFunction;\r\n\tprivate ISuccessor successorFunction;\r\n\tprivate IAlgorithm algorithm;\r\n\r\n\r\n\tpublic void setDepth(int depth) {\r\n\t\tthis.depth = depth;\r\n\t}\r\n\r\n\tpublic int ge...
import java.util.List; import checkers.domain.CalculationContext; import checkers.domain.Model; import checkers.domain.Move; import checkers.domain.Player; import checkers.evaluation.IEvaluation; import checkers.rules.ISuccessor;
package checkers.algorithm; /** * Minimax (Min-Max) Algorithm Implementation */ public class MinimaxAlgorithm implements IAlgorithm{ @Override
public Move algorithm(CalculationContext context, Model model, Player whosTurn) {
3