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 |
|---|---|---|---|---|---|---|
huanghaibin-dev/CalendarView | app/src/main/java/com/haibin/calendarviewproject/meizu/MeiZuActivity.java | [
"@SuppressWarnings(\"all\")\npublic final class Calendar implements Serializable, Comparable<Calendar> {\n private static final long serialVersionUID = 141315161718191143L;\n\n\n /**\n * 年\n */\n private int year;\n\n /**\n * 月1-12\n */\n private int month;\n\n /**\n * 如果是闰月,则返... | import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import androidx.recyclerview.widget.LinearLayoutManager;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.haibin.calendarview.Calendar;
import com.haibin.calen... | package com.haibin.calendarviewproject.meizu;
public class MeiZuActivity extends BaseActivity implements
CalendarView.OnCalendarSelectListener,
CalendarView.OnYearChangeListener,
View.OnClickListener {
TextView mTextMonthDay;
TextView mTextYear;
TextView mTextLunar;
Text... | mRecyclerView.setAdapter(new ArticleAdapter(this)); | 4 |
caarmen/scrumchatter | app/src/main/java/ca/rmen/android/scrumchatter/chart/MeetingChartFragment.java | [
"public class Constants {\n public static final String TAG = \"ScrumChatter\";\n public static final String PREF_TEAM_ID = \"team_id\";\n public static final int DEFAULT_TEAM_ID = 1;\n public static final String DEFAULT_TEAM_NAME = \"Team A\";\n}",
"public class Meetings {\n private static final St... | import android.database.Cursor;
import android.databinding.DataBindingUtil;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.MainThread;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.LoaderManager;
import android.supp... | /*
* Copyright 2016-2017 Carmen Alvarez
* <p/>
* This file is part of Scrum Chatter.
* <p/>
* Scrum Chatter 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 you... | loadMeeting(getActivity().getIntent().getLongExtra(Meetings.EXTRA_MEETING_ID, -1)); | 1 |
InteractiveSystemsGroup/GamificationEngine-Kinben | src/main/java/info/interactivesystems/gamificationengine/entities/goal/Goal.java | [
"@Entity\npublic class Organisation implements Serializable {\n\n\tprivate static final long serialVersionUID = -6830220885028070098L;\n\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\tprivate int id;\n\n\t@NotNull\n\t@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)\n\tprivate Collec... | import info.interactivesystems.gamificationengine.entities.Organisation;
import info.interactivesystems.gamificationengine.entities.Player;
import info.interactivesystems.gamificationengine.entities.PlayerGroup;
import info.interactivesystems.gamificationengine.entities.Role;
import info.interactivesystems.gamification... | package info.interactivesystems.gamificationengine.entities.goal;
/**
* A Goal comprises one or more tasks and is associated with a goal rule. If the player wants to earn the
* connected awards the rule has to be fulfilled. To create a goal some already created components are needed.
* So the condition when a ... | public FinishedGoal checkGoal(Player player, PlayerGroup group, List<FinishedGoal> oldFinishedGoals, List<FinishedTask> finishedTasksList, | 2 |
Akshansh986/Webkiosk | Webkiosk/src/main/java/com/blackMonster/webkiosk/controller/updateAtnd/UpdateDetailedAttendance.java | [
"public class RefreshDBPrefs {\n\n public static final String REFRESH_SERVICE_STATUS = \"refSStatus\";\n\n\n //Name value is out of sync, would be great if someone could fix it.\n public static final String DETAILED_ATND_TIMESTAMP = \"lastUpdate\";\n public static final String REFRESH_START_TIMESTAMP = ... | import android.content.Context;
import com.blackMonster.webkiosk.SharedPrefs.RefreshDBPrefs;
import com.blackMonster.webkiosk.crawler.CrawlerDelegate;
import com.blackMonster.webkiosk.crawler.Model.DetailedAttendance;
import com.blackMonster.webkiosk.crawler.Model.SubjectAttendance;
import com.blackMonster.webkiosk.dat... | package com.blackMonster.webkiosk.controller.updateAtnd;
public class UpdateDetailedAttendance {
static final String TAG = "UpdateAttendence";
public static final int DONE = 1;
public static final int ERROR = -1;
public static int start(CrawlerDelegate crawlerDelegate, Context context) {
... | List<MySubjectAttendance> subjectAttendanceList = new AttendenceOverviewTable(context).getAllSubjectAttendance(); | 4 |
scaled-ml/Scaled-ML | fast-ftrl-proximal/src/main/java/io/scaledml/ftrl/semiparallel/LearnEventHandler.java | [
"public class FTRLProximalAlgorithm {\n private FtrlProximalModel model;\n private boolean testOnly;\n private final DoubleArrayList currentN = new DoubleArrayList();\n private final DoubleArrayList currentZ = new DoubleArrayList();\n private final DoubleArrayList currentWeights = new DoubleArrayList... | import com.google.inject.Inject;
import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.LifecycleAware;
import io.scaledml.ftrl.FTRLProximalAlgorithm;
import io.scaledml.ftrl.FtrlProximalModel;
import io.scaledml.ftrl.Increment;
import io.scaledml.core.SparseItem;
import io.scaledml.core.TwoPhaseEvent;
impor... | package io.scaledml.ftrl.semiparallel;
public class LearnEventHandler implements EventHandler<TwoPhaseEvent<SparseItem>>, LifecycleAware {
private static final Logger logger = LoggerFactory.getLogger(LearnEventHandler.class); | private OutputFormat outputFormat; | 5 |
NanYoMy/mybatis-generator | src/main/java/org/mybatis/generator/codegen/mybatis3/javamapper/elements/annotated/AnnotatedUpdateByPrimaryKeyWithoutBLOBsMethodGenerator.java | [
"public static void javaIndent(StringBuilder sb, int indentLevel) {\n for (int i = 0; i < indentLevel; i++) {\n sb.append(\" \"); //$NON-NLS-1$\n }\n}",
"public static String getEscapedColumnName(\n IntrospectedColumn introspectedColumn) {\n StringBuilder sb = new StringBuilder();\n s... | import static org.mybatis.generator.api.dom.OutputUtilities.javaIndent;
import static org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities.getEscapedColumnName;
import static org.mybatis.generator.codegen.mybatis3.MyBatis3FormattingUtilities.getParameterClause;
import static org.mybatis.generator.internal... | /*
* Copyright 2010 The MyBatis Team
*
* 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... | sb.append(escapeStringForJava(getEscapedColumnName(introspectedColumn))); | 1 |
upcyiban/IntegrateApplication | src/main/java/cn/edu/upc/yb/integrate/lostandfound/controller/LostAndFoundAdminController.java | [
"@Component\npublic class LostAndFoundConfig {\n @Value(\"${yibanoauth.lostandfound.APPID}\")\n public String client_id;\n\n @Value(\"${yibanoauth.lostandfound.APPkey}\")\n public String AppSecret;\n\n}",
"public interface LostAndFoundOfficialDao extends CrudRepository<LostAndFoundOfficial,Integer>,... | import cn.edu.upc.yb.integrate.common.dto.ErrorReporter;
import cn.edu.upc.yb.integrate.lostandfound.config.LostAndFoundConfig;
import cn.edu.upc.yb.integrate.lostandfound.dao.LostAndFoundOfficialDao;
import cn.edu.upc.yb.integrate.lostandfound.dao.LostAndFoundUserDao;
import cn.edu.upc.yb.integrate.lostandfound.dto.Js... | package cn.edu.upc.yb.integrate.lostandfound.controller;
/**
* Created by 17797 on 2017/5/30.
*/
@RestController
@RequestMapping("/lostandfound")
public class LostAndFoundAdminController {
@Autowired
private LostAndFoundOfficialDao officialDao;
@Autowired
private HttpSession session = null;
... | LostAndFoundOfficial official = new LostAndFoundOfficial(title, detail, now.toString()); | 4 |
xdtianyu/Kindle | app/src/main/java/org/xdty/kindle/di/AppComponent.java | [
"public class BookRepository implements BookDataSource {\n\n @Inject\n BookService mBookService;\n\n @Inject\n Database mDatabase;\n\n private Books mBooks;\n\n private Map<String, Review> mReviewCache = new HashMap<>();\n private Map<String, Book> mBookCache = new HashMap<>();\n\n public Bo... | import org.xdty.kindle.data.BookRepository;
import org.xdty.kindle.di.modules.AppModule;
import org.xdty.kindle.module.database.DatabaseImpl;
import org.xdty.kindle.presenter.DetailPresenter;
import org.xdty.kindle.presenter.MainPresenter;
import org.xdty.kindle.view.BooksAdapter;
import javax.inject.Singleton;
import ... | package org.xdty.kindle.di;
@Singleton
@Component(modules = AppModule.class)
public interface AppComponent {
void inject(BookRepository bookRepository);
| void inject(DatabaseImpl database); | 2 |
danisola/restify | url/src/test/java/com/danisola/restify/url/types/BoolVarTest.java | [
"public class RestParser {\n\n private final Pattern pathPattern;\n private final VarType[] pathTypes;\n private final ParamVar[] paramVars;\n private final int numVars;\n\n RestParser(Pattern pathPattern, VarType[] pathTypes, ParamVar[] paramVars, int numVars) {\n this.pathPattern = pathPatte... | import com.danisola.restify.url.RestParser;
import com.danisola.restify.url.RestUrl;
import org.junit.Test;
import static com.danisola.restify.url.RestParserFactory.parser;
import static com.danisola.restify.url.matchers.IsValid.isValid;
import static com.danisola.restify.url.types.BoolVar.boolVar;
import static com.da... | package com.danisola.restify.url.types;
public class BoolVarTest {
@Test
public void whenValueIsTrueThenIsCorrectlyParsed() {
RestParser parser = parser("/users?active={}", boolVar("isActive"));
RestUrl url = parser.parse("http://www.mail.com/users?active=True");
assertThat(url, isVa... | RestParser parser = parser("/users?active={}", opt(boolVar("isActive"))); | 5 |
moronicgeek/SwaggerCloud | server/src/main/java/swaggercloud/autoconfigure/SpringSwaggerCloudServer.java | [
"public enum AdminRoutes {\n\n\n REGISTER(\"/register\"),\n DEREGISTER(\"/unregister\"),\n CONTEXT(\"/swaggercloud\"),\n PROPERTIES(\"/swaggercloud/properties\");\n\n\n private final String path;\n\n AdminRoutes(final String path) {\n this.path = path;\n }\n\n public String getPath()... | import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.moronicgeek.swagger.cloud.model.AdminRoutes;
import com.github.moronicgeek.swagger.cloud.rest.SwaggerCloudClientRestTemplate;
import com.github.moronicgeek.swagger.cloud.server.annotation.EnableSwaggerCloud;
import com.github.moronicgeek.swagger.clou... | package swaggercloud.autoconfigure;
/**
* Created by muhammedpatel on 2016/08/01.
*/
@ConditionalOnBean(annotation = {EnableSwaggerCloud.class})
@Configuration
@EnableConfigurationProperties
public class SpringSwaggerCloudServer extends WebMvcConfigurerAdapter
implements ApplicationContextAware {
@A... | prefixHandlerMapping.setPrefix(AdminRoutes.CONTEXT.getPath()); | 0 |
R2RML-api/R2RML-api | r2rml-api-rdf4j-binding/src/test/java/rdf4jTest/TermType1_Test.java | [
"public class RDF4JR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static RDF4JR2RMLMappingManager INSTANCE = new RDF4JR2RMLMappingManager(new RDF4J());\n\n private RDF4JR2RMLMappingManager(RDF4J rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod... | import java.io.InputStream;
import java.util.Collection;
import java.util.Iterator;
import eu.optique.r2rml.api.binding.rdf4j.RDF4JR2RMLMappingManager;
import org.apache.commons.rdf.api.IRI;
import org.apache.commons.rdf.rdf4j.RDF4J;
import org.junit.Assert;
import org.junit.Test;
import org.eclipse.rdf4j.model... | /*******************************************************************************
* Copyright 2013, the Optique Consortium
* 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... | LogicalTable table=current.getLogicalTable();
| 1 |
tianshaojie/jee-universal-bms | service/src/main/java/com/yuzhi/back/service/impl/RoleService.java | [
"public class Role {\n private Long id;\n\n private String name;\n\n private Integer status;\n\n private Date createTime;\n\n private Date updateTime;\n\n public Long getId() {\n return id;\n }\n\n public void setId(Long id) {\n this.id = id;\n }\n\n public String getName... | import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yuzhi.back.dao.entity.Role;
import com.yuzhi.back.dao.entity.RoleResource;
import com.yuzhi.back.dao.mapper.RoleMapper;
import com.yuzhi.back.dao.mapper.RoleResourceMapper;
import com.yuzhi.back.dao.mapper.UserRoleMapper;
import ... | package com.yuzhi.back.service.impl;
/**
* Created by tiansj on 15/6/21.
*/
@Component
public class RoleService {
@Resource
RoleMapper roleMapper;
@Resource
UserRoleMapper userRoleMapper;
@Resource
RoleResourceMapper roleResourceMapper;
public boolean addRole(Role Role) {
... | return new JsonResult(ResultCode.PARAM_ERROR_CODE, ResultCode.PARAM_ERROR_MSG); | 6 |
Fedict/commons-eid | commons-eid-dialogs/src/main/java/be/bosa/commons/eid/dialogs/BeIDSelector.java | [
"public class BeIDCard implements AutoCloseable {\n\n\tprivate static final String UI_MISSING_LOG_MESSAGE = \"No BeIDCardUI set and can't load DefaultBeIDCardUI\";\n\tprivate static final String UI_DEFAULT_REQUIRES_HEAD = \"No BeIDCardUI set and DefaultBeIDCardUI requires a graphical environment\";\n\tprivate stati... | import be.bosa.commons.eid.client.BeIDCard;
import be.bosa.commons.eid.client.CancelledException;
import be.bosa.commons.eid.client.FileType;
import be.bosa.commons.eid.client.OutOfCardsException;
import be.bosa.commons.eid.client.event.BeIDCardListener;
import be.bosa.commons.eid.consumer.Identity;
import be.bosa.comm... | updaters.remove(card);
removeFromList(listDataUpdater.getListData());
}
public synchronized void startReadingIdentity() {
identitiesbeingRead++;
notifyAll();
}
public synchronized void endReadingIdentity() {
identitiesbeingRead--;
repack();
notifyAll();
}
public synchronized void waitUntilIdentit... | private Identity identity; | 5 |
mfit/PdfTableAnnotator | src/main/java/at/tugraz/kti/pdftable/document/export/LogicalStructureExport.java | [
"public class TableCell {\n\n\tpublic static String HEADER_HEADER \t= \"header\";\n\tpublic static String HEADER_ROW \t= \"rowhead\";\n\tpublic static String HEADER_COL \t= \"colhead\";\n\tpublic static String HEADER_CAT \t= \"stubhead\";\n\t\n\t/**\n\t * Dimensions of cell, as [x1, y1, x2, y2]. \n\t */\n\tpublic A... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import javax.print.Doc;
import javax.xml.parsers.*;
import java... | package at.tugraz.kti.pdftable.document.export;
/**
* creates the structur export in ICDAR competition format
*
*/
public class LogicalStructureExport extends DOMExport {
Element transformTable(DocumentTable t, RichDocument src) throws DocumentException {
int i, row, col;
Element table = dom.createElemen... | protected void buildDom(RichDocument doc, DocumentTables tdef) throws ParserConfigurationException, DocumentException { | 4 |
lingganhezi/dedecmsapp | android/myapp/src/com/lingganhezi/myapp/ui/activity/QueryFriendActivity.java | [
"public class UserInfo {\n\tprivate String id;\n\tprivate String name;\n\tprivate String email;\n\tprivate String birthday;\n\tprivate String city;\n\tprivate String description;\n\tprivate Integer sex;\n\tprivate int isFriend;\n\t/**\n\t * 头像\n\t */\n\tprivate String protrait;\n\n\tpublic String getId() {\n\t\tret... | import java.util.List;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.TextView;
import com... | package com.lingganhezi.myapp.ui.activity;
/**
* 查询不是 好友的 会员
*
* @author chenzipeng
*
*/
public class QueryFriendActivity extends BaseActivity implements OnClickListener {
private ListView mUserList;
private CustomEditView mSreachText;
private UserInfoAdapter mAdapter;
private UserService mUserService;
... | mUserService.serachUnfriend(username, new UserQueryFriendHandler(new BaseServiceHandler.Callback<List<UserInfo>>() { | 2 |
legobmw99/Allomancy | src/main/java/com/legobmw99/allomancy/datagen/Languages.java | [
"public enum Metal {\n IRON(true),\n STEEL,\n TIN,\n PEWTER,\n ZINC,\n BRASS,\n COPPER(true),\n BRONZE,\n ALUMINUM,\n DURALUMIN,\n CHROMIUM,\n NICROSIL,\n GOLD(true),\n ELECTRUM,\n CADMIUM,\n BENDALLOY;\n\n\n private final boolean vanilla;\n\n Metal() {\n ... | import com.legobmw99.allomancy.api.enums.Metal;
import com.legobmw99.allomancy.modules.combat.CombatSetup;
import com.legobmw99.allomancy.modules.consumables.ConsumeSetup;
import com.legobmw99.allomancy.modules.extras.ExtrasSetup;
import com.legobmw99.allomancy.modules.materials.MaterialsSetup;
import net.minecraft.dat... | package com.legobmw99.allomancy.datagen;
public class Languages extends LanguageProvider {
public Languages(DataGenerator gen, String modid, String locale) {
super(gen, modid, locale);
}
| private static String getDisplayName(Metal mt) { | 0 |
rsgoncalves/ecco | src/main/java/uk/ac/manchester/cs/diff/axiom/changeset/CategorisedChangeSet.java | [
"public class CategorisedChange extends LogicalChange {\n\n\t/**\n\t * @param axiom\tChanged axiom\n\t * @param isEffectual\ttrue if change is effectual, false otherwise\n\t */\n\tpublic CategorisedChange(OWLAxiom axiom, boolean isEffectual) {\n\t\tsuper(axiom, isEffectual);\n\t}\n}",
"public class CategorisedEff... | import uk.ac.manchester.cs.diff.axiom.change.CategorisedIneffectualAddition.IneffectualAdditionCategory;
import uk.ac.manchester.cs.diff.axiom.change.CategorisedIneffectualRemoval.IneffectualRemovalCategory;
import java.util.HashSet;
import java.util.Set;
import org.semanticweb.owlapi.model.OWLAxiom;
import uk.ac.manch... |
/**
* Get the set of removed rewrites
* @return Set of removed rewrites
*/
public Set<CategorisedIneffectualRemoval> getRemovedRewrites() {
if(rrewrite == null) sortOutIneffectualRemovals();
return rrewrite;
}
/**
* Get the set of added partial rewrites
* @return Set of added partial rewrites
... | public Set<CategorisedChange> getAdditions() { | 0 |
tsaglam/EcoreMetamodelExtraction | src/main/java/eme/extractor/JavaTypeExtractor.java | [
"public static String getName(IType type) {\n return type.getFullyQualifiedName('.');\n}",
"public static boolean isAbstract(IMember member) throws JavaModelException {\n return Flags.isAbstract(member.getFlags());\n}",
"public static boolean isEnum(IMember member) throws JavaModelException {\n return ... | import static eme.extractor.JDTUtil.getName;
import static eme.extractor.JDTUtil.isAbstract;
import static eme.extractor.JDTUtil.isEnum;
import java.util.Set;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.IField;
impo... | package eme.extractor;
/**
* Extractor class for Java types (classes, interfaces, enumerations). This class uses the {@link JavaMemberExtractor}
* and the {@link DataTypeExtractor}.
* @author Timur Saglam
*/
public class JavaTypeExtractor {
private static final Logger logger = LogManager.getLogger(JavaType... | public ExtractedType extractType(IType type) throws JavaModelException { | 7 |
ykulbak/ihbase | src/test/java/org/apache/hadoop/hbase/regionserver/TestCompleteIndex.java | [
"public class IdxColumnDescriptor extends HColumnDescriptor {\n /**\n * The key used to store and retrieve index descriptors.\n */\n public static final ImmutableBytesWritable INDEX_DESCRIPTORS =\n new ImmutableBytesWritable(Bytes.toBytes(\"INDEX_DESC\"));\n\n /**\n * Constructor.\n ... | import org.apache.hadoop.hbase.util.ClassSize;
import junit.framework.Assert;
import org.apache.hadoop.hbase.HBaseTestCase;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.client.idx.IdxColumnDescriptor;
import org.apache.hadoop.hbase.client.idx.... | /**
* Copyright 2010 The Apache Software Foundation
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the... | new IdxIndexDescriptor(QUALIFIER, IdxQualifierType.LONG)); | 1 |
marcio-da-silva-arantes/MINLP | MINLP/src/minlp/samples/basic/Knapsack.java | [
"public interface Expr {\n public Expr prod(double coef) throws Exception;\n public Expr prod(Expr expr2) throws Exception;\n \n public Expr sum(Expr expr2) throws Exception;\n public Expr sum(double constant) throws Exception;\n public Expr minus(Expr expr2) throws Exception;\n public Expr min... | import minlp.Expr;
import minlp.MINLP;
import minlp.Set;
import minlp.Var;
import minlp.cplex.CPLEX;
import minlp.glpk.GLPK;
import minlp.gurobi.Gurobi; | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package minlp.samples.basic;
/**
* Sample of Knapsack binary problem
* @see <a href="https://en.wikipedia.org/wiki/Knapsack_problem... | Expr obj = mip.sum(N, i -> mip.prod(v[i],x[i])); | 0 |
lwfwind/smart-api-framework | src/com/qa/framework/testnglistener/TestResultListener.java | [
"public class InstanceFactory {\n\n /**\n * 用于缓存对应的实例\n */\n private static final Map<String, Object> cache = new ConcurrentHashMap<String, Object>();\n\n\n /**\n * 获取 ClassScanner\n *\n * @return the class scanner\n */\n public static ClassScanner getClassScanner() {\n re... | import com.library.common.IOHelper;
import com.qa.framework.InstanceFactory;
import com.qa.framework.bean.Function;
import com.qa.framework.core.ParamValueProcessor;
import com.qa.framework.factory.Executor;
import org.apache.log4j.Logger;
import org.testng.ITestContext;
import org.testng.ITestResult;
import org.testng... | package com.qa.framework.testnglistener;
/**
* Test result Listener.
*/
public class TestResultListener extends TestListenerAdapter {
private static Logger logger = Logger.getLogger(TestResultListener.class);
@Override
public void onStart(ITestContext testContext) {
super.onStart(testContext... | Class<?> clazz = findImplementClass(ICustomTestListener.class); | 4 |
pedrovgs/Nox | sample/src/main/java/com/github/pedrovgs/nox/sample/ContactsActivity.java | [
"public class NoxItem {\n\n private final String url;\n private final Integer resourceId;\n private final Integer placeholderId;\n\n public NoxItem(String url) {\n validateUrl(url);\n this.url = url;\n this.resourceId = null;\n this.placeholderId = null;\n }\n\n public NoxItem(int resourceId) {\n ... | import java.util.List;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import com.github.pedrovgs.nox.NoxItem;
import com.github.pedrovgs.nox.NoxView;... | /*
* Copyright (C) 2015 Pedro Vicente Gomez Sanchez.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | noxView.setOnNoxItemClickListener(new OnNoxItemClickListener() { | 2 |
mojohaus/mrm | mrm-servlet/src/test/java/org/codehaus/mojo/mrm/impl/maven/ArtifactStoreFileSystemTest.java | [
"public interface Entry\n extends Serializable\n{\n\n /**\n * Returns the repository that this entry belongs to.\n *\n * @return the repository that this entry belongs to.\n * @since 1.0\n */\n FileSystem getFileSystem();\n\n /**\n * Returns the parent of this entry (or <code>nul... | import org.codehaus.mojo.mrm.api.maven.Artifact;
import org.codehaus.mojo.mrm.api.maven.ArtifactNotFoundException;
import org.codehaus.mojo.mrm.api.maven.ArtifactStore;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNu... | {
Matcher matcher = ArtifactStoreFileSystem.METADATA.matcher( "/commons/maven-metadata.xml" );
assertTrue( matcher.matches() );
assertEquals( "commons/", matcher.group( 1 ) );
matcher = ArtifactStoreFileSystem.METADATA.matcher( "/org/apache/maven/maven-metadata.xml" );
assert... | FileEntry entry = (FileEntry) system.get( "/localhost/mmockrm-5/1/mmockrm-5-1-site_en.xml" ); | 1 |
meier/curses-java-api | src/main/java/jcurses/widgets/FileDialog.java | [
"public interface ActionListener {\n\t\n /**\n * The method will be called by an widget, generating <code>ActionEvent</code> instances,\n * if the listener has been registered by it.\n * \n * @param event the event occured\n */\n\tpublic abstract void actionPerformed(ActionEvent event);\n\n}",
... | import jcurses.event.ActionListener;
import jcurses.event.ActionEvent;
import jcurses.event.ItemListener;
import jcurses.event.ItemEvent;
import jcurses.system.InputChar;
import jcurses.system.Toolkit;
import jcurses.util.Message;
import jcurses.util.Protocol;
import java.io.File;
import java.io.FileFilter;
| package jcurses.widgets;
/**
* This class implements a file select dialog
*/
public class FileDialog extends Dialog implements WidgetsConstants, ItemListener, ActionListener {
private String _directory = null;
private String _file=null;
private String _filterString=null;
private boolean _in... | this(Toolkit.getScreenWidth()/4,
| 2 |
AfterLifeLochie/fontbox | src/main/java/net/afterlifelochie/fontbox/layout/DocumentProcessor.java | [
"public interface ITracer {\r\n\r\n\t/**\r\n\t * <p>\r\n\t * Called by Fontbox to trace a particular event to the tracer.\r\n\t * </p>\r\n\t * <p>\r\n\t * Events triggered usually take the following parameter forms:\r\n\t * <ol>\r\n\t * <li>The method name being invoked (the source)</li>\r\n\t * <li>The return argu... | import java.io.IOException;
import net.afterlifelochie.fontbox.api.ITracer;
import net.afterlifelochie.fontbox.document.CompilerHint;
import net.afterlifelochie.fontbox.document.Document;
import net.afterlifelochie.fontbox.document.Element;
import net.afterlifelochie.fontbox.document.Heading;
import net.afterlife... | package net.afterlifelochie.fontbox.layout;
public class DocumentProcessor {
public static Element getElementAt(Page page, int x, int y) {
for (Element element : page.allElements())
if (element.bounds().encloses(x, y))
return element;
return null;
}
/**
* <p>
* Generate a list of f... | } else if (element instanceof Image) {
| 5 |
konifar/annict-android | app/src/main/java/com/konifar/annict/view/fragment/SearchSeasonFragment.java | [
"public abstract class ArrayRecyclerAdapter<T, VH extends RecyclerView.ViewHolder>\n extends RecyclerView.Adapter<VH> implements Iterable<T> {\n\n protected final ArrayList<T> list;\n\n final Context context;\n\n public ArrayRecyclerAdapter(@NonNull Context context) {\n this.context = context;\n ... | import com.annimon.stream.Stream;
import com.konifar.annict.R;
import com.konifar.annict.databinding.FragmentSearchSeasonBinding;
import com.konifar.annict.databinding.ItemSearchBinding;
import com.konifar.annict.pref.DefaultPrefs;
import com.konifar.annict.view.widget.ArrayRecyclerAdapter;
import com.konifar.annict.vi... | package com.konifar.annict.view.fragment;
public class SearchSeasonFragment extends BaseFragment implements TabPage {
private static final String TAG = SearchSeasonFragment.class.getSimpleName();
@Inject
SearchSeasonViewModel viewModel;
@Inject
CompositeSubscription compositeSubscription;
... | binding.recyclerView.addItemDecoration(new DividerItemDecoration(getContext())); | 3 |
lantunes/fixd | src/main/java/org/bigtesting/fixd/core/async/AsyncTask.java | [
"public class RequestHandlerImpl implements RequestHandler {\n\n private int statusCode = -1;\n private String contentType;\n private String body;\n private SessionHandler sessionHandler;\n private long delay = -1;\n private TimeUnit delayUnit;\n private long period = -1;\n private TimeUnit ... | import org.simpleframework.http.Response;
import org.simpleframework.http.Status;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import jav... | /*
* Copyright (C) 2015 BigTesting.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | new SimpleHttpRequest(request, null, route, unmarshallerProvider), | 4 |
lkorth/auto-fi | app/src/main/java/com/lukekorth/auto_fi/receivers/WifiScanReceiver.java | [
"public class Settings {\n\n public static SharedPreferences getPrefs(Context context) {\n return PreferenceManager.getDefaultSharedPreferences(context);\n }\n\n public static boolean autoConnectToWifi(Context context) {\n return getPrefs(context).getBoolean(\"auto_connect_to_wifi\", true);\n... | import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.text.TextUtils;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.l... | package com.lukekorth.auto_fi.receivers;
public class WifiScanReceiver extends BroadcastReceiver {
private static final String LAST_SCAN_KEY = "last_scan";
@Override
public void onReceive(Context context, Intent intent) {
if (!"android.net.wifi.SCAN_RESULTS".equals(intent.getAction())) {
... | if (VpnHelper.isVpnEnabled(context) && wifiHelper.getWifiManager().isWifiEnabled() && | 3 |
recommenders/rival | rival-recommend/src/main/java/net/recommenders/rival/recommend/frameworks/librec/LibrecRecommenderRunner.java | [
"public class TemporalDataModel<U, I> extends DataModel<U, I> implements TemporalDataModelIF<U, I> {\n\n /**\n * The map with the timestamps between users and items.\n */\n protected Map<U, Map<I, Set<Long>>> userItemTimestamps;\n\n /**\n * Default constructor.\n */\n public TemporalData... | import java.io.File;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import net.librec.common.LibrecException;
import net.librec.conf.Configuration;
import net.librec.conf.Configured;
import net.librec.data.DataModel;
... | /*
* Copyright 2016 recommenders.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 required by applicable law or agr... | File trainingFile = new File(getProperties().getProperty(RecommendationRunner.TRAINING_SET)); | 3 |
weswilliams/GivWenZen | src/main/java/org/givwenzen/reflections/Reflections.java | [
"public class ParallelStrategyHelper {\n\tprivate ParallelStrategyHelper() {\n\t}\n\n\t/**\n\t * Runs a multi-threaded transform task, wrapping the exceptions appropriately.\n\t * \n\t * @param <K>\n\t * @param <V>\n\t * @param source\n\t * @param function\n\t * @return\n\t */\n\tpublic static <K, V> List<V> parall... | import com.google.common.base.Function;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.apache.commons.vfs.*;
import org.givwenzen.reflections.adapters.ParallelStrategyHelper;
import org.givwenzen.reflections.scanners.ClassAnnotationsScanner;
import org.givwenzen.reflecti... | package org.givwenzen.reflections;
public class Reflections {
private static final Logger log = LoggerFactory.getLogger(Reflections.class);
private final Configuration configuration;
private final Store store;
private final Collection<Class<? extends Scanner>> scannerClasses;
public Reflec... | return Sets.newHashSet(Utils.<T>forNames(getAllSubTypesInHierarchy(type.getName())));
| 5 |
Sparker0i/Weather | app/src/main/java/com/a5corp/weather/GlobalActivity.java | [
"public class Log {\n public static void i(String tag , String message) {\n if (BuildConfig.DEBUG)\n android.util.Log.i(tag , message);\n }\n\n public static void i(String tag , String message , Throwable r) {\n if (BuildConfig.DEBUG)\n android.util.Log.i(tag, message, r... | import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.a5corp.weather.model.Log;
import com.a5corp.weather.activity.FirstLaunch;
import com.a5corp.weather.activity.WeatherActivity;
import com.a5corp.weather.preferences.Preferences;
import com.a5corp.weather.... | package com.a5corp.weather;
public class GlobalActivity extends AppCompatActivity {
public static Preferences cp;
public static Prefs prefs;
public static int i = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView... | intent = new Intent(GlobalActivity.this, WeatherActivity.class); | 2 |
CBSkarmory/AWGW | src/main/java/cbskarmory/units/air/BCopter.java | [
"public class Player {\n\n public static int numberOfPlayers;\n public final CO CO;\n public final int id;\n private ArrayList<Unit> unitsControlled;\n private int money;\n private ArrayList<Property> propertiesOwned;\n private int commTowers;\n private Color teamColor;\n\n /**\n * Co... | import cbskarmory.Player;
import cbskarmory.PassiveFlag.MoveType;
import cbskarmory.terrain.Terrain;
import cbskarmory.units.Air;
import cbskarmory.units.Unit;
import cbskarmory.weapons.WeaponType; | /*
* Copyright(c) 2017 CBSkarmory (https://github.com/CBSkarmory)
*
* This code 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.
*
* This code is distributed in the hope that it will be useful,
* but WI... | public boolean couldTarget(Unit toCheck, Terrain hypothetical) { //cannot target jet fighters | 2 |
trustedshops/trustedshops-android-sdk | trustbadgeexample/src/main/java/com/trustedshops/trustbadgeexample/CheckoutPageActivity.java | [
"public class Product {\n\n /**\n * @required\n */\n protected String tsCheckoutProductUrl;\n protected String tsCheckoutProductImageUrl;\n /**\n * @required\n */\n protected String tsCheckoutProductName;\n /**\n * @required\n */\n protected String tsCheckoutProductSKU;\... | import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.widget.TextView;
import com.trustedshops.androidsdk.trustbadge.Product;
import com.trustedshops.androidsdk.trustbad... | package com.trustedshops.trustbadgeexample;
public class CheckoutPageActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_checkout_page);
TrustbadgeOrder tsCheckoutTr... | TrustedShopsCheckout tsCheckout = new TrustedShopsCheckout(tsCheckoutTrustbadgeOrder); | 3 |
sbs20/filenotes-android | app/src/main/java/sbs20/filenotes/MainActivity.java | [
"public class NoteArrayAdapter extends GenericBaseAdpater<Note> {\n\n private static final String[] COLORS = {\n \"#f44336\",\n \"#e91e63\",\n \"#9c27b0\",\n \"#673ab7\",\n \"#3f51b5\",\n \"#2196f3\",\n \"#03a9f4\",\n \"#00bc... | import android.app.ProgressDialog;
import android.app.SearchManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.widget.SwipeRefreshLayout;
import and... | // user the illusion of progress.
this.loadNotes();
// Select a note if applicable
Note selected = this.notesManager.getSelectedNote();
if (selected != null) {
int index = this.notesManager.getNotes().indexOf(selected);
this.noteListView.setSelection(inde... | protected void onProgressUpdate(Action action) { | 5 |
Blackdread/filter-sort-jooq-api | examples/fullOne/TransferTimingPageRepositoryImpl.java | [
"@SuppressWarnings({\"unchecked\"})\npublic final class Filter {\n\n /**\n * Build a filter value that does not have any parser so condition is only based on presence of key\n *\n * @param key Key that activate that filter\n * @param conditionSupplier Supplier function of condition\... | import org.blackdread.filtersortjooqapi.filter.Filter;
import org.blackdread.filtersortjooqapi.filter.FilterValue;
import org.blackdread.filtersortjooqapi.filter.FilteringJooq;
import org.blackdread.filtersortjooqapi.filter.parser.FilterMultipleValueParser;
import org.blackdread.filtersortjooqapi.filter.parser.FilterPa... | package fullOne;
@Repository
@Transactional(readOnly = true) | public class TransferTimingPageRepositoryImpl implements SortingJooq, FilteringJooq, TransferTimingPageRepository { | 6 |
ParaskP7/sample-code-posts | app/src/main/java/io/petros/posts/app/PostsApplication.java | [
"public class AppSnackbarActions implements SnackbarActions {\n\n private final PostsApplication application;\n private final String defaultActionText;\n\n @Nullable private CoordinatorLayout coordinatorLayout;\n\n public AppSnackbarActions(final PostsApplication application) {\n this.application... | import android.app.Activity;
import android.app.Application;
import android.support.v7.app.AppCompatDelegate;
import javax.inject.Inject;
import io.petros.posts.app.actions.AppSnackbarActions;
import io.petros.posts.app.actions.SnackbarActions;
import io.petros.posts.app.graph.components.ApplicationComponent;
import io... | package io.petros.posts.app;
@SuppressWarnings("checkstyle:overloadmethodsdeclarationorder")
public class PostsApplication extends Application {
| private static ApplicationComponent applicationComponent; | 2 |
ibm-bluemix-mobile-services/bms-clientsdk-android-core | lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/DummyAuthorizationManager.java | [
"public interface ResponseListener {\n\n\t/**\n\t * This method will be called only when a response from the server has been received with a status\n\t * in the 200 range.\n\t * @param response the server response\n\t */\n\tvoid onSuccess(Response response);\n\n\t/**\n\t * This method will be called in the followin... | import android.content.Context;
import com.ibm.mobilefirstplatform.clientsdk.android.core.api.ResponseListener;
import com.ibm.mobilefirstplatform.clientsdk.android.security.api.AppIdentity;
import com.ibm.mobilefirstplatform.clientsdk.android.security.api.AuthorizationManager;
import com.ibm.mobilefirstplatform.client... | /*
* Copyright 2015 IBM Corp.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or a... | public UserIdentity getUserIdentity () { | 4 |
cytomine/Cytomine-java-client | src/test/java/client/PropertyTest.java | [
"public class CytomineException extends Exception {\n\n private static final Logger log = LogManager.getLogger(CytomineException.class);\n\n int httpCode;\n String message = \"\";\n\n public CytomineException(Exception e) {\n super(e);\n this.message = e.getMessage();\n }\n\n public ... | import be.cytomine.client.CytomineException;
import be.cytomine.client.collections.PropertyCollection;
import be.cytomine.client.models.Annotation;
import be.cytomine.client.models.ImageInstance;
import be.cytomine.client.models.Project;
import be.cytomine.client.models.Property;
import org.apache.logging.log4j.LogMana... | package client;
/*
* Copyright (c) 2009-2020. Authors: see NOTICE file.
*
* 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
*
* Unles... | Project project = Utils.getProject(); | 4 |
schibsted/triathlon | src/main/java/com/schibsted/triathlon/service/impl/TriathlonEndpointImpl.java | [
"public class ConstraintModel {\n static List<String> VALID_OPERATORS = new ArrayList<String>() {{\n add(\"UNIQUE\");\n add(\"CLUSTER\");\n add(\"GROUP_BY\");\n add(\"LIKE\");\n add(\"UNLIKE\");\n }};\n\n public String getField() {\n return field;\n }\n\n pub... | import com.google.inject.Guice;
import com.google.inject.Injector;
import com.netflix.eureka2.registry.instance.InstanceInfo;
import com.schibsted.triathlon.model.ConstraintModel;
import com.schibsted.triathlon.model.InstanceInfoModel;
import com.schibsted.triathlon.model.generated.Marathon;
import com.schibsted.triath... | /*
* Copyright (c) 2015 Schibsted Products and Technology
*
* 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 app... | private static TriathlonService triathlonService; | 6 |
yyxhdy/ManyEAs | src/jmetal/operators/crossover/HUXCrossover.java | [
"public class Solution implements Serializable {\n\t/**\n\t * Stores the problem\n\t */\n\tprivate Problem problem_;\n\n\t/**\n\t * Stores the type of the encodings.variable\n\t */\n\tprivate SolutionType type_;\n\n\t/**\n\t * Stores the decision variables of the solution.\n\t */\n\tprivate Variable[] variable_;\n\... | import java.util.HashMap;
import java.util.List;
import jmetal.core.Solution;
import jmetal.encodings.solutionType.BinaryRealSolutionType;
import jmetal.encodings.solutionType.BinarySolutionType;
import jmetal.encodings.variable.Binary;
import jmetal.util.Configuration;
import jmetal.util.JMException;
import jmetal.uti... | // HUXCrossover.java
//
// Author:
// Antonio J. Nebro <antonio@lcc.uma.es>
// Juan J. Durillo <durillo@lcc.uma.es>
//
// Copyright (c) 2011 Antonio J. Nebro, Juan J. Durillo
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Publi... | BinaryRealSolutionType.class) ; | 1 |
cbartosiak/bson-codecs-jsr310 | src/main/java/io/github/cbartosiak/bson/codecs/jsr310/offsettime/OffsetTimeAsDocumentCodec.java | [
"public static <Value> Value getFieldValue(\n Document document,\n Object key,\n Class<Value> clazz) {\n\n try {\n Value value = document.get(key, clazz);\n if (value == null) {\n throw new BsonInvalidOperationException(format(\n \"The value of the... | import static io.github.cbartosiak.bson.codecs.jsr310.internal.CodecsUtil.getFieldValue;
import static io.github.cbartosiak.bson.codecs.jsr310.internal.CodecsUtil.readDocument;
import static io.github.cbartosiak.bson.codecs.jsr310.internal.CodecsUtil.translateDecodeExceptions;
import static java.time.OffsetTime.of;
imp... | /*
* Copyright 2018 Cezary Bartosiak
*
* 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... | getFieldValue(val, "time", LocalTime.class), | 0 |
FedUni/caliko | caliko-demo/src/main/java/au/edu/federation/caliko/demo2d/MultipleConnectedChainsNoBaseBoneConstraints.java | [
"public enum BoneConnectionPoint { START, END }",
"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 ... | import au.edu.federation.caliko.BoneConnectionPoint;
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.Utils;
import au.edu.federation.utils.Vec2f; | package au.edu.federation.caliko.demo2d;
/**
* @author jsalvo
*/
public class MultipleConnectedChainsNoBaseBoneConstraints extends CalikoDemoStructure2D {
@Override
public void setup() {
// Instantiate our FabrikStructure2D
this.structure = new FabrikStructure2D("Demo 4 - Multiple connected chains with no ba... | public void drawTarget(Mat4f mvpMatrix) { | 4 |
reportportal/service-authorization | src/main/java/com/epam/reportportal/auth/integration/handler/impl/strategy/SamlIntegrationStrategy.java | [
"public class SamlProvidersReloadEvent extends ApplicationEvent {\n\n\tprivate static final long serialVersionUID = 2314984509233L;\n\n\tpublic SamlProvidersReloadEvent(IntegrationType type) {\n\t\tsuper(type);\n\t}\n\n\tIntegrationType getIntegrationType() {\n\t\treturn (IntegrationType) super.getSource();\n\t}\n}... | import com.epam.reportportal.auth.event.SamlProvidersReloadEvent;
import com.epam.reportportal.auth.integration.parameter.SamlParameter;
import com.epam.reportportal.auth.integration.validator.duplicate.IntegrationDuplicateValidator;
import com.epam.reportportal.auth.integration.validator.request.AuthRequestValidator;
... | /*
* Copyright 2019 EPAM Systems
*
* 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 ... | UPDATE_FROM_REQUEST.accept(updateRequest, integration); | 4 |
sosandstrom/mardao | mardao-test/src/main/java/net/sf/mardao/test/dao/GeneratedDBasicDaoImpl.java | [
"public class CursorPage<T extends Object> implements Serializable {\n \n /** requested page size, not acutal */\n @Deprecated\n private transient int requestedPageSize;\n \n /** provide this to get next page */\n private String cursorKey;\n \n /** the page of items */\n private Collec... | import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.TreeMap;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
import net.sf.mardao.core.CursorPage;
impor... | package net.sf.mardao.test.dao;
/**
* The DBasic domain-object specific finders and methods go in this POJO.
*
* Generated on 2015-03-16T19:30:26.611+0100.
* @author mardao DAO generator (net.sf.mardao.plugin.ProcessDomainMojo)
*/
public class GeneratedDBasicDaoImpl
extends AbstractDao<DBasic, java.lang.Long... | public CursorPage<DBasic> queryPageByCreatedBy(java.lang.String createdBy, | 0 |
maxpower47/DeliciousDroid | src/com/deliciousdroid/activity/ViewBookmark.java | [
"public class ViewBookmarkFragment extends Fragment {\n\n\tprivate FragmentBaseActivity base;\n\t\n\tprivate View container;\n\tprivate ScrollView mBookmarkView;\n\tprivate TextView mTitle;\n\tprivate TextView mUrl;\n\tprivate TextView mNotes;\n\tprivate TextView mTags;\n\tprivate TextView mTime;\n\tprivate TextVie... | import com.deliciousdroid.fragment.ViewBookmarkFragment.OnBookmarkActionListener;
import com.deliciousdroid.Constants.BookmarkViewType;
import com.deliciousdroid.R;
import com.deliciousdroid.action.IntentHelper;
import com.deliciousdroid.platform.BookmarkManager;
import com.deliciousdroid.providers.BookmarkContent.Book... | /*
* DeliciousDroid - http://code.google.com/p/DeliciousDroid/
*
* Copyright (C) 2010 Matt Schmidt
*
* DeliciousDroid 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,
* ... | ViewBookmarkFragment frag = (ViewBookmarkFragment) getSupportFragmentManager().findFragmentById(R.id.view_bookmark_fragment); | 0 |
shaogaige/iDataBaseConnection | src/com/ojdbc/sql/database/OracleDataBase.java | [
"public static class ConnectionInfo{\r\n\t//type\r\n\tprivate IDataSource sourceType;\r\n\t//key\r\n\tprivate String key;\r\n\t\t\r\n\tprivate ConnectionInfo(String key,IDataSource sourceType){\r\n\t\tthis.key = key;\r\n\t\tthis.sourceType = sourceType;\r\n\t}\r\n\t/**\r\n\t * 获取IDataSource操作接口\r\n\t * @return IDat... | import com.ojdbc.sql.ConnectionManager.ConnectionInfo;
import com.ojdbc.sql.core.SQLPreparedParamUtil;
import com.ojdbc.sql.exception.DBCException;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import com.ojdbc.sql.ConnectionManager;
import com.ojdbc.sql.ConnectionOb... | /**
* ClassName: OracleDataBase.java
* Date: 2017年6月6日
*/
package com.ojdbc.sql.database;
/**
* Author: ShaoGaige
* Description: Oracle数据库
* Log:
*/
public class OracleDataBase extends DataBase {
public OracleDataBase(ConnectionInfo connInfo) {
super(connInfo);
// TODO Auto-generated... | ConnectionObject conn = ConnectionManager.borrowConnectionObject(connInfo);
| 3 |
idega/se.agura.memorial | src/java/se/agura/memorial/obituary/presentation/ObituaryInformationDisplayBackingBean.java | [
"public class ObituarySessionBean extends IBOSessionBean implements ObituarySession{\n\t\n\tprivate Integer databaseId = null;\n\t\n\tprivate String obituaryText = null;\n\tprivate String personFullName = null;\t\n\tprivate String tmpObituaryText = null;\n\tprivate String tmpGraveImagePath = null;\n\tprivate Strin... | import java.awt.Color;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.rmi.RemoteException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Random;
import javax.faces.context.FacesContext;
import javax.servlet.ServletEx... | package se.agura.memorial.obituary.presentation;
public class ObituaryInformationDisplayBackingBean {
private String obituaryText = null;
private String graveImagePath = null;
private String personImagePath = null;
private static final String IW_BUNDLE_IDENTIFIER = "se.agura.memorial";
private static f... | private MemorialHeplInfo mhi = null; | 6 |
minnal/autopojo | src/test/java/org/minnal/autopojo/resolver/CollectionResolverTest.java | [
"public class AttributeMetaData {\n\n\tprivate String name;\n\t\n\tprivate List<Annotation> annotations = new ArrayList<Annotation>();\n\t\n\tprivate Class<?> type;\n\t\n\tprivate List<Type> typeArguments = new ArrayList<Type>();\n\t\n\tpublic AttributeMetaData(PropertyDescriptor descriptor) {\n\t\tthis(descriptor,... | import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
import java.beans.PropertyDescriptor;
import java.util.Collection;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import org.minnal.autopojo.AttributeMetaData;
import org.minnal.autopojo.CollectionModel;
impo... | /**
*
*/
package org.minnal.autopojo.resolver;
/**
* @author ganeshs
*
*/
public class CollectionResolverTest {
private CollectionResolver resolver;
private Configuration configuration;
@BeforeMethod
public void setup() {
configuration = new Configuration();
resolver = new CollectionResolver();... | PropertyDescriptor descriptor = PropertyUtil.getDescriptor(CollectionModel.class, propertyName); | 5 |
ceylon/ceylon-model | src/com/redhat/ceylon/model/loader/model/LazyModule.java | [
"public interface ArtifactResult {\n /**\n * Get name.\n *\n * @return the artifact name.\n */\n String name();\n\n /**\n * Get version.\n *\n * @return the version.\n */\n String version();\n\n /**\n * Get import type.\n *\n * @return the import type\n ... | import java.io.File;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import com.redhat.ceylon.model.cmr.ArtifactResult;
import com.redhat.ceylon.model.cmr.JDKUtils;
import com.re... | if(pkg != null)
return pkg;
// not found, try in its exported dependencies
for(ModuleImport dep : module.getImports()){
if(!dep.isExport())
continue;
pkg = findPackageInImport(name, dep, visited);
if(... | return JvmBackendUtil.isSubPackage(moduleName, pkgName) | 4 |
galan/verjson | src/test/java/de/galan/verjson/samples/VerjsonUsageNullTest.java | [
"public class Verjson<T> {\n\n\t/** Optional user-defined namespace to distinguish between different types */\n\tString namespace;\n\n\t/** Type of the serialized objects */\n\tClass<T> valueClass;\n\n\tMap<Long, ? extends Step> steps;\n\n\tObjectMapper mapper;\n\n\t/** Highest version available in added transforme... | import static org.assertj.core.api.Assertions.*;
import org.junit.Before;
import org.junit.Test;
import de.galan.commons.test.AbstractTestParent;
import de.galan.commons.time.ApplicationClock;
import de.galan.verjson.core.Verjson;
import de.galan.verjson.samples.v1.Example1;
import de.galan.verjson.samples.v1.Example1V... | package de.galan.verjson.samples;
/**
* Test handling of null inputs
*
* @author daniel
*/
public class VerjsonUsageNullTest extends AbstractTestParent {
private Verjson<Example1> v1; | private Verjson<Example2> v2; | 3 |
MindscapeHQ/raygun4android | provider/src/main/java/com/raygun/raygun4android/RUM.java | [
"public class RaygunLogger {\n\n public static void d(String string) {\n if (string != null) {\n Timber.tag(RaygunSettings.LOGGING_TAG).d(string);\n }\n }\n\n public static void i(String string) {\n if (string != null) {\n Timber.tag(RaygunSettings.LOGGING_TAG).i(... | import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.app.Application.ActivityLifecycleCallbacks;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import java.lang.ref.WeakReference;
impo... | }
}
if (RUM.currentActivity == null || RUM.currentActivity != null && RUM.currentActivity.get() != activity) {
RUM.currentActivity = new WeakReference<>(activity);
RUM.loadingActivity = new WeakReference<>(activity);
RUM.startTime = System.nanoTime();
... | RaygunRUMDataMessage dataMessage = new RaygunRUMDataMessage.Builder(eventName) | 2 |
gibffe/fuse | src/main/java/com/sulaco/fuse/FuseServerImpl.java | [
"public interface AnnotationScanner {\n\n public void scan();\n}",
"public class RouteFinderActor extends FuseEndpointActor {\r\n\r\n @Autowired protected RoutesConfig routes;\r\n \r\n @Override\r\n protected void onRequest(final FuseRequestMessage message) {\r\n \r\n String uri = mes... | import com.sulaco.fuse.config.AnnotationScanner;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.Channel;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
imp... | package com.sulaco.fuse;
@Component
public class FuseServerImpl implements FuseServer, InitializingBean, ApplicationContextAware {
protected ExecutorService exe = Executors.newSingleThreadExecutor();
protected ActorSystem actorSystem;
protected ApplicationContext appContext;
... | @Autowired protected ConfigSource configSource;
| 3 |
kwanghoon/MySmallBasic | MySmallBasic/src/com/coducation/smallbasic/lib/File.java | [
"public class ArrayV extends Value {\r\n\tpublic ArrayV(){\r\n\t\tarrmap = new LinkedHashMap<String, Pair<String,Value>>();\r\n\t}\r\n\t\r\n\t\r\n\tpublic Value get(String index) {\r\n\t\tPair<String,Value> psv = arrmap.get(index.toUpperCase());\r\n\t\treturn psv==null ? null : psv.b;\r\n\t}\r\n\r\n\tpublic void pu... | import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayL... | package com.coducation.smallbasic.lib;
public class File {
// small basic 기본문자인코딩 UTF-8
public static Value ReadContents(ArrayList<Value> args) {
// 파일의 전체내용을 읽어서 반환
StringBuilder s = new StringBuilder("");
if (args.size() == 1) {
try {
if(args.get(0) instanceof StrV) {
InputStrea... | if(args.get(1) instanceof StrV || args.get(1) instanceof DoubleV) {
| 1 |
querydsl/codegen | src/main/java/com/mysema/codegen/ScalaWriter.java | [
"public static final String ASSIGN = \" = \";\r",
"public static final String COMMA = \", \";\r",
"public static final String DOT = \".\";\r",
"public static final String QUOTE = \"\\\"\";\r",
"public final class Parameter {\n\n private final String name;\n\n private final Type type;\n\n public Par... | import com.mysema.codegen.model.Types;
import com.mysema.codegen.support.ScalaSyntaxUtils;
import static com.mysema.codegen.Symbols.ASSIGN;
import static com.mysema.codegen.Symbols.COMMA;
import static com.mysema.codegen.Symbols.DOT;
import static com.mysema.codegen.Symbols.QUOTE;
import java.io.IOException;
import jav... | throw new CodegenException(e);
} catch (IllegalAccessException e) {
throw new CodegenException(e);
} catch (InvocationTargetException e) {
throw new CodegenException(e);
}
first = false;
... | Function<T, Parameter> transformer) throws IOException { | 4 |
EddieRingle/hubroid | src/net/idlesoft/android/apps/github/ui/fragments/app/EventListFragment.java | [
"public class GitHubApiService extends IntentService {\n\n public static final String ACTION_GET_URI = \"action_get_uri\";\n\n public static final String ACTION_EVENTS_LIST_USER_PUBLIC = \"action_events_list_user_public\";\n\n public static final String ACTION_EVENTS_LIST_USER_RECEIVED = \"action_events_li... | import com.google.gson.reflect.TypeToken;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import net.idlesoft.android.apps.github.R;
import net.idlesoft.android.apps.github.services.GitHubApiService;
import net.idlesoft.android.apps.git... | /*
* Copyright (c) 2012 Eddie Ringle
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of conditions
* an... | filter.addAction(ACTION_EVENTS_LIST_USER_RECEIVED); | 5 |
Catalysts/cat-boot | cat-boot-report-pdf/src/main/java/cc/catalysts/boot/report/pdf/impl/PdfReportGenerator.java | [
"public class PdfPageLayout {\n\n private float width;\n private float height;\n private float marginLeft;\n private float marginRight;\n private float marginTop;\n private float marginBottom;\n private float lineDistance;\n private float header;\n private float footer;\n private Posit... | import cc.catalysts.boot.report.pdf.config.PdfPageLayout;
import cc.catalysts.boot.report.pdf.config.PdfStyleSheet;
import cc.catalysts.boot.report.pdf.elements.ReportCompositeElement;
import cc.catalysts.boot.report.pdf.elements.ReportElement;
import cc.catalysts.boot.report.pdf.elements.ReportElementStatic;
import cc... | package cc.catalysts.boot.report.pdf.impl;
/**
* @author Paul Klingelhuber
*/
class PdfReportGenerator {
public PdfReportGenerator() {
}
public void printToStream(PdfPageLayout pageConfig, Resource templateResource, PdfReportStructure report, OutputStream stream, PDDocument document) throws IOExcept... | for (ReportElementStatic staticElem : report.getStaticElements()) { | 4 |
erlymon/erlymon-monitor-android | erlymon-monitor-app/src/main/java/org/erlymon/monitor/mvp/StorageService.java | [
"public class DbOpenHelper extends SQLiteOpenHelper {\n\n public DbOpenHelper(@NonNull Context context) {\n super(context, \"erlymondb\", null, 1);\n }\n\n @Override\n public void onCreate(@NonNull SQLiteDatabase db) {\n db.execSQL(ServersTable.getCreateTableQuery());\n db.execSQL(U... | import android.content.Context;
import android.database.Cursor;
import com.fernandocejas.frodo.annotation.RxLogObservable;
import com.pushtorefresh.storio.sqlite.StorIOSQLite;
import com.pushtorefresh.storio.sqlite.impl.DefaultStorIOSQLite;
import com.pushtorefresh.storio.sqlite.operations.put.PutResults;
import com.pu... | /*
* Copyright (c) 2016, Sergey Penkovsky <sergey.penkovsky@gmail.com>
*
* This file is part of Erlymon Monitor.
*
* Erlymon Monitor 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 t... | .table(UsersTable.TABLE) | 8 |
occi4java/occi4java | infrastructure/src/main/java/occi/infrastructure/network/actions/UpAction.java | [
"public abstract class Action {\n\t/**\n\t * The identifying Category of the Action. \n\t */\n\tprivate static Category category;\n\n\tpublic abstract void execute(URI uri, Method method);\n\n\t/**\n\t * Returns the category of the action. \n\t * \n\t * @return the category\n\t */\n\tpublic Category getCategory() {... | import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.UUID;
import javax.naming.directory.SchemaViolationException;
import occi.core.Action;
import occi.core.Category;
import occi.core.Method;
import occi.infrastructure.Network;
import occi.in... | /**
* Copyright (C) 2010-2011 Sebastian Heckmann, Sebastian Laag
*
* Contact Email: <sebastian.heckmann@udo.edu>, <sebastian.laag@udo.edu>
*
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a c... | Network network = null; | 3 |
CyberCRI/RedMetrics | src/main/java/org/cri/redmetrics/controller/GameVersionController.java | [
"public interface CsvEntityConverter<E extends Entity> {\n\n public void write(CSVWriter csvWriter, List<E> models);\n\n}",
"public class GameVersionDao extends EntityDao<GameVersion> {\n\n @Inject\n public GameVersionDao(ConnectionSource connectionSource) throws SQLException {\n super(connectionS... | import com.google.inject.Inject;
import org.cri.redmetrics.csv.CsvEntityConverter;
import org.cri.redmetrics.dao.GameVersionDao;
import org.cri.redmetrics.json.GameVersionJsonConverter;
import org.cri.redmetrics.model.GameVersion;
import org.cri.redmetrics.util.RouteHelper;
import spark.Request;
import spark.Response;
... | package org.cri.redmetrics.controller;
public class GameVersionController extends Controller<GameVersion, GameVersionDao> {
@Inject
GameVersionController(GameVersionDao dao, GameVersionJsonConverter jsonConverter, CsvEntityConverter<GameVersion> csvEntityConverter) {
super("gameVersion", dao, jsonCo... | routeHelper.publishRouteSet(RouteHelper.HttpVerb.GET, RouteHelper.DataType.ENTITY_LIST_OR_RESULTS_PAGE, basePath + "game/:id/versions", findByGameId); | 4 |
jenkinsci/gitlab-plugin | src/test/java/com/dabsquared/gitlabjenkins/gitlab/api/impl/AutodetectingGitLabClientTest.java | [
"static final String API_TOKEN = \"secret\";",
"static void addGitLabApiToken() throws IOException {\n for (CredentialsStore credentialsStore : CredentialsProvider.lookupStores(Jenkins.getInstance())) {\n if (credentialsStore instanceof SystemCredentialsProvider.StoreImpl) {\n List<Domain> do... | import static com.dabsquared.gitlabjenkins.gitlab.api.impl.TestUtility.API_TOKEN;
import static com.dabsquared.gitlabjenkins.gitlab.api.impl.TestUtility.addGitLabApiToken;
import static com.dabsquared.gitlabjenkins.gitlab.api.impl.TestUtility.assertApiImpl;
import static com.dabsquared.gitlabjenkins.gitlab.api.impl.Tes... | package com.dabsquared.gitlabjenkins.gitlab.api.impl;
public class AutodetectingGitLabClientTest {
@Rule
public MockServerRule mockServer = new MockServerRule(this);
@Rule
public JenkinsRule jenkins = new JenkinsRule();
private MockServerClient mockServerClient;
private String gitLabUrl; | private GitLabClientBuilder clientBuilder; | 6 |
damingerdai/web-qq | src/main/java/org/aming/web/qq/contorller/MessageController.java | [
"public class Page implements Serializable{\n\n private static final int DEFAULT_PAGE_SIZE = 10;\n\n private int currentPage;\n private int totalPage;\n private int pageSize;\n\n public int getCurrentPage() {\n return currentPage;\n }\n\n public void setCurrentPage(int currentPage) {\n ... | import org.aming.web.qq.domain.Page;
import org.aming.web.qq.domain.TimeInterval;
import org.aming.web.qq.domain.User;
import org.aming.web.qq.logger.Logger;
import org.aming.web.qq.logger.LoggerManager;
import org.aming.web.qq.response.CommonResponse;
import org.aming.web.qq.service.MessageService;
import org.springfr... | package org.aming.web.qq.contorller;
/**
* @author daming
* @version 2017/10/8.
*/
@RestController
@RequestMapping("/webqq")
public class MessageController {
| private static final Logger logger = LoggerManager.getLogger(MessageController.class); | 3 |
saoj/mentabean | src/main/java/org/mentabean/jdbc/PostgreSQLBeanSession.java | [
"public class BeanConfig {\r\n\r\n\tprivate final Map<String, DBField> fieldList = new LinkedHashMap<String, DBField>();\r\n\r\n\tprivate final Map<String, DBField> pkList = new LinkedHashMap<String, DBField>();\r\n\t\r\n\tprivate final Map<String, Class<? extends Object>> abstractInstances = new LinkedHashMap<Stri... | import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import org.mentabean.BeanConfig;
import org.mentabean.BeanException;
import org.mentabean.BeanManager;
import org.mentabean.DBField;
import org.mentabean.DBType;
import org.mentabean.type.ByteArrayType;
import org.mentabean.type.L... | package org.mentabean.jdbc;
/**
*
* Now in PostgreSQL is 'current_timestamp'.
*
* PostgreSQL only supports sequences for primary keys.
*
* @author erico_kl
*
*/
public class PostgreSQLBeanSession extends AnsiSQLBeanSession {
public PostgreSQLBeanSession(BeanManager beanManager, Connection conn) {
... | if (dbType.getClass().equals(ByteArrayType.class)) | 5 |
GerritCodeReview/plugins_replication | src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationModule.java | [
"public static final String START_REPLICATION = \"startReplication\";",
"public class ProjectDeletionReplicationDoneEvent extends ProjectEvent {\n public static final String TYPE = \"project-deletion-replication-done\";\n\n private final String project;\n\n public ProjectDeletionReplicationDoneEvent(String pro... | import static com.googlesource.gerrit.plugins.replication.StartReplicationCapability.START_REPLICATION;
import com.google.common.eventbus.EventBus;
import com.google.gerrit.extensions.annotations.Exports;
import com.google.gerrit.extensions.config.CapabilityDefinition;
import com.google.gerrit.extensions.events.GitRefe... | // Copyright (C) 2012 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | ProjectDeletionReplicationFailedEvent.TYPE, ProjectDeletionReplicationFailedEvent.class); | 2 |
TheClimateCorporation/mirage | samples/src/main/java/com/climate/mirage/app/SettingsActivity.java | [
"public class Mirage {\n\n\t/**\n\t * Location of where the resource came from\n\t */\n\tpublic static enum Source {\n\t\tMEMORY,\n\t\tDISK,\n\t\tEXTERNAL\n\t}\n\n\tpublic static final Executor THREAD_POOL_EXECUTOR = new MirageExecutor();\n\n\tprivate static final String TAG = Mirage.class.getSimpleName();\n\tpriva... | import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import com.climate.mirage.Mirage;
import com.climate.mirage.cache.disk.CompositeDiskCache;
import com.climate.mirage.cache.d... | package com.climate.mirage.app;
public class SettingsActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
setContentView(ll);
Button bt... | Mirage.get(SettingsActivity.this).clearCache(); | 0 |
p455w0rd/p455w0rds-Library | src/main/java/p455w0rdslib/client/render/LayerContributorWings.java | [
"public class LibGlobals {\n\tpublic static final String MODID = \"p455w0rdslib\";\n\tpublic static final String VERSION = \"1.0.35\";\n\tpublic static final String NAME = \"p455w0rd's Library\";\n\tpublic static final String SERVER_PROXY = \"p455w0rdslib.proxy.CommonProxy\";\n\tpublic static final String CLIENT_PR... | import java.awt.Color;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLivingBase;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.min... | package p455w0rdslib.client.render;
/**
* @author p455w0rd
*
*/
@SideOnly(Side.CLIENT)
public class LayerContributorWings implements LayerRenderer<AbstractClientPlayer> {
| private ModelContributorWings modelWings = new ModelContributorWings(); | 2 |
crazyhitty/Munch | app/src/main/java/com/crazyhitty/chdev/ks/munch/ui/activities/ArticleActivity.java | [
"public class ArticlePresenter implements IArticlePresenter, OnArticleLoadedListener, OnArticleArchivedListener, OnArticleRemoveListener {\n private Context mContext;\n private IArticleView mView;\n private ArticleInteractor mArticleInteractor;\n\n public ArticlePresenter(Context context, IArticleView v... | import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.TypedValue;
import ... | package com.crazyhitty.chdev.ks.munch.ui.activities;
public class ArticleActivity extends AppCompatActivity implements IArticleView, IFeedsView {
private static final String EXTRA_CUSTOM_TABS_SESSION = "android.support.customtabs.extra.SESSION";
private static final String EXTRA_CUSTOM_TABS_TOOLBAR_COLOR ... | txtFeedTitle.setTextSize(TypedValue.COMPLEX_UNIT_SP, SettingsPreferences.ARTICLE_TITLE_SIZE); | 5 |
UweTrottmann/MovieTracker | SeriesGuideMovies/src/com/uwetrottmann/movies/util/MoviesUpdateTask.java | [
"public class ServiceManager {\n /** API key. */\n private String apiKeyValue;\n /** User email. */\n private String username;\n /** User password. */\n private String password_sha;\n /** Connection timeout (in milliseconds). */\n private Integer connectionTimeout;\n /** Read timeout (in ... | import com.jakewharton.trakt.entities.Movie;
import com.uwetrottmann.movies.R;
import com.uwetrottmann.movies.provider.MoviesContract;
import com.uwetrottmann.movies.provider.MoviesContract.Movies;
import java.util.ArrayList;
import java.util.List;
import android.content.ContentProviderOperation;
import android.content... | /*
* Copyright 2012 Uwe Trottmann
*
* 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 ... | final Cursor oldWatchlistData = getContext().getContentResolver().query(Movies.CONTENT_URI, | 4 |
mrico/creole-parser | src/test/java/eu/mrico/creole/test/BoldAndItalicsTest.java | [
"public class Creole {\r\n\r\n public static Document parse(String s) {\r\n try {\r\n CreoleParser parser = CreoleParserFactory.newInstance().newParser();\r\n return parser.parse(new StringReader(s));\r\n\r\n } catch (CreoleException e) {\r\n throw new RuntimeExcept... | import static org.junit.Assert.assertEquals;
import org.junit.Test;
import eu.mrico.creole.Creole;
import eu.mrico.creole.ast.Bold;
import eu.mrico.creole.ast.Document;
import eu.mrico.creole.ast.Italic;
import eu.mrico.creole.ast.Paragraph;
import eu.mrico.creole.ast.Text;
| package eu.mrico.creole.test;
/**
* @see http://www.wikicreole.org/wiki/Creole1.0#section-Creole1.0-BoldAndItalics
*/
public class BoldAndItalicsTest {
@Test
public void bold() {
Document is = Creole.parse("**bold**");
Document expected = (Document) new Document()
... | .add(new Paragraph()
| 4 |
ollipekka/gdx-soundboard | desktop/src/com/gdx/musicevents/tool/transitions/AddTransitionInDialog.java | [
"public class FadeIn implements StartEffect {\n protected transient float originalVolume;\n protected final float totalTime;\n protected transient float elapsedTime = 0;\n protected final float offset;\n protected transient float elapsedOffset;\n protected transient boolean started = false;\n\n ... | import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.ui.Button;
import com.badlogic.gdx.scenes.scene2d.ui.Cell;
import com.badlogic.gdx.scenes.scene2d.ui.Dialog;
import com.badlogic.gdx.scenes.scene2d.ui.List;
import com.badlogic.gdx.scenes.scene2d.ui.... | package com.gdx.musicevents.tool.transitions;
public class AddTransitionInDialog extends Dialog {
private final static String DEFAULT = "Default";
private final static String FADE_IN = "Fade in";
final SelectBox<String> selectBox;
final Cell<? extends Actor> propertiesCell;
final List<MusicStat... | StartEffect effect = null; | 1 |
Chisel-Team/ConnectedTexturesMod | src/main/java/team/chisel/ctm/client/texture/render/TexturePlane.java | [
"@ParametersAreNonnullByDefault\npublic interface ISubmap {\n\n float getYOffset();\n\n float getXOffset();\n\n float getWidth();\n\n float getHeight();\n\n float getInterpolatedU(TextureAtlasSprite sprite, float u);\n\n float getInterpolatedV(TextureAtlasSprite sprite, float v);\n\n float[] to... | import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.core.Direction;
import team.chisel.ctm.api.texture.ISubmap;
import team.chisel.ctm.api.texture.ITextureContext;
import team.chisel.ctm.api.util.TextureInfo;
import team.chisel.ctm.client.texture.ctx.TextureContextCTM;
import team.chisel.ct... | package team.chisel.ctm.client.texture.render;
public class TexturePlane extends TextureCTM<TextureTypePlane> {
private final Direction.Plane plane;
public TexturePlane(final TextureTypePlane type, final TextureInfo info) {
super(type, info);
this.plane = type.getPlane();
}
@Overrid... | final CTMLogic logic = (context instanceof TextureContextCTM ctmContext) ? ctmContext.getCTM(bakedQuad.getDirection()) : null; | 5 |
gillius/jalleg | jalleg-framework/src/main/java/org/gillius/jalleg/framework/Game.java | [
"public class Point {\n\tpublic float x;\n\tpublic float y;\n\n\tpublic Point(float x, float y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}\n\n\t@Override\n\tpublic String toString() {\n\t\treturn \"x=\" + x +\n\t\t \", y=\" + y;\n\t}\n}",
"public enum GameState {\n\t/**\n\t * Waiting for events.\n\t */\n\tIdl... | import com.sun.jna.ptr.FloatByReference;
import org.gillius.jalleg.binding.*;
import org.gillius.jalleg.framework.math.Point;
import org.gillius.jalleg.framework.stats.GameState;
import org.gillius.jalleg.framework.stats.GameStats;
import org.gillius.jalleg.framework.stats.GameStatsRecorder;
import java.util.EnumSet;
i... | al_start_timer(mainTimer);
boolean run = true;
while(run && !stopRequest) {
event.setType(Integer.TYPE);
if (isCollectingStats()) statsRecorder.startLoop();
al_wait_for_event(eventQueue, event);
if (onEvent(event)) {
if (event.type == ALLEGRO_EVENT_TIMER) {
transition(GameState.Update);
... | protected Point getMousePos() { | 0 |
mobilejazz/CacheIO | cacheio-core/src/test/java/com/mobilejazz/cacheio/caches/SQLiteRxCacheTest.java | [
"@RunWith(RobolectricTestRunner.class)\n@Config(constants = BuildConfig.class, sdk = 21, manifest = Config.NONE)\n@Ignore\npublic class ApplicationTestCase {\n\n}",
"public interface RxCache<K, V> {\n\n Single<V> get(K key);\n\n Single<V> put(K key, V value, long expiry, TimeUnit unit);\n\n Single<K> remove(K ... | import java.util.concurrent.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import android.database.sqlite.SQLiteDatabase;
import com.mobilejazz.cacheio.ApplicationTestCase;
import com.mobilejazz.cacheio.RxCache;
import com.mobilejazz.cacheio.mappers.KeyMapper;
impor... | /*
* Copyright (C) 2016 Mobile Jazz
*
* 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... | final RxCache<String, TestUser> rxCache = SQLiteRxCache.newBuilder(String.class, TestUser.class) | 1 |
comodoro/FractalZoo | app/src/main/java/com/draabek/fractal/gl/MyGLSurfaceView.java | [
"public interface FractalViewWrapper {\n void saveBitmap();\n void setVisibility(int visibility);\n boolean isRendering();\n void setRenderListener(RenderListener renderListener);\n void clear();\n}",
"public interface RenderListener {\n void onRenderRequested();\n void onRenderComplete(long ... | import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.Toast;
impor... | /*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | public void setRenderListener(RenderListener renderListener) { | 1 |
jordw/heftydb | src/test/java/com/jordanwilliams/heftydb/test/unit/read/CompactionTupleIteratorTest.java | [
"public class Key implements Comparable<Key> {\n\n private final ByteBuffer data;\n private final long snapshotId;\n\n public Key(ByteBuffer data, long snapshotId) {\n this.data = data;\n this.snapshotId = snapshotId;\n }\n\n public ByteBuffer data() {\n return data;\n }\n\n ... | import com.jordanwilliams.heftydb.data.Key;
import com.jordanwilliams.heftydb.data.Tuple;
import com.jordanwilliams.heftydb.data.Value;
import com.jordanwilliams.heftydb.read.CompactionTupleIterator;
import com.jordanwilliams.heftydb.util.ByteBuffers;
import com.jordanwilliams.heftydb.util.CloseableIterator;
import org... | /*
* Copyright (c) 2014. Jordan Williams
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | Iterator<Tuple> versionedIterator = new CompactionTupleIterator(2, new CloseableIterator.Wrapper<Tuple> | 5 |
terzerm/hover-raft | src/main/java/org/tools4j/hoverraft/server/RoundRobinMessagePoller.java | [
"public interface Command extends DirectPayload, Event {\n\n CommandKey commandKey();\n\n CommandPayload commandPayload();\n\n default Command sourceId(final int sourceId) {\n commandKey().sourceId(sourceId);\n return this;\n }\n\n default Command commandIndex(final long commandIndex) {... | import java.util.Objects;
import java.util.function.Consumer;
import org.tools4j.hoverraft.command.Command;
import org.tools4j.hoverraft.config.ConsensusConfig;
import org.tools4j.hoverraft.direct.DirectPayload;
import org.tools4j.hoverraft.message.Message;
import org.tools4j.hoverraft.transport.Receiver;
import org.to... | /**
* The MIT License (MIT)
*
* Copyright (c) 2016-2017 hover-raft (tools4j), Marco Terzer
*
* 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 limi... | public static RoundRobinMessagePoller<Command> forSourceMessages(final ServerContext serverContext, | 0 |
mikkeliamk/osa | src/fi/mamk/osa/stripes/LoginAction.java | [
"public class User implements Serializable {\n \n private static final long serialVersionUID = -9105054849954016390L;\n private static final Logger logger = Logger.getLogger(User.class);\n \n\t/** Distinguished name */\n\tprivate String dn = null;\n\t/** Common name */\n\tprivate String cn = null;\n\t/*... | import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Vector;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import fi.mamk.osa.auth.User;
import fi.mamk.osa... | package fi.mamk.osa.stripes;
@UrlBinding("/Login.action")
public class LoginAction extends OsaBaseActionBean implements HttpSessionListener {
private static final Logger logger = Logger.getLogger(LoginAction.class);
private static Map<String, HttpSession> sessions = new HashMap<String, HttpSession>();
... | User previousUser = (User) session.getAttribute("user"); | 0 |
aviewdevs/aview | aview/src/main/java/com/github/aview/app/AviewActivity.java | [
"public class ViewServer implements Runnable {\n /**\n * The default port used to start view servers.\n */\n private static final int VIEW_SERVER_DEFAULT_PORT = 4939;\n private static final int VIEW_SERVER_MAX_CONNECTIONS = 10;\n private static final String BUILD_TYPE_USER = \"user\";\n\n // ... | import java.io.Serializable;
import java.util.HashMap;
import android.app.SearchManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.ActionBarDrawerToggle;
import android.suppo... | package com.github.aview.app;
/*
* #%L
* aview
* %%
* Copyright (C) 2013 The aview authors
* %%
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must r... | AviewVideoService videoService; | 4 |
bingoogolapple/Android-Training | MyMoment/src/com/bingoogol/mymoment/adapter/HomeMomentAdapter.java | [
"public class Moment {\n\tprivate int id;\n\tprivate String content;\n\tprivate String imgPath;\n\tprivate String publishTime;\n\n\tpublic Moment() {\n\t}\n\t\n\tpublic Moment(int id, String content, String imgPath, String publishTime) {\n\t\tthis.id = id;\n\t\tthis.content = content;\n\t\tthis.imgPath = imgPath;\n... | import java.util.List;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListen... | package com.bingoogol.mymoment.adapter;
public class HomeMomentAdapter extends BaseAdapter implements OnLongClickListener {
private List<Moment> datas;
private LayoutInflater layoutInflater;
private ListView listView;
private Activity context;
public HomeMomentAdapter(Activity context, ListView listView, Lis... | ImageFetcher.loadBitmap(leftImgRealPath, 100, 100, new ImgCallback() { | 4 |
gems-uff/prov-viewer | src/test/java/br/uff/ic/graphmatching/MergerTest.java | [
"public class GuiRun {\n \n /**\n * Main loop of the program\n */\n public static void Run()\n {\n \n java.awt.EventQueue.invokeLater(new Runnable() {\n \n @Override\n public void run() {\n new GraphFrame().setVisible(true... | import br.uff.ic.provviewer.GUI.GuiRun;
import br.uff.ic.utility.AttributeErrorMargin;
import br.uff.ic.utility.GraphAttribute;
import br.uff.ic.utility.IO.BasePath;
import br.uff.ic.utility.IO.UnityReader;
import br.uff.ic.utility.IO.XMLWriter;
import br.uff.ic.utility.graph.ActivityVertex;
import br.uff.ic.utility.gr... | /*
* The MIT License
*
* Copyright 2017 Kohwalter.
*
* 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, modif... | UnityReader file = new UnityReader(f); | 4 |
curtisullerich/attendance | src/main/java/edu/iastate/music/marching/attendance/model/interact/FormManager.java | [
"public enum WeekDay {\n\tSunday(DateTimeConstants.SUNDAY), Monday(DateTimeConstants.MONDAY), Tuesday(\n\t\t\tDateTimeConstants.TUESDAY), Wednesday(\n\t\t\tDateTimeConstants.WEDNESDAY), Thursday(\n\t\t\tDateTimeConstants.THURSDAY), Friday(DateTimeConstants.FRIDAY), Saturday(\n\t\t\tDateTimeConstants.SATURDAY);\n\tp... | import java.util.List;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.Interval;
import org.joda.time.LocalDate;
import org.joda.time.LocalTime;
import com.google.appengine.api.datastore.Query.FilterOperator;
import com.google.code.twig.FindCommand.RootFindCommand;
import com.goog... | package edu.iastate.music.marching.attendance.model.interact;
public class FormManager extends AbstractManager {
private DataTrain train;
public FormManager(DataTrain dataTrain) {
this.train = dataTrain;
}
public void approve(Form form) {
form.setStatus(Form.Status.Approved);
this.update(form);
}
p... | Form form = ModelFactory.newForm(Form.Type.ClassConflict, student); | 4 |
goshippo/shippo-java-client | src/main/java/com/shippo/model/Parcel.java | [
"public class APIConnectionException extends ShippoException {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic APIConnectionException(String message) {\n\t\tsuper(message);\n\t}\n\n\tpublic APIConnectionException(String message, Throwable e) {\n\t\tsuper(message, e);\n\t}\n\n}",
"public class AP... | import java.util.Map;
import com.shippo.exception.APIConnectionException;
import com.shippo.exception.APIException;
import com.shippo.exception.AuthenticationException;
import com.shippo.exception.InvalidRequestException;
import com.shippo.net.APIResource; | package com.shippo.model;
public class Parcel extends APIResource {
String objectState;
String objectStatus;
String objectId;
String objectOwner;
Object objectCreated;
Object objectUpdated;
Object length;
Object width;
Object height;
Object distanceUnit;
Object weight;
Object massUnit;... | public static Parcel create(Map<String, Object> params) throws AuthenticationException, InvalidRequestException, | 2 |
thedudeguy/JukeIt | src/main/java/com/chrischurchwell/jukeit/material/Items.java | [
"public class BlankDisc extends GenericCustomItem implements DiscColorable, CraftPermissible {\n\r\n\tprivate DiscColor color = DiscColor.WHITE; //white is the default\n\t\r\n\tpublic BlankDisc(String name, DiscColor color) {\r\n\t\tsuper(JukeIt.getInstance(), name);\r\n\t\tthis.color = color;\r\n\t\tsetTexture(thi... | import java.util.HashMap;
import com.chrischurchwell.jukeit.material.items.BlankDisc;
import com.chrischurchwell.jukeit.material.items.BurnedDisc;
import com.chrischurchwell.jukeit.material.items.DiscOnAStick;
import com.chrischurchwell.jukeit.material.items.MachineBottom;
import com.chrischurchwell.jukeit.materia... | /**
* This file is part of JukeIt
*
* Copyright (C) 2011-2013 Chris Churchwell
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your o... | public static WoodFlintNeedle woodflintNeedle;
| 8 |
xedin/sasi | test/unit/org/apache/cassandra/db/index/sasi/disk/OnDiskIndexTest.java | [
"public class Expression\n{\n private static final Logger logger = LoggerFactory.getLogger(Expression.class);\n\n public enum Op\n {\n EQ, NOT_EQ, RANGE\n }\n\n private final QueryController controller;\n\n public final AbstractAnalyzer analyzer;\n\n public final ColumnIndex index;\n ... | import java.io.File;
import java.nio.ByteBuffer;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import org.apache.cassandra.db.DecoratedKey;
import org.apache.cassandra.db.index.sasi.plan.Expression;
import org.apache.cassandra.db.index.sasi.utils.CombinedTerm;
import org.apache.cassandra.db.index.s... | onDisk.close();
List<ByteBuffer> iterCheckNums = new ArrayList<ByteBuffer>()
{{
add(Int32Type.instance.decompose(3));
add(Int32Type.instance.decompose(9));
add(Int32Type.instance.decompose(14));
add(Int32Type.instance.decompose(42));
}};
... | RangeIterator<Long, Token> rows = onDisk.search(expressionFor(step, lowerInclusive, limit, upperInclusive)); | 4 |
pmarques/SocketIO-Server | SocketIO-Netty/src/test/java/eu/k2c/socket/io/ci/usecases/UC17Handler.java | [
"public abstract class AbstractHandler extends AbstractSocketIOHandler {\n\t@Override\n\tpublic boolean validate(String URI) {\n\t\t// This isn't belongs to socketIO Spec AFAIK\n\t\treturn true;\n\t}\n\n\t@Override\n\tpublic void onConnect(final SocketIOOutbound outbound, final SocketIOSessionEventRegister eventReg... | import eu.k2c.socket.io.ci.AbstractHandler;
import eu.k2c.socket.io.server.api.SocketIOOutbound;
import eu.k2c.socket.io.server.api.SocketIOSessionEventRegister;
import eu.k2c.socket.io.server.api.SocketIOSessionNSRegister;
import eu.k2c.socket.io.server.exceptions.SocketIOException;
import java.util.List;
import java.... | /**
* Copyright (C) 2011 K2C @ Patrick Marques <patrickfmarques@gmail.com>
*
* 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 ... | } catch (SocketIOException e) { | 4 |
digitalpetri/ethernet-ip | cip-core/src/main/java/com/digitalpetri/enip/cip/services/MultipleServicePacketService.java | [
"public class CipResponseException extends Exception {\n\n private final int generalStatus;\n private final int[] additionalStatus;\n\n public CipResponseException(int generalStatus, int[] additionalStatus) {\n this.generalStatus = generalStatus;\n this.additionalStatus = additionalStatus;\n ... | import java.util.ArrayList;
import java.util.List;
import java.util.function.BiConsumer;
import com.digitalpetri.enip.cip.CipResponseException;
import com.digitalpetri.enip.cip.epath.EPath.PaddedEPath;
import com.digitalpetri.enip.cip.epath.LogicalSegment.ClassId;
import com.digitalpetri.enip.cip.epath.LogicalSegment.I... | package com.digitalpetri.enip.cip.services;
public class MultipleServicePacketService implements CipService<Void> {
public static final int SERVICE_CODE = 0x0A;
private static final PaddedEPath MESSAGE_ROUTER_PATH = new PaddedEPath( | new ClassId(0x02), | 2 |
ptitfred/magrit | server/sshd/src/test/java/org/kercoin/magrit/sshd/commands/AbstractCommandTest.java | [
"@Singleton\npublic class Context {\n\t\n\tprivate final Configuration configuration = new Configuration();\n\t\n\tprivate Injector injector;\n\t\n\tprivate final GitUtils gitUtils;\n\t\n\tprivate final ExecutorService commandRunnerPool;\n\n\tpublic Context() {\n\t\tgitUtils = null;\n\t\tcommandRunnerPool = null;\n... | import static org.fest.assertions.Assertions.assertThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.ExecutorService;
import org.apache.sshd.server.Environment;
imp... | /*
Copyright 2011-2012 Frederic Menou and others referred in AUTHORS file.
This file is part of Magrit.
Magrit is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your ... | Context ctx; | 0 |
DavidShepherdson/jira-suite-utilities | src/main/java/com/googlecode/jsu/workflow/WorkflowDateCompareValidatorPluginFactory.java | [
"public static final YesNoType NO = new YesNoType(2, \"No\");\r",
"public static final YesNoType YES = new YesNoType(1, \"Yes\");\r",
"public class ConditionCheckerFactory {\n public static final ConditionType GREATER = new ConditionType(1, \">\", \"greater than\", \"G\");\n public static final ConditionT... | import static com.googlecode.jsu.helpers.YesNoType.NO;
import static com.googlecode.jsu.helpers.YesNoType.YES;
import static java.util.Arrays.asList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.atlassian.jira.issue.fields.Field;
import com.atlassian.jira.plugin.workflow.AbstractWor... | package com.googlecode.jsu.workflow;
/**
* @author Gustavo Martin.
*
* This class defines the parameters available for Date Compare Validator.
*
*/
public class WorkflowDateCompareValidatorPluginFactory extends
AbstractWorkflowPluginFactory implements WorkflowPluginValidatorFactory {
private final... | YesNoType ynTime = (Integer.parseInt(includeTime) == 1) ? YES : NO; | 4 |
beerbong/com_beerbong_zipinst | src/com/beerbong/zipinst/fragment/FragmentRecovery.java | [
"public interface Core extends Serializable {\n\n public static final String PLUGIN_UI = \"UIPlugin\";\n public static final String PLUGIN_SUPERUSER = \"SuperUserPlugin\";\n public static final String PLUGIN_RECOVERY = \"RecoveryPlugin\";\n public static final String PLUGIN_STORAGE = \"StoragePlugin\";\... | import com.beerbong.zipinst.R;
import com.beerbong.zipinst.core.Core;
import com.beerbong.zipinst.core.plugins.reboot.RebootPlugin;
import com.beerbong.zipinst.core.plugins.recovery.RecoveryPlugin;
import com.beerbong.zipinst.core.plugins.superuser.SuperUserPlugin;
import com.beerbong.zipinst.io.Files;
import com.beerb... | /*
* Copyright 2014 ZipInstaller Project
*
* This file is part of ZipInstaller.
*
* ZipInstaller 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) a... | boolean deleted = Files.recursiveDelete(new File(toDelete)); | 4 |
fredg02/se.bitcraze.crazyflie.lib | se.bitcraze.crazyflie.lib.examples/src/main/java/se/bitcraze/crazyflie/lib/examples/CrazyflieWrapper.java | [
"public class Crazyflie {\n\n private final Logger mLogger = LoggerFactory.getLogger(this.getClass().getSimpleName());\n\n private CrtpDriver mDriver;\n private Thread mIncomingPacketHandlerThread;\n\n private LinkedBlockingDeque<CrtpPacket> mResendQueue = new LinkedBlockingDeque<>();\n private Threa... | import java.util.HashMap;
import java.util.List;
import java.util.Map;
import se.bitcraze.crazyflie.lib.crazyflie.ConnectionAdapter;
import se.bitcraze.crazyflie.lib.crazyflie.Crazyflie;
import se.bitcraze.crazyflie.lib.crazyflie.Crazyflie.State;
import se.bitcraze.crazyflie.lib.crazyradio.ConnectionData;
import se.bit... | package se.bitcraze.crazyflie.lib.examples;
/**
* Work in progress of a Crazyflie wrapper, that tries to provide
* a simple API to use and control the Crazyflie.
*/
public class CrazyflieWrapper {
private Crazyflie mCrazyflie;
private boolean mSetupFinished;
private Param mParam;
public Crazyfli... | mCrazyflie.sendPacket(new CommanderPacket(roll, pitch, yaw, thrust)); | 3 |
ChenTianSaber/DailyZhiHu | MyZhiHuDaily/app/src/main/java/com/example/chentian/myzhihudaily/fragment/HotNewsFragment.java | [
"public class ContentRecyerAdapter extends RecyclerView.Adapter {\n\n Context context;\n ArrayList<String> titleData;\n ArrayList<String> bmpData;\n ArrayList<Integer> idData;\n\n public ContentRecyerAdapter(Context context,ArrayList<String> titleData,ArrayList<String> bmpData,ArrayList<Integer> idDa... | import android.content.res.Resources;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.util.TypedValue;
import android... | package com.example.chentian.myzhihudaily.fragment;
/**
* Created by chentian on 15/04/2017.
*/
public class HotNewsFragment extends Fragment {
View view;
RecyclerView contentRecycler;
ArrayList<String> titleData;
ArrayList<String> bmpData;
ArrayList<Integer> idData;
List<Recent> recent... | final HotNewsService service = retrofit.create(HotNewsService.class); | 4 |
wisedog/Whoochoo | src/net/wisedog/android/whooing/activity/MountainFragment.java | [
"public class Define {\n public static boolean DEBUG = false;\n \n\tpublic static String APP_ID = \"125\";\n\tpublic static String APP_SECRET = \"1c5224ad2961704a6076c0bda127003933828a16\";\n\tpublic static String PIN = null;\n\tpublic static String REAL_TOKEN = null;\n\tpublic static int USER_ID = -1;\n\tpub... | import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import org.json.JSONException;
import org.json.JSONObject;
import net.wisedog.android.whooing.Define;
import net.wisedog.android.whooing.R;
import net.wisedog.android.whooing.WhooingApplicati... | /*
* Copyright (C) 2013 Jongha Kim
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... | DataRepository repository = WhooingApplication.getInstance().getRepo(); | 1 |
googleapis/java-trace | google-cloud-trace/src/main/java/com/google/cloud/trace/v1/TraceServiceSettings.java | [
"public static class ListTracesPagedResponse\n extends AbstractPagedListResponse<\n ListTracesRequest,\n ListTracesResponse,\n Trace,\n ListTracesPage,\n ListTracesFixedSizeCollection> {\n\n public static ApiFuture<ListTracesPagedResponse> createAsync(\n PageContext<ListT... | import static com.google.cloud.trace.v1.TraceServiceClient.ListTracesPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.Instantia... | /*
* Copyright 2021 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | public PagedCallSettings<ListTracesRequest, ListTracesResponse, ListTracesPagedResponse> | 3 |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/display/FieldStyleRule.java | [
"public interface IJSONStore\n{\n /**\n * Store object in json\n * @return json object with stored data\n * @throws JSONException\n */\n JSONObject toJSON()\n throws JSONException;\n\n /**\n * Restore object from json\n * @param jsonObject where the stored data are\n ... | import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicReference;
import com.nextgis.maplib.api.IJSONStore;
import com.nextgis.maplib.api.IStyleRule;
import com.nextgis.maplib.datasource.Feature;
import com.nextgis.maplib.map.VectorLayer;
import com.nextgis.maplib.util.Constants;
impor... | /*
* Project: NextGIS Mobile
* Purpose: Mobile GIS for Android.
* Author: Stanislav Petriakov, becomeglory@gmail.com
* *****************************************************************************
* Copyright (c) 2016-2017 NextGIS, info@nextgis.com
*
* This program is free software: you can redistribute it a... | String value = mKey.equals(Constants.FIELD_ID) ? feature.getId() + "" : feature.getFieldValueAsString(mKey); | 4 |
axxepta/project-argon | src/main/java/de/axxepta/oxygen/actions/StoreSnippetSelectionAction.java | [
"public enum BaseXSource {\r\n\r\n /**\r\n * Database.\r\n */\r\n DATABASE(\"argon\"),\r\n// /**\r\n// * RESTXQ.\r\n// */\r\n// RESTXQ(\"argonquery\"),\r\n /**\r\n * Repository.\r\n */\r\n REPO(\"argonrepo\");\r\n\r\n private final String protocol;\r\n\r\n BaseXSource... | import de.axxepta.oxygen.api.BaseXSource;
import de.axxepta.oxygen.customprotocol.ArgonChooserDialog;
import de.axxepta.oxygen.customprotocol.CustomProtocolURLUtils;
import de.axxepta.oxygen.utils.ConnectionWrapper;
import de.axxepta.oxygen.utils.IOUtils;
import de.axxepta.oxygen.utils.Lang;
import de.axxepta.oxygen.ut... | package de.axxepta.oxygen.actions;
/**
* @author Markus on 26.07.2016.
*/
public class StoreSnippetSelectionAction extends AbstractAction {
private static final Logger logger = LogManager.getLogger(StoreSnippetSelectionAction.class);
private final PluginWorkspace workspace = PluginWorkspaceProvider.getPl... | BaseXSource source = CustomProtocolURLUtils.sourceFromURL(url); | 0 |
ahammer/StockSimulator | core/src/com/metalrain/stocksimulator/textClient/TextClient.java | [
"public class GameState {\n public final static int MARKET_WARMUP_ITERATIONS = 4000;\n private final GameSaver gameSaver = new GameSaver(this);\n public RxBus bus = new RxBus();\n private final MarketSystem system;\n\n public Engine getEntityEngine() {\n return entityEngine;\n }\n\n Engi... | import com.metalrain.stocksimulator.state.GameState;
import com.metalrain.stocksimulator.textClient.sections.HelpSection;
import com.metalrain.stocksimulator.textClient.sections.LoadGameSection;
import com.metalrain.stocksimulator.textClient.sections.MakePurchaseSection;
import com.metalrain.stocksimulator.textClient.s... | package com.metalrain.stocksimulator.textClient;
/**
* Created by Adam Hammer on 6/22/2015.
*/
public class TextClient {
private final GameState state;
public String savedGameJson;
private final List<ITextClientSection> sectionList = Arrays.asList(
new HelpSection(this), | new ShowMarketSection(this), | 8 |
cattaka/AdapterToolbox | example/src/androidTest/java/net/cattaka/android/adaptertoolbox/example/NestedScrambleAdapterExampleActivityTest.java | [
"public class ScrambleAdapter<T> extends AbsScrambleAdapter<\n ScrambleAdapter<T>,\n ScrambleAdapter<?>,\n RecyclerView.ViewHolder,\n ForwardingListener<ScrambleAdapter<?>, RecyclerView.ViewHolder>,\n T\n > {\n private Context mContext;\n private List<T> mItems;\n\n ... | import android.content.res.Resources;
import android.support.test.espresso.action.ViewActions;
import android.support.test.rule.ActivityTestRule;
import android.view.View;
import net.cattaka.android.adaptertoolbox.adapter.ScrambleAdapter;
import net.cattaka.android.adaptertoolbox.example.data.NestedScrambleInfo;
import... | package net.cattaka.android.adaptertoolbox.example;
/**
* Created by cattaka on 16/06/05.
*/
public class NestedScrambleAdapterExampleActivityTest {
@Rule
public ActivityTestRule<NestedScrambleAdapterExampleActivity> mActivityTestRule = new ActivityTestRule<>(NestedScrambleAdapterExampleActivity.class, f... | mActivity.mSnackbarLogic = spy(new MockSnackbarLogic()); | 3 |
pivotal-cf/spring-cloud-services-connector | spring-cloud-services-spring-connector/src/test/java/io/pivotal/spring/cloud/service/config/ConfigServerServiceConnectorIntegrationTest.java | [
"public class MockCloudConnector implements CloudConnector {\n\n\tpublic static final CloudConnector instance = Mockito.mock(CloudConnector.class);\n\n\tpublic static void reset() {\n\t\tMockito.reset(instance);\n\t}\n\n\tpublic boolean isInMatchingCloud() {\n\t\treturn instance.isInMatchingCloud();\n\t}\n\n\tpubli... | import java.util.Collections;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest... | /*
* Copyright 2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | assertPropertyEquals(URI, SPRING_CLOUD_CONFIG_URI); | 6 |
marcelothebuilder/webpedidos | src/main/java/com/github/marcelothebuilder/webpedidos/controller/CadastroClienteBean.java | [
"public class EnderecoAlteradoEvent {\n\n\tprivate Endereco endereco;\n\tprivate boolean novo;\n\n\tpublic EnderecoAlteradoEvent() {\n\t}\n\n\tpublic EnderecoAlteradoEvent(Endereco endereco) {\n\t\tthis();\n\t\tthis.setEndereco(endereco);\n\t}\n\n\tpublic EnderecoAlteradoEvent(Endereco endereco, boolean novo) {\n\t... | import java.io.Serializable;
import java.util.List;
import javax.enterprise.event.Observes;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import javax.persistence.PersistenceException;
impo... | package com.github.marcelothebuilder.webpedidos.controller;
@Named
@ViewScoped
public class CadastroClienteBean implements Serializable {
private static final long serialVersionUID = 1L;
private @Inject Cliente cliente;
private @Inject Clientes clientes;
/**
* Acessor de leitura para o campo cliente
*
... | public void enderecoAlterado(@Observes EnderecoAlteradoEvent event) { | 0 |
jramoyo/quickfix-messenger | src/test/java/com/jramoyo/qfixmessenger/quickfix/parser/QFixDictionaryParserTest.java | [
"public final class Component extends AbstractMember\r\n{\r\n\tprivate final String name;\r\n\tprivate final SortedMap<MemberOrder, Boolean> members;\r\n\tprivate final Field firstTag;\r\n\r\n\tpublic Component(String name, Map<MemberOrder, Boolean> members,\r\n\t\t\tField firstTag)\r\n\t{\r\n\t\tthis.name = name;\... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import java.util.Map;
import java.util.Map.Entry;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit... | /*
* Copyright (c) 2011, Jan Amoyo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list... | FixDictionaryParser parser = new QFixDictionaryParser(20);
| 7 |
jlaw90/Grimja | grimedi/src/com/sqrt4/grimedi/ui/component/ColorMapSelector.java | [
"public class LabCollection {\n public final List<LabFile> labs = new LinkedList<LabFile>();\n\n /**\n * Creates an empty LAB file and adds it to the collection\n * @return the creation\n */\n public LabFile addEmptyLab() {\n LabFile lf = new LabFile(this);\n labs.add(lf);\n ... | import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemListener;
import java.io.IOException;
import java.util.Vector;
import com.sqrt.liblab.LabCollection;
import com.sqrt.liblab.LabFile;
import com.sqrt.liblab.codec.CodecMapper;
import com.sqrt.liblab.entry.model.ColorMap;
import com.sqrt.liblab.io.DataSou... | /*
* Copyright (C) 2014 James Lawrence.
*
* This file is part of GrimEdi.
*
* GrimEdi 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... | return (ColorMap) CodecMapper.codecForProvider(edp).read(edp); | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.