buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private void renderVA (int primitiveType, int offset, int count) { GL10 gl = Gdx.graphics.getGL10(); int numAttributes = attributes.size(); int type = useFixedPoint ? GL11.GL_FIXED : GL11.GL_FLOAT; int textureUnit = 0; for (int i = 0; i < numAttributes; i++) { VertexAttribute attribute = attributes.get(...
private void renderVA (int primitiveType, int offset, int count) { GL10 gl = Gdx.gl10; int numAttributes = attributes.size(); int type = useFixedPoint ? GL11.GL_FIXED : GL11.GL_FLOAT; int textureUnit = 0; for (int i = 0; i < numAttributes; i++) { VertexAttribute attribute = attributes.get(i); if (att...
public void setMatrices () { update(); GL10 gl = Gdx.graphics.getGL10(); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadMatrixf(getCombinedMatrix().val, 0); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); }
public void setMatrices () { update(); GL10 gl = Gdx.gl10; gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadMatrixf(getCombinedMatrix().val, 0); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); }
public void setMatrices () { setViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); update(); GL10 gl = Gdx.graphics.getGL10(); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadMatrixf(getCombinedMatrix().val, 0); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); }
public void setMatrices () { setViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); update(); GL10 gl = Gdx.gl10; gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadMatrixf(getCombinedMatrix().val, 0); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); }
public static void main (String[] argv) { JoglApplication app = new JoglApplication("BitmapFont Test", 480, 320, false); app.getGraphics().setRenderListener(new com.badlogic.gdx.tests.BitmapFontTest()); }
public static void main (String[] argv) { JoglApplication app = new JoglApplication("BitmapFont Flip Test", 480, 320, false); app.getGraphics().setRenderListener(new com.badlogic.gdx.tests.BitmapFontTest()); }
@Override public void onRefreshSettings(Settings settings) { double expungeDeletesPctAllowed = settings.getAsDouble("index.merge.policy.expunge_deletes_allowed", TieredMergePolicyProvider.this.expungeDeletesPctAllowed); if (expungeDeletesPctAllowed != TieredMergePolicyProvider.this.expun...
@Override public void onRefreshSettings(Settings settings) { double expungeDeletesPctAllowed = settings.getAsDouble("index.merge.policy.expunge_deletes_allowed", TieredMergePolicyProvider.this.expungeDeletesPctAllowed); if (expungeDeletesPctAllowed != TieredMergePolicyProvider.this.expun...
private Filter parse(String alias, CompressedString filter) { if (filter == null) { return null; } try { byte[] filterSource = filter.uncompressed(); XContentParser parser = XContentFactory.xContent(filterSource).createParser(filterSource); try...
private Filter parse(String alias, CompressedString filter) { if (filter == null) { return null; } try { byte[] filterSource = filter.uncompressed(); XContentParser parser = XContentFactory.xContent(filterSource).createParser(filterSource); try...
public void parse(XContentParser parser, SearchContext context) throws Exception { XContentParser.Token token; List<SearchContextFacets.Entry> entries = new ArrayList<SearchContextFacets.Entry>(); String facetName = null; while ((token = parser.nextToken()) != XContentParser.Token....
public void parse(XContentParser parser, SearchContext context) throws Exception { XContentParser.Token token; List<SearchContextFacets.Entry> entries = new ArrayList<SearchContextFacets.Entry>(); String facetName = null; while ((token = parser.nextToken()) != XContentParser.Token....
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException { Filter facetFilter = context.queryParserService().parseInnerFilter(parser); return new FilterFacetExecutor(facetFilter); }
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException { Filter facetFilter = context.queryParserService().parseInnerFilter(parser).filter(); return new FilterFacetExecutor(facetFilter); }
public void search(List<AtomicReaderContext> leaves, Weight weight, Collector collector) throws IOException { if (searchContext.timeoutInMillis() != -1) { // TODO: change to use our own counter that uses the scheduler in ThreadPool collector = new TimeLimitingCollector(collector, Tim...
public void search(List<AtomicReaderContext> leaves, Weight weight, Collector collector) throws IOException { if (searchContext.timeoutInMillis() != -1) { // TODO: change to use our own counter that uses the scheduler in ThreadPool collector = new TimeLimitingCollector(collector, Tim...
public SortField parse(XContentParser parser, SearchContext context) throws Exception { String script = null; String scriptLang = null; String type = null; Map<String, Object> params = null; boolean reverse = false; SortMode sortMode = null; String nestedPath ...
public SortField parse(XContentParser parser, SearchContext context) throws Exception { String script = null; String scriptLang = null; String type = null; Map<String, Object> params = null; boolean reverse = false; SortMode sortMode = null; String nestedPath ...
private void addCompoundSortField(XContentParser parser, SearchContext context, List<SortField> sortFields) throws Exception { XContentParser.Token token; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { ...
private void addCompoundSortField(XContentParser parser, SearchContext context, List<SortField> sortFields) throws Exception { XContentParser.Token token; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { ...
@Override public Snapshot snapshot(Snapshot snapshot) { synchronized (mutex) { MemorySnapshot memorySnapshot = (MemorySnapshot) snapshot; if (currentId() != snapshot.translogId()) { return snapshot(); } MemorySnapshot newSnapshot = new MemorySn...
@Override public Snapshot snapshot(Snapshot snapshot) { synchronized (mutex) { MemorySnapshot memorySnapshot = (MemorySnapshot) snapshot; if (currentId() != snapshot.translogId()) { return snapshot(); } MemorySnapshot newSnapshot = new MemorySn...
private void loadEmitterImages (FileHandle imagesDir) { 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).getName(); emitter.setTexture(loadTex...
private void loadEmitterImages (FileHandle imagesDir) { 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(); emitter...
public void create () { batch = new SpriteBatch(); spriteSheet = new SpriteSheet(Gdx.files.internal("data/pack"), Gdx.files.internal("data")); badlogic = spriteSheet.get("badlogic"); badlogicSmall = spriteSheet.get("badlogicsmall"); star = spriteSheet.get("particle-star"); badlogic.setPosition(50, 50); ...
public void create () { batch = new SpriteBatch(); spriteSheet = new SpriteSheet(Gdx.files.internal("data/pack"), Gdx.files.internal("data")); badlogic = spriteSheet.get("badlogicslice"); badlogicSmall = spriteSheet.get("badlogicsmall"); star = spriteSheet.get("particle-star"); badlogic.setPosition(50, 5...
private Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoResponse nodesInfo, NodesStatsResponse nodesStats) { boolean fullId = req.paramAsBoolean("full_id", false); String masterId = state.getState().nodes().masterNodeId(); Table table = new Table(); table.sta...
private Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoResponse nodesInfo, NodesStatsResponse nodesStats) { boolean fullId = req.paramAsBoolean("full_id", false); String masterId = state.getState().nodes().masterNodeId(); Table table = new Table(); table.sta...
private ClusterState disconnectFromCluster(ClusterState clusterState, String reason) { logger.warn(reason + ", current nodes: {}", clusterState.nodes()); nodesFD.stop(); masterFD.stop(reason); master = false; ClusterBlocks clusterBlocks = ClusterBlocks.builder().blocks(clust...
private ClusterState disconnectFromCluster(ClusterState clusterState, String reason) { logger.warn(reason + ", current nodes: {}", clusterState.nodes()); nodesFD.stop(); masterFD.stop(reason); master = false; ClusterBlocks clusterBlocks = ClusterBlocks.builder().blocks(clust...
@Test public void testAliases() 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(clusterHea...
@Test public void testAliases() 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(clusterHea...
@Test public void testBroadcastOperations() throws IOException { startNode("server1"); client("server1").admin().indices().create(createIndexRequest("test")).actionGet(5000); logger.info("Running Cluster Health"); ClusterHealthResponse clusterHealth = client("server1").admin().clus...
@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 testNodesInfos() { startNode("server1"); startNode("server2"); String server1NodeId = ((InternalNode) node("server1")).injector().getInstance(ClusterService.class).state().nodes().localNodeId(); String server2NodeId = ((InternalNode) node("server2")).injector().getI...
@Test public void testNodesInfos() { startNode("server1"); startNode("server2"); String server1NodeId = ((InternalNode) node("server1")).injector().getInstance(ClusterService.class).state().nodes().localNodeId(); String server2NodeId = ((InternalNode) node("server2")).injector().getI...
@Test public void testSimpleStringTerms() throws Exception { IndexStatus indexStatus = client.admin().indices().status(indicesStatus("test")).actionGet().index("test"); // verify no freqs logger.info("Verify no freqs"); TermsResponse termsResponse = client.terms(termsRequest("test")...
@Test public void testSimpleStringTerms() throws Exception { IndexStatus indexStatus = client.admin().indices().status(indicesStatus("test")).actionGet().index("test"); // verify no freqs logger.info("Verify no freqs"); TermsResponse termsResponse = client.prepareTerms("test").setFi...
public MetaDataService(Settings settings) { super(settings); indexMdLocks = new Semaphore[1]; for (int i = 0; i < indexMdLocks.length; i++) { indexMdLocks[i] = new Semaphore(1); } }
public MetaDataService(Settings settings) { super(settings); indexMdLocks = new Semaphore[500]; for (int i = 0; i < indexMdLocks.length; i++) { indexMdLocks[i] = new Semaphore(1); } }
public int getNumVertices () { return buffer.limit() * 4 / attributes.vertexSize; }
public int getNumVertices () { return buffer.limit() / (attributes.vertexSize / 4); }
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String keyScript = null; String valueScript = null; String scriptLang = null; Map<String, Object> params =...
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String keyScript = null; String valueScript = null; String scriptLang = null; Map<String, Object> params =...
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String scriptLang = null; String keyScript = null; String valueScript = null; Map<String, Object> params =...
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String scriptLang = null; String keyScript = null; String valueScript = null; Map<String, Object> params =...
public SignificantLongTerms buildAggregation(long owningBucketOrdinal) { assert owningBucketOrdinal == 0; final int size = (int) Math.min(bucketOrds.size(), shardSize); ContextIndexSearcher searcher = context.searchContext().searcher(); IndexReader topReader = searcher.getIndexRead...
public SignificantLongTerms buildAggregation(long owningBucketOrdinal) { assert owningBucketOrdinal == 0; final int size = (int) Math.min(bucketOrds.size(), shardSize); ContextIndexSearcher searcher = context.searchContext().searcher(); IndexReader topReader = searcher.getIndexRead...
public SignificantStringTerms buildAggregation(long owningBucketOrdinal) { assert owningBucketOrdinal == 0; final int size = (int) Math.min(bucketOrds.size(), shardSize); ContextIndexSearcher searcher = context.searchContext().searcher(); IndexReader topReader = searcher.getIndexRe...
public SignificantStringTerms buildAggregation(long owningBucketOrdinal) { assert owningBucketOrdinal == 0; final int size = (int) Math.min(bucketOrds.size(), shardSize); ContextIndexSearcher searcher = context.searchContext().searcher(); IndexReader topReader = searcher.getIndexRe...
public static void assertNoTimeout(ClusterHealthResponse response) { assertThat("ClusterHealthResponse has timed out", response.isTimedOut(), is(false)); }
public static void assertNoTimeout(ClusterHealthResponse response) { assertThat("ClusterHealthResponse has timed out - returned status: [" + response.getStatus() + "]", response.isTimedOut(), is(false)); }
public TextField (String name, float prefWidth, TextFieldStyle style) { super(name, prefWidth, 0); this.style = style; this.initialPrefWidth = prefWidth; this.clipboard = Gdx.app.getType() == ApplicationType.Desktop ? new DesktopClipboard() : new AndroidClipboard(); layout(); this.width = this.prefWidth; ...
public TextField (String name, float prefWidth, TextFieldStyle style) { super(name, prefWidth, 0); this.style = style; this.initialPrefWidth = prefWidth; this.clipboard = Clipboard.getDefaultKeyboard(); layout(); this.width = this.prefWidth; this.height = this.prefHeight; }
@Override protected Fieldable parseCreateField(ParseContext context) throws IOException { if (!enabled) { return null; } return new CustomIntegerNumericField(this, context.source().length); }
@Override protected Fieldable parseCreateField(ParseContext context) throws IOException { if (!enabled) { return null; } return new CustomIntegerNumericField(this, context.sourceLength()); }
@Override protected ShardStatus shardOperation(IndexShardStatusRequest request) throws ElasticSearchException { InternalIndexService indexService = (InternalIndexService) indicesService.indexServiceSafe(request.index()); InternalIndexShard indexShard = (InternalIndexShard) indexService.shardSafe(req...
@Override protected ShardStatus shardOperation(IndexShardStatusRequest request) throws ElasticSearchException { InternalIndexService indexService = (InternalIndexService) indicesService.indexServiceSafe(request.index()); InternalIndexShard indexShard = (InternalIndexShard) indexService.shardSafe(req...
public ImmutableMap<String, BlobMetaData> listBlobs() throws IOException { File[] files = path.listFiles(); if (files == null || files.length == 0) { return ImmutableMap.of(); } ImmutableMap.Builder<String, BlobMetaData> builder = ImmutableMap.builder(); for (File...
public ImmutableMap<String, BlobMetaData> listBlobs() throws IOException { File[] files = path.listFiles(); if (files == null || files.length == 0) { return ImmutableMap.of(); } ImmutableMap.Builder<String, BlobMetaData> builder = ImmutableMap.builder(); for (File...
@Override public SnapshotStatus snapshot(SnapshotIndexCommit snapshotIndexCommit, Translog.Snapshot translogSnapshot) throws EngineException { if (lastIndexVersion != snapshotIndexCommit.getVersion() || lastTranslogId != translogSnapshot.translogId() || lastTranslogLength < translogS...
@Override public SnapshotStatus snapshot(SnapshotIndexCommit snapshotIndexCommit, Translog.Snapshot translogSnapshot) throws EngineException { if (lastIndexVersion != snapshotIndexCommit.getVersion() || lastTranslogId != translogSnapshot.translogId() || lastTranslogLength < translogS...
public long totalSizeInBytes() { long totalSizeInBytes = 0; for (StoreFileMetaData file : this) { totalSizeInBytes += file.sizeInBytes(); } return totalSizeInBytes; }
public long totalSizeInBytes() { long totalSizeInBytes = 0; for (StoreFileMetaData file : this) { totalSizeInBytes += file.length(); } return totalSizeInBytes; }
@Override public StoreFilesMetaData listStoreMetaData(ShardId shardId) throws IOException { InternalIndexShard indexShard = (InternalIndexShard) indexService.shard(shardId.id()); if (indexShard == null) { return listUnallocatedStoreMetaData(shardId); } else { return n...
@Override public StoreFilesMetaData listStoreMetaData(ShardId shardId) throws IOException { InternalIndexShard indexShard = (InternalIndexShard) indexService.shard(shardId.id()); if (indexShard == null) { return listUnallocatedStoreMetaData(shardId); } else { return n...
@Override public ImmutableMap<String, BlobMetaData> listBlobsByPrefix(@Nullable String blobNamePrefix) throws IOException { ImmutableMap.Builder<String, BlobMetaData> blobsBuilder = ImmutableMap.builder(); ObjectListing prevListing = null; while (true) { ObjectListing list; ...
@Override public ImmutableMap<String, BlobMetaData> listBlobsByPrefix(@Nullable String blobNamePrefix) throws IOException { ImmutableMap.Builder<String, BlobMetaData> blobsBuilder = ImmutableMap.builder(); ObjectListing prevListing = null; while (true) { ObjectListing list; ...
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, renderable.lights.directionalLights.size, ...
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, 2, 5, 3, renderable.bones == null ? 0 : 12...
public void testFailure() throws Exception { assertAcked(prepareCreate("test").addAlias(new Alias("alias"))); DeleteByQueryResponse response = client().prepareDeleteByQuery(indexOrAlias()) .setQuery(QueryBuilders.hasChildQuery("type", QueryBuilders.matchAllQuery())) ...
public void testFailure() throws Exception { assertAcked(prepareCreate("test").addAlias(new Alias("alias"))); DeleteByQueryResponse response = client().prepareDeleteByQuery(indexOrAlias()) .setQuery(QueryBuilders.hasChildQuery("type", QueryBuilders.matchAllQuery())) ...
public void consistentHitsWithSameSeed() throws Exception { prepareCreate("test").execute().actionGet(); ensureGreen(); int docCount = atLeast(100); for (int i = 0; i < docCount; i++) { index("test", "type", "" + docCount, jsonBuilder().startObject().endObject()); ...
public void consistentHitsWithSameSeed() throws Exception { prepareCreate("test").execute().actionGet(); ensureGreen(); int docCount = atLeast(100); for (int i = 0; i < docCount; i++) { index("test", "type", "" + i, jsonBuilder().startObject().endObject()); } ...
public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Bits acceptDocs) throws IOException { Scorer subQueryScorer = subQueryWeight.scorer(context, scoreDocsInOrder, topScorer, acceptDocs); if (subQueryScorer == null) { return null;...
public Scorer scorer(AtomicReaderContext context, boolean scoreDocsInOrder, boolean topScorer, Bits acceptDocs) throws IOException { Scorer subQueryScorer = subQueryWeight.scorer(context, scoreDocsInOrder, false, acceptDocs); if (subQueryScorer == null) { return null; ...
public void run() { long id = -1; try { logger.info("**** starting indexing thread {}", indexerId); while (!stop.get()) { id = idGenerator.incrementAndGet(); cl...
public void run() { long id = -1; try { logger.info("**** starting indexing thread {}", indexerId); while (!stop.get()) { id = idGenerator.incrementAndGet(); cl...
@Override public Action copy () { return $(x, y, duration); }
@Override public Action copy () { return $(deltaX, deltaY, duration); }
@Override public int get(T key) { int index = index(key); return index < 0 ? defaultReturnValue : _values[index]; } }
@Override public final int get(T key) { int index = index(key); return index < 0 ? defaultReturnValue : _values[index]; } }
public void collect(int docId, long bucketOrdinal) throws IOException { TopDocsCollector topDocsCollector = topDocsCollectors.get(bucketOrdinal); if (topDocsCollector == null) { Sort sort = topHitsContext.sort(); int topN = topHitsContext.from() + topHitsContext.size(); ...
public void collect(int docId, long bucketOrdinal) throws IOException { TopDocsCollector topDocsCollector = topDocsCollectors.get(bucketOrdinal); if (topDocsCollector == null) { Sort sort = topHitsContext.sort(); int topN = topHitsContext.from() + topHitsContext.size(); ...
public GwtGraphics (Panel root, GwtApplicationConfiguration config) { Canvas canvasWidget = Canvas.createIfSupported(); if(canvasWidget == null) return; canvas = canvasWidget.getCanvasElement(); root.add(canvasWidget); canvas.setWidth(config.width); canvas.setHeight(config.height); this.config = config; ...
public GwtGraphics (Panel root, GwtApplicationConfiguration config) { Canvas canvasWidget = Canvas.createIfSupported(); if(canvasWidget == null) throw new GdxRuntimeException("Canvas not supported"); canvas = canvasWidget.getCanvasElement(); root.add(canvasWidget); canvas.setWidth(config.width); canvas.set...
public Rect addImage (BufferedImage image, String name) { Rect rect = processImage(image, name); if (rect == null) { System.out.println("Ignoring blank input image: " + name); return null; } if (settings.alias) { String crc = hash(rect.getImage(this)); Rect existing = crcs.get(crc); if (existi...
public Rect addImage (BufferedImage image, String name) { Rect rect = processImage(image, name); if (rect == null) { System.out.println("Ignoring blank input image: " + name); return null; } if (settings.alias) { String crc = hash(rect.getImage(this)); Rect existing = crcs.get(crc); if (existi...
public boolean allocateUnassigned(RoutingAllocation allocation) { boolean changed = false; DiscoveryNodes nodes = allocation.nodes(); RoutingNodes routingNodes = allocation.routingNodes(); // First, handle primaries, they must find a place to be allocated on here Iterator<Mu...
public boolean allocateUnassigned(RoutingAllocation allocation) { boolean changed = false; DiscoveryNodes nodes = allocation.nodes(); RoutingNodes routingNodes = allocation.routingNodes(); // First, handle primaries, they must find a place to be allocated on here Iterator<Mu...
public void glBufferData (int target, int size, Buffer data, int usage) { if(data == null) GL15.glBufferData(target, size, usage); else if (data instanceof ByteBuffer) GL15.glBufferData(target, (ByteBuffer)data, usage); else if (data instanceof IntBuffer) GL15.glBufferData(target, (IntBuffer)data, usage...
public void glBufferData (int target, int size, Buffer data, int usage) { if(data == null) throw new GdxRuntimeException("Using null for the data not possible, blame LWJGL"); else if (data instanceof ByteBuffer) GL15.glBufferData(target, (ByteBuffer)data, usage); else if (data instanceof IntBuffer) GL15...
public void draw (TextureRegion region, float x, float y) { draw(region, x, y, region.getRegionWidth(), region.getRegionHeight()); }
public void draw (TextureRegion region, float x, float y) { draw(region, x, y, Math.abs(region.getRegionWidth()), Math.abs(region.getRegionHeight())); }
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.TextureDataTest(), "Debug Test", 480, 320, false); }
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.AnimationTest(), "Debug Test", 480, 320, false); }
public void create () { super.create(); instructions = "Swipe for next test"; // Set up the camera final float width = Gdx.graphics.getWidth(); final float height = Gdx.graphics.getHeight(); if (width > height) camera = new PerspectiveCamera(67f, 3f * width / height, 3f); else camera = new Perspect...
public void create () { super.create(); instructions = "Swipe for next test"; // Set up the camera final float width = Gdx.graphics.getWidth(); final float height = Gdx.graphics.getHeight(); if (width > height) camera = new PerspectiveCamera(67f, 3f * width / height, 3f); else camera = new Perspect...
package org.elasticsearch.search.facet; /* * 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 Licen...
package org.elasticsearch.search.facet; /* * 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 Licen...
package org.elasticsearch.search.facet.collector; /* * 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 Ap...
package org.elasticsearch.search.facet.collector; /* * 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 Ap...
@Override public void run() { recoveryStatus = new RecoveryStatus(); recoveryStatus.updateStage(RecoveryStatus.Stage.INIT); // we know we are on a thread, we can spin till we can engage in recovery while (!recoveryThrottler.tryRecovery(shardId...
@Override public void run() { recoveryStatus = new RecoveryStatus(); recoveryStatus.updateStage(RecoveryStatus.Stage.INIT); // we know we are on a thread, we can spin till we can engage in recovery while (!recoveryThrottler.tryRecovery(shardId...
public static enum Stage { INIT, RETRY, INDEX, TRANSLOG, DONE }
public static enum Stage { INIT, THROTTLE, INDEX, TRANSLOG, DONE }
public static enum Stage { INIT, RETRY, INDEX, TRANSLOG, FINALIZE, DONE }
public static enum Stage { INIT, THROTTLE, INDEX, TRANSLOG, FINALIZE, DONE }
public SortField parse(XContentParser parser, SearchContext context) throws Exception { String fieldName = null; GeoPoint point = new GeoPoint(); DistanceUnit unit = DistanceUnit.KILOMETERS; GeoDistance geoDistance = GeoDistance.ARC; boolean reverse = false; SortMode ...
public SortField parse(XContentParser parser, SearchContext context) throws Exception { String fieldName = null; GeoPoint point = new GeoPoint(); DistanceUnit unit = DistanceUnit.KILOMETERS; GeoDistance geoDistance = GeoDistance.ARC; boolean reverse = false; SortMode ...
private static final String buildMessage(String phaseName, String msg, ShardSearchFailure[] shardFailures) { StringBuilder sb = new StringBuilder(); sb.append("Failed to execute [").append(phaseName).append("] ").append(msg); if (shardFailures != null && shardFailures.length > 0) { ...
private static final String buildMessage(String phaseName, String msg, ShardSearchFailure[] shardFailures) { StringBuilder sb = new StringBuilder(); sb.append("Failed to execute phase [").append(phaseName).append("], ").append(msg); if (shardFailures != null && shardFailures.length > 0) { ...
package com.github.mobile.core.repo; /* * Copyright 2012 GitHub 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 requi...
package com.github.mobile.core.repo; /* * Copyright 2012 GitHub 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 requi...
public static BigArrays randombigArrays() { final PageCacheRecycler recycler = randomBoolean() ? null : new MockPageCacheRecycler(ImmutableSettings.EMPTY, new ThreadPool()); return new MockBigArrays(ImmutableSettings.EMPTY, recycler); }
public static BigArrays randombigArrays() { final PageCacheRecycler recycler = randomBoolean() ? null : new MockPageCacheRecycler(ImmutableSettings.EMPTY, new ThreadPool("BigArraysTests")); return new MockBigArrays(ImmutableSettings.EMPTY, recycler); }
public void testRandom() throws Exception { Directory directory = newDirectory(); final Random r = random(); final IndexWriterConfig iwc = LuceneTestCase.newIndexWriterConfig(r, LuceneTestCase.TEST_VERSION_CURRENT, new MockAnalyzer(r)) .setMaxBufferedDocs(Inde...
public void testRandom() throws Exception { Directory directory = newDirectory(); final Random r = random(); final IndexWriterConfig iwc = LuceneTestCase.newIndexWriterConfig(r, LuceneTestCase.TEST_VERSION_CURRENT, new MockAnalyzer(r)) .setMaxBufferedDocs(Inde...
protected void renderWorld () { if (world.performanceCounter != null) world.performanceCounter.start(); if (USE_BULLET_FRUSTUM_CULLING) getEntitiesCollidingWithObject(world, frustumObject, visibleEntities, tempManifoldArr); else { visibleEntities.clear(); for (int i = 0; i < world.entities.size; i++)...
protected void renderWorld () { if (world.performanceCounter != null) world.performanceCounter.start(); if (USE_BULLET_FRUSTUM_CULLING) getEntitiesCollidingWithObject(world, frustumObject, visibleEntities, tempManifoldArr); else { visibleEntities.clear(); for (int i = 0; i < world.entities.size; i++)...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String keyScript = null; String valueScript = null; Map<String, Object> params = null; long int...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String keyScript = null; String valueScript = null; Map<String, Object> params = null; long int...
AnalyzeRequestBuilder prepareAnalyze(String index, String text); /* * 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 y...
AnalyzeRequestBuilder prepareAnalyze(String index, String text); /* * 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 y...
@Test public void simpleAnalyzerTests() throws Exception { try { client.admin().indices().prepareDelete("test").execute().actionGet(); } catch (Exception e) { // ignore } client.admin().indices().prepareCreate("test").execute().actionGet(); client.adm...
@Test public void simpleAnalyzerTests() throws Exception { try { client.admin().indices().prepareDelete("test").execute().actionGet(); } catch (Exception e) { // ignore } client.admin().indices().prepareCreate("test").execute().actionGet(); client.adm...
private TmxMapHelper () { } static int[] getTileIds (Element element, int width, int height) { Element data = element.getChildByName("data"); String encoding = data.getAttribute("encoding", null); if (encoding == null) { // no 'encoding' attribute means that the encoding is XML throw new GdxRuntimeExcepti...
private TmxMapHelper () { } static int[] getTileIds (Element element, int width, int height) { Element data = element.getChildByName("data"); String encoding = data.getAttribute("encoding", null); if (encoding == null) { // no 'encoding' attribute means that the encoding is XML throw new GdxRuntimeExcepti...
public void create () { if (fileName.endsWith(".xml")) { model = new OgreXmlLoader().load(Gdx.files.internal(fileName), Gdx.files.internal(fileName.replace("mesh.xml", "skeleton.xml"))); } else throw new GdxRuntimeException("Unknown file format '" + fileName + "'"); if (textureFileName != null) texture...
public void create () { if (fileName.endsWith(".xml")) { model = new OgreXmlLoader().load(Gdx.files.internal(fileName), Gdx.files.internal(fileName.replace("mesh.xml", "skeleton.xml"))); } else throw new GdxRuntimeException("Unknown file format '" + fileName + "'"); if (textureFileName != null) texture...
public Quaternion nor () { float len = len2(); if (len != 0.f && (Math.abs(len - 1.0f) > MathUtils.FLOAT_ROUNDING_ERROR)) { len = (float)Math.sqrt(len); w /= len; x /= len; y /= len; z /= len; } return this; }
public Quaternion nor () { float len = len2(); if (len != 0.f && !MathUtils.isEqual(len, 1f)) { len = (float)Math.sqrt(len); w /= len; x /= len; y /= len; z /= len; } return this; }
public void unmapped() throws Exception { client().admin().cluster().prepareHealth("idx_unmapped").setWaitForYellowStatus().execute().actionGet(); SearchResponse response = client().prepareSearch("idx_unmapped") .addAggregation(dateHistogram("histo").field("date").interval(DateHisto...
public void unmapped() throws Exception { client().admin().cluster().prepareHealth("idx_unmapped").setWaitForGreenStatus().execute().actionGet(); SearchResponse response = client().prepareSearch("idx_unmapped") .addAggregation(dateHistogram("histo").field("date").interval(DateHistog...
public void create () { Gdx.input = new RemoteInput(); Gdx.input.setInputProcessor(this); }
public void create () { // Gdx.input = new RemoteInput(); Gdx.input.setInputProcessor(this); }
@Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; Filter filter = null; float boost = 1.0f; String scope = null; String path = null; Bloc...
@Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; Filter filter = null; float boost = 1.0f; String scope = null; String path = null; Bloc...
Object run(Map<String, Object> vars); /* * 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...
Object run(Map<String, Object> vars); /* * 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...
public static void main(String[] args) { GroovyScriptEngineService se = new GroovyScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS); Object compiled = se.compile("x + y"); Map<String, Integer> vars = new HashMap<String, Integer>(); // warm up for (int i = 0; i < ...
public static void main(String[] args) { GroovyScriptEngineService se = new GroovyScriptEngineService(ImmutableSettings.Builder.EMPTY_SETTINGS); Object compiled = se.compile("x + y"); Map<String, Object> vars = new HashMap<String, Object>(); // warm up for (int i = 0; i < 10...
public Tokenizer create(Reader reader) { UAX29URLEmailTokenizer tokenizer = new UAX29URLEmailTokenizer(reader); tokenizer.setMaxTokenLength(maxTokenLength); return tokenizer; }
public Tokenizer create(Reader reader) { UAX29URLEmailTokenizer tokenizer = new UAX29URLEmailTokenizer(version, reader); tokenizer.setMaxTokenLength(maxTokenLength); return tokenizer; }
@Override protected void moveToSecondPhase() throws Exception { // no need to sort, since we know we have no hits back final InternalSearchResponse internalResponse = searchPhaseController.merge(EMPTY_DOCS, queryFetchResults, ImmutableMap.<SearchShardTarget, FetchSearchResultProvider>of(...
@Override protected void moveToSecondPhase() throws Exception { // no need to sort, since we know we have no hits back final InternalSearchResponse internalResponse = searchPhaseController.merge(EMPTY_DOCS, queryFetchResults, ImmutableMap.<SearchShardTarget, FetchSearchResultProvider>of(...
private void innerFinishHim() throws Exception { sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values()); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults); String scrollId =...
private void innerFinishHim() throws Exception { sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values()); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults); String scrollId =...
private void innerFinishHim() throws Exception { final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults); String scrollId = null; if (request.scroll() != null) { scrollId = TransportSearchHelper....
private void innerFinishHim() throws Exception { final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults); String scrollId = null; if (request.scroll() != null) { scrollId = TransportSearchHelper....
@Override protected void moveToSecondPhase() throws Exception { sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values()); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults); St...
@Override protected void moveToSecondPhase() throws Exception { sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values()); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults); St...
private void innerFinishHim() throws Exception { InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults); String scrollId = null; if (request.scroll() != null) { scrollId = TransportSearchHelper.buildS...
private void innerFinishHim() throws Exception { InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults); String scrollId = null; if (request.scroll() != null) { scrollId = TransportSearchHelper.buildS...
@Override protected void moveToSecondPhase() throws Exception { long totalHits = 0; final InternalSearchResponse internalResponse = searchPhaseController.merge(EMPTY_DOCS, queryResults, ImmutableMap.<SearchShardTarget, FetchSearchResultProvider>of()); String scrollId = null; ...
@Override protected void moveToSecondPhase() throws Exception { long totalHits = 0; final InternalSearchResponse internalResponse = searchPhaseController.merge(EMPTY_DOCS, queryResults, ImmutableMap.<SearchShardTarget, FetchSearchResultProvider>of()); String scrollId = null; ...
public void setBackground (Drawable background, boolean adjustPadding) { if (this.background == background) return; this.background = background; if (adjustPadding) { if (background == null) pad(null); else pad(background.getTopHeight(), background.getLeftWidth(), background.getBottomHeight(), back...
public void setBackground (Drawable background, boolean adjustPadding) { if (this.background == background) return; this.background = background; if (adjustPadding) { if (background == null) pad(Value.zero); else pad(background.getTopHeight(), background.getLeftWidth(), background.getBottomHeight()...
protected void configure() { Class<? extends Module> defaultDiscoveryModule = null; if (settings.getAsBoolean("node.local", false)) { defaultDiscoveryModule = LocalDiscoveryModule.class; } else { try { Classes.getDefaultClassLoader().loadClass("org.ela...
protected void configure() { Class<? extends Module> defaultDiscoveryModule; if (settings.getAsBoolean("node.local", false)) { defaultDiscoveryModule = LocalDiscoveryModule.class; } else { try { Classes.getDefaultClassLoader().loadClass("org.elasticsea...
@Override public void sendResponse(Streamable message, TransportResponseOptions options) throws IOException { if (transport.compress) { options.withCompress(); } byte[] data = TransportStreams.buildResponse(requestId, message, options); ChannelBuffer buffer = ChannelBuffe...
@Override public void sendResponse(Streamable message, TransportResponseOptions options) throws IOException { if (transport.compress) { options.withCompress(true); } byte[] data = TransportStreams.buildResponse(requestId, message, options); ChannelBuffer buffer = ChannelB...
public void testVectorHighlighter() throws Exception { Directory dir = new RAMDirectory(); IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER)); indexWriter.addDocument(doc().add(field("_id", "1")).add(field("content", "the big bad ...
public void testVectorHighlighter() throws Exception { Directory dir = new RAMDirectory(); IndexWriter indexWriter = new IndexWriter(dir, new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER)); indexWriter.addDocument(doc().add(field("_id", "1")).add(field("content", "the big bad ...
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.ActionTest(), "Debug Test", 480, 320, false); }
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.PickingTest(), "Debug Test", 480, 320, false); }
public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); Activity activity = getActivity(); adapter = new HeaderFooterListAdapter<CommentListAdapter>(list, new CommentListAdapter(activity.getLayoutInflater(), avatars, ...
public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); Activity activity = getActivity(); adapter = new HeaderFooterListAdapter<CommentListAdapter>(list, new CommentListAdapter(activity.getLayoutInflater(), avatars, ...
private Status getStatus(RestResponse.Status status) { switch (status) { case CONTINUE: return Status.CONTINUE; case SWITCHING_PROTOCOLS: return Status.SWITCHING_PROTOCOLS; case OK: return Status.OK; case CREATED...
private Status getStatus(RestResponse.Status status) { switch (status) { case CONTINUE: return Status.CONT; case SWITCHING_PROTOCOLS: return Status.SWITCHING_PROTOCOLS; case OK: return Status.OK; case CREATED: ...
@Override public String executor() { return ThreadPool.Names.SAME; } }
@Override public String executor() { return ThreadPool.Names.CACHED; } }
public void render () { begin(); if (cached) { spriteCache.draw(0); } else { for (MapLayer layer : map.getLayers()) { if (layer.getVisible()) { if (layer instanceof TiledMapTileLayer) { renderTileLayer((TiledMapTileLayer) layer); } else { for (MapObject object : layer.getObjects()...
public void render () { begin(); if (cached) { spriteCache.draw(0); } else { for (MapLayer layer : map.getLayers()) { if (layer.isVisible()) { if (layer instanceof TiledMapTileLayer) { renderTileLayer((TiledMapTileLayer) layer); } else { for (MapObject object : layer.getObjects())...
@Override public void toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); builder.field("_index", shard.index()); // builder.field("_shard", shard.shardId()); // builder.field("_node", shard.nodeId()); builder.field("_type", type()); ...
@Override public void toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); builder.field("_index", shard.index()); // builder.field("_shard", shard.shardId()); // builder.field("_node", shard.nodeId()); builder.field("_type", type()); ...
public void testBasics() throws Exception { client().admin().indices().prepareCreate("test").execute().actionGet(); ensureGreen(); logger.info("--> register a queries"); client().prepareIndex("test", PercolatorService.TYPE_NAME, "1") .setSource(jsonBuilder().startObj...
public void testBasics() throws Exception { assertAcked(prepareCreate("test").addMapping("type", "field1", "type=string")); ensureGreen(); logger.info("--> register a queries"); client().prepareIndex("test", PercolatorService.TYPE_NAME, "1") .setSource(jsonBuilder()....
public void parse(ParseContext context) throws IOException { if (!enabled) { context.parser().skipChildren(); return; } XContentParser parser = context.parser(); Document restoreDoc = null; if (nested.isNested()) { Document nestedDoc = new...
public void parse(ParseContext context) throws IOException { if (!enabled) { context.parser().skipChildren(); return; } XContentParser parser = context.parser(); Document restoreDoc = null; if (nested.isNested()) { Document nestedDoc = new...
private FieldSelector buildFieldSelectors(SearchContext context) { if (context.hasScriptFields() && !context.hasFieldNames()) { // we ask for script fields, and no field names, don't load the source return UidFieldSelector.INSTANCE; } if (!context.hasFieldNames()) { ...
private FieldSelector buildFieldSelectors(SearchContext context) { if (context.hasScriptFields() && !context.hasFieldNames()) { // we ask for script fields, and no field names, don't load the source return UidFieldSelector.INSTANCE; } if (!context.hasFieldNames()) { ...
public void create() { cam = new OrthographicCamera(); cam.setViewport(480, 320); cam.getPosition().set(WIDTH*32/2, HEIGHT/2,0); texture = Gdx.graphics.newTexture(Gdx.files.internal("data/tiles.png"), TextureFilter.Nearest, TextureFilter.Nearest, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge); for(in...
public void create() { cam = new OrthographicCamera(); cam.setViewport(480, 320); cam.getPosition().set(WIDTH*32/2, HEIGHT*32/2,0); texture = Gdx.graphics.newTexture(Gdx.files.internal("data/tiles.png"), TextureFilter.Nearest, TextureFilter.Nearest, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge); for(i...
public String toString() { return getClass().getSimpleName() + "[" + org.getLogin() + "]"; }
public String toString() { return getClass().getSimpleName() + '[' + org.getLogin() + ']'; }
public void testValidateThatHasChildAndHasParentFilterAreNeverCached() throws Exception { assertAcked(prepareCreate("test") .setSettings(builder().put(indexSettings()) //we need 0 replicas here to make sure we always hit the very same shards .p...
public void testValidateThatHasChildAndHasParentFilterAreNeverCached() throws Exception { assertAcked(prepareCreate("test") .setSettings(builder().put(indexSettings()) //we need 0 replicas here to make sure we always hit the very same shards .p...
public IOSGraphics (RectangleF bounds, IOSApplication app, IOSInput input, GL20 gl20) { super(bounds); // setup view and OpenGL width = (int)bounds.get_Width(); height = (int)bounds.get_Height(); app.debug(tag, bounds.get_Width() + "x" + bounds.get_Height() + ", " + UIScreen.get_MainScreen().get_Scale()); ...
public IOSGraphics (RectangleF bounds, IOSApplication app, IOSInput input, GL20 gl20) { super(bounds); // setup view and OpenGL width = (int)bounds.get_Width(); height = (int)bounds.get_Height(); app.debug(tag, bounds.get_Width() + "x" + bounds.get_Height() + ", " + UIScreen.get_MainScreen().get_Scale()); ...
public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == COMMIT_VIEW) { getListAdapter().getWrappedAdapter().notifyDataSetChanged(); return; } super.onActivityResult(requestCode, resultCode, data); }
public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == COMMIT_VIEW) { notifyDataSetChanged(); return; } super.onActivityResult(requestCode, resultCode, data); }
public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == GIST_VIEW || requestCode == GIST_CREATE) { getListAdapter().getWrappedAdapter().notifyDataSetChanged(); forceRefresh(); return; } super.onActivityResult(reques...
public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == GIST_VIEW || requestCode == GIST_CREATE) { notifyDataSetChanged(); forceRefresh(); return; } super.onActivityResult(requestCode, resultCode, data); }
public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == ISSUE_VIEW) { getListAdapter().getWrappedAdapter().notifyDataSetChanged(); forceRefresh(); return; } super.onActivityResult(requestCode, resultCode, data); ...
public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == ISSUE_VIEW) { notifyDataSetChanged(); forceRefresh(); return; } super.onActivityResult(requestCode, resultCode, data); }
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...
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...