Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2012 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 266 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2012 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 308 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2011 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 179 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Expression</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.eclipselabs.emf.query.QueryPackage#... | 107 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Literal</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclipselabs.em... | 646 |
github-java-corpus | 2,012 | package org.eclipselabs.emf.query.util;
import java.util.Date;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EcoreFactory;
import org.eclipse.emf.ecore.EcorePackage;
import or... | 2,423 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipselabs.emf.query.BinaryOperation;
import org.eclipselabs.emf.query.Expression;
im... | 1,486 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query.util;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
import org.eclipselabs.e... | 1,314 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query;
import org.eclipse.emf.ecore.EStructuralFeature;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Feature Accessor</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features ... | 969 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipselabs.emf.query.Expression;
import org.eclipselabs.emf.query.QueryPackage;
/**
* <!-- begin-user-doc -->
* An ... | 214 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipselabs.emf.que... | 1,905 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
imp... | 719 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
import org.ecli... | 2,841 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipselabs.emf.query.Literal;
import org.eclipselabs.emf.query.Q... | 1,339 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.e... | 2,163 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the... | 3,860 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see org... | 402 |
github-java-corpus | 2,012 | /**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipselabs.emf.query;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Binary Operation</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.eclip... | 917 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2012 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 321 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2012 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 675 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2011 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 320 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2012 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 434 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2012 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 288 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2011 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 1,055 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2011 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 2,151 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2010 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 3,437 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2010 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 1,310 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2010 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 1,081 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2010 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 1,189 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2010 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 744 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2010 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 1,617 |
github-java-corpus | 2,012 | /*******************************************************************************
* Copyright (c) 2010 Bryan Hunt.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* h... | 750 |
github-java-corpus | 2,012 | import javaewah.EWAHCompressedBitmap;
import java.io.*;
public class example {
public static String toSetBitString(EWAHCompressedBitmap b) {
String s = "";
for (int k : b)
s+= k+" ";
return s;
}
public static void main(String[] args) throws java.io.IOException {
EWAHCompressedBitmap ew... | 663 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh, Robert Becho, and Google Inc.
* Licensed under APL 2.0.
*/
import java.util.*;
import java.io.*;
import javaewah.IntIterator;
import javaewah.LogicalElement;
/**
* <p>
* This implements the patent-free EWAH scheme. Roughly... | 16,790 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* Mostly for internal use. Similar to BufferedRunningLengthWord32, but automatically
* advances to the next BufferedRunningLengthWord32 as words are discarded.
*
* @since 0.5... | 864 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2012, Google Inc.
* Licensed under APL 2.0.
*/
import static javaewah32.EWAHCompressedBitmap32.wordinbits;
import javaewah.IntIterator;
/**
* The IntIteratorImpl32 implements the 32 bit implementation of the
* IntIterator interface, which efficiently returns the stream of i... | 475 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* BitCounter is a fake bitset data structure. Instead of storing the actual data,
* it only records the number of set bits.
*
* @since 0.5.0
* @author Daniel Lemire and Da... | 605 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* Low level bitset writing methods.
*
* @since 0.5.0
* @author Daniel Lemire and David McIntosh
*/
public interface BitmapStorage32 {
/**
* Adding words directly to... | 472 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* The class EWAHIterator represents a special type of
* efficient iterator iterating over (uncompressed) words of bits.
*
* @author Daniel Lemire
* @since 0.5.0
*
*/
pub... | 452 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* Mostly for internal use. Similar to RunningLengthWord, but can
* be modified without access to the array, and has faster access.
*
* @author Daniel Lemire
* @since 0.5.... | 959 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* Mostly for internal use.
*
* @since 0.5.0
* @author Daniel Lemire
*/
public final class RunningLengthWord32 {
/**
* Instantiates a new running length word.
*
... | 871 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* This is a BitmapStorage that can be used to determine quickly
* if the result of an operation is non-trivial... that is, whether
* there will be at least on set bit.
*
*... | 484 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2012, Google Inc.
* Licensed under APL 2.0.
*/
import static javaewah.EWAHCompressedBitmap.wordinbits;
/**
* The IntIteratorImpl implements the 64 bit implementation of the
* IntIterator interface, which efficiently returns the stream of integers
* represented by an EWAHIterato... | 460 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* This is a BitmapStorage that can be used to determine quickly if the result
* of an operation is non-trivial... that is, whether there will be at least on
* set bit.
*
* @s... | 495 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* BitCounter is a fake bitset data structure. Instead of storing the actual
* data, it only records the number of set bits.
*
* @since 0.4.0
* @author David McIntosh
*/
pub... | 668 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* Mostly for internal use. Similar to BufferedRunningLengthWord, but automatically
* advances to the next BufferedRunningLengthWord as words are discarded.
*
* @since 0.4.0
* ... | 848 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* The class EWAHIterator represents a special type of
* efficient iterator iterating over (uncompressed) words of bits.
*
* @author Daniel Lemire
* @since 0.1.0
*
*/
publi... | 446 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* Low level bitset writing methods.
*
* @since 0.4.0
* @author David McIntosh
*/
public interface BitmapStorage {
/**
* Adding words directly to the bitmap (for expert... | 451 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* Mostly for internal use.
*
* @since 0.1.0
* @author Daniel Lemire
*/
public final class RunningLengthWord {
/**
* Instantiates a new running length word.
*
* @... | 878 |
github-java-corpus | 2,012 | package javaewah.benchmark;
/**
* This class will generate uniformly distributed lists of random integers.
*
* @author Daniel Lemire
*/
class ClusteredDataGenerator {
public ClusteredDataGenerator() {
}
/**
* generates randomly N distinct integers from 0 to Max.
*/
public int[] generateClustered(i... | 534 |
github-java-corpus | 2,012 | package javaewah.benchmark;
import java.util.Iterator;
import java.util.Random;
import java.util.TreeSet;
/**
* This class will generate "clustered" lists of random integers. That is, the
* integers tend not to be randomly distributed.
*
* @author Daniel Lemire
*/
public class UniformDataGenerator {
pub... | 250 |
github-java-corpus | 2,012 | package javaewah.benchmark;
import java.text.DecimalFormat;
import java.util.List;
import javaewah.EWAHCompressedBitmap;
import javaewah.IntIterator;
import javaewah32.EWAHCompressedBitmap32;
public class benchmark {
public static void main(String args[]) {
test(100, 16, 1);
}
public static void test(int ... | 2,669 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh, Robert Becho and and Google Inc.
* Licensed under APL 2.0.
*/
import java.util.*;
import java.io.*;
/**
* <p>
* This implements the patent-free(1) EWAH scheme. Roughly speaking, it is a
* 64-bit variant of the BBC compressio... | 16,811 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
*
* The IntIterator interface is used to iterate over a stream of integers.
*
* @author Daniel Lemire
* @since 0.2.0
*
*/
public interface IntIterator {
/**
* Is... | 144 |
github-java-corpus | 2,012 | package javaewah;
/**
* A prototypical model for bitmaps. Used by the
* class FastAggregation. Users should probably not
* be concerned by this class.
*
* @author Daniel Lemire
*
*/
public interface LogicalElement<T> {
public T and(T le);
public T andNot(T le);
public void not();
public LogicalElement ... | 98 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Robert Becho
* Licensed under APL 2.0.
*/
/**
* Mostly for internal use. Similar to RunningLengthWord, but can
* be modified without access to the array, and has faster access.
*
* @author Daniel Lemire
* @since 0.1.0
... | 959 |
github-java-corpus | 2,012 | package javaewah32;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Google Inc.
* Licensed under APL 2.0.
*/
import org.junit.Test;
import java.util.*;
import java.io.*;
import javaewah.EWAHCompressedBitmap;
import javaewah.IntIterator;
import junit.framework.Assert;
public class EWAHComp... | 10,756 |
github-java-corpus | 2,012 | package javaewah;
/*
* Copyright 2009-2012, Daniel Lemire, Cliff Moon, David McIntosh and Google Inc.
* Licensed under APL 2.0.
*/
import org.junit.Test;
import java.util.*;
import java.io.*;
import junit.framework.Assert;
/**
* This class is used for unit testing.
*/
public class EWAHCompressedBitmapTest ... | 10,337 |
github-java-corpus | 2,012 | package org.mappush.resource;
import javax.annotation.PostConstruct;
import javax.ws.rs.Consumes;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.cor... | 1,048 |
github-java-corpus | 2,012 | package org.mappush.resource;
import org.codehaus.jackson.map.ObjectMapper;
public class JsonUtils {
private static final ObjectMapper jsonMapper = new ObjectMapper();
public static String toJson(Object object) {
try {
return jsonMapper.writeValueAsString(object);
} catch (Exception e) {
return null;
... | 114 |
github-java-corpus | 2,012 | package org.mappush.resource;
import java.util.Random;
import org.atmosphere.cpr.Broadcaster;
import org.mappush.model.Event;
public class EventGenerator {
private static final String GENERATOR_THREAD_NAME = "GeneratorThread";
private volatile Thread generatorThread;
/**
* Starts the generation of random eve... | 402 |
github-java-corpus | 2,012 | package org.mappush.model;
public class Event {
private double lat;
private double lng;
public Event() {}
public Event(double lat, double lng) {
this.lat = lat;
this.lng = lng;
}
public double getLat() {
return lat;
}
public void setLat(double lat) {
this.lat = lat;
}
public double getLng() {
... | 130 |
github-java-corpus | 2,012 | package org.mappush.model;
public class Bounds {
private double southLat;
private double northLat;
private double westLng;
private double eastLng;
public Bounds() {}
public Bounds(String fromHeader) {
String[] coordinates = fromHeader.split(",");
this.southLat = Double.parseDouble(coordinates[0]);
this.... | 409 |
github-java-corpus | 2,012 | package org.mappush.jersey;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
@Provider
public class CustomExceptionMapper implements ExceptionMapper<Throwable> {
@Override
public Response toResponse(Throwable exception) {
... | 94 |
github-java-corpus | 2,012 | package org.mappush.atmosphere;
import org.atmosphere.cpr.AtmosphereResource;
import org.atmosphere.cpr.BroadcastFilter.BroadcastAction.ACTION;
import org.atmosphere.cpr.PerRequestBroadcastFilter;
import org.mappush.model.Bounds;
import org.mappush.model.Event;
import org.mappush.resource.JsonUtils;
import org.slf4j.L... | 329 |
github-java-corpus | 2,012 | package org.mappush.atmosphere;
import org.atmosphere.cpr.AtmosphereRequest;
import org.atmosphere.websocket.WebSocketEventListener.WebSocketEvent.TYPE;
import org.atmosphere.websocket.WebSocketEventListenerAdapter;
import org.mappush.model.Bounds;
import org.mappush.resource.JsonUtils;
import org.slf4j.Logger;
import... | 202 |
github-java-corpus | 2,012 | package org.mappush.resource;
import java.io.IOException;
import java.net.ServerSocket;
import org.atmosphere.nettosphere.Config;
import org.atmosphere.nettosphere.Nettosphere;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;... | 653 |
github-java-corpus | 2,012 | package org.mappush.resource;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import jav... | 1,530 |
github-java-corpus | 2,012 | package com.htc.rss;
import android.app.Activity;
import android.os.Bundle;
public class RSSLentaActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.la... | 63 |
github-java-corpus | 2,012 | package battlecode.doc;
import com.sun.javadoc.*;
import com.sun.tools.doclets.Taglet;
import java.util.Map;
public class Cooldown implements Taglet {
public static void register(Map<String, Taglet> map) {
map.put("cooldown", new Cooldown());
}
public String getName() {
return "cooldown... | 293 |
github-java-corpus | 2,012 | package battlecode.doc;
import battlecode.common.RobotType;
import com.sun.javadoc.*;
import com.sun.tools.doclets.Taglet;
import java.util.Map;
public class RobotDoc implements Taglet {
public static void register(Map<String, Taglet> map) {
map.put("robot", new RobotDoc());
}
public String getN... | 806 |
github-java-corpus | 2,012 | package battlecode.doc;
import battlecode.engine.instrumenter.MethodCostUtil;
import com.sun.javadoc.*;
import com.sun.tools.doclets.Taglet;
import java.util.Map;
public class MethodCost implements Taglet {
public static void register(Map<String, Taglet> map) {
map.put("methodcost", new MethodCost());
... | 329 |
github-java-corpus | 2,012 | package battlecode.doc;
import com.sun.javadoc.*;
import com.sun.tools.doclets.standard.Standard;
import java.util.Arrays;
import java.util.Comparator;
public class Doclet extends Standard {
public static boolean start(RootDoc root) {
// Due to various issues with the javadoc api we have to
// u... | 341 |
github-java-corpus | 2,012 | package battlecode.analysis;
import battlecode.common.MapLocation;
import battlecode.common.RobotType;
import battlecode.engine.signal.Signal;
import battlecode.serial.MatchHeader;
import battlecode.serial.RoundDelta;
import battlecode.server.proxy.Proxy;
import battlecode.server.proxy.ProxyFactory;
import battlecode.... | 5,473 |
github-java-corpus | 2,012 | package battlecode.analysis;
import battlecode.engine.signal.Signal;
public class AwesomenessSignal extends Signal {
private static final long serialVersionUID = -5655877873179815593L;
// Tweak to desired average awesomeness for relativeAwesomeness calculation
private static final float AVE_AWESOMENESS =... | 366 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.MapLocation;
import battlecode.common.RobotLevel;
import battlecode.common.Team;
public abstract class InternalObject extends BaseObject {
protected volatile MapLocation myLocation;
protected final RobotLevel myHeight;
protected final GameWorld myGameWor... | 214 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.GameObject;
import battlecode.common.Team;
import battlecode.engine.GenericWorld;
public abstract class BaseObject implements GameObject {
private final int myID;
private Team myTeam;
protected BaseObject(GenericWorld gw, Team t) {
myID = gw.nex... | 312 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.MapLocation;
import battlecode.common.RobotType;
import battlecode.common.Team;
import battlecode.engine.PlayerFactory;
import battlecode.world.signal.SpawnSignal;
/*
TODO:
- make the parser more robust, and with better failure modes
- maybe take out the l... | 404 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.*;
import battlecode.engine.GenericController;
import battlecode.engine.instrumenter.RobotDeathException;
import battlecode.engine.instrumenter.RobotMonitor;
import battlecode.world.signal.*;
import com.google.common.base.Predicate;
import com.google.common.co... | 3,189 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.*;
import static battlecode.common.GameActionExceptionType.*;
public abstract class ControllerShared {
protected GameWorld gameWorld;
protected InternalRobot robot;
public InternalRobot getRobot() {
return robot;
}
protected abstract M... | 604 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.MapLocation;
import battlecode.common.Team;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
public class Util {
private Util() {
}
private static class WithinDistance implements ... | 338 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.*;
import battlecode.engine.ErrorReporter;
import battlecode.engine.GenericWorld;
import battlecode.engine.instrumenter.RobotDeathException;
import battlecode.engine.instrumenter.RobotMonitor;
import battlecode.engine.signal.AutoSignalHandler;
import battlecod... | 5,949 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.MapLocation;
import battlecode.common.RobotType;
import battlecode.common.TerrainTile;
import battlecode.serial.GenericGameMap;
import java.util.Arrays;
import java.util.EnumMap;
import java.util.Map;
import java.util.Random;
/**
* The class represents the map in t... | 2,286 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.common.MapLocation;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
/**
* Signifies that a robot has moved.
*
* @author Matt
*/
public class MovementSignal extends Signal {
private static final long serialVersionUI... | 496 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
public class WeakenSignal extends Signal {
public final int robotID;
public WeakenSignal(InternalRobot r) {
this.robotID = r.getID();
}
}
| 57 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.common.Message;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
/**
* Signifies that a robot has broadcast a message.
*
* @author Matt
*/
public class BroadcastSignal extends Signal {
private static final long serialVersionUID ... | 236 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.common.MapLocation;
import battlecode.common.RobotLevel;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
/**
* Signifies that a robot just attacked
*
* @author adamd
*/
public class AttackSignal extends Signal {
p... | 365 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.common.MapLocation;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
public class UnloadFluxSignal extends Signal {
public final int transporterID;
public final MapLocation unloadLoc;
public UnloadFluxSignal(InternalRobot t... | 85 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
/**
* Creates an observation to be displayed in transcribed matches
*
* @author jmstein
*/
public class MatchObservationSignal extends Signal {
private static final long serialVersionUI... | 285 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.engine.signal.Signal;
public class ControlBitsSignal extends Signal {
private static final long serialVersionUID = -4229507739170593943L;
private final int robotID;
private final long controlBits;
public ControlBitsSignal(int robotID, ... | 115 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.common.MapLocation;
import battlecode.common.RobotType;
import battlecode.common.Team;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
/**
* Signifies that a robot was just spawned
*
* @author adamd
*/
public class Spaw... | 432 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
/**
* TODO: update docs
* Signifies that a robot's energon has just changed
*
* @author adamd
*/
public class EnergonChangeSignal extends Signal {
private static final long serialVers... | 328 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
/**
* Signifies that one of the robot's indicator strings has been changed
*
* @author adamd
*/
public class IndicatorStringSignal extends Signal {
private static final long serialVersi... | 373 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.common.MapLocation;
import battlecode.engine.signal.Signal;
/**
* Signifies that a robot was moved by a user override -- i.e., it should warp to the new location without an animation
*
* @author Matt
*/
public class MovementOverrideSignal extends Signal... | 286 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
/**
* Signifies that a robot's energon has just changed
*
* @author adamd
*/
public class BytecodesUsedSignal extends Signal {
private static final long serialVersionUID = 6617731359077... | 235 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.common.MapLocation;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
public class LoadFluxSignal extends Signal {
public final int transporterID;
public final MapLocation loadLoc;
public LoadFluxSignal(InternalRobot... | 86 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalObject;
/**
* Signifies that an object has died somewhere.
*
* @author Matt
*/
public class DeathSignal extends Signal {
private static final long serialVersionUID = 8518453257317948520L;
/**
* ... | 234 |
github-java-corpus | 2,012 | package battlecode.world.signal;
import battlecode.engine.signal.Signal;
import battlecode.world.InternalRobot;
public class UnweakenSignal extends Signal {
public final int robotID;
public UnweakenSignal(InternalRobot r) {
this.robotID = r.getID();
}
}
| 62 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.MapLocation;
import battlecode.common.RobotLevel;
/**
* This class represents a 3D location,
* consisting of a (regular two-dimensional) MapLocation
* and a MapHeight.
*
* @author Matt
*/
public class MapLocation3D {
/**
* The 2D location of this MapL... | 438 |
github-java-corpus | 2,012 | package battlecode.world;
import battlecode.common.Team;
import battlecode.engine.GenericRobot;
import battlecode.engine.signal.Signal;
import java.util.*;
public class BaseWorld<WorldObject extends BaseObject> {
protected int currentRound; // do we need this here?? -- yes
protected boolean running = true;... | 725 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.