buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected TestResponse newResponse() {
return new TestResponse();
}
};
transportService = new TransportService(ImmutableSettings.EMPTY, transport, threadPool);
transportService.start();
transportClientNodesService = new ... | protected TestResponse newResponse() {
return new TestResponse();
}
};
transportService = new TransportService(ImmutableSettings.EMPTY, transport, threadPool);
transportService.start();
transportClientNodesService = new ... |
private boolean loginEnabled() {
return !TextUtils.isEmpty(loginText.getText())
&& !TextUtils.isDigitsOnly(passwordText.getText());
}
| private boolean loginEnabled() {
return !TextUtils.isEmpty(loginText.getText())
&& !TextUtils.isEmpty(passwordText.getText());
}
|
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeStringArray(indices);
out.writeOptionalString(documentType);
out.writeByte(ignoreIndices.id());
out.writeVInt(requests.size());
for (PercolateRequest request : requests) {
... | public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeStringArrayNullable(indices);
out.writeOptionalString(documentType);
out.writeByte(ignoreIndices.id());
out.writeVInt(requests.size());
for (PercolateRequest request : requests) {
... |
protected Shader createShader(final Renderable renderable) {
Gdx.app.log("DefaultShaderProvider", "Creating new shader");
if (Gdx.graphics.isGL20Available())
return new DefaultShader(renderable.material, renderable.lights == null ? -1 : maxLightsCount);
return new GLES10Shader(maxLightsCount);
}
| protected Shader createShader(final Renderable renderable) {
Gdx.app.log("DefaultShaderProvider", "Creating new shader");
if (Gdx.graphics.isGL20Available())
return new DefaultShader(renderable.material, renderable.mesh.getVertexAttributes(), renderable.lights == null ? -1 : maxLightsCount);
return new GLES10... |
public LwjglCanvas (ApplicationListener listener, boolean useGL2) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.useGL20 = useGL2;
initialize(listener, config);
}
| public LwjglCanvas (ApplicationListener listener, boolean useGL2) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.useGL20 = true;
initialize(listener, config);
}
|
private void build () {
if (!Gdx.graphics.isGL20Available()) throw new GdxRuntimeException("GL2 is required.");
GL20 gl = Gdx.graphics.getGL20();
// iOS uses a different framebuffer handle! (not necessarily 0)
if (!defaultFramebufferHandleInitialized) {
defaultFramebufferHandleInitialized = true;
if ... | private void build () {
if (!Gdx.graphics.isGL20Available()) throw new GdxRuntimeException("GL2 is required.");
GL20 gl = Gdx.graphics.getGL20();
// iOS uses a different framebuffer handle! (not necessarily 0)
if (!defaultFramebufferHandleInitialized) {
defaultFramebufferHandleInitialized = true;
if ... |
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK && requestCode == ISSUE_FILTER_EDIT && data != null) {
IssueFilter newFilter = ((IssueFilter) data.getSerializableExtra(EXTRA_ISSUE_FILTER)).clone();
if (!filter.equals(newFilter)... | public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK && requestCode == ISSUE_FILTER_EDIT && data != null) {
IssueFilter newFilter = (IssueFilter) data.getSerializableExtra(EXTRA_ISSUE_FILTER);
if (!filter.equals(newFilter)) {
... |
public static void main (String[] args) throws Exception {
// generate C/C++ code
new NativeCodeGenerator().generate("src", "bin", "jni");
// Flags to accomodate SWIG generated code
String cppFlags = "";
// SWIG doesn't emit strict aliasing compliant code
cppFlags += " -fno-strict-aliasing";
// SWIG di... | public static void main (String[] args) throws Exception {
// generate C/C++ code
new NativeCodeGenerator().generate("src", "bin", "jni");
// Flags to accomodate SWIG generated code
String cppFlags = "";
// SWIG doesn't emit strict aliasing compliant code
cppFlags += " -fno-strict-aliasing";
// SWIG di... |
private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer) {
long timeStamp = System.nanoTime();
synchronized (input) {
TouchEvent event = input.freeTouchEvents.newObject();
event.timeStamp = timeStamp;
event.pointer = pointer;
event.x = x;
event.y = y;
event.type = typ... | private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer) {
long timeStamp = System.nanoTime();
synchronized (input) {
TouchEvent event = input.usedTouchEvents.add();
event.timeStamp = timeStamp;
event.pointer = pointer;
event.x = x;
event.y = y;
event.type = type;
... |
private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer) {
long timeStamp = System.nanoTime();
synchronized (input) {
TouchEvent event = input.freeTouchEvents.newObject();
event.timeStamp = timeStamp;
event.pointer = 0;
event.x = x;
event.y = y;
event.type = type;
... | private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer) {
long timeStamp = System.nanoTime();
synchronized (input) {
TouchEvent event = input.usedTouchEvents.add();
event.timeStamp = timeStamp;
event.pointer = 0;
event.x = x;
event.y = y;
event.type = type;
input.... |
public void loadEmitterImages (TextureAtlas atlas) {
for (int i = 0, n = emitters.size(); i < n; i++) {
ParticleEmitter emitter = emitters.get(i);
String imagePath = emitter.getImagePath();
if (imagePath == null) continue;
String imageName = new File(imagePath.replace('\\', '/')).getName();
int lastDo... | public void loadEmitterImages (TextureAtlas atlas) {
for (int i = 0, n = emitters.size(); i < n; i++) {
ParticleEmitter emitter = emitters.get(i);
String imagePath = emitter.getImagePath();
if (imagePath == null) continue;
String imageName = new File(imagePath.replace('\\', '/')).getName();
int lastDo... |
public void create () {
batch = new SpriteBatch();
batch.setProjectionMatrix(new Matrix4().setToOrtho2D(0, 0, 855, 480));
atlas = new TextureAtlas(Gdx.files.internal("data/issue_pack"), Gdx.files.internal("data/"));
sprite = atlas.getSprite("map");
font = new BitmapFont(Gdx.files.internal("data/font.fnt"), ... | public void create () {
batch = new SpriteBatch();
batch.setProjectionMatrix(new Matrix4().setToOrtho2D(0, 0, 855, 480));
atlas = new TextureAtlas(Gdx.files.internal("data/issue_pack"), Gdx.files.internal("data/"));
sprite = atlas.createSprite("map");
font = new BitmapFont(Gdx.files.internal("data/font.fnt"... |
@Override public boolean allocate(NodeAllocations nodeAllocations, RoutingNodes routingNodes, DiscoveryNodes nodes) {
boolean changed = false;
if (nodes.dataNodes().isEmpty()) {
return changed;
}
Iterator<MutableShardRouting> unassignedIterator = routingNodes.unassigned... | @Override public boolean allocate(NodeAllocations nodeAllocations, RoutingNodes routingNodes, DiscoveryNodes nodes) {
boolean changed = false;
if (nodes.dataNodes().isEmpty()) {
return changed;
}
Iterator<MutableShardRouting> unassignedIterator = routingNodes.unassigned... |
public BulkRequest add(byte[] data, int from, int length, boolean contentUnsafe) throws Exception {
XContent xContent = XContentFactory.xContent(data, from, length);
byte marker = xContent.streamSeparator();
while (true) {
int nextMarker = findNextMarker(marker, from, data, lengt... | public BulkRequest add(byte[] data, int from, int length, boolean contentUnsafe) throws Exception {
XContent xContent = XContentFactory.xContent(data, from, length);
byte marker = xContent.streamSeparator();
while (true) {
int nextMarker = findNextMarker(marker, from, data, lengt... |
public void draw(GLKView view, CGRect rect) {
if(!created) {
app.graphics.makeCurrent();
app.listener.create();
app.listener.resize(width, height);
created = true;
}
if (paused) {
if (!wasPaused) {
Array<LifecycleListener> listeners = app.lifecycleListeners;
synchronized (listeners) {
... | public void draw(GLKView view, CGRect rect) {
if(!created) {
app.graphics.makeCurrent();
app.listener.create();
app.listener.resize(width, height);
created = true;
}
if (paused) {
if (!wasPaused) {
Array<LifecycleListener> listeners = app.lifecycleListeners;
synchronized (listeners) {
... |
public static Vector2 triangleCentroid (float x1, float y1, float x2, float y2, float x3, float y3, Vector2 centroid) {
centroid.x = (x1 + x2 + x3) / 3;
centroid.y = (y1 + y2 + y3) / 3;
return centroid;
}
| public static Vector2 triangleCentroid (float x1, float y1, float x2, float y2, float x3, float y3, Vector2 centroid) {
centroid.x = (x1 + x2 + x3) / 3;
centroid.y = (x1 + x2 + x3) / 3;
return centroid;
}
|
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(
AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, LetterBoxTest3.class,
GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPer... | public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(
AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, LetterBoxTest3.class,
GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPer... |
public Object clone() {
LZFCompressedIndexInput cloned = (LZFCompressedIndexInput) super.clone();
cloned.inputBuffer = new byte[LZFChunk.MAX_CHUNK_LEN];
return cloned;
}
} | public IndexInput clone() {
LZFCompressedIndexInput cloned = (LZFCompressedIndexInput) super.clone();
cloned.inputBuffer = new byte[LZFChunk.MAX_CHUNK_LEN];
return cloned;
}
} |
public Object clone() {
SnappyCompressedIndexInput cloned = (SnappyCompressedIndexInput) super.clone();
cloned.inputBuffer = new byte[inputBuffer.length];
return cloned;
}
} | public IndexInput clone() {
SnappyCompressedIndexInput cloned = (SnappyCompressedIndexInput) super.clone();
cloned.inputBuffer = new byte[inputBuffer.length];
return cloned;
}
} |
public void onRefreshSettings(Settings settings) {
String rateLimitingType = indexSettings.get(INDEX_STORE_THROTTLE_TYPE, AbstractIndexStore.this.rateLimitingType);
if (!rateLimitingType.equals(AbstractIndexStore.this.rateLimitingType)) {
logger.info("updating index.store... | public void onRefreshSettings(Settings settings) {
String rateLimitingType = settings.get(INDEX_STORE_THROTTLE_TYPE, AbstractIndexStore.this.rateLimitingType);
if (!rateLimitingType.equals(AbstractIndexStore.this.rateLimitingType)) {
logger.info("updating index.store.thro... |
public void recover(boolean indexShouldExists, RecoveryStatus recoveryStatus) throws IndexShardGatewayRecoveryException {
recoveryStatus.index().startTime(System.currentTimeMillis());
// in the none case, we simply start the shard
// clean the store, there should be nothing there...
... | public void recover(boolean indexShouldExists, RecoveryStatus recoveryStatus) throws IndexShardGatewayRecoveryException {
recoveryStatus.index().startTime(System.currentTimeMillis());
// in the none case, we simply start the shard
// clean the store, there should be nothing there...
... |
@Test public void testSimple() throws Exception {
Directory dir = new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));
indexWriter.commit();
indexWriter.addDocument(doc().add(field("_id", "1")).add(fiel... | @Test public void testSimple() throws Exception {
Directory dir = new RAMDirectory();
IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER));
indexWriter.commit();
indexWriter.addDocument(doc().add(field("_id", "1")).add(fiel... |
@Test public void testSimple() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/genericstore/test-mapping.json");
DocumentMapper docMapper = MapperTests.newParser().parse(mapping);
byte[] json = copyToBytesFromClasspath("/org/elas... | @Test public void testSimple() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/genericstore/test-mapping.json");
DocumentMapper docMapper = MapperTests.newParser().parse(mapping);
byte[] json = copyToBytesFromClasspath("/org/elas... |
public void glGenBuffers (int n, int[] buffers, int offset) {
for (int i = offset; i < offset + n; i++)
buffers[i] = GL15.glGenBuffers();
}
| public void glGenBuffers (int n, int[] buffers, int offset) {
for (int i = offset; i < offset + n; i++)
buffers[offset] = GL15.glGenBuffers();
}
|
private ClusterHealthResponse clusterHealth(ClusterHealthRequest request, ClusterState clusterState) {
if (logger.isTraceEnabled()) {
logger.trace("Calculating health based on state version [{}]", clusterState.version());
}
String[] concreteIndices;
try {
conc... | private ClusterHealthResponse clusterHealth(ClusterHealthRequest request, ClusterState clusterState) {
if (logger.isTraceEnabled()) {
logger.trace("Calculating health based on state version [{}]", clusterState.version());
}
String[] concreteIndices;
try {
conc... |
protected ClusterBlockException checkRequestBlock(ClusterState state, AnalyzeRequest request) {
if (request.index() != null) {
request.index(state.metaData().concreteSingleIndex(request.index()));
return state.blocks().indexBlockedException(ClusterBlockLevel.READ, request.index());
... | protected ClusterBlockException checkRequestBlock(ClusterState state, AnalyzeRequest request) {
if (request.index() != null) {
request.index(state.metaData().concreteSingleIndex(request.index(), request.indicesOptions()));
return state.blocks().indexBlockedException(ClusterBlockLevel... |
protected void resolveRequest(ClusterState state, GetRequest request) {
if (request.realtime == null) {
request.realtime = this.realtime;
}
// update the routing (request#index here is possibly an alias)
request.routing(state.metaData().resolveIndexRouting(request.routing... | protected void resolveRequest(ClusterState state, GetRequest request) {
if (request.realtime == null) {
request.realtime = this.realtime;
}
// update the routing (request#index here is possibly an alias)
request.routing(state.metaData().resolveIndexRouting(request.routing... |
protected boolean resolveRequest(ClusterState state, IndexRequest request, ActionListener<IndexResponse> indexResponseActionListener) {
MetaData metaData = clusterService.state().metaData();
String aliasOrIndex = request.index();
request.index(metaData.concreteSingleIndex(request.index()));
... | protected boolean resolveRequest(ClusterState state, IndexRequest request, ActionListener<IndexResponse> indexResponseActionListener) {
MetaData metaData = clusterService.state().metaData();
String aliasOrIndex = request.index();
request.index(metaData.concreteSingleIndex(request.index(), re... |
protected boolean resolveRequest(ClusterState state, Request request, ActionListener<Response> listener) {
request.index(state.metaData().concreteSingleIndex(request.index()));
return true;
}
| protected boolean resolveRequest(ClusterState state, Request request, ActionListener<Response> listener) {
request.index(state.metaData().concreteSingleIndex(request.index(), request.indicesOptions()));
return true;
}
|
protected void resolveRequest(ClusterState state, Request request) {
request.index(state.metaData().concreteSingleIndex(request.index()));
}
| protected void resolveRequest(ClusterState state, Request request) {
request.index(state.metaData().concreteSingleIndex(request.index(), request.indicesOptions()));
}
|
protected void resolveRequest(ClusterState state, TermVectorRequest request) {
// update the routing (request#index here is possibly an alias)
request.routing(state.metaData().resolveIndexRouting(request.routing(), request.index()));
request.index(state.metaData().concreteSingleIndex(request... | protected void resolveRequest(ClusterState state, TermVectorRequest request) {
// update the routing (request#index here is possibly an alias)
request.routing(state.metaData().resolveIndexRouting(request.routing(), request.index()));
request.index(state.metaData().concreteSingleIndex(request... |
protected boolean resolveRequest(ClusterState state, UpdateRequest request, ActionListener<UpdateResponse> listener) {
MetaData metaData = clusterService.state().metaData();
String aliasOrIndex = request.index();
request.routing((metaData.resolveIndexRouting(request.routing(), aliasOrIndex))... | protected boolean resolveRequest(ClusterState state, UpdateRequest request, ActionListener<UpdateResponse> listener) {
MetaData metaData = clusterService.state().metaData();
String aliasOrIndex = request.index();
request.routing((metaData.resolveIndexRouting(request.routing(), aliasOrIndex))... |
@Inject public TransportIndexAction(Settings settings, TransportService transportService, ClusterService clusterService,
IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction,
TransportCreateIndexAction... | @Inject public TransportIndexAction(Settings settings, TransportService transportService, ClusterService clusterService,
IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction,
TransportCreateIndexAction... |
@Test public void testBroadcastOperations() throws IOException {
startNode("server1");
client("server1").admin().indices().prepareCreate("test").execute().actionGet(5000);
logger.info("Running Cluster Health");
ClusterHealthResponse clusterHealth = client("server1").admin().cluster... | @Test public void testBroadcastOperations() throws IOException {
startNode("server1");
client("server1").admin().indices().prepareCreate("test").execute().actionGet(5000);
logger.info("Running Cluster Health");
ClusterHealthResponse clusterHealth = client("server1").admin().cluster... |
@Test public void testSimpleMoreLikeThis() throws Exception {
logger.info("Creating index test");
client1.admin().indices().create(createIndexRequest("test")).actionGet();
logger.info("Running Cluster Health");
ClusterHealthResponse clusterHealth = client1.admin().cluster().health(c... | @Test public void testSimpleMoreLikeThis() throws Exception {
logger.info("Creating index test");
client1.admin().indices().create(createIndexRequest("test")).actionGet();
logger.info("Running Cluster Health");
ClusterHealthResponse clusterHealth = client1.admin().cluster().health(c... |
@Test public void testSimpleActions() throws IOException, ExecutionException, InterruptedException {
logger.info("Running Cluster Health");
ClusterHealthResponse clusterHealth = client1.admin().cluster().health(clusterHealth().waitForGreenStatus()).actionGet();
logger.info("Done Cluster Heal... | @Test public void testSimpleActions() throws IOException, ExecutionException, InterruptedException {
logger.info("Running Cluster Health");
ClusterHealthResponse clusterHealth = client1.admin().cluster().health(clusterHealthRequest().waitForGreenStatus()).actionGet();
logger.info("Done Clust... |
@Test public void testFailedSearchWithWrongQuery() throws Exception {
logger.info("Start Testing failed search with wrong query");
startNode("server1");
client("server1").admin().indices().create(createIndexRequest("test")).actionGet();
for (int i = 0; i < 100; i++) {
in... | @Test public void testFailedSearchWithWrongQuery() throws Exception {
logger.info("Start Testing failed search with wrong query");
startNode("server1");
client("server1").admin().indices().create(createIndexRequest("test")).actionGet();
for (int i = 0; i < 100; i++) {
in... |
@BeforeMethod public void createIndex() {
logger.info("creating index [test]");
node.client().admin().indices().create(createIndexRequest("test").settings(settingsBuilder().put("index.numberOfReplicas", 0))).actionGet();
logger.info("Running Cluster Health");
ClusterHealthResponse cl... | @BeforeMethod public void createIndex() {
logger.info("creating index [test]");
node.client().admin().indices().create(createIndexRequest("test").settings(settingsBuilder().put("index.numberOfReplicas", 0))).actionGet();
logger.info("Running Cluster Health");
ClusterHealthResponse cl... |
private void doSnapshot(final Snapshot snapshot) throws IndexShardGatewaySnapshotFailedException {
ImmutableMap<String, BlobMetaData> blobs;
try {
blobs = blobContainer.listBlobs();
} catch (IOException e) {
throw new IndexShardGatewaySnapshotFailedException(shardId, ... | private void doSnapshot(final Snapshot snapshot) throws IndexShardGatewaySnapshotFailedException {
ImmutableMap<String, BlobMetaData> blobs;
try {
blobs = blobContainer.listBlobs();
} catch (IOException e) {
throw new IndexShardGatewaySnapshotFailedException(shardId, ... |
public XContentParser createParser(Reader reader) throws IOException {
return new JsonXContentParser(jsonFactory.createJsonParser(reader));
}
| public XContentParser createParser(Reader reader) throws IOException {
return new JsonXContentParser(jsonFactory.createParser(reader));
}
|
public XContentParser createParser(Reader reader) throws IOException {
return new JsonXContentParser(smileFactory.createJsonParser(reader));
}
| public XContentParser createParser(Reader reader) throws IOException {
return new JsonXContentParser(smileFactory.createParser(reader));
}
|
@Override public void writeTo(StreamOutput out) throws IOException {
out.writeUTF(term);
out.writeInt(startOffset);
out.writeInt(endOffset);
out.writeVInt(position);
if (type == null) {
out.writeBoolean(false);
} else {
... | @Override public void writeTo(StreamOutput out) throws IOException {
out.writeUTF(term);
out.writeInt(startOffset);
out.writeInt(endOffset);
out.writeVInt(position);
if (type == null) {
out.writeBoolean(false);
} else {
... |
public static void restDocumentSource(byte[] source, int offset, int length, XContentBuilder builder, ToXContent.Params params) throws IOException {
if (LZF.isCompressed(source, offset, length)) {
BytesStreamInput siBytes = new BytesStreamInput(source, offset, length, false);
LZFStre... | public static void restDocumentSource(byte[] source, int offset, int length, XContentBuilder builder, ToXContent.Params params) throws IOException {
if (LZF.isCompressed(source, offset, length)) {
BytesStreamInput siBytes = new BytesStreamInput(source, offset, length, false);
LZFStre... |
public void initialize(ApplicationListener listener, AndroidApplicationConfiguration config) {
graphics = new AndroidGraphicsLiveWallpaper(this, config.useGL20, config.resolutionStrategy==null?new FillResolutionStrategy():config.resolutionStrategy);
input = AndroidInputFactory.newAndroidInput(this, this.getService... | public void initialize(ApplicationListener listener, AndroidApplicationConfiguration config) {
graphics = new AndroidGraphicsLiveWallpaper(this, config.useGL20, config.resolutionStrategy==null?new FillResolutionStrategy():config.resolutionStrategy);
input = AndroidInputFactory.newAndroidInput(this, this.getService... |
protected PrimaryResponse<BulkShardResponse, BulkShardRequest> shardOperationOnPrimary(ClusterState clusterState, PrimaryOperationRequest shardRequest) {
final BulkShardRequest request = shardRequest.request;
IndexShard indexShard = indicesService.indexServiceSafe(shardRequest.request.index()).shard... | protected PrimaryResponse<BulkShardResponse, BulkShardRequest> shardOperationOnPrimary(ClusterState clusterState, PrimaryOperationRequest shardRequest) {
final BulkShardRequest request = shardRequest.request;
IndexShard indexShard = indicesService.indexServiceSafe(shardRequest.request.index()).shard... |
public float getDensity () {
return 96.0 / 160;
}
| public float getDensity () {
return 96.0f / 160;
}
|
public DoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return DoubleArrayAtomicFieldData.EMPTY;
}
| public DoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return DoubleArrayAtomicFieldData.empty(reader.maxDoc());
}
|
public FloatArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return FloatArrayAtomicFieldData.EMPTY;
}
| public FloatArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return FloatArrayAtomicFieldData.empty(reader.maxDoc());
}
|
public GeoPointDoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return GeoPointDoubleArrayAtomicFieldData.EMPTY;
}
| public GeoPointDoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return GeoPointDoubleArrayAtomicFieldData.empty(reader.maxDo... |
public AtomicNumericFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return PackedArrayAtomicFieldData.EMPTY;
}
| public AtomicNumericFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return PackedArrayAtomicFieldData.empty(reader.maxDoc());
}
|
public void testMissingValueForAll() throws Exception {
fillAllMissing();
IndexNumericFieldData indexFieldData = getForField("value");
AtomicNumericFieldData fieldData = indexFieldData.load(refreshReader());
assertThat(fieldData.getNumDocs(), equalTo(0));
// long values
... | public void testMissingValueForAll() throws Exception {
fillAllMissing();
IndexNumericFieldData indexFieldData = getForField("value");
AtomicNumericFieldData fieldData = indexFieldData.load(refreshReader());
assertThat(fieldData.getNumDocs(), equalTo(3));
// long values
... |
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
if (homeAdapter.isOrgPosition(itemPosition)) {
homeAdapter.setSelected(itemPosition);
setOrg(orgs.get(itemPosition));
} else {
switch (homeAdapter.getAction(itemPosition)) {
case ... | public boolean onNavigationItemSelected(int itemPosition, long itemId) {
if (homeAdapter.isOrgPosition(itemPosition)) {
homeAdapter.setSelected(itemPosition);
setOrg(orgs.get(itemPosition));
} else if (homeAdapter.getOrgCount() > 0) {
switch (homeAdapter.getAction... |
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException {
JsonParser jp = parseContext.jp();
JsonToken token = jp.nextToken();
assert token == JsonToken.FIELD_NAME;
String fieldName = jp.getCurrentName();
String value = nul... | @Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException {
JsonParser jp = parseContext.jp();
JsonToken token = jp.nextToken();
assert token == JsonToken.FIELD_NAME;
String fieldName = jp.getCurrentName();
String value = nul... |
public void testSubmitBenchmarkNegative() {
client().bench(BenchmarkTestUtil.randomRequest(
client(), new String[] {INDEX_NAME}, cluster().size(), null)).actionGet();
}
| public void testSubmitBenchmarkNegative() {
client().bench(BenchmarkTestUtil.randomRequest(
client(), new String[] {INDEX_NAME}, internalCluster().size(), null)).actionGet();
}
|
public void testSameAlias() throws Exception {
logger.info("--> creating index [test]");
createIndex("test");
ensureGreen();
logger.info("--> creating alias1 ");
assertAcked((admin().indices().prepareAliases().addAlias("test", "alias1")));
TimeValue timeout = TimeV... | public void testSameAlias() throws Exception {
logger.info("--> creating index [test]");
createIndex("test");
ensureGreen();
logger.info("--> creating alias1 ");
assertAcked((admin().indices().prepareAliases().addAlias("test", "alias1")));
TimeValue timeout = TimeV... |
public void testNodes() throws Exception {
ClusterStateResponse clusterStateResponse = client().admin().cluster().prepareState().clear().setNodes(true).get();
assertThat(clusterStateResponse.getState().nodes().nodes().size(), is(immutableCluster().size()));
ClusterStateResponse clusterState... | public void testNodes() throws Exception {
ClusterStateResponse clusterStateResponse = client().admin().cluster().prepareState().clear().setNodes(true).get();
assertThat(clusterStateResponse.getState().nodes().nodes().size(), is(cluster().size()));
ClusterStateResponse clusterStateResponseF... |
public void testUpdateSettingsValidation() throws Exception {
List<String> nodes = cluster().startNodesAsync(
settingsBuilder().put("node.data", false).build(),
settingsBuilder().put("node.master", false).build(),
settingsBuilder().put("node.master", false).bu... | public void testUpdateSettingsValidation() throws Exception {
List<String> nodes = internalCluster().startNodesAsync(
settingsBuilder().put("node.data", false).build(),
settingsBuilder().put("node.master", false).build(),
settingsBuilder().put("node.master", f... |
public void testUpdateDiscoveryPublishTimeout() {
DiscoverySettings discoverySettings = cluster().getInstance(DiscoverySettings.class);
assertThat(discoverySettings.getPublishTimeout(), equalTo(DiscoverySettings.DEFAULT_PUBLISH_TIMEOUT));
ClusterUpdateSettingsResponse response = client().... | public void testUpdateDiscoveryPublishTimeout() {
DiscoverySettings discoverySettings = internalCluster().getInstance(DiscoverySettings.class);
assertThat(discoverySettings.getPublishTimeout(), equalTo(DiscoverySettings.DEFAULT_PUBLISH_TIMEOUT));
ClusterUpdateSettingsResponse response = c... |
public void testBulkIndexingWhileInitializing() throws Exception {
int replica = randomInt(2);
cluster().ensureAtLeastNumDataNodes(1 + replica);
assertAcked(prepareCreate("test").setSettings(
ImmutableSettings.builder()
.put(indexSettings())
... | public void testBulkIndexingWhileInitializing() throws Exception {
int replica = randomInt(2);
internalCluster().ensureAtLeastNumDataNodes(1 + replica);
assertAcked(prepareCreate("test").setSettings(
ImmutableSettings.builder()
.put(indexSettings())... |
protected void createIndex() {
immutableCluster().wipeIndices(getConcreteIndexName());
createIndex(getConcreteIndexName());
}
| protected void createIndex() {
cluster().wipeIndices(getConcreteIndexName());
createIndex(getConcreteIndexName());
}
|
public void testAutoGenerateIdNoDuplicates() throws Exception {
int numberOfIterations = randomIntBetween(10, 50);
for (int i = 0; i < numberOfIterations; i++) {
Throwable firstError = null;
createIndex("test");
int numOfDocs = randomIntBetween(10, 100);
... | public void testAutoGenerateIdNoDuplicates() throws Exception {
int numberOfIterations = randomIntBetween(10, 50);
for (int i = 0; i < numberOfIterations; i++) {
Throwable firstError = null;
createIndex("test");
int numOfDocs = randomIntBetween(10, 100);
... |
public void testIndexShardLifecycleLeak() throws Exception {
client().admin().indices().prepareCreate("test")
.setSettings(ImmutableSettings.builder().put("index.number_of_shards", 1).put("index.number_of_replicas", 0))
.execute().actionGet();
client().admin().clust... | public void testIndexShardLifecycleLeak() throws Exception {
client().admin().indices().prepareCreate("test")
.setSettings(ImmutableSettings.builder().put("index.number_of_shards", 1).put("index.number_of_replicas", 0))
.execute().actionGet();
client().admin().clust... |
public void before1() throws Exception {
Settings settings = settingsBuilder()
.put("node.data", false)
.build();
cluster().startNodesAsync(settings, ImmutableSettings.EMPTY).get();
}
| public void before1() throws Exception {
Settings settings = settingsBuilder()
.put("node.data", false)
.build();
internalCluster().startNodesAsync(settings, ImmutableSettings.EMPTY).get();
}
|
public void testMoreLikeThisWithAliases() throws Exception {
logger.info("Creating index test");
assertAcked(prepareCreate("test").addMapping("type1",
jsonBuilder().startObject().startObject("type1").startObject("properties")
.startObject("text").field("type", "s... | public void testMoreLikeThisWithAliases() throws Exception {
logger.info("Creating index test");
assertAcked(prepareCreate("test").addMapping("type1",
jsonBuilder().startObject().startObject("type1").startObject("properties")
.startObject("text").field("type", "s... |
public boolean apply(Object input) {
IndicesStatsResponse indicesStatsResponse = client().admin().indices().prepareStats("test").clear().setIndexing(true).get();
logger.debug("delete count [{}]", indicesStatsResponse.getIndices().get("test").getTotal().getIndexing().getTotal(... | public boolean apply(Object input) {
IndicesStatsResponse indicesStatsResponse = client().admin().indices().prepareStats("test").clear().setIndexing(true).get();
logger.debug("delete count [{}]", indicesStatsResponse.getIndices().get("test").getTotal().getIndexing().getTotal(... |
private HttpClient httpClient() {
HttpServerTransport httpServerTransport = cluster().getDataNodeInstance(HttpServerTransport.class);
return new HttpClient(httpServerTransport.boundAddress().publishAddress());
}
| private HttpClient httpClient() {
HttpServerTransport httpServerTransport = internalCluster().getDataNodeInstance(HttpServerTransport.class);
return new HttpClient(httpServerTransport.boundAddress().publishAddress());
}
|
public HttpClient httpClient() {
HttpServerTransport httpServerTransport = cluster().getDataNodeInstance(HttpServerTransport.class);
return new HttpClient(httpServerTransport.boundAddress().publishAddress());
}
| public HttpClient httpClient() {
HttpServerTransport httpServerTransport = internalCluster().getDataNodeInstance(HttpServerTransport.class);
return new HttpClient(httpServerTransport.boundAddress().publishAddress());
}
|
public void testDuelTerms() throws Exception {
final int numDocs = scaledRandomIntBetween(1000, 2000);
final int maxNumTerms = randomIntBetween(10, 5000);
final IntOpenHashSet valuesSet = new IntOpenHashSet();
immutableCluster().wipeIndices("idx");
prepareCreate("idx")
... | public void testDuelTerms() throws Exception {
final int numDocs = scaledRandomIntBetween(1000, 2000);
final int maxNumTerms = randomIntBetween(10, 5000);
final IntOpenHashSet valuesSet = new IntOpenHashSet();
cluster().wipeIndices("idx");
prepareCreate("idx")
... |
public void afterEachTest() throws IOException {
cluster().wipeIndices("idx2");
}
| public void afterEachTest() throws IOException {
internalCluster().wipeIndices("idx2");
}
|
public void testCustomScriptCache() throws Exception {
assertAcked(prepareCreate("test").setSettings(
ImmutableSettings.settingsBuilder()
//needs to run without replicas to validate caching behaviour and make sure we always hit the very shame shard
.put(indexSetti... | public void testCustomScriptCache() throws Exception {
assertAcked(prepareCreate("test").setSettings(
ImmutableSettings.settingsBuilder()
//needs to run without replicas to validate caching behaviour and make sure we always hit the very shame shard
.put(indexSetti... |
public void reset() throws IOException, RestException {
//skip test if it matches one of the blacklist globs
for (PathMatcher blacklistedPathMatcher : blacklistPathMatchers) {
//we need to replace a few characters otherwise the test section name can't be parsed as a path on windows
... | public void reset() throws IOException, RestException {
//skip test if it matches one of the blacklist globs
for (PathMatcher blacklistedPathMatcher : blacklistPathMatchers) {
//we need to replace a few characters otherwise the test section name can't be parsed as a path on windows
... |
public static boolean areAllSupported(List<String> features) {
for (String feature : features) {
if ("benchmark".equals(feature) && ElasticsearchIntegrationTest.immutableCluster().numBenchNodes() > 0) {
continue;
}
if (!SUPPORTED.contains(feature)) {
... | public static boolean areAllSupported(List<String> features) {
for (String feature : features) {
if ("benchmark".equals(feature) && ElasticsearchIntegrationTest.cluster().numBenchNodes() > 0) {
continue;
}
if (!SUPPORTED.contains(feature)) {
... |
public void onFailure(Throwable e) {
e.printStackTrace();
failure.set(e);
latch.countDown();
}
});
}
latch.await();
assertThat(failure.get(), nullValue());
client().admin().indices(... | public void onFailure(Throwable e) {
e.printStackTrace();
failure.set(e);
latch.countDown();
}
});
}
latch.await();
assertThat(failure.get(), nullValue());
client().admin().indices(... |
public PolygonSprite (PolygonRegion region) {
setRegion(region);
setColor(1, 1, 1, 1);
setSize(Math.abs(region.getRegion().getRegionWidth()), Math.abs(region.getRegion().getRegionHeight()));
setOrigin(width / 2, height / 2);
}
| public PolygonSprite (PolygonRegion region) {
setRegion(region);
setColor(1, 1, 1, 1);
setSize(region.getRegion().getRegionWidth(), region.getRegion().getRegionHeight());
setOrigin(width / 2, height / 2);
}
|
public void draw (PolygonRegion region, float x, float y) {
draw(region, x, y, Math.abs(region.getRegion().getRegionWidth()), Math.abs(region.getRegion().getRegionHeight()));
}
| public void draw (PolygonRegion region, float x, float y) {
draw(region, x, y, region.getRegion().getRegionWidth(), region.getRegion().getRegionHeight());
}
|
public void draw (TextureRegion region, float x, float y) {
draw(region, x, y, Math.abs(region.getRegionWidth()), Math.abs(region.getRegionHeight()));
}
| public void draw (TextureRegion region, float x, float y) {
draw(region, x, y, region.getRegionWidth(), region.getRegionHeight());
}
|
public static void main(String[] args) throws Exception {
new NativeCodeGenerator().generate("src", "bin", "jni",
new String[] { "**/AudioTools.java", "**/KissFFT.java", "**/VorbisDecoder.java", "**/SoundTouch.java" },
new String[] { "**/Mpg123Decoder.java" });
String[] headerDirs = ... | public static void main(String[] args) throws Exception {
new NativeCodeGenerator().generate("src", "bin", "jni",
new String[] { "**/AudioTools.java", "**/KissFFT.java", "**/VorbisDecoder.java", "**/SoundTouch.java" },
new String[] { "**/Mpg123Decoder.java" });
String[] headerDirs = ... |
public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");
GdxTest test = new com.badlogic.gdx.tests.StbTrueTypeTest();
JoglApplicationConfiguration config = new JoglApplicationConfiguration();
co... | public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");
GdxTest test = new com.badlogic.gdx.tests.ImmediateModeRendererTest();
JoglApplicationConfiguration config = new JoglApplicationConfigurati... |
@Override protected PercolateResponse shardOperation(PercolateRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
PercolatorService percolatorService = indexService.percolateService();
PercolatorExecutor... | @Override protected PercolateResponse shardOperation(PercolateRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
PercolatorService percolatorService = indexService.percolateService();
PercolatorExecutor... |
byte[] underlyingBytes();
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.... | byte[] underlyingBytes();
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.... |
public static void pushEntry(Entry entry) {
if (entry.bytes().unsafeByteArray().length > BYTES_LIMIT) {
return;
}
Queue<Entry> ref = cache.get();
if (ref == null) {
ref = new LinkedTransferQueue<Entry>();
cache.set(ref);
}
if (count... | public static void pushEntry(Entry entry) {
if (entry.bytes().underlyingBytes().length > BYTES_LIMIT) {
return;
}
Queue<Entry> ref = cache.get();
if (ref == null) {
ref = new LinkedTransferQueue<Entry>();
cache.set(ref);
}
if (count... |
@Override public void sendResponse(RestResponse response) {
// Decide whether to close the connection or not.
boolean http10 = request.getProtocolVersion().equals(HttpVersion.HTTP_1_0);
boolean close =
HttpHeaders.Values.CLOSE.equalsIgnoreCase(request.getHeader(HttpHeaders.N... | @Override public void sendResponse(RestResponse response) {
// Decide whether to close the connection or not.
boolean http10 = request.getProtocolVersion().equals(HttpVersion.HTTP_1_0);
boolean close =
HttpHeaders.Values.CLOSE.equalsIgnoreCase(request.getHeader(HttpHeaders.N... |
public ParsedQuery parse(QueryBuilder queryBuilder) throws ElasticSearchException {
XContentParser parser = null;
try {
BytesStream unsafeBytes = queryBuilder.buildAsUnsafeBytes();
parser = XContentFactory.xContent(unsafeBytes.unsafeByteArray(), 0, unsafeBytes.size()).createP... | public ParsedQuery parse(QueryBuilder queryBuilder) throws ElasticSearchException {
XContentParser parser = null;
try {
BytesStream unsafeBytes = queryBuilder.buildAsUnsafeBytes();
parser = XContentFactory.xContent(unsafeBytes.underlyingBytes(), 0, unsafeBytes.size()).createP... |
public BytesStream buildAsUnsafeBytes(XContentType contentType) throws SearchSourceBuilderException {
try {
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
toXContent(builder, ToXContent.EMPTY_PARAMS);
return builder.unsafeStream();
} catch ... | public BytesStream buildAsUnsafeBytes(XContentType contentType) throws SearchSourceBuilderException {
try {
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
toXContent(builder, ToXContent.EMPTY_PARAMS);
return builder.underlyingStream();
} ca... |
@Override public <T extends Streamable> void sendRequest(final DiscoveryNode node, final long requestId, final String action, final Streamable message, TransportRequestOptions options) throws IOException, TransportException {
Channel targetChannel = nodeChannel(node, options);
if (compress) {
... | @Override public <T extends Streamable> void sendRequest(final DiscoveryNode node, final long requestId, final String action, final Streamable message, TransportRequestOptions options) throws IOException, TransportException {
Channel targetChannel = nodeChannel(node, options);
if (compress) {
... |
private void testRawField(XContentType type) throws IOException {
XContentBuilder builder = XContentFactory.contentBuilder(type);
builder.startObject();
builder.field("field1", "value1");
builder.rawField("_source", XContentFactory.unCachedContentBuilder(type).startObject().field("s_... | private void testRawField(XContentType type) throws IOException {
XContentBuilder builder = XContentFactory.contentBuilder(type);
builder.startObject();
builder.field("field1", "value1");
builder.rawField("_source", XContentFactory.contentBuilder(type).startObject().field("s_field", ... |
public static String full() {
StringBuilder sb = new StringBuilder("ElasticSearch/");
sb.append(number);
if (snapshotBuild) {
sb.append("/").append(date);
}
return sb.toString();
}
| public static String full() {
StringBuilder sb = new StringBuilder("elasticsearch/");
sb.append(number);
if (snapshotBuild) {
sb.append("/").append(date);
}
return sb.toString();
}
|
@Override public String toString() {
return "bound_address[" + boundAddress + "], publish_address[" + publishAddress + "]";
}
| @Override public String toString() {
return "bound_address {" + boundAddress + "}, publish_address {" + publishAddress + "}";
}
|
@Override public boolean onPortNumber(int portNumber) {
try {
LocateRegistry.createRegistry(portNumber);
serviceUrl = settings.get("jmx.serviceUrl", JMXRMI_URI_PATTERN).replace("{jmx.port}", Integer.toString(portNumber));
... | @Override public boolean onPortNumber(int portNumber) {
try {
LocateRegistry.createRegistry(portNumber);
serviceUrl = settings.get("jmx.serviceUrl", JMXRMI_URI_PATTERN).replace("{jmx.port}", Integer.toString(portNumber));
... |
@Override public void run() {
try {
long throttlingStartTime = System.currentTimeMillis();
while (!recoveryThrottler.tryStream(shardId, entry.getKey())) {
Thread.sleep(recoveryThrottler.throttleInterval().mil... | @Override public void run() {
try {
long throttlingStartTime = System.currentTimeMillis();
while (!recoveryThrottler.tryStream(shardId, entry.getKey())) {
Thread.sleep(recoveryThrottler.throttleInterval().mil... |
public static void main (String[] argv) {
// this is only here for me to debug native code faster
// new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
// new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
// new Sha... | public static void main (String[] argv) {
// this is only here for me to debug native code faster
// new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
// new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
// new Sha... |
public void render() {
GL10 gl = Gdx.graphics.getGL10();
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
camera.setMatrices();
angle += Gdx.graphics.getDeltaTime() * 20;
animInfo.update(Gdx.graphics.getDeltaTime());
gl.glEnable(GL10.GL_DEPTH_TEST);
long start = 0;
float renderTime =... | public void render() {
GL10 gl = Gdx.graphics.getGL10();
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
camera.setMatrices();
angle += Gdx.graphics.getDeltaTime() * 20;
animInfo.update(Gdx.graphics.getDeltaTime());
gl.glEnable(GL10.GL_DEPTH_TEST);
long start = 0;
float renderTime =... |
public Document createDocument() {
Document document = new Document();
document.add(new StoredField("_source", source));
return document;
}
| public Document createDocument() {
Document document = new Document();
document.add(new StoredField(SourceFieldMapper.NAME, source));
return document;
}
|
public Document createDocument() {
Document document = new Document();
document.add(new StoredField("_uid", uid));
return document;
}
| public Document createDocument() {
Document document = new Document();
document.add(new StoredField(UidFieldMapper.NAME, uid));
return document;
}
|
public ShortArray computeTriangles (float[] vertices, int offset, int count) {
this.vertices = vertices;
int vertexCount = this.vertexCount = count / 2;
ShortArray indicesArray = this.indicesArray;
indicesArray.clear();
indicesArray.ensureCapacity(vertexCount);
indicesArray.size = vertexCount;
short[] i... | public ShortArray computeTriangles (float[] vertices, int offset, int count) {
this.vertices = vertices;
int vertexCount = this.vertexCount = count / 2;
ShortArray indicesArray = this.indicesArray;
indicesArray.clear();
indicesArray.ensureCapacity(vertexCount);
indicesArray.size = vertexCount;
short[] i... |
public boolean containsValue (float value, float epsilon) {
if (hasZeroValue && Math.abs(zeroValue - value) <= epsilon) return true;
float[] valueTable = this.valueTable;
for (int i = capacity + stashSize; i-- > 0;)
if (Math.abs(valueTable[i] - value) <= epsilon) return true;
return false;
}
| public boolean containsValue (float value, float epsilon) {
if (hasZeroValue && zeroValue == value) return true;
float[] valueTable = this.valueTable;
for (int i = capacity + stashSize; i-- > 0;)
if (Math.abs(valueTable[i] - value) <= epsilon) return true;
return false;
}
|
public void messageReceived(final RecoveryFileChunkRequest request, TransportChannel channel) throws Exception {
InternalIndexShard shard = (InternalIndexShard) indicesService.indexServiceSafe(request.shardId().index().name()).shardSafe(request.shardId().id());
RecoveryStatus onGoingReco... | public void messageReceived(final RecoveryFileChunkRequest request, TransportChannel channel) throws Exception {
InternalIndexShard shard = (InternalIndexShard) indicesService.indexServiceSafe(request.shardId().index().name()).shardSafe(request.shardId().id());
RecoveryStatus onGoingReco... |
@Override public boolean keyDown (int keycode) {
if (keycode == Keys.KEYCODE_SPACE) {
app.log("TestCollection", "disposing test '" + tests[testIndex].getClass().getName());
tests[testIndex].dispose();
testIndex++;
if (testIndex >= tests.length) testIndex = 0;
Box2DTest test = tests[testIndex];
test... | @Override public boolean keyDown (int keycode) {
if (keycode == Keys.SPACE) {
app.log("TestCollection", "disposing test '" + tests[testIndex].getClass().getName());
tests[testIndex].dispose();
testIndex++;
if (testIndex >= tests.length) testIndex = 0;
Box2DTest test = tests[testIndex];
test.create(... |
@Override public boolean keyUp (int keycode) {
if (keycode != Input.Keys.KEYCODE_SPACE) return false;
if (music.isPlaying())
music.pause();
else
music.play();
return false;
}
| @Override public boolean keyUp (int keycode) {
if (keycode != Input.Keys.SPACE) return false;
if (music.isPlaying())
music.pause();
else
music.play();
return false;
}
|
@Override public boolean keyDown (int keycode) {
if (keycode != Input.Keys.KEYCODE_SPACE) return false;
float scale = MathUtils.random(0.75f, 1.25f);
float angle = MathUtils.random(1, 360);
spriteCache.beginCache(normalCacheID);
for (int i = 0; i < sprites2.length; i += 6)
spriteCache.add(texture2, sprite... | @Override public boolean keyDown (int keycode) {
if (keycode != Input.Keys.SPACE) return false;
float scale = MathUtils.random(0.75f, 1.25f);
float angle = MathUtils.random(1, 360);
spriteCache.beginCache(normalCacheID);
for (int i = 0; i < sprites2.length; i += 6)
spriteCache.add(texture2, sprites2[i], s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.