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 |
|---|---|---|---|---|---|---|
huijimuhe/common-layout-android | CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/adapter/render/xcArticleGroupRender.java | [
"public abstract class AbstractRender{\n\n public abstract<T extends AbstractViewHolder> T getReusableComponent();\n public abstract void bindData(int position);\n\n}",
"public abstract class AbstractRenderAdapter<T> extends RecyclerView.Adapter<AbstractViewHolder> {\n\n public static final int RENDER_... | import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.huijimuhe.commonlayout.R;
import com.huijimuhe.commonlayout.adapter.base.AbstractRender;
import com.huijimuhe.commonlayout.adapter.base.AbstractRenderAdapter;
import com.huijimuhe.comm... | package com.huijimuhe.commonlayout.adapter.render;
/**
* Created by Huijimuhe on 2016/6/11.
* enjoy
*/
public class xcArticleGroupRender extends AbstractRender {
private ViewHolder mHolder; | private AbstractRenderAdapter mAdapter; | 1 |
ykulbashian/LiquidSurface | liquidview/src/main/java/com/google/fpl/liquidfunpaint/tool/Tool.java | [
"public class CircleShape extends Shape {\n private transient long swigCPtr;\n\n protected CircleShape(long cPtr, boolean cMemoryOwn) {\n super(liquidfunJNI.CircleShape_SWIGUpcast(cPtr), cMemoryOwn);\n swigCPtr = cPtr;\n }\n\n protected static long getCPtr(CircleShape obj) {\n return (obj == null) ? 0 ... | import java.nio.ByteBuffer;
import java.util.EnumMap;
import java.util.EnumSet;
import android.util.SparseArray;
import android.view.MotionEvent;
import android.view.View;
import com.google.fpl.liquidfun.CircleShape;
import com.google.fpl.liquidfun.ParticleColor;
import com.google.fpl.liquidfun.ParticleGroup;
import co... | /**
* Copyright (c) 2014 Google, Inc. 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 of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | ParticleSystem ps = ParticleSystems.getInstance().get().particleSystem; | 7 |
zegerhoogeboom/flysystem-java | src/main/java/com/flysystem/core/cache/CachedAdapter.java | [
"public interface Adapter extends Read, Write\n{\n}",
"public class Config\n{\n\tprotected Map<String, Object> settings = new HashMap<String, Object>();\n\tprotected Config fallback;\n\n\tpublic Config(Map<String, Object> settings)\n\t{\n\t\tthis.settings = settings;\n\t}\n\n\tpublic Config()\n\t{\n\t\tthis.setti... | import com.flysystem.core.Adapter;
import com.flysystem.core.Config;
import com.flysystem.core.FileMetadata;
import com.flysystem.core.Visibility;
import com.flysystem.core.exception.FileExistsException;
import com.flysystem.core.exception.FileNotFoundException;
import java.util.HashMap;
import java.util.List; | /*
* Copyright (c) 2013-2015 Frank de Jonge
*
* 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,... | public class CachedAdapter implements Adapter | 0 |
link-intersystems/blog | mvc-with-java-swing/src/main/java/com/link_intersystems/blog/mvc/view/OverviewPanel.java | [
"public class Person {\n\n\tprivate String firstname;\n\n\tprivate String lastname;\n\n\tprivate Address address;\n\n\tpublic String getFirstname() {\n\t\treturn firstname;\n\t}\n\n\tpublic void setFirstname(String firstname) {\n\t\tthis.firstname = firstname;\n\t}\n\n\tpublic String getLastname() {\n\t\treturn las... | import javax.swing.DefaultListSelectionModel;
import javax.swing.JComboBox;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTree;
import javax.swing.ListCellRenderer;
import javax.swing.ListSelectionModel;
import com.link_intersystems.b... | package com.link_intersystems.blog.mvc.view;
/**
* The main panel that holds a {@link JList}, {@link JTable}, {@link JTree} and
* {@link JComboBox} that display the loaded {@link Person} objects. All the
* components are synchronized by models so that they will all show the same
* data and reflect the same selec... | private ListModelSelection<Person> listModelSelection = new ListModelSelection<Person>(); | 3 |
davemorrissey/brightpearl-api-client-java | src/test/java/uk/co/visalia/brightpearl/apiclient/BrightpearlApiClientAuthTest.java | [
"public final class Account implements Serializable {\n\n private final Datacenter datacenter;\n\n private final String accountCode;\n\n /**\n * Construct an account instance.\n * @param datacenter the datacenter that hosts the account.\n * @param accountCode the customer account code.\n */... | import java.util.concurrent.TimeUnit;
import static com.github.restdriver.clientdriver.RestClientDriver.giveResponse;
import static com.github.restdriver.clientdriver.RestClientDriver.onRequestTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import com.github.restdriver.c... | /*
* Copyright 2014 David Morrissey
*
* 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... | ClientFactory clientFactory = HttpClient4ClientFactoryBuilder | 8 |
mibo/janos | janos-ref/src/main/java/org/apache/olingo/odata2/janos/processor/ref/model/RefFunctions.java | [
"public interface FunctionExecutor {\n\n /**\n * Init method must be called from a FunctionSource which prepare\n * a class which has methods with @EdmFunctionImport annotation\n *\n * @param dataStore data store manager which is used by DataSources\n */\n void init(DataStoreManager dataStore);\n}",
"... | import org.apache.olingo.odata2.api.annotation.edm.EdmFunctionImport;
import org.apache.olingo.odata2.api.annotation.edm.EdmFunctionImportParameter;
import org.apache.olingo.odata2.api.annotation.edm.EdmType;
import org.apache.olingo.odata2.janos.processor.api.data.source.FunctionExecutor;
import org.apache.olingo.odat... | package org.apache.olingo.odata2.janos.processor.ref.model;
/**
* Reference Implementation for a FunctionExecutor
*
* Created by mibo on 23.08.15.
*/
public class RefFunctions implements FunctionExecutor {
private DataStoreManager dataStoreManager;
@Override
public void init(DataStoreManager dataStore) ... | } catch (DataStoreException e) { | 2 |
MizzleDK/Mizuu | app/src/main/java/com/miz/filesources/SmbMovie.java | [
"public abstract class MovieFileSource<T> extends AbstractFileSource<T> {\n\n\tprotected List<DbMovie> mDbMovies = new ArrayList<DbMovie>();\n\n\tpublic MovieFileSource(Context context, FileSource fileSource, boolean clearLibrary) {\n\t\tmContext = context;\n\t\tmFileSource = fileSource;\n\t\tmClearLibrary = clearL... | import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.TreeSet;
import jcifs.smb.SmbException;
import jcifs.smb.SmbFile;
import android.content.Context;
import android.database.Cursor;
import com.miz.abstractclasses.MovieFileSource;
import com.miz.db.DbAdapterMovieMappings;
import c... | /*
* Copyright (C) 2014 Michell Bak
*
* 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 agree... | MovieDatabaseUtils.deleteMovie(mContext, dbMovies.get(i).getTmdbId()); | 4 |
xuxueli/xxl-conf | xxl-conf-admin/src/main/java/com/xxl/conf/admin/controller/UserController.java | [
"public class XxlConfEnv {\n\n private String env; // Env\n private String title; // 环境名称\n private int order;\n\n public String getEnv() {\n return env;\n }\n\n public void setEnv(String env) {\n this.env = env;\n }\n\n public String getTitle() {\n return ... | import com.xxl.conf.admin.controller.annotation.PermessionLimit;
import com.xxl.conf.admin.core.model.XxlConfEnv;
import com.xxl.conf.admin.core.model.XxlConfProject;
import com.xxl.conf.admin.core.model.XxlConfUser;
import com.xxl.conf.admin.core.util.JacksonUtil;
import com.xxl.conf.admin.core.util.ReturnT;
import co... | package com.xxl.conf.admin.controller;
/**
* @author xuxueli 2018-03-01
*/
@Controller
@RequestMapping("/user")
public class UserController {
@Resource
private XxlConfUserDao xxlConfUserDao;
@Resource
private XxlConfProjectDao xxlConfProjectDao;
@Resource | private XxlConfEnvDao xxlConfEnvDao; | 5 |
chenzj-king/RvHelper | demo/src/main/java/com/dreamliner/lib/rvhelper/sample/view/DlEmptyLayout.java | [
"public abstract class EmptyLayout extends LinearLayout implements EmptyUIHandler {\n\n public EmptyLayout(Context context, AttributeSet attrs, int defStyleAttr) {\n super(context, attrs, defStyleAttr);\n }\n\n}",
"public class CustomizedClickableSpan extends ClickableSpan {\n\n private int mColor... | import android.content.Context;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.TextView;
import com.dreamliner.lib.rvhelper.sample.R;
... | package com.dreamliner.lib.rvhelper.sample.view;
/**
* @author chenzj
* @Title: DlEmptyLayout
* @Description: 类的描述 -
* @date 2016/10/9 22:57
* @email admin@chenzhongjin.cn
*/
public class DlEmptyLayout extends EmptyLayout {
private ImageView mEmptyIv;
private TextView mEmtptTipTv;
private Custom... | case NET_ERROR: | 3 |
piyell/NeteaseCloudMusic | app/src/main/java/com/zsorg/neteasecloudmusic/adapters/SearchAdapter.java | [
"public class MusicPlayerService extends IntentService {\n // IntentService can perform, e.g. ACTION_FETCH_NEW_ITEMS\n private static final String ACTION_PLAY = \"com.zsorg.neteasecloudmusic.action.PLAY\";\n private static final String ACTION_PAUSE = \"com.zsorg.neteasecloudmusic.action.PAUSE\";\n priva... | import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import com.zsorg.neteasecloudmusic.MusicPlayerService;
import com.zsorg.neteasecloudmusic.callbacks.OnDeleteListener;
impor... | package com.zsorg.neteasecloudmusic.adapters;
/**
* Created by piyel_000 on 2017/1/5.
*/
public class SearchAdapter extends BaseAdapter<SongListItemHolder> {
private final String unknown;
private final PlayerManager mPlayer;
private List<MusicBean> mList;
public SearchAdapter(@NonNull LayoutInf... | MusicPlayerService.startActionSet(context, beanList, 0); | 0 |
ppeccin/javatari | javatari/src/org/javatari/atari/pia/PIA.java | [
"public final class BUS implements BUS16Bits, ClockDriven {\r\n\r\n\tpublic BUS(M6502 cpu, TIA tia, PIA pia, RAM ram) {\r\n\t\tthis.cpu = cpu;\r\n\t\tthis.ram = ram;\r\n\t\tthis.tia = tia;\r\n\t\tthis.pia = pia;\r\n\t\tcpu.connectBus(this);\r\n\t\ttia.connectBus(this);\r\n\t\tpia.connectBus(this);\r\n\t}\r\n\r\n\tp... | import java.io.Serializable;
import java.util.Map;
import org.javatari.atari.board.BUS;
import org.javatari.atari.controls.ConsoleControls;
import org.javatari.atari.controls.ConsoleControlsInput;
import org.javatari.atari.controls.ConsoleControls.Control;
import org.javatari.general.board.BUS16Bits;
import org.... | return 0;
}
@Override
public void writeByte(int address, byte b) {
int i = b & 0xff;
int reg = address & ADDRESS_MASK;
if (reg == 0x04) { TIM1T = i; setTimerInterval(i, 1); return; }
if (reg == 0x05) { TIM8T = i; setTimerInterval(i, 8); return; }
if (reg == 0x06) { TIM64T = i; setTimerInter... | Randomizer.instance.nextInt() & 0xff; // Some random value. Games use this at startup to seed random number generation
| 4 |
Crozin/Wykop.pl-Java-SDK | src/main/java/com/crozin/wykop/sdk/repository/ObservatoryRepository.java | [
"public class Command {\n\tprivate final String resource;\n\tprivate final String method;\n\t\n\tprivate List<String> arguments = new LinkedList<String>();\n\tprivate Map<String, String> parameters = new HashMap<String, String>();\n\tprivate Map<String, String> postParameters = new TreeMap<String, String>();\n\t\n\... | import java.util.List;
import com.crozin.wykop.sdk.Command;
import com.crozin.wykop.sdk.Session;
import com.crozin.wykop.sdk.domain.Comment;
import com.crozin.wykop.sdk.domain.Entry;
import com.crozin.wykop.sdk.domain.EntryComment;
import com.crozin.wykop.sdk.domain.LinkVote; | package com.crozin.wykop.sdk.repository;
public class ObservatoryRepository extends AbstractRepository {
public ObservatoryRepository(Session session) {
super(session);
}
public List<LinkVote> getLatestLinkVotes() {
return session.getResultList(new Command("observatory", "votes"), LinkVote.class);
}
publ... | public List<Entry> getLatestEntries() { | 3 |
kkung/kakao-android-sdk-standalone | samples/usermgmt-sample/src/com/kakao/sample/usermgmt/UsermgmtMainActivity.java | [
"public class APIErrorResult {\n /**\n * 에러를 일으킨 요청 URL\n */\n private String requestURL;\n // {@link com.kakao.helper.ServerProtocol.ERROR_CODE_KEY}와 같은 변수 이름 유지. for jackson parsing\n /**\n * 숫자로 구성된 에러 코드\n */\n protected int errorCode;\n\n //{@link com.kakao.helper.ServerProtoc... | import java.util.Map;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.kakao.APIErrorResult;
import com.kakao.Logou... | /**
* Copyright 2014 Kakao Corp.
*
* Redistribution and modification in source or binary forms are not permitted without specific prior written permission.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a co... | UserManagement.requestUpdateProfile(new UpdateProfileResponseCallback() { | 5 |
gizwits/Gizwits-WaterHeater_Android | src/zxing/CaptureActivity.java | [
"public final class CameraManager {\n\n private static final String TAG = CameraManager.class.getSimpleName();\n\n private static final int MIN_FRAME_WIDTH = 240;\n private static final int MIN_FRAME_HEIGHT = 240;\n private static final int MAX_FRAME_WIDTH = 480;\n private static final int MAX_FRAME_HEIGHT = 3... | import java.io.IOException;
import java.util.Vector;
import zxing.camera.CameraManager;
import zxing.decoding.CaptureActivityHandler;
import zxing.decoding.InactivityTimer;
import zxing.view.ViewfinderView;
import android.content.Intent;
import android.graphics.Bitmap;
import android.media.AudioManager;
import android.... | package zxing;
public class CaptureActivity extends BaseActivity implements Callback {
private CaptureActivityHandler handler;
private ViewfinderView viewfinderView;
private boolean hasSurface;
private Vector<BarcodeFormat> decodeFormats;
private String characterSet;
private InactivityTimer inactivityTimer;
... | DeviceListActivity.class); | 6 |
RunsCode/AppFacadeMVC | app/src/main/java/com/example/dev_wang/databindingdemo/MainActivity.java | [
"public abstract class RunsLog {\n /**\n * * 打印日志时获取当前的程序文件名、行号、方法名 输出格式为:[FileName | LineNumber | MethodName]\n * *\n * * @return\n * */\n public static String TAG() {\n StackTraceElement traceElement = ((new Exception()).getStackTrace())[2];\n StringBuffer toStringBuffer = new ... | import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.example.dev_wang.databindingdemo.Module.AppFacade.RunsLog;
import com.example.dev_wang.databindingdemo.databinding.ActivityMainBindin... | package com.example.dev_wang.databindingdemo;
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding activityMainBinding = null;
public MainActivity() {
super(); | Facade.INSTANCE.init(new AppModuleController()); | 1 |
k0shk0sh/FastAccess | app/src/main/java/com/fastaccess/ui/modules/apps/folders/FoldersView.java | [
"public class FolderModel extends SugarRecord implements Parcelable {\n\n @Unique private String folderName;\n private long createdDate;\n private int orderIndex;\n private int color;\n private int appsCount;\n @Ignore private List<AppsModel> folderApps;\n\n public String getFolderName() {\n ... | import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.content.Loader;
import android.support.v4.widget.NestedScrollView;
import android.view.View;
import com.fastaccess.R;
import com.fastaccess.data.dao.... | package com.fastaccess.ui.modules.apps.folders;
/**
* Created by Kosh on 11 Oct 2016, 7:42 PM
*/
public class FoldersView extends BaseFragment<FoldersMvp.View, FoldersPresenter> implements FoldersMvp.View {
public final static String TAG = "FoldersView";
@BindView(R.id.recycler) DynamicRecyclerView re... | EventBus.getDefault().post(new FolderEventModel()); | 1 |
trekawek/coffee-gb | src/main/java/eu/rekawek/coffeegb/cpu/Cpu.java | [
"public interface AddressSpace {\n\n boolean accepts(int address);\n\n void setByte(int address, int value);\n\n int getByte(int address);\n\n}",
"public interface Op {\n\n default boolean readsMemory() {\n return false;\n }\n\n default boolean writesMemory() {\n return false;\n ... | import eu.rekawek.coffeegb.AddressSpace;
import eu.rekawek.coffeegb.cpu.op.Op;
import eu.rekawek.coffeegb.cpu.opcode.Opcode;
import eu.rekawek.coffeegb.gpu.Display;
import eu.rekawek.coffeegb.gpu.Gpu;
import eu.rekawek.coffeegb.gpu.GpuRegister;
import eu.rekawek.coffeegb.gpu.Lcdc;
import eu.rekawek.coffeegb.gpu.SpriteB... | package eu.rekawek.coffeegb.cpu;
public class Cpu {
public enum State {
OPCODE, EXT_OPCODE, OPERAND, RUNNING, IRQ_READ_IF, IRQ_READ_IE, IRQ_PUSH_1, IRQ_PUSH_2, IRQ_JUMP, STOPPED, HALTED
}
private final Registers registers;
private final AddressSpace addressSpace;
private final Interru... | private final Gpu gpu; | 4 |
florent37/OCiney | app/src/main/java/com/bdc/ociney/modele/Person/Person.java | [
"public class Feature {\n\n @Expose\n private Integer code;\n @Expose\n private Publication publication;\n @Expose\n private String title;\n @Expose\n private Picture picture;\n @Expose\n private List<ModelObject> category = new ArrayList<ModelObject>();\n\n public Integer getCode()... | import com.google.gson.annotations.Expose;
import com.bdc.ociney.modele.Feature;
import com.bdc.ociney.modele.Link;
import com.bdc.ociney.modele.Media;
import com.bdc.ociney.modele.ModelObject;
import com.bdc.ociney.modele.News;
import com.bdc.ociney.modele.Participation;
import com.bdc.ociney.modele.Picture;
import co... | package com.bdc.ociney.modele.Person;
public class Person implements Comparable {
@Expose
private Integer code;
@Expose
private Integer gender;
@Expose
private List<ModelObject> nationality = new ArrayList<ModelObject>();
@Expose
private String activityShort;
@Expose
private... | private Statistics statistics; | 6 |
AKSW/KBox | kbox.kibe/src/main/java/org/aksw/kbox/kibe/SPARQLKNSServer.java | [
"public class KN extends KNComparator {\n\t\n\tpublic static final String NAME = \"name\";\n\tpublic static final String SOURCE = \"source\";\n\tpublic static final String URL = \"url\";\n\tpublic static final String TARGET = \"target\";\n\tpublic static final String DESC = \"description\";\n\tpublic static final S... | import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.aksw.kbox.kns.KN;
import org.aksw.kbox.kns.KNSServer;
import org.aksw.kbox.kns.KNSVisitor;
import org.aksw.kbox.kns.ServerAddress;
import org.aksw.kbox.kns.Source;
import org.apache.jena.query.QuerySolution;
import ... | package org.aksw.kbox.kibe;
/**
*
* @author emarx
*
* TODO: Implement multi-target sources
*
*/
public class SPARQLKNSServer extends KNSServer {
private Map<String, String> paramMap = null; | private ServerAddress serverAddress = null; | 3 |
jlmd/UpcomingMoviesMVP | app/src/main/java/com/jlmd/android/newfilmsmvp/di/module/PresenterModule.java | [
"public interface MovieDetailsApi {\n\n static final String BASE_URL = \"https://api.themoviedb.org/3/movie\";\n static final String API_KEY = \"XXX\";\n\n void getMovieDetails(int movieId, Callback callback);\n\n public interface Callback {\n\n void onFinish(MovieDetails movieDetails);\n\n void onError(S... | import com.jlmd.android.newfilmsmvp.api.moviedetails.MovieDetailsApi;
import com.jlmd.android.newfilmsmvp.api.upcomingmovies.UpcomingMoviesApi;
import com.jlmd.android.newfilmsmvp.domain.model.Movie;
import com.jlmd.android.newfilmsmvp.mvp.presenter.MovieDetailsPresenter;
import com.jlmd.android.newfilmsmvp.mvp.present... | package com.jlmd.android.newfilmsmvp.di.module;
/**
* @author jlmd
*/
@Module(
complete = false,
library = true)
public class PresenterModule {
@Provides
@Singleton | MoviesListPresenter providesMoviesListPresenter(UpcomingMoviesApi upcomingMoviesApi, Bus eventBus, | 1 |
izumin5210/Sunazuri | app/src/main/java/info/izumin/android/sunazuri/infrastructure/InfrastructureComponent.java | [
"public interface OauthRepository {\n Single<AuthorizedUser> getToken(String code);\n}",
"public interface TeamsRepository {\n Single<List<Team>> get(AuthorizedUser user);\n}",
"public interface UsersRepository {\n Observable<AuthorizedUser> getCurrentUser();\n Single<List<AuthorizedUser>> getAuthor... | import dagger.Component;
import info.izumin.android.sunazuri.domain.repository.OauthRepository;
import info.izumin.android.sunazuri.domain.repository.TeamsRepository;
import info.izumin.android.sunazuri.domain.repository.UsersRepository;
import info.izumin.android.sunazuri.infrastructure.api.ApiModule;
import info.izum... | package info.izumin.android.sunazuri.infrastructure;
/**
* Created by izumin on 5/13/2016 AD.
*/
@Singleton
@Component(
modules = {
InfrastructureModule.class,
RepositoryModule.class,
HttpClientModule.class,
ApiModule.class,
Ca... | OauthParams oauthParams(); | 5 |
idega/se.agura.memorial | src/java/se/agura/memorial/search/impl/MalmoChurchSearch.java | [
"public class CustomMemorialDate {\n\tprivate Integer day = null;\n\tprivate Integer month = null;\n\tprivate Integer year = null;\n\t\n\tpublic CustomMemorialDate(Integer year, Integer month, Integer day) {\n\t\tthis.day = day;\n\t\tthis.month = month;\n\t\tthis.year = year;\n\t}\n\t\n\t\n\tpublic CustomMemorialD... | import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import se.agura.memorial.search.api.CustomMemorialDate;
import se.agura.memorial.search.api.Grave;
im... | if (conn != null) {
ConnectionBroker.freeConnection(DATABASE, conn);
}
}
return result;
}
public String getLopNr(String str) {
String[] fields = str.split(":");
return fields[1];
}
public String getGravId(String str) {
String[] fields = str.split(":");
return fields[0];
}
... | new GraveInformation( | 2 |
Akshansh986/Webkiosk | Webkiosk/src/main/java/com/blackMonster/webkiosk/crawler/CrawlerDelegate.java | [
"public class CrawlerSubjectInfo extends SubjectAttendance {\n\n private String link;\n\n public String getLink() {\n return link;\n }\n\n public void setLink(String link) {\n\n if (link == null || link.equals(\"\"))\n link = null;\n\n this.link = link;\n }\n}",
"pub... | import android.content.Context;
import com.blackMonster.webkiosk.crawler.Model.CrawlerSubjectInfo;
import com.blackMonster.webkiosk.crawler.Model.DetailedAttendance;
import com.blackMonster.webkiosk.crawler.Model.SubjectAttendance;
import com.blackMonster.webkiosk.crawler.dateSheet.DSSPFetch;
import com.blackMonster.we... | package com.blackMonster.webkiosk.crawler;
/**
* Created by akshansh on 07/07/15.
*/
public class CrawlerDelegate {
private String colg, enroll, pass;
private Context context;
private SiteLogin siteLogin;
public CrawlerDelegate( Context context) {
this.context = context;
}
pu... | List<CrawlerSubjectInfo> crawlerSubInfos = (List<CrawlerSubjectInfo>)(List<?>) getSubjectAttendanceMain(); | 0 |
curtisullerich/attendance | src/test/java/edu/iastate/music/marching/attendance/test/model/interact/FormTimeWorkedTest.java | [
"public class AppDataManager extends AbstractManager {\n\n\tprivate DataTrain dataTrain;\n\n\tpublic AppDataManager(DataTrain dataTrain) {\n\t\tthis.dataTrain = dataTrain;\n\t}\n\n\t/**\n\t * Always returns an instance of AppData, a default one if none is in the\n\t * datastore\n\t * \n\t * @return\n\t */\n\tpublic... | import static org.junit.Assert.assertEquals;
import org.joda.time.LocalDate;
import org.junit.Test;
import edu.iastate.music.marching.attendance.model.interact.AppDataManager;
import edu.iastate.music.marching.attendance.model.interact.DataTrain;
import edu.iastate.music.marching.attendance.model.interact.FormManager;
... | package edu.iastate.music.marching.attendance.test.model.interact;
public class FormTimeWorkedTest extends AbstractDatastoreTest {
/*
// note that form D does not autoapprove, because we can't know which
// absence SHOULD be approved. We instead increment the number of available
// minutes in the student object.... | AppData ad = adc.get(); | 4 |
ieee8023/PDFViewer | src/org/ebookdroid/ui/viewer/views/ManualCropView.java | [
"public class Page {\n\n static final LogContext LCTX = LogManager.root().lctx(\"Page\", false);\n\n public final PageIndex index;\n public final PageType type;\n public final CodecPageInfo cpi;\n\n final IActivityController base;\n public final PageTree nodes;\n\n RectF bounds;\n int aspect... | import org.ebookdroid.common.settings.types.PageAlign;
import org.ebookdroid.core.EventCrop;
import org.ebookdroid.core.Page;
import org.ebookdroid.core.ViewState;
import org.ebookdroid.ui.viewer.IActivityController;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import an... | package org.ebookdroid.ui.viewer.views;
public class ManualCropView extends View {
private static final Paint PAINT = new Paint();
private final IActivityController base;
private final GestureDetector gestureDetector;
private final ActionController<ManualCropView> controller = new ActionControll... | private Page page; | 0 |
gemserk/jresourcesmanager | resourcesmanager-tests/src/main/java/com/gemserk/resources/tests/JFrameWithImageResourceLoaderProviderSample.java | [
"public class Resource<T> {\n\n\tT data = null;\n\n\tDataLoader<T> dataLoader;\n\n\tprotected Resource(DataLoader<T> dataLoader) {\n\t\tthis(dataLoader, true);\n\t}\n\n\tprotected Resource(DataLoader<T> dataLoader, boolean deferred) {\n\t\tthis.dataLoader = dataLoader;\n\t\tif (!deferred)\n\t\t\treload();\n\t}\n\n\... | import java.awt.Color;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import com.gemserk.r... | package com.gemserk.resources.tests;
public class JFrameWithImageResourceLoaderProviderSample {
@SuppressWarnings("serial")
public static void main(String[] args) {
| final ResourceManager<String> resourceManager = new ResourceManagerImpl<String>(); | 1 |
tteguayco/JITRAX | src/es/ull/etsii/jitrax/database/DbmsDriver.java | [
"public class Attribute {\n\n\tprivate String name;\n\tprivate DataType dataType;\n\t\n\tpublic Attribute(String aName, DataType aDataType) {\n\t\tname = aName;\n\t\tdataType = aDataType;\n\t}\n\t\n\tpublic boolean equals(Object object) {\n\t\tif (object != null && object instanceof Attribute) {\n\t\t\tAttribute an... | import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import es.ull.etsii.jitrax.adt.Attribute;
import es.ull.etsii.jitrax.adt.Database;
import es.ull.etsii.jitrax.adt.Datum;
import es.ull.etsii.jitrax.a... | package es.ull.etsii.jitrax.database;
public class DbmsDriver {
protected String dbmsPrefix;
protected String hostname;
protected String port;
protected String username;
protected String password;
protected Connection connection;
protected ResultSet queryResultSet;
public DbmsDriver(String aDbmsPrefix, S... | Table auxTable; | 4 |
getsocial-im/getsocial-android-sdk | example/src/main/java/im/getsocial/demo/fragment/RootFragment.java | [
"public class MenuItem {\n\n\tprivate final String _title;\n\tprivate String _subtitle;\n\tprivate Action _action;\n\tprivate EnabledCheck _enabledCheck;\n\tprivate TextGenerator _subtitleTextGenerator;\n\n\tprivate MenuItem(String title) {\n\t\t_title = title;\n\t\t_subtitle = null;\n\t\t_action = null;\n\t\t_enab... | import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import androidx.annotation.Nullable;
import com.facebook.AccessToken;
import com.facebook.AccessT... | /*
* Copyright 2015-2017 GetSocial B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | protected List<MenuItem> createListData() { | 0 |
JorenSix/Panako | src/be/panako/cli/Same.java | [
"public class QueryResult {\n\t\n\t//query info\n\tpublic final String queryPath;\t\n\tpublic final double queryStart;\n\tpublic final double queryStop;\n\t\n\t//ref info\n\tpublic final String refIdentifier;\n\tpublic final String refPath;\n\tpublic final double refStart;\n\tpublic final double refStop;\n\t\n\t//m... | import java.util.HashSet;
import be.panako.strategy.QueryResult;
import be.panako.strategy.QueryResultHandler;
import be.panako.strategy.olaf.OlafStrategy;
import be.panako.util.Config;
import be.panako.util.Key; | package be.panako.cli;
public class Same extends Application{
@Override
public void run(String... args) {
if(args.length == 2) {
String first = args[0];
String other = args[1];
if( checkFile(first) && checkFile(other))
same(first,other);
else
printHelp();
}else {
printHelp();
}
}
... | Config.set(Key.OLAF_STORAGE,"MEM"); | 3 |
ground-context/ground | modules/postgres/app/edu/berkeley/ground/postgres/dao/core/PostgresEdgeDao.java | [
"public interface EdgeDao extends ItemDao<Edge> {\n\n @Override\n default Class<Edge> getType() {\n return Edge.class;\n }\n\n @Override\n Edge retrieveFromDatabase(String sourceKey) throws GroundException;\n\n @Override\n Edge retrieveFromDatabase(long id) throws GroundException;\n\n List<Long> getLeave... | import com.fasterxml.jackson.databind.JsonNode;
import edu.berkeley.ground.common.dao.core.EdgeDao;
import edu.berkeley.ground.common.exception.GroundException;
import edu.berkeley.ground.common.exception.GroundException.ExceptionType;
import edu.berkeley.ground.common.model.core.Edge;
import edu.berkeley.ground.common... | /**
* 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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>Unless required by applicable law or agreed to in writing, software distributed ... | public Edge create(Edge edge) throws GroundException { | 1 |
b3dgs/warcraft-remake | warcraft-game/src/main/java/com/b3dgs/warcraft/object/state/StateWalk.java | [
"public final class Constant\r\n{\r\n /** Application name. */\r\n public static final String PROGRAM_NAME = \"Warcraft Remake\";\r\n /** Application version. */\r\n public static final Version PROGRAM_VERSION = Version.create(0, 0, 7);\r\n /** Native resolution. */\r\n public static final Resolut... | import com.b3dgs.lionengine.Animation;
import com.b3dgs.warcraft.constant.Constant;
import com.b3dgs.warcraft.object.EntityModel;
import com.b3dgs.warcraft.object.State;
import com.b3dgs.warcraft.object.feature.EntityStats;
import com.b3dgs.warcraft.object.feature.Repairer;
| /*
* Copyright (C) 2013-2022 Byron 3D Games Studio (www.b3dgs.com) Pierre-Alexandre (contact@b3dgs.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the Licen... | final EntityStats stats = model.getFeature(EntityStats.class);
| 3 |
gdi-by/downloadclient | src/main/java/de/bayern/gdi/processor/WFSPostParamsBuilder.java | [
"@XmlRootElement(name = \"DownloadSchritt\")\n@XmlAccessorType(XmlAccessType.FIELD)\npublic class DownloadStep {\n\n @XmlElement(name = \"ServiceTyp\")\n private String serviceType;\n\n @XmlElement(name = \"URL\")\n private String serviceURL;\n\n @XmlElement(name = \"DownloadPfad\")\n private Stri... | import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import de.bayern.gdi.model.DownloadStep;
import de.bayern.gdi.model.Parameter;
import de.bayern.gdi.processor.Downloa... | /*
* DownloadClient Geodateninfrastruktur Bayern
*
* (c) 2016 GSt. GDI-BY (gdi.bayern.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICE... | QueryType queryType = DownloadStepConverter.findQueryType( | 1 |
pokowaka/android-geom | geom/src/main/java/math/geom2d/conic/HyperbolaBranch2D.java | [
"public class AffineTransform2D implements Bijection2D, GeometricObject2D,\r\n Cloneable {\r\n\r\n // coefficients for x coordinate.\r\n protected double m00, m01, m02;\r\n\r\n // coefficients for y coordinate.\r\n protected double m10, m11, m12;\r\n\r\n // ====================================... | import static java.lang.Math.abs;
import static java.lang.Math.cos;
import static java.lang.Math.cosh;
import static java.lang.Math.hypot;
import static java.lang.Math.log;
import static java.lang.Math.pow;
import static java.lang.Math.sin;
import static java.lang.Math.sinh;
import java.util.ArrayList;
import ... | package math.geom2d.conic;
/**
* Branch of an Hyperbola2D.
*/
public class HyperbolaBranch2D extends AbstractSmoothCurve2D implements
SmoothContour2D, Cloneable {
// ===================================================================
// Static constructor
/**
* Generic co... | for (Curve2D curve : set.curves()) {
| 3 |
princeofgiri/f-droid | F-Droid/src/org/fdroid/fdroid/net/WifiStateChangeService.java | [
"public class FDroidApp extends Application {\n\n // for the local repo on this device, all static since there is only one\n public static int port = 8888;\n public static String ipAddressString = null;\n public static String ssid = \"\";\n public static String bssid = \"\";\n public static Repo r... | import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.AsyncTask;
import android.os.IBinder;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import org.fdroid.fd... |
package org.fdroid.fdroid.net;
public class WifiStateChangeService extends Service {
public static final String BROADCAST = "org.fdroid.fdroid.action.WIFI_CHANGE";
private static WaitForWifiAsyncTask asyncTask;
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
i... | LocalRepoKeyStore localRepoKeyStore = LocalRepoKeyStore.get(context); | 3 |
paulirotta/cascade | cascade/src/main/java/com/reactivecascade/reactive/ui/ReactiveImageView.java | [
"public class ImmutableValue<T> implements ISafeGettable<T> {\n @SuppressWarnings(\"unchecked\")\n private final AtomicReference<T> valueAR = new AtomicReference<>((T) VALUE_NOT_AVAILABLE);\n\n private final ConcurrentLinkedQueue<IBaseAction<T>> thenActions = new ConcurrentLinkedQueue<>();\n\n @Nullable... | import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StyleRes;
import android.support.annotation.UiThread;
import android.util.AttributeSet;
import android.widget.I... | /*
This file is part of Reactive Cascade which is released under The MIT License.
See license.md , https://github.com/futurice/cascade and http://reactivecascade.com for details.
This is open source for the common good. Please contribute improvements by pull request or contact paulirotta@gmail.com
*/
package com.reacti... | AssertUtil.assertNotNull(mOrigin); | 4 |
talklittle/reddit-is-fun | src/com/andrewshu/android/reddit/login/LoginTask.java | [
"public class CacheInfo implements Serializable {\n\tstatic final long serialVersionUID = 39;\n\tstatic final String TAG = \"CacheInfo\";\n\t\n\tstatic final Object CACHE_LOCK = new Object();\n\t\n\t// timestamps for each cache\n\tpublic long subredditTime = 0;\n\tpublic long threadTime = 0;\n\tpublic long subreddi... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.HttpException;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apa... | package com.andrewshu.android.reddit.login;
public class LoginTask extends AsyncTask<Void, Void, Boolean> {
private static final String TAG = "LoginTask";
protected String mUsername;
private String mPassword;
protected String mUserError = null;
| private RedditSettings mSettings; | 5 |
mock4aj/mock4aj | mock4aj-core/src/main/java/info/rubico/mock4aj/codegen/cglib/calls/caller/MethodCallerBytecodeGenerator.java | [
"public interface CallSource {\n\n /**\n * @return The type of the source class. Could be an interface or a concrete class.\n */\n Class<?> getType();\n\n /**\n * @return The name of the source class (including the package path).\n */\n String getName();\n\n}",
"public abstract class C... | import info.rubico.mock4aj.api.calls.CallSource;
import info.rubico.mock4aj.api.calls.CallTarget;
import info.rubico.mock4aj.api.calls.ExistingSource;
import info.rubico.mock4aj.api.calls.MethodCaller;
import info.rubico.mock4aj.api.exceptions.EncapsulatedExceptionThrownByTarget;
import info.rubico.mock4aj.api.exceptio... | }
public void generateClass(ClassVisitor visitor) {
createCallerClass(visitor);
}
private void createCallerClass(ClassVisitor visitor) {
Class<?> superclass = determineSuperclass(callSource.getType());
Class<?>[] interfaces = determineInterfaces(callSource.getType());
... | .getType(EncapsulatedExceptionThrownByTarget.class)); | 4 |
beckchr/juel | modules/impl/src/main/java/de/odysseus/el/tree/impl/ast/AstProperty.java | [
"public abstract class ELContext {\r\n\tprivate Map<Class<?>, Object> context;\r\n\tprivate Locale locale;\r\n\tprivate boolean resolved;\r\n\r\n\t/**\r\n\t * Returns the context object associated with the given key. The ELContext maintains a\r\n\t * collection of context objects relevant to the evaluation of an ex... | import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import javax.el.ELContext;
import javax.el.ELException;
import javax.el.MethodInfo;
import javax.el.MethodNotFoundException;
import javax.el.PropertyNotFoundException;
import javax.el.ValueReference;
import de.odysseus.el.misc.... | Object property = getProperty(bindings, context);
if (property == null && strict) {
throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", "null", base));
}
return new ValueReference(base, property);
}
@Override
public Object eval(Bindings bindings, ELContext c... | public MethodInfo getMethodInfo(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes) {
| 1 |
PunchThrough/bean-sdk-android | sdk/src/test/java/com/punchthrough/bean/sdk/utility/MiscTest.java | [
"public class NoEnumFoundException extends Exception {\n public NoEnumFoundException(String detailMessage) {\n super(detailMessage);\n }\n}",
"public class EnumParse {\n\n /**\n * Denotes enums that provide a method \"int getRawValue()\" to get their unique int representation.\n */\n pu... | import com.punchthrough.bean.sdk.internal.BeanMessageID;
import com.punchthrough.bean.sdk.internal.upload.sketch.BeanState;
import com.punchthrough.bean.sdk.internal.exception.NoEnumFoundException;
import com.punchthrough.bean.sdk.internal.utility.EnumParse;
import org.junit.Test;
import java.nio.ByteOrder;
import stat... | package com.punchthrough.bean.sdk.utility;
public class MiscTest {
@Test
public void testIntToByte() {
assertThat(intToByte(0xFF)).isEqualTo((byte) 0xFF);
}
@Test
public void testEnumWithRawInt() throws NoEnumFoundException {
assertThat(EnumParse.enumWithRawValue(BeanMessageID... | assertThat(intToUInt32(0, ByteOrder.BIG_ENDIAN)).isEqualTo(intArrayToByteArray( | 2 |
desht/ScrollingMenuSign | src/main/java/me/desht/scrollingmenusign/spout/SMSListWidget.java | [
"public class SMSException extends DHUtilsException {\n\n private static final long serialVersionUID = 1L;\n\n public SMSException(String message) {\n super(message);\n }\n\n}",
"public class SMSMenu extends Observable implements SMSPersistable, SMSUseLimitable, ConfigurationListener, Comparable<S... | import com.google.common.base.Joiner;
import me.desht.dhutils.Debugger;
import me.desht.dhutils.MiscUtil;
import me.desht.scrollingmenusign.SMSException;
import me.desht.scrollingmenusign.SMSMenu;
import me.desht.scrollingmenusign.SMSMenuItem;
import me.desht.scrollingmenusign.ScrollingMenuSign;
import me.desht.scrolli... | package me.desht.scrollingmenusign.spout;
public class SMSListWidget extends GenericListWidget {
private static final float THRESHOLD = 129;
private final SMSSpoutView view;
private final SpoutPlayer sp;
private String defaultTextColor = ChatColor.BLACK.toString();
private boolean ignoreNextSele... | throw new SMSException("spout list widget onSelected: index " + idx + " out of range for " + menu.getName() + " ?"); | 0 |
peshkira/c3po | c3po-webapi/app/controllers/Samples.java | [
"public class RepresentativeAlgorithmFactory {\n\n /**\n * The known algorithms.\n */\n private static final String[] ALGORITHMS = { \"sizesampling\", \"syssampling\", \"distsampling\" };\n\n /**\n * The factory method.\n * \n * @param id\n * the id of the algorithm implementation\n * @ret... | import com.petpet.c3po.common.Constants;
import com.petpet.c3po.datamodel.Element;
import com.petpet.c3po.datamodel.Filter;
import com.petpet.c3po.utils.Configurator;
import com.petpet.c3po.utils.DataHelper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import pla... | /*******************************************************************************
* Copyright 2013 Petar Petrov <me@petarpetrov.org>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
... | samples.add(DataHelper.parseElement(cursor.next(), pl)); | 5 |
osiam/connector4java | src/main/java/org/osiam/client/OsiamConnector.java | [
"@JsonIgnoreProperties(ignoreUnknown = true)\npublic class AccessToken {\n\n @JsonProperty(\"access_token\")\n private String token;\n @JsonProperty(\"expires_at\")\n private Date expiresAt;\n @JsonSerialize(using = ScopeSerializer.class)\n @JsonDeserialize(using = ScopeDeserializer.class)\n @J... | import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Strings;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.glassfish.jersey.apache.connector.ApacheClientProperties;
import org.glassfish.jersey.apache.connector.ApacheConnectorProvider;
import org.glass... | /**
* The MIT License (MIT)
*
* Copyright (C) 2013-2016 tarent solutions GmbH
*
* 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... | private static final javax.ws.rs.client.Client client = ClientBuilder.newClient(new ClientConfig()
| 1 |
johanneslerch/FlowTwist | FlowTwist/test/flow/twist/test/unit/BackwardsGraphTests.java | [
"public static TrackableSelector taint(final String name) {\n\treturn new TrackableSelector() {\n\t\n\t\t@Override\n\t\tpublic boolean matches(Trackable trackable) {\n\t\t\tif (trackable instanceof Taint) {\n\t\t\t\tString taintString = ((Taint) trackable).value.toString();\n\t\t\t\tif (taintString.equals(name)) {\... | import static flow.twist.config.AnalysisConfigurationBuilder.i2oSimpleClassForNameDefaults;
import static flow.twist.config.AnalysisDirection.BACKWARDS;
import static flow.twist.test.util.selectors.TrackableSelectorFactory.taint;
import static flow.twist.test.util.selectors.TrackableSelectorFactory.taintContains;
impor... | package flow.twist.test.unit;
public class BackwardsGraphTests extends AbstractTaintAnalysisTest {
private UnitSelector forNameSelector = unitByLabel("forName");
@Override
protected AnalysisGraphVerifier executeTaintAnalysis(String[] classNames) {
AnalysisGraphVerifier verifier = new AnalysisGraphVerifier();... | verifier.find(unitInMethod("redundantInvokeable", forNameSelector)).pathTo(taintContains("red_className"), | 1 |
Jannyboy11/CustomRecipes | src/main/java/com/gmail/jannyboy11/customrecipes/impl/crafting/vanilla/recipe/CRShapedRecipe.java | [
"public interface ShapedRecipe extends CraftingRecipe {\n\t\n\t/**\n\t * Get the width of the recipe\n\t * @return\n\t */\n\tpublic int getWidth();\n\t\n\t/**\n\t * Get the height of the recipe\n\t * @return\n\t */\n\tpublic int getHeight();\n\t\n\t/**\n\t * Get the ingredients of the recipe.\n\t * The size of the ... | import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import com.gmail.jannyboy11.customrecipes.api.crafting.vanilla.recipe.ShapedRecipe;
import com.gmail.jannyboy11.customrecipes.impl.crafting.CRCraftingIngredient;
import com.gmail.jannyboy11.customrecipes.impl.craf... | package com.gmail.jannyboy11.customrecipes.impl.crafting.vanilla.recipe;
public class CRShapedRecipe<R extends ShapedRecipes> extends CRVanillaRecipe<R> implements ShapedRecipe {
public CRShapedRecipe(R nmsRecipe) {
super(nmsRecipe);
}
public CRShapedRecipe(NBTTagCompound recipeCompound) {
this((R) deseri... | public List<CRChoiceIngredient> getIngredients() { | 2 |
kaltura/player-sdk-native-android | playerSDK/src/main/java/com/kaltura/playersdk/players/KExoPlayer.java | [
"public class ExoplayerWrapper implements ExoPlayer.Listener, ChunkSampleSource.EventListener,\n DefaultBandwidthMeter.EventListener, MediaCodecVideoTrackRenderer.EventListener,\n MediaCodecAudioTrackRenderer.EventListener, TextRenderer,\n StreamingDrmSessionManager.EventListener, DashChunkSource.EventList... | import android.annotation.TargetApi;
import android.content.Context;
import android.media.MediaDrm;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.view.Surface;
import android.vi... |
if (mPassedPlay && playWhenReady) {
mPassedPlay = false;
LOGD(TAG, "Change to PlayKey");
mPlayerListener.eventWithValue(this, KPlayerListener.PlayKey, null);
}
}
break;
... | public TrackFormat getTrackFormat(TrackType trackType, int index) { | 4 |
bafomdad/uniquecrops | com/bafomdad/uniquecrops/crops/Millennium.java | [
"public abstract class BlockCropsBase extends BlockCrops {\n\t\n\tprivate EnumCrops type;\n\tprotected boolean extra;\n\tprotected boolean canPlant;\n\tprotected boolean clickHarvest;\n\n\tpublic BlockCropsBase(EnumCrops type, boolean extra, boolean canPlant) {\n\t\t\n\t\tthis.type = type;\n\t\tthis.extra = extra;\... | import java.util.Random;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import com.bafomdad.uniquecrops.blocks.BlockCropsBase;
import com.bafo... | package com.bafomdad.uniquecrops.crops;
public class Millennium extends BlockCropsBase {
public Millennium() {
| super(EnumCrops.FOREVERPLANT, true, UCConfig.cropMillennium); | 3 |
edeoliveira/MailsterSMTP | src/org/mailster/smtp/core/SMTPConnectionHandler.java | [
"public class SMTPServerConfig \n{\n\t/**\n\t * Server name.\n\t */\n\tpublic static final String NAME = \"MailsterSMTP\";\n\t\n\t/**\n\t * Server version\n\t */\n\tpublic static final String VERSION = \"1.0.0-M3\";\n\n\t/**\n\t * 4 megs by default. The server will buffer incoming messages to disk\n\t * when they h... | import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.mina.core.buffer.BufferDataException;
import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IdleStatus;
import org.apache.mina.core.session.IoSession;
import or... | package org.mailster.smtp.core;
/**
* The IoHandler that handles a connection. This class
* passes most of it's responsibilities off to the
* CommandHandler.
*
* @author De Oliveira Edouard <doe_wanted@yahoo.fr>
*/
public class SMTPConnectionHandler extends IoHandlerAdapter
{
// Session objects
public... | private SMTPServerConfig config; | 0 |
zhouchaoyi/springMVC_mybatis_angularjs_HUI | src/main/java/com/dawn/bgSys/filter/LoginFilter.java | [
"public class Consts {\n\n /**\n * 推送种类:每天九点推送\n */\n public static final String PUSH_AT_9 = \"PUSH_AT_9\";\n\n /**\n * 推送种类:每天九点推送\n */\n public static final String PUSH_PER_HOUR = \"PUSH_PER_HOUR\";\n\n /**\n * 通用apk版本上传配置文件中,版本key开头标识\n */\n public static final String C... | import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dawn.bgSys.common.*;
import com.dawn.bgSys.common.consts.Consts;
import com.dawn.bgSys.domain.Module;
import com.dawn.bgSys.domain.User;
import com.dawn.bgSys.exception.GenericException;
import com.dawn.bgSys.exception.OperateFail... | package com.dawn.bgSys.filter;
/**
* Date: 13-9-26
* Time: 下午1:38
*/
public class LoginFilter extends BaseFilter {
private Logger logger= Logger.getLogger(LoginFilter.class);
private static final String[] IGNORE_URI = {"/login.do"};
private String appTK;
public void doSelfFilter(HttpServletRequ... | throw new OperateFailureException("请先登录",Consts.TOKEN_ERROR_CODE); | 0 |
philliphsu/ClockPlus | app/src/main/java/com/philliphsu/clock2/alarms/ui/AlarmsFragment.java | [
"@AutoValue\npublic abstract class Alarm extends ObjectWithId implements Parcelable {\n private static final int MAX_MINUTES_CAN_SNOOZE = 30;\n\n // =================== MUTABLE =======================\n private long snoozingUntilMillis;\n private boolean enabled;\n private final boolean[] recurringDa... | import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.Loader;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.philliphsu.bottomsheetpickers.ti... | /*
* Copyright 2017 Phillip Hsu
*
* This file is part of ClockPlus.
*
* ClockPlus 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 versio... | return new AlarmsListCursorLoader(getActivity()); | 2 |
mru00/cutlet | CutletLib/src/main/java/com/cutlet/lib/testing/DataTable.java | [
"@ToString\r\npublic class Dimension implements Serializable{\r\n\r\n private double length;\r\n private double width;\r\n\r\n public Dimension(final double length, final double width) {\r\n this.length = length;\r\n this.width = width;\r\n }\r\n\r\n public double getLength() {\r\n ... | import com.cutlet.lib.model.Dimension;
import com.cutlet.lib.model.Panel;
import com.cutlet.lib.model.PanelInstance;
import com.cutlet.lib.model.Project;
import com.cutlet.lib.model.StockSheet;
import java.util.ArrayList;
import java.util.List;
| /*
* Copyright (C) 2017 rudolf.muehlbauer@gmail.com
*/
package com.cutlet.lib.testing;
/**
*
* @author rmuehlba
*/
public class DataTable extends AbstractTestData {
@Override
public Project getData() {
| final StockSheet sheet = makeSheet(2500, 600);
| 4 |
google/devtools-driver | third_party/ios_driver/org/uiautomation/ios/wkrdp/DOMContext.java | [
"public final class ChildIframeInserted extends NodeEvent {\n private final NodeId contentDocument;\n\n public ChildIframeInserted(JSONObject message) throws JSONException {\n super(message);\n JSONObject params = message.optJSONObject(\"params\").getJSONObject(\"node\");\n JSONObject json = params.getJS... | import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openqa.selenium.TimeoutException;
import org.uiau... | /*
* Copyright 2012-2013 eBay Software Foundation and ios-driver committers
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... | private RemoteWebElement window; | 5 |
aksalj/africastalking-java | libs/payment/src/main/java/com/africastalking/PaymentService.java | [
"public final class Bank {\n\n public String currencyCode;\n public float amount;\n public BankAccount bankAccount;\n public String narration;\n public Map<String, String> metadata;\n\n public Bank(BankAccount bankAccount, String amount, String narration, Map<String, String> metadata) {\n t... | import com.africastalking.payment.recipient.Bank;
import com.africastalking.payment.response.B2BResponse;
import com.africastalking.payment.response.B2CResponse;
import com.africastalking.payment.BankAccount;
import com.africastalking.payment.response.BankTransferResponse;
import com.africastalking.payment.response.Che... | package com.africastalking;
public final class PaymentService extends Service {
private PaymentService sInstance;
private IPayment payment;
private PaymentService(String username, String apiKey) {
super(username, apiKey);
}
PaymentService() {
super();
}
@Override
... | private HashMap<String, Object> makeB2BRequest(String product, Business recipient) { | 6 |
hyperwallet/java-sdk | src/test/java/com/hyperwallet/clientsdk/util/HyperwalletApiClientTest.java | [
"public class Hyperwallet {\n\n public static final String VERSION = \"2.4.0\";\n private final HyperwalletApiClient apiClient;\n private final String programToken;\n private final String url;\n\n /**\n * Create Hyperwallet SDK instance\n *\n * @param username API key assigne... | import cc.protea.util.http.Response;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.collect.Sets;
import com.hyperwallet.clientsdk.Hyperwallet;
import com.hyperwallet.clientsdk.HyperwalletException;
import com.hyperwallet.clientsdk.mode... | assertThat(e.getErrorMessage(), is(equalTo("test3")));
assertThat(e.getResponse(), is(notNullValue()));
}
}
@Test
public void testPost_NullHeaders() throws Exception {
TestBody requestBody = new TestBody();
requestBody.test1 = "value1";
requestBody.ge... | hyperwalletApiClient.post(baseUrl + "/test?test-query=test-value", requestBody, HyperwalletPayment.class); | 4 |
FedUni/caliko | caliko-demo/src/main/java/au/edu/federation/caliko/demo2d/FixedBaseUnconstrainedBaseBaseMultipleUnconstrainedBones.java | [
"public class FabrikBone2D implements FabrikBone<Vec2f,FabrikJoint2D>\r\n{\r\n\t/**\r\n\t * mJoint\tThe joint attached to this FabrikBone2D.\r\n\t * <p>\r\n\t * Each bone has a single FabrikJoint2D which controls the angle to which the bone is\r\n\t * constrained with regard to the previous (i.e. earlier / closer t... | import au.edu.federation.caliko.FabrikBone2D;
import au.edu.federation.caliko.FabrikChain2D;
import au.edu.federation.caliko.FabrikStructure2D;
import au.edu.federation.utils.Mat4f;
import au.edu.federation.utils.Vec2f; | package au.edu.federation.caliko.demo2d;
/**
* @author jsalvo
*/
public class FixedBaseUnconstrainedBaseBaseMultipleUnconstrainedBones extends CalikoDemoStructure2D {
@Override
public void setup() {
// Instantiate our FabrikStructure2D
this.structure = new FabrikStructure2D("Demo 2 - Chain with fixed base (t... | FabrikChain2D chain = new FabrikChain2D(); | 1 |
DorsetProject/dorset-framework | components/reporters/sql-reporter/src/test/java/edu/jhuapl/dorset/reporting/SqlReporterTest.java | [
"public class Request {\n /** Maximum length of the identifier string ({@value #MAX_ID_LENGTH}) */\n public static final int MAX_ID_LENGTH = 36;\n\n private String text;\n private final String id;\n private final User user;\n\n /**\n * Create a request\n * <p>\n * Automatically sets th... | import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
i... | /*
* Copyright 2016 The Johns Hopkins University Applied Physics Laboratory LLC
* 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 of the License at
*
* http://www.apache.org/li... | Report r = new Report(req); | 4 |
dbdkmezz/true-sight-dota | app/src/main/java/com/carver/paul/truesight/Ui/MainActivityPresenter.java | [
"public class Variables {\n private static final List<Integer> l0DarkBlueRange = Arrays.asList(104, 117); //108, 117);\n private static final List<Integer> l1CyanRange = Arrays.asList(88, 95); //88);\n private static final List<Integer> l2PurpleRange = Arrays.asList(135, 170); // went up to 154 until 4 Oct... | import java.io.File;
import java.util.Arrays;
import java.util.List;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import com.carver.paul.truesight.ImageRecognition.Variables;
import com.carver.paul.truesight.Models.DataManager;
import com.carver.paul.truesight.M... | /**
* True Sight for Dota 2
* Copyright (C) 2016 Paul Broadbent
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.... | private final HeroesDetectedPresenter mHeroesDetectedPresenter; | 6 |
Epic-Breakfast-Productions/OWAT | implementations/java/OWAT-lib/src/test/java/com/ebp/owat/lib/runner/utilities/RunnerSimpleUtilitiesTest.java | [
"public abstract class ScrambleMatrix<T> extends Matrix<T> {\n\t/**\n\t * Swaps two nodes in the matrix.\n\t * @param sm The move to get the parameters from.\n\t * @throws IllegalArgumentException If the ScrambleMove given is somehow invalid.\n\t */\n\tpublic void swap(ScrambleMove sm) {\n\t\tMoveValidator.throwIfI... | import com.ebp.owat.lib.datastructure.matrix.ScrambleMatrix;
import com.ebp.owat.lib.datastructure.set.LongLinkedList;
import com.ebp.owat.lib.datastructure.value.NodeMode;
import com.ebp.owat.lib.datastructure.value.Value;
import com.ebp.owat.lib.runner.utils.MatrixMode;
import com.ebp.owat.lib.utils.rand.OwatRandGene... | package com.ebp.owat.lib.runner.utilities;
public class RunnerSimpleUtilitiesTest extends RunnerUtilTest {
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(RunnerSimpleUtilitiesTest.class);
@Test
public void testReadDataIn() throws IOException {
ByteArrayInputStream is = new ByteArrayInp... | OwatRandGenerator rand = new RandGenerator(); | 5 |
opaluchlukasz/junit2spock | src/main/java/com/github/opaluchlukasz/junit2spock/core/model/method/MethodModel.java | [
"@Component\npublic class ASTNodeFactory {\n\n private final AstProvider ast;\n\n @Autowired\n public ASTNodeFactory(AstProvider astProvider) {\n this.ast = astProvider;\n }\n\n public ImportDeclaration importDeclaration(Class<?> clazz) {\n return importDeclaration(clazz.getName(), fals... | import com.github.opaluchlukasz.junit2spock.core.ASTNodeFactory;
import com.github.opaluchlukasz.junit2spock.core.Applicable;
import com.github.opaluchlukasz.junit2spock.core.groovism.Groovism;
import com.github.opaluchlukasz.junit2spock.core.node.wrapper.IfStatementWrapper;
import org.eclipse.jdt.core.dom.MethodDeclar... | package com.github.opaluchlukasz.junit2spock.core.model.method;
public abstract class MethodModel {
static final String DEF_MODIFIER = "def ";
| private final ASTNodeFactory astNodeFactory; | 0 |
meefik/linuxdeploy | app/src/main/java/ru/meefik/linuxdeploy/fragment/SettingsFragment.java | [
"public class EnvUtils {\n\n /**\n * Extract file to env directory\n *\n * @param c context\n * @param target target directory\n * @param rootAsset root asset name\n * @param path path to asset file\n * @return true if success\n */\n private static boolean extra... | import android.Manifest;
import android.content.ComponentName;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.pm.PackageManager;
import android.os.Bundle;
import androidx.appcompat.app.AlertDialo... | return true;
case "removeenv":
removeEnvDialog();
return true;
default:
return false;
}
}
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
Preference pre... | (dialog, id) -> new UpdateEnvTask(context).execute()) | 3 |
TNG/property-loader | src/test/java/com/tngtech/propertyloader/impl/PropertyLoaderFactoryTest.java | [
"public class EnvironmentResolvingFilter extends ValueModifyingFilter {\n\n private static final Logger log = LoggerFactory.getLogger(EnvironmentResolvingFilter.class);\n\n private static final Pattern PATTERN = Pattern.compile(\"\\\\$ENV\\\\{(.*)\\\\}\");\n\n @Override\n protected String filterValue(St... | import com.tngtech.propertyloader.impl.filters.EnvironmentResolvingFilter;
import com.tngtech.propertyloader.impl.filters.ThrowIfPropertyHasToBeDefined;
import com.tngtech.propertyloader.impl.filters.VariableResolvingFilter;
import com.tngtech.propertyloader.impl.filters.WarnOnSurroundingWhitespace;
import com.tngtech.... | package com.tngtech.propertyloader.impl;
public class PropertyLoaderFactoryTest {
private final PropertyLoaderFactory propertyLoaderFactory = new PropertyLoaderFactory();
@Test
public void testGetEmptyProperties() {
assertTrue(propertyLoaderFactory.getEmptyProperties().getClass().equals(Proper... | assertTrue(propertyLoaderFactory.getClassLoaderOpener(this.getClass().getClassLoader()).getClass().equals(ClassLoaderOpener.class)); | 4 |
co-ode-owl-plugins/matrix | src/main/java/org/coode/matrix/ui/view/ObjectPropertyMatrixView.java | [
"public interface MatrixModel<R extends OWLObject> extends TreeTableModel<R> {\n\n String getTreeColumnLabel();\n\n Object getMatrixValue(R rowObject, Object columnObject);\n\n List<OWLOntologyChange> setMatrixValue(R rowObj, Object columnObj, Object value);\n\n List<OWLOntologyChange> addMatrixValue(R ... | import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JTable;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import org.coode.matrix.model.api.MatrixModel;
import org.coode.matrix.model.helper.PropertyHelper;
import org.coode.matrix.model.impl.... | package org.coode.matrix.ui.view;
/*
* Copyright (C) 2007, University of Manchester
*
* Modifications to the initial code base are copyright of their
* respective authors, or their employers as appropriate. Authorship
* of the modifications may be determined from the ChangeLog placed at
* the end of this file.
*
*... | setEditorType(OWLObjectListParser.ParseType.OBJPROP); | 3 |
jcgay/send-notification | send-notification/src/test/java/SimpleNotificationCenter.java | [
"@AutoValue\npublic abstract class Application {\n\n /**\n * Uniquely identify an application. <br>\n * In order to ensure your application's signature is unique, the recommendation is to follow the Internet Media\n * type (also known as MIME content type) format as defined in IETF <a href=\"http://t... | import fr.jcgay.notification.Application;
import fr.jcgay.notification.Icon;
import fr.jcgay.notification.Notification;
import fr.jcgay.notification.Notifier;
import fr.jcgay.notification.SendNotification;
import java.net.URL; |
class SimpleNotificationCenter {
public static void main(String[] args) {
URL icon = TerminalNotifierExample.class.getResource("/image/dialog-clean.png");
Application application = Application.builder()
.id("notification-center-example")
.name("Notification Center Exampl... | Notification notification = Notification.builder() | 2 |
google/rejoiner | examples/schema/src/main/java/com/google/api/graphql/schema/GraphQlServlet.java | [
"public final class GuavaListenableFutureSupport {\n private GuavaListenableFutureSupport() {}\n\n /**\n * Converts a {@link ListenableFuture} to a Java8 {@link java.util.concurrent.CompletableFuture}.\n *\n * <p>{@see CompletableFuture} is supported by the provided {@link\n * graphql.execution.AsyncExecu... | import com.google.api.graphql.execution.GuavaListenableFutureSupport;
import com.google.api.graphql.rejoiner.Schema;
import com.google.api.graphql.rejoiner.SchemaProviderModule;
import com.google.api.graphql.schema.cloud.container.ContainerClientModule;
import com.google.api.graphql.schema.cloud.container.ContainerSche... | // Copyright 2017 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | new FirestoreClientModule(), | 4 |
aponom84/MetrizedSmallWorld | src/main/java/org/latna/msw/evaluation/DimensionalityTest.java | [
"public abstract class MetricElement {\n private final List<MetricElement> friends;\n\n public MetricElement() {\n friends = Collections.synchronizedList(new ArrayList());\n }\n \n /**\n * Calculate metric between current object and another.\n * @param gme any element for whose metric ... | import org.latna.msw.MetricElement;
import org.latna.msw.SearchResult;
import org.latna.msw.TestLib;
import org.latna.msw.EvaluatedElement;
import org.latna.msw.MetrizedSmallWorld;
import org.latna.msw.AbstractMetricStructure;
import org.latna.msw.TestResult;
import org.latna.msw.euclidian.EuclidianFactory;
import java... | package org.latna.msw.evaluation;
/**
*
* @author Alexander Ponomarenko aponom84@gmail.com
*/
public class DimensionalityTest {
public static final int NUMBER_OF_THREADS = 12;
public static final String outFileName = "dimText.txt";
/**
* Scans input string and runs the test
* @param args the... | SearchResult result = db.knnSearch(testQ, k, attempts); | 1 |
thiagotts/CloudReports | src/main/java/cloudreports/reports/DataCollector.java | [
"public class SettingBusiness {\n \n private static SettingDAO settingDAO = new SettingDAO();\n \n public static boolean isMailNotificationEnabled() {\n String settingValue = settingDAO.getSetting(\"EnableMailNotification\").getValue();\n return Boolean.valueOf(settingValue);\n }\n \... | import java.util.HashMap;
import java.util.List;
import org.cloudbus.cloudsim.DatacenterBroker;
import org.cloudbus.cloudsim.Vm;
import org.cloudbus.cloudsim.core.CloudSim;
import org.cloudbus.cloudsim.power.PowerHost;
import cloudreports.business.SettingBusiness;
import cloudreports.dao.MigrationDAO;
import cloudrepor... | /*
* Copyright (c) 2010-2012 Thiago T. Sá
*
* This file is part of CloudReports.
*
* CloudReports 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... | ReportDataDAO rdDAO = new ReportDataDAO(); | 1 |
TooTallNate/Java-WebSocket | src/test/java/org/java_websocket/issues/Issue879Test.java | [
"public interface WebSocket {\n\n /**\n * sends the closing handshake. may be send in response to an other handshake.\n *\n * @param code the closing code\n * @param message the closing message\n */\n void close(int code, String message);\n\n /**\n * sends the closing handshake. may be send in res... | import static org.junit.Assert.assertFalse;
import java.io.IOException;
import java.net.BindException;
import java.net.InetSocketAddress;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collection;
import java.util.ConcurrentModificationE... | /*
* Copyright (c) 2010-2020 Nathan Rajlich
*
* 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, mer... | List<WebSocketClient> clients = startNewConnections(numberOfConnections, port); | 1 |
lambdazen/pixy | src/main/java/com/lambdazen/pixy/pipemakers/Bool1.java | [
"public interface PipeMaker {\n\t/** Returns the signature as relationName + \"/\" + arity */\n\tpublic String getSignature();\n\n\t/** Given the bindings, this method returns a PixyPipe and adds any new replacements typically of the form x -> $x */\n\tpublic PixyPipe makePipe(List<PixyDatum> bindings, Map<String, ... | import java.util.List;
import java.util.Map;
import com.lambdazen.pixy.PipeMaker;
import com.lambdazen.pixy.PixyDatum;
import com.lambdazen.pixy.PixyDatumType;
import com.lambdazen.pixy.PixyPipe;
import com.lambdazen.pixy.VariableGenerator;
import com.lambdazen.pixy.pipes.ConnectPipe;
import com.lambdazen.pixy.pipes.Ev... | package com.lambdazen.pixy.pipemakers;
public class Bool1 implements PipeMaker {
@Override
public String getSignature() {
return "(bool)/1";
}
@Override
public PixyPipe makePipe(List<PixyDatum> bindings, Map<String, PixyDatum> replacements, VariableGenerator varGen) {
// Eval pipe, then as() if var, match... | return new ConnectPipe(new EvalPipe(null, list), new FilterPipe(null, new PixyDatum(PixyDatumType.SPECIAL_ATOM, "true"))); | 7 |
chickling/kmanager | src/main/java/com/chickling/kmanager/alert/TaskHandler.java | [
"public class EmailSender {\n private static Logger LOG = LoggerFactory.getLogger(EmailSender.class);\n\n private static AppConfig config;\n\n public static void setConfig(AppConfig _config) {\n config = _config;\n }\n\n public static void sendEmail(String message, String sendTo, String group_topic) {\n ... | import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.chickling.kmanager.email.EmailSender;
import com.chickling.kmanager.email.Template;
import com.chickling.kmanager.initialize.SystemMa... | package com.chickling.kmanager.alert;
/**
* @author Hulva Luva.H
*
*/
public class TaskHandler implements Runnable {
private static Logger LOG = LoggerFactory.getLogger(TaskHandler.class);
@Override
public void run() {
try {
while (true) { | KafkaInfo kafkaInfo = SystemManager.offsetInfoCacheQueue.take(); | 2 |
ceefour/webdav-servlet | src/main/java/net/sf/webdav/methods/DoLock.java | [
"public interface ITransaction {\n\n Principal getPrincipal();\n\n}",
"public interface IWebdavStore {\n\n /**\n * Life cycle method, called by WebdavServlet's destroy() method. Should be used to clean up resources.\n */\n void destroy();\n\n /**\n * Indicates that a new request or transac... | import java.io.IOException;
import java.util.HashMap;
import java.util.Hashtable;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.DocumentBuilder;
import net.sf.webdav.ITransaction;
import net.sf.webdav.IWebdavS... | /*
* Copyright 1999,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | resp.sendError(WebdavStatus.SC_FORBIDDEN); | 3 |
Samourai-Wallet/sentinel-android | app/src/main/java/com/samourai/sentinel/sweep/SendFactory.java | [
"public class SamouraiSentinel {\n\n private static NetworkParameters networkParams = null;\n\n private static HashMap<String,String> xpubs = null;\n private static HashMap<String,String> legacy = null;\n private static HashMap<String,String> bip49 = null;\n private static HashMap<String,String> bip8... | import android.content.Context;
import android.widget.Toast;
import com.samourai.sentinel.SamouraiSentinel;
import com.samourai.sentinel.hd.HD_WalletFactory;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.AddressFormatException;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.DumpedPrivateKey;
impor... | package com.samourai.sentinel.sweep;
public class SendFactory {
private static SendFactory instance = null;
private static Context context = null;
private SendFactory () { ; }
public static SendFactory getInstance(Context ctx) {
context = ctx;
if(instance == null) {
... | if(FormatsUtil.getInstance().isValidBech32(toAddress)) { | 4 |
openmrs/openmrs-module-dataimporttool | api/src/main/java/org/openmrs/module/dataimporttool/api/impl/DataImportToolServiceImpl.java | [
"@Transactional\npublic interface DataImportToolService extends OpenmrsService, Runnable {\n\n\t\tpublic int getPercent();\n\t\t\n\t\tpublic boolean isStarted();\n\t\t\n\t\tpublic boolean isCompleted();\n\t\t\n\t\tpublic void setRunning(boolean running);\n\t\t\n\t\tpublic boolean isRunning();\n\t\t\n\t\tpublic int ... | import java.util.List;
import org.openmrs.api.impl.BaseOpenmrsService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.transaction.annotation.Transactional;
import org.openmrs.module.dataimporttool.api.DataImportToolService;
import org.openmrs.module.datai... | /**
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license.... | TranslationManager tm = new TranslationManager(vm.getTree()); | 2 |
IPEldorado/RemoteResources | src/com/eldorado/remoteresources/android/server/connection/DataServer.java | [
"public enum Status {\n\tOK, ERROR\n}",
"public abstract class IConnectionConstants {\n\n\tpublic static final int CONTROL_SERVER_DEFAULT_PORT = 54321;\n\n\tpublic static final long DEFAULT_FRAME_DELAY = 500;\n\n\tpublic static final int DEFAULT_IMAGE_QUALITY = 50;\n\n\tpublic static final Map<String, String> pol... | import com.eldorado.remoteresources.android.server.ServerLogger;
import com.eldorado.remoteresources.utils.ImageUtils;
import com.eldorado.remoteresources.utils.SocketUtils;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.ServerSocket;
import java.net.... | /*
* (C) Copyright 2014 Instituto de Pesquisas Eldorado (http://www.eldorado.org.br/).
*
* This file is part of the software Remote Resources
*
* All rights reserved. This file and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
* (LGPL) version 3.0 which ... | private final Status status = Status.OK; | 0 |
persado/stevia | src/main/java/com/persado/oss/quality/stevia/spring/SteviaTestBase.java | [
"public interface Constants {\n\n\t/** The Constant FIREFOX. */\n\tpublic static final String FIREFOX = \"*firefox\";\n\t\n\t/** The Constant CHROME. */\n\tpublic static final String CHROME = \"*googlechrome\";\n\t\n\t/** The Constant IEXPLORER. */\n\tpublic static final String IEXPLORER = \"*iexplore\";\n\t\n\t/**... | import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.ITestCont... | package com.persado.oss.quality.stevia.spring;
/*
* #%L
* Stevia QA Framework - Core
* %%
* Copyright (C) 2013 - 2014 Persado
* %%
* Copyright (c) Persado Intellectual Property Limited. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted ... | WebController controller = SteviaWebControllerFactory.getWebController(applicationContext); | 2 |
acromusashi/acromusashi-stream | src/main/java/acromusashi/stream/bolt/AmBaseBolt.java | [
"public class ConfigFileWatcher\n{\n /** Target file */\n protected File targetFile;\n\n /** Target file watch interval. */\n protected long watchInterval;\n\n /** Target file last watch time. */\n protected long lastWatchTime;\n\n /** Target file last modify time. */\n protected long lastMo... | import backtype.storm.tuple.Values;
import com.google.common.collect.Lists;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import acromusashi.stream.config.ConfigFileWatcher;
... | /**
* Copyright (c) Acroquest Technology Co, Ltd. All Rights Reserved.
* Please read the associated COPYRIGHTS file for more details.
*
* THE SOFTWARE IS PROVIDED BY Acroquest Technolog Co., Ltd.,
* WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FIT... | public void onMessage(StreamMessage received) | 3 |
fredg02/se.bitcraze.crazyflie.lib | se.bitcraze.crazyflie.lib/src/main/java/se/bitcraze/crazyflie/lib/bootloader/Cloader.java | [
"public class Utilities {\n\n private Utilities() {\n throw new IllegalStateException(\"Utility class\");\n }\n\n /**\n * Returns byte array as comma separated string\n * (for debugging purposes)\n *\n * @param data\n * @return\n */\n public static String getByteString(byt... | import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import se.bitcraze.crazyflie.lib.Utilities;
import se.bitcraze.crazyflie.lib.bootloader.Target.TargetTypes;
import se.bitcraze.crazyflie.lib.crazyradio.ConnectionDa... | /**
* || ____ _ __
* +------+ / __ )(_) /_______________ _____ ___
* | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
* +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
* || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
*
* Copyright (C) 2015 Bitcraze AB
*
* Crazyflie Nano Quadcop... | return updateInfo(TargetTypes.STM32); //TODO: which targetId?? | 1 |
android-notes/SwissArmyKnife | saklib/src/main/java/com/wanjian/sak/layer/impl/RelativeLayerView.java | [
"public abstract class ISizeConverter {\n public static ISizeConverter CONVERTER;\n\n public abstract String desc();\n\n public abstract Size convert(Context context, float length);\n\n public abstract int recovery(Context context, float length);\n\n}",
"public class Size {\n\n private static List<... | import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.support.v4.view.GestureDetectorCompat;
import android.view.GestureDetector;
import android.view.InputEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import com.wa... | package com.wanjian.sak.layer.impl;
public class RelativeLayerView extends Layer implements ISize {
private int mTxtSize;
private Paint mPaint;
private int[] mLocation1 = new int[2];
private int[] mLocation2 = new int[2];
private View mFirstView;
private View mSecondView;
private View mTargetView;
p... | mTxtSize = ScreenUtils.dp2px(getContext(), 10); | 4 |
7upcat/agile-wroking-backend | src/test/java/org/catframework/agileworking/web/TeamControllerTest.java | [
"@Entity\npublic class Team implements Serializable {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\t@Id\n\t@GeneratedValue\n\tprivate Long id;\n\n\t@Column(nullable = false)\n\tprivate String name;\n\n\t// desc 和 mysql 中的关键字有冲突,所以使用了 'team_desc'\n\t@Column(name = \"team_desc\")\n\tprivate String desc;\... | import java.util.List;
import org.catframework.agileworking.domain.Team;
import org.catframework.agileworking.domain.TeamFactory;
import org.catframework.agileworking.domain.TeamRepository;
import org.catframework.agileworking.domain.User;
import org.catframework.agileworking.domain.UserFactory;
import org.catframework... | package org.catframework.agileworking.web;
@RunWith(SpringRunner.class)
@SpringBootTest
public class TeamControllerTest {
@Autowired
private TeamRepository teamRepository;
@Autowired
private TeamController teamController;
@Autowired
private UserRepository userRepository;
@Autowired
private WebTokenServi... | User user = UserFactory.newDefaultUser(); | 3 |
aemreunal/iBeaconServer | src/main/java/com/aemreunal/controller/region/RegionController.java | [
"public class GlobalSettings {\n /**\n * Used to set the global logging levels, like whether to log SQL queries or prints\n * inside methods.\n */\n public static final boolean DEBUGGING = true;\n\n /**\n * The BCrypt-hashed password field length (in User.class) is assumed to be 60 with a\n... | import com.aemreunal.exception.region.MultipartFileReadException;
import com.aemreunal.exception.region.WrongFileTypeSubmittedException;
import com.aemreunal.service.RegionService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import o... | package com.aemreunal.controller.region;
/*
* *********************** *
* Copyright (c) 2015 *
* *
* This code belongs to: *
* *
* @author Ahmet Emre Ünal *
* S001974 *
* *
* aemreunal@gmail.com *
* emre.unal@o... | throws ImageLoadException { | 2 |
sashavasko/WiFiAfterConnect | src/com/wifiafterconnect/handlers/HiltonHandler.java | [
"public class ParsedHttpInput extends Worker{\n\n\tpublic class JsonInput extends HttpInput {\n\t\tprivate JSONObject json = null;\n\t\t\n\t\tpublic JsonInput(URL url) {\n\t\t\tsuper(url);\n\t\t\t// TODO Auto-generated constructor stub\n\t\t}\n\n\t\t@Override\n\t\tpublic boolean parse(String source) {\n\t\t\tjson =... | import com.wifiafterconnect.ParsedHttpInput;
import com.wifiafterconnect.WifiAuthParams;
import com.wifiafterconnect.handlers.CaptivePageHandler.States;
import com.wifiafterconnect.html.HtmlForm;
import com.wifiafterconnect.html.HtmlPage;
import com.wifiafterconnect.html.JavaScript;
import com.wifiafterconnect.util.Htt... | /*
* Copyright (C) 2013 Sasha Vasko <sasha at aftercode dot net>
*
* 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 requi... | JavaScript js = ((HtmlPage)page).getHeadJavaScript (signature); | 4 |
karthicks/gremlin-ogm | gremlin-objects/src/test/java/org/apache/tinkerpop/gremlin/object/reflect/ParserTest.java | [
"@Data\n@Builder\n@NoArgsConstructor\n@AllArgsConstructor\n@Accessors(fluent = true, chain = true)\n@EqualsAndHashCode(of = {}, callSuper = true)\npublic class Develops extends Edge {\n\n /**\n * Go to the {@link Person} who develop the currently selected {@link Software}s.\n */\n public final static ToVertex... | import static org.apache.tinkerpop.gremlin.object.reflect.Parser.isPropertyValue;
import static org.apache.tinkerpop.gremlin.object.reflect.Fields.field;
import static org.apache.tinkerpop.gremlin.object.structure.Graph.Should;
import static org.apache.tinkerpop.gremlin.object.structure.Graph.Should.MERGE;
import stati... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... | assertTrue(isPropertyValue(field(location, "name"))); | 3 |
nkarasch/ChessGDX | core/src/nkarasch/chessgdx/GameCore.java | [
"public class Camera extends PerspectiveCamera {\n\n\tprivate final OrbitCamera mFPCameraController;\n\n\t/**\n\t * Creates 60 degree field of view PerspectiveCamera and instantiates its\n\t * controller.\n\t */\n\tpublic Camera() {\n\t\tsuper(60, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\tthis.mFPCam... | import nkarasch.chessgdx.camera.Camera;
import nkarasch.chessgdx.logiccontroller.backend.ChessLogicController;
import nkarasch.chessgdx.logiccontroller.frontend.BoardController;
import nkarasch.chessgdx.util.AssetHandler;
import nkarasch.chessgdx.util.GraphicsSettings;
import nkarasch.chessgdx.view.renderers.OverlayRen... | package nkarasch.chessgdx;
public class GameCore implements ApplicationListener {
public static final String TITLE = "ChessGDX";
private Camera mCameraController;
private ChessLogicController mLogicController;
private BoardController mBoardController; | private PerspectiveRenderer mPerspectiveRenderer; | 6 |
openbakery/timetracker | src/main/java/org/openbakery/timetracker/web/report/GenerateCSVReportButton.java | [
"@Entity\n@Table(name = \"timeentry\")\npublic class TimeEntry implements Serializable {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\t@Id\n\t@GeneratedValue\n\tprivate int id;\n\n\t@Column(name = \"begin_time\")\n\t@Temporal(TemporalType.TIMESTAMP)\n\tprivate Date begin;\n\n\t@Column(name = \"end_time... | import org.apache.wicket.Localizer;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
import org.apache.wicket.request.resource.ContentDisposition;
import org.apache.wicket.spring.injection.anno... | package org.openbakery.timetracker.web.report;
/**
* User: rene
* Date: 06.05.11
*/
public class GenerateCSVReportButton extends Button {
private static Logger log = LoggerFactory.getLogger(GenerateCSVReportButton.class);
private static final String SEPARATOR = ";";
private static final String NEWLIN... | private TimeEntryService timeEntryService; | 2 |
openstack/sahara-extra | hadoop-swiftfs/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemBasicOps.java | [
"public class SwiftNativeFileSystem extends FileSystem {\n\n /** filesystem prefix: {@value} */\n public static final String SWIFT = \"swift\";\n private static final Log LOG =\n LogFactory.getLog(SwiftNativeFileSystem.class);\n\n /**\n * path to user work directory for storing temporary files\n */... | import static org.apache.hadoop.fs.swift.util.SwiftTestUtils.assertFileHasLength;
import static org.apache.hadoop.fs.swift.util.SwiftTestUtils.assertIsDirectory;
import static org.apache.hadoop.fs.swift.util.SwiftTestUtils.readBytesToString;
import static org.apache.hadoop.fs.swift.util.SwiftTestUtils.writeTextFile;
im... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License");... | String result = readBytesToString(fs, path, text.length()); | 4 |
rampage128/hombot-control | mobile/src/main/java/de/jlab/android/hombot/SectionFragment.java | [
"public class HombotMap {\n\n private static final int BYTE_LENGTH_HEADER = 44;\n private static final int BYTE_LENGTH_BLOCK = 16;\n private static final int BLOCK_CELL_COUNT = 100;\n\n public static final String MAP_GLOBAL = \"MapReuseNavi\";\n\n private static class MapHeader {\n public in... | import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
import de.jlab.android.hombot.common.core.HombotMap;
import de.jlab.android.hombot.common.core.HombotSched... | package de.jlab.android.hombot;
/**
* An extensible {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link StatusSection.SectionInteractionListener} interface
* to handle interaction events.
*/
public abstract class SectionFragment extends Fragment {
/**
* The f... | private Colorizer mColorizer; | 5 |
karthicks/gremlin-ogm | gremlin-objects/src/main/java/org/apache/tinkerpop/gremlin/object/traversal/library/HasKeys.java | [
"@FunctionalInterface\npublic interface ElementTo<O> extends SubTraversal<Element, O> {\n\n /**\n * A function denoting a {@code GraphTraversal} that starts at elements, and ends at elements.\n */\n @FunctionalInterface\n interface Element extends SubTraversal<\n org.apache.tinkerpop.gremlin.structure.E... | import org.apache.tinkerpop.gremlin.object.model.OrderingKey;
import org.apache.tinkerpop.gremlin.object.model.PrimaryKey;
import org.apache.tinkerpop.gremlin.object.traversal.ElementTo;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.Element... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... | fields = keyFields(element); | 4 |
multi-os-engine/moe-plugin-gradle | src/main/java/org/moe/gradle/tasks/AbstractBaseTask.java | [
"public abstract class RuleClosure extends Closure<Task> {\n\n protected RuleClosure(Object owner) {\n super(Require.nonNull(owner));\n }\n\n public abstract Task doCall(String taskName);\n}",
"public abstract class ValueClosure<V> extends Closure<V> {\n\n protected ValueClosure(@NotNull Object... | import org.gradle.api.*;
import org.gradle.api.logging.Logger;
import org.gradle.api.logging.Logging;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.OutputFile;
import org.gradle.api.tasks.TaskAction;
import org.gradle.process.ExecResult;
import org.gradle.process.E... |
@SuppressWarnings("unchecked")
@NotNull
public <T> T getOrConvention(@Nullable T value, @NotNull String name) {
Require.nonNull(name);
if (value == null) {
final @Nullable T result = (T) getConvention().findByName(name);
if (result instanceof ValueClosure) {
... | return project.getTasks().addRule(pattern, new RuleClosure(project) { | 0 |
almeidaRodrigo/conciliacao | test/conciliacao/TestRegressFile.java | [
"public class ManipulateXml extends ConciliacaoFiles {\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic ManipulateXml(Path path) {\n\t\tsuper(path);\n\t\t//Efetua a leitura do arquivo config.xml dentro da pasta do arquivo JAR (executavel deste projeto)\n\t\t//Path path = FileSy... | import java.io.File;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.util.ArrayList;
import arquivo.ManipulateXml;
import arquivo.RegressFile;
import vo.ConfigXml;
import vo.Dam;
import vo.TipoDamEnum; | package conciliacao;
public class TestRegressFile {
public static void main(String[] args) {
ConfigXml configXml;
try { | configXml = (ConfigXml) new ManipulateXml(FileSystems.getDefault().getPath(System.getProperty("user.dir"), File.separator, "config.xml")).openXml(); | 0 |
matburt/mobileorg-android | MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/MobileOrgApplication.java | [
"public class SyncService extends Service implements\n\t\tSharedPreferences.OnSharedPreferenceChangeListener {\n\tprivate static final String ACTION = \"action\";\n\tprivate static final String START_ALARM = \"START_ALARM\";\n\tprivate static final String STOP_ALARM = \"STOP_ALARM\";\n\n\tprivate SharedPreferences ... | import android.app.Application;
import android.content.Context;
import android.preference.PreferenceManager;
import com.matburt.mobileorg.services.SyncService;
import com.matburt.mobileorg.synchronizers.DropboxSynchronizer;
import com.matburt.mobileorg.synchronizers.NullSynchronizer;
import com.matburt.mobileorg.synchr... | package com.matburt.mobileorg.orgdata;
public class MobileOrgApplication extends Application {
private static MobileOrgApplication instance;
public static Context getContext() {
return instance;
}
@Override
public void onCreate() {
super.onCreate();
instance = this;
... | SyncService.startAlarm(this); | 0 |
dperezcabrera/jpoker | src/main/java/org/poker/sample/strategies/FoldStrategy.java | [
"@NotThreadSafe\npublic class BetCommand {\n\n private final BetCommandType type;\n private long chips;\n\n public BetCommand(BetCommandType type) {\n this(type, 0);\n }\n\n public BetCommand(BetCommandType type, long chips) {\n ExceptionUtil.checkNullArgument(type, \"type\");\n ... | import org.poker.api.game.BetCommand;
import org.poker.api.game.GameInfo;
import org.poker.api.game.IStrategy;
import org.poker.api.game.PlayerInfo;
import org.poker.api.game.TexasHoldEmUtil; | /*
* Copyright (C) 2016 David Pérez Cabrera <dperezcabrera@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ve... | public BetCommand getCommand(GameInfo<PlayerInfo> state) { | 3 |
jmimo/netty-icap | src/main/java/ch/mimo/netty/example/icap/preview/IcapClientHandler.java | [
"public class DefaultIcapChunk extends DefaultHttpChunk implements IcapChunk {\n\n\tprivate boolean preview;\n\tprivate boolean earlyTerminated;\n\t\n\tpublic DefaultIcapChunk(ChannelBuffer content) {\n\t\tsuper(content);\n\t}\n\t\n\tpublic void setPreviewChunk(boolean preview) {\n\t\tthis.preview = preview;\n\t}\n... | import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import ch.mimo.netty.handler.codec.icap.DefaultIcapChunk;
import ch.mimo.netty.handler.codec.icap.DefaultIcapChunk... | /*******************************************************************************
* Copyright 2012 Michael Mimo Moratti
*
* 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://ww... | if(response.getStatus().equals(IcapResponseStatus.CONTINUE)) { | 5 |
chms/jdotxt | src/com/chschmid/jdotxt/gui/JdotxtGUItest.java | [
"@SuppressWarnings(\"serial\")\r\npublic class JdotxtDateField extends JTextField {\r\n\tpublic final static String DEFAULT_DATE_STRING = \"----------\";\r\n\tpublic final static String NAV_PREV_ACTION = \"NAV_PREV_ACTION\";\r\n\tpublic final static String NAV_NEXT_ACTION = \"NAV_NEXT_ACTION\";\r\n\tprivate Color f... | import javax.swing.text.BadLocationException;
import com.chschmid.jdotxt.gui.controls.JdotxtDateField;
import com.chschmid.jdotxt.gui.controls.JdotxtImageButton;
import com.chschmid.jdotxt.gui.controls.JdotxtImageCheckBox;
import com.chschmid.jdotxt.gui.controls.JdotxtPriorityField;
import com.chschmid.jdotxt.gui.contr... | /**
* Copyright (C) 2013-2015 Christian M. Schmid
*
* This file is part of the jdotxt.
*
* jdotxt is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any late... | ImageIcon iconSave = Util.createImageIcon("/res/drawable/save.png"); | 6 |
sksamuel/camelwatch | camelwatch-web/src/main/java/camelwatch/web/EndpointController.java | [
"public class CamelBean {\r\n\r\n\tprivate final Map<String, Object>\tproperties\t= Maps.newTreeMap();\r\n\r\n\tprivate String\t\t\t\tname;\r\n\r\n\tprivate String\t\t\t\tdescription;\r\n\r\n\tpublic String getDescription() {\r\n\t\treturn description;\r\n\t}\r\n\r\n\tpublic String getName() {\r\n\t\treturn name;\r... | import org.camelwatch.api.CamelBean;
import org.camelwatch.api.CamelConnection;
import org.camelwatch.api.CamelConnectionFactory;
import org.camelwatch.api.Message;
import org.camelwatch.api.endpoint.EndpointOperations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ster... | package camelwatch.web;
/**
* @author Stephen K Samuel samspade79@gmail.com 1 Jul 2012 19:02:59
*/
@Controller
@RequestMapping("endpoint")
public class EndpointController {
private static final int MAX_OVERVIEW_MESSAGES = 15;
@Autowired
private CamelConnectionFactory connectionFactory;
... | CamelBean endpoint = conn.getEndpoint(endpointName);
| 0 |
Jigsaw-Code/Intra | Android/app/src/main/java/app/intra/net/go/GoIntraListener.java | [
"public class DnsPacket {\n\n private byte[] data;\n\n private static final short TYPE_A = 1;\n private static final short TYPE_AAAA = 28;\n\n private static class DnsQuestion {\n\n String name;\n short qtype;\n short qclass;\n }\n\n private static class DnsRecord {\n\n String name;\n short rty... | import split.RetryStats;
import android.os.SystemClock;
import androidx.collection.LongSparseArray;
import app.intra.net.dns.DnsPacket;
import app.intra.net.doh.Transaction;
import app.intra.net.doh.Transaction.Status;
import app.intra.sys.firebase.AnalyticsWrapper;
import app.intra.sys.IntraVpnService;
import com.goog... | /*
Copyright 2019 Jigsaw Operations 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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | private final AnalyticsWrapper analytics; | 3 |
turn/camino | src/test/java/com/turn/camino/render/functions/MetricFunctionsTest.java | [
"public class Metric {\n\n\tprivate final String name;\n\tprivate final String function;\n\tprivate final String aggregate;\n\tprivate final String aggFunction;\n\tprivate final double defaultValue;\n\n\t/**\n\t * Constructor\n\t *\n\t * @param name name of metric\n\t * @param function function of metric\n\t * @par... | import com.google.common.collect.ImmutableList;
import com.turn.camino.*;
import com.turn.camino.config.Metric;
import com.turn.camino.config.Path;
import com.turn.camino.render.Function;
import com.turn.camino.render.FunctionCallException;
import com.turn.camino.render.TimeValue;
import org.testng.annotations.BeforeCl... | /*
* Copyright (C) 2014-2018, Amobee Inc. 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 of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | new TimeValue(TimeZone.getTimeZone("GMT"), now - 60 * 1000)); | 4 |
fralalonde/iostream | src/test/java/ca/rbon/iostream/proxy/CloseFailTest.java | [
"public class IO {\n\n private static final String DEFAULT_TEMP_FILE_PREFIX = \"IoStream\";\n\n /**\n * <p>\n * Stream to or from a file.\n * </p>\n *\n * @param name Name of the file to use\n * @return An input or output picker\n */\n public static BytesBiChannel<File> file(Str... | import static org.assertj.core.api.Assertions.assertThat;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import ca.rbon.iostream.IO;
import ca.rbon.iostream.wrap.BufferedInputOf;
import ca.rbon.iostream.wra... | package ca.rbon.iostream.proxy;
public class CloseFailTest {
final InputStream input = Mockito.mock(InputStream.class);
final OutputStream output = Mockito.mock(OutputStream.class);
@Before
public void init() throws IOException {
Mockito.doThrow(IOException.class).when(input).close();
... | ObjectOutputOf<byte[]> o = IO.bytes().objectOutputStream(); | 7 |
BoD/irondad | src/main/java/org/jraf/irondad/handler/googlegif/GoogleGifHandler.java | [
"public class Config {\n\n public static final boolean LOGD = true;\n\n}",
"public class Constants {\n public static final String TAG = \"irondad/\";\n\n public static final String PROJECT_FULL_NAME = \"BoD irondad\";\n public static final String PROJECT_URL = \"https://github.com/BoD/irondad\";\n ... | import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.jraf.irondad.Config;
import org.jraf.irondad.Constants;
import org.jraf.irondad.handler.CommandHandler;
import org.jraf.irondad.handler.HandlerConte... | /*
* This source is part of the
* _____ ___ ____
* __ / / _ \/ _ | / __/___ _______ _
* / // / , _/ __ |/ _/_/ _ \/ __/ _ `/
* \___/_/|_/_/ |_/_/ (_)___/_/ \_, /
* /___/
* repository.
*
* Copyright (C) 2013 Benoit 'BoD' Lubek (BoD@JRAF.org)
*
* This library is free sof... | final List<String> textAsList, Message message, final HandlerContext handlerContext) throws Exception { | 6 |
mruffalo/seal | test/TestMultipartHandling.java | [
"public class Fragment implements Cloneable\n{\n\tpublic static final int MAXIMUM_BASE_QUALITY = 40;\n\n\tprotected final CharSequence sequence;\n\tprotected final Map<FragmentPositionSource, Integer> positions;\n\t/**\n\t * Array of Phred-scaled read quality values\n\t */\n\tprotected int[] readQuality;\n\t/**\n\t... | import assembly.Fragment;
import assembly.FragmentPositionSource;
import generator.Fragmentizer;
import generator.SequenceGenerator;
import io.FastaReader;
import io.FastaWriter;
import io.FastqWriter;
import io.MultipartSequence;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.... |
public class TestMultipartHandling
{
/*
These values are meant to be small enough so that a user can
manually inspect the output
*/
private static final int NUMBER_OF_SEQUENCES = 2;
private static final int SEQUENCE_LENGTH = 50;
private static final int FRAGMENT_COUNT_PER_SEQUENCE = 10;
private static final ... | List<MultipartSequence> sequences = FastaReader.getSequences(files); | 7 |
johndavidbustard/RoughWorld | src/ai/knowledge_representation/story_instance/changes/ChangePose.java | [
"public class ArrayUtils \n{\n\tpublic static String[] add(String[] v, String i)\n\t{\n\t\tString[] nv = new String[v.length+1];\n\t\tSystem.arraycopy(v, 0, nv, 0, v.length);\n\t\tnv[v.length] = i;\n\t\treturn nv;\n\t}\n\tpublic static String[][] add(String[][] v, String[] i)\n\t{\n\t\tString[][] nv = new String[v.... | import utils.ArrayUtils;
import utils.GeneralMatrixDouble;
import utils.GeneralMatrixObject;
import utils.GeneralMatrixString;
import utils.constraints.PhysicalConstraint;
import utils.shapes.ParametricShape;
import ai.knowledge_representation.state_instance.ObjectLanguageInstance;
import ai.model_construction.state_mo... | package ai.knowledge_representation.story_instance.changes;
public class ChangePose extends ChangeState
{
//public static final String[] parameternames = {"X","Y","Z","XR","YR","ZR"};
public static final String[] constraineenames = {"PoseContainer","Posee0","Posee1","Posee2","Posee3"};
public static final String[]... | PoseLanguageModel pm = (PoseLanguageModel)poses.value[poseind]; | 7 |
krobot-framework/krobot | src/main/java/org/krobot/runtime/ConfigLoader.java | [
"public abstract class KrobotModule\n{\n protected static final Includes COMMANDS = Includes.COMMANDS;\n protected static final Includes CONFIGS = Includes.CONFIGS;\n protected static final Includes EVENTS = Includes.EVENTS;\n protected static final Includes FILTERS = Includes.FILTERS;\n\n protected ... | import org.krobot.config.ConfigRules;
import org.krobot.config.ConfigRules.DefaultPath;
import org.krobot.config.FileConfig;
import org.krobot.module.ImportRules.ConfigBridge;
import org.krobot.util.ColoredLogger;
import com.google.common.io.Files;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.... | /*
* Copyright 2017 The Krobot Contributors
*
* This file is part of Krobot.
*
* Krobot 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 ... | module.getConfig().register(bridge.getDest(), new BridgeConfig(target.getConfig(), bridge.getConfig())); | 1 |
guardianproject/CameraV | cameraVApp/src/main/java/org/witness/informacam/app/screens/editors/FullScreenMJPEGPlayerFragment.java | [
"public class RangeSeekBar<T extends Number> extends ImageView {\r\n\tprivate final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);\r\n\t// private final Bitmap thumbImage = BitmapFactory.decodeResource(\r\n\t// getResources(), R.drawable.seek_thumb_normal);\r\n\tprivate final Bitmap thumbImage;\r\n\t// private fin... | import android.app.Activity;
import android.content.res.Configuration;
import android.graphics.RectF;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnVideoSizeChangedListener;
import android.net.Ur... | package org.witness.informacam.app.screens.editors;
public class FullScreenMJPEGPlayerFragment extends FullScreenViewFragment implements OnClickListener,
OnVideoSizeChangedListener, SurfaceHolder.Callback, OnTouchListener,
OnRangeSeekBarChangeListener<Integer> {
IVideo media_; | InformaCam informa; | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.