buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public Cell add (String text, String labelStyleName) { if (skin == null) throw new IllegalStateException("Table must have a skin set to use this method."); return add(new Label(text, skin.getStyle(labelStyleName, LabelStyle.class))); }
public Cell add (String text, String labelStyleName) { if (skin == null) throw new IllegalStateException("Table must have a skin set to use this method."); return add(new Label(text, skin.get(labelStyleName, LabelStyle.class))); }
public TextButton (String text, Skin skin) { this(text, skin.getStyle("default", TextButtonStyle.class)); }
public TextButton (String text, Skin skin) { this(text, skin.get(TextButtonStyle.class)); }
public void create () { skin = new Skin(Gdx.files.internal("data/uiskin.json"), Gdx.files.internal("data/uiskin.png")); image2 = new TextureRegion(new Texture(Gdx.files.internal("data/badlogic.jpg"))); ui = new Stage(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false); Gdx.input.setInputProcessor(ui); ...
public void create () { skin = new Skin(Gdx.files.internal("data/uiskin.json")); image2 = new TextureRegion(new Texture(Gdx.files.internal("data/badlogic.jpg"))); ui = new Stage(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), false); Gdx.input.setInputProcessor(ui); root = new Table(); ui.addActor(root...
public boolean touchDown (int x, int y, int pointer, int button) { Vector2 current = getCurrentPosition(); position.set(current); targetPosition.set(x - 10, Gdx.graphics.getHeight() - y - 10); timer = 0; return true; } })); root = new Table(); stage.addActor(root); root.pad(10).top()....
public boolean touchDown (int x, int y, int pointer, int button) { Vector2 current = getCurrentPosition(); position.set(current); targetPosition.set(x - 10, Gdx.graphics.getHeight() - y - 10); timer = 0; return true; } })); root = new Table(); stage.addActor(root); root.pad(10).top()....
public void create () { stage = new Stage(0, 0, false); Gdx.input.setInputProcessor(stage); skin = new Skin(Gdx.files.internal("data/uiskin.json"), Gdx.files.internal("data/uiskin.png")); Table mytable = new Table(); mytable.debug(); mytable.add(new Image(new Texture("data/group-debug.png"))); mytabl...
public void create () { stage = new Stage(0, 0, false); Gdx.input.setInputProcessor(stage); skin = new Skin(Gdx.files.internal("data/uiskin.json")); Table mytable = new Table(); mytable.debug(); mytable.add(new Image(new Texture("data/group-debug.png"))); mytable.row(); mytable.add(new Image(new Te...
public void create () { stage = new Stage(0, 0, false, new SpriteBatch()); Gdx.input.setInputProcessor(stage); skin = new Skin(Gdx.files.internal("data/uiskin.json"), Gdx.files.internal("data/uiskin.png")); for (int i = 0; i < 500; i++) { TextButton t = new TextButton("Button"+i, skin); t.setX(MathUtils....
public void create () { stage = new Stage(0, 0, false, new SpriteBatch()); Gdx.input.setInputProcessor(stage); skin = new Skin(Gdx.files.internal("data/uiskin.json")); for (int i = 0; i < 500; i++) { TextButton t = new TextButton("Button"+i, skin); t.setX(MathUtils.random(0, Gdx.graphics.getWidth())); ...
@Override public Snapshot snapshot() throws TranslogException { synchronized (mutex) { try { raf.increaseRefCount(); if (useStream) { return new FsStreamSnapshot(shardId, this.id, raf, lastPosition, operationCounter.get(), operationCounter.get(...
@Override public Snapshot snapshot() throws TranslogException { synchronized (mutex) { try { raf.increaseRefCount(); if (useStream) { return new FsStreamSnapshot(shardId, this.id, raf, lastPosition, operationCounter.get(), operationCounter.get(...
@Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); float boost = 1.0f; SpanQuery inner = null; String field = null; String currentFieldName = null; XContentParser.T...
@Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); float boost = 1.0f; SpanQuery inner = null; String field = null; String currentFieldName = null; XContentParser.T...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String valueScript = null; String scriptLang = null; Map<String, Object> params = null; boolean...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; String valueScript = null; String scriptLang = null; Map<String, Object> params = null; boolean...
@Override public FacetCollector 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, Objec...
@Override public FacetCollector 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, Objec...
public StatisticalFieldsFacetCollector(String facetName, String[] fieldsNames, SearchContext context) { super(facetName); this.fieldDataCache = context.fieldDataCache(); fieldsDataType = new FieldDataType[fieldsNames.length]; fieldsData = new NumericFieldData[fieldsNames.length]; ...
public StatisticalFieldsFacetCollector(String facetName, String[] fieldsNames, SearchContext context) { super(facetName); this.fieldDataCache = context.fieldDataCache(); fieldsDataType = new FieldDataType[fieldsNames.length]; fieldsData = new NumericFieldData[fieldsNames.length]; ...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String field = null; int size = 10; String[] fieldsNames = null; ImmutableSet<String> excluded = ImmutableSet.of(); String regex = null; String ...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String field = null; int size = 10; String[] fieldsNames = null; ImmutableSet<String> excluded = ImmutableSet.of(); String regex = null; String ...
public FieldsTermsStringFacetCollector(String facetName, String[] fieldsNames, int size, InternalStringTermsFacet.ComparatorType comparatorType, boolean allTerms, SearchContext context, ImmutableSet<String> excluded, Pattern pattern, String scriptLang, String script, Map<S...
public FieldsTermsStringFacetCollector(String facetName, String[] fieldsNames, int size, InternalStringTermsFacet.ComparatorType comparatorType, boolean allTerms, SearchContext context, ImmutableSet<String> excluded, Pattern pattern, String scriptLang, String script, Map<S...
public TermsStringFacetCollector(String facetName, String fieldName, int size, TermsFacet.ComparatorType comparatorType, boolean allTerms, SearchContext context, ImmutableSet<String> excluded, Pattern pattern, String scriptLang, String script, Map<String, Object> params) { ...
public TermsStringFacetCollector(String facetName, String fieldName, int size, TermsFacet.ComparatorType comparatorType, boolean allTerms, SearchContext context, ImmutableSet<String> excluded, Pattern pattern, String scriptLang, String script, Map<String, Object> params) { ...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; int size = 10; TermsStatsFacet.ComparatorType comparatorType = TermsStatsFacet.ComparatorType.COUNT; St...
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String keyField = null; String valueField = null; int size = 10; TermsStatsFacet.ComparatorType comparatorType = TermsStatsFacet.ComparatorType.COUNT; St...
public void execute(SearchContext context) { ResetFieldSelector fieldSelector; List<String> extractFieldNames = null; if (context.hasScriptFields() && !context.hasFieldNames()) { // we ask for script fields, and no field names, don't load the source fieldSelector = Ui...
public void execute(SearchContext context) { ResetFieldSelector fieldSelector; List<String> extractFieldNames = null; if (context.hasScriptFields() && !context.hasFieldNames()) { // we ask for script fields, and no field names, don't load the source fieldSelector = Ui...
private void addSortField(SearchContext context, List<SortField> sortFields, String fieldName, boolean reverse, @Nullable final String missing) { if (SCORE_FIELD_NAME.equals(fieldName)) { if (reverse) { sortFields.add(SORT_SCORE_REVERSE); } else { sort...
private void addSortField(SearchContext context, List<SortField> sortFields, String fieldName, boolean reverse, @Nullable final String missing) { if (SCORE_FIELD_NAME.equals(fieldName)) { if (reverse) { sortFields.add(SORT_SCORE_REVERSE); } else { sort...
public void update (boolean updateFrustum) { projection.setToOrtho(zoom * -viewportWidth / 2, zoom * (viewportWidth / 2 - 1), zoom * -(viewportHeight / 2 - 1), zoom * viewportHeight / 2, Math.abs(near), Math.abs(far)); view.setToLookAt(position, tmp.set(position).add(direction), up); combined.set(projection);...
public void update (boolean updateFrustum) { projection.setToOrtho(zoom * -viewportWidth / 2, zoom * (viewportWidth / 2), zoom * -(viewportHeight / 2), zoom * viewportHeight / 2, Math.abs(near), Math.abs(far)); view.setToLookAt(position, tmp.set(position).add(direction), up); combined.set(projection); Matri...
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 Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; boolean queryFound = false; String childType = null; String executionType = "uid"; String filterName = ...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; boolean queryFound = false; String childType = null; String executionType = "uid"; String filterName = ...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; boolean queryFound = false; String parentType = null; String executionType = "uid"; String filterName =...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; boolean queryFound = false; String parentType = null; String executionType = "uid"; String filterName =...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; boolean queryFound = false; float boost = 1.0f; String childType = null; ScoreType scoreType = ScoreType....
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; boolean queryFound = false; float boost = 1.0f; String childType = null; ScoreType scoreType = ScoreType....
public void getScreenToWorld( float screenX, float screenY, Vector2 world ) { screenX = screenX / graphics.getWidth() * viewportWidth; screenY = screenY / graphics.getHeight() * viewportHeight; world.set( ( screenX * scale ) - ( viewportWidth * scale ) / 2 + position.x, ( (viewportHeight -screenY-1) *...
public void getScreenToWorld( float screenX, float screenY, Vector2 world ) { screenX = screenX / graphics.getWidth() * viewportWidth; screenY = screenY / graphics.getHeight() * viewportHeight; world.set( ( screenX * scale ) - ( viewportWidth * scale ) / 2 + position.x, ( (viewportHeight -screenY) * s...
public Shape getShape( ) { if( shape == null ) { long shapeAddr = jniGetShape( addr ); int type = Shape.jniGetType( addr ); if( type == 0 ) shape = new CircleShape( shapeAddr ); else shape = new PolygonShape( shapeAddr ); } return shape; }
public Shape getShape( ) { if( shape == null ) { long shapeAddr = jniGetShape( addr ); int type = Shape.jniGetType( shapeAddr ); if( type == 0 ) shape = new CircleShape( shapeAddr ); else shape = new PolygonShape( shapeAddr ); } return shape; }
public IndicesStore(Settings settings, NodeEnvironment nodeEnv, IndicesService indicesService, ClusterService clusterService, ThreadPool threadPool) { super(settings); this.nodeEnv = nodeEnv; this.indicesService = indicesService; this.clusterService = clusterService; this.thr...
public IndicesStore(Settings settings, NodeEnvironment nodeEnv, IndicesService indicesService, ClusterService clusterService, ThreadPool threadPool) { super(settings); this.nodeEnv = nodeEnv; this.indicesService = indicesService; this.clusterService = clusterService; this.thr...
protected final BulletTest[] tests = {new ShootTest(), new BasicShapesTest(), new KinematicTest(), new ConstraintsTest(), new MeshShapeTest(), new ConvexHullTest(), new RayCastTest(), new RayPickRagdollTest(), new InternalTickTest(), new CollisionWorldTest(), new CollisionTest(), new FrustumCullingTest(), new Co...
protected final BulletTest[] tests = {new ShootTest(), new BasicShapesTest(), new KinematicTest(), new ConstraintsTest(), new MeshShapeTest(), new ConvexHullTest(), new RayCastTest(), new RayPickRagdollTest(), new InternalTickTest(), new CollisionWorldTest(), new CollisionTest(), new FrustumCullingTest(), new Co...
public void create () { final JsonModelLoader loader = new JsonModelLoader(); // need more higher resolution textures for this test... String[] TEXTURES = {"data/badlogic.jpg", "data/egg.png", "data/particle-fire.png", "data/planet_earth.png", "data/planet_heavyclouds.jpg", "data/resource1.jpg", "data/stones...
public void create () { final JsonModelLoader loader = new JsonModelLoader(); // need more higher resolution textures for this test... String[] TEXTURES = {"data/badlogic.jpg", "data/egg.png", "data/particle-fire.png", "data/planet_earth.png", "data/planet_heavyclouds.jpg", "data/resource1.jpg", "data/stones...
public void create () { JsonModelLoader loader = new JsonModelLoader(); com.badlogic.gdx.graphics.g3d.model.Model model2 = new com.badlogic.gdx.graphics.g3d.model.Model(loader.parseModel(Gdx.files.internal("data/g3d/head2.g3dj"), null)); model = loader.load(Gdx.files.internal("data/g3d/head2.g3dj"), null); ...
public void create () { JsonModelLoader loader = new JsonModelLoader(); com.badlogic.gdx.graphics.g3d.Model model2 = new com.badlogic.gdx.graphics.g3d.Model(loader.parseModel(Gdx.files.internal("data/g3d/head2.g3dj"), null)); model = loader.load(Gdx.files.internal("data/g3d/head2.g3dj"), null); cam = new P...
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.StagePerformanceTest(), "Debug Test", 480, 320, false); }
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.FramebufferToTextureTest(), "Debug Test", 480, 320, false); }
@Test public void testNoValidateLatLonValues() throws Exception { String mapping = XContentFactory.jsonBuilder().startObject().startObject("type") .startObject("properties").startObject("point").field("type", "geo_point").field("lat_lon", true).endObject().endObject() .endObj...
@Test public void testNoValidateLatLonValues() throws Exception { String mapping = XContentFactory.jsonBuilder().startObject().startObject("type") .startObject("properties").startObject("point").field("type", "geo_point").field("lat_lon", true).field("normalize", false).field("validate", fal...
public static void main(String[] args) throws Exception { ShardId shardId = new ShardId(new Index("index"), 1); Settings settings = EMPTY_SETTINGS; // Store store = new RamStore(shardId, settings); Store store = new ByteBufferStore(shardId, settings, null, new ByteBufferCache(setting...
public static void main(String[] args) throws Exception { ShardId shardId = new ShardId(new Index("index"), 1); Settings settings = EMPTY_SETTINGS; // Store store = new RamStore(shardId, settings); Store store = new ByteBufferStore(shardId, settings, null, new ByteBufferCache(setting...
@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...
@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...
@Inject public LocalIndexShardGateway(ShardId shardId, @IndexSettings Settings indexSettings, ThreadPool threadPool, IndexShard indexShard) { super(shardId, indexSettings); this.indexShard = (InternalIndexShard) indexShard; TimeValue sync = componentSettings.getAsTime("sync", TimeValue.time...
@Inject public LocalIndexShardGateway(ShardId shardId, @IndexSettings Settings indexSettings, ThreadPool threadPool, IndexShard indexShard) { super(shardId, indexSettings); this.indexShard = (InternalIndexShard) indexShard; TimeValue sync = componentSettings.getAsTime("sync", TimeValue.time...
public long getTranslogNumberOfOperations() { return translog.numberOfOperations(); }
public long getTranslogNumberOfOperations() { return translog.estimatedNumberOfOperations(); }
@Override protected Translog create() { return new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog"), false); }
@Override protected Translog create() { return new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog")); }
GET, POST, PUT, DELETE, OPTIONS, HEAD /* * 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...
GET, POST, PUT, DELETE, OPTIONS, HEAD /* * 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 void parse(ParseContext context) throws IOException { ContentPath.Type origPathType = context.path().pathType(); context.path().pathType(pathType); context.path().add(name()); GeoPoint sparse = context.parseExternalValue(GeoPoint.class); if (sparse != null) {...
public void parse(ParseContext context) throws IOException { ContentPath.Type origPathType = context.path().pathType(); context.path().pathType(pathType); context.path().add(name()); GeoPoint sparse = context.parseExternalValue(GeoPoint.class); if (sparse != null) {...
public void testLoadingPercolateQueriesDuringCloseAndOpen() throws Exception { Settings settings = settingsBuilder() .put("gateway.type", "local").build(); logger.info("--> starting 2 nodes"); startNode("node1", settings); startNode("node2", settings); Client...
public void testLoadingPercolateQueriesDuringCloseAndOpen() throws Exception { Settings settings = settingsBuilder() .put("gateway.type", "local").build(); logger.info("--> starting 2 nodes"); startNode("node1", settings); startNode("node2", settings); Client...
private void assertAllocatorInstance(Settings settings, Class<? extends ShardsAllocator> clazz) { while (cluster().numNodes() != 0) { cluster().stopRandomNode(); } cluster().startNode(settings); ShardsAllocator instance = cluster().getInstance(ShardsAllocator.class);...
private void assertAllocatorInstance(Settings settings, Class<? extends ShardsAllocator> clazz) { while (cluster().size() != 0) { cluster().stopRandomNode(); } cluster().startNode(settings); ShardsAllocator instance = cluster().getInstance(ShardsAllocator.class); ...
protected void createIndex() { wipeIndex(getConcreteIndexName()); createIndex(getConcreteIndexName()); }
protected void createIndex() { wipeIndices(getConcreteIndexName()); createIndex(getConcreteIndexName()); }
public Client startNode(Settings.Builder settings) { String name = cluster().startNode(settings); return cluster().clientNodeClient(name); }
public Client startNode(Settings.Builder settings) { String name = cluster().startNode(settings); return cluster().client(name); }
private void searchWhileCreatingIndex(int numberOfShards, int numberOfReplicas) throws Exception { // make sure we have enough nodes to guaranty default QUORUM consistency. // TODO: add a smarter choice based on actual consistency (when that is randomized) int shardsNo = numberOfReplicas + ...
private void searchWhileCreatingIndex(int numberOfShards, int numberOfReplicas) throws Exception { // make sure we have enough nodes to guaranty default QUORUM consistency. // TODO: add a smarter choice based on actual consistency (when that is randomized) int shardsNo = numberOfReplicas + ...
public void testStopOneNodePreferenceWithRedState() throws InterruptedException { client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", cluster().numNodes()+2).put("index.number_of_replicas", 0)).execute().actionGet(); client().admin().cluster()...
public void testStopOneNodePreferenceWithRedState() throws InterruptedException { client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", cluster().size()+2).put("index.number_of_replicas", 0)).execute().actionGet(); client().admin().cluster().pre...
public void testIssue3177() { run(prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1))); client().prepareIndex("test", "type1", "1").setSource("field1", "value1").execute().actionGet(); client().prepareIndex("test", "type1", "2").setSource("...
public void testIssue3177() { prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.number_of_shards", 1)).get(); client().prepareIndex("test", "type1", "1").setSource("field1", "value1").execute().actionGet(); client().prepareIndex("test", "type1", "2").setSource(...
private ImmutableSettings.Builder createDefaultSettings() { int randomShardNumber = between(1, 5); int randomReplicaNumber = between(0, cluster().numNodes() - 1); return settingsBuilder().put(SETTING_NUMBER_OF_SHARDS, randomShardNumber).put(SETTING_NUMBER_OF_REPLICAS, randomReplicaNumber); ...
private ImmutableSettings.Builder createDefaultSettings() { int randomShardNumber = between(1, 5); int randomReplicaNumber = between(0, cluster().size() - 1); return settingsBuilder().put(SETTING_NUMBER_OF_SHARDS, randomShardNumber).put(SETTING_NUMBER_OF_REPLICAS, randomReplicaNumber); }...
public void testDuelESLucene() throws Exception { TestFieldSetting[] testFieldSettings = getFieldSettings(); createIndexBasedOnFieldSettings(testFieldSettings, -1); TestDoc[] testDocs = generateTestDocs(5, testFieldSettings); DirectoryReader directoryReader = indexDocsWithLucene(tes...
public void testDuelESLucene() throws Exception { TestFieldSetting[] testFieldSettings = getFieldSettings(); createIndexBasedOnFieldSettings(testFieldSettings, -1); TestDoc[] testDocs = generateTestDocs(5, testFieldSettings); DirectoryReader directoryReader = indexDocsWithLucene(tes...
public void testDuelESLucene() throws Exception { AbstractTermVectorTests.TestFieldSetting[] testFieldSettings = getFieldSettings(); createIndexBasedOnFieldSettings(testFieldSettings, -1); AbstractTermVectorTests.TestDoc[] testDocs = generateTestDocs(5, testFieldSettings); Directory...
public void testDuelESLucene() throws Exception { AbstractTermVectorTests.TestFieldSetting[] testFieldSettings = getFieldSettings(); createIndexBasedOnFieldSettings(testFieldSettings, -1); AbstractTermVectorTests.TestDoc[] testDocs = generateTestDocs(5, testFieldSettings); Directory...
public static XContent xContent(byte[] data, int offset, int length) { XContentType type = xContentType(data, offset, length); if (type == null) { throw new ElasticSearchParseException("Failed to derive xcontent from " + Arrays.toString(data)); } return xContent(type); ...
public static XContent xContent(byte[] data, int offset, int length) { XContentType type = xContentType(data, offset, length); if (type == null) { throw new ElasticSearchParseException("Failed to derive xcontent from (offset=" + offset + ", length=" + length + "): " + Arrays.toString(dat...
public InternalTransportClient(Settings settings, ThreadPool threadPool, TransportService transportService, TransportClientNodesService nodesService, InternalTransportAdminClient adminClient, Map<String, GenericAction> actions) { this.thr...
public InternalTransportClient(Settings settings, ThreadPool threadPool, TransportService transportService, TransportClientNodesService nodesService, InternalTransportAdminClient adminClient, Map<String, GenericAction> actions) { this.thr...
public InternalTransportClusterAdminClient(Settings settings, TransportClientNodesService nodesService, ThreadPool threadPool, TransportService transportService, Map<String, GenericAction> actions) { this.nodesService = nodesService; this.threadPool = t...
public InternalTransportClusterAdminClient(Settings settings, TransportClientNodesService nodesService, ThreadPool threadPool, TransportService transportService, Map<String, GenericAction> actions) { this.nodesService = nodesService; this.threadPool = t...
public InternalTransportIndicesAdminClient(Settings settings, TransportClientNodesService nodesService, TransportService transportService, ThreadPool threadPool, Map<String, GenericAction> actions) { this.nodesService = nodesService; this.threadPool = t...
public InternalTransportIndicesAdminClient(Settings settings, TransportClientNodesService nodesService, TransportService transportService, ThreadPool threadPool, Map<String, GenericAction> actions) { this.nodesService = nodesService; this.threadPool = t...
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, BitmapFontParameter parameter) { Array<AssetDescriptor> deps = new Array<AssetDescriptor>(); if (parameter != null && parameter.bitmapFontData != null) { data = parameter.bitmapFontData; return deps; } data = new BitmapFontD...
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, BitmapFontParameter parameter) { Array<AssetDescriptor> deps = new Array(); if (parameter != null && parameter.bitmapFontData != null) { data = parameter.bitmapFontData; return deps; } data = new BitmapFontData(file, paramet...
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, ParticleEffectParameter param) { Array<AssetDescriptor> deps = null; if (param != null && param.atlasFile != null) { deps = new Array<AssetDescriptor>(); deps.add(new AssetDescriptor<TextureAtlas>(param.atlasFile, TextureAtlas.c...
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle file, ParticleEffectParameter param) { Array<AssetDescriptor> deps = null; if (param != null && param.atlasFile != null) { deps = new Array(); deps.add(new AssetDescriptor<TextureAtlas>(param.atlasFile, TextureAtlas.class)); } ret...
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle atlasFile, TextureAtlasParameter parameter) { FileHandle imgDir = atlasFile.parent(); if (parameter != null) data = new TextureAtlasData(atlasFile, imgDir, parameter.flip); else { data = new TextureAtlasData(atlasFile, imgDir, fals...
public Array<AssetDescriptor> getDependencies (String fileName, FileHandle atlasFile, TextureAtlasParameter parameter) { FileHandle imgDir = atlasFile.parent(); if (parameter != null) data = new TextureAtlasData(atlasFile, imgDir, parameter.flip); else { data = new TextureAtlasData(atlasFile, imgDir, fals...
protected Array<Decal> newObject () { return new Array<Decal>(); } };
protected Array<Decal> newObject () { return new Array(); } };
public interface BoostFieldMapper extends FieldMapper<Float>, InternalMapper { /* * 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 thi...
public interface BoostFieldMapper extends FieldMapper<Float>, InternalMapper { /* * 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 thi...
public interface IdFieldMapper extends FieldMapper<String>, InternalMapper { /* * 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 ...
public interface IdFieldMapper extends FieldMapper<String>, InternalMapper { /* * 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 ...
private static KeyframedSubMesh readMesh (BufferedReader in, boolean flipV) throws IOException { String name = readString(in); IntArray indices = readFaces(in); int numVertices = readInt(in); int numAttributes = readInt(in); if (!readString(in).equals("position")) throw new GdxRuntimeException("first attrib...
private static KeyframedSubMesh readMesh (BufferedReader in, boolean flipV) throws IOException { String name = readString(in); IntArray indices = readFaces(in); int numVertices = readInt(in); int numAttributes = readInt(in); if (!readString(in).equals("position")) throw new GdxRuntimeException("first attrib...
private float density = 1; boolean paused;
private float density = 1; volatile boolean paused;
@Override public Pixmap newPixmap (FileHandle file) { return newPixmap(file.getInputStream()); }
@Override public Pixmap newPixmap (FileHandle file) { return newPixmap(file.readFile()); }
@Override public FileHandle getFileHandle (String filename, FileType type) { File file = null; if (type == FileType.Absolute || type == FileType.Internal) file = new File(filename); else file = new File(this.externalPath + filename); if (file.exists() == false) throw new GdxRuntimeException("File '" ...
@Override public FileHandle getFileHandle (String filename, FileType type) { File file = null; if (type == FileType.Absolute || type == FileType.Internal) file = new File(filename); else file = new File(this.externalPath + filename); if (file.exists() == false) throw new GdxRuntimeException("File '" ...
public Pixmap newPixmap(FileHandle file) { return newPixmap(file.getInputStream()); }
public Pixmap newPixmap(FileHandle file) { return newPixmap(file.readFile()); }
public FileHandle getFileHandle (String filename, FileType type) { File file = null; if (type == FileType.Absolute || type == FileType.Internal) file = new File(filename); else file = new File(this.externalPath + filename); // BOZO - Hack. if (!file.exists()) file = new File("resources/" + filename); ...
public FileHandle getFileHandle (String filename, FileType type) { File file = null; if (type == FileType.Absolute || type == FileType.Internal) file = new File(filename); else file = new File(this.externalPath + filename); // BOZO - Hack. if (!file.exists()) file = new File("resources/" + filename); ...
public Pixmap newPixmap (FileHandle file) { return newPixmap(file.getInputStream()); }
public Pixmap newPixmap (FileHandle file) { return newPixmap(file.readFile()); }
public void load (FileHandle effectFile, String imagesDir, FileType fileType) { loadEmitters(effectFile); loadEmitterImages(imagesDir, fileType); } void loadEmitters (FileHandle file) { InputStream input = file.getInputStream(); if (input == null) throw new GdxRuntimeException("Effect file not found: " + fi...
public void load (FileHandle effectFile, String imagesDir, FileType fileType) { loadEmitters(effectFile); loadEmitterImages(imagesDir, fileType); } void loadEmitters (FileHandle file) { InputStream input = file.readFile(); if (input == null) throw new GdxRuntimeException("Effect file not found: " + file); ...
public Query queryStringTermQuery(Term term) { if (!autoBoost) { return new TermQuery(term); } if (fieldType.indexOptions() == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) { return new AllTermQuery(term); } return new TermQuery(term); }
public Query queryStringTermQuery(Term term) { if (!autoBoost) { return new TermQuery(term); } if (fieldType.indexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0) { return new AllTermQuery(term); } return new TermQuery(term); }
public void testDirectoryToString() throws IOException { createIndexWithStoreType("test", "niofs", "least_used"); String storeString = getStoreDirectory("test", 0).toString(); logger.info(storeString); File[] dataPaths = dataPaths(); assertThat(storeString.toLowerCase(Locale....
public void testDirectoryToString() throws IOException { createIndexWithStoreType("test", "niofs", "least_used"); String storeString = getStoreDirectory("test", 0).toString(); logger.info(storeString); File[] dataPaths = dataPaths(); assertThat(storeString.toLowerCase(Locale....
private void innerFinishHim() { sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values()); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults); String scrollId = null; ...
private void innerFinishHim() throws Exception { sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values()); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults); String scrollId =...
private void innerFinishHim() { final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults); String scrollId = null; if (request.scroll() != null) { scrollId = TransportSearchHelper.buildScrollId(req...
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() { sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values()); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults); String scrollId = n...
@Override protected void moveToSecondPhase() throws Exception { sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values()); final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults); St...
private void innerFinishHim() { InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults); String scrollId = null; if (request.scroll() != null) { scrollId = TransportSearchHelper.buildScrollId(request.s...
private void innerFinishHim() throws Exception { InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults); String scrollId = null; if (request.scroll() != null) { scrollId = TransportSearchHelper.buildS...
protected void viewRepository(Repository repository) { if (repo.getId() != repository.getId()) super.viewRepository(repository); }
protected void viewRepository(Repository repository) { if (!repo.generateId().equals(repository.generateId())) super.viewRepository(repository); }
private void handleEvent (NativeEvent e) { if(e.getType().equals("mousedown")) { if(!e.getEventTarget().equals(canvas) || touched) { float mouseX = (int)getRelativeX(e, canvas); float mouseY = (int)getRelativeY(e, canvas); if(mouseX < 0 || mouseX > Gdx.graphics.getWidth() || mouseY < 0 || mouseY > ...
private void handleEvent (NativeEvent e) { if(e.getType().equals("mousedown")) { if(!e.getEventTarget().equals(canvas) || touched) { float mouseX = (int)getRelativeX(e, canvas); float mouseY = (int)getRelativeY(e, canvas); if(mouseX < 0 || mouseX > Gdx.graphics.getWidth() || mouseY < 0 || mouseY > ...
protected GroupShardsIterator shards(ClusterState clusterState, CountRequest request, String[] concreteIndices) { Map<String, Set<String>> routingMap = clusterState.metaData().resolveSearchRouting(request.routing(), request.indices()); return clusterService.operationRouting().searchShards(clusterSta...
protected GroupShardsIterator shards(ClusterState clusterState, CountRequest request, String[] concreteIndices) { Map<String, Set<String>> routingMap = clusterState.metaData().resolveSearchRouting(request.routing(), request.indices()); return clusterService.operationRouting().searchShards(clusterSta...
public void execute(SearchContext context) { FieldsVisitor fieldsVisitor; List<String> extractFieldNames = null; boolean sourceRequested = false; if (!context.hasFieldNames()) { if (context.hasPartialFields()) { // partial fields need the source, so fetch ...
public void execute(SearchContext context) { FieldsVisitor fieldsVisitor; List<String> extractFieldNames = null; boolean sourceRequested = false; if (!context.hasFieldNames()) { if (context.hasPartialFields()) { // partial fields need the source, so fetch ...
import org.elasticsearch.index.query.QueryParseContext; /* * 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 ...
import org.elasticsearch.index.query.QueryParseContext; /* * 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 ...
@Override 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.que...
@Override 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.que...
protected Query getWildcardQuery(String field, String termStr) throws ParseException { if (termStr.equals("*")) { // we want to optimize for match all query for the "*:*", and "*" cases if ("*".equals(field) || Objects.equal(field, this.field)) { String actualField = ...
protected Query getWildcardQuery(String field, String termStr) throws ParseException { if (termStr.equals("*")) { // we want to optimize for match all query for the "*:*", and "*" cases if ("*".equals(field) || Objects.equal(field, this.field)) { String actualField = ...
@Override public boolean touchDown (int x, int y, int pointer) { sound.play(); return false; }
@Override public boolean touchDown (int x, int y, int pointer) { sound.play(0.5f); return false; }
public void run() { timeoutUpdateTask.onTimeout(task.source); } }); } }); } else { updateTasksExecutor.execute(task); } }
public void run() { timeoutUpdateTask.onTimeout(timeoutUpdateTask.timeout(), task.source); } }); } }); } else { updateTasksExecutor.execute(task); } }
@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 queryString...
@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 queryString...
@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(); // now, we move af...
@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(); // now, we move af...
@Override public Filter parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); jp.nextToken(); ...
@Override public Filter parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); jp.nextToken(); ...
@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 = nu...
@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 = nu...
@Override public Filter parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); // now, we move a...
@Override public Filter parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); // now, we move a...
@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 from = null...
@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 from = null...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.getCurrentToken(); if (token == JsonToken.START_OBJECT) { token = jp.nextToken(); } assert token =...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.getCurrentToken(); if (token == JsonToken.START_OBJECT) { token = jp.nextToken(); } assert token =...
@Override public Filter parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); jp.nextToken(); ...
@Override public Filter parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); jp.nextToken(); ...
@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...
@Override public Filter parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); FieldMapper field...
@Override public Filter parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); FieldMapper field...
@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 = nu...
@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 = nu...
public FilterCache filterCache() { return indexService.filterCache(); }
public FilterCache filterCache() { return indexService.cache().filter(); }
protected boolean match(int doc) { return liveDocs.get(doc); } }
protected boolean match(int doc) { return liveDocs == null || liveDocs.get(doc); } }
@Override protected void draw (SpriteBatch batch, float parentAlpha) { updateSprite(); if (region.getTexture() != null) { sprite.draw(batch); //, parentAlpha); } }
@Override protected void draw (SpriteBatch batch, float parentAlpha) { updateSprite(); if (region.getTexture() != null) { sprite.draw(batch, parentAlpha); } }
public ShardsIterator randomAllShardsIt() { return new PlainShardsIterator(allShards, Math.abs(counter.incrementAndGet())); }
public ShardsIterator randomAllShardsIt() { return new PlainShardsIterator(allShards, counter.incrementAndGet()); }
public static void main(String[] args) { System.out.println("ElasticSearch Version: " + Version.CURRENT + ", JVM: " + JvmInfo.jvmInfo().vmVersion()); }
public static void main(String[] args) { System.out.println("ElasticSearch Version: " + Version.CURRENT + ", JVM: " + JvmInfo.jvmInfo().version() + "(" + JvmInfo.jvmInfo().vmVersion() + ")"); }
public static native String getFailureReason (); /* gdx2d_get_failure_reason(void); */
public static native String getFailureReason (); /* return env->NewStringUTF(gdx2d_get_failure_reason()); */
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 void masterOperation(AbortBenchmarkRequest request, ClusterState state, final ActionListener<AbortBenchmarkResponse> listener) throws ElasticsearchException { service.abortBenchmark(request.benchmarkName(), listener); }
protected void masterOperation(AbortBenchmarkRequest request, ClusterState state, final ActionListener<AbortBenchmarkResponse> listener) throws ElasticsearchException { service.abortBenchmark(request.benchmarkNames(), listener); }