repo_name stringlengths 7 104 | file_path stringlengths 5 238 | context listlengths 5 131 | import_statement stringlengths 41 11.2k | code stringlengths 42 78.6k | next_line stringlengths 5 824 | gold_snippet_index int64 0 130 |
|---|---|---|---|---|---|---|
HadoopGenomics/Hadoop-BAM | src/main/java/org/seqdoop/hadoop_bam/BAMInputFormat.java | [
"public class LinearBAMIndex extends CachingBAMFileIndex {\n\n public LinearBAMIndex(SeekableStream stream, SAMSequenceDictionary dict) {\n super(stream, dict);\n }\n \n public LinearIndex getLinearIndex(int idx) {\n return getQueryResults(idx).getLinearInde... | import htsjdk.samtools.AbstractBAMFileIndex;
import htsjdk.samtools.BAMFileReader;
import htsjdk.samtools.BAMFileSpan;
import htsjdk.samtools.BAMIndex;
import htsjdk.samtools.Chunk;
import htsjdk.samtools.LinearBAMIndex;
import htsjdk.samtools.LinearIndex;
import htsjdk.samtools.QueryInterval;
import htsjdk.samtools.SA... | // Copyright (c) 2010 Aalto University
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publi... | SAMFileHeader header = SAMHeaderReader.readSAMHeaderFrom(in, conf); | 3 |
contentful/contentful.java | src/test/java/com/contentful/java/cda/integration/IntegrationWithMasterEnvironment.java | [
"public class CDAAsset extends LocalizedResource {\n\n private static final long serialVersionUID = -4645571481643616657L;\n\n /**\n * @return title of this asset.\n */\n public String title() {\n return getField(\"title\");\n }\n\n /**\n * @return url to the file of this asset.\n */\n public Strin... | import com.contentful.java.cda.CDAAsset;
import com.contentful.java.cda.CDAClient;
import com.contentful.java.cda.CDAEntry;
import com.contentful.java.cda.CDALocale;
import com.contentful.java.cda.CDASpace;
import com.contentful.java.cda.LocalizedResource;
import com.contentful.java.cda.SynchronizedSpace;
import java.u... | package com.contentful.java.cda.integration;
public class IntegrationWithMasterEnvironment extends Integration {
@Override public void setUp() {
client = CDAClient.builder()
.setSpace("5s4tdjmyjfpl")
.setToken("84017d3a5da6d3ae9c733c6c210c55eebc3da033730b4e5093a6e6aa099b4995")
.setEnvi... | final SynchronizedSpace space = client.sync(onlyDeletedAssets()).fetch(); | 6 |
jenkinsci/priority-sorter-plugin | src/main/java/jenkins/advancedqueue/PrioritySorterConfiguration.java | [
"public static class PriorityStrategyHolder {\n\tprivate int id = 0;\n\tprivate PriorityStrategy priorityStrategy;\n\n\tpublic PriorityStrategyHolder() {\n\t}\n\n\t@DataBoundConstructor\n\tpublic PriorityStrategyHolder(int id, PriorityStrategy priorityStrategy) {\n\t\tthis.id = id;\n\t\tthis.priorityStrategy = prio... | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.Extension;
import hudson.model.Job;
import hudson.security.ACL;
import hudson.security.ACLContext;
import hudson.util.FormValidation;
import hudson.util.ListBoxModel;
import java.io.IOException;
import java.util.List;
import java.util.logging.Leve... | /*
* The MIT License
*
* Copyright (c) 2013, Magnus Sandberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, c... | List<SorterStrategyDescriptor> values = SorterStrategy.getAllSorterStrategies(); | 3 |
ni3po42/traction.mvc | traction/src/main/java/traction/mvc/implementations/ui/menubinding/MenuBinding.java | [
"public class BindingInventory\n extends ObservableObject\n{\n\t/**\n\t * patterns for parsing property chains\n\t */\n\tprivate final static Pattern pathPattern = Pattern.compile(\"(\\\\\\\\|[\\\\.]*)(.+)\");\n\tprivate final static Pattern split = Pattern.compile(\"\\\\.\");\n\n\t//used for determining a range... | import android.view.MenuItem;
import android.view.View;
import org.json.JSONException;
import org.json.JSONObject;
import traction.mvc.observables.BindingInventory;
import traction.mvc.implementations.ui.UIEvent;
import traction.mvc.implementations.ui.UIHandler;
import traction.mvc.implementations.ui.UIProperty;
import... | /* Copyright 2013 Tim Stratton
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... | public void initialise(View notUsed, UIHandler uiHandler, BindingInventory inventory, int bindingFlags) | 2 |
achellies/AtlasForAndroid | src/android/taobao/atlas/hack/AtlasHacks.java | [
"public static interface AssertionFailureHandler {\n boolean onAssertionFailure(HackAssertionException hackAssertionException);\n}",
"public static abstract class HackDeclaration {\n\n public static class HackAssertionException extends Throwable {\n private static final long serialVersionUID = 1;\n ... | import android.app.Application;
import android.app.Instrumentation;
import android.app.Service;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.content.res.Resources.Theme;
import android.os.Build.VERSIO... | package android.taobao.atlas.hack;
public class AtlasHacks extends HackDeclaration implements AssertionFailureHandler {
public static HackedClass<Object> ActivityThread; | public static HackedMethod ActivityThread_currentActivityThread; | 5 |
mariok/pinemup | src/main/java/net/sourceforge/pinemup/ui/swing/tray/TrayMenuUpdater.java | [
"public class CategoryAddedEvent extends EventObject {\n private static final long serialVersionUID = 3366814253028410097L;\n\n private final Category addedCategory;\n\n public CategoryAddedEvent(PinBoard source, Category addedCategory) {\n super(source);\n this.addedCategory = addedCategory;\n }\... | import net.sourceforge.pinemup.core.model.CategoryAddedEvent;
import net.sourceforge.pinemup.core.model.CategoryAddedEventListener;
import net.sourceforge.pinemup.core.model.CategoryChangedEvent;
import net.sourceforge.pinemup.core.model.CategoryChangedEventListener;
import net.sourceforge.pinemup.core.model.CategoryRe... | package net.sourceforge.pinemup.ui.swing.tray;
public class TrayMenuUpdater implements CategoryChangedEventListener, UserSettingsChangedEventListener, CategoryAddedEventListener,
CategoryRemovedEventListener {
private static final Logger LOG = LoggerFactory.getLogger(TrayMenuUpdater.class);
private fina... | public void categoryChanged(CategoryChangedEvent event) { | 2 |
PearsonEducation/StatsPoller | src/main/java/com/pearson/statspoller/internal_metric_collectors/InternalCollectorFramework.java | [
"public class ApplicationConfiguration {\n\n private static final Logger logger = LoggerFactory.getLogger(ApplicationConfiguration.class.getName());\n \n public static final int VALUE_NOT_SET_CODE = -4444;\n \n private static boolean isInitializeSuccess_ = false; \n \n private static Hierarchic... | import com.pearson.statspoller.globals.ApplicationConfiguration;
import com.pearson.statspoller.globals.GlobalVariables;
import java.util.List;
import com.pearson.statspoller.metric_formats.graphite.GraphiteMetric;
import com.pearson.statspoller.metric_formats.opentsdb.OpenTsdbMetric;
import com.pearson.statspoller.uti... | package com.pearson.statspoller.internal_metric_collectors;
/**
* @author Jeffrey Schmidt
*/
public abstract class InternalCollectorFramework {
private static final Logger logger = LoggerFactory.getLogger(InternalCollectorFramework.class.getName());
protected final int NUM_FILE_WRITE_RETRIES = 3;
... | else Threads.sleepMilliseconds(DELAY_BETWEEN_WRITE_RETRIES_IN_MS); | 5 |
Terracotta-OSS/offheap-store | src/test/java/org/terracotta/offheapstore/paging/EvictionRefusalStealingIT.java | [
"public class UpfrontAllocatingPageSource implements PageSource {\n\n public static final String ALLOCATION_LOG_LOCATION = UpfrontAllocatingPageSource.class.getName() + \".allocationDump\";\n\n private static final Logger LOGGER = LoggerFactory.getLogger(UpfrontAllocatingPageSource.class);\n private static... | import org.terracotta.offheapstore.paging.UnlimitedPageSource;
import org.terracotta.offheapstore.paging.UpfrontAllocatingPageSource;
import org.terracotta.offheapstore.paging.PageSource;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
i... | /*
* Copyright 2015 Terracotta, Inc., a Software AG company.
*
* 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 b... | PageSource source = new UpfrontAllocatingPageSource(new HeapBufferSource(), 1024 * 1024, 1024 * 1024); | 0 |
ralscha/wampspring | src/test/java/ch/rasc/wampspring/method/WampMessageTypeMessageConditionTest.java | [
"public class CallMessage extends WampMessage {\n\tprivate final String callID;\n\n\tprivate final String procURI;\n\n\tprivate final List<Object> arguments;\n\n\tpublic CallMessage(String callID, String procURI, Object... arguments) {\n\t\tsuper(WampMessageType.CALL);\n\t\tthis.callID = callID;\n\t\tthis.procURI =... | import static org.assertj.core.api.Assertions.assertThat;
import java.util.Collection;
import org.junit.Test;
import ch.rasc.wampspring.message.CallMessage;
import ch.rasc.wampspring.message.PublishMessage;
import ch.rasc.wampspring.message.SubscribeMessage;
import ch.rasc.wampspring.message.UnsubscribeMessage;
import ... | /**
* Copyright 2014-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... | SubscribeMessage sm = new SubscribeMessage("proc"); | 2 |
lemberg/d8androidsdk | sample/src/main/java/com/ls/drupal8demo/adapters/CategoryArticlesListAdapter.java | [
"public abstract class AbstractBaseDrupalEntity implements DrupalClient.OnResponseListener, ICharsetItem\n{\n\ttransient private DrupalClient drupalClient; \n\n\ttransient private Snapshot snapshot;\n\n\t/**\n\t * In case of request canceling - no method will be triggered.\n\t * \n\t * @author lemberg\n\t * \n\t */... | import com.android.volley.RequestQueue;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.ImageLoader.ImageCache;
import com.android.volley.toolbox.Volley;
import com.ls.drupal.AbstractBaseDrupalEntity;
import com.ls.drupal.AbstractBaseDrupalEntity.O... | /**
* The MIT License (MIT)
* Copyright (c) 2014 Lemberg Solutions Limited
* 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
*... | DrupalImageView imageView = (DrupalImageView) convertView.findViewById(R.id.image); | 7 |
tecsinapse/tecsinapse-data-io | src/main/java/br/com/tecsinapse/dataio/type/FileType.java | [
"public static final String MIME_XLS = \"application/vnd.ms-excel\";",
"public static final String MIME_XLSM = \"application/vnd.ms-excel.sheet.macroEnabled.12\";",
"public static final String MIME_XLSX = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";",
"public static final String MSG_... | import static br.com.tecsinapse.dataio.util.Constants.MIME_XLS;
import static br.com.tecsinapse.dataio.util.Constants.MIME_XLSM;
import static br.com.tecsinapse.dataio.util.Constants.MIME_XLSX;
import static br.com.tecsinapse.dataio.util.Constants.MSG_IGNORED;
import java.io.IOException;
import java.io.InputStream;
imp... | /*
* Tecsinapse Data Input and Output
*
* License: GNU Lesser General Public License (LGPL), version 3 or later
* See the LICENSE file in the root directory or <http://www.gnu.org/licenses/lgpl-3.0.html>.
*/
package br.com.tecsinapse.dataio.type;
@Getter
@AllArgsConstructor
public enum FileType {
| XLS("MS Excel file (.xls)", MIME_XLS, ".xls") { | 0 |
cloud-software-foundation/c5-replicator | c5-replicator-log/src/test/java/c5db/log/LogFileServiceTest.java | [
"public class C5CommonTestUtil {\n protected static final Logger LOG = LoggerFactory.getLogger(C5CommonTestUtil.class);\n\n public C5CommonTestUtil() {\n }\n\n /**\n * System property key to get base test directory value\n */\n public static final String BASE_TEST_DIRECTORY_KEY =\n \"test.build.data.b... | import c5db.C5CommonTestUtil;
import c5db.MiscMatchers;
import c5db.interfaces.replication.QuorumConfiguration;
import c5db.log.generated.OLogHeader;
import c5db.replication.generated.QuorumConfigurationMessage;
import c5db.util.CheckedSupplier;
import com.google.common.collect.Iterables;
import com.google.common.primi... | /*
* Copyright 2014 WANdisco
*
* WANdisco licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | List<ByteBuffer> buffers = encodeWithLengthAndCrc(OLogHeader.getSchema(), header); | 4 |
PreibischLab/BigStitcher | src/main/java/net/preibisch/stitcher/gui/popup/RefineWithICPPopup.java | [
"public class SpimDataFilteringAndGrouping < AS extends AbstractSpimData< ? > >\n{\n\n\tpublic static List<Class<? extends Entity>> entityClasses = new ArrayList<>();\n\tstatic \n\t{\n\t\tentityClasses.add( TimePoint.class );\n\t\tentityClasses.add( Channel.class );\n\t\tentityClasses.add( Illumination.class );\n\t... | import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import mpicbg.spim.data.generic.AbstractSpimData;
import mpicbg.spim.data.generic.sequence.AbstractSequenceDe... | /*-
* #%L
* Multiview stitching of large datasets.
* %%
* Copyright (C) 2016 - 2021 Big Stitcher developers.
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
... | DemoLinkOverlay overlay; | 1 |
i2p/i2p.itoopie | src/net/i2p/itoopie/i2pcontrol/methods/GetI2PControl.java | [
"public class InvalidParametersException extends Exception {\n\n\t/**\n\t * Signifies that the paramers we sent were invalid for the used JSONRPC2\n\t * method.\n\t */\n\tprivate static final long serialVersionUID = 4044188679464846005L;\n\n}",
"public class InvalidPasswordException extends Exception {\n\n\t/**\n... | import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import net.i2p.itoopie.i2pcontrol.InvalidParametersException;
import net.i2p.itoopie.i2pcontrol.InvalidPassword... | package net.i2p.itoopie.i2pcontrol.methods;
public class GetI2PControl {
public static EnumMap<I2P_CONTROL, Object> execute(I2P_CONTROL ... settings)
throws InvalidPasswordException, JSONRPC2SessionException{
| JSONRPC2Request req = new JSONRPC2Request("I2PControl", JSONRPC2Interface.incrNonce()); | 2 |
cfg4j/cfg4j | cfg4j-core/src/test/java/org/cfg4j/source/classpath/ClasspathConfigurationSourceTest.java | [
"public class DefaultEnvironment extends ImmutableEnvironment {\n /**\n * Constructs environment named \"\" (empty string).\n */\n public DefaultEnvironment() {\n super(\"\");\n }\n\n @Override\n public String toString() {\n return \"DefaultEnvironment{}\";\n }\n}",
"public interface Environment {... | import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import org.assertj.core.data.MapEntry;
import org.cfg4j.source.context.environment.DefaultEnvironment;
import org... | /*
* Copyright 2015-2018 Norbert Potocki (norbert.potocki@nort.pl)
*
* 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 ... | assertThat(source.getConfiguration(new DefaultEnvironment())).containsOnlyKeys("some.setting", "otherConfig.setting"); | 0 |
maofw/anetty_client | src/com/netty/client/android/handler/NettyProcessorHandler.java | [
"public class ClientBroadcastReceiver extends BroadcastReceiver {\n\t// 消息通知\n\tpublic static final String NOTIFICATION_ACTION = \"com.netty.NOTIFICATION\";\n\t// 注册成功广播通知\n\tpublic static final String REG_ACTION = \"com.netty.REG\";\n\n\t@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\ttry... | import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.widget.Toast;
import com.netty.client.android.broadcast.ClientBroadcastReceiver;
import com.netty.client.android.listener.INettyHandlerListener;
import com.netty.c... | package com.netty.client.android.handler;
public class NettyProcessorHandler extends Handler {
public static final int REGISTRATION_RESULT = 100;
public static final int DEVICE_ONLINE_RESULT = 101;
public static final int DEVICE_OFFLINE_RESULT = 102;
public static final int MESSAGE = 103;
private Context conte... | INettyHandlerListener listener = applicationContextClient.getNettyHandlerListener(mo.getAppPackage(), msg.what); | 1 |
azinik/ADRMine | release/v1/java_src/ADRMine/src/main/java/edu/asu/diego/adrmine/features/TokenClauseFeatures.java | [
"public class Negation {\n\t\n\tstatic ArrayList<String> modifier_rels = new ArrayList<String>(Arrays.asList(\"det\",\"neg\",\"amod\",\"advmod\",\"dep\",\"nn\",\"prep\"));\n\t\n\tpublic static ArrayList<String> getNegationModifierRelations()\n\t{\n\t\treturn modifier_rels;\n\t}\n\tpublic static boolean isWordNegate... | import java.util.List;
import edu.asu.diego.adrmine.utils.Negation;
import rainbownlp.core.Artifact;
import rainbownlp.core.FeatureValuePair;
import rainbownlp.core.FeatureValuePair.FeatureName;
import rainbownlp.machineLearning.IFeatureCalculator;
import rainbownlp.machineLearning.MLExample;
import rainbownlp.machineL... | /**
*
*/
package edu.asu.diego.adrmine.features;
/**
* @author Azadeh
*
*/
public class TokenClauseFeatures implements IFeatureCalculator {
public static void main (String[] args) throws Exception
{
// String experimentgroup = TokenSequenceExampleBuilder.ExperimentGroupADRConcepts;
String experim... | FeatureValuePair is_negated_feature = FeatureValuePair.getInstance | 2 |
mariok/pinemup | src/main/java/net/sourceforge/pinemup/ui/swing/tray/TrayMenu.java | [
"public final class CategoryManager {\n /** The pinboard, which contains all notes. **/\n private PinBoard pinBoard = new PinBoard();\n\n /** Listeners, which will be added per default to new notes. **/\n private final Collection<NoteChangedEventListener> defaultNoteChangedEventListeners = new LinkedList<>(... | import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.pinemup.core.CategoryManager;
import net.sourceforge.pinemup.core.i18n.I18N;
import net.sourceforge.pinemup.core.model.Category;
import net.sourceforge.pinemup.ui.swing.menus.logic.CategoryMenu... | /*
* pin 'em up
*
* Copyright (C) 2007-2013 by Mario Ködding
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version... | for (Category cat : CategoryManager.getInstance().getCategories()) { | 2 |
synapticloop/routemaster | src/main/java/synapticloop/nanohttpd/servant/StaticFileServant.java | [
"public abstract class Handler {\n\t/**\n\t * Return whether this handler can serve the requested URI\n\t * \n\t * @param uri the URI to check\n\t * \n\t * @return whether this handler can serve the requested URI\n\t */\n\tpublic abstract boolean canServeUri(String uri);\n\t\n\t/**\n\t * If the handler can serve th... | import fi.iki.elonen.NanoHTTPD;
import fi.iki.elonen.NanoHTTPD.IHTTPSession;
import fi.iki.elonen.NanoHTTPD.Response;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
import synapticloop.nanohttpd.handler.Handle... | package synapticloop.nanohttpd.servant;
/*
* Copyright (c) 2013-2020 synapticloop.
*
* All rights reserved.
*
* This source code and any derived binaries are covered by the terms and
* conditions of the Licence agreement ("the Licence"). You may not use this
* source code or any derived binaries except in com... | public Response serve(File rootDir, IHTTPSession httpSession) { | 7 |
dima767/inspektr | inspektr-audit/src/main/java/com/github/inspektr/audit/AuditTrailManagementAspect.java | [
"public interface AuditActionResolver {\n\t\n\n /**\n * Resolve the action for the audit event.\n * \n * @param auditableTarget\n * @param retval\tThe returned value\n * @param audit the Audit annotation that may contain additional information.\n * @return\tThe resource String\n */\n ... | import com.github.inspektr.common.spi.PrincipalResolver;
import com.github.inspektr.common.spi.ClientInfoResolver;
import com.github.inspektr.common.spi.DefaultClientInfoResolver;
import com.github.inspektr.common.web.ClientInfo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.aspectj.lan... | /**
* Licensed to Inspektr under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Inspektr licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file
* except... | private ClientInfoResolver clientInfoResolver = new DefaultClientInfoResolver(); | 3 |
bitcraze/crazyflie-android-client | src/se/bitcraze/crazyfliecontrol/bootloader/BootloaderActivity.java | [
"public class BootVersion {\n\n public final static int CF1_PROTO_VER_0 = 0x00;\n public final static int CF1_PROTO_VER_1 = 0x01;\n public final static int CF2_PROTO_VER = 0x10;\n\n public static String toVersionString(int ver) {\n if (ver == BootVersion.CF1_PROTO_VER_0 || ver == BootVersion.CF1_... | import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import jav... | int fileLength = connection.getContentLength();
// download the file
File outputFile = new File(BootloaderActivity.this.getExternalFilesDir(null) + "/" + BootloaderActivity.BOOTLOADER_DIR + "/" + tagName + "/", fileName);
outputFile.getParentFile().mkdirs... | mBootloader = new Bootloader(new RadioDriver(new UsbLinkAndroid(BootloaderActivity.this))); | 6 |
icecondor/android | src/com/icecondor/nest/service/AlarmReceiver.java | [
"public class Condor extends Service {\n\n private Client api;\n private boolean clientAuthenticated;\n private String authApiCall;\n private Database db;\n private Prefs prefs;\n private PendingIntent wake_alarm_intent;\n private AlarmManager alarmManager;\n private BatteryReceiver batteryR... | import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.util.Log;
import com.icecondor.nest.Condor;
import com.icecondor.nest.Constants;
import com.icecondor.nest.Prefs;
import com.icecondor.ne... | package com.icecondor.nest.service;
public class AlarmReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// can we always assume context is Condor?
Condor condor = (Condor)context;
String action = intent.getAction();
if (ac... | GpsLocation lastLocation = condor.getLastLocation(); | 3 |
SEMERU-WM/ChangeScribe | CommitSummarizer/CommitSummarizer.core/src/main/java/co/edu/unal/colswe/changescribe/core/textgenerator/phrase/NounPhrase.java | [
"public class Constants {\n\n\tpublic static final String RENAME = \"RENAME\";\n\tpublic static final String TREE = \"^{tree}\";\n\tpublic static final String DELETE = \"DELETE\";\n\tpublic static final String REMOVE = \"REMOVE\";\n\tpublic static final String ADD = \"ADD\";\n\tpublic static final String MODIFY = \... | import java.util.LinkedList;
import java.util.List;
import co.edu.unal.colswe.changescribe.core.Constants;
import co.edu.unal.colswe.changescribe.core.textgenerator.phrase.util.StringUtils;
import co.edu.unal.colswe.changescribe.core.textgenerator.pos.POSTagger;
import co.edu.unal.colswe.changescribe.core.textgenerator... | package co.edu.unal.colswe.changescribe.core.textgenerator.phrase;
public class NounPhrase extends Phrase {
private StringBuilder phrase;
private List<Parameter> parameters;
private String connector;
private StringBuilder complementPhrase;
public NounPhrase(String name) { | super(POSTagger.tag(Tokenizer.split(name))); | 4 |
ashqal/NightOwl | app/src/main/java/com/asha/nightowl/MainApplication.java | [
"@OwlHandle(CardView.class)\npublic class CardViewHandler extends AbsSkinHandler implements OwlCustomTable.OwlCardView {\n\n @Override\n protected void onAfterCollect(View view, Context context, AttributeSet attrs, ColorBox box) {\n Object[] objects = box.get(R.styleable.NightOwl_CardView_night_cardBac... | import android.app.Activity;
import android.app.Application;
import android.content.SharedPreferences;
import android.support.v4.content.SharedPreferencesCompat;
import com.asha.nightowl.custom.CardViewHandler;
import com.asha.nightowl.custom.CollapsingToolbarLayoutHandler;
import com.asha.nightowl.custom.OwlCustomTabl... | package com.asha.nightowl;
/**
* Created by hzqiujiadi on 15/11/6.
* hzqiujiadi ashqalcn@gmail.com
*/
public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
SharedPreferences preferences = getSharedPreferences("NightOwlDemo",Activity.MODE_P... | NightOwl.owlRegisterHandler(ToolbarHandler.class, OwlCustomTable.OwlToolbar.class); | 4 |
TeamCohen/SEAL | src/com/rcwang/seal/expand/IterativeSeal.java | [
"public class EvalResult {\r\n public int trialID = 0;\r\n public int numGoldEntity = 0;\r\n public int numGoldSynonym = 0;\r\n public double numCorrectSynonym = 0;\r\n public double numCorrectEntity = 0;\r\n public double numResultsAboveThreshold = 0;\r\n public double maxF1Precision = 0;\r\n public double... | import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.log4j.Logger;
import com.rcwang.seal.eval.EvalResult;
import com.rcwang.seal.eval.Evaluator;
import com.rcwang.seal.fetch.DocumentSet;
import com.rcwang.seal.rank.Ranker.Feature;
import com.rcwang... | /**************************************************************************
* Developed by Language Technologies Institute, Carnegie Mellon University
* Written by Richard Wang (rcwang#cs,cmu,edu)
**************************************************************************/
package com.rcwang.seal.expand;
... | public static GlobalVar gv = GlobalVar.getGlobalVar();
| 4 |
nimble-platform/identity-service | identity-service/src/test/java/eu/nimble/core/infrastructure/identity/config/DefaultTestConfiguration.java | [
"@Service\r\n@SuppressWarnings(\"Duplicates\")\r\npublic class EmailService {\r\n\r\n private static final Logger logger = LoggerFactory.getLogger(EmailService.class);\r\n\r\n @Autowired\r\n private JavaMailSender emailSender;\r\n\r\n @Autowired\r\n private UblUtils ublUtils;\r\n\r\n @Autowired\r\... | import eu.nimble.core.infrastructure.identity.mail.EmailService;
import eu.nimble.core.infrastructure.identity.service.IdentityService;
import eu.nimble.core.infrastructure.identity.entity.UaaUser;
import eu.nimble.core.infrastructure.identity.uaa.KeycloakAdmin;
import eu.nimble.core.infrastructure.identity.uaa.OAuthCl... | package eu.nimble.core.infrastructure.identity.config;
/**
* Created by Johannes Innerbichler on 09.08.18.
*/
@Profile("test")
@TestConfiguration
public class DefaultTestConfiguration {
@Bean
@Primary
public IdentityService identityResolver() throws IOException {
IdentityService identityServ... | public OAuthClient oAuthClient() { | 4 |
noctarius/castmapr | src/main/java/com/noctarius/castmapr/core/operation/IListMapReduceOperation.java | [
"public class CollectorImpl<Key, Value>\n implements Collector<Key, Value>\n{\n\n public final Map<Key, List<Value>> emitted = new HashMap<Key, List<Value>>();\n\n @Override\n public void emit( Key key, Value value )\n {\n List<Value> values = emitted.get( key );\n if ( values == null )... | import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.hazelcast.collection.CollectionContainer;
import com.hazelcast.collection.CollectionProxyId;
import com.hazelcast.collection.CollectionProxyType;
import com.hazelcast.collection.Col... | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed u... | Reducer<KeyOut, ValueOut> reducer ) | 4 |
christ66/cobertura | cobertura/src/main/java/net/sourceforge/cobertura/instrument/CoberturaInstrumenter.java | [
"@CoverageIgnore\npublic class ProjectData extends CoverageDataContainer {\n\tprivate static final Logger logger = Logger.getLogger(ProjectData.class\n\t\t\t.getCanonicalName());\n\tprivate static final long serialVersionUID = 6;\n\n\tprivate static ProjectData globalProjectData = null;\n\n\tprivate static Thread s... | import net.sourceforge.cobertura.util.IOUtil;
import org.apache.log4j.Logger;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.util.CheckClassAdapter;
import java.io.*;
import java.util.*;
import java.util.regex.Pattern;
import n... | /*
* Cobertura - http://cobertura.sourceforge.net/
*
* Copyright (C) 2011 Piotr Tabor
*
* Note: This file is dual licensed under the GPL and the Apache
* Source License (so that it can be used from both the main
* Cobertura classes and the ant tasks).
*
* Cobertura is free software; you can redistribute it and... | InjectCodeClassInstrumenter cv2 = new InjectCodeClassInstrumenter( | 3 |
Atmosphere/wasync | wasync/src/main/java/org/atmosphere/wasync/serial/SerialSocketRuntime.java | [
"public class FunctionWrapper {\n\n private final String functionName;\n private final Function<?> function;\n\n public FunctionWrapper(String functionName, Function<?> function) {\n this.functionName = functionName;\n this.function = function;\n }\n\n public Function<?> function(){\n ... | import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.util.concurrent.SettableFuture;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.util.List;
import org.asynchttpclient.Response;
import org.atmosphere.wasync.FunctionWrapper;
import org.atmosphere... | /*
* Copyright 2008-2022 Async-IO.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 t... | public SerialSocketRuntime(Transport transport, Options options, DefaultFuture rootFuture, SerializedSocket serializedSocket, List<FunctionWrapper> functions) { | 0 |
tteguayco/JITRAX | src/es/ull/etsii/jitrax/database/DatabaseComparator.java | [
"public class Attribute {\n\n\tprivate String name;\n\tprivate DataType dataType;\n\t\n\tpublic Attribute(String aName, DataType aDataType) {\n\t\tname = aName;\n\t\tdataType = aDataType;\n\t}\n\t\n\tpublic boolean equals(Object object) {\n\t\tif (object != null && object instanceof Attribute) {\n\t\t\tAttribute an... | import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import es.ull.etsii.jitrax.adt.Attribute;
import es.ull.etsii.jitrax.adt.DataType;
import es.ull.etsii.jitrax.adt.Databa... |
// Getting the number of rows returned (number of attributes in the current table)
// and storing it in the 'numberOfAttributesForRemote'
if (attrResultSet != null) {
attrResultSet.beforeFirst();
attrResultSet.last();
numberOfAttributesForRemote = attrResultSet.getRow();
... | Row newRow = null; | 4 |
xpush/lib-xpush-android | sample/src/main/java/io/xpush/sampleChat/fragments/ChatFragment.java | [
"public class Constants {\n public static final int REQUEST_SIGNUP = 100;\n\n public static final int REQUEST_EDIT_IMAGE = 111;\n public static final int REQUEST_EDIT_NICKNAME = 112;\n public static final int REQUEST_EDIT_STATUS_MESSAGE = 113;\n\n public static final int REQUEST_INVITE_USER = 201;\n\... | import android.app.Activity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
impo... | package io.xpush.sampleChat.fragments;
public class ChatFragment extends XPushChatFragment {
public static final String TAG = ChatFragment.class.getSimpleName();
@Bind(R.id.action_chat_plus)
ImageView mChatPlus;
@Bind(R.id.hidden_panel)
RelativeLayout mHiddenPannel;
@Bind(R.id.grid_chat_... | Intent intent = new Intent(mActivity, SelectFriendActivity.class); | 8 |
christophersmith/summer-mqtt | summer-mqtt-paho/src/test/java/com/github/christophersmith/summer/mqtt/paho/service/AutomaticReconnectTest.java | [
"public enum MqttClientConnectionType\n{\n /**\n * Represents a connection type that can only publish messages.\n */\n PUBLISHER,\n /**\n * Represents a connection type that can both publish and receive messages.\n */\n PUBSUB,\n /**\n * Rep... | import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.netcrusher.core.reactor.NioReactor;
import org.netcrusher.tcp.TcpCrushe... | /*******************************************************************************
* Copyright (c) 2019 Christopher Smith - https://github.com/christophersmith
*
* 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 ... | MqttQualityOfService.QOS_0); | 1 |
gejiaheng/Protein | app/src/main/java/com/ge/protein/comment/CommentListRepository.java | [
"public final class ApiConstants {\n\n private ApiConstants() {\n throw new AssertionError(\"No construction for constant class\");\n }\n\n // general constants of Dribbble API\n public static final String DRIBBBLE_V1_BASE_URL = \"https://api.dribbble.com\";\n public static final String DRIBBB... | import com.ge.protein.data.api.ApiConstants;
import com.ge.protein.data.api.ServiceGenerator;
import com.ge.protein.data.api.service.ShotsService;
import com.ge.protein.data.model.Comment;
import com.ge.protein.util.AccountManager;
import java.util.List;
import io.reactivex.Observable;
import retrofit2.Response; | /*
* Copyright 2017 Jiaheng Ge
*
* 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 ... | Observable<Response<List<Comment>>> getCommentsForShot(long shotId) { | 3 |
Sefford/material-in-30-minutes | app/src/main/java/com/sefford/material/sample/contacts/details/ui/presenters/ContactDetailPresenter.java | [
"@Module(injects = {ContactListActivity.class,\n ContactDetailsActivity.class},\n library = true,\n complete = false)\npublic class LocalBusModule {\n\n public static final String LOCAL_BUS = \"Local\";\n\n @Singleton\n @Provides\n @Named(LOCAL_BUS)\n public Bus provideLocalBus(B... | import com.sefford.material.sample.common.injection.modules.LocalBusModule;
import com.sefford.material.sample.common.internal.Bus;
import com.sefford.material.sample.contacts.details.interactors.GetContact;
import com.sefford.material.sample.contacts.details.responses.GetContactResponse;
import com.sefford.material.sa... | /*
* Copyright (C) 2015 Saúl Díaz
*
* 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 GetContact getContact; | 2 |
kwon37xi/hibernate4-memcached | hibernate4-memcached-core/src/main/java/kr/pe/kwonnam/hibernate4memcached/regions/EntityMemcachedRegion.java | [
"public class CacheNamespace implements Serializable {\n /**\n * name of region\n */\n private String name;\n\n /**\n * if this value is true, the memcached adapter should implement namespace pattern\n * or ignore namespace pattern.\n * <p/>\n * see <a href=\"https://code.google.com... | import kr.pe.kwonnam.hibernate4memcached.memcached.CacheNamespace;
import kr.pe.kwonnam.hibernate4memcached.memcached.MemcachedAdapter;
import kr.pe.kwonnam.hibernate4memcached.strategies.NonstrictReadWriteEntityRegionAccessStrategy;
import kr.pe.kwonnam.hibernate4memcached.strategies.ReadOnlyEntityRegionAccessStrategy... | package kr.pe.kwonnam.hibernate4memcached.regions;
/**
* @author KwonNam Son (kwon37xi@gmail.com)
*/
public class EntityMemcachedRegion extends TransactionalDataMemcachedRegion implements EntityRegion {
public EntityMemcachedRegion(String regionName, OverridableReadOnlyProperties properties, CacheDataDescriptio... | super(new CacheNamespace(regionName, true), properties, metadata, settings, memcachedAdapter, hibernateCacheTimestamper); | 0 |
gyf-dev/ImmersionBar | immersionbar-sample/src/main/java/com/gyf/immersionbar/sample/activity/DialogActivity.java | [
"@TargetApi(Build.VERSION_CODES.KITKAT)\npublic final class ImmersionBar implements ImmersionCallback {\n\n private final Activity mActivity;\n private Fragment mSupportFragment;\n private android.app.Fragment mFragment;\n private Dialog mDialog;\n private Window mWindow;\n private ViewGroup mDeco... | import android.content.DialogInterface;
import android.content.res.Configuration;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.I... | package com.gyf.immersionbar.sample.activity;
/**
* @author geyifeng
* @date 2017/7/31
*/
public class DialogActivity extends BaseActivity implements DialogInterface.OnDismissListener {
@BindView(R.id.btn_full_fragment)
Button btnFullFragment;
@BindView(R.id.btn_top_fragment)
Button btnTopFragm... | TopDialogFragment fullDialogFragment = new TopDialogFragment(); | 6 |
reelyactive/ble-android-sdk | library/src/main/java/com/reelyactive/blesdk/application/ReelyAwareApplicationCallback.java | [
"public class BleService extends Service {\n public static final String KEY_FILTER = \"filter\";\n public static final String KEY_EVENT_DATA = \"event_data\";\n final ScanCallback callback = new ScanCallback();\n final ScanSettings lowPowerScan = new ScanSettings.Builder() //\n .setCallbackTy... | import android.Manifest;
import android.app.Activity;
import android.app.Application;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.IBinde... | package com.reelyactive.blesdk.application;
/**
* This class provides a convenient way to make your application aware of any Reelceivers.
* <p>
* Register it using {@link android.app.Application#registerActivityLifecycleCallbacks(Application.ActivityLifecycleCallbacks)}<br/>
* <p>
* Extend it to customize the ... | ((ReelyAwareActivity) getCurrentActivity()).onEnterRegion((ScanResult) data); | 3 |
syvaidya/openstego | src/main/java/com/openstego/desktop/plugin/dwtdugad/DWTDugadPlugin.java | [
"public class OpenStegoException extends Exception {\n private static final long serialVersionUID = 668241029491685413L;\n\n /**\n * Error Code - Unhandled exception\n */\n static final int UNHANDLED_EXCEPTION = 0;\n\n /**\n * Map to store error code to message key mapping\n */\n priv... | import com.openstego.desktop.OpenStegoException;
import com.openstego.desktop.plugin.template.image.WMImagePluginTemplate;
import com.openstego.desktop.util.ImageHolder;
import com.openstego.desktop.util.ImageUtil;
import com.openstego.desktop.util.LabelUtil;
import com.openstego.desktop.util.StringUtil;
import com.ope... | /*
* Steganography utility to hide messages into cover files
* Author: Samir Vaidya (mailto:syvaidya@gmail.com)
* Copyright (c) Samir Vaidya
*/
package com.openstego.desktop.plugin.dwtdugad;
/**
* Plugin for OpenStego which implements the DWT based algorithm by Dugad.
* <p>
* This class is based on the code ... | ImageHolder image; | 2 |
comtel2000/mokka7 | mokka7-samples/src/main/java/org/comtel2000/mokka7/clone/HearbeatSample2.java | [
"public abstract class ClientRunner {\n\n protected static byte[] buffer = new byte[1024];\n\n protected static final Logger logger = LoggerFactory.getLogger(ClientRunner.class);\n\n private static final String host = \"127.0.0.1\";\n private static final int rack = 0;\n private static final int slot... | import java.util.Arrays;
import org.comtel2000.mokka7.ClientRunner;
import org.comtel2000.mokka7.S7Client;
import org.comtel2000.mokka7.type.AreaType;
import org.comtel2000.mokka7.type.DataType;
import org.comtel2000.mokka7.util.S7; | /*
* PROJECT Mokka7 (fork of Snap7/Moka7)
*
* Copyright (c) 2017 J.Zimmermann (comtel2000)
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
* http://www.eclipse.o... | public void call(S7Client client) throws Exception { | 1 |
nichbar/Aequorea | app/src/main/java/nich/work/aequorea/presenter/SearchPresenter.java | [
"public class FilterUtils {\n public static boolean underSupport(String type) {\n return !((Constants.ARTICLE_TYPE_THEME.equals(type)) || (Constants.ARTICLE_TYPE_MAGAZINE.equals(type)) || (Constants.ARTICLE_TYPE_MAGAZINE_V2.equals(type)) || (Constants.ARTICLE_TYPE_SUBJECT.equals(type)));\n }\n \n ... | import java.util.ArrayList;
import java.util.List;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import nich.work.aequorea.R;
import nich.work.aequorea.common.utils.FilterUtils;
import nich.work.aequorea.common.utils.NetworkU... | package nich.work.aequorea.presenter;
public class SearchPresenter extends SimpleArticleListPresenter {
@Override
public void load() {
if (!NetworkUtils.isNetworkAvailable()) {
onError(new Throwable(getString(R.string.please_connect_to_the_internet)));
return;
}
... | if (FilterUtils.underSupport(content.getArticleType())) { | 0 |
grennis/MongoExplorer | app/src/main/java/com/innodroid/mongobrowser/ui/DocumentDetailFragment.java | [
"public class Events {\n public static void postAddConnection() {\n EventBus.getDefault().post(new AddConnection());\n }\n\n public static void postConnectionSelected(long connectionID) {\n EventBus.getDefault().post(new ConnectionSelected(connectionID));\n }\n\n public static void post... | import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.innodroid.mongobrowser.Ev... | package com.innodroid.mongobrowser.ui;
public class DocumentDetailFragment extends BaseFragment {
@Bind(R.id.document_detail_content) TextView mContentText;
private String mRawText;
public DocumentDetailFragment() {
}
@NonNull
public static DocumentDetailFragment newInstance(int collectionIndex, int ... | Events.postEditDocument(getArguments().getInt(Constants.ARG_DOCUMENT_INDEX)); | 0 |
NuVotifier/NuVotifier | common/src/test/java/com/vexsoftware/votifier/net/protocol/VotifierProtocol2DecoderTest.java | [
"public interface VotifierPlugin extends VoteHandler {\n AttributeKey<VotifierPlugin> KEY = AttributeKey.valueOf(\"votifier_plugin\");\n\n Map<String, Key> getTokens();\n\n KeyPair getProtocolV1Key();\n\n LoggingAdapter getPluginLogger();\n\n VotifierScheduler getScheduler();\n\n default boolean i... | import com.google.gson.JsonObject;
import com.vexsoftware.votifier.platform.VotifierPlugin;
import com.vexsoftware.votifier.model.Vote;
import com.vexsoftware.votifier.net.VotifierSession;
import com.vexsoftware.votifier.util.GsonInst;
import com.vexsoftware.votifier.util.KeyCreator;
import io.netty.channel.embedded.Em... | package com.vexsoftware.votifier.net.protocol;
public class VotifierProtocol2DecoderTest {
private static final VotifierSession SESSION = new VotifierSession();
private EmbeddedChannel createChannel() {
EmbeddedChannel channel = new EmbeddedChannel(new VotifierProtocol2Decoder());
channel.a... | channel.attr(VotifierPlugin.KEY).set(TestVotifierPlugin.getI()); | 0 |
sastix/cms | common/services/src/test/com/sastix/cms/common/services/ApiVersionControllerTest.java | [
"public interface Constants {\n\n /**\n * Rest API Version.\n */\n static String REST_API_1_0 = \"1.0\";\n String GET_API_VERSION = \"/apiversion\";\n String DEFAULT_LANGUAGE = \"en\";\n\n /**\n * CONTENT API ENDPOINTS\n */\n static String CREATE_RESOURCE = \"createResource\";\n ... | import com.sastix.cms.common.Constants;
import com.sastix.cms.common.dataobjects.VersionDTO;
import com.sastix.cms.common.services.api.ApiVersionService;
import com.sastix.cms.common.services.api.ApiVersionServiceImpl;
import com.sastix.cms.common.services.web.ApiVersionController;
import org.junit.Test;
import org.jun... | /*
* Copyright(c) 2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... | ApiVersionService service; | 2 |
nodebox/nodebox | src/main/java/nodebox/client/Application.java | [
"public class Log {\n private static final Logger LOGGER = java.util.logging.Logger.getGlobal();\n\n static {\n try {\n // Initialize logging directory\n AppDirs.ensureUserLogDir();\n File logDir = AppDirs.getUserLogDir();\n\n // Initialize file logging\n ... | import nodebox.Log;
import nodebox.node.NodeLibrary;
import nodebox.node.NodeRepository;
import nodebox.ui.ExceptionDialog;
import nodebox.ui.LastResortHandler;
import nodebox.ui.Platform;
import nodebox.ui.ProgressDialog;
import nodebox.versioncheck.Host;
import nodebox.versioncheck.Updater;
import nodebox.versionchec... | /*
* This file is part of NodeBox.
*
* Copyright (C) 2008 Frederik De Bleser (frederik@pandora.be)
*
* NodeBox 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 ... | Thread.currentThread().setUncaughtExceptionHandler(new LastResortHandler()); | 1 |
holmes-org/holmes-validation | src/main/java/org/holmes/HolmesEngine.java | [
"public class BooleanEvaluator extends ObjectEvaluator<Boolean> {\n\n\tpublic BooleanEvaluator(Boolean target) {\n\n\t\tsuper(target);\n\t}\n\n\t/**\n\t * Ensures that the {@link Boolean} target is not null and it's logical value is TRUE.\n\t * \n\t * @return an instance of {@link Joint} class\n\t */\n\tpublic Join... | import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.holmes.evaluator.BooleanEvaluator;
import org.holmes.evaluator.CollectionEvaluator;
import org.holmes.evaluator.DateEvaluator;
import org.holmes.evaluator.NumberEvaluator;
import org.holmes.evaluator.Object... | package org.holmes;
/**
* The main class of the framework.
*
* @author diegossilveira
*/
public class HolmesEngine {
private final List<Rule> rules;
private final ResultCollector collector;
private MessageResolver messageResolver;
private String defaultViolationDescriptor;
private HolmesEngine(Result... | public BooleanEvaluator ensureThat(final Boolean bool) { | 0 |
alda-lang/alda-client-java | src/alda/repl/commands/ReplDownUp.java | [
"public class AldaScore {\n @SerializedName(\"chord-mode\")\n public Boolean chordMode;\n @SerializedName(\"current-instruments\")\n public Set<String> currentInstruments;\n\n public Map<String, Set<String>> nicknames;\n\n /**\n * Returns the current instruments if possible\n * @return null if not possibl... | import alda.AldaResponse.AldaScore;
import alda.AldaServer;
import alda.error.AlreadyUpException;
import alda.error.InvalidOptionsException;
import alda.error.NoResponseException;
import alda.error.SystemException;
import alda.repl.AldaRepl;
import java.util.function.Consumer;
import jline.console.ConsoleReader; | package alda.repl.commands;
public class ReplDownUp implements ReplCommand {
@Override | public void act(String args, StringBuffer history, AldaServer server, | 1 |
vbauer/jconditions | src/test/java/com/github/vbauer/jconditions/annotation/AbstractAnnotationsTest.java | [
"public class IfJavaVersionChecker implements ConditionChecker<IfJavaVersion> {\n\n private static final String PROPERTY_JAVA_VERSION = \"java.version\";\n\n\n /**\n * {@inheritDoc}\n */\n @Override\n public boolean isSatisfied(final CheckerContext<IfJavaVersion> context) {\n final IfJava... | import com.github.vbauer.jconditions.checker.IfJavaVersionChecker;
import com.github.vbauer.jconditions.core.CheckerContext;
import com.github.vbauer.jconditions.core.ConditionChecker;
import com.github.vbauer.jconditions.misc.Always;
import com.github.vbauer.jconditions.misc.AppleWorksFine;
import com.github.vbauer.jc... | package com.github.vbauer.jconditions.annotation;
/**
* @author Vladislav Bauer
*/
@Ignore
public abstract class AbstractAnnotationsTest implements InterfaceAnnotationsTest {
@SuppressWarnings("all")
private final boolean isSatisfiedInnerCheck = false;
@Test
@RunIf(ExceptionClass.class)
pub... | @IgnoreIf(Always.class) | 3 |
KeithYokoma/LGTMCamera | app/src/main/java/jp/yokomark/lgtm/app/compose/model/ComposeStateHolder.java | [
"public class ComposeData implements Parcelable {\n public static final Creator<ComposeData> CREATOR = new Creator<ComposeData>() {\n @Override\n @Nullable\n public ComposeData createFromParcel(Parcel source) {\n return new ComposeData(source);\n }\n\n @Override\n ... | import android.app.LoaderManager;
import android.content.Context;
import android.content.Loader;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.net.Uri;
import android.os.Bundle;
import com.amalgam.os.BundleUtils;
import com.anprosit.android.dagger.annotation.ForActivity;
import com.anpro... | package jp.yokomark.lgtm.app.compose.model;
/**
* @author yokomakukeishin
* @version 1.0.0
* @since 1.0.0
*/
public class ComposeStateHolder extends AbstractModel implements LoaderManager.LoaderCallbacks<Uri> {
public static final String TAG = ComposeStateHolder.class.getSimpleName();
private static fi... | return new SaveImageTask(getContext(), bitmap); | 2 |
PaulNoth/saral | src/main/java/com/pidanic/saral/domain/ArrayDeclaration.java | [
"public abstract class Expression {\n private Type type;\n\n public Expression(Type type) {\n this.type = type;\n }\n\n public Type type() {\n return type;\n }\n\n public abstract void accept(ExpressionGenerator generator);\n}",
"public class CastExpression extends UnaryExpression ... | import com.pidanic.saral.domain.expression.Expression;
import com.pidanic.saral.domain.expression.cast.CastExpression;;
import com.pidanic.saral.generator.SimpleStatementGenerator;
import com.pidanic.saral.generator.StatementGenerator;
import com.pidanic.saral.util.BuiltInType;
import com.pidanic.saral.util.Type; | package com.pidanic.saral.domain;
public class ArrayDeclaration implements SimpleStatement {
private Type type; | private Expression length; | 0 |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/Owl2Vowl.java | [
"public interface Converter {\n\tString getLoadingInfoString();\n\tvoid setOntologyHasMissingImports(boolean val);\n\tboolean ontologyHasMissingImports();\n\tvoid addLoadingInfo(String msg);\n\tboolean getCurrentlyLoadingFlag();\n\tvoid setCurrentlyLoadingFlag(boolean val);\n\tvoid setCurrentlyLoadingFlag(String pa... | import de.uni_stuttgart.vis.vowl.owl2vowl.converter.Converter;
import de.uni_stuttgart.vis.vowl.owl2vowl.converter.IRIConverter;
import de.uni_stuttgart.vis.vowl.owl2vowl.converter.InputStreamConverter;
import de.uni_stuttgart.vis.vowl.owl2vowl.converter.OntologyConverter;
import de.uni_stuttgart.vis.vowl.owl2vowl.expo... | package de.uni_stuttgart.vis.vowl.owl2vowl;
/**
* Global class for easy to use of this library to include in other projects.
*/
public class Owl2Vowl {
protected Converter converter;
public Owl2Vowl(OWLOntology ontology) { | converter = new OntologyConverter(ontology); | 3 |
wesabe/grendel | src/main/java/com/wesabe/grendel/resources/DocumentsResource.java | [
"public class Credentials {\n\t/**\n\t * An authentication challenge {@link Response}. Use this when a client's\n\t * provided credentials are invalid.\n\t */\n\tpublic static final Response CHALLENGE =\n\t\tResponse.status(Status.UNAUTHORIZED)\n\t\t\t.header(HttpHeaders.WWW_AUTHENTICATE, \"Basic realm=\\\"Grendel\... | import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
import com.google.inject.Inject;
import com.wesabe.grendel.auth.Credentials;
import com.wesabe.grendel.auth.Ses... | package com.wesabe.grendel.resources;
/**
* A class which exposes a list of {@link Document}s as a resource.
*
* @author coda
*/
@Path("/users/{id}/documents")
@Produces(MediaType.APPLICATION_JSON)
public class DocumentsResource {
final UserDAO userDAO;
@Inject
public DocumentsResource(UserDAO userDAO) {
... | @Context Credentials credentials, @PathParam("id") String id) { | 0 |
aredee/accumulo-mesos | accumulo-mesos-executor/src/main/java/aredee/mesos/frameworks/accumulo/executor/AccumuloStartExecutor.java | [
"public class Environment {\n\n public static final String JAVA_HOME = \"JAVA_HOME\";\n\n public static final String CLASSPATH = \"CLASSPATH\";\n\n public static final String HADOOP_PREFIX = \"HADOOP_PREFIX\";\n public static final String HADOOP_CONF_DIR = \"HADOOP_CONF_DIR\";\n public static final S... | import aredee.mesos.frameworks.accumulo.configuration.Environment;
import aredee.mesos.frameworks.accumulo.initialize.AccumuloInitializer;
import aredee.mesos.frameworks.accumulo.initialize.AccumuloSiteXml;
import aredee.mesos.frameworks.accumulo.model.ServerProfile;
import aredee.mesos.frameworks.accumulo.process.Accu... | package aredee.mesos.frameworks.accumulo.executor;
public class AccumuloStartExecutor implements Executor {
private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloStartExecutor.class);
private static final ObjectMapper mapper = new ObjectMapper();
private Process serverProcess = null;
... | AccumuloSiteXml siteXml = new AccumuloSiteXml(); | 2 |
dnbn/smbtv | app/src/main/java/com/smbtv/ui/activity/fragment/MainFragmentUIBuilder.java | [
"public class SMBShareDelegate {\n\n private SMBShareDAO mDao;\n\n public SMBShareDelegate() {\n\n Context context = ApplicationDelegate.getContext();\n this.mDao = new SMBShareDAO(context);\n }\n\n public void delete(SMBShare share) {\n\n mDao.delete(share);\n }\n\n public vo... | import android.app.Activity;
import android.support.v17.leanback.widget.ArrayObjectAdapter;
import android.support.v17.leanback.widget.HeaderItem;
import android.support.v17.leanback.widget.ListRow;
import android.util.Log;
import com.smbtv.R;
import com.smbtv.delegate.SMBShareDelegate;
import com.smbtv.model.SMBShare;... | package com.smbtv.ui.activity.fragment;
public class MainFragmentUIBuilder {
private static final String TAG = MainFragmentUIBuilder.class.getSimpleName();
private Activity mParent;
private int cpt;
public MainFragmentUIBuilder(Activity parent) {
this.mParent = parent;
}
public... | rowAdapter.add(new MenuItem(MenuAction.AddShare, getLabel(R.string.add), R.drawable.ic_add)); | 3 |
EBIvariation/eva-ws | eva-release/src/main/java/uk/ac/ebi/eva/release/services/ReleaseStatsService.java | [
"public class ReleaseStatsPerSpeciesDto {\n\n @Id\n private int taxonomyId;\n\n @Id\n private int releaseVersion;\n\n private String scientificName;\n\n private String releaseFolder;\n\n private Long currentRs;\n\n private Long multiMappedRs;\n\n private Long mergedRs;\n\n private Long... | import org.springframework.stereotype.Service;
import uk.ac.ebi.eva.release.dto.ReleaseStatsPerSpeciesDto;
import uk.ac.ebi.eva.release.models.ReleaseInfo;
import uk.ac.ebi.eva.release.models.ReleaseStatsPerSpecies;
import uk.ac.ebi.eva.release.repositories.ReleaseInfoRepository;
import uk.ac.ebi.eva.release.repositori... | /*
* Copyright 2020 EMBL - European Bioinformatics Institute
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | private final ReleaseStatsPerSpeciesRepository releaseStatsPerSpeciesRepository; | 4 |
ypresto/miniguava | miniguava-collect-immutables/src/main/java/net/ypresto/miniguava/collect/immutables/InternalUtils.java | [
"public static <T> T checkNotNull(T reference) {\n if (reference == null) {\n throw new NullPointerException();\n }\n return reference;\n}",
"public class Joiner {\n /**\n * Returns a joiner which automatically places {@code separator} between consecutive elements.\n */\n @CheckReturnValue\n public s... | import static net.ypresto.miniguava.base.Preconditions.checkNotNull;
import net.ypresto.miniguava.annotations.MiniGuavaSpecific;
import net.ypresto.miniguava.base.Joiner;
import net.ypresto.miniguava.base.Joiner.MapJoiner;
import net.ypresto.miniguava.collect.UnmodifiableIterator;
import net.ypresto.miniguava.collect.i... | /*
* Copyright (C) 2016 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | static final Joiner STANDARD_JOINER = Joiner.on(", ").useForNull("null"); | 1 |
iChun/Sync | src/main/java/me/ichun/mods/sync/common/tileentity/TileEntityDualVertical.java | [
"@SideOnly(Side.CLIENT)\npublic class SyncSkinManager {\n //Cache skins throughout TEs to avoid hitting the rate limit for skin session servers\n //Hold values for a longer time, so they are loaded fast if many TEs with the same player are loaded, or when loading other chunks with the same player\n //Skin ... | import io.netty.buffer.ByteBuf;
import me.ichun.mods.ichunutil.common.core.util.EntityHelper;
import me.ichun.mods.sync.client.core.SyncSkinManager;
import me.ichun.mods.sync.common.Sync;
import me.ichun.mods.sync.common.block.BlockDualVertical;
import me.ichun.mods.sync.common.packet.PacketNBT;
import me.ichun.mods.sy... | }
//Beginning of kicking the player out
if (this.resyncPlayer == 40) {
this.vacating = true;
if (this.getClass() == TileEntityShellStorage.class) {
TileEntityShellStorage shellStorage = (TileEntityShellStora... | Sync.channel.sendTo(new PacketNBT(this.getPlayerNBT()), player); | 3 |
docbleach/DocBleach | module/module-pdf/src/main/java/xyz/docbleach/module/pdf/PdfBleachSession.java | [
"public class BleachSession implements Serializable {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(BleachSession.class);\n private static final int MAX_ONGOING_TASKS = 10;\n private final transient Bleach bleach;\n private final Collection<Threat> threats = new ArrayList<>();\n /**\n * Co... | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.pdfbox.io.MemoryUsageSetting;
import org.apache.pdfbox.io.RandomAccessRead;
import org.apache.pdfbox.io.ScratchFile;
import org.apache.pdfbox.pdfparser.PDFParser;
import org.apache.pdfbo... | package xyz.docbleach.module.pdf;
class PdfBleachSession {
private static final Logger LOGGER = LoggerFactory.getLogger(PdfBleachSession.class);
private static final String[] COMMON_PASSWORDS =
new String[]{null, "", "test", "example", "sample", "malware", "infected", "password"};
private static final Me... | .action(ThreatAction.REMOVE) | 3 |
misberner/duzzt | processor/src/main/java/com/github/misberner/duzzt/processor/Duzzt.java | [
"public interface DuzztDiagnosticListener {\n\t\n\t/**\n\t * Called if an expression could not be parsed.\n\t * <p>\n\t * If the parse error occurred while parsing a named subexpression, the name\n\t * of the subexpression will also be passed as the <tt>exprName</tt> parameter.\n\t * Otherwise (that is, if the main... | import java.io.BufferedWriter;
import java.io.IOException;
import java.net.URL;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.TimeZone;
import javax.annotation.processing.Filer;
import javax.l... | /*
*
* Copyright (c) 2014 by Malte Isberner (https://github.com/misberner).
*
* 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
*
* Un... | public void init(APUtils utils) throws DuzztInitializationException { | 3 |
kakao/hbase-tools | hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/Manager.java | [
"public class ManagerArgs extends Args {\n public ManagerArgs(String[] args) throws IOException {\n super(args);\n }\n\n @Override\n protected OptionParser createOptionParser() {\n OptionParser optionParser = createCommonOptionParser();\n optionParser.accepts(OPTION_OPTIMIZE).withRe... | import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;
import com.google.common.annotations.VisibleForTesting;
import com.kakao.hbase.ManagerArgs;
import com.kakao.hbase.common.Args;
import com.kakao.hbase.common.HBaseClient;
import... | /*
* Copyright 2015 Kakao Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | try (HBaseAdmin admin = HBaseClient.getAdmin(args)) { | 2 |
didi/VirtualAPK | CoreLibrary/src/main/java/com/didi/virtualapk/internal/VAInstrumentation.java | [
"public class Instrumentation {\n \n public Application newApplication(ClassLoader cl, String className, Context context) throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n throw new RuntimeException(\"Stub!\");\n }\n \n public void callApplicationOnCreate(Applic... | import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Application;
import android.app.Fragment;
import android.app.Instrumentation;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import... | /*
* Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/license... | protected PluginManager mPluginManager; | 1 |
KostyaSha/github-integration-plugin | github-pullrequest-plugin/src/main/java/org/jenkinsci/plugins/github/pullrequest/publishers/impl/GitHubPRLabelAddPublisher.java | [
"public class GitHubPRLabel implements Describable<GitHubPRLabel> {\n private Set<String> labels;\n\n @DataBoundConstructor\n public GitHubPRLabel(String labels) {\n this(new HashSet<>(Arrays.asList(labels.split(\"\\n\"))));\n }\n\n public GitHubPRLabel(Set<String> labels) {\n this.labe... | import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.BuildStepDescriptor;
import jenkins.model.Jenkins;
import org.jenkinsci.Symbol;
import org.jenkinsci.plugins.github.pullrequest.GitHubPRLabel;
import org.jenkinsci.plug... | package org.jenkinsci.plugins.github.pullrequest.publishers.impl;
/**
* Implements addition of labels (one or many) to GitHub.
*
* @author Alina Karpovich
* @author Kanstantsin Shautsou
*/
public class GitHubPRLabelAddPublisher extends GitHubPRAbstractPublisher {
private static final Logger LOGGER = Logger... | private GitHubPRLabel labelProperty; | 0 |
micdoodle8/Crossbow_Mod_2 | src/main/java/micdoodle8/mods/crossbowmod/CrossbowEvents.java | [
"public class EntityDiamondBolt extends EntityBolt\n{\n public EntityDiamondBolt(World world)\n {\n super(world);\n }\n\n public EntityDiamondBolt(World world, double d, double d1, double d2)\n {\n super(world, d, d1, d2);\n }\n\n public EntityDiamondBolt(World world, EntityLiving... | import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import micdoodle8.mods.crossbowmod.entity.EntityDiamondBolt;
import micdoodle8.mods.crossbowmod.entity.EntityGoldBolt;
import micdoodle8.mods.crossbowmod.entity.EntityIronBolt;
import micdoodle8.mods.crossbowmod.entity.EntityStoneBolt;
import micdoodle8.mods.cross... | package micdoodle8.mods.crossbowmod;
public class CrossbowEvents
{
@SubscribeEvent
public void deathEvent(LivingDeathEvent event)
{ | if (event.entity instanceof EntityChicken && (event.source.getSourceOfDamage() instanceof EntityWoodBolt || event.source.getSourceOfDamage() instanceof EntityStoneBolt || event.source.getSourceOfDamage() instanceof EntityIronBolt || event.source.getSourceOfDamage() instanceof EntityGoldBolt || event.source.getS... | 3 |
szmg/grafana-dashboard-generator-java | grafana-dashboard-generator-example/src/main/java/uk/co/szmg/grafana/example/dashboards/complex/MultiEnvExampleDashboards.java | [
"public interface DashboardFactory {\n\n /**\n * Creates dashboards.\n * @return a list of dashboards created, should not be {@code null}\n */\n List<Dashboard> create();\n\n}",
"public class ColorTheme {\n\n /**\n * A simple, red-yellow-green and white theme.\n */\n public static ... | import static uk.co.szmg.grafana.dashboard.StaticFactories.placeholder;
import static uk.co.szmg.grafana.dashboard.StaticFactories.thinRow;
import static uk.co.szmg.grafana.dashboard.StaticFactories.title;
import static uk.co.szmg.grafana.domain.DomainFactories.newDashboard;
import static uk.co.szmg.grafana.domain.Doma... | package uk.co.szmg.grafana.example.dashboards.complex;
/*-
* #%L
* grafana-dashboard-generator-example
* %%
* Copyright (C) 2017 Mate Gabor Szvoboda
* %%
* 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 ... | private ColorTheme colorTheme = ColorTheme.RED_YELLOW_GREEN; | 1 |
ming-soft/MCMS | src/main/java/net/mingsoft/cms/action/ContentAction.java | [
"public class ContentBean extends ContentEntity {\n\n// /**\n// * 静态化地址\n// */\n// private String staticUrl;\n\n /**\n * 开始时间\n */\n private String beginTime;\n\n /**\n * 结束时间\n */\n private String endTime;\n\n /**\n * 属性标记\n */\n private String flag;\n\n /... | import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import net.mingsoft.base.entity.ResultData;
import net.mingsoft.basic.annotation.LogAnn;
import net.mingsoft.basic.bean.EUListBean;
import net.m... | /**
* The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* 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
... | private ICategoryBiz categoryBiz; | 1 |
pfstrack/eldamo | src/test/java/xdb/dom/XQueryEngineTest.java | [
"public class ModelConfigManagerTest extends TestCase {\n\n public ModelConfigManagerTest(String testName) {\n super(testName);\n }\n\n public static ModelConfigManager getTestModelConfigManager() {\n init();\n return ModelConfigManager.instance();\n }\n\n public static void init... | import java.io.IOException;
import java.io.InputStream;
import java.io.StringReader;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import junit.framework.TestCase;
import net.sf.saxon.dom.NodeOverNodeInfo;
import net.sf.saxon.om.NodeInfo;
i... | package xdb.dom;
public class XQueryEngineTest extends TestCase {
public XQueryEngineTest(String testName) {
super(testName);
}
public void testQuery() throws Exception {
String xml = "<x><a id='1'>x</a><a id='2'>y</a><a id='3'>z</a></x>";
Document doc = parse(xml);
Map<... | ModelConfigManagerTest.init(); | 0 |
Putnami/putnami-gradle-plugin | src/main/java/fr/putnami/gwt/gradle/task/GwtDevTask.java | [
"public class JavaAction implements Action<Task> {\n\n\tpublic static class ProcessLogger extends Thread {\n\t\tprivate InputStream stream;\n\t\tprivate LogLevel level;\n\t\tprivate boolean quit = false;\n\n\t\tpublic void setStream(InputStream stream) {\n\t\t\tthis.stream = stream;\n\t\t}\n\n\t\tpublic void setLev... | import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import org.gradle.api.Project;
import org.gradle.api.internal.ConventionMapping;
import org.gradle.api.internal.IConventionAware;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.... | /**
* This file is part of pwt.
*
* pwt is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser
* General Public License as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* pwt is distributed in the hope ... | sdmAction.setInfoLogger(new ProcessLogger() { | 1 |
binkley/binkley | yaml-compile/src/main/java/hm/binkley/annotation/processing/y/YModel.java | [
"public final class LoadedTemplate\n extends Loaded<Template> {\n LoadedTemplate(final String path, final Resource whence,\n final Template template) {\n super(path, whence, template);\n }\n\n @Override\n public String where() {\n return where;\n }\n}",
"public final... | import hm.binkley.annotation.processing.LoadedTemplate;
import hm.binkley.annotation.processing.LoadedYaml;
import hm.binkley.annotation.processing.YamlGenerateMesseger;
import hm.binkley.util.Listable;
import hm.binkley.util.YamlHelper;
import org.yaml.snakeyaml.Yaml;
import javax.annotation.Nonnull;
import javax.lang... | package hm.binkley.annotation.processing.y;
/**
* Represents YAML class/enum definitions immutably and accessible from
* FreeMarker. Typical: <pre>
* Foo:
* .meta:
* doc: I am the one and only Foo!
* bar:
* doc: I am bar
* value: 0</pre>
*
* @author <a href="mailto:binkley@alumni.rice.edu... | private final Yaml yaml = YamlHelper.builder().build(dumper -> { | 4 |
xpush/lib-xpush-android | sample/src/main/java/io/xpush/sampleChat/fragments/ProfileFragment.java | [
"public class Constants {\n public static final int REQUEST_SIGNUP = 100;\n\n public static final int REQUEST_EDIT_IMAGE = 111;\n public static final int REQUEST_EDIT_NICKNAME = 112;\n public static final int REQUEST_EDIT_STATUS_MESSAGE = 113;\n\n public static final int REQUEST_INVITE_USER = 201;\n\... | import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.fa... | package io.xpush.sampleChat.fragments;
public class ProfileFragment extends Fragment {
private String TAG = ProfileFragment.class.getSimpleName();
private Context mActivity;
| private XPushSession mSession; | 3 |
bonigarcia/dualsub | src/test/java/io/github/bonigarcia/dualsub/test/TestSynchronization.java | [
"public class DualSrt {\n\n\tprivate static final Logger log = LoggerFactory.getLogger(DualSrt.class);\n\n\tprivate TreeMap<String, Entry[]> subtitles;\n\n\tprivate int signatureGap;\n\tprivate int signatureTime;\n\tprivate int gap;\n\tprivate int desync;\n\tprivate int extension;\n\tprivate boolean extend;\n\tpriv... | import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.github.bonigarcia.dualsub.srt.DualSrt;
import io.github.bonigarcia.dualsub.srt.Merger;
import io.github.bonigarcia.dualsub.srt.Srt;
import io.github.bonigarcia.dualsub.srt.SrtUtils;
import io.github.bonigarcia.dualsub.util.Charset... | /*
* (C) Copyright 2014 Boni Garcia (http://bonigarcia.github.io/)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versi... | SrtUtils.init("624", "Tahoma", 17, true, true, ".", 50, false, null, | 3 |
roscrazy/Android-RealtimeUpdate-CleanArchitecture | mvvm/src/main/java/com/mike/feed/mapper/FeedModelMapper.java | [
"public class Deleted {\n}",
"public class Feed {\n private String title;\n private String body;\n private String image;\n private String key;\n private int index;\n\n public String getTitle() {\n return title;\n }\n\n public void setTitle(String title) {\n this.title = title... | import com.mike.feed.domain.Deleted;
import com.mike.feed.domain.Feed;
import com.mike.feed.domain.FeedChangedInfo;
import com.mike.feed.domain.Written;
import com.mike.feed.model.DeletedModel;
import com.mike.feed.model.FeedChangedInfoModel;
import com.mike.feed.model.FeedModel;
import com.mike.feed.model.WrittenModel... | package com.mike.feed.mapper;
/**
* Created by MinhNguyen on 8/24/16.
*/
@Singleton
public class FeedModelMapper {
@Inject
public FeedModelMapper(){
}
| public Feed transform(FeedModel entity){ | 6 |
shagwood/micro-genie | micro-genie-dw-service/src/main/java/io/microgenie/service/AppConfiguration.java | [
"public abstract class ApplicationFactory implements Closeable{\n\n\tpublic ApplicationFactory(){}\n\n\tpublic abstract EventFactory events();\n\tpublic abstract QueueFactory queues();\n\tpublic abstract FileStoreFactory blobs();\n\tpublic abstract <T extends DatabaseFactory> T database();\n}",
"public class ... | import io.dropwizard.Configuration;
import io.microgenie.application.ApplicationFactory;
import io.microgenie.application.StateChangeConfiguration;
import io.microgenie.aws.AwsApplicationFactory;
import io.microgenie.aws.config.AwsConfig;
import io.microgenie.service.commands.CommandConfiguration;
import com.fasterxml.... | package io.microgenie.service;
/***
* Application Configuration Factory
* <p>
* This class contains common configuration elements to configure micro-genie service
* functionality
* @author shawn
*/
public class AppConfiguration extends Configuration {
private static final String ISO_8601_DATE_FORMAT = "yyyy... | private AwsConfig aws; | 3 |
jrimum/domkee | src/main/java/org/jrimum/domkee/financeiro/banco/febraban/Banco.java | [
"public class NumeroDeTelefone{\r\n\r\n\tprivate int ddi;\r\n\r\n\tprivate int ddd;\r\n\r\n\tprivate int prefixo;\r\n\r\n\tprivate int sufixo;\r\n\t\r\n\tprivate String telefone;\r\n\r\n\tpublic NumeroDeTelefone() {}\r\n\t\r\n\tpublic int getDDI() {\r\n\t\treturn ddi;\r\n\t}\r\n\r\n\tpublic void setDDI(int ddi) {\r... | import java.awt.Image;
import java.util.Collection;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.log4j.Logger;
import org.jrimum.domkee.comum.pessoa.contato.NumeroDeTelefone;
import org.jrimum.domkee.comum.pessoa.endereco.Endereco;
import o... | /*
* Copyright 2008 JRimum Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
* applicable law or agreed to in ... | private PessoaJuridica pessoaJuridica;
| 5 |
1gravity/Android-ContactPicker | library/src/main/java/com/onegravity/contactpicker/core/PagerAdapter.java | [
"public enum ContactDescription {\n PHONE,\n EMAIL,\n ADDRESS;\n\n public static ContactDescription lookup(String name) {\n try {\n return ContactDescription.valueOf(name);\n }\n catch (IllegalArgumentException ignore) {\n Log.e(ContactDescription.class.getSimp... | import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import com.onegravity.contactpicker.contact.ContactDescription;
import com.onegravity.contactpicker.contact.ContactFragment;
import com.onegravity.contactpicker.contact.Contact... | /*
* Copyright (C) 2015-2017 Emanuel Moecklin
*
* 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... | return ContactFragment.newInstance(mSortOrder, mBadgeType, mDescription, mDescriptionType); | 1 |
hlavki/g-suite-identity-sync | services/synchronize/api/src/main/java/eu/hlavki/identity/services/sync/impl/AccountSyncServiceImpl.java | [
"public interface AppConfiguration {\n\n Optional<String> getExternalAccountsGroup();\n\n\n void setExternalAccountsGroup(String groupName);\n}",
"public interface GSuiteDirectoryService {\n\n /**\n * Retrieve all groups for a member.\n *\n * @param userKey The userKey can be the user's prima... | import eu.hlavki.identity.services.config.AppConfiguration;
import eu.hlavki.identity.services.google.GSuiteDirectoryService;
import eu.hlavki.identity.services.google.ResourceNotFoundException;
import eu.hlavki.identity.services.google.model.*;
import eu.hlavki.identity.services.ldap.LdapAccountService;
import eu.hlav... | package eu.hlavki.identity.services.sync.impl;
public class AccountSyncServiceImpl implements AccountSyncService {
private static final Logger LOG = LoggerFactory.getLogger(AccountSyncServiceImpl.class);
private final LdapAccountService ldapService;
private final GSuiteDirectoryService gsuiteDirService;
... | Map<String, LdapAccount> emailAccountMap = new HashMap<>(); | 4 |
CraftedCart/SMBLevelWorkshop | src/main/java/craftedcart/smblevelworkshop/ui/component/transform/PlaceableScaleTextFields.java | [
"public class Placeable implements Cloneable, ITransformable {\n\n @NotNull private IAsset asset;\n\n @NotNull private PosXYZ position = new PosXYZ();\n @NotNull private PosXYZ rotation = new PosXYZ();\n @NotNull private PosXYZ scale = new PosXYZ(1, 1, 1);\n\n public Placeable(@NotNull IAsset asset) ... | import craftedcart.smblevelworkshop.asset.Placeable;
import craftedcart.smblevelworkshop.project.ProjectManager;
import craftedcart.smblevelworkshop.resource.LangManager;
import craftedcart.smblevelworkshop.ui.MainScreen;
import craftedcart.smblevelworkshop.undo.UndoAssetTransform;
import craftedcart.smblevelworkshop.u... | package craftedcart.smblevelworkshop.ui.component.transform;
/**
* @author CraftedCart
* Created on 30/10/2016 (DD/MM/YYYY)
*/
public class PlaceableScaleTextFields extends ScaleTextFields {
public PlaceableScaleTextFields(@NotNull MainScreen mainScreen, @Nullable TextField nextTextField) {
s... | Placeable placeable = ProjectManager.getCurrentLevelData().getPlaceable(name); | 0 |
wxiaoqi/ace-cache | src/main/java/com/ace/cache/parser/impl/DefaultKeyGenerator.java | [
"public class RedisConfig {\n private RedisPoolConfig pool = new RedisPoolConfig();\n private String host;\n private String password;\n private String timeout;\n private String database;\n private String port;\n private String enable;\n private String sysName;\n private String userKey;\n ... | import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.ace.cache.config.RedisConfig;
import com.ace.cache.parser.IUserKeyGenerator;
import com.ace.cache.utils.ReflectionUtils;
import com.ace.cache.constants.CacheScope;
import com.ace.cache.utils.WebUtil;
import org.apache.comm... | package com.ace.cache.parser.impl;
@Service
public class DefaultKeyGenerator extends IKeyGenerator {
@Autowired
RedisConfig redisConfig;
@Autowired(required = false) | private IUserKeyGenerator userKeyGenerator; | 1 |
openintents/filemanager | FileManager/src/main/java/org/openintents/filemanager/FileManagerActivity.java | [
"public class BookmarkListActivity extends FragmentActivity {\n public static final String KEY_RESULT_PATH = \"path\";\n private static final String FRAGMENT_TAG = \"Fragment\";\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n UIUtils.setThemeFor(this);\n super.onCrea... | import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.preference.PreferenceManager;
import android.view.KeyEvent;
import android.view.Menu;
import android.view... | /*
* Copyright (C) 2008 OpenIntents.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 a... | mFragment.openInformingPathBar(new FileHolder(FileUtils.getFile(intent.getData()))); | 1 |
thomasjungblut/tjungblut-graph | test/de/jungblut/graph/bsp/SSSPTest.java | [
"public interface Graph<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE> {\n\n /**\n * Adds a vertex with a single adjacent to it.\n */\n void addVertex(Vertex<VERTEX_ID, VERTEX_VALUE> vertex,\n Edge<VERTEX_ID, EDGE_VALUE> adjacent);\n\n /**\n * Adds a vertex with a no adjacents to it.\n ... | import de.jungblut.graph.Graph;
import de.jungblut.graph.TestGraphProvider;
import de.jungblut.graph.bsp.SSSP.IntIntPairWritable;
import de.jungblut.graph.bsp.SSSP.SSSPTextReader;
import de.jungblut.graph.bsp.SSSP.ShortestPathVertex;
import de.jungblut.graph.model.Edge;
import de.jungblut.graph.model.Vertex;
import org... | package de.jungblut.graph.bsp;
public final class SSSPTest {
@Test
@Ignore("BSP partitioning job fails without proper reason")
public void testSSSP() throws Exception {
// Graph job configuration
HamaConfiguration conf = new HamaConfiguration();
conf.set("bsp.local.tasks.maximum... | Set<Edge<Integer, Integer>> adjacentVertices = wikipediaExampleGraph | 5 |
hnakagawa/proton | Proton/src/instrumentTest/java/proton/inject/state/StateRecoveryTest.java | [
"public class DefaultModule extends AbstractModule {\n @SuppressWarnings(\"rawtypes\")\n private static final Class mAccountManagerClass = loadClass(\"android.accounts.AccountManager\");\n\n private static Class<?> loadClass(String className) {\n try {\n return Class.forName(className);\n... | import java.util.ArrayList;
import proton.inject.DefaultModule;
import proton.inject.Injector;
import proton.inject.MockContext;
import proton.inject.Proton;
import proton.inject.observer.ObserverManager;
import proton.inject.observer.event.OnCreateEvent;
import proton.inject.observer.event.OnDestroyEvent;
import proto... | package proton.inject.state;
public class StateRecoveryTest extends AndroidTestCase {
private Application mMockApplication;
private Injector mInjector;
private ObserverManager mObserverManager;
@SuppressWarnings("unused")
private StateEventObserver mStateEventObserver;
@Override
protected void setUp() throws... | mObserverManager.fire(new OnCreateEvent(null)); | 4 |
Kestutis-Z/World-Weather | WorldWeather/app/src/main/java/com/haringeymobile/ukweather/database/GeneralDatabaseService.java | [
"public class CityManagementActivity extends ThemedActivity implements\n CityListFragmentWithUtilityButtons.OnUtilityButtonClickedListener,\n CityUtilitiesCursorAdapter.Listener,\n DeleteCityDialog.OnDialogButtonClickedListener {\n\n public static final String CITY_ID = \"city id\";\n pub... | import android.app.IntentService;
import android.content.Intent;
import com.haringeymobile.ukweather.CityManagementActivity;
import com.haringeymobile.ukweather.MainActivity;
import com.haringeymobile.ukweather.RefreshingActivity;
import com.haringeymobile.ukweather.utils.SharedPrefsHelper;
import com.haringeymobile.uk... | package com.haringeymobile.ukweather.database;
public class GeneralDatabaseService extends IntentService {
private static final String APP_PACKAGE = "com.haringeymobile.ukweather";
public static final String ACTION_INSERT_OR_UPDATE_CITY_RECORD = APP_PACKAGE
+ ".insert_or_update_city_records";
... | int cityId = SharedPrefsHelper.getCityIdFromSharedPrefs(this); | 3 |
quaap/LaunchTime | app/src/main/java/com/quaap/launchtime/db/DB.java | [
"public class AppLauncher implements Comparable<AppLauncher> {\n\n\n private static final Map<ComponentName,AppLauncher> mAppLaunchers = Collections.synchronizedMap(new HashMap<ComponentName,AppLauncher>());\n private static final String LINK_SEP = \":IS_APP_LINK:\";\n public static final String ACTION_PAC... | import android.annotation.SuppressLint;
import android.content.ComponentName;
import android.content.ContentValues;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
imp... | }
private static String buildIndexStmt(String tablename, String col) {
return "CREATE INDEX " + ((col + tablename).replaceAll("\\W+", "_")) + " on " + tablename + "(" + col + ");";
}
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
firstRun = true;
Log.i(... | public AppLauncher getApp(ComponentName appname) { | 0 |
CreativeMD/EnhancedVisuals | src/main/java/team/creative/enhancedvisuals/common/event/EVEvents.java | [
"@Mod(modid = EnhancedVisuals.MODID, name = EnhancedVisuals.NAME, version = EnhancedVisuals.VERSION, acceptedMinecraftVersions = \"\", dependencies = \"required-after:creativecore\", guiFactory = \"team.creative.enhancedvisuals.client.EVSettings\")\npublic class EnhancedVisuals {\n\t\n\tpublic static final String M... | import java.lang.reflect.Field;
import java.util.List;
import com.creativemd.creativecore.common.packet.PacketHandler;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player... | package team.creative.enhancedvisuals.common.event;
public class EVEvents {
private Field size = ReflectionHelper.findField(Explosion.class, new String[] { "field_77280_f", "size" });
private Field exploder = ReflectionHelper.findField(Explosion.class, new String[] { "field_77283_e", "exploder" });
... | ExplosionPacket packet = new ExplosionPacket(event.getExplosion().getPosition(), size.getFloat(event.getExplosion()), sourceEntity); | 5 |
krazykira/VidEffects | videffects/src/main/java/com/sherazkhilji/videffects/view/VideoSurfaceView.java | [
"public class NoEffect implements ShaderInterface {\r\n\r\n @Override\r\n public String getShader(GLSurfaceView mGlSurfaceView) {\r\n return \"#extension GL_OES_EGL_image_external : require\\n\"\r\n + \"precision mediump float;\\n\"\r\n + \"varying vec2 vTextureCoord;\\n\"... | import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.SurfaceTexture;
import android.media.MediaPlayer;
import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.opengl.Matrix;
import android.util.AttributeSet;
import android.util.Log;
import android.vie... | * @param shaderEffect any effect that implements {@link ShaderInterface}
*/
@Deprecated
public void setShader(ShaderInterface shaderEffect) {
this.filter = null;
effect = shaderEffect != null ? shaderEffect : new NoEffect();
}
public void setFilter(Filter filter) {
thi... | return Utils.loadShader(GLES20.GL_VERTEX_SHADER, vertexShaderString); | 5 |
spinnaker/fiat | fiat-web/src/main/java/com/netflix/spinnaker/fiat/controllers/RolesController.java | [
"@Data\npublic class UserPermission {\n private String id;\n\n private Set<Account> accounts = new LinkedHashSet<>();\n private Set<Application> applications = new LinkedHashSet<>();\n private Set<ServiceAccount> serviceAccounts = new LinkedHashSet<>();\n private Set<Role> roles = new LinkedHashSet<>();\n pri... | import com.netflix.spinnaker.fiat.model.UserPermission;
import com.netflix.spinnaker.fiat.model.resources.Role;
import com.netflix.spinnaker.fiat.permissions.ExternalUser;
import com.netflix.spinnaker.fiat.permissions.PermissionResolutionException;
import com.netflix.spinnaker.fiat.permissions.PermissionsRepository;
im... | /*
* Copyright 2016 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | ExternalUser extUser = | 2 |
374901588/PaperPlane | app/src/main/java/com/hut/zero/homepage/DoubanMomentPresenter.java | [
"public enum BeanType {\n\n TYPE_ZHIHU, TYPE_GUOKE,TYPE_DOUBAN;\n\n}",
"public class DoubanCache extends DataSupport {\n private int douban_id;\n private String douban_news;\n private float douban_time;\n private String douban_content;\n private boolean bookmark=false;\n\n public int getDouba... | import android.content.Context;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.hut.zero.bean.BeanType;
import com.hut.zero.bean.DoubanCache;
import com.hut.zero.bean.Doub... | package com.hut.zero.homepage;
/**
* Created by Zero on 2017/4/2.
*/
public class DoubanMomentPresenter implements DoubanMomentContract.Presenter {
private Context mContext;
private DoubanMomentContract.View mView;
private Gson gson=new Gson();
| private DoubanModelImpl model; | 4 |
aolshevskiy/songo | src/main/java/songo/MainModule.java | [
"public class LoggingTypeListener implements TypeListener {\n\t@Override\n\tpublic <I> void hear(TypeLiteral<I> aTypeLiteral, TypeEncounter<I> aTypeEncounter) {\n\t\tfor(Field field : aTypeLiteral.getRawType().getDeclaredFields()) {\n\t\t\tif(field.getType() == Logger.class && field.isAnnotationPresent(InjectLogger... | import com.google.common.eventbus.EventBus;
import com.google.inject.*;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import com.google.inject.matcher.Matchers;
import com.google.inject.servlet.SessionScoped;
import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.AsyncHttpClientConfig;... | package songo;
public class MainModule extends AbstractModule {
private static int getNativeBrowserStyle() {
if(System.getProperty("os.name").equals("Linux"))
return SWT.WEBKIT;
return SWT.NONE;
}
private static boolean isRunningWindows() {
return System.getProperty("os.name").toLowerCase().contains("wi... | String provideAccessToken(Configuration configuration) { | 1 |
EndlessCodeGroup/RPGInventory | src/main/java/ru/endlesscode/rpginventory/inventory/craft/CraftManager.java | [
"public class RPGInventory extends PluginLifecycle {\n private static RPGInventory instance;\n\n private Permission perms;\n private Economy economy;\n\n private BukkitLevelSystem.Provider levelSystemProvider;\n private BukkitClassSystem.Provider classSystemProvider;\n\n private FileLanguage langu... | import ru.endlesscode.rpginventory.item.Texture;
import ru.endlesscode.rpginventory.misc.config.Config;
import ru.endlesscode.rpginventory.utils.Log;
import java.util.ArrayList;
import java.util.List;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.... | /*
* This file is part of RPGInventory.
* Copyright (C) 2015-2017 Osip Fatkullin
*
* RPGInventory 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... | ProtocolLibrary.getProtocolManager().addPacketListener(new CraftListener(instance)); | 2 |
suninformation/ymate-payment-v2 | ymate-payment-wxpay/src/main/java/net/ymate/payment/wxpay/impl/DefaultModuleCfg.java | [
"public interface IWxPay {\n\n String MODULE_NAME = \"payment.wxpay\";\n\n /**\n * @return 返回所属YMP框架管理器实例\n */\n YMP getOwner();\n\n /**\n * @return 返回模块配置对象\n */\n IWxPayModuleCfg getModuleCfg();\n\n /**\n * @return 返回模块是否已初始化\n */\n boolean isInited();\n\n /**\n ... | import net.ymate.payment.wxpay.IWxPay;
import net.ymate.payment.wxpay.IWxPayAccountProvider;
import net.ymate.payment.wxpay.IWxPayEventHandler;
import net.ymate.payment.wxpay.IWxPayModuleCfg;
import net.ymate.payment.wxpay.base.WxPayAccountMeta;
import net.ymate.platform.core.YMP;
import net.ymate.platform.core.lang.Bl... | /*
* Copyright 2007-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | WxPayAccountMeta _meta = new WxPayAccountMeta(_moduleCfgs.get("app_id"), | 4 |
shekhargulati/rx-docker-client | rx-docker-client/src/main/java/com/shekhargulati/reactivex/docker/client/DefaultRxDockerClient.java | [
"public abstract class Dates {\n public static final String DOCKER_DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\";\n}",
"public abstract class StreamUtils {\n\n public static <T> Stream<T> iteratorToStream(Iterator<T> iterator) {\n return StreamSupport.stream(Spliterators.spliteratorUnknownSize(... | import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.shekhargulati.reactivex.docker.client.representations.*;
import com.shekhargulati.reactivex.docker.client.utils.Dates;
import com.shekhargulati.reactivex.docker.client.utils.StreamUtils;
import com.shek... | /*
* The MIT License
*
* Copyright 2015 Shekhar Gulati <shekhargulati84@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 ... | .setDateFormat(Dates.DOCKER_DATE_TIME_FORMAT) | 0 |
xcurator/xcurator | src/edu/toronto/cs/xcurator/discoverer/HashBasedEntityInterlinking.java | [
"public class RdfUriBuilder {\n\n private final String typeUriBase;\n private final String propertyUriBase;\n\n private final String typePrefix;\n private final String propertyPrefix;\n\n public RdfUriBuilder(RdfUriConfig config) {\n this.typeUriBase = config.getTypeResourceUriBase();\n ... | import edu.toronto.cs.xcurator.common.DataDocument;
import edu.toronto.cs.xcurator.common.RdfUriBuilder;
import edu.toronto.cs.xcurator.mapping.Attribute;
import edu.toronto.cs.xcurator.mapping.Schema;
import edu.toronto.cs.xcurator.mapping.Mapping;
import edu.toronto.cs.xcurator.mapping.Reference;
import edu.toronto.c... | /*
* Copyright (c) 2013, University of Toronto.
*
* 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 requ... | public void process(List<DataDocument> dataDocuments, Mapping mapping) { | 3 |
dariober/ASCIIGenome | src/test/java/samTextViewer/GenomicCoordsTest.java | [
"public class Config {\n\t\n\t// C O N S T R U C T O R \n\t\n\tprivate static final Map<ConfigKey, String> config= new HashMap<ConfigKey, String>();\n\n\tpublic Config(String source) throws IOException, InvalidConfigException {\n\t\t\n\t\tnew Xterm256();\n\t\t\n\t\tString RawConfigFile= Config.getConfigFileAsString... | import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import coloring.Config;
import exceptions.InvalidColourException;
import exceptions.InvalidCommandLineException;
... | package samTextViewer;
public class GenomicCoordsTest {
static SamReaderFactory srf=SamReaderFactory.make();
static SamReader samReader= srf.open(new File("test_data/ds051.short.bam"));
public static SAMSequenceDictionary samSeqDict= samReader.getFileHeader().getSequenceDictionary();
public static String f... | new Config(null); | 0 |
pedrovgs/Nox | nox/src/main/java/com/github/pedrovgs/nox/NoxView.java | [
"public interface ImageLoader {\n\n /**\n * Configures an url to be downloaded.\n */\n ImageLoader load(String url);\n\n /**\n * Configures a resource id to be loaded.\n */\n ImageLoader load(Integer resourceId);\n\n /**\n * Loads a placeholder using a resource id to be shown while the external resou... | import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.v4.view.GestureDetectorCom... | /*
* 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 ... | private Shape shape; | 2 |
chipKIT32/chipKIT-importer | src/com/microchip/mplab/nbide/embedded/arduino/wizard/ProjectSetupStep.java | [
"public abstract class ArduinoConfig {\n \n \n public static final String ROOT_PLATFORM_VENDOR = \"arduino\";\n public static final String ROOT_PLATFORM_ARCH = \"avr\";\n \n private static final Logger LOGGER = Logger.getLogger(ArduinoConfig.class.getName());\n private static ArduinoConfig INST... | import com.microchip.crownking.opt.Version;
import com.microchip.mplab.mdbcore.MessageMediator.ActionList;
import com.microchip.mplab.mdbcore.MessageMediator.DialogBoxType;
import com.microchip.mplab.mdbcore.MessageMediator.Message;
import com.microchip.mplab.mdbcore.MessageMediator.MessageMediator;
import com.microchi... |
// Set the error message to null if there is no warning message to display
if (wizardDescriptor.getProperty(WizardDescriptor.PROP_WARNING_MESSAGE) == null) {
wizardDescriptor.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, null);
}
return true;
}
@Override... | settings.putProperty(BOARD_CONFIGURATION.key(), new BoardConfiguration(board)); | 4 |
richkmeli/Richkware-Manager-Server | src/main/java/it/richkmeli/rms/data/LoadDatabase.java | [
"@Component\npublic class ConfigurationDatabaseManager {\n private static ConfigurationRepository configurationRepository;\n\n @Autowired\n public ConfigurationDatabaseManager(ConfigurationRepository configurationRepository) {\n this.configurationRepository = configurationRepository;\n }\n\n p... | import it.richkmeli.jframework.util.RandomStringGenerator;
import it.richkmeli.rms.data.entity.configuration.ConfigurationDatabaseManager;
import it.richkmeli.rms.data.entity.configuration.ConfigurationEnum;
import it.richkmeli.rms.data.entity.configuration.ConfigurationManager;
import it.richkmeli.rms.data.entity.devi... | package it.richkmeli.rms.data;
// Annotating a class with the @Configuration annotation indicates
// that the class will be used by JavaConfig as a source of bean definitions.
@Configuration
class LoadDatabase {
@Bean | CommandLineRunner initDatabase(AuthDatabaseSpringManager authDatabaseSpringManager, DeviceDatabaseSpringManager deviceDatabaseSpringManager, RmcDatabaseSpringManager rmcDatabaseSpringManager, ConfigurationDatabaseManager configurationDatabaseManager) { | 5 |
theblackwidower/KanaQuiz | app/src/main/java/com/noprestige/kanaquiz/options/QuestionSelectionDetail.java | [
"public class KanaQuestion extends Question\n{\n private final String kana;\n private final String defaultRomaji;\n private final Map<RomanizationSystem, String> altRomaji;\n\n KanaQuestion(String kana, String romaji)\n {\n this(kana, romaji, null);\n }\n\n KanaQuestion(String kana, Stri... | import static com.noprestige.kanaquiz.questions.QuestionManagement.SUBPREFERENCE_DELIMITER;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import com.noprestige.kanaquiz.R;
import com.noprestige.kanaquiz.questions.KanaQuestion;
import com.noprestige.kanaquiz.questions.Kanji... | /*
* Copyright 2021 T Duke Perry
*
* 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 applicabl... | else if (questions[i].getClass().equals(WordQuestion.class)) | 3 |
yyxhdy/ManyEAs | src/jmetal/problems/Tanaka.java | [
"public abstract class Problem implements Serializable {\n\n\t/**\n\t * Defines the default precision of binary-coded variables\n\t */\n\tprivate final static int DEFAULT_PRECISSION = 16;\n\n\t/**\n\t * Stores the number of variables of the problem\n\t */\n\tprotected int numberOfVariables_;\n\n\t/**\n\t * Stores t... | import jmetal.core.Problem;
import jmetal.core.Solution;
import jmetal.core.Variable;
import jmetal.encodings.solutionType.BinaryRealSolutionType;
import jmetal.encodings.solutionType.RealSolutionType;
import jmetal.util.JMException; | // Tanaka.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 Public Lice... | public void evaluate(Solution solution) throws JMException { | 1 |
wolispace/soft-pixel-dungeon | src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBag.java | [
"public class Assets {\n\n\tpublic static final String ARCS_BG\t\t= \"arcs1.png\";\n\tpublic static final String ARCS_FG\t\t= \"arcs2.png\";\n\tpublic static final String DASHBOARD\t= \"dashboard.png\";\n\t\n\tpublic static final String BANNERS\t= \"banners.png\";\n\tpublic static final String BADGES\t= \"badges.pn... | import android.graphics.RectF;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpix... | icon.y = y + (height - icon.height) / 2 - 2 - (selected ? 0 : 1);
if (!selected && icon.y < y + CUT) {
RectF frame = icon.frame();
frame.top += (y + CUT - icon.y) / icon.texture.height;
icon.frame( frame );
icon.y = y + CUT;
}
}
private Image icon() {
if (bag instanceof SeedPouch) {
... | Sample.INSTANCE.play( Assets.SND_CLICK, 0.7f, 0.7f, 1.2f ); | 0 |
handstudio/HzGrapher | sample/src/com/handstudio/android/hzgrapher/LineCompareGraphActivity.java | [
"public class GraphAnimation {\n\tpublic static final int LINEAR_ANIMATION = 1;\n\t\n\tpublic static final int CURVE_REGION_ANIMATION_1 = 2;\n\tpublic static final int CURVE_REGION_ANIMATION_2 = 3;\n\t\n\tpublic static final int DEFAULT_DURATION = 2000;\n\t\n\tprivate int animation = LINEAR_ANIMATION;\n\tprivate in... | import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.os.Bundle;
import android.view.ViewGroup;
import com.handstudio.android.hzgrapherlib.animation.GraphAnimation;
import com.handstudio.android.hzgrapherlib.graphview.LineCompareGraphView;
import com.handstudio.android.hzgrapher... | package com.handstudio.android.hzgrapher;
public class LineCompareGraphActivity extends Activity {
private ViewGroup layoutGraphView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_graph);
layoutGraphView = (ViewGrou... | vo.setAnimation(new GraphAnimation(GraphAnimation.LINEAR_ANIMATION, GraphAnimation.DEFAULT_DURATION)); | 0 |
desht/ScrollingMenuSign | src/main/java/me/desht/scrollingmenusign/views/SMSSpoutView.java | [
"public class SMSException extends DHUtilsException {\n\n private static final long serialVersionUID = 1L;\n\n public SMSException(String message) {\n super(message);\n }\n\n}",
"public class SMSMenu extends Observable implements SMSPersistable, SMSUseLimitable, ConfigurationListener, Comparable<S... | import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Observable;
import java.util.UUID;
import me.desht.dhutils.ConfigurationManager;
import me.desht.dhutils.Debugger;
import me.desht.dhutils.LogUtils;
import me.desht.dhutils.PermissionUtils;
import me.desht.scrollingmenusign.SMS... | package me.desht.scrollingmenusign.views;
/**
* This view draws menus on a popped-up Spout view.
*/
public class SMSSpoutView extends SMSScrollableView implements PoppableView {
// attributes
public static final String AUTOPOPDOWN = "autopopdown";
public static final String SPOUTKEYS = "spoutkeys";
... | public SMSSpoutView(String name, SMSMenu menu) throws SMSException { | 1 |
isel-leic-mpd/mpd-2017-i41d | aula08-template-vs-strategy/src/test/java/LazyQueriesTest.java | [
"public class FileRequest implements IRequest{\n @Override\n public Iterable<String> getContent(String path) {\n String[] parts = path.split(\"/\");\n path = parts[parts.length-1]\n .replace('?', '-')\n .replace('&', '-')\n .replace('=', '-')\n ... | import org.junit.Test;
import util.FileRequest;
import util.queries.LazyQueries;
import weather.WeatherWebApi;
import weather.dto.WeatherInfo;
import java.time.LocalDate;
import static org.junit.Assert.assertEquals;
import static util.queries.LazyQueries.*;
import static util.queries.LazyQueries.filter; | /*
* Copyright (c) 2017, Miguel Gamboa
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is dis... | WeatherWebApi api = new WeatherWebApi(new FileRequest()); | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.