buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private final javax.microedition.khronos.opengles.GL10 gl;
@Override public void glPolygonMode (int face, int mode) { // throw new UnsupportedOperationException( "not available in OpenGL ES" ); } }
@Override public void actionPerformed (ActionEvent e) { String testName = (String)list.getSelectedValue(); GdxTest test = GdxTests.newTest(testName); new JoglApplication(test, testName, 800, 480, test.needsGL20()); } }); add(pane, BorderLayout.CENTER); add(button, BorderLayout.SOUTH); ...
@Override public void actionPerformed (ActionEvent e) { String testName = (String)list.getSelectedValue(); GdxTest test = GdxTests.newTest(testName); new JoglApplication(test, testName, 480, 320, test.needsGL20()); } }); add(pane, BorderLayout.CENTER); add(button, BorderLayout.SOUTH); ...
public static void main(String[] argv) { if(argv.length != 1 && argv.length != 2) { System.out.println("StillModelViewer <filename> ?<texture-filename>"); System.exit(-1); } new JoglApplication(new KeyframedModelViewer(argv[0], argv.length==2?argv[1]:null), "KeframedModel Viewer", 320, 240, false); }
public static void main(String[] argv) { if(argv.length != 1 && argv.length != 2) { System.out.println("StillModelViewer <filename> ?<texture-filename>"); System.exit(-1); } new JoglApplication(new KeyframedModelViewer("data/boy.g3dt", argv.length==2?argv[1]:null), "KeframedModel Viewer", 320, 240, false);...
public void run () { Runtime.getRuntime().halt(0); // Because fuck you, Swing shutdown hooks. } }); setDefaultCloseOperation(EXIT_ON_CLOSE); getContentPane().setPreferredSize(new Dimension(width, height)); initialize(); pack(); setLocationRelativeTo(null); setVisible(true); lwjglAWTCanvas.get...
public void run () { Runtime.getRuntime().halt(0); // Because fuck you, deadlock causing Swing shutdown hooks. } }); setDefaultCloseOperation(EXIT_ON_CLOSE); getContentPane().setPreferredSize(new Dimension(width, height)); initialize(); pack(); setLocationRelativeTo(null); setVisible(true); l...
public void run () { Runtime.getRuntime().halt(0); // Because fuck you, Swing shutdown hooks. } }); setDefaultCloseOperation(EXIT_ON_CLOSE); getContentPane().setPreferredSize(new Dimension(width, height)); initialize(); Dimension size = getSize(); if (size.width == 0 && size.height == 0) pack(); ...
public void run () { Runtime.getRuntime().halt(0); // Because fuck you, deadlock causing Swing shutdown hooks. } }); setDefaultCloseOperation(EXIT_ON_CLOSE); getContentPane().setPreferredSize(new Dimension(width, height)); initialize(); Dimension size = getSize(); if (size.width == 0 && size.heig...
public void create() { texture = Gdx.graphics.newTexture(Gdx.files.internal("data/badlogicsmall.jpg"), TextureFilter.Linear, TextureFilter.Linear, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge); vaBatch = new SpriteBatch(1000); vboBatch = new SpriteBatch(1000); cache = new SpriteCache(); sprites = new ...
public void create() { texture = Gdx.graphics.newTexture(Gdx.files.internal("data/badlogicsmall.jpg"), TextureFilter.Linear, TextureFilter.Linear, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge); vaBatch = new SpriteBatch(1000); vboBatch = new SpriteBatch(1000, VertexDataType.VertexBufferObject); cache = new...
private String formatStatusCodeMessage(RestResponse restResponse, String expected) { return "expected [" + expected + "] status code but api [" + apiCallSection.getApi() + "] returned [" + restResponse.getStatusCode() + " " + restResponse.getReasonPhrase() + "] [" + restResponse.getBody() + ...
private String formatStatusCodeMessage(RestResponse restResponse, String expected) { return "expected [" + expected + "] status code but api [" + apiCallSection.getApi() + "] returned [" + restResponse.getStatusCode() + " " + restResponse.getReasonPhrase() + "] [" + restResponse.getBodyAsStr...
private static native void nativeInit() /*-{ var gamepadSupportAvailable = !! navigator.getGamepads || !! navigator.webkitGetGamepads || !! navigator.webkitGamepads || (navigator.userAgent.indexOf('Firefox/') != -1); if (gamepadSupportAvailable) { $wnd.addEventListener('MozGamepadConnected'...
private static native void nativeInit() /*-{ var gamepadSupportAvailable = !! navigator.getGamepads || !! navigator.webkitGetGamepads || !! navigator.webkitGamepads || (navigator.userAgent.indexOf('Firefox/') != -1); if (gamepadSupportAvailable) { $wnd.addEventListener('MozGamepadConnected'...
public DepthShader(final ShaderProgram shaderProgram, final Renderable renderable, int numBones) { super(shaderProgram, renderable, false, false, false, false, 0, 0, 0, numBones); this.numBones = numBones; int w = 0; final int n = renderable.mesh.getVertexAttributes().size(); for (int i = 0; i < n; i++) { ...
public DepthShader(final ShaderProgram shaderProgram, final Renderable renderable, int numBones) { super(shaderProgram, renderable, false, false, false, 0, 0, 0, numBones); this.numBones = numBones; int w = 0; final int n = renderable.mesh.getVertexAttributes().size(); for (int i = 0; i < n; i++) { final ...
public void testThatSuggestStopFilterWorks() throws Exception { ImmutableSettings.Builder settingsBuilder = settingsBuilder() .put("index.analysis.analyzer.stoptest.tokenizer", "standard") .putArray("index.analysis.analyzer.stoptest.filter", "standard", "suggest_stop_filter")...
public void testThatSuggestStopFilterWorks() throws Exception { ImmutableSettings.Builder settingsBuilder = settingsBuilder() .put("index.analysis.analyzer.stoptest.tokenizer", "standard") .putArray("index.analysis.analyzer.stoptest.filter", "standard", "suggest_stop_filter")...
@Override public synchronized void merge(DocumentMapper mergeWith, MergeFlags mergeFlags) throws MergeMappingException { JsonDocumentMapper jsonMergeWith = (JsonDocumentMapper) mergeWith; rootObjectMapper.mergeMapping(jsonMergeWith.rootObjectMapper, mergeFlags); if (!mergeFlags.simulate()) {...
@Override public synchronized void merge(DocumentMapper mergeWith, MergeFlags mergeFlags) throws MergeMappingException { JsonDocumentMapper jsonMergeWith = (JsonDocumentMapper) mergeWith; rootObjectMapper.mergeMapping(this, jsonMergeWith.rootObjectMapper, mergeFlags); if (!mergeFlags.simulat...
public void draw (float delta) { Gdx.graphics.getGL10().glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); renderer.render(simulation, delta); }
public void draw (float delta) { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); renderer.render(simulation, delta); }
public void draw (float delta) { Gdx.graphics.getGL10().glClear(GL10.GL_COLOR_BUFFER_BIT); viewMatrix.setToOrtho2D(0, 0, 480, 320); spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setTransformMatrix(transformMatrix); spriteBatch.begin(); spriteBatch.disableBlending(); spriteBatch.setColor(Color...
public void draw (float delta) { Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); viewMatrix.setToOrtho2D(0, 0, 480, 320); spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setTransformMatrix(transformMatrix); spriteBatch.begin(); spriteBatch.disableBlending(); spriteBatch.setColor(Color.WHITE); sprit...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); String value = nul...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); JsonToken token = jp.nextToken(); assert token == JsonToken.FIELD_NAME; String fieldName = jp.getCurrentName(); String value = nul...
public BaseFieldVisitor fieldSelector() { return SourceFieldVisitor.INSTANCE; }
public BaseFieldVisitor fieldSelector() { return new SourceFieldVisitor(); }
@Override public void create () { if (!isInitialized) { screen = new MainMenu(Gdx.app); Music music = Gdx.audio.newMusic(Gdx.files.getFileHandle("data/8.12.mp3", FileType.Internal)); music.setLooping(true); music.play(); isInitialized = true; } }
@Override public void create () { if (!isInitialized) { screen = new GameOver(Gdx.app); Music music = Gdx.audio.newMusic(Gdx.files.getFileHandle("data/8.12.mp3", FileType.Internal)); music.setLooping(true); music.play(); isInitialized = true; } }
public static void main (String[] argv) { new JoglApplication(new GdxInvaders(),"Gdx Invaders", 480, 320, false); }
public static void main (String[] argv) { new JoglApplication(new GdxInvaders(),"Gdx Invaders", 800, 480, false); }
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { builder.startObject(name); builder.field("type", JSON_TYPE); builder.field("dynamic", dynamic); builder.field("enabled", enabled); builder.field("pathType", pathType.name().toLowerCase()); ...
@Override public void toJson(JsonBuilder builder, Params params) throws IOException { builder.startObject(name); builder.field("type", JSON_TYPE); builder.field("dynamic", dynamic); builder.field("enabled", enabled); builder.field("pathType", pathType.name().toLowerCase()); ...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); float boost = 1.0f; String normsField = null; String currentFieldName = null; JsonToken token; while ((token = jp.nextToke...
@Override public Query parse(JsonQueryParseContext parseContext) throws IOException, QueryParsingException { JsonParser jp = parseContext.jp(); float boost = 1.0f; String normsField = null; String currentFieldName = null; JsonToken token; while ((token = jp.nextToke...
@Test public void testDisMaxBuilder() throws Exception { IndexQueryParser queryParser = newQueryParser(); Query parsedQuery = queryParser.parse(disMaxQuery().boost(1.2f).tieBreakerMultiplier(0.7f).add(termQuery("age", 34)).add(termQuery("age", 35))); assertThat(parsedQuery, instanceOf(Disjun...
@Test public void testDisMaxBuilder() throws Exception { IndexQueryParser queryParser = newQueryParser(); Query parsedQuery = queryParser.parse(disMaxQuery().boost(1.2f).tieBreaker(0.7f).add(termQuery("age", 34)).add(termQuery("age", 35))); assertThat(parsedQuery, instanceOf(DisjunctionMaxQu...
public TestSection parse(RestTestSuiteParseContext parseContext) throws IOException, RestTestParseException { XContentParser parser = parseContext.parser(); parseContext.advanceToFieldName(); TestSection testSection = new TestSection(parser.currentName()); parser.nextToken(); ...
public TestSection parse(RestTestSuiteParseContext parseContext) throws IOException, RestTestParseException { XContentParser parser = parseContext.parser(); parseContext.advanceToFieldName(); TestSection testSection = new TestSection(parser.currentName()); parser.nextToken(); ...
public RestTestSuite parse(RestTestSuiteParseContext parseContext) throws IOException, RestTestParseException { XContentParser parser = parseContext.parser(); parser.nextToken(); assert parser.currentToken() == XContentParser.Token.START_OBJECT; RestTestSuite restTestSuite = new Re...
public RestTestSuite parse(RestTestSuiteParseContext parseContext) throws IOException, RestTestParseException { XContentParser parser = parseContext.parser(); parser.nextToken(); assert parser.currentToken() == XContentParser.Token.START_OBJECT; RestTestSuite restTestSuite = new Re...
public SetupSection parse(RestTestSuiteParseContext parseContext) throws IOException, RestTestParseException { XContentParser parser = parseContext.parser(); SetupSection setupSection = new SetupSection(); setupSection.setSkipSection(parseContext.parseSkipSection()); boolean skip ...
public SetupSection parse(RestTestSuiteParseContext parseContext) throws IOException, RestTestParseException { XContentParser parser = parseContext.parser(); SetupSection setupSection = new SetupSection(); setupSection.setSkipSection(parseContext.parseSkipSection()); boolean skip ...
package com.github.mobile; package com.github.mobile.android; import java.io.IOException; import java.util.List; import org.eclipse.egit.github.core.SearchRepository; /** * Interface facade to searching repositories */ public interface IRepositorySearch { /** * Search for repositories matching query ...
package com.github.mobile; package com.github.mobile; import java.io.IOException; import java.util.List; import org.eclipse.egit.github.core.SearchRepository; /** * Interface facade to searching repositories */ public interface IRepositorySearch { /** * Search for repositories matching query * ...
package com.github.mobile; package com.github.mobile.android; /** * Request codes */ public interface RequestCodes { /** * Request to view a Gist */ int GIST_VIEW = 1; /** * Request to view an issue */ int ISSUE_VIEW = 2; /** * Request to edit an issue filter */ ...
package com.github.mobile; package com.github.mobile; /** * Request codes */ public interface RequestCodes { /** * Request to view a Gist */ int GIST_VIEW = 1; /** * Request to view an issue */ int ISSUE_VIEW = 2; /** * Request to edit an issue filter */ int ...
package com.github.mobile; package com.github.mobile.android; /** * Request future delivering a response * * @param <V> * type of response data */ public interface RequestFuture<V> { /** * Callback that response for request was successfully obtained * * @param response */ ...
package com.github.mobile; package com.github.mobile; /** * Request future delivering a response * * @param <V> * type of response data */ public interface RequestFuture<V> { /** * Callback that response for request was successfully obtained * * @param response */ void suc...
package com.github.mobile.persistence; package com.github.mobile.android.persistence; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.io.IOException; import java.util.List; /** * Describes how to store, load or request-an-update-for a particular set of data. */ public in...
package com.github.mobile.persistence; package com.github.mobile.persistence; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.io.IOException; import java.util.List; /** * Describes how to store, load or request-an-update-for a particular set of data. */ public interface ...
package com.github.mobile.ui; package com.github.mobile.android.ui; import android.app.Activity; import android.os.Bundle; /** * Listener that dialogs results are delivered too */ public interface DialogResultListener { /** * Callback for a dialog finishing and delivering a result * * @param re...
package com.github.mobile.ui; package com.github.mobile.ui; import android.app.Activity; import android.os.Bundle; /** * Listener that dialogs results are delivered too */ public interface DialogResultListener { /** * Callback for a dialog finishing and delivering a result * * @param requestCod...
private void applyNewNodes(RoutingNodes routingNodes, Iterable<DiscoveryNode> liveNodes) { for (DiscoveryNode node : liveNodes) { if (!routingNodes.nodesToShards().containsKey(node.id())) { RoutingNode routingNode = new RoutingNode(node.id()); routingNodes.nodesTo...
private void applyNewNodes(RoutingNodes routingNodes, Iterable<DiscoveryNode> liveNodes) { for (DiscoveryNode node : liveNodes) { if (!routingNodes.nodesToShards().containsKey(node.id())) { RoutingNode routingNode = new RoutingNode(node); routingNodes.nodesToShard...
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.Gdx2DTest(), "Debug Test", 480, 320, false); }
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.RotationTest(), "Debug Test", 480, 320, false); }
public void recoverWhileRelocating() throws Exception { final int numShards = between(2, 10); final int numReplicas = 0; logger.info("--> creating test index ..."); int allowNodes = 2; assertAcked(prepareCreate("test", 3, settingsBuilder().put(SETTING_NUMBER_OF_SHARDS, numSha...
public void recoverWhileRelocating() throws Exception { final int numShards = between(2, 10); final int numReplicas = 0; logger.info("--> creating test index ..."); int allowNodes = 2; assertAcked(prepareCreate("test", 3, settingsBuilder().put(SETTING_NUMBER_OF_SHARDS, numSha...
public static final int REVISION; static { try { String[] v = VERSION.split("\\."); MAJOR = v.length < 1 ? 0 : Integer.valueOf(v[0]); MINOR = v.length < 2 ? 0 : Integer.valueOf(v[1]); REVISION = v.length < 3 ? 0 : Integer.valueOf(v[2]); } catch (Throwable t) { // Should never happen throw new...
public static final int REVISION; static { try { String[] v = VERSION.split("\\."); MAJOR = v.length < 1 ? 0 : Integer.valueOf(v[0]); MINOR = v.length < 2 ? 0 : Integer.valueOf(v[1]); REVISION = v.length < 3 ? 0 : Integer.valueOf(v[2]); } catch (Throwable t) { // Should never happen throw new...
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.EdgeDetectionTest(), "Debug Test", 480, 320, true); }
public static void main (String[] argv) { new JoglApplication(new com.badlogic.gdx.tests.KinematicBodyTest(), "Debug Test", 480, 320, false); }
@Override public boolean needsGL20 () { return true; } FPSLogger logger; ShaderProgram shader; Mesh mesh; FrameBuffer fbo; PerspectiveCamera cam; Matrix4 matrix = new Matrix4(); float angle = 0; TextureRegion fboRegion; SpriteBatch batch; ShaderProgram batchShader; float[] filter = { 0, 0.25f, 0, ...
@Override public boolean needsGL20 () { return true; } FPSLogger logger; ShaderProgram shader; Mesh mesh; FrameBuffer fbo; PerspectiveCamera cam; Matrix4 matrix = new Matrix4(); float angle = 0; TextureRegion fboRegion; SpriteBatch batch; ShaderProgram batchShader; float[] filter = { 0, 0.25f, 0, ...
public boolean touchDown(int x, int y, int pointer, int button) { position.x = x; position.y = -y + 48; //System.out.println(position); return true; }
public boolean touchDown(int x, int y, int pointer, int button) { position.x = x; position.y = y; //System.out.println(position); return true; }
public static void setupSecondCluster() throws Exception { ElasticsearchIntegrationTest.beforeClass(); // create another cluster cluster2 = new TestCluster(randomLong(), 2, 2, Strings.randomBase64UUID(getRandom()), 0); cluster2.beforeTest(getRandom(), 0.1); cluster2.ensureAtL...
public static void setupSecondCluster() throws Exception { ElasticsearchIntegrationTest.beforeClass(); // create another cluster cluster2 = new TestCluster(randomLong(), 2, 2, Strings.randomBase64UUID(getRandom()), 0, false); cluster2.beforeTest(getRandom(), 0.1); cluster2.en...
@Override public Facet facet() { TObjectIntHashMap<String> facets = aggregator.facets(); if (facets.isEmpty()) { TermsStringFacetCollector.pushFacets(facets); return new InternalStringTermsFacet(facetName, arrayToCommaDelimitedString(fieldsNames), comparatorType, size, Immuta...
@Override public Facet facet() { TObjectIntHashMap<String> facets = aggregator.facets(); if (facets.isEmpty()) { TermsStringFacetCollector.pushFacets(facets); return new InternalStringTermsFacet(facetName, arrayToCommaDelimitedString(fieldsNames), comparatorType, size, Immuta...
@Override public Facet facet() { if (facets.isEmpty()) { TermsStringFacetCollector.pushFacets(facets); return new InternalStringTermsFacet(facetName, sScript, comparatorType, size, ImmutableList.<InternalStringTermsFacet.StringEntry>of()); } else { // we need to f...
@Override public Facet facet() { if (facets.isEmpty()) { TermsStringFacetCollector.pushFacets(facets); return new InternalStringTermsFacet(facetName, sScript, comparatorType, size, ImmutableList.<InternalStringTermsFacet.StringEntry>of()); } else { // we need to f...
public SpriteBatch (int size, int buffers) { this.buffers = new Mesh[buffers]; for (int i = 0; i < buffers; i++) { this.buffers[i] = new Mesh(false, size * 4, size * 6, new VertexAttribute(Usage.Position, 2, ShaderProgram.POSITION_ATTRIBUTE), new VertexAttribute(Usage.ColorPacked, 4, ShaderProgram.TEXCOORD...
public SpriteBatch (int size, int buffers) { this.buffers = new Mesh[buffers]; for (int i = 0; i < buffers; i++) { this.buffers[i] = new Mesh(false, size * 4, size * 6, new VertexAttribute(Usage.Position, 2, ShaderProgram.POSITION_ATTRIBUTE), new VertexAttribute(Usage.ColorPacked, 4, ShaderProgram.COLOR_AT...
@Override protected CreateIndexResponse masterOperation(CreateIndexRequest request) throws ElasticSearchException { MetaDataService.CreateIndexResult createIndexResult = metaDataService.createIndex(request.index(), request.settings(), request.timeout()); return new CreateIndexResponse(createIndexRes...
@Override protected CreateIndexResponse masterOperation(CreateIndexRequest request) throws ElasticSearchException { MetaDataService.CreateIndexResult createIndexResult = metaDataService.createIndex(request.index(), request.settings(), request.mappings(), request.timeout()); return new CreateIndexRes...
@Override public void create () { animModel = G3dtLoader.loadKeyframedModel(Gdx.files.internal("data/boy.g3dt"), true); anim = animModel.getAnimations()[0]; Material material = new Material("default", new TextureAttribute(new Texture(Gdx.files.internal("data/boy.png")), 0, "tex0")); animModel.setMaterial(mater...
@Override public void create () { animModel = G3dtLoader.loadKeyframedModel(Gdx.files.internal("data/boy.g3dt"), true); anim = animModel.getAnimations()[0]; Material material = new Material("default", new TextureAttribute(new Texture(Gdx.files.internal("data/boy.png")), 0, "tex0")); animModel.setMaterial(mater...
public static void tryMlockall() { int errno = Integer.MIN_VALUE; try { int result = CLibrary.mlockall(CLibrary.MCL_CURRENT); if (result != 0) { errno = Native.getLastError(); } else { LOCAL_MLOCKALL = true; } } ...
public static void tryMlockall() { int errno = Integer.MIN_VALUE; try { int result = CLibrary.mlockall(CLibrary.MCL_CURRENT); if (result != 0) { errno = Native.getLastError(); } else { LOCAL_MLOCKALL = true; } } ...
private ExecutorHolder build(String name, String defaultType, @Nullable Settings settings, Settings defaultSettings) { if (settings == null) { settings = ImmutableSettings.Builder.EMPTY_SETTINGS; } String type = settings.get("type", defaultType); ThreadFactory threadFacto...
private ExecutorHolder build(String name, String defaultType, @Nullable Settings settings, Settings defaultSettings) { if (settings == null) { settings = ImmutableSettings.Builder.EMPTY_SETTINGS; } String type = settings.get("type", defaultType); ThreadFactory threadFacto...
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 > ...
private void doSnapshot(final Snapshot snapshot) throws IndexShardGatewaySnapshotFailedException { ImmutableMap<String, BlobMetaData> blobs; try { blobs = blobContainer.listBlobs(); } catch (IOException e) { throw new IndexShardGatewaySnapshotFailedException(shardId, ...
private void doSnapshot(final Snapshot snapshot) throws IndexShardGatewaySnapshotFailedException { ImmutableMap<String, BlobMetaData> blobs; try { blobs = blobContainer.listBlobs(); } catch (IOException e) { throw new IndexShardGatewaySnapshotFailedException(shardId, ...
public class Animation { package com.badlogic.gdx.graphics.g3d.model; public class ModelAnimation { }
public class Animation { package com.badlogic.gdx.graphics.g3d.model; public class Animation { }
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 SharedLib...
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 SharedLib...
public static DocIdAndVersion loadDocIdAndVersion(IndexReader reader, Term term) { int docId = Lucene.NO_DOC; TermPositions uid = null; try { uid = reader.termPositions(term); if (!uid.next()) { return new DocIdAndVersion(Lucene.NO_DOC, -1, reader); ...
public static DocIdAndVersion loadDocIdAndVersion(IndexReader reader, Term term) { int docId = Lucene.NO_DOC; TermPositions uid = null; try { uid = reader.termPositions(term); if (!uid.next()) { return null; // no doc } docId = ...
@Test public void testUidField() throws Exception { IndexWriter writer = new IndexWriter(new RAMDirectory(), new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER)); IndexReader reader = IndexReader.open(writer, true); assertThat(UidField.loadVersion(reader, new Term("_uid", "1")),...
@Test public void testUidField() throws Exception { IndexWriter writer = new IndexWriter(new RAMDirectory(), new IndexWriterConfig(Lucene.VERSION, Lucene.STANDARD_ANALYZER)); IndexReader reader = IndexReader.open(writer, true); assertThat(UidField.loadVersion(reader, new Term("_uid", "1")),...
public void addDebugRectangle (TableLayout layout, int type, int x, int y, int w, int h) { if (layout.debugRects == null) layout.debugRects = new Array(); layout.debugRects.add(new DebugRect(type, x, y, w, h)); }
public void addDebugRectangle (TableLayout layout, int type, int x, int y, int w, int h) { if (layout.debugRects == null) layout.debugRects = new Array(); layout.debugRects.add(new DebugRect(type, x, (int)(layout.getTable().height - y), w, h)); }
private static String buildErrorMessage(String stage, Throwable e) { StringBuilder errorMessage = new StringBuilder("{").append(Version.full()).append("}: "); try { if (ANSI.isEnabled()) { errorMessage.append(attrib(ANSI.Code.FG_RED)).append(stage).append(" Failed ...").a...
private static String buildErrorMessage(String stage, Throwable e) { StringBuilder errorMessage = new StringBuilder("{").append(Version.CURRENT).append("}: "); try { if (ANSI.isEnabled()) { errorMessage.append(attrib(ANSI.Code.FG_RED)).append(stage).append(" Failed ...")....
@Override protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer) throws Exception { MemcachedRestRequest request = this.request; if (request == null) { buffer.markReaderIndex(); if (buffer.readableBytes() < 1) { return null;...
@Override protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer) throws Exception { MemcachedRestRequest request = this.request; if (request == null) { buffer.markReaderIndex(); if (buffer.readableBytes() < 1) { return null;...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, LetterBoxTest3.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPer...
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList( AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class, LetterBoxTest3.class, GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPer...
public void testThatDisablingPositionIncrementsWorkForStopwords() throws Exception { // analyzer which removes stopwords... so may not be the simple one createIndexAndMapping("standard", "standard", false, false, false); client().prepareIndex(INDEX, TYPE, "1").setSource(jsonBuilder() ...
public void testThatDisablingPositionIncrementsWorkForStopwords() throws Exception { // analyzer which removes stopwords... so may not be the simple one createIndexAndMapping("classic", "classic", false, false, false); client().prepareIndex(INDEX, TYPE, "1").setSource(jsonBuilder() ...
public static void main (String[] argv) { // this is only here for me to debug native code faster new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx"); new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio"); GdxTest test = new TextButtonTest(); ...
public static void main (String[] argv) { // this is only here for me to debug native code faster new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx"); new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio"); GdxTest test = new TextureBindTest(); ...
public boolean needsGL20() { return false; }
public boolean needsGL20() { return true; }
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); XContentParser.Token token = parser.nextToken(); if (token != XContentParser.Token.FIELD_NAME) { throw new QueryParsingException(parseCon...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); XContentParser.Token token = parser.nextToken(); if (token != XContentParser.Token.FIELD_NAME) { throw new QueryParsingException(parseCon...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); List<String> ids = new ArrayList<String>(); Collection<String> types = null; String filterName = null; String currentFieldName = nul...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); List<String> ids = new ArrayList<String>(); Collection<String> types = null; String filterName = null; String currentFieldName = nul...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); List<String> ids = new ArrayList<String>(); Collection<String> types = null; String currentFieldName = null; float boost = 1.0f; ...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); List<String> ids = new ArrayList<String>(); Collection<String> types = null; String currentFieldName = null; float boost = 1.0f; ...
public static void main (String[] argv) { JoglApplicationConfiguration config = new JoglApplicationConfiguration(); new JoglApplication(new com.badlogic.gdx.tests.InputTest(), config); }
public static void main (String[] argv) { JoglApplicationConfiguration config = new JoglApplicationConfiguration(); new JoglApplication(new com.badlogic.gdx.tests.UITest(), config); }
public static void main (String[] argv) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); new LwjglApplication(new com.badlogic.gdx.tests.IntegerBitmapFontTest(), config); }
public static void main (String[] argv) { LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); new LwjglApplication(new com.badlogic.gdx.tests.SpriteCacheTest(), config); }
public void initialize(ApplicationListener listener, AndroidApplicationConfiguration config) { graphics = new AndroidGraphicsLiveWallpaper(this, config.useGL20, config.resolutionStrategy==null?new FillResolutionStrategy():config.resolutionStrategy); input = AndroidInputFactory.newAndroidInput(this, this.getService...
public void initialize(ApplicationListener listener, AndroidApplicationConfiguration config) { graphics = new AndroidGraphicsLiveWallpaper(this, config.useGL20, config.resolutionStrategy==null?new FillResolutionStrategy():config.resolutionStrategy); input = new AndroidInput(this, this.getService(), null, config); ...
@Override public String getMessage() { StringBuilder sb = new StringBuilder(); sb.append("Validation Failed: "); int index = 0; for (String error : validationErrors) { sb.append(++index).append(": ").append(error); } return sb.toString(); }
@Override public String getMessage() { StringBuilder sb = new StringBuilder(); sb.append("Validation Failed: "); int index = 0; for (String error : validationErrors) { sb.append(++index).append(": ").append(error).append(";"); } return sb.toString(); }...
@Override public Filter 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; boo...
@Override public Filter 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; boo...
@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...
@Override public void parse(XContentParser parser, SearchContext context) throws Exception { XContentParser.Token token; List<FacetCollector> facetCollectors = null; String topLevelFieldName = null; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { ...
@Override public void parse(XContentParser parser, SearchContext context) throws Exception { XContentParser.Token token; List<FacetCollector> facetCollectors = null; String topLevelFieldName = null; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { ...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; boolean queryFound = false; Filter filter = null; boolean filterFound = false; float boost = 1.0f; ...
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); Query query = null; boolean queryFound = false; Filter filter = null; boolean filterFound = false; float boost = 1.0f; ...
private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer) { long timeStamp = System.nanoTime(); synchronized (input) { TouchEvent event = input.usedTouchEvents.add(); event.timeStamp = timeStamp; event.pointer = pointer; event.x = x; event.y = y; event.type = type; ...
private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer) { long timeStamp = System.nanoTime(); synchronized (input) { TouchEvent event = input.usedTouchEvents.obtain(); event.timeStamp = timeStamp; event.pointer = pointer; event.x = x; event.y = y; event.type = type; ...
private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer) { long timeStamp = System.nanoTime(); synchronized (input) { TouchEvent event = input.usedTouchEvents.add(); event.timeStamp = timeStamp; event.pointer = 0; event.x = x; event.y = y; event.type = type; input....
private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer) { long timeStamp = System.nanoTime(); synchronized (input) { TouchEvent event = input.usedTouchEvents.obtain(); event.timeStamp = timeStamp; event.pointer = 0; event.x = x; event.y = y; event.type = type; inp...
public Loader<CharSequence> onCreateLoader(int loader, Bundle args) { final CharSequence raw = args.getCharSequence(ARG_TEXT); final IRepositoryIdProvider repo = (IRepositoryIdProvider) args .getSerializable(ARG_REPO); return new MarkdownLoader(getActivity(), repo, raw.toStri...
public Loader<CharSequence> onCreateLoader(int loader, Bundle args) { final CharSequence raw = args.getCharSequence(ARG_TEXT); final IRepositoryIdProvider repo = (IRepositoryIdProvider) args .getSerializable(ARG_REPO); return new MarkdownLoader(getActivity(), repo, raw.toStri...
public TiledMap load(String fileName, TmxMapLoader.Parameters parameters) { try { this.yUp = parameters.yUp; FileHandle tmxFile = resolve(fileName); root = xml.parse(tmxFile); ObjectMap<String, Texture> textures = new ObjectMap<String, Texture>(); for(FileHandle textureFile: loadTilesets(root, tmxFile...
public TiledMap load(String fileName, TmxMapLoader.Parameters parameters) { try { this.yUp = parameters.yUp; FileHandle tmxFile = resolve(fileName); root = xml.parse(tmxFile); ObjectMap<String, Texture> textures = new ObjectMap<String, Texture>(); for(FileHandle textureFile: loadTilesets(root, tmxFile...
private void validate(Request request, ClusterState state) throws ElasticSearchException { if (state.routingTable().hasIndex(request.index)) { throw new IndexAlreadyExistsException(new Index(request.index)); } if (state.metaData().hasIndex(request.index)) { throw new ...
private void validate(Request request, ClusterState state) throws ElasticSearchException { if (state.routingTable().hasIndex(request.index)) { throw new IndexAlreadyExistsException(new Index(request.index)); } if (state.metaData().hasIndex(request.index)) { throw new ...
@Test public void testSimpleFacets() throws Exception { SearchSourceBuilder sourceBuilder = searchSource() .query(termQuery("multi", "test")) .from(0).size(20).explain(true) .facets(facets().facet("all", termQuery("multi", "test")).facet("test1", termQuery("na...
@Test public void testSimpleFacets() throws Exception { SearchSourceBuilder sourceBuilder = searchSource() .query(termQuery("multi", "test")) .from(0).size(20).explain(true) .facets(facets().facet("all", termQuery("multi", "test"), true).facet("test1", termQue...
public TextBounds setWrappedText (CharSequence str, float x, float y, float wrapWidth, HAlignment alignment) { BitmapFont font = this.font; int length = str.length(); reset(length); y += font.data.ascent; float down = font.data.down; if (wrapWidth <= 0) wrapWidth = Integer.MAX_VALUE; float maxWidth = ...
public TextBounds setWrappedText (CharSequence str, float x, float y, float wrapWidth, HAlignment alignment) { BitmapFont font = this.font; int length = str.length(); reset(length); y += font.data.ascent; float down = font.data.down; if (wrapWidth <= 0) wrapWidth = Integer.MAX_VALUE; float maxWidth = ...
public static void toChildCoordinates (Actor child, float x, float y, Vector2 out) { if (child.rotation == 0) { if (child.scaleX == 1 && child.scaleY == 1) { out.x = x - child.x; out.y = y - child.y; } else { if (child.originX == 0 && child.originY == 0) { out.x = (x - child.x) / child.scaleX;...
public static void toChildCoordinates (Actor child, float x, float y, Vector2 out) { if (child.rotation == 0) { if (child.scaleX == 1 && child.scaleY == 1) { out.x = x - child.x; out.y = y - child.y; } else { if (child.originX == 0 && child.originY == 0) { out.x = (x - child.x) / child.scaleX;...
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case id.open_gist: openGist(); return true; case id.random_gist: randomGist(); return true; case id.create_gist: startActivityForResult(new In...
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case id.open_gist: openGist(); return true; case id.random_gist: randomGist(); return true; case id.create_gist: startActivityForResult(new In...
@BeforeClass public void setupServer() { node = nodeBuilder().local(true).node(); }
@BeforeClass public void setupServer() { node = nodeBuilder().local(true).settings(settingsBuilder().put("gateway.type", "none")).node(); }
public void singleValueField_WithExtendedBounds() throws Exception { String pattern = "yyyy-MM-dd"; // we're testing on days, so the base must be rounded to a day int interval = randomIntBetween(1, 2); // in days long intervalMillis = interval * 24 * 60 * 60 * 1000; DateTime...
public void singleValueField_WithExtendedBounds() throws Exception { String pattern = "yyyy-MM-dd"; // we're testing on days, so the base must be rounded to a day int interval = randomIntBetween(1, 2); // in days long intervalMillis = interval * 24 * 60 * 60 * 1000; DateTime...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); XContentParser.Token token; boolean cache = false; // no need to cache it by default, changes a lot? CacheKeyFilter.Key cacheKey = null; ...
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); XContentParser.Token token; boolean cache = false; // no need to cache it by default, changes a lot? CacheKeyFilter.Key cacheKey = null; ...
public ScoreFunction parse(QueryParseContext parseContext, XContentParser parser) throws IOException, QueryParsingException { String script = null; String scriptLang = null; Map<String, Object> vars = null; ScriptService.ScriptType scriptType = null; String currentFieldName ...
public ScoreFunction parse(QueryParseContext parseContext, XContentParser parser) throws IOException, QueryParsingException { String script = null; String scriptLang = null; Map<String, Object> vars = null; ScriptService.ScriptType scriptType = null; String currentFieldName ...
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String field = null; String[] fieldsNames = null; String script = null; String scriptLang = null; ScriptService.ScriptType scriptType = null; Map<String, O...
public FacetExecutor parse(String facetName, XContentParser parser, SearchContext context) throws IOException { String field = null; String[] fieldsNames = null; String script = null; String scriptLang = null; ScriptService.ScriptType scriptType = null; Map<String, O...
public void parse(XContentParser parser, SearchContext context) throws Exception { XContentParser.Token token; String currentFieldName = null; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { ...
public void parse(XContentParser parser, SearchContext context) throws Exception { XContentParser.Token token; String currentFieldName = null; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { ...
public void testMatchQueryNumeric() throws Exception { createIndex("test"); ensureGreen();
public void testMatchQueryNumeric() throws Exception { assertAcked(prepareCreate("test").addMapping("type1", "long", "type=long", "double", "type=double")); ensureGreen();
public void renderTileLayer (TiledMapTileLayer layer) { final float color = Color.toFloatBits(1, 1, 1, layer.getOpacity()); final int layerWidth = layer.getWidth(); final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer....
public void renderTileLayer (TiledMapTileLayer layer) { final float color = Color.toFloatBits(1, 1, 1, layer.getOpacity()); final int layerWidth = layer.getWidth(); final int layerHeight = layer.getHeight(); final float layerTileWidth = layer.getTileWidth() * unitScale; final float layerTileHeight = layer....
public int getNumMaxVertices() { return byteBuffer.capacity() / attributes.vertexSize; }
public int getNumMaxVertices() { return buffer.capacity(); }
public void run () { initialize(listener, config); } }); } catch (Exception e) { throw new GdxRuntimeException("Creating window failed", e); } } else { initialize(listener, config); } } void initialize (ApplicationListener listener, JoglApplicationConfiguration config) { JoglNa...
public void run () { initialize(listener, config); } }); } catch (Exception e) { throw new GdxRuntimeException("Creating window failed", e); } } else { initialize(listener, config); } } void initialize (ApplicationListener listener, JoglApplicationConfiguration config) { JoglNa...
public IndexFieldData<?> build(Index index, Settings indexSettings, FieldMapper<?> mapper, IndexFieldDataCache cache, CircuitBreakerService breakerService, MapperService mapperService) { // Ignore Circuit Breaker final FieldMapper.Names fieldNames =...
public IndexFieldData<?> build(Index index, Settings indexSettings, FieldMapper<?> mapper, IndexFieldDataCache cache, CircuitBreakerService breakerService, MapperService mapperService) { // Ignore Circuit Breaker final FieldMapper.Names fieldNames =...
private <T> T failIfFieldMappingNotFound(String name, T fieldMapping) { if (allowUnmappedFields) { return fieldMapping; } else { Version indexCreatedVersion = indexQueryParser.getIndexCreatedVersion(); if (fieldMapping == null && indexCreatedVersion.onOrAfter(Vers...
private <T> T failIfFieldMappingNotFound(String name, T fieldMapping) { if (allowUnmappedFields) { return fieldMapping; } else { Version indexCreatedVersion = indexQueryParser.getIndexCreatedVersion(); if (fieldMapping == null && indexCreatedVersion.onOrAfter(Vers...
protected Settings nodeSettings(int nodeOrdinal) { return ImmutableSettings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(AssertingLocalTransport.ASSERTING_TRANSPORT_MIN_VERSION_KEY, Version.V_1_4_0).build(); }
protected Settings nodeSettings(int nodeOrdinal) { return ImmutableSettings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(AssertingLocalTransport.ASSERTING_TRANSPORT_MIN_VERSION_KEY, Version.V_1_4_0_Beta).build(); }
@Override public Float value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return Float.NaN; } return Numbers.bytesToFloat(value); }
@Override public Float value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return null; } return Numbers.bytesToFloat(value); }
@Override public Long value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return Long.MIN_VALUE; } return Numbers.bytesToLong(value); }
@Override public Long value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return null; } return Numbers.bytesToLong(value); }
@Override public Double value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return Double.NaN; } return Numbers.bytesToDouble(value); }
@Override public Double value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return null; } return Numbers.bytesToDouble(value); }
@Override public Integer value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return Integer.MIN_VALUE; } return Numbers.bytesToInt(value); }
@Override public Integer value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return null; } return Numbers.bytesToInt(value); }
@Override public Short value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return Short.MIN_VALUE; } return Numbers.bytesToShort(value); }
@Override public Short value(Fieldable field) { byte[] value = field.getBinaryValue(); if (value == null) { return null; } return Numbers.bytesToShort(value); }
package org.elasticsearch.index; /* * 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, Ver...
package org.elasticsearch.index; /* * 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, Ver...
import org.elasticsearch.index.CloseableIndexComponent; /* * 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.CloseableIndexComponent; /* * 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 ...
protected ShardRefreshResponse shardOperation(ShardRefreshRequest request) throws ElasticSearchException { IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId()); indexShard.refresh(new Engine.Refresh().force(request.force())); logger.debug("{} ...
protected ShardRefreshResponse shardOperation(ShardRefreshRequest request) throws ElasticSearchException { IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId()); indexShard.refresh(new Engine.Refresh().force(request.force())); logger.trace("{} ...
public JsonBuilder mapping() throws IOException { return binaryJsonBuilder().startObject().startObject("type1") .startObject("allField").field("store", "yes").field("termVector", "with_positions_offsets").endObject() .endObject().endObject(); }
public JsonBuilder mapping() throws IOException { return binaryJsonBuilder().startObject().startObject("type1") .startObject("_all").field("store", "yes").field("termVector", "with_positions_offsets").endObject() .endObject().endObject(); }
public void updateSettings(final Settings pSettings, final String[] indices, final Listener listener) { ImmutableSettings.Builder updatedSettingsBuilder = ImmutableSettings.settingsBuilder(); for (Map.Entry<String, String> entry : pSettings.getAsMap().entrySet()) { if (entry.getKey().equ...
public void updateSettings(final Settings pSettings, final String[] indices, final Listener listener) { ImmutableSettings.Builder updatedSettingsBuilder = ImmutableSettings.settingsBuilder(); for (Map.Entry<String, String> entry : pSettings.getAsMap().entrySet()) { if (entry.getKey().equ...
private void loadProperties(MapProperties properties, Element element) { if (element.getName().equals("properties")) { for (Element property : element.getChildrenByName("property")) { String name = property.getAttribute("name", null); String value = property.getAttribute(name, null); if (value == null...
private void loadProperties(MapProperties properties, Element element) { if (element.getName().equals("properties")) { for (Element property : element.getChildrenByName("property")) { String name = property.getAttribute("name", null); String value = property.getAttribute("value", null); if (value == n...