repo_name stringlengths 7 104 | file_path stringlengths 11 238 | context list | import_statement stringlengths 103 6.85k | code stringlengths 60 38.4k | next_line stringlengths 10 824 | gold_snippet_index int32 0 8 |
|---|---|---|---|---|---|---|
google/blockly-android | blocklylib-core/src/main/java/com/google/blockly/android/ui/mutator/ProcedureDefinitionMutatorFragment.java | [
"public class BlocklyController {\n private static final String TAG = \"BlocklyController\";\n\n private static final String SNAPSHOT_BUNDLE_KEY = \"com.google.blockly.snapshot\";\n private static final String SERIALIZED_WORKSPACE_KEY = \"SERIALIZED_WORKSPACE\";\n\n /**\n * Callback interface for {@... | import android.app.ActionBar;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
im... | /*
* Copyright 2017 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | private ProcedureManager mProcedureManager; | 2 |
NordeaOSS/copybook4java | copybook4java/src/test/java/com/nordea/oss/copybook/serializers/CopyBookMapperFullTypeTest.java | [
"public class CopyBookSerializer {\n private CopyBookMapper serializer;\n\n public CopyBookSerializer(Class<?> type) {\n this(type, false);\n }\n\n public CopyBookSerializer(Class<?> type, boolean debug) {\n this(type, null, debug);\n }\n\n public CopyBookSerializer(Class<?> type, Cl... | import com.nordea.oss.copybook.CopyBookSerializer;
import com.nordea.oss.copybook.annotations.CopyBook;
import com.nordea.oss.copybook.annotations.CopyBookFieldFormat;
import com.nordea.oss.copybook.annotations.CopyBookLine;
import com.nordea.oss.copybook.converters.SignedDecimalToBigDecimal;
import com.nordea.oss.copy... | @org.junit.Test
public void testFieldTypeSignedIntegerPostfix() throws Exception {
CopyBookSerializer serializer = new CopyBookSerializer(fieldTypeSignedIntegerPostfix.class);
fieldTypeSignedIntegerPostfix test = new fieldTypeSignedIntegerPostfix();
test.field = -10;
byte[] testB... | public enum TestStringEnum implements TypeConverterStringEnum { | 4 |
EyeTribe/tet-java-client | javafx-sample/src/main/java/com/theeyetribe/javafx/scenes/SceneMainController.java | [
"public class GazeManager extends GazeManagerCore\n{\n private GazeManager()\n {\n super();\n }\n\n public static GazeManager getInstance()\n {\n return Holder.INSTANCE;\n }\n\n private static class Holder\n {\n // thread-safe initialization on demand\n static fin... | import com.theeyetribe.clientsdk.GazeManager;
import com.theeyetribe.clientsdk.data.CalibrationResult;
import com.theeyetribe.clientsdk.data.GazeData;
import com.theeyetribe.clientsdk.data.Point2D;
import com.theeyetribe.clientsdk.utils.GazeUtils;
import com.theeyetribe.javafx.utils.FrameRateGazeDataDeque;
import com.t... | /*
* Copyright (c) 2013-present, The Eye Tribe.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.
*
*/
package com.theeyetribe.javafx.scenes;
/**
* Scene controller associated to the main scene
*/
public cl... | Point2D gaze = GazeFrameCache.getInstance().getLastSmoothedGazeCoordinates(); | 1 |
xiongwei-git/OneNote | myJot/src/main/java/com/ted/jots/myjot/main/MainPresenter.java | [
"public class WidgetForFourXFour extends BaseAppWidgetProvider {\n\n @Override\n public ComponentName getWidgetComponentName(Context context) {\n return new ComponentName(context, WidgetForFourXFour.class);\n }\n\n @Override\n public RemoteViews getWidgetRemoteViews(Context context) {\n ... | import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import android.widget.Toast;
import com.ted.jots.myjot.R;
import com.ted.jots.myjot.widget.WidgetForFourXFour;
import com.t... | package com.ted.jots.myjot.main;
/**
* Created by ted on 2016/12/23.
* in com.ted.jots.myjot.main
*/
public class MainPresenter {
public static void onShare(Context context, String content) {
if (TextUtils.isEmpty(content)) return;
Intent intent = new Intent();
intent.setAction("andr... | Intent intent3 = new Intent(context, WidgetForFourXThree.class); | 2 |
iChun/Hats | src/main/java/me/ichun/mods/hats/common/packet/PacketNewHatPart.java | [
"public class WorkspaceHats extends Workspace\n implements IHatSetter\n{\n public static final DecimalFormat FORMATTER = new DecimalFormat(\"#,###,###\");\n\n public final boolean fallback;\n public final @Nonnull LivingEntity hatEntity;\n public final HatsSavedData.HatPart hatDetails;\n publi... | import me.ichun.mods.hats.client.gui.WorkspaceHats;
import me.ichun.mods.hats.client.toast.NewHatPartToast;
import me.ichun.mods.hats.client.toast.Toast;
import me.ichun.mods.hats.common.Hats;
import me.ichun.mods.hats.common.world.HatsSavedData;
import me.ichun.mods.ichunutil.common.network.AbstractPacket;
import net.... | package me.ichun.mods.hats.common.packet;
public class PacketNewHatPart extends AbstractPacket
{
public boolean newHat; | public HatsSavedData.HatPart details; | 4 |
vbauer/jconditions | src/main/java/com/github/vbauer/jconditions/checker/IfScriptChecker.java | [
"public class CheckerContext<T> {\n\n private final Object instance;\n private final T annotation;\n\n\n public CheckerContext(final Object instance, final T annotation) {\n this.instance = instance;\n this.annotation = annotation;\n }\n\n\n public Object getInstance() {\n return... | import com.github.vbauer.jconditions.annotation.IfScript;
import com.github.vbauer.jconditions.core.CheckerContext;
import com.github.vbauer.jconditions.core.ConditionChecker;
import com.github.vbauer.jconditions.util.PropUtils;
import com.github.vbauer.jconditions.util.ReflexUtils;
import com.github.vbauer.jconditions... | package com.github.vbauer.jconditions.checker;
/**
* @author Vladislav Bauer
*/
public class IfScriptChecker implements ConditionChecker<IfScript> {
private static final String CONTEXT_ENV = "env";
private static final String CONTEXT_PROPS = "props";
private static final String CONTEXT_TEST = "test";... | final Callable<?> provider = ReflexUtils.instantiate(testInstance, providerClass); | 3 |
oSoc14/Artoria | app/src/main/java/be/artoria/belfortapp/mixare/lib/marker/PluginMarker.java | [
"public class Label implements ScreenObj, Parcelable {\n\tprivate float x, y;\n\tprivate float width, height;\n\tprivate ScreenObj obj;\n\n\tpublic void prepare(ScreenObj drawObj) {\n\t\tobj = drawObj;\n\t\tfloat w = obj.getWidth();\n\t\tfloat h = obj.getHeight();\n\n\t\tx = w / 2;\n\t\ty = 0;\n\n\t\twidth = w * 2;... | import android.location.Location;
import java.net.URLDecoder;
import be.artoria.belfortapp.mixare.lib.gui.Label;
import be.artoria.belfortapp.mixare.lib.gui.TextObj;
import be.artoria.belfortapp.mixare.lib.marker.draw.ClickHandler;
import be.artoria.belfortapp.mixare.lib.marker.draw.DrawCommand;
import be.artoria.belfo... | /*
* Copyright (C) 2012- Peer internet solutions & Finalist IT Group
*
* This file is part of be.artoria.belfortapp.mixare.
*
* 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 ve... | public Label txtLab = new Label(); | 0 |
Hevelian/hevelian-olastic | olastic-core/src/main/java/com/hevelian/olastic/core/processors/impl/BucketsAggegationsProcessor.java | [
"public class ElasticEdmEntitySet extends EdmEntitySetImpl {\n\n private ElasticCsdlEntitySet csdlEntitySet;\n private ElasticEdmProvider provider;\n\n /**\n * Initialize fields.\n * \n * @param provider\n * the EDM provider\n * @param container\n * the EDM ent... | import org.apache.olingo.commons.api.data.AbstractEntityCollection;
import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.server.api.ODataApplicationException;
import org.apache.olingo.server.api.uri.UriInfo;
import org.elasticsearch.action.search.SearchResponse;
import com.hevelian.olas... | package com.hevelian.olastic.core.processors.impl;
/**
* Custom Elastic processor for handling terms aggregations with metrics.
*
* @author rdidyk
*/
public class BucketsAggegationsProcessor extends AbstractESCollectionProcessor {
private Pagination pagination;
private String countAlias;
... | protected InstanceData<EdmEntityType, AbstractEntityCollection> parseResponse(
| 7 |
TatuLund/GridFastNavigation | GridFastNavigation-addon/src/main/java/org/vaadin/patrik/client/GridFastNavigationConnector.java | [
"@SuppressWarnings(\"serial\")\npublic class FastNavigation<T> extends AbstractExtension {\n\n private static Logger _logger = Logger.getLogger(\"FastNavigation\");\n \n private OffsetHelper offsetHelper = new OffsetHelper();\n\n private static Logger getLogger() {\n return _logger;\n }\n\n ... | import java.util.List;
import org.vaadin.patrik.FastNavigation;
import org.vaadin.patrik.client.EditorStateManager.EditorListener;
import org.vaadin.patrik.client.FocusTracker.FocusListener;
import org.vaadin.patrik.shared.FastNavigationClientRPC;
import org.vaadin.patrik.shared.FastNavigationServerRPC;
import org.vaad... | }
};
grid.addScrollHandler(event -> {
if (grid.isEditorActive()) {
Scheduler.get().scheduleFinally(() -> {
doEditorScrollOffsetFix();
});
}
});
grid.addColumnVisibilityChangeHandler(... | focusTracker.addListener(new FocusListener() { | 2 |
mobilejazz/CacheIO | sample/src/main/java/com/mobilejazz/sample/InitialActivity.java | [
"public class CacheIO {\n\n private Builder config;\n\n private CacheIO(Builder config) {\n this.config = config;\n }\n\n @SuppressWarnings(\"unchecked\")\n public <K, V> RxCache<K, V> newRxCache(Class<K> keyType, Class<V> valueType) {\n final KeyMapper<K> keyMapper = (KeyMapper<K>) config.keyMappers.get... | import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import com.mobilejazz.cacheio.CacheIO;
import com.mobilejazz.cacheio.FutureCache;
import com.mobilejazz.cacheio.RxCache;
import com.mobilejazz.cacheio.SyncCache;
import com.mobilejazz.cacheio.serializers.gson.GsonValueMa... | package com.mobilejazz.sample;
public class InitialActivity extends AppCompatActivity {
private static final String TAG = InitialActivity.class.getSimpleName();
public static final String USER_KEY_LIST = "user.key.list";
public static final String USER_KEY_ONE = "user.key.one";
@Override protected void onC... | .setValueMapper(new GsonValueMapper(GsonFactory.create())) | 5 |
mahadirz/UnitenInfo | app/src/main/java/my/madet/uniteninfo/MainHome.java | [
"public class NavDrawerListAdapter extends BaseAdapter {\n \n private Context context;\n private ArrayList<NavDrawerItem> navDrawerItems;\n \n public NavDrawerListAdapter(Context context, ArrayList<NavDrawerItem> navDrawerItems){\n this.context = context;\n this.navDrawerItems = navDr... | import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.widget.Dr... | /*
* The MIT License (MIT)
* Copyright (c) 2014 Mahadir Ahmad
*
* 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, ... | private MyPreferences myPreferences; | 3 |
mjuhasz/BDSup2Sub | src/main/java/bdsup2sub/gui/edit/EditDialogController.java | [
"public class ErasePatch {\n\n public final int x;\n public final int y;\n public final int width;\n public final int height;\n\n public ErasePatch(int x, int y, int width, int height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n}",
... | import static bdsup2sub.core.Configuration.*;
import static bdsup2sub.gui.support.EditPane.*;
import static bdsup2sub.utils.TimeUtils.ptsToTimeStr;
import static bdsup2sub.utils.TimeUtils.timeStrToPTS;
import bdsup2sub.bitmap.ErasePatch;
import bdsup2sub.core.Core;
import bdsup2sub.supstream.SubPicture;
import bdsup2su... | view.addUndoPatchButtonActionListener(new UndoPatchButtonActionListener());
view.addUndoAllPatchesButtonActionListener(new UndoAllPatchesButtonActionListener());
view.addStoreNextButtonActionListener(new StoreNextButtonActionListener());
view.addStorePrevButtonActionListener(new StorePre... | int x = ToolBox.getInt(view.getXTextFieldText()); | 4 |
jachness/blockcalls | app/src/androidTest/java/com/jachness/blockcalls/services/MasterCheckerTest.java | [
"public abstract class AndroidTest {\n private Context targetContext;\n private AllComponentTest component;\n private AppPreferences appPreferences;\n private Context context;\n\n protected void setUp() throws Exception {\n targetContext = InstrumentationRegistry.getTargetContext();\n c... | import android.support.test.runner.AndroidJUnit4;
import com.jachness.blockcalls.AndroidTest;
import com.jachness.blockcalls.exceptions.PhoneNumberException;
import com.jachness.blockcalls.exceptions.TooShortNumberException;
import com.jachness.blockcalls.stuff.AppPreferences;
import com.jachness.blockcalls.stuff.Block... | package com.jachness.blockcalls.services;
/**
* Created by jachness on 11/11/2016.
*/
@SuppressWarnings("TryWithIdenticalCatches")
@RunWith(AndroidJUnit4.class) | public class MasterCheckerTest extends AndroidTest { | 0 |
Sensis/http-stub-server | standalone/src/main/java/au/com/sensis/stubby/standalone/ServerHandler.java | [
"public class StubParam {\n\n private String name;\n private String value;\n \n public StubParam() { }\n\n public StubParam(String name, String value) {\n this.name = name;\n this.value = value;\n }\n\n public StubParam(StubParam other) { // copy constructor\n this.name = o... | import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.http.HttpStatus;
import org.apache.log4j.Logger;
import au.com.sensis.stubby.model.StubParam;
import au.com.sensis.stubby.model.St... | }
}
private void handleControl(HttpExchange exchange) throws IOException {
String path = exchange.getRequestURI().getPath();
Pattern pattern = Pattern.compile("^/_control/(.+?)(/(\\d+))?$");
Matcher matcher = pattern.matcher(path);
if (matcher.matches()) {
St... | return new RequestFilterBuilder().fromParams(params).getFilter(); | 7 |
BennSandoval/Woodmin | app/src/main/java/app/bennsandoval/com/woodmin/activities/LoginActivity.java | [
"public class Woodmin extends Application {\n\n public final String LOG_TAG = Woodmin.class.getSimpleName();\n\n @Override\n public void onCreate() {\n super.onCreate();\n Fabric.with(this, new Crashlytics());\n\n Picasso.Builder picassoBuilder = new Picasso.Builder(getApplicationConte... | import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.TargetApi;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.KeyEvent;
import... | package app.bennsandoval.com.woodmin.activities;
public class LoginActivity extends AppCompatActivity {
public final String LOG_TAG = LoginActivity.class.getSimpleName();
private EditText mServerView;
private EditText mUserView;
private EditText mPasswordView;
private View mProgressView;
p... | Woocommerce woocommerceApi = ((Woodmin) getApplication()).getWoocommerceApiHandler(); | 1 |
R2RML-api/R2RML-api | r2rml-api-jena-binding/src/test/java/jenaTest/PredicateObjectMap_Test.java | [
"public class JenaR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static JenaR2RMLMappingManager INSTANCE = new JenaR2RMLMappingManager(new JenaRDF());\n\n private JenaR2RMLMappingManager(JenaRDF rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod... | import eu.optique.r2rml.api.model.LogicalTable;
import eu.optique.r2rml.api.model.ObjectMap;
import eu.optique.r2rml.api.model.PredicateMap;
import eu.optique.r2rml.api.model.PredicateObjectMap;
import eu.optique.r2rml.api.model.SubjectMap;
import eu.optique.r2rml.api.model.Template;
import eu.optique.r2rml.api.m... | /*******************************************************************************
* Copyright 2013, the Optique Consortium
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http... | Collection<TriplesMap> coll = mm.importMappings(m);
| 8 |
Flibio/JobsLite | src/main/java/me/flibio/jobslite/creation/task/KillTask.java | [
"public class Reward {\n\n private double currency;\n private double exp;\n\n public Reward(double currency, double exp) {\n this.currency = currency;\n this.exp = exp;\n }\n\n public double getCurrency() {\n return currency;\n }\n\n public double getExp() {\n return... | import org.spongepowered.api.Sponge;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.entity.EntityType;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.entity.InteractEntityEvent;
import org.sponge... | /*
* This file is part of JobsLite, licensed under the MIT License (MIT).
*
* Copyright (c) 2015 - 2018 Flibio
* Copyright (c) Contributors
*
* 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 So... | private Map<EntityType, Reward> rewards = new HashMap<>(); | 0 |
tang-jie/AvatarMQ | src/com/newlandframework/avatarmq/consumer/MessageConsumerHandler.java | [
"public class ConsumerAckMessage extends BaseMessage implements Serializable {\n\n private String ack;\n private int status;\n private String msgId;\n\n public String getAck() {\n return ack;\n }\n\n public void setAck(String ack) {\n this.ack = ack;\n }\n\n public int getStatu... | import io.netty.channel.ChannelHandlerContext;
import com.newlandframework.avatarmq.msg.ConsumerAckMessage;
import com.newlandframework.avatarmq.model.RequestMessage;
import com.newlandframework.avatarmq.model.ResponseMessage;
import com.newlandframework.avatarmq.model.MessageSource;
import com.newlandframework.avatarm... | /**
* Copyright (C) 2016 Newland Group Holding Limited
*
* 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 appli... | RequestMessage request = new RequestMessage(); | 1 |
fau-amos-2014-team-2/root | WoundManagement/src/main/java/com/fau/amos/team2/WoundManagement/WoundManagementUI.java | [
"public class Environment {\n\t\n\tprivate Employee currentEmployee = null;\n\tprivate Patient currentPatient = null;\n\tprivate boolean showCurrentWoundsOnly = true;\n\tprivate Wound currentWound = null;\n\tprivate WoundDescription currentWoundDescription = null;\n\tprivate Locale currentLocale = Locale.ENGLISH;\n... | import java.util.Locale;
import com.fau.amos.team2.WoundManagement.provider.Environment;
import com.fau.amos.team2.WoundManagement.resources.MessageResources;
import com.fau.amos.team2.WoundManagement.ui.CreateWoundDescriptionView;
import com.fau.amos.team2.WoundManagement.ui.PatientSelectionView;
import com.fau.amos.t... | package com.fau.amos.team2.WoundManagement;
/**
* The UI's "main" class
*
*/
@SuppressWarnings("serial")
@Widgetset("com.fau.amos.team2.WoundManagement.widgetset.WoundManagementWidgetset")
@Theme("wm-responsive")
@PreserveOnRefresh
public class WoundManagementUI extends UI {
private OfflineModeExtension offli... | setContent(new UserLoginView()); | 7 |
teivah/TIBreview | src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/CProcessorRendezvousResourceCertifiedTest.java | [
"public class TIBResource {\n\tprivate String filePath;\n\tprivate String type;\n\t\n\tprivate static final String REQUEST_GET_TYPE = \"/jndi:namedResource/@type\";\n\t\n\tpublic TIBResource(String filePath) throws Exception {\n\t\tthis.filePath = filePath;\n\t\tthis.type = Util.xpathEval(filePath, Constants.RESOUR... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.List;
import org.apache.log4j.Logger;
import org.junit.Test;
import com.tibco.exchange.tibreview.common.TIBResource;
import com.tibco.exchange.tibreview.engine.Context;
import com.tibco.exchange.tibreview.mod... | package com.tibco.exchange.tibreview.processor.resourcerule;
public class CProcessorRendezvousResourceCertifiedTest {
private static final Logger LOGGER = Logger.getLogger(CProcessorRendezvousResourceCertifiedTest.class);
@Test
public void testCProcessorRendezvousResourceCertifiedTest() {
TIBResou... | List<Violation> b = a.process(new Context(), fileresource, resource.getRule().get(0), Configuracion);
| 2 |
davidbecker/taloonerrl | core/src/main/java/de/brainstormsoftworks/taloonerrl/system/CameraSystem.java | [
"public class CameraFollowComponent extends Component {\n\n}",
"@Getter\n@Setter\npublic class PositionComponent extends PooledComponent implements ISetAbleComponent<PositionComponent> {\n\n\tprivate static final int VELOCITY_DEFAULT = 2;\n\tprivate int velocity = VELOCITY_DEFAULT;\n\n\tpublic int x = -1;\n\tpubl... | import com.artemis.Aspect;
import com.artemis.systems.IteratingSystem;
import de.brainstormsoftworks.taloonerrl.components.CameraFollowComponent;
import de.brainstormsoftworks.taloonerrl.components.PositionComponent;
import de.brainstormsoftworks.taloonerrl.core.engine.ComponentMappers;
import de.brainstormsoftworks.ta... | /*******************************************************************************
* Copyright (c) 2015-2018 David Becker.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v2.0
* which accompanies this distribution, and is available at
... | super(Aspect.all(PositionComponent.class, CameraFollowComponent.class)); | 0 |
winzillion/FluxJava | demo-rx2/src/sharedTest/java/com/example/fluxjava/rx2/domain/stores/StubTodoStore.java | [
"public class TodoAction extends FluxAction<Integer, List<Todo>> {\n\n public TodoAction(final Integer inType, final List<Todo> inData) {\n super(inType, inData);\n }\n\n}",
"public class Todo {\n\n public int id;\n public String title;\n public String dueDate;\n public String memo;\n ... | import com.example.fluxjava.rx2.domain.actions.TodoAction;
import com.example.fluxjava.rx2.domain.models.Todo;
import io.wzcodes.fluxjava.IFluxAction;
import io.wzcodes.fluxjava.IFluxBus;
import static com.example.fluxjava.rx2.domain.Constants.TODO_LOAD; | /*
* Copyright (C) 2016 Bugs will find a way (https://wznote.blogspot.com)
*
* 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
*
* Unl... | public StubTodoStore(final IFluxBus inBus) { | 3 |
apache/geronimo-gshell | gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java | [
"public class Shell\n{\n //\n // TODO: Introduce Shell interface?\n //\n\n private static final Log log = LogFactory.getLog(Shell.class);\n\n private final IO io;\n\n private final ShellContainer shellContainer = new ShellContainer();\n\n private final CommandManager commandManager;\n\n priv... | import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.geronimo.gshell.Shell;
import org.apache.geronimo.gshell.InteractiveShell;
import org.apache.geronimo.gshell.console.IO;
import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.console.JLi... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | private final IO io = new IO(); | 2 |
rla/while | src/com/infdot/analysis/cfg/Cfg.java | [
"public abstract class AbstractNode {\n\tprivate Set<AbstractNode> successors = new HashSet<AbstractNode>();\n\tprivate Set<AbstractNode> predecessors = new HashSet<AbstractNode>();\n\t\n\t/**\n\t * Adds given successor to this node. This node will be\n\t * automatically added to the given node's predecessors.\n\t ... | import com.infdot.analysis.cfg.node.AbstractNode;
import com.infdot.analysis.cfg.node.EntryNode;
import com.infdot.analysis.cfg.node.ExitNode;
import com.infdot.analysis.cfg.node.visitor.AbstractNodeVisitor;
import com.infdot.analysis.language.statement.Statement; | package com.infdot.analysis.cfg;
/**
* Represents program CFG (Control Flow Graph).
*
* @author Raivo Laanemets
*/
public class Cfg {
private AbstractNode start;
/**
* Constructs CFG from the given program. Adds single exit
* node automatically.
*/
public Cfg(Statement program) {
Fragment fragment =... | start = new EntryNode(); | 1 |
paramsen/currency-android-reactive | app/src/main/java/com/amsen/par/cewlrency/view/view/CurrencyTextView.java | [
"public class EventStream extends AbstractEventStream<Event> {\n public EventStream() {\n super();\n\n stream().doOnCompleted(() -> {\n if (BuildConfig.DEBUG) {\n throw new RuntimeException(\"AbstractEventStream should not be completed\");\n }\n });\n ... | import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.TextView;
import com.amsen.par.cewlrency.base.rx.event.EventStream;
import com.amsen.par.cewlrency.base.rx.subscriber.SubscriberUtils;
import com.amsen.par.cewlrency.base.util.CurrencyUtil;
import com.a... | package com.amsen.par.cewlrency.view.view;
/**
* @author Pär Amsen 2016
*/
public class CurrencyTextView extends TextView {
@Inject
EventStream eventStream;
@Inject
CurrencySource source;
| private Currency currencyFrom; | 4 |
Nilhcem/droidconde-2016 | app/src/main/java/com/nilhcem/droidconde/data/database/dao/SessionsDao.java | [
"@Singleton\npublic class LocalDateTimeAdapter {\n\n private final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\", Locale.US);\n\n @Inject\n public LocalDateTimeAdapter() {\n }\n\n @ToJson\n public String toText(LocalDateTime dateTime) {\n return dateTime.for... | import android.database.Cursor;
import com.nilhcem.droidconde.core.moshi.LocalDateTimeAdapter;
import com.nilhcem.droidconde.data.app.SelectedSessionsMemory;
import com.nilhcem.droidconde.data.database.DbMapper;
import com.nilhcem.droidconde.data.database.model.SelectedSession;
import com.nilhcem.droidconde.data.databa... | package com.nilhcem.droidconde.data.database.dao;
@Singleton
public class SessionsDao {
private final BriteDatabase database;
private final DbMapper dbMapper;
private final SpeakersDao speakersDao; | private final LocalDateTimeAdapter adapter; | 0 |
gems-uff/prov-viewer | src/main/java/br/uff/ic/SimilarityCollapse/AutomaticInference.java | [
"public class GraphMatching {\n\n private int edgeID = 0;\n private int vertexID = 0;\n private double threshold;\n private String defaultError;\n private double defaultWeight;\n Map<String, Edge> duplicateEdges;\n private final Map<String, Object> vertexList;\n private final Map<String, Edg... | import edu.uci.ics.jung.graph.DirectedGraph;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import br.uff.ic.graphmatching.GraphMatching;
import br.uff.ic.provviewer.VariableNames;
import br.uff.ic.utility.Attribut... | // c.add(point);
c.put(((Vertex) point).getID(), point);
ArrayList<Object> n2 = getNeighbours(point, cg);
n = merge(n, n2);
}
ind++;
}
}
private ArrayList<Object> merge(ArrayList<Object> a, ArrayList<Object> ... | if (!GraphUtils.isSameVertexTypes((Vertex)p, (Vertex)q)) | 3 |
binarybird/Redress-Disassembler | src/main/java/redress/gui/MainController.java | [
"public abstract class AbstractABI implements IStructure {\n\n protected AbstractABI(byte[] raw) {\n this.raw=raw;\n }\n\n public abstract ABIType getType();\n public abstract ABIArch getArch();\n\n protected final byte[] raw;\n protected final LinkedList<IStructure> children = new LinkedLi... | import redress.abi.generic.AbstractABI;
import redress.abi.generic.IContainer;
import redress.abi.generic.visitors.LoadVisitor;
import redress.memory.data.AbstractData;
import javafx.application.Application;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ChangeListener;
import javafx.fxml... | package redress.gui;
/**
* Created by jamesrichardson on 2/15/16.
*/
public class MainController extends AnchorPane {
public static final String CODEWINDOW_NAME = "Code Window";
private final static Logger LOGGER = Logger.getLogger(MainController.class.getName());
private static MainController mainCon... | private AbstractABI abi; | 0 |
GaoGersy/LiveShow | app/src/main/java/com/gersion/pictureshow/ui/adapter/PictureJokeAdapter.java | [
"public abstract class BaseRVAdapter<T> extends RecyclerView.Adapter implements OnItemClickListener {\n protected List<T> mData = new ArrayList<>();\n protected BaseViewHolder mViewHolder;\n private int mPosition;\n protected OnItemClickListener mListener;\n private Context mContext;\n\n public Ba... | import android.view.View;
import com.gersion.pictureshow.R;
import com.gersion.pictureshow.base.BaseRVAdapter;
import com.gersion.pictureshow.base.BaseViewHolder;
import com.gersion.pictureshow.model.bean.DataBean;
import com.gersion.pictureshow.model.bean.JokeBean;
import com.gersion.pictureshow.ui.viewholder.PictureJ... | package com.gersion.pictureshow.ui.adapter;
/**
* @作者 Gersy
* @版本
* @包名 com.gersion.pictureshow.ui.adapter
* @待完成
* @创建时间 2016/11/24
* @功能描述 TODO
* @更新人 $
* @更新时间 $
* @更新版本 $
*/
public class PictureJokeAdapter extends BaseRVAdapter<DataBean> {
public PictureJokeAdapter(List<DataBean> data) {
s... | return new PictureJokeViewHolder(view); | 4 |
daalft/PaliNLP2 | src/de/unitrier/daalft/pali/morphology/strategy/NounStrategy.java | [
"public class ConstructedWord\n{\n\n\t////////////////////////////////////////////////////////////////////////////////////////////////\n\t// Constants\n\t////////////////////////////////////////////////////////////////////////////////////////////////\n\n\t////////////////////////////////////////////////////////////... | import java.util.ArrayList;
import java.util.List;
import de.general.log.*;
import de.unitrier.daalft.pali.morphology.element.ConstructedWord;
import de.unitrier.daalft.pali.morphology.element.FeatureSet;
import de.unitrier.daalft.pali.morphology.element.Morph;
import de.unitrier.daalft.pali.morphology.element.Morpheme... | package de.unitrier.daalft.pali.morphology.strategy;
/**
* Pre-configured class for nouns. Uses the general declension strategy.
* @author David
*
*/
public class NounStrategy extends AbstractStrategy {
////////////////////////////////////////////////////////////////
// Constants
////////////////////////... | Paradigm a = nouns.getParadigmByFeatures(new FeatureSet("declension", "a")); | 1 |
VanetSim/VanetSim | src/vanetsim/scenario/KnownPenalties.java | [
"public final class Renderer{\r\n\r\n\t/** The only instance of this class (singleton). */\r\n\tprivate static final Renderer INSTANCE = new Renderer();\r\n\r\n\t/**\r\n\t * Gets the single instance of this renderer.\r\n\t * \r\n\t * @return single instance of this renderer\r\n\t */\r\n\tpublic static Renderer getI... | import vanetsim.gui.Renderer;
import vanetsim.gui.helpers.EventLogWriter;
import vanetsim.map.Street;
import vanetsim.scenario.events.EventList;
import vanetsim.scenario.events.StartBlocking;
import vanetsim.scenario.events.StopBlocking;
| /*
* VANETsim open source project - http://www.vanet-simulator.org
* Copyright (C) 2008 - 2013 Andreas Tomandl, Florian Scheuer, Bernhard Gruber
*
* 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 Softwa... | if(logEvents_) EventLogWriter.log(Renderer.getInstance().getTimePassed() + "," + penaltyType + "," + x + "," + y + "," + ID + "," + vehicle_.getID());
| 0 |
Airpy/KeywordDrivenAutoTest | src/test/java/com/keyword/automation/bill/sale/Test003_Sale_TestReturnSaleBill.java | [
"public class BrowserKeyword {\n // 不允许被初始化\n private BrowserKeyword() {\n\n }\n\n /**\n * 使用默认浏览器打开指定url\n *\n * @param requestUrl 请求url地址\n */\n public static void browserOpen(String requestUrl) {\n BrowserType bType = BrowserType.valueOf(Constants.DEFAULT_BROWSER);\n ... | import com.keyword.automation.action.BrowserKeyword;
import com.keyword.automation.base.utils.LogUtils;
import com.keyword.automation.bean.BillCell;
import com.keyword.automation.bean.BillFooter;
import com.keyword.automation.bean.BillHeader;
import com.keyword.automation.bean.BillWhole;
import com.keyword.automation.c... | package com.keyword.automation.bill.sale;
/**
* 入口:销售-制作单据-退货单<br/>
* 主要测试功能:
* 1、新增退货单
*
* @author Amio_
*/
public class Test003_Sale_TestReturnSaleBill {
private static List<BillCell> billCellList = new ArrayList<BillCell>();
private static BillHeader billHeader = new BillHeader("测试客户", null, "测试仓库",... | private static BillFooter billFooter = new BillFooter(1.10, 2.20, 0.0, 3.30, 0.0, 0.0); | 3 |
sofn/trpc | trpc-client/src/main/java/com/github/sofn/trpc/client/TrpcClientProxy.java | [
"public abstract class AbstractTrpcClient<T> {\n protected Map<String, T> clients = new ConcurrentHashMap<>();\n protected ThriftServerInfo serverInfo;\n\n public AbstractTrpcClient(ThriftServerInfo serverInfo) {\n this.serverInfo = serverInfo;\n }\n\n /**\n * 建立socket连接\n */\n publ... | import com.github.sofn.trpc.client.client.AbstractTrpcClient;
import com.github.sofn.trpc.client.config.ClientArgs;
import com.github.sofn.trpc.client.factory.ClientCluster;
import com.github.sofn.trpc.core.config.ThriftServerInfo;
import com.github.sofn.trpc.core.exception.TRpcException;
import javassist.util.proxy.Me... | package com.github.sofn.trpc.client;
/**
* @author sofn
* @version 1.0 Created at: 2016-09-19 16:05
*/
@Setter
@Slf4j
public class TrpcClientProxy {
private ClientArgs clientArgs;
@SuppressWarnings("unchecked")
public <T> T client() {
Class clazz;
String className = clientArgs.getServ... | Pair<ThriftServerInfo, AbstractTrpcClient> borrowClient = ClientCluster.getBlockClient(clientArgs); | 2 |
gomathi/merkle-tree | src/org/hashtrees/usage/HashTreesUsage.java | [
"public interface HashTrees {\n\n\t/**\n\t * Adds the (key,value) pair to the store. Intended to be used while synch\n\t * operation.\n\t * \n\t * @param keyValuePairs\n\t */\n\tvoid sPut(List<KeyValue> keyValuePairs) throws IOException;\n\n\t/**\n\t * Deletes the keys from the store. Intended to be used while sync... | import org.hashtrees.util.Pair;
import org.junit.Test;
import java.io.IOException;
import java.util.Arrays;
import junit.framework.Assert;
import org.hashtrees.HashTrees;
import org.hashtrees.HashTreesImpl;
import org.hashtrees.SimpleTreeIdProvider;
import org.hashtrees.SyncType;
import org.hashtrees.store.HashTreesMem... | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... | new SimpleTreeIdProvider(), new HashTreesMemStore()) | 4 |
opencb/bionetdb | bionetdb-app/src/main/java/org/opencb/bionetdb/app/cli/admin/AdminMain.java | [
"public abstract class CommandExecutor {\n\n protected String logLevel;\n protected String configFile;\n\n protected String appHome;\n protected BioNetDBConfiguration configuration;\n\n protected BioNetDbManager bioNetDbManager;\n\n protected Logger logger;\n\n public CommandExecutor() {\n\n ... | import com.beust.jcommander.ParameterException;
import org.apache.commons.lang3.StringUtils;
import org.opencb.bionetdb.app.cli.CommandExecutor;
import org.opencb.bionetdb.app.cli.admin.executors.BuildCommandExecutor;
import org.opencb.bionetdb.app.cli.admin.executors.DownloadCommandExecutor;
import org.opencb.bionetdb... | /*
* Copyright 2015-2020 OpenCB
*
* 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 ... | } catch (IOException | BioNetDBException e) { | 4 |
begab/kpe | src/hu/u_szeged/kpe/features/AcronymFeature.java | [
"public class NGram extends ArrayList<CoreLabel> implements Cloneable {\n\n private static PorterStemmer ps = new PorterStemmer();\n private static final long serialVersionUID = 3797853353962652098l;\n private static final CoreLabelComparator coreLabelComparator = new CoreLabelComparator();\n private static Wor... | import hu.u_szeged.kpe.candidates.NGram;
import hu.u_szeged.kpe.candidates.NGram.SequenceType;
import hu.u_szeged.kpe.candidates.NGramStats;
import hu.u_szeged.kpe.readers.DocumentData;
import hu.u_szeged.utils.NLPUtils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util... | package hu.u_szeged.kpe.features;
/**
* Decides whether a given keyphrase aspirant is an extended for of an acronym present in its document.
*/
public class AcronymFeature extends Feature {
private static final long serialVersionUID = -499383355487365213L;
private Set<String> abbreviations;
public AcronymF... | longTerm = NLPUtils.join(longTerm.split("-")).toLowerCase(); | 4 |
tliron/scripturian | components/scripturian/source/com/threecrickets/scripturian/adapter/jsr223/GroovyAdapter.java | [
"public class Executable\n{\n\t//\n\t// Constants\n\t//\n\n\t/**\n\t * Prefix prepended to on-the-fly scriptlets stored in the document source.\n\t */\n\tpublic static final String ON_THE_FLY_PREFIX = \"_ON_THE_FLY_\";\n\n\t//\n\t// Static operations\n\t//\n\n\t/**\n\t * If the executable does not yet exist in the ... | import java.util.Collection;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import com.threecrickets.scripturian.Executable;
import com.threecrickets.scripturian.ExecutionContext;
import com.threecrickets.scripturian.LanguageAdapter;
import com.threecrickets.scripturian.LanguageManager;
import com... | /**
* Copyright 2009-2017 Three Crickets LLC.
* <p>
* The contents of this file are subject to the terms of the LGPL version 3.0:
* http://www.gnu.org/copyleft/lesser.html
* <p>
* Alternatively, you can obtain a royalty free commercial license with less
* limitations, transferable or non-transferable, directly f... | public void afterCall( ScriptEngine scriptEngine, ExecutionContext executionContext ) | 1 |
batsw/AndroidAnonymityChat | app/src/main/java/com/batsw/anonimitychat/MainActivity.java | [
"public class AppController {\n private static final String LOG = AppController.class.getSimpleName();\n\n private static AppController mInstance;\n\n private AppCompatActivity mMainScreenActivity = null;\n\n private boolean mIsBackended = false;\n\n private static Activity mCurrentActivityContext = ... | import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.ActionMode;
import android.view.View;
import android.widget.Button;
import... | package com.batsw.anonimitychat;
public class MainActivity extends AppCompatActivity {
protected static final String MAIN_ACTIVITY_TAG = MainActivity.class.getSimpleName();
Button torStopButton, connectToTorClient, mPreviewButton, mStartTorButton;
TextView mPartnerHostname, mTorStatusTextView, mMyTorA... | startActivity(new Intent(getApplicationContext(), MainScreenActivity.class)); | 3 |
mgilangjanuar/GoSCELE | app/src/main/java/com/mgilangjanuar/dev/goscele/modules/main/provider/HomeProvider.java | [
"public abstract class BaseProvider extends AsyncTask<String, Integer, List<Elements>> {\n\n protected Map<String, String> cookies = new HashMap<>();\n\n public BaseProvider() {\n super();\n }\n\n @Override\n @Deprecated\n protected List<Elements> doInBackground(String... params) {\n ... | import com.activeandroid.Model;
import com.mgilangjanuar.dev.goscele.base.BaseProvider;
import com.mgilangjanuar.dev.goscele.modules.common.model.CookieModel;
import com.mgilangjanuar.dev.goscele.modules.main.adapter.HomeRecyclerViewAdapter;
import com.mgilangjanuar.dev.goscele.modules.main.listener.HomeListener;
impor... | package com.mgilangjanuar.dev.goscele.modules.main.provider;
/**
* Created by mgilangjanuar (mgilangjanuar@gmail.com)
*
* @since 2017
*/
public class HomeProvider extends BaseProvider {
private HomeListener listener;
public HomeProvider(HomeListener listener) {
this.listener = listener;
}... | listener.onRetrieve(new HomeRecyclerViewAdapter(list)); | 2 |
ParaskP7/sample-code-posts | app/src/main/java/io/petros/posts/app/PostsApplication.java | [
"public class AppSnackbarActions implements SnackbarActions {\n\n private final PostsApplication application;\n private final String defaultActionText;\n\n @Nullable private CoordinatorLayout coordinatorLayout;\n\n public AppSnackbarActions(final PostsApplication application) {\n this.application... | import android.app.Activity;
import android.app.Application;
import android.support.v7.app.AppCompatDelegate;
import javax.inject.Inject;
import io.petros.posts.app.actions.AppSnackbarActions;
import io.petros.posts.app.actions.SnackbarActions;
import io.petros.posts.app.graph.components.ApplicationComponent;
import io... | package io.petros.posts.app;
@SuppressWarnings("checkstyle:overloadmethodsdeclarationorder")
public class PostsApplication extends Application {
private static ApplicationComponent applicationComponent;
static {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); // NOTE: This enables th... | public static SnackbarActions snackbar(final Activity activity) { | 1 |
tommai78101/PokemonWalking | levelEditor/src/main/java/script_editor/ScriptEditor.java | [
"public class Debug {\n\tstatic class NotYetImplemented {\n\t\tprivate int occurrences = 0;\n\t\tprivate final String location;\n\n\t\tpublic NotYetImplemented(String loc) {\n\t\t\tthis.location = loc;\n\t\t}\n\n\t\tpublic boolean grab(String loc) {\n\t\t\tif (this.location.equals(loc) && !this.hasReachedLimit()) {... | import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.I... |
String line = null;
trigger = null;
String checksum = null;
StringBuilder builder = new StringBuilder();
while ((line = reader.readLine()) != null) {
if (ScriptTags.BeginScript.beginsAt(line)) {
trigger = new Trigger();
trigger.setTriggerID(Short.parseShort(ScriptTags.BeginScript.removeScr... | Debug.warn("Saved Location: " + script.getAbsolutePath()); | 0 |
schibsted/triathlon | src/main/java/com/schibsted/triathlon/service/impl/TriathlonEndpointImpl.java | [
"public class ConstraintModel {\n static List<String> VALID_OPERATORS = new ArrayList<String>() {{\n add(\"UNIQUE\");\n add(\"CLUSTER\");\n add(\"GROUP_BY\");\n add(\"LIKE\");\n add(\"UNLIKE\");\n }};\n\n public String getField() {\n return field;\n }\n\n pub... | import com.google.inject.Guice;
import com.google.inject.Injector;
import com.netflix.eureka2.registry.instance.InstanceInfo;
import com.schibsted.triathlon.model.ConstraintModel;
import com.schibsted.triathlon.model.InstanceInfoModel;
import com.schibsted.triathlon.model.generated.Marathon;
import com.schibsted.triath... | /*
* Copyright (c) 2015 Schibsted Products and Technology
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | private Observable<ByteBuf> matchDataCenter(Marathon appDefinition) { | 2 |
krokers/exchange-rates-mvvm | presentation/src/test/java/eu/rampsoftware/er/di/TestCurrenciesActivityModule.java | [
"public interface CurrencyRepository {\n\n Observable<CurrencyData> getCurrencies(final Date date);\n\n Observable<SingleValue> getSeries(Date from, Date to, String currencyCode);\n}",
"public interface PreferencesData {\n void setCurrenciesExchangeDate(Date date);\n Optional<Date> getCurrenciesExchan... | import android.app.Activity;
import dagger.Module;
import dagger.Provides;
import eu.rampsoftware.er.data.CurrencyRepository;
import eu.rampsoftware.er.data.PreferencesData;
import eu.rampsoftware.er.domain.usecases.GetCurrenciesRatesDate;
import eu.rampsoftware.er.domain.usecases.GetCurrenciesUseCase;
import eu.rampso... | package eu.rampsoftware.er.di;
@Module
class TestCurrenciesActivityModule implements ICurrenciesActivityModule {
@Override
@Provides
public Activity provideActivity() {
return null;
}
@Provides
@Override | public GetCurrenciesUseCase provideGetCurrenciesUseCase(final CurrencyRepository mCurrencyRepository, final PreferencesData mPreferencesData) { | 1 |
danfickle/cpp-to-java-source-converter | src/main/java/com/github/danfickle/cpptojavasourceconverter/StmtEvaluator.java | [
"enum InitType\n{\n\tRAW,\n\tWRAPPED;\n}",
"enum TypeEnum\n{\n\tNUMBER, \n\tBOOLEAN,\n\tCHAR,\n\tVOID,\n\tOBJECT_POINTER,\n\tBASIC_POINTER,\n\tOBJECT,\n\tOBJECT_ARRAY,\n\tBASIC_ARRAY,\n\tANY,\n\tBASIC_REFERENCE,\n\tOBJECT_REFERENCE,\n\tOTHER,\n\tENUMERATION,\n\tUNKNOWN,\n\tFUNCTION,\n\tFUNCTION_POINTER,\n\tFUNCTI... | import java.util.ArrayList;
import java.util.List;
import org.eclipse.cdt.core.dom.ast.*;
import org.eclipse.cdt.core.dom.ast.cpp.*;
import com.github.danfickle.cpptojavasourceconverter.InitializationManager.InitType;
import com.github.danfickle.cpptojavasourceconverter.TypeManager.TypeEnum;
import com.github.danfickle... | package com.github.danfickle.cpptojavasourceconverter;
class StmtEvaluator
{
private TranslationUnitContext ctx;
StmtEvaluator(TranslationUnitContext con) {
ctx = con;
}
MStmt eval1Stmt(IASTStatement stmt) throws DOMException
{
List<MStmt> ret = evalStmt(stmt);
assert(ret.size() == 1);
return ret.g... | List<MExpression> exprs = ctx.converter.evaluateDeclarationReturnInitializers((IASTSimpleDeclaration) declarationStatement.getDeclaration(), InitType.WRAPPED); | 0 |
asaflevy/SelenuimExtend | src/test/java/com/outbrain/selenium/extjs/core/tests/ButtonComponentTest.java | [
"public class Window extends BasicForm {\r\n\r\n /**\r\n * Constructor for Window.\r\n * @param locator ComponentLocator\r\n */\r\n public Window(final ComponentLocator locator) {\r\n super(locator);\r\n }\r\n\r\n /**\r\n * Constructor for Window.\r\n * @param selenium Selenium\r\n * @param expre... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.mockito.Mockito;
import com.outbrain.selenium.extjs.components.Window;
import com.outbrain.selenium.extjs.core.locators.ComponentLocator;
import ... | package com.outbrain.selenium.extjs.core.tests;
/**
* @author Asaf Levy
* @version $Revision: 1.0
*/
public class ButtonComponentTest {
/**
* Method testWindow.
*/
@Test
public void testWindow() {
final Selenium sel = Mockito.mock(Selenium.class);
final ComponentLocatorF... | assertTrue("locator has the wrong type", locator instanceof TextOrLableLocator);
| 4 |
jjhesk/LoyalNativeSlider | testApp/src/main/java/com/hkm/loyalns/demos/ExampleClassic.java | [
"public class DataProvider {\n public static HashMap<String, Integer> getFileSrcHorizontal() {\n HashMap<String, Integer> file_maps = new HashMap<String, Integer>();\n file_maps.put(\"Hannibal\", R.drawable.hannibal);\n file_maps.put(\"Big Bang Theory\", R.drawable.bigbang);\n file_ma... | import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.os.Build;
import android.os.Handler;
import android.support.v4.view.animation.LinearOutSlowInInterpolator;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
impor... | package com.hkm.loyalns.demos;
public class ExampleClassic extends BaseApp {
@SuppressLint("ResourceAsColor")
protected void setupSlider() {
// remember setup first
mDemoSlider.setPresetTransformer(TransformerL.Accordion);
mDemoSlider.setPresetIndicator(SliderLayout.PresetIndicator... | mDemoSlider.setCustomAnimation(new DescriptionAnimation()); | 5 |
Netflix/netflix-graph | src/main/java/com/netflix/nfgraph/serializer/NFCompressedGraphSerializer.java | [
"public class NFGraphModelHolder implements Iterable<String> {\n\n public static final String CONNECTION_MODEL_GLOBAL = \"global\";\n\n private OrdinalMap<String> modelMap;\n\t\n\tpublic NFGraphModelHolder() {\n\t modelMap = new OrdinalMap<String>();\n\t modelMap.add(CONNECTION_MODEL_GLOBAL);\n\t}\n\t\n... | import com.netflix.nfgraph.NFGraphModelHolder;
import com.netflix.nfgraph.compressed.NFCompressedGraph;
import com.netflix.nfgraph.compressed.NFCompressedGraphPointers;
import com.netflix.nfgraph.spec.NFGraphSpec;
import com.netflix.nfgraph.spec.NFNodeSpec;
import com.netflix.nfgraph.spec.NFPropertySpec;
import com.net... | /*
* Copyright 2013 Netflix, 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 appli... | for(NFPropertySpec propertySpec : nodeSpec.getPropertySpecs()) { | 5 |
fSergio101/DaggerTwoBaseArchitecture | app/src/main/java/me/martinez/sergio/daggertwobasearchitecture/fragments/MainFragment.java | [
"@PerActivity\n@Component(dependencies = AppComponent.class, modules = {ActivityModule.class, MainActivityModule.class})\npublic interface MainActivityComponent extends MainFragment.Pluser{\n void injectActivity(MainActivity mainActivity);\n A provideA();\n List<String> provideDiInjectionHistory();\n Log4Me pro... | import me.martinez.sergio.daggertwobasearchitecture.test.D;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.List;
import javax.inject.Inject;
import me.martinez.sergio.daggertwobasearchitecture.R;
import me.... | /*
* Copyright (C) 2015 Sergio Martinez Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required b... | @Inject C c; | 5 |
msokolov/lux | src/test/java/lux/junit/QueryTestCase.java | [
"public class QueryStats {\n /**\n * the number of documents that matched the lucene query. If XPath was executed (there wasn't\n * a short-circuited eval of some sort), this number of XML documents will have been retrieved\n * from the database and processed.\n */\n public int docCount;\n ... | import static org.junit.Assert.*;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;
import lux.Compiler;
import lux.Evaluator;
import lux.QueryStats;
import lux.XdmResultSet;
import lux.exception.LuxException;
import lux.support.SearchExtractor;
import lux.xpath.AbstractExpression;
import ... | package lux.junit;
@Ignore
class QueryTestCase {
private final String name;
private final String query;
private final QueryTestResult expectedResult;
QueryTestCase (String name, String query, QueryTestResult expected) {
this.name = name;
this.query = query;
this.expect... | AbstractExpression ex = optimizedQuery.getBody(); | 2 |
Velli20/Tachograph | app/src/main/java/com/velli20/tachograph/database/DataBaseHandler.java | [
"public class App extends MultiDexApplication {\n private static App instance;\n\n public static App get() {\n return instance;\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n instance = this;\n }\n\n @Override\n protected void attachBaseContext(Contex... | import com.velli20.tachograph.App;
import com.velli20.tachograph.Event;
import com.velli20.tachograph.collections.ListItemLogGroup;
import com.velli20.tachograph.database.GetLoggedRouteTask.OnGetLoggedRouteListener;
import com.velli20.tachograph.location.CustomLocation;
import java.util.ArrayList;
import static com.vel... | if (!isDatabaseOpen()) {
openDatabase();
}
new DeleteLocationTask(mDb, eventId).setOnDatabaseActionCompletedListener(this).execute();
}
public void getSortedLog(String query, String months[], String titleWeek, int sortBy,
boolean includeDrivenDis... | void onTaskCompleted(ArrayList<ListItemLogGroup> list); | 2 |
maxanier/MinecraftSecondScreenMod | src/api/java/org/java_websocket/server/WebSocketServer.java | [
"public class SocketChannelIOHelper {\n\n\t/** Returns whether the whole outQueue has been flushed */\n\tpublic static boolean batch(WebSocketImpl ws, ByteChannel sockchannel)\n\t\t\tthrows IOException {\n\t\tByteBuffer buffer = ws.outQueue.peek();\n\t\tWrappedByteChannel c = null;\n\n\t\tif (buffer == null) {\n\t\... | import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketOptions;
import java.net.StandardSocketOptions;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChann... | /**
* Returns whether a new connection shall be accepted or not.<br>
* Therefore method is well suited to implement some kind of connection
* limitation.<br>
*
* @see {@link #onOpen(WebSocket, ClientHandshake)},
* {@link #onWebsocketHandshakeReceivedAsServer(WebSocket, Draft, ClientHandshake)}
**/
... | public final void onWebsocketOpen(WebSocket conn, Handshakedata handshake) { | 7 |
cvtienhoven/graylog-plugin-aggregates | src/main/java/org/graylog/plugins/aggregates/report/AggregatesReport.java | [
"public interface HistoryAggregateItem {\n\tpublic String getMoment();\n\t\n public long getNumberOfHits();\n \n}",
"public interface HistoryItemService {\n long count();\n\n HistoryItem create(HistoryItem historyItem);\n \n List<HistoryItem> all();\n\n\tList<HistoryAggregateItem> getForRule... | import java.io.ByteArrayOutputStream;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.inject.Inject;
impor... | package org.graylog.plugins.aggregates.report;
public class AggregatesReport extends Periodical {
private static final Logger LOG = LoggerFactory.getLogger(AggregatesReport.class);
private final ReportSender reportSender;
private final HistoryItemService historyItemService;
private final RuleService ruleServic... | private final ReportScheduleService reportScheduleService; | 3 |
mindwind/craft-armor | src/test/java/io/craft/armor/TestArmor.java | [
"public class ArmorDegradeException extends RuntimeException {\n\n\t\n\tprivate static final long serialVersionUID = -3156599947974023180L;\n\n\tpublic ArmorDegradeException() {}\n\n\tpublic ArmorDegradeException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}\n\n\tpublic ArmorDegradeException(S... | import io.craft.armor.api.ArmorDegradeException;
import io.craft.armor.api.ArmorFactory;
import io.craft.armor.api.ArmorService;
import io.craft.armor.api.ArmorTimeoutException;
import io.craft.armor.spi.ArmorInvocation;
import io.craft.armor.spi.ArmorListener;
import io.craft.atom.test.CaseCounter;
import java.lang.re... | package io.craft.armor;
/**
* @author mindwind
* @version 1.0, Dec 18, 2014
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring.xml")
public class TestArmor extends AbstractJUnit4SpringContextTests {
@Autowired private DemoService demoService ;
... | } catch (ArmorTimeoutException e) { | 3 |
enguerrand/xdat | src/main/java/org/xdat/workerThreads/DataSheetUpdateThread.java | [
"public class Main extends JFrame {\n\tpublic static final long serialVersionUID = 10L;\n\tprivate MainMenuBar mainMenuBar;\n\tprivate Session currentSession;\n\tprivate List<ChartFrame> chartFrames = new LinkedList<>();\n\tprivate final BuildProperties buildProperties;\n\tprivate final ClusterFactory clusterFactor... | import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.xdat.Main;
import org.xdat.chart.ParallelCoordinatesChart;
import org.xdat.data.ClusterSet;
import org.xdat.data.DataSheet;
import org.xdat.exceptions.InconsistentDataException;
import org.xdat.gui.frames.ChartFrame;
import javax.swi... | /*
* Copyright 2014, Enguerrand de Rochefort
*
* This file is part of xdat.
*
* xdat 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 v... | Map<ChartFrame, double[]> upperFilterValues = new HashMap<>(); | 5 |
dianping/polestar | src/main/java/com/dianping/polestar/engine/CommandQueryEngine.java | [
"public final class EnvironmentConstants {\n\tpublic final static Log LOG = LogFactory.getLog(EnvironmentConstants.class);\n\n\tpublic final static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(\n\t\t\t\"yyyy-MM-dd HH:mm:ss\");\n\tpublic static String DATA_FILE_EXTENSION = \".gz\";\n\tpublic static String WOR... | import java.io.File;
import java.text.MessageFormat;
import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.dianping.polestar.EnvironmentConstants;
import com.dianping.polestar.entity.Query;
import com.dianping.polestar.entity.QueryResult;... | package com.dianping.polestar.engine;
public class CommandQueryEngine implements IQueryEngine {
public static final Log LOG = LogFactory.getLog(CommandQueryEngine.class);
private static final MessageFormat SHELL_COMMAND_FORMAT = new MessageFormat(
" sudo -u {0} -i \"source /etc/profile; {1} -e {2}\" ");
priv... | public QueryResult postQuery(Query query) { | 2 |
lawremi/CustomOreGen | src/main/java/CustomOreGen/Server/ConsoleCommands.java | [
"@Mod(\"customoregen\")\npublic class CustomOreGenBase\n{\n public static CustomOreGenBase instance;\n \n public static final String MODID = \"customoregen\";\n public static Logger log = LogManager.getLogger();\n \n public static final String OPTIONS_FILENAME = \"CustomOreGen_Options.txt\";\n\tpu... | import java.io.Serializable;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import ja... | package CustomOreGen.Server;
public class ConsoleCommands
{
@Retention(RetentionPolicy.RUNTIME)
@Target( {ElementType.PARAMETER})
public @interface ArgName
{
String name() default "";
}
@Retention(RetentionPolicy.RUNTIME)
@Target( {ElementType.PARAMETER})
public @interface ArgO... | msg.append(CustomOreGenBase.getDisplayString() + " ("); | 0 |
RxBroadcast/RxBroadcast | src/test/java/rxbroadcast/integration/pp/PingPongUdpCausalOrderProtobufSerializer.java | [
"public interface Broadcast {\n /**\n * Broadcasts the given value when the returned {@code Observable} is subscribed to.\n * @param value the value to broadcast\n * @return an Observable stream representing the message sent status\n */\n @Contract(pure = true)\n Observable<@NotNull Void> s... | import rxbroadcast.Broadcast;
import rxbroadcast.CausalOrder;
import rxbroadcast.CausalOrderProtobufSerializer;
import rxbroadcast.ObjectSerializer;
import rxbroadcast.Serializer;
import rxbroadcast.UdpBroadcast;
import org.junit.Test;
import rx.Observable;
import rx.observers.TestSubscriber;
import java.net.DatagramSo... | package rxbroadcast.integration.pp;
@SuppressWarnings({"checkstyle:MagicNumber", "checkstyle:AvoidInlineConditionals"})
public final class PingPongUdpCausalOrderProtobufSerializer {
private static final int MESSAGE_COUNT = 100;
private static final long TIMEOUT = 30;
/**
* Receive a PING and resp... | final Broadcast broadcast = new UdpBroadcast<>( | 0 |
citerus/bookstore-cqrs-example | order-context-parent/order-command/src/main/java/se/citerus/cqrs/bookstore/ordercontext/order/command/CommandFactory.java | [
"public class ActivateOrderRequest extends TransportObject {\n\n @NotEmpty\n @Pattern(regexp = ID_PATTERN)\n public String orderId;\n\n}",
"public class CartDto {\n\n @NotEmpty\n @Pattern(regexp = ID_PATTERN)\n public String cartId;\n\n @Min(1)\n public long totalPrice;\n\n @Min(1)\n public int totalQua... | import se.citerus.cqrs.bookstore.ordercontext.api.ActivateOrderRequest;
import se.citerus.cqrs.bookstore.ordercontext.api.CartDto;
import se.citerus.cqrs.bookstore.ordercontext.api.LineItemDto;
import se.citerus.cqrs.bookstore.ordercontext.api.PlaceOrderRequest;
import se.citerus.cqrs.bookstore.ordercontext.order.Order... | package se.citerus.cqrs.bookstore.ordercontext.order.command;
public class CommandFactory {
public PlaceOrderCommand toCommand(PlaceOrderRequest request) {
List<OrderLine> itemsToOrder = getOrderLines(request.cart);
CustomerInformation customerInformation = getCustomerInformation(request);
long totalP... | return new PlaceOrderCommand(new OrderId(request.orderId), customerInformation, itemsToOrder, totalPrice); | 4 |
mfit/PdfTableAnnotator | src/main/java/at/tugraz/kti/pdftable/document/export/LogicalStructureExport.java | [
"public class TableCell {\n\n\tpublic static String HEADER_HEADER \t= \"header\";\n\tpublic static String HEADER_ROW \t= \"rowhead\";\n\tpublic static String HEADER_COL \t= \"colhead\";\n\tpublic static String HEADER_CAT \t= \"stubhead\";\n\t\n\t/**\n\t * Dimensions of cell, as [x1, y1, x2, y2]. \n\t */\n\tpublic A... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import javax.print.Doc;
import javax.xml.parsers.*;
import java... | package at.tugraz.kti.pdftable.document.export;
/**
* creates the structur export in ICDAR competition format
*
*/
public class LogicalStructureExport extends DOMExport {
Element transformTable(DocumentTable t, RichDocument src) throws DocumentException {
int i, row, col;
Element table = dom.createElemen... | BlockInfo bi = new BlockInfo(src.getCharactersInBoundingBox(t.page, tdout), ""); | 5 |
suninformation/ymate-payment-v2 | ymate-payment-wxpay/src/main/java/net/ymate/payment/wxpay/controller/WxPayNativeController.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.framework.commons.ParamUtils;
import net.ymate.payment.wxpay.IWxPay;
import net.ymate.payment.wxpay.IWxPayEventHandler;
import net.ymate.payment.wxpay.WxPay;
import net.ymate.payment.wxpay.base.WxPayAccountMeta;
import net.ymate.payment.wxpay.base.WxPayBaseData;
import net.ymate.payment.wxpay.request.W... | /*
* 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 = WxPay.get().getModuleCfg().getAccountProvider().getAccount(appId); | 3 |
Qyotta/axon-eventstore | eventstore-client/src/test/java/de/qyotta/eventstore/EsUtilsTest.java | [
"public interface ESReader {\n\n EventStreamFeed readStream(String url);\n\n EventResponse readEvent(String url);\n\n}",
"public interface ESWriter {\n\n void appendEvents(String url, Collection<Event> collection);\n\n void appendEvent(String url, Event event);\n\n void deleteStream(String url, boolean ... | import static org.junit.Assert.assertTrue;
import java.util.UUID;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import de.qyotta.eventstore.communication.ESReader;
import de.qyotta.eventstore.communication.ESWriter;
import de.qyotta.even... | package de.qyotta.eventstore;
@SuppressWarnings("nls")
public class EsUtilsTest extends AbstractEsTest {
static final Logger LOGGER = LoggerFactory.getLogger(EsUtilsTest.class.getName());
private ESWriter writer;
private ESReader reader;
@Before
public void setUp() {
writer = new EsWriterDefa... | for (final Entry entry : feed.getEntries()) { | 4 |
JANNLab/JANNLab | examples/de/jannlab/examples/recurrent/AddingExample.java | [
"public interface Net extends Serializable {\n //\n /**\n * Resets the network, which means that all inner\n * states (activations, derivations) are set to 0.0.\n * The method also resets the time index which is 0\n * after doing reset.\n */\n public void reset();\n /**\n * Initi... | import java.io.IOException;
import java.util.Random;
import de.jannlab.Net;
import de.jannlab.core.CellType;
import de.jannlab.data.Sample;
import de.jannlab.data.SampleSet;
import de.jannlab.generator.LSTMGenerator;
import de.jannlab.training.GradientDescent;
import de.jannlab.misc.TimeCounter;
import de.jannlab.tools... | /*******************************************************************************
* JANNLab Neural Network Framework for Java
* Copyright (C) 2012-2013 Sebastian Otte
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* th... | LSTMGenerator gen = new LSTMGenerator(); | 4 |
deephacks/westty | westty-core/src/main/java/org/deephacks/westty/internal/core/http/HttpPipelineFactory.java | [
"@ConfigScope\n@Config(name = \"servers\",\n desc = \"Server engine configuration. Changes requires server restart.\")\npublic class ServerConfig {\n\n public static final String DEFAULT_SERVER_NAME = \"server\";\n public static final String DEFAULT_CONF_DIR = \"conf\";\n public static final String ... | import org.deephacks.westty.config.ServerConfig;
import org.deephacks.westty.config.ServerSpecificConfigProxy;
import org.deephacks.westty.spi.HttpHandler;
import org.deephacks.westty.spi.ProviderShutdownEvent;
import org.deephacks.westty.spi.ProviderStartupEvent;
import org.jboss.netty.bootstrap.ServerBootstrap;
impor... | /**
* 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
* distribut... | private Instance<HttpHandler> handlers; | 2 |
devhub-tud/Java-Gitolite-Manager | src/main/java/nl/tudelft/ewi/gitolite/config/ConfigImpl.java | [
"public interface Identifiable extends Comparable<Identifiable>, Serializable {\n\n\tString getPattern();\n\n\t@Override\n\tdefault int compareTo(Identifiable o) {\n\t\treturn getPattern().compareTo(o.getPattern());\n\t}\n\n}",
"@Value\npublic class Identifier implements Identifiable {\n\n\t/**\n\t * The name for... | import com.google.common.collect.LinkedHashMultimap;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import com.google.common.collect.Queues;
import com.google.common.collect.SetMultimap;
import lombok.EqualsAndHashCode;
import lomb... | package nl.tudelft.ewi.gitolite.config;
/**
* Simple config implementation.
*
* @author Jan-Willem Gmelig Meyling
*/
@Slf4j
@NoArgsConstructor
@EqualsAndHashCode
public class ConfigImpl implements Config {
private final Multimap<String, GroupRule> groupRuleMultimap = LinkedListMultimap.create();
private fina... | public Collection<Rule> getRules() { | 6 |
FedericoPecora/coordination_oru | src/main/java/se/oru/coordination/coordination_oru/tests/TestTrajectoryEnvelopeCoordinatorWithMotionPlanner2.java | [
"public class ConstantAccelerationForwardModel implements ForwardModel {\n\t\t\n\tprivate double maxAccel, maxVel;\n\tprivate double temporalResolution = -1;\n\tprivate int trackingPeriodInMillis = 0;\n\tprivate int controlPeriodInMillis = -1;\n\t\n\tpublic ConstantAccelerationForwardModel(double maxAccel, double m... | import java.io.File;
import java.util.Comparator;
import org.metacsp.multi.spatioTemporal.paths.Pose;
import org.metacsp.multi.spatioTemporal.paths.PoseSteering;
import org.metacsp.multi.spatioTemporal.paths.TrajectoryEnvelope;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
... | package se.oru.coordination.coordination_oru.tests;
@DemoDescription(desc = "Coordination on paths obtained from the ReedsSheppCarPlanner for two robots navigating in the same direction.")
public class TestTrajectoryEnvelopeCoordinatorWithMotionPlanner2 {
public static void main(String[] args) throws Interrupted... | tec.addComparator(new Comparator<RobotAtCriticalSection> () { | 3 |
gantonious/ViewCellAdapter | sample-app/src/main/java/ca/antonious/sample/HeterogeneousSample.java | [
"public class SampleModel {\n private String name;\n\n public SampleModel(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n}",
"public class SelectableModel {\n private String name;\n\n public SelectableModel(String name) {\n this.n... | import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import java.util.Arrays;
import java.util.Locale;
import ca.antonious.sample.models.SampleModel;
import ca.antonious.sample.models.SelectableModel;
impor... | package ca.antonious.sample;
/**
* Created by George on 2017-01-08.
*/
public class HeterogeneousSample extends BaseActivity {
private ViewCellAdapter viewCellAdapter; | private Section mainSection; | 7 |
Bssentials/Bssentials | EssentialsBridge/src/main/java/com/earth2me/essentials/IEssentials.java | [
"public interface IItemDb {\n ItemStack get(final String name, final int quantity) throws Exception;\n\n ItemStack get(final String name) throws Exception;\n\n String names(ItemStack item);\n\n String name(ItemStack item);\n\n List<ItemStack> getMatching(User user, String[] args) throws Exception;\n\... | import com.earth2me.essentials.api.IItemDb;
import com.earth2me.essentials.api.IJails;
import com.earth2me.essentials.api.IWarps;
import com.earth2me.essentials.metrics.Metrics;
import com.earth2me.essentials.perm.PermissionsHandler;
import com.earth2me.essentials.register.payment.Methods;
import net.ess3.nms.SpawnerPr... | package com.earth2me.essentials;
// import com.earth2me.essentials.metrics.Metrics;
//import ml.bssentials.main.Metrics;
// import com.earth2me.essentials.perm.PermissionsHandler;
// import com.earth2me.essentials.register.payment.Methods;
public interface IEssentials extends Plugin {
void addReloadListener(IConf... | IWarps getWarps(); | 2 |
x7hub/Calendar_lunar | src/edu/bupt/calendar/agenda/AgendaFragment.java | [
"public class CalendarController {\n private static final boolean DEBUG = false;\n private static final String TAG = \"CalendarController\";\n private static final String REFRESH_SELECTION = Calendars.SYNC_EVENTS + \"=?\";\n private static final String[] REFRESH_ARGS = new String[] { \"1\" };\n priva... | import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.provider.CalendarContract.Attendees;
import android.text.format.Time;
import android.util.Log;
import a... | /*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | private EventInfo mOnAttachedInfo = null; | 1 |
jimmc/HapiPodcastJ | src/info/xuluan/podcast/EpisodesActivity.java | [
"public class FeedItem {\r\n\t\r\n\tpublic static final int MAX_DOWNLOAD_FAIL = 5;\r\n\t\r\n\tprivate final Log log = Log.getLog(getClass());\r\n\r\n\tpublic String url;\r\n\tpublic String title;\r\n\tpublic String author;\r\n\tpublic String date;\r\n\tpublic String content;\r\n\tpublic String resource;\r\n\tpublic... | import info.xuluan.podcastj.R;
import info.xuluan.podcast.provider.FeedItem;
import info.xuluan.podcast.provider.ItemColumns;
import info.xuluan.podcast.provider.SubscriptionColumns;
import info.xuluan.podcast.utils.DialogMenu;
import info.xuluan.podcast.utils.IconCursorAdapter;
import java.util.HashMap;
import android... | package info.xuluan.podcast;
public class EpisodesActivity extends PodcastBaseActivity implements PodcastTab {
private static final int MENU_ITEM_VIEW_CHANNEL = Menu.FIRST + 8;
private static final int MENU_ITEM_DETAILS = Menu.FIRST + 9;
private static final int MENU_ITEM_START_DOWNLOAD = Menu.FIRST + 10;
priv... | ItemColumns._ID, // 0 | 1 |
evolvingstuff/RecurrentJava | src/datasets/TextGeneration.java | [
"public class Graph {\n\tboolean applyBackprop;\n\t\n\tList<Runnable> backprop = new ArrayList<>();\n\t\n\tpublic Graph() {\n\t\tthis.applyBackprop = true;\n\t}\n\t\n\tpublic Graph(boolean applyBackprop) {\n\t\tthis.applyBackprop = applyBackprop;\n\t}\n\t\n\tpublic void backward() {\n\t\tfor (int i = backprop.size(... | import java.io.File;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import autodiff.Graph;
import datastructs.DataSequence;
import dat... | package datasets;
public class TextGeneration extends DataSet {
public static int reportSequenceLength = 100;
public static boolean singleWordAutocorrect = false;
public static boolean reportPerplexity = true;
private static Map<String, Integer> charToIndex = new HashMap<>();
private static Map<Integer, String... | public static String sequenceToSentence(DataSequence sequence) { | 1 |
Baseform/Baseform-Epanet-Java-Library | src/org/addition/epanet/network/io/input/InputParser.java | [
"public class Constants {\n\n\n public static double PI = 3.141592654;\n\n /**\n * Max. # of disconnected nodes listed\n */\n public static int MAXCOUNT = 10;\n /**\n * Max. # title lines\n */\n public static int MAXTITLE = 3;\n /**\n * Max. input er... | import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.addition.epanet.Constants;
import org.addition.epanet.util.ENException;
import org.addition.epanet.network.FieldsMap;
import org.addition.epanet.network.FieldsMap.*;
import org.addition.epanet.network.Network;
import org.addition.epanet.... | /*
* Copyright (C) 2012 Addition, Lda. (addition at addition dot pt)
*
* 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 ver... | for (Link link : net.getLinks()) { | 8 |
magmaOffenburg/magmaChallenge | srcTools/magma/tools/benchmark/view/bench/goalieChallenge/GoalieBenchmarkTableView.java | [
"public interface IModelReadOnly {\n\t/**\n\t * @return the results per team\n\t */\n\tList<ITeamResult> getTeamResults();\n\n\tboolean isRunning();\n\n\tList<TeamConfiguration> loadConfigFile(File file) throws InvalidConfigFileException;\n\n\tvoid attach(IObserver<IModelReadOnly> observer);\n\n\t/**\n\t * Removes ... | import magma.tools.benchmark.model.bench.goaliechallenge.GoalieBenchmarkTeamResult;
import magma.tools.benchmark.view.bench.BenchmarkTableView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.table.Defa... | /* Copyright 2009 Hochschule Offenburg
* Klaus Dorer, Mathias Ehret, Stefan Glaser, Thomas Huber,
* Simon Raffeiner, Srinivasa Ragavan, Thomas Rinklin,
* Joachim Schilling, Rajit Shahi
*
* This file is part of magmaOffenburg.
*
* magmaOffenburg is free software: you can redistribute it and/or modify
* it under ... | GoalieBenchmarkTeamResult goalieResult = (GoalieBenchmarkTeamResult) teamResult; | 3 |
Ouyangan/hunt-admin | hunt-web/src/main/java/com/hunt/controller/OrganizationController.java | [
"public class BaseController {\n private static final Logger log = LoggerFactory.getLogger(BaseController.class);\n @Autowired\n private SystemService systemService;\n\n /**\n * 极限验证码二次验证\n *\n * @param request\n * @return\n * @throws Exception\n */\n public boolean verifyCapt... | import com.hunt.controller.BaseController;
import com.hunt.model.dto.PageInfo;
import com.hunt.model.entity.SysOrganization;
import com.hunt.service.SysOrganizationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import... | package com.hunt.controller;
/**
* 组织机构模块
*/
@Api(value = "组织机构模块")
@Controller
@RequestMapping("organization")
public class OrganizationController extends BaseController {
private static Logger log = LoggerFactory.getLogger(OrganizationController.class);
@Autowired
private SysOrganizationService sysOr... | @ApiOperation(value = "新增机构", httpMethod = "POST", produces = "application/json", response = Result.class) | 5 |
fflewddur/archivo | src/net/straylightlabs/archivo/controller/ArchiveQueueManager.java | [
"public class Archivo extends Application {\n private Stage primaryStage;\n private final MAKManager maks;\n private final StringProperty statusText;\n private final ExecutorService rpcExecutor;\n private final UserPrefs prefs;\n private RootLayoutController rootController;\n private RecordingL... | import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import net.straylightlabs.archivo.Archivo;
import net.straylightlabs.archivo.model.ArchiveH... | /*
* Copyright 2015-2016 Todd Kulesza <todd@dropline.net>.
*
* This file is part of Archivo.
*
* Archivo is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your o... | public boolean enqueueArchiveTask(Recording recording, Tivo tivo, String mak) { | 4 |
cloudsoft/brooklyn-tosca | brooklyn-tosca-transformer/src/main/java/io/cloudsoft/tosca/a4c/brooklyn/plan/ToscaTypePlanTransformer.java | [
"public interface AlienPlatformFactory {\n\n ToscaPlatform newPlatform(ManagementContext mgmt) throws Exception;\n \n public static class Default implements AlienPlatformFactory {\n @Override\n public ToscaPlatform newPlatform(ManagementContext mgmt) throws Exception {\n Applicatio... | import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.brooklyn.api.entity.Application;
import org.apache.brooklyn.api.entity.EntitySpec;
import org.apache.brooklyn.api.internal.AbstractBrooklynObjectSpec;
import org.apache.brooklyn.api.mgmt.ManagementContext;
i... | package io.cloudsoft.tosca.a4c.brooklyn.plan;
public class ToscaTypePlanTransformer extends AbstractTypePlanTransformer {
private static final Logger log = LoggerFactory.getLogger(ToscaTypePlanTransformer.class);
public static final ConfigKey<Alien4CloudToscaPlatform> TOSCA_ALIEN_PLATFORM = ConfigKey... | return ToscaParser.isToscaScore(yamlMap.get()); | 3 |
aldebaran/jnaoqi | examples/desktop/HelloDesktop/src/com/aldebaran/demo/ExReactToVoice.java | [
"public interface EventCallback<T> {\n\t/**\n\t * Call when an Event is raised\n\t *\n\t * @param value the value return by the event, you can get the type in aldebaran doc\n\t * */\n\tpublic void onEvent(T value) throws InterruptedException, CallError;\n}",
"public class ALMemory extends ALMemoryHelper {\n\n ... | import java.util.ArrayList;
import java.util.List;
import com.aldebaran.qi.Application;
import com.aldebaran.qi.CallError;
import com.aldebaran.qi.helper.EventCallback;
import com.aldebaran.qi.helper.proxies.ALMemory;
import com.aldebaran.qi.helper.proxies.ALMotion;
import com.aldebaran.qi.helper.proxies.ALSpeechRecogn... | /**
* Copyright (c) 2015 Aldebaran Robotics. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the COPYING file.
* Created by epinault on 11/05/2014.
*/
package com.aldebaran.demo;
/**
* This example shows how the robot can obey to voice commands: 'wake u... | private static ALMotion motion; | 2 |
adelbs/ISO8583 | src/main/java/org/adelbs/iso8583/gui/PnlGuiMessages.java | [
"public abstract class CallbackAction {\n\n\tpublic abstract void dataReceived(SocketPayload payload) throws ParseException;\n\t\n\tpublic abstract void log(String log);\n\t\n\tpublic abstract void end();\n\n\tpublic void keepalive() { }\n}",
"public class ISOConnection {\n\n\tprivate final static int SLEEP_TIME ... | import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.io.IOException;
import java.net.Socket;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;... | pnlRequest.getBtnSendRequest().addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
try {
sendMessageAction(pnlMain);
}
catch (Exception x) {
x.printStackTrace();
JOptionPane.showMessageDialog(pnlMain, "Error trying to send the message\n" + ... | final Iso8583Config isoConfig = pnlMain.getIso8583Config(); | 5 |
debdattabasu/RoboMVVM | library/src/main/java/org/dbasu/robomvvm/viewmodel/MenuViewModel.java | [
"public enum BindMode {\n\n /**\n * Makes a one-way binding where the target property is set whenever the source property changes.\n */\n SOURCE_TO_TARGET(true, false),\n\n /**\n * Makes a one-way binding where the source property is set whenever the target property changes.\n */\n TARGE... | import android.content.Context;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import com.google.common.base.Preconditions;
import org.dbasu.robomvvm.binding.BindMode;
import org.dbasu.robomvvm.binding.Binding;
import org.dbasu.robomvvm.binding.ValueConverter;
import org.dbasu... | /**
* @project RoboMVVM
* @project RoboMVVM(https://github.com/debdattabasu/RoboMVVM)
* @author Debdatta Basu
*
* @license 3-clause BSD license(http://opensource.org/licenses/BSD-3-Clause).
* Copyright (c) 2014, Debdatta Basu. All rights reserved.
*
* Redistribution and use in source and binary forms,... | ObjectTagger.setTag(root, VIEW_MODEL, this); | 5 |
strooooke/quickfit | app/src/androidTest/java/com/lambdasoup/quickfit/screenshots/ScreenshotTest.java | [
"public class DatabasePreparationTestRule implements TestRule {\n public static final long NEXT_ALARM_MILLIS_PAST = 946681200000L; // year 2000\n static final long NEXT_ALARM_MILLIS_FUTURE = 2524604400000L; // year 2050\n public static final ContentValues w1 = new ContentValues();\n public static final ... | import androidx.test.rule.ActivityTestRule;
import androidx.test.runner.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import com.lambdasoup.quickfit.R;
import com.lambdasoup.quickfit.ui.WorkoutListActivity;
import com.lambdasoup.quickfit.util.DatabasePreparationTestRule;
import com.lambdasou... | /*
* Copyright 2016 Juliane Lehmann <jl@lambdasoup.com>
*
* 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 applicab... | String label1 = DatabasePreparationTestRule.labels.get(LocaleUtil.getTestLocale()).get(DatabasePreparationTestRule.w1); | 1 |
cahergil/Farmacias | app/src/main/java/com/chernandezgil/farmacias/presenter/FindPresenter.java | [
"public class Constants {\n\n public static final String SPACE = \" \";\n public static final String COMMA = \",\";\n public static final String CR = \"\\n\";\n public static final String EMPTY_STRING = \"\";\n public static final String SEMI_COLON=\":\";\n public static final int BOTTOM_NAVIGATIO... | import android.content.Intent;
import android.database.Cursor;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.v4.app.LoaderManager;
import a... | mLocation.getLongitude() ),currentAddress,
new LatLng(pharmacy.getLat(),pharmacy.getLon()),pharmacy.getAddressFormatted() );
mView.launchActivity(intent);
}
@Override
public void onClickFavorite(Pharmacy pharmacy) {
final String snackMessage = Utils.changeFav... | farmacia.setName(data.getString(data.getColumnIndex(DbContract.FarmaciasEntity.NAME))); | 3 |
TeamCohen/SEAL | src/com/rcwang/seal/expand/SetExpander.java | [
"public class DocumentSet implements Iterable<Document>, Serializable {\r\n \r\n public static final double DELTA = 1e-10;\r\n public static final int DEFAULT_MAX_DOCS_IN_XML = 5;\r\n \r\n private static final long serialVersionUID = 7211782411429869181L;\r\n private Map<Document, Document> docMap;\r\n priva... | import java.io.File;
import java.util.List;
import org.apache.log4j.Logger;
import org.w3c.dom.Element;
import com.rcwang.seal.fetch.DocumentSet;
import com.rcwang.seal.rank.Ranker;
import com.rcwang.seal.rank.Ranker.Feature;
import com.rcwang.seal.util.GlobalVar;
import com.rcwang.seal.util.Helper;
import com... | /**************************************************************************
* Developed by Language Technologies Institute, Carnegie Mellon University
* Written by Richard Wang (rcwang#cs,cmu,edu)
**************************************************************************/
package com.rcwang.seal.expand;
... | Helper.createDir(file.getParentFile());
| 4 |
NasaGeek/utexas-utilities | app/src/main/java/com/nasageek/utexasutilities/fragments/ExamScheduleFragment.java | [
"public class AuthCookie {\n\n protected String prefKey;\n protected String authCookie;\n protected String authCookieKey;\n protected String userNameKey;\n protected String passwordKey;\n protected boolean cookieHasBeenSet;\n protected OkHttpClient client;\n protected SharedPreferences setti... | import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.view.ActionMode;
import android.text.Html;
import android.text.Spanned;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.Me... |
package com.nasageek.utexasutilities.fragments;
public class ExamScheduleFragment extends ScheduleFragment implements ActionModeFragment,
ActionMode.Callback, AdapterView.OnItemClickListener {
private ArrayList<String> exams = new ArrayList<>();
private ListView examListview;
private LinearLa... | private UTilitiesApplication mApp = UTilitiesApplication.getInstance(); | 4 |
Jacksgong/JKeyboardPanelSwitch | library/src/main/java/cn/dreamtobe/kpswitch/widget/KPSwitchFSPanelLinearLayout.java | [
"public interface IFSPanelConflictLayout {\n\n /**\n * Record the current keyboard status on {@link Activity#onPause()} and will be restore\n * the keyboard status automatically {@link Activity#onResume()}\n * <p/>\n * Recommend invoke this method on the {@link Activity#onPause()}, to record the ... | import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.Window;
import android.widget.LinearLayout;
import cn.dreamtobe.kpswitch.IFSPanelConflictLayout;
import cn.dreamtobe.kpswitch.IPanelHeightTarget;
import cn.dreamtobe.kpswit... | /*
* Copyright (C) 2015-2017 Jacksgong(blog.dreamtobe.cn)
*
* 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 applic... | ViewUtil.refreshHeight(this, panelHeight); | 4 |
RoboTricker/Transport-Pipes | src/main/java/de/robotricker/transportpipes/inventory/CreativeInventory.java | [
"public class LangConf extends Conf {\n\n private static LangConf langConf;\n\n public LangConf(Plugin configPlugin, String language) {\n super(configPlugin, \"lang_\" + language.toLowerCase(Locale.ENGLISH) + \".yml\", \"lang.yml\", true);\n langConf = this;\n }\n\n public enum Key {\n\n ... | import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import javax.inject.Inject;
import de.robotricker.transportpipes.config.LangConf;
import de.robotricker.transportpipes.duct.Duct;
import de.robotricker.transportpipes.duct.DuctRegiste... | package de.robotricker.transportpipes.inventory;
public class CreativeInventory extends IndividualInventory {
@Inject
ItemService itemService;
@Inject | DuctRegister ductRegister; | 2 |
ferstl/depgraph-maven-plugin | src/test/java/com/github/ferstl/depgraph/graph/puml/PumlGraphFormatterTest.java | [
"public final class DependencyNode {\n\n private final Artifact artifact;\n private final String effectiveVersion;\n private final NodeResolution resolution;\n private final Set<String> scopes;\n private final Set<String> classifiers;\n private final Set<String> types;\n\n\n public DependencyNode(Artifact ar... | import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.junit.jupiter.api.Test;
import com.github.ferstl.depgraph.dependency.DependencyNode;
import com.github.ferstl.depgraph.dependency.DependencyNodeIdRenderer;
import com.github.ferstl.depgraph.dependency.DependencyNodeUtil;
import com.... | /*
* Copyright (c) 2014 - 2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | private final List<Node<?>> nodes = this.dependencies.stream() | 6 |
GoogleCloudPlatform/bigquery-data-lineage | src/test/java/com/google/cloud/solutions/datalineage/transform/LineageExtractionTransformTest.java | [
"@AutoValue\npublic abstract class BigQueryTableEntity implements DataEntityConvertible, Serializable {\n\n public abstract String getProjectId();\n\n public abstract String getDataset();\n\n public abstract String getTable();\n\n /**\n * Returns {@code true} if the table is a temporary table.\n * <p> It us... | import com.google.cloud.solutions.datalineage.model.BigQueryTableEntity;
import com.google.cloud.solutions.datalineage.model.LineageMessages.ColumnEntity;
import com.google.cloud.solutions.datalineage.model.LineageMessages.ColumnLineage;
import com.google.cloud.solutions.datalineage.model.LineageMessages.CompositeLinea... | /*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | ZetaSqlSchemaLoaderFactory schemaLoaderFactory = | 2 |
ypresto/miniguava | miniguava-collect-immutables/src/test/java/net/ypresto/miniguava/collect/immutables/ImmutableListTest.java | [
"public static class BuilderAddAllListGenerator\n extends TestStringListGenerator {\n @Override protected List<String> create(String[] elements) {\n return ImmutableList.<String>builder()\n .addAll(asList(elements))\n .build();\n }\n}",
"public static class BuilderReversedListGenerator\n ... | import static com.google.common.collect.Iterables.getOnlyElement;
import static com.google.common.collect.testing.features.CollectionFeature.ALLOWS_NULL_QUERIES;
import static com.google.common.collect.testing.features.CollectionFeature.SERIALIZABLE;
import static java.lang.reflect.Proxy.newProxyInstance;
import static... | /*
* Copyright (C) 2007 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... | new ImmutableListMiddleSubListGenerator()) | 3 |
hidekatsu-izuno/wmf2svg | src/test/java/net/arnx/wmf2svg/gdi/wmf/WmfGdiTest.java | [
"public class Main {\n\tprivate static Logger log = Logger.getLogger(Main.class.getName());\n\n\tpublic static void main(String[] args) {\n\t\tString src = null;\n\t\tString dest = null;\n\n\t\tboolean debug = false;\n\t\tboolean compatible = false;\n\t\tboolean replaceSymbolFont = false;\n\n\t\tfor (int i = 0; i <... | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import org.junit.Test;
import net.arnx.wmf2svg.Main;
import net.arnx.wmf2svg.gdi.GdiBrush;
import net.arnx.wmf2svg.gdi.GdiFont;
import net.arnx.wmf2svg.gdi.GdiPen;
import net.arnx.wmf2svg.gdi.GdiUtils; | package net.arnx.wmf2svg.gdi.wmf;
public class WmfGdiTest {
@Test
public void testEllipse() throws IOException {
WmfGdi gdi = new WmfGdi();
gdi.placeableHeader(0, 0, 9000, 4493, 1440);
gdi.header();
gdi.setWindowOrgEx(0, 0, null);
gdi.setWindowExtEx(200, 200, null);
gdi.setBkMode(1); | GdiBrush brush1 = gdi.createBrushIndirect(1, 0, 0); | 1 |
magnetsystems/message-samples-android | RichMessaging/app/src/main/java/com/magnet/messagingsample/activities/ChatActivity.java | [
"public class MessageRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {\n\n private static final int TEXT_TYPE = 0;\n private static final int IMAGE_TYPE = 1;\n private static final int MAP_TYPE = 2;\n private static final int VIDEO_TYPE = 3;\n\n private List<Object> messageI... | import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.CursorLoader;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Parcelable;
import android.provider.MediaStore;
import ... | package com.magnet.messagingsample.activities;
public class ChatActivity extends AppCompatActivity {
final String TAG = "ChatActivity";
public static final String KEY_MESSAGE_TEXT = "text";
public static final String KEY_MESSAGE_IMAGE = "photo";
public static final String KEY_MESSAGE_MAP = "loca... | S3UploadService.init(this); | 8 |
robocup-atan/atan | src/main/java/com/github/robocup_atan/atan/model/ControllerCoach.java | [
"public enum Errors {\n\n /**\n * There is already a coach connected.\n */\n ALREADY_HAVE_OFFLINE_COACH,\n\n /**\n * Cannot reconnect while the PlayMode is PLAYON.\n */\n CANNOT_RECONNECT_WHILE_PLAYON,\n\n /**\n * Cannot say a freeform while the PlayMode is PLAYON.\n */\n C... | import com.github.robocup_atan.atan.model.enums.PlayMode;
import com.github.robocup_atan.atan.model.enums.RefereeMessage;
import com.github.robocup_atan.atan.model.enums.ServerParams;
import com.github.robocup_atan.atan.model.enums.Warning;
import java.util.HashMap;
import com.github.robocup_atan.atan.model.enums.Error... | package com.github.robocup_atan.atan.model;
/*
* #%L
* Atan
* %%
* Copyright (C) 2003 - 2014 Atan
* %%
* 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 ... | public void infoHearReferee(RefereeMessage refereeMessage); | 3 |
NicolaasWeideman/RegexStaticAnalysis | src/main/java/analysis/NFAAnalyserFlattening.java | [
"enum EdaCases {PARALLEL, ESCC, FILTER, NO_EDA}",
"enum IdaCases {IDA, NO_IDA}",
"public enum PriorityRemovalStrategy {\n\tIGNORE,\n\tUNPRIORITISE\n}",
"static final class EdaAnalysisResultsNoEda extends EdaAnalysisResults {\n\t\t\n\tEdaAnalysisResultsNoEda(NFAGraph originalGraph) {\n\t\tsuper(originalGraph, ... | import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
import analysis.EdaAnalysisResults.EdaCases;
import analysis.IdaAnalysisResults.IdaCases;
import analysis.AnalysisSettings.PriorityRemovalStr... | package analysis;
public class NFAAnalyserFlattening extends NFAAnalyser {
public NFAAnalyserFlattening(PriorityRemovalStrategy priorityRemovalStrategy) {
super(priorityRemovalStrategy);
}
@Override
protected EdaAnalysisResults calculateEdaAnalysisResults(NFAGraph originalM) throws InterruptedException {
... | EdaAnalysisResults toReturn = new EdaAnalysisResultsNoEda(originalM); | 3 |
googleapis/google-oauth-java-client | samples/keycloak-pkce-cmdline-sample/src/main/java/com/google/api/services/samples/keycloak/cmdline/PKCESample.java | [
"public class AuthorizationCodeFlow {\n\n /**\n * Method of presenting the access token to the resource server (for example {@link\n * BearerToken#authorizationHeaderAccessMethod}).\n */\n private final AccessMethod method;\n\n /** HTTP transport. */\n private final HttpTransport transport;\n\n /** JSON ... | import com.google.api.client.auth.oauth2.AuthorizationCodeFlow;
import com.google.api.client.auth.oauth2.BearerToken;
import com.google.api.client.auth.oauth2.ClientParametersAuthentication;
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeI... | /*
* Copyright (c) 2020 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 ... | new ClientParametersAuthentication(clientId, null), | 2 |
albertogiunta/justintrain-client-android | app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/Ads.java | [
"public class ViewsUtils {\n\n public static final ButterKnife.Action<View> VISIBLE = (view, index) -> view.setVisibility(View.VISIBLE);\n\n public static final ButterKnife.Action<View> GONE = (view, index) -> view.setVisibility(View.GONE);\n\n public static final ButterKnife.Action<View> INVISIBLE = (view... | import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.NativeExpressAdView;
import android.content.Context;
import android.support.design.widget.CoordinatorLayout;... | package com.jaus.albertogiunta.justintrain_oraritreni.utils;
public class Ads {
public static int BOTTOM_MARGIN_WITH_ADS = 60;
public static int BOTTOM_MARGIN_WITHOUT_ADS = 16;
public static int BOTTOM_MARGIN_ACTUAL = 16;
public static boolean ignoreBeingProAndShowAds = BuildConfig.DEBU... | public static void initializeAds(Context context, View bannerPlaceholder, NativeExpressAdView adView, AnalyticsHelper analyticsHelper, String screenName) { | 1 |
AstartesGuardian/WebDAV-Server | WebDAV-Server/src/webdav/server/virtual/entity/standard/RsDead.java | [
"public class FileSystemPath\r\n{\r\n public FileSystemPath(String fileName, FileSystemPath parent)\r\n {\r\n this.fileName = fileName;\r\n this.parent = parent;\r\n this.fileSystemPathManager = parent.fileSystemPathManager;\r\n }\r\n public FileSystemPath(String fileName, FileSyste... | import http.FileSystemPath;
import http.server.exceptions.DeadResourceException;
import http.server.exceptions.UserRequiredException;
import http.server.message.HTTPEnvRequest;
import java.time.Instant;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
impor... | package webdav.server.virtual.entity.standard;
public class RsDead implements IResource
{
private RsDead()
{ }
private static RsDead deadResource = null;
public static RsDead getInstance()
{
if(deadResource == null)
deadResource = new RsDead();
return ... | public boolean moveTo(FileSystemPath oldPath, FileSystemPath newPath, HTTPEnvRequest env) throws UserRequiredException
| 0 |
dsx-tech/blockchain-benchmarking | blockchain-api/src/main/java/uk/dsxt/bb/blockchain/BlockchainManager.java | [
"@AllArgsConstructor\n@Log4j2\npublic class BitcoinManager implements Manager {\n\n private String url;\n\n private enum BitcoinMethods {\n SENDTOADDRESS,\n LISTUNSPENT,\n LISTTRANSACTIONS,\n GETBLOCKHASH,\n GETBLOCK,\n GETPEERINFO,\n GETINFO,\n GETNEWAD... | import uk.dsxt.bb.multichain.MultichainManager;
import java.io.IOException;
import java.util.List;
import lombok.extern.log4j.Log4j2;
import uk.dsxt.bb.bitcoin.BitcoinManager;
import uk.dsxt.bb.datamodel.blockchain.BlockchainBlock;
import uk.dsxt.bb.datamodel.blockchain.BlockchainChainInfo;
import uk.dsxt.bb.datamodel.... | /*
******************************************************************************
* Blockchain benchmarking framework *
* Copyright (C) 2016 DSX Technologies Limited. *
* ... | manager = new EthereumManager(url); | 4 |
naomiHauret/OdysseeDesMaths | core/src/com/odysseedesmaths/scenes/Scene1.java | [
"public class Assets {\n\n private Assets() {}\n\n private static final AnnotationAssetManager manager = new AnnotationAssetManager();\n\n public static AnnotationAssetManager getManager() {\n return manager;\n }\n\n // Raccourcis pratiques\n private static final String\n ICONS_P... | import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.utils.Timer;
import com.odysseedesmaths.Assets;
import com.odysseedesmaths.OdysseeDesMaths;
import com.odysseedesmaths.dialogs.EndButtonsListener;
import com.odysseedesmaths.dialogs.SimpleDialog;
import com.odysseedesmaths.minigames.arriveeremarquable.Ar... | package com.odysseedesmaths.scenes;
public class Scene1 extends Scene {
Texture background;
public Scene1 () {
background = Assets.getManager().get(Assets.S01_PAYSAGE, Texture.class);
}
@Override
public Texture getBackground() {
return background;
}
@Override
publi... | getMss().getJeu().setScreen(new SimpleDialog(getMss().getJeu(), Assets.DLG_ARRIVEE_1, new EndButtonsListener() { | 2 |
QuietOne/jNavigation | src/com/jme3/ai/navigation/crowd/dtPathQueue.java | [
"public class NavMesh {\n\n private long swigCPtr;\n protected boolean swigCMemOwn;\n\n public NavMesh() {\n swigCPtr = RecastJNI.dtAllocNavMesh();\n swigCMemOwn = (swigCPtr == 0) ? false : true;\n }\n\n protected NavMesh(long cPtr, boolean cMemoryOwn) {\n swigCMemOwn = cMemoryOw... | import com.jme3.ai.navigation.detour.NavMesh;
import com.jme3.ai.navigation.detour.NavMesh;
import com.jme3.ai.navigation.detour.NavMeshQuery;
import com.jme3.ai.navigation.detour.QueryFilter;
import com.jme3.ai.navigation.utils.SWIGTYPE_p_float;
import com.jme3.ai.navigation.utils.RecastJNI;
import com.jme3.ai.navigat... | package com.jme3.ai.navigation.crowd;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.4
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file i... | RecastJNI.delete_dtPathQueue(swigCPtr); | 5 |
sematext/solr-researcher | relaxer/src/main/java/com/sematext/solr/handler/component/relaxer/QueryRelaxerComponent.java | [
"public abstract class AbstractReSearcherComponent extends SearchComponent implements ReSearcherParams, SolrCoreAware, PluginInfoInitialized {\n private static final Logger LOG = LoggerFactory.getLogger(CommonMisspellings.class);\n\n private String commonMisspellingsFileLocation = null;\n private Map<String, Str... | import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap;
import org.apache.... | /*
* Copyright (c) Sematext International
* All Rights Reserved
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Sematext International
* The copyright notice above does not evidence any
* actual or intended publication of such source code.
*/
package com.sematext.solr.handler.component.relaxer;... | public void doProcess(ReSearcherRequestContext ctx, ResponseBuilder rb) throws Exception { | 2 |
fredg02/se.bitcraze.crazyflie.lib | se.bitcraze.crazyflie.lib.examples/src/main/java/se/bitcraze/crazyflie/lib/examples/CrazyflieWrapper.java | [
"public class Crazyflie {\n\n private final Logger mLogger = LoggerFactory.getLogger(this.getClass().getSimpleName());\n\n private CrtpDriver mDriver;\n private Thread mIncomingPacketHandlerThread;\n\n private LinkedBlockingDeque<CrtpPacket> mResendQueue = new LinkedBlockingDeque<>();\n private Threa... | import java.util.HashMap;
import java.util.List;
import java.util.Map;
import se.bitcraze.crazyflie.lib.crazyflie.ConnectionAdapter;
import se.bitcraze.crazyflie.lib.crazyflie.Crazyflie;
import se.bitcraze.crazyflie.lib.crazyflie.Crazyflie.State;
import se.bitcraze.crazyflie.lib.crazyradio.ConnectionData;
import se.bit... | package se.bitcraze.crazyflie.lib.examples;
/**
* Work in progress of a Crazyflie wrapper, that tries to provide
* a simple API to use and control the Crazyflie.
*/
public class CrazyflieWrapper {
private Crazyflie mCrazyflie;
private boolean mSetupFinished;
private Param mParam;
public Crazyfli... | if(mCrazyflie.getState().ordinal() >= State.CONNECTED.ordinal()) { | 1 |
wso2/jaggery | components/hostobjects/org.jaggeryjs.hostobjects.web/src/main/java/org/jaggeryjs/hostobjects/web/RequestHostObject.java | [
"public class LogHostObject extends ScriptableObject {\n\n private static final Log log = LogFactory.getLog(LogHostObject.class);\n\n public static final String LOG_LEVEL = \"hostobject.log.loglevel\";\n //TODO : move this to a constants class\n public static final String JAGGERY_INCLUDES_CALLSTACK = \"... | import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.logging.... | public HttpServletRequest getHttpServletRequest() {
return this.request;
}
private static void parseMultipart(RequestHostObject rho) throws ScriptException {
if (rho.files != null) {
return;
}
FileItemFactory factory = new DiskFileItemFactory();
ServletFi... | JaggeryContext context = (JaggeryContext) RhinoEngine.getContextProperty(EngineConstants.JAGGERY_CONTEXT); | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.