buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected static long getCPtr(SWIGTYPE_p_btSoftBody__LJoint__Specs obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSoftBody__LJoint__Specs obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSoftBody__Pose obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSoftBody__Pose obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSoftBody__SolverState obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSoftBody__SolverState obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSoftBody__eFeature___ obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSoftBody__eFeature___ obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSoftBody__ePSolver___ obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSoftBody__ePSolver___ obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSoftBody__eSolverPresets___ obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSoftBody__eSolverPresets___ obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSoftBody__eVSolver___ obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSoftBody__eVSolver___ obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSoftBody__sRayCast obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSoftBody__sRayCast obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSparseSdfT_3_t__Cell obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSparseSdfT_3_t__Cell obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btSparseSdfT_3_t__IntFrac obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btSparseSdfT_3_t__IntFrac obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btVehicleRaycaster__btVehicleRaycasterResult obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btVehicleRaycaster__btVehicleRaycasterResult obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_btWheelInfo__RaycastInfo obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_btWheelInfo__RaycastInfo obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_f_p_btDynamicsWorld_float__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_f_p_btDynamicsWorld_float__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_f_p_btSoftBody_float__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_f_p_btSoftBody_float__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_f_p_btSoftBody_float_float__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_f_p_btSoftBody_float_float__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_f_p_void__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_f_p_void__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObjectWrapper_int_int_p_q_const__btCollisionObjectWrapper_int_int__bool obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_f_size_t__p_void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_f_size_t__p_void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_f_size_t_int__p_void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_f_size_t_int__p_void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_float obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_float obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_int obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_int obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_Node obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_Node obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_SoftBodyMaterialData obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_SoftBodyMaterialData obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_btCollisionObject obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_btCollisionObject obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_btDbvtProxy obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_btDbvtProxy obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_btPersistentManifold obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_btPersistentManifold obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_btSoftBody obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_btSoftBody obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_btTypedConstraint obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_btTypedConstraint obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_btVector3 obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_btVector3 obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_p_unsigned_char obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_p_unsigned_char obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
protected static long getCPtr(SWIGTYPE_p_void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public static long getCPtr(SWIGTYPE_p_void obj) { return (obj == null) ? 0 : obj.swigCPtr; } }
public void setIndices (short[] indices, int offset, int count) { isDirty = true; buffer.clear(); buffer.put(indices, offset, count); buffer.flip(); byteBuffer.position(0); byteBuffer.limit(count << 1); if (isBound) { if (Gdx.gl11 != null) { GL11 gl = Gdx.gl11; // gl.glBufferData(GL11.GL_ELEMENT_...
public void setIndices (short[] indices, int offset, int count) { isDirty = true; buffer.clear(); buffer.put(indices, offset, count); buffer.flip(); byteBuffer.position(0); byteBuffer.limit(count << 1); if (isBound) { if (Gdx.gl11 != null) { GL11 gl = Gdx.gl11; // gl.glBufferData(GL11.GL_ELEMENT_...
private int next (int idx) { return idx + 1 & queue.length() - 1; }
private int next (int idx) { return (idx + 1) % queue.length(); }
public void dispose () { for (int i = 0; i < constraints.size; i++) { ((btDynamicsWorld)world.collisionWorld).removeConstraint(constraints.get(i)); constraints.get(i).dispose(); } constraints.clear(); super.dispose(); }
public void dispose () { for (int i = 0; i < constraints.size; i++) { ((btDynamicsWorld)world.collisionWorld).removeConstraint(constraints.get(i)); constraints.get(i).delete(); } constraints.clear(); super.dispose(); }
public void dispose () { super.dispose(); importer.deleteAllData(); importer.dispose(); importer = null;
public void dispose () { super.dispose(); importer.deleteAllData(); importer.delete(); importer = null;
public void dispose () { super.dispose(); if (internalTickCallback != null) internalTickCallback.dispose(); internalTickCallback = null;
public void dispose () { super.dispose(); if (internalTickCallback != null) internalTickCallback.delete(); internalTickCallback = null;
public void create () { super.create(); final Model sphereModel = modelBuilder.createSphere(0.5f, 0.5f, 0.5f, 8, 8, new Material(ColorAttribute.createDiffuse(Color.WHITE), ColorAttribute.createSpecular(Color.WHITE)), Usage.Position | Usage.Normal); disposables.add(sphereModel); final BulletConstruc...
public void create () { super.create(); final Model sphereModel = modelBuilder.createSphere(0.5f, 0.5f, 0.5f, 8, 8, new Material(ColorAttribute.createDiffuse(Color.WHITE), ColorAttribute.createSpecular(Color.WHITE)), Usage.Position | Usage.Normal); disposables.add(sphereModel); final BulletConstruc...
@Override public FacetCollector parser(String facetName, XContentParser parser, SearchContext context) throws IOException { String fieldName = null; String valueFieldName = null; String valueScript = null; Map<String, Object> params = null; double lat = Double.NaN; do...
@Override public FacetCollector parser(String facetName, XContentParser parser, SearchContext context) throws IOException { String fieldName = null; String valueFieldName = null; String valueScript = null; Map<String, Object> params = null; double lat = Double.NaN; do...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
public enum ComponentType { button, axis, slider, pov, accelerometer }
public enum ControlType { button, axis, slider, pov, accelerometer }
private Actor fireEnterAndExit (Actor overLast, int screenX, int screenY, int pointer) { // Find the actor under the point. screenToStageCoordinates(stageCoords.set(screenX, screenY)); Actor over = hit(stageCoords.x, stageCoords.y, false); if (over == overLast) return overLast; InputEvent event = Pools.obta...
private Actor fireEnterAndExit (Actor overLast, int screenX, int screenY, int pointer) { // Find the actor under the point. screenToStageCoordinates(stageCoords.set(screenX, screenY)); Actor over = hit(stageCoords.x, stageCoords.y, true); if (over == overLast) return overLast; InputEvent event = Pools.obtai...
public TextButton (String text, TextButtonStyle style, String name) { super(style, name); this.style = style; label = new Label(text, new LabelStyle(style.font, style.fontColor)); label.setAlignment(Align.CENTER); add(label); }
public TextButton (String text, TextButtonStyle style, String name) { super(style, name); this.style = style; label = new Label(text, new LabelStyle(style.font, style.fontColor)); label.setAlignment(Align.CENTER); add(label).expand().fill(); }
public void testDefaultMappingAndNoMapping() throws Exception { String defaultMapping = XContentFactory.jsonBuilder().startObject().startObject(MapperService.DEFAULT_MAPPING) .startObject("_source").field("enabled", false).endObject() .endObject().endObject().string(); ...
public void testDefaultMappingAndNoMapping() throws Exception { String defaultMapping = XContentFactory.jsonBuilder().startObject().startObject(MapperService.DEFAULT_MAPPING) .startObject("_source").field("enabled", false).endObject() .endObject().endObject().string(); ...
public enum ApplicationType { Android, Desktop, Applet }
public enum ApplicationType { Android, Desktop, Applet, WebGL }
public enum GraphicsType { AndroidGL, JoglGL, LWJGL, Angle }
public enum GraphicsType { AndroidGL, JoglGL, LWJGL, Angle, WebGL }
private static FileHandle getRelativeFileHandle(FileHandle path, String relativePath) { if (relativePath.trim().length() == 0) { return path; } FileHandle child = path; StringTokenizer tokenizer = new StringTokenizer(relativePath, "\\/"); while (tokenizer.hasMor...
private static FileHandle getRelativeFileHandle(FileHandle path, String relativePath) { if (relativePath.trim().length() == 0) { return path; } FileHandle child = path; StringTokenizer tokenizer = new StringTokenizer(relativePath, "\\/"); while (tokenizer.hasMor...
protected void update(final DashboardIssueView view, final Issue issue) { view.number.setText("#" + issue.getNumber()); if (issue.getClosedAt() != null) view.number.setPaintFlags(view.numberPaintFlags | STRIKE_THRU_TEXT_FLAG); else view.number.setPaintFlags(view.numbe...
protected void update(final DashboardIssueView view, final Issue issue) { view.number.setText(Integer.toString(issue.getNumber())); if (issue.getClosedAt() != null) view.number.setPaintFlags(view.numberPaintFlags | STRIKE_THRU_TEXT_FLAG); else view.number.setPaintFlag...
public void create () { super.create(); showAxes = true; onModelClicked("g3d/teapot.g3db"); }
public void create () { super.create(); showAxes = true; onModelClicked("g3d/knight.g3dj"); }
public void setChecked (String text) { if (text == null) throw new IllegalArgumentException("text cannot be null."); for (int i = 0, n = buttons.size; i < n; i++) { Button button = buttons.get(i); if (button instanceof TextButton && text.contentEquals(((TextButton)button).getText())) { button.setChecked(...
public void setChecked (String text) { if (text == null) throw new IllegalArgumentException("text cannot be null."); for (int i = 0, n = buttons.size; i < n; i++) { Button button = buttons.get(i); if (button instanceof TextButton && text.equals(((TextButton)button).getText())) { button.setChecked(true); ...
package org.elasticsearch.common; /* * 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, Ve...
package org.elasticsearch.common; /* * 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, Ve...
import org.elasticsearch.common.Nullable; /* * 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 Lic...
import org.elasticsearch.common.Nullable; /* * 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 Lic...
private void mainLoop () { try { graphics.setupDisplay(); } catch (LWJGLException e) { throw new GdxRuntimeException(e); } Keyboard.enableRepeatEvents(true); listener.create(); listener.resize(graphics.getWidth(), graphics.getHeight()); int lastWidth = graphics.getWidth(); int lastHeight = grap...
private void mainLoop () { try { graphics.setupDisplay(); } catch (LWJGLException e) { throw new GdxRuntimeException(e); } Keyboard.enableRepeatEvents(true); listener.create(); listener.resize(graphics.getWidth(), graphics.getHeight()); int lastWidth = graphics.getWidth(); int lastHeight = grap...
public void dispose () { // Don't rely on the GC if (motionState != null) motionState.dispose(); if (body != null) body.dispose(); // And remove the reference motionState = null; body = null; }
public void dispose () { // Don't rely on the GC if (motionState != null) motionState.dispose(); if (body != null) body.delete(); // And remove the reference motionState = null; body = null; }
protected PrimaryResponse<IndexResponse, IndexRequest> shardOperationOnPrimary(ClusterState clusterState, PrimaryOperationRequest shardRequest) { final IndexRequest request = shardRequest.request; // validate, if routing is required, that we got routing MappingMetaData mappingMd = clusterSt...
protected PrimaryResponse<IndexResponse, IndexRequest> shardOperationOnPrimary(ClusterState clusterState, PrimaryOperationRequest shardRequest) { final IndexRequest request = shardRequest.request; // validate, if routing is required, that we got routing MappingMetaData mappingMd = clusterSt...
public int getNumOrds() { return numDocs + 1; }
public int getNumOrds() { return numDocs; }
public int getNumOrds() { return 1; }
public int getNumOrds() { return 0; }
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class, ...
protected final LockFactory buildLockFactory() throws IOException { String fsLock = componentSettings.get("lock", componentSettings.get("fs_lock", "native")); LockFactory lockFactory = NoLockFactory.getNoLockFactory(); if (fsLock.equals("native")) { // TODO LUCENE MONITOR: this i...
protected final LockFactory buildLockFactory() throws IOException { String fsLock = componentSettings.get("lock", componentSettings.get("fs_lock", "native")); LockFactory lockFactory = NoLockFactory.getNoLockFactory(); if (fsLock.equals("native")) { // TODO LUCENE MONITOR: this i...
public FileHandle internal (String path) { return new IOSFileHandle(new File(internalPath, path), FileType.Internal); }
public FileHandle internal (String path) { return new IOSFileHandle(path, FileType.Internal); }
public static String VERSION = "0.9.3"; }
public static String VERSION = "0.9.4"; }
public void testIndexOptions() throws Exception { client().admin().indices().prepareCreate("test") .addMapping("type1", "field1", "type=string,index_options=docs") .setSettings("index.number_of_shards", 1).get(); client().prepareIndex("test", "type1", "1").setSource(...
public void testIndexOptions() throws Exception { client().admin().indices().prepareCreate("test") .addMapping("type1", "field1", "type=string,index_options=docs") .setSettings("index.number_of_shards", 1).get(); client().prepareIndex("test", "type1", "1").setSource(...
protected ShardCountResponse shardOperation(ShardCountRequest request) throws ElasticSearchException { IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId()); long count = indexShard.count(request.minScore(), request.querySource(), request.querySourceOf...
protected ShardCountResponse shardOperation(ShardCountRequest request) throws ElasticSearchException { IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId()); long count = indexShard.count(request.minScore(), request.querySource(), reque...
protected PercolateResponse shardOperation(PercolateRequest request, int shardId) throws ElasticSearchException { IndexService indexService = indicesService.indexServiceSafe(request.index()); PercolatorService percolatorService = indexService.percolateService(); PercolatorExecutor.Response ...
protected PercolateResponse shardOperation(PercolateRequest request, int shardId) throws ElasticSearchException { IndexService indexService = indicesService.indexServiceSafe(request.index()); PercolatorService percolatorService = indexService.percolateService(); PercolatorExecutor.Response ...
public MappingMetaData(String type, Map<String, Object> mapping) throws IOException { this.type = type; XContentBuilder mappingBuilder = XContentFactory.jsonBuilder().map(mapping); this.source = new CompressedString(mappingBuilder.underlyingBytes(), 0, mappingBuilder.underlyingBytesLength())...
public MappingMetaData(String type, Map<String, Object> mapping) throws IOException { this.type = type; XContentBuilder mappingBuilder = XContentFactory.jsonBuilder().map(mapping); this.source = new CompressedString(mappingBuilder.bytes()); Map<String, Object> withoutType = mapping;
public static byte[] copyToByteArray(InputStream in) throws IOException { CachedStreamOutput.Entry cachedEntry = CachedStreamOutput.popEntry(); try { BytesStreamOutput out = cachedEntry.bytes(); copy(in, out); return out.copiedByteArray(); } finally { ...
public static byte[] copyToByteArray(InputStream in) throws IOException { CachedStreamOutput.Entry cachedEntry = CachedStreamOutput.popEntry(); try { BytesStreamOutput out = cachedEntry.bytes(); copy(in, out); return out.bytes().copyBytesArray().toBytes(); ...
public static void pushEntry(Entry entry) { entry.reset(); if (entry.bytes().underlyingBytes().length > BYTES_LIMIT) { return; } Queue<Entry> ref = cache.get(); if (ref == null) { ref = new LinkedTransferQueue<Entry>(); counter.set(0); ...
public static void pushEntry(Entry entry) { entry.reset(); if (entry.bytes().bytes().length() > BYTES_LIMIT) { return; } Queue<Entry> ref = cache.get(); if (ref == null) { ref = new LinkedTransferQueue<Entry>(); counter.set(0); ...
public static byte[] toXContent(CommitPoint commitPoint) throws Exception { XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON).prettyPrint(); builder.startObject(); builder.field("version", commitPoint.version()); builder.field("name", commitPoint.name()); ...
public static byte[] toXContent(CommitPoint commitPoint) throws Exception { XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON).prettyPrint(); builder.startObject(); builder.field("version", commitPoint.version()); builder.field("name", commitPoint.name()); ...
protected Fieldable parseCreateField(ParseContext context) throws IOException { if (!enabled) { return null; } return new CustomIntegerNumericField(this, context.sourceLength()); }
protected Fieldable parseCreateField(ParseContext context) throws IOException { if (!enabled) { return null; } return new CustomIntegerNumericField(this, context.source().length()); }
public static void main(String[] args) throws Exception { final long MAX_SIZE = ByteSizeValue.parseBytesSizeValue("50mb").bytes(); final boolean WITH_TV = true; File testFile = new File("target/test/compress/lucene"); FileSystemUtils.deleteRecursively(testFile); testFile.mkd...
public static void main(String[] args) throws Exception { final long MAX_SIZE = ByteSizeValue.parseBytesSizeValue("50mb").bytes(); final boolean WITH_TV = true; File testFile = new File("target/test/compress/lucene"); FileSystemUtils.deleteRecursively(testFile); testFile.mkd...
public void testBinaryFacet() throws Exception { try { client.admin().indices().prepareDelete("test").execute().actionGet(); } catch (Exception e) { // ignore } client.admin().indices().prepareCreate("test").execute().actionGet(); client.admin().cluste...
public void testBinaryFacet() throws Exception { try { client.admin().indices().prepareDelete("test").execute().actionGet(); } catch (Exception e) { // ignore } client.admin().indices().prepareCreate("test").execute().actionGet(); client.admin().cluste...
public void testRoutingTableSerialization() throws Exception { MetaData metaData = newMetaDataBuilder() .put(newIndexMetaDataBuilder("test").numberOfShards(10).numberOfReplicas(1)) .build(); RoutingTable routingTable = routingTable() .add(indexRouting...
public void testRoutingTableSerialization() throws Exception { MetaData metaData = newMetaDataBuilder() .put(newIndexMetaDataBuilder("test").numberOfShards(10).numberOfReplicas(1)) .build(); RoutingTable routingTable = routingTable() .add(indexRouting...
public void testSimpleStreams() throws Exception { BytesStreamOutput out = CachedStreamOutput.popEntry().bytes(); out.writeBoolean(false); out.writeByte((byte) 1); out.writeShort((short) -1); out.writeInt(-1); out.writeVInt(2); out.writeLong(-3); out.w...
public void testSimpleStreams() throws Exception { BytesStreamOutput out = CachedStreamOutput.popEntry().bytes(); out.writeBoolean(false); out.writeByte((byte) 1); out.writeShort((short) -1); out.writeInt(-1); out.writeVInt(2); out.writeLong(-3); out.w...
public void testSharedUTFHandles() throws Exception { BytesStreamOutput bytesOut = new BytesStreamOutput(); HandlesStreamOutput out = new HandlesStreamOutput(bytesOut, 5); String lowerThresholdValue = "test"; String higherThresholdValue = "something that is higher than 5"; ou...
public void testSharedUTFHandles() throws Exception { BytesStreamOutput bytesOut = new BytesStreamOutput(); HandlesStreamOutput out = new HandlesStreamOutput(bytesOut, 5); String lowerThresholdValue = "test"; String higherThresholdValue = "something that is higher than 5"; ou...
public void testWritingBinaryToStream() throws Exception { FastByteArrayOutputStream bos = new FastByteArrayOutputStream(); XContentGenerator gen = XContentFactory.xContent(XContentType.JSON).createGenerator(bos); gen.writeStartObject(); gen.writeStringField("name", "something"); ...
public void testWritingBinaryToStream() throws Exception { FastByteArrayOutputStream bos = new FastByteArrayOutputStream(); XContentGenerator gen = XContentFactory.xContent(XContentType.JSON).createGenerator(bos); gen.writeStartObject(); gen.writeStringField("name", "something"); ...
public void compareParsingTokens() throws IOException { FastByteArrayOutputStream xsonOs = new FastByteArrayOutputStream(); XContentGenerator xsonGen = XContentFactory.xContent(XContentType.SMILE).createGenerator(xsonOs); FastByteArrayOutputStream jsonOs = new FastByteArrayOutputStream(); ...
public void compareParsingTokens() throws IOException { FastByteArrayOutputStream xsonOs = new FastByteArrayOutputStream(); XContentGenerator xsonGen = XContentFactory.xContent(XContentType.SMILE).createGenerator(xsonOs); FastByteArrayOutputStream jsonOs = new FastByteArrayOutputStream(); ...
public void testLocationExtraction() throws IOException { // { // "index" : "test", // "source" : { // value : "something" // } // } FastByteArrayOutputStream os = new FastByteArrayOutputStream(); JsonGenerator gen = new JsonFactory()....
public void testLocationExtraction() throws IOException { // { // "index" : "test", // "source" : { // value : "something" // } // } FastByteArrayOutputStream os = new FastByteArrayOutputStream(); JsonGenerator gen = new JsonFactory()....
public NodeService nodeService() { return null; } }); zenPingA.start(); MulticastSocket multicastSocket = null; try { Loggers.getLogger(MulticastZenPing.class).setLevel("TRACE"); multicastSocket = new MulticastSocket(54328)...
public NodeService nodeService() { return null; } }); zenPingA.start(); MulticastSocket multicastSocket = null; try { Loggers.getLogger(MulticastZenPing.class).setLevel("TRACE"); multicastSocket = new MulticastSocket(54328)...
public boolean touchDown (float x, float y, int pointer) { if (pointer != 0) return false; super.touchDown(x, y, pointer); touchFocusedChild = stage != null ? stage.getTouchFocus(0) : null; gestureDetector.touchDown((int)x, (int)y, pointer, 0); if (stage != null) stage.setTouchFocus(this, 0); // Always take ...
public boolean touchDown (float x, float y, int pointer) { if (pointer != 0) return false; super.touchDown(x, y, pointer); touchFocusedChild = stage.getTouchFocus(0) != this ? stage.getTouchFocus(0) : null; gestureDetector.touchDown((int)x, (int)y, pointer, 0); if (stage != null) stage.setTouchFocus(this, 0)...
public void draw (SpriteBatch batch, float parentAlpha) { validate(); cache.setPosition(x, y); cache.draw(batch, parentAlpha); }
public void draw (SpriteBatch batch, float parentAlpha) { validate(); cache.setPosition(x, y); cache.draw(batch, color.a * parentAlpha); }
@Override public Facet facet() { return new InternalStatisticalFacet(facetName, statsProc.min(), statsProc.max(), statsProc.total(), statsProc.sumOfSquares(), statsProc.count()); }
@Override public Facet facet() { return new InternalStatisticalFacet(facetName, fieldName, statsProc.min(), statsProc.max(), statsProc.total(), statsProc.sumOfSquares(), statsProc.count()); }
@Inject public MapperService(Index index, @IndexSettings Settings indexSettings, Environment environment, AnalysisService analysisService) { super(index, indexSettings); this.documentParser = new XContentDocumentMapperParser(analysisService); this.searchAnalyzer = new SmartIndexNameSearchAna...
@Inject public MapperService(Index index, @IndexSettings Settings indexSettings, Environment environment, AnalysisService analysisService) { super(index, indexSettings); this.documentParser = new XContentDocumentMapperParser(index, indexSettings, analysisService); this.searchAnalyzer = new S...
public static XContentDocumentMapperParser newParser() { return new XContentDocumentMapperParser(new AnalysisService(new Index("test"))); }
public static XContentDocumentMapperParser newParser() { return new XContentDocumentMapperParser(new Index("test"), new AnalysisService(new Index("test"))); }
@Test public void testBuildThenParse() throws Exception { XContentDocumentMapper builderDocMapper = doc(object("person").add( multiField("name") .add(stringField("name").store(Field.Store.YES)) .add(stringField("indexed").index(Field.Index.ANAL...
@Test public void testBuildThenParse() throws Exception { XContentDocumentMapper builderDocMapper = doc("test", object("person").add( multiField("name") .add(stringField("name").store(Field.Store.YES)) .add(stringField("indexed").index(Field.In...
public void actionPerformed (ActionEvent e) { final ParticleEmitter emitter = editor.getEmitter(); emitter.setImagePath("particle.png"); emitter.setSprite(null); editor.setIcon(emitter, null); updateIconInfo(null); } }); } { widthLabel = new JLabel(); contentPanel.add(widt...
public void actionPerformed (ActionEvent e) { final ParticleEmitter emitter = editor.getEmitter(); emitter.setImagePath(ParticleEditor.DEFAULT_PARTICLE); emitter.setSprite(null); editor.setIcon(emitter, null); updateIconInfo(null); } }); } { widthLabel = new JLabel(); cont...
import org.elasticsearch.util.guice.inject.Module; /* * 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 A...
import org.elasticsearch.util.guice.inject.Module; /* * 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 A...
import org.elasticsearch.util.guice.inject.BindingAnnotation; /* * 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 ...
import org.elasticsearch.util.guice.inject.BindingAnnotation; /* * 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 ...
import org.elasticsearch.util.guice.inject.Provider; /* * 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...
import org.elasticsearch.util.guice.inject.Provider; /* * 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...
import org.elasticsearch.util.guice.inject.BindingAnnotation; /* * 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 ...
import org.elasticsearch.util.guice.inject.BindingAnnotation; /* * 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 ...
import org.elasticsearch.util.guice.inject.Injector; /* * 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...
import org.elasticsearch.util.guice.inject.Injector; /* * 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...
import org.elasticsearch.util.guice.inject.BindingAnnotation; /* * 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 ...
import org.elasticsearch.util.guice.inject.BindingAnnotation; /* * 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 ...
import org.elasticsearch.util.guice.inject.Provider; /* * 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...
import org.elasticsearch.util.guice.inject.Provider; /* * 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...
import org.elasticsearch.util.guice.inject.Module; /* * 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 A...
import org.elasticsearch.util.guice.inject.Module; /* * 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 A...
public String getBufferCType() { if(!this.isBuffer()) throw new RuntimeException("ArgumentType " + this + " is not a Buffer!"); if(this == Buffer) return "char*"; if(this == ByteBuffer) return "char*"; if(this == CharBuffer) return "unsigned short*"; if(this == ShortBuffer) return "short*"; if(this ...
public String getBufferCType() { if(!this.isBuffer()) throw new RuntimeException("ArgumentType " + this + " is not a Buffer!"); if(this == Buffer) return "unsigned char*"; if(this == ByteBuffer) return "char*"; if(this == CharBuffer) return "unsigned short*"; if(this == ShortBuffer) return "short*"; ...
String[] names(); /* * 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.0 (the ...
String[] names(); /* * 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.0 (the ...
String[] names(); /* * 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.0 (the ...
String[] names(); /* * 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.0 (the ...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); String currentFieldName = null; String queryBody = null; String queryName = null; String field = null; Map<String, Float> fie...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); String currentFieldName = null; String queryBody = null; String queryName = null; String field = null; Map<String, Float> fie...
public static TemplateContext parse(XContentParser parser, String paramsFieldname, Map<String,ScriptService.ScriptType> parameterMap) throws IOException { Map<String, Object> params = null; String templateNameOrTemplateContent = null; String currentFieldName = null; XContentParser.T...
public static TemplateContext parse(XContentParser parser, String paramsFieldname, Map<String,ScriptService.ScriptType> parameterMap) throws IOException { Map<String, Object> params = null; String templateNameOrTemplateContent = null; String currentFieldName = null; XContentParser.T...
public SuggestionSearchContext.SuggestionContext parse(XContentParser parser, MapperService mapperService) throws IOException { PhraseSuggestionContext suggestion = new PhraseSuggestionContext(suggester); XContentParser.Token token; String fieldName = null; boolean gramSizeSet = fals...
public SuggestionSearchContext.SuggestionContext parse(XContentParser parser, MapperService mapperService) throws IOException { PhraseSuggestionContext suggestion = new PhraseSuggestionContext(suggester); XContentParser.Token token; String fieldName = null; boolean gramSizeSet = fals...