buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
@Override public void close() throws ElasticSearchException {
cache.clear();
}
| @Override public void close() throws ElasticSearchException {
clear();
}
|
public String render(boolean withHeaders) {
StringBuilder out = new StringBuilder();
for (byte i = 0; i < height; i++) {
StringBuilder row = new StringBuilder();
for (Column col : cols) {
Cell cell = col.getCell(i);
boolean headerRowWhenNotWant... | public String render(boolean withHeaders) {
StringBuilder out = new StringBuilder();
for (byte i = 0; i < height; i++) {
StringBuilder row = new StringBuilder();
for (Column col : cols) {
Cell cell = col.getCell(i);
boolean headerRowWhenNotWant... |
private void load () {
try {
tiles = Gdx.graphics.newTexture( Gdx.files.getFileHandle("data/tiles-3.png", FileType.Internal),
TextureFilter.Nearest, TextureFilter.Nearest,
TextureWrap.ClampToEdge, TextureWrap.ClampToEdge );
TextureAtlas atlas = new TextureAtlas(tiles);
for( ... | private void load () {
try {
tiles = Gdx.graphics.newTexture( Gdx.files.getFileHandle("data/tiles-3.png", FileType.Internal),
TextureFilter.MipMap, TextureFilter.Nearest,
TextureWrap.ClampToEdge, TextureWrap.ClampToEdge );
TextureAtlas atlas = new TextureAtlas(tiles);
for( in... |
private static File resolveFile(String optionalPathPrefix, String path, String optionalFileSuffix) throws FileNotFoundException {
//try within classpath with and without file suffix (as it could be a single test suite)
URL resource = findResource(path, optionalFileSuffix);
if (resource == nu... | private static File resolveFile(String optionalPathPrefix, String path, String optionalFileSuffix) throws FileNotFoundException {
//try within classpath with and without file suffix (as it could be a single test suite)
URL resource = findResource(path, optionalFileSuffix);
if (resource == nu... |
package org.elasticsearch.common.component;
/*
* 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 L... | package org.elasticsearch.common.component;
/*
* 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 L... |
package org.elasticsearch.common.component;
/*
* 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 L... | package org.elasticsearch.common.component;
/*
* 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 L... |
package org.elasticsearch.common.component;
/*
* 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 L... | package org.elasticsearch.common.component;
/*
* 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 L... |
package org.elasticsearch.common.component;
/*
* 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 L... | package org.elasticsearch.common.component;
/*
* 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 L... |
package org.elasticsearch.common.logging;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache Lic... | package org.elasticsearch.common.logging;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache Lic... |
package org.elasticsearch.common.lucene.search.function;
/*
* 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... | package org.elasticsearch.common.lucene.search.function;
/*
* 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... |
package org.elasticsearch.common.lucene.versioned;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | package org.elasticsearch.common.lucene.versioned;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
package org.elasticsearch.common.settings;
/*
* 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 Li... | package org.elasticsearch.common.settings;
/*
* 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 Li... |
package org.elasticsearch.common.settings.loader;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Ap... | package org.elasticsearch.common.settings.loader;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Ap... |
package org.elasticsearch.common.timer;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache Licen... | package org.elasticsearch.common.timer;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache Licen... |
package org.elasticsearch.common.timer;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache Licen... | package org.elasticsearch.common.timer;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache Licen... |
package org.elasticsearch.common.timer;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache Licen... | package org.elasticsearch.common.timer;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache Licen... |
package org.elasticsearch.common.transport;
/*
* 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 L... | package org.elasticsearch.common.transport;
/*
* 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 L... |
package org.elasticsearch.common.xcontent;
/*
* 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 Li... | package org.elasticsearch.common.xcontent;
/*
* 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 Li... |
package org.elasticsearch.common.xcontent;
/*
* 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 Li... | package org.elasticsearch.common.xcontent;
/*
* 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 Li... |
import org.elasticsearch.common.component.LifecycleComponent;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you ... | import org.elasticsearch.common.component.LifecycleComponent;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you ... |
import org.elasticsearch.common.inject.BindingAnnotation;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you unde... | import org.elasticsearch.common.inject.BindingAnnotation;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you unde... |
import org.elasticsearch.common.inject.Provider;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apa... | import org.elasticsearch.common.inject.Provider;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apa... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.inject.BindingAnnotation;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you unde... | import org.elasticsearch.common.inject.BindingAnnotation;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you unde... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.xcontent.ToXContent;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the... | import org.elasticsearch.common.xcontent.ToXContent;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.inject.BindingAnnotation;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you unde... | import org.elasticsearch.common.inject.BindingAnnotation;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you unde... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
import org.elasticsearch.common.component.LifecycleComponent;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you ... | import org.elasticsearch.common.component.LifecycleComponent;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you ... |
import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... | import org.elasticsearch.common.settings.Settings;
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the A... |
public AllocationDeciders(Settings settings, NodeSettingsService nodeSettingsService) {
this(settings, ImmutableSet.<AllocationDecider>builder()
.add(new SameShardAllocationDecider(settings))
.add(new FilterAllocationDecider(settings, nodeSettingsService))
.ad... | public AllocationDeciders(Settings settings, NodeSettingsService nodeSettingsService) {
this(settings, ImmutableSet.<AllocationDecider>builder()
.add(new SameShardAllocationDecider(settings))
.add(new FilterAllocationDecider(settings, nodeSettingsService))
.ad... |
@Test public void multipleNodesShutdownNonMasterNodes() throws Exception {
logger.info("--> cleaning nodes");
buildNode("node1", settingsBuilder().put("gateway.type", "local"));
buildNode("node2", settingsBuilder().put("gateway.type", "local"));
buildNode("node3", settingsBuilder().p... | @Test public void multipleNodesShutdownNonMasterNodes() throws Exception {
logger.info("--> cleaning nodes");
buildNode("node1", settingsBuilder().put("gateway.type", "local"));
buildNode("node2", settingsBuilder().put("gateway.type", "local"));
buildNode("node3", settingsBuilder().p... |
public EsThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) {
super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, EsAbortPolicy.INSTANCE);
}
| public EsThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) {
super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, new EsAbortPolicy());
}
|
public static void main (String[] args) throws Exception {
// generate C/C++ code
new NativeCodeGenerator().generate("src", "bin", "jni");
// Flags to accomodate SWIG generated code
String cppFlags = "";
// SWIG doesn't emit strict aliasing compliant code
cppFlags += " -fno-strict-aliasing";
// SWIG di... | public static void main (String[] args) throws Exception {
// generate C/C++ code
new NativeCodeGenerator().generate("src", "bin", "jni");
// Flags to accomodate SWIG generated code
String cppFlags = "";
// SWIG doesn't emit strict aliasing compliant code
cppFlags += " -fno-strict-aliasing";
// SWIG di... |
public void draw (SpriteBatch batch, float parentAlpha) {
BitmapFont font = style.font;
Drawable selectedDrawable = style.selection;
Color fontColorSelected = style.fontColorSelected;
Color fontColorUnselected = style.fontColorUnselected;
Color color = getColor();
batch.setColor(color.r, color.g, color.b,... | public void draw (SpriteBatch batch, float parentAlpha) {
BitmapFont font = style.font;
Drawable selectedDrawable = style.selection;
Color fontColorSelected = style.fontColorSelected;
Color fontColorUnselected = style.fontColorUnselected;
Color color = getColor();
batch.setColor(color.r, color.g, color.b,... |
@Override protected ShardStatus shardOperation(IndexShardStatusRequest request) throws ElasticSearchException {
InternalIndexService indexService = (InternalIndexService) indicesService.indexServiceSafe(request.index());
InternalIndexShard indexShard = (InternalIndexShard) indexService.shardSafe(req... | @Override protected ShardStatus shardOperation(IndexShardStatusRequest request) throws ElasticSearchException {
InternalIndexService indexService = (InternalIndexService) indicesService.indexServiceSafe(request.index());
InternalIndexShard indexShard = (InternalIndexShard) indexService.shardSafe(req... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = Queries.MATCH_ALL_QUERY;
Filter filter = null;
boolean filterFound = false;
float boost = 1.0f;
boolean cache =... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = Queries.MATCH_ALL_QUERY;
Filter filter = null;
boolean filterFound = false;
float boost = 1.0f;
boolean cache =... |
protected ViewHoldingListAdapter<Gist> adapterFor(List<Gist> items) {
return new ViewHoldingListAdapter<Gist>(items, viewInflatorFor(getActivity(), layout.gist_list_item),
reflectiveFactoryFor(GistViewHolder.class, GistViewHolder.computeMaxDigits(items), avatarHelper));
}
} | protected ViewHoldingListAdapter<Gist> adapterFor(List<Gist> items) {
return new ViewHoldingListAdapter<Gist>(items, viewInflatorFor(getActivity(), layout.gist_list_item),
reflectiveFactoryFor(GistViewHolder.class, idWidth, avatarHelper));
}
} |
protected ViewHoldingListAdapter<Gist> adapterFor(List<Gist> items) {
return new ViewHoldingListAdapter<Gist>(items, viewInflatorFor(getActivity(), layout.gist_list_item),
reflectiveFactoryFor(GistViewHolder.class, GistViewHolder.computeMaxDigits(items), avatarHelper));
}
| protected ViewHoldingListAdapter<Gist> adapterFor(List<Gist> items) {
return new ViewHoldingListAdapter<Gist>(items, viewInflatorFor(getActivity(), layout.gist_list_item),
reflectiveFactoryFor(GistViewHolder.class, idWidth, avatarHelper));
}
|
private Repository getRepository(final EventRepository repo,
final User actor) {
if (repo == null)
return null;
String id = repo.getName();
int slash = id.indexOf('/');
if (slash == -1 || slash + 1 >= id.length())
return null;
Repository ... | private Repository getRepository(final EventRepository repo,
final User actor) {
if (repo == null)
return null;
String id = repo.getName();
int slash = id.indexOf('/');
if (slash == -1 || slash + 1 >= id.length())
return null;
Repository ... |
public String toString() {
return filter.toString();
}
}
Key cacheKey();
}
| public String toString() {
return filter.toString();
}
}
Object cacheKey();
}
|
public Filter termsFilter(List values, @Nullable QueryParseContext context) {
if (context == null) {
return super.termFilter(values, context);
}
List<BytesRef> bValues = new ArrayList<BytesRef>(values.size());
for (Object value : values) {
BytesRef bValue = By... | public Filter termsFilter(List values, @Nullable QueryParseContext context) {
if (context == null) {
return super.termsFilter(values, context);
}
List<BytesRef> bValues = new ArrayList<BytesRef>(values.size());
for (Object value : values) {
BytesRef bValue = B... |
* @Test public void testMethod() {}
* }
* </pre>
* <p/>
* Note, the {@link ElasticsearchIntegrationTest} uses randomized settings on a cluster and index level. For instance
* each test might use different directory implementation for each test or will return a random client to one of the
* nodes in the cluster f... | * @Test public void testMethod() {}
* }
* </pre>
* <p/>
* Note, the {@link ElasticsearchIntegrationTest} uses randomized settings on a cluster and index level. For instance
* each test might use different directory implementation for each test or will return a random client to one of the
* nodes in the cluster f... |
public LwjglPreferences (String name) {
this(new LwjglFileHandle(new File(name), FileType.External));
}
| public LwjglPreferences (String name) {
this(new LwjglFileHandle(new File(".prefs/" + name), FileType.External));
}
|
public void update(float deltaTime) {
bob.update(deltaTime);
if(bob.state == Bob.DEAD) bob = new Bob(this, activeDispenser.bounds.x, activeDispenser.bounds.y);
cube.update(deltaTime);
if(cube.state == Cube.DEAD) cube = new Cube(this, activeDispenser.bounds.x, activeDispenser.bounds.y);
for(int i = 0; i < dis... | public void update(float deltaTime) {
bob.update(deltaTime);
if(bob.state == Bob.DEAD) bob = new Bob(this, activeDispenser.bounds.x, activeDispenser.bounds.y);
cube.update(deltaTime);
if(cube.state == Cube.DEAD) cube = new Cube(this, bob.bounds.x, bob.bounds.y);
for(int i = 0; i < dispensers.size; i++) {
... |
private String processLine(String s, BulkRequestBuilder bulk) {
Map<String, Object> map = null;
try {
map = XContentFactory.xContent(XContentType.JSON).createParser(s).mapAndClose();
} catch (IOException e) {
logger.warn("failed to parse {}", e, s);
return... | private String processLine(String s, BulkRequestBuilder bulk) {
Map<String, Object> map = null;
try {
map = XContentFactory.xContent(XContentType.JSON).createParser(s).mapAndClose();
} catch (IOException e) {
logger.warn("failed to parse {}", e, s);
return... |
public static Uid createUid(String uid) {
int delimiterIndex = uid.lastIndexOf(DELIMITER);
return new Uid(uid.substring(0, delimiterIndex), uid.substring(delimiterIndex + 1));
}
| public static Uid createUid(String uid) {
int delimiterIndex = uid.indexOf(DELIMITER); // type is not allowed to have # in it..., ids can
return new Uid(uid.substring(0, delimiterIndex), uid.substring(delimiterIndex + 1));
}
|
@Override public Facet facet() {
return new InternalRangeDistanceFacet(facetName, keyFieldName, valueFieldName, entries);
}
| @Override public Facet facet() {
return new InternalRangeFacet(facetName, keyFieldName, valueFieldName, entries);
}
|
@Override public Facet facet() {
return new InternalRangeDistanceFacet(facetName, fieldName, fieldName, entries);
}
| @Override public Facet facet() {
return new InternalRangeFacet(facetName, fieldName, fieldName, entries);
}
|
@Override public Facet facet() {
return new InternalRangeDistanceFacet(facetName, "_na", "_na", entries);
}
| @Override public Facet facet() {
return new InternalRangeFacet(facetName, "_na", "_na", entries);
}
|
public void messageReceived(final RecoveryFileChunkRequest request, TransportChannel channel) throws Exception {
RecoveryStatus onGoingRecovery = onGoingRecoveries.get(request.recoveryId());
if (onGoingRecovery == null) {
// shard is getting closed on us
t... | public void messageReceived(final RecoveryFileChunkRequest request, TransportChannel channel) throws Exception {
RecoveryStatus onGoingRecovery = onGoingRecoveries.get(request.recoveryId());
if (onGoingRecovery == null) {
// shard is getting closed on us
t... |
private void writePackEntry (Image image) throws IOException {
String imageName = image.name;
imageName = imageName.replace("\\", "/");
System.out.println("Packing... " + imageName);
Matcher matcher = indexPattern.matcher(imageName);
int index = -1;
if (matcher.matches()) index = Integer.parseInt(... | private void writePackEntry (Image image) throws IOException {
String imageName = image.name;
imageName = imageName.replace("\\", "/");
System.out.println("Packing... " + imageName);
Matcher matcher = indexPattern.matcher(imageName);
int index = -1;
if (matcher.matches()) index = Integer.parseInt(... |
public void writeValue (Object value, Class knownType, Class elementType) {
try {
if (value == null) {
writer.value(null);
return;
}
if ((knownType != null && knownType.isPrimitive()) || knownType == String.class || knownType == Integer.class
|| knownType == Boolean.class || knownType == Float.... | public void writeValue (Object value, Class knownType, Class elementType) {
try {
if (value == null) {
writer.value(null);
return;
}
if ((knownType != null && knownType.isPrimitive()) || knownType == String.class || knownType == Integer.class
|| knownType == Boolean.class || knownType == Float.... |
public static boolean intersectRaySphere (Ray ray, Vector3 center, float radius, Vector3 intersection) {
dir.set(ray.direction).nor();
start.set(ray.origin);
float b = 2 * (dir.dot(start.tmp().sub(center)));
float c = start.dist2(center) - radius * radius;
float disc = b * b - 4 * c;
if (disc < 0) return f... | public static boolean intersectRaySphere (Ray ray, Vector3 center, float radius, Vector3 intersection) {
dir.set(ray.direction).nor();
start.set(ray.origin);
float b = 2 * (dir.dot(start.tmp().sub(center)));
float c = start.dst2(center) - radius * radius;
float disc = b * b - 4 * c;
if (disc < 0) return fa... |
public static boolean isGlobalStateEquals(MetaData metaData1, MetaData metaData2) {
if (!metaData1.persistentSettings.equals(metaData2.persistentSettings)) {
return false;
}
if (!metaData1.templates.equals(metaData2.templates())) {
return false;
}
// C... | public static boolean isGlobalStateEquals(MetaData metaData1, MetaData metaData2) {
if (!metaData1.persistentSettings.equals(metaData2.persistentSettings)) {
return false;
}
if (!metaData1.templates.equals(metaData2.templates())) {
return false;
}
// C... |
public ConnectTransportException(DiscoveryNode node, String msg, String action, Throwable cause) {
super(node.name(), node.address(), action, msg, cause);
this.node = node;
}
| public ConnectTransportException(DiscoveryNode node, String msg, String action, Throwable cause) {
super(node == null ? null : node.name(), node == null ? null : node.address(), action, msg, cause);
this.node = node;
}
|
public BitmapFont loadSync (AssetManager manager, String fileName, FileHandle file, BitmapFontParameter parameter) {
if (parameter != null && parameter.atlasName != null) {
TextureAtlas atlas = manager.get(parameter.atlasName, TextureAtlas.class);
String name = file.sibling(data.imagePaths[0]).nameWithoutExten... | public BitmapFont loadSync (AssetManager manager, String fileName, FileHandle file, BitmapFontParameter parameter) {
if (parameter != null && parameter.atlasName != null) {
TextureAtlas atlas = manager.get(parameter.atlasName, TextureAtlas.class);
String name = file.sibling(data.imagePaths[0]).nameWithoutExten... |
public static SettingsLoader loaderFromResource(String resourceName) {
if (resourceName.endsWith(".json")) {
return new JsonSettingsLoader();
} else if (resourceName.endsWith(".yml")) {
return new YamlSettingsLoader();
} else if (resourceName.endsWith(".properties")) ... | public static SettingsLoader loaderFromResource(String resourceName) {
if (resourceName.endsWith(".json")) {
return new JsonSettingsLoader();
} else if (resourceName.endsWith(".yml") || resourceName.endsWith(".yaml")) {
return new YamlSettingsLoader();
} else if (reso... |
public ByteBufferFile(ByteBufferDirectory dir) {
this.dir = dir;
}
long lastModified() {
return lastModified;
}
void lastModified(long lastModified) {
this.lastModified = lastModified;
}
long length() {
return length;
}
void length(long length) {
... | public ByteBufferFile(ByteBufferDirectory dir) {
this.dir = dir;
}
long lastModified() {
return lastModified;
}
void lastModified(long lastModified) {
this.lastModified = lastModified;
}
long length() {
return length;
}
void length(long length) {
... |
public ByteBufferIndexInput(ByteBufferDirectory dir, ByteBufferFile file) throws IOException {
this.file = file;
this.bufferSize = dir.bufferSizeInBytes();
this.length = file.length();
switchCurrentBuffer(true);
}
| public ByteBufferIndexInput(ByteBufferDirectory dir, ByteBufferFile file) throws IOException {
this.file = file;
this.bufferSize = dir.byteBufferCache.bufferSizeInBytes();
this.length = file.length();
switchCurrentBuffer(true);
}
|
public void setVertices(float[] vertices, int offset, int count)
{
if( useFixedPoint )
throw new IllegalArgumentException( "can't set float vertices for fixed point mesh" );
int result = BufferUtils.copy( vertices, this.vertices, count, offset );
this.verticesFloat.limit(this.vertices.limit()>>2);
t... | public void setVertices(float[] vertices, int offset, int count)
{
if( useFixedPoint )
throw new IllegalArgumentException( "can't set float vertices for fixed point mesh" );
BufferUtils.copy( vertices, this.vertices, count, offset );
this.verticesFloat.limit(this.vertices.limit()>>2);
this.verticesF... |
@Override protected void doStop() throws ElasticSearchException {
pingService.stop();
masterFD.stop("zen disco stop");
nodesFD.stop();
initialStateSent.set(false);
if (sendLeaveRequest) {
if (!master) {
try {
membership.sendLeav... | @Override protected void doStop() throws ElasticSearchException {
pingService.stop();
masterFD.stop("zen disco stop");
nodesFD.stop();
initialStateSent.set(false);
if (sendLeaveRequest) {
if (!master && latestDiscoNodes.masterNode() != null) {
try ... |
public SpriteBatch (int size) {
this.mesh = new Mesh(false, false, size * 4, size * 6, new VertexAttribute(Usage.Position, 2, "a_position"),
new VertexAttribute(Usage.ColorPacked, 4, "a_color"), new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoords"));
projectionMatrix.setToOrtho2D(0, 0, Gdx.graphics.ge... | public SpriteBatch (int size) {
this.mesh = new Mesh(false, size * 4, size * 6, new VertexAttribute(Usage.Position, 2, "a_position"),
new VertexAttribute(Usage.ColorPacked, 4, "a_color"), new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoords"));
projectionMatrix.setToOrtho2D(0, 0, Gdx.graphics.getWidth(... |
public MD5Renderer (MD5Model model, boolean useJni) {
int maxVertices = 0;
int maxIndices = 0;
this.model = model;
this.useJni = useJni;
this.indices = new short[model.meshes.length][];
this.vertices = new float[model.meshes.length][];
for (int i = 0; i < model.meshes.length; i++) {
if (maxVertices ... | public MD5Renderer (MD5Model model, boolean useJni) {
int maxVertices = 0;
int maxIndices = 0;
this.model = model;
this.useJni = useJni;
this.indices = new short[model.meshes.length][];
this.vertices = new float[model.meshes.length][];
for (int i = 0; i < model.meshes.length; i++) {
if (maxVertices ... |
@Override public void surfaceCreated () {
if (mesh == null) {
Gdx.input.addInputListener(this);
mesh = ModelLoader.loadObj(Gdx.files.readFile("data/cube.obj", FileType.Internal), true);
texture = Gdx.graphics.newTexture(Gdx.files.getFileHandle("data/badlogic.jpd", FileType.Internal), TextureFilter.MipMap,
... | @Override public void surfaceCreated () {
if (mesh == null) {
Gdx.input.addInputListener(this);
mesh = ModelLoader.loadObj(Gdx.files.readFile("data/cube.obj", FileType.Internal));
texture = Gdx.graphics.newTexture(Gdx.files.getFileHandle("data/badlogic.jpd", FileType.Internal), TextureFilter.MipMap,
Te... |
@Override public void surfaceCreated () {
if (texture == null) {
Gdx.input.addInputListener(this);
texture = Gdx.graphics.newTexture(Gdx.files.getFileHandle("data/badlogicsmall.jpg", FileType.Internal),
TextureFilter.Linear, TextureFilter.Linear, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
mesh ... | @Override public void surfaceCreated () {
if (texture == null) {
Gdx.input.addInputListener(this);
texture = Gdx.graphics.newTexture(Gdx.files.getFileHandle("data/badlogicsmall.jpg", FileType.Internal),
TextureFilter.Linear, TextureFilter.Linear, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
mesh ... |
@Override public void surfaceCreated () {
if (mesh == null) {
mesh = new Mesh(true, false, 3, 0, new VertexAttribute(Usage.Position, 3, "a_Position"), new VertexAttribute(
Usage.ColorPacked, 4, "a_Color"), new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoords"));
float c1 = Color.toFloatBits(255, 0... | @Override public void surfaceCreated () {
if (mesh == null) {
mesh = new Mesh(true, 3, 0, new VertexAttribute(Usage.Position, 3, "a_Position"), new VertexAttribute(
Usage.ColorPacked, 4, "a_Color"), new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoords"));
float c1 = Color.toFloatBits(255, 0, 0, 25... |
@Override public void surfaceCreated () {
if (mesh == null) {
mesh = new Mesh(true, false, 4, 4, new VertexAttribute(Usage.Position, 2, "a_position"), new VertexAttribute(
Usage.TextureCoordinates, 2, "a_texCoord"));
mesh.setVertices(new float[] {-0.5f, -0.5f, 0, 0, 0.5f, -0.5f, 1, 0, 0.5f, 0.5f, 1, 1, -0.... | @Override public void surfaceCreated () {
if (mesh == null) {
mesh = new Mesh(true, 4, 4, new VertexAttribute(Usage.Position, 2, "a_position"), new VertexAttribute(
Usage.TextureCoordinates, 2, "a_texCoord"));
mesh.setVertices(new float[] {-0.5f, -0.5f, 0, 0, 0.5f, -0.5f, 1, 0, 0.5f, 0.5f, 1, 1, -0.5f, 0.5... |
@Override public void surfaceCreated () {
Pixmap pixmap = Gdx.graphics.newPixmap(256, 256, Format.RGBA8888);
pixmap.setColor(1, 1, 1, 1);
pixmap.fill();
pixmap.setColor(0, 0, 0, 1);
pixmap.drawLine(0, 0, 256, 256);
pixmap.drawLine(256, 0, 0, 256);
tex1 = Gdx.graphics.newUnmanagedTexture(pixmap, TextureFi... | @Override public void surfaceCreated () {
Pixmap pixmap = Gdx.graphics.newPixmap(256, 256, Format.RGBA8888);
pixmap.setColor(1, 1, 1, 1);
pixmap.fill();
pixmap.setColor(0, 0, 0, 1);
pixmap.drawLine(0, 0, 256, 256);
pixmap.drawLine(256, 0, 0, 256);
tex1 = Gdx.graphics.newUnmanagedTexture(pixmap, TextureFi... |
@Override public void surfaceCreated () {
if (shader == null) {
String vertexShader = "attribute vec4 a_position; \n" + "attribute vec4 a_color;\n" + "attribute vec2 a_texCoords;\n"
+ "uniform mat4 u_worldView;\n" + "varying vec4 v_color;" + "varying vec2 v_texCoords;"
+ "void main() \... | @Override public void surfaceCreated () {
if (shader == null) {
String vertexShader = "attribute vec4 a_position; \n" + "attribute vec4 a_color;\n" + "attribute vec2 a_texCoords;\n"
+ "uniform mat4 u_worldView;\n" + "varying vec4 v_color;" + "varying vec2 v_texCoords;"
+ "void main() \... |
@Override public void surfaceCreated () {
if (mesh == null) {
mesh = new Mesh(true, false, 3, 3, new VertexAttribute(Usage.Position, 3, "a_position"), new VertexAttribute(
Usage.ColorPacked, 4, "a_color"), new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoords"));
mesh.setVertices(new float[] {-0.5... | @Override public void surfaceCreated () {
if (mesh == null) {
mesh = new Mesh(true, 3, 3, new VertexAttribute(Usage.Position, 3, "a_position"), new VertexAttribute(
Usage.ColorPacked, 4, "a_color"), new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoords"));
mesh.setVertices(new float[] {-0.5f, -0.5... |
@Override public void surfaceCreated () {
if (mesh == null) {
Gdx.input.addInputListener(this);
mesh = ModelLoader.loadObj(Gdx.files.readFile("data/cube.obj", FileType.Internal), true);
texture = Gdx.graphics.newTexture(Gdx.files.getFileHandle("data/badlogic.jpg", FileType.Internal), TextureFilter.MipMap,
... | @Override public void surfaceCreated () {
if (mesh == null) {
Gdx.input.addInputListener(this);
mesh = ModelLoader.loadObj(Gdx.files.readFile("data/cube.obj", FileType.Internal));
texture = Gdx.graphics.newTexture(Gdx.files.getFileHandle("data/badlogic.jpg", FileType.Internal), TextureFilter.MipMap,
Te... |
@Override public void surfaceCreated () {
if (chunk == null) {
renderer = new ImmediateModeRenderer();
chunk = new TerrainChunk(32, 32, 4);
Random rand = new Random();
int len = chunk.vertices.length;
for (int i = 3; i < len; i += 4)
chunk.vertices[i] = Color.toFloatBits(rand.nextInt(255), rand.... | @Override public void surfaceCreated () {
if (chunk == null) {
renderer = new ImmediateModeRenderer();
chunk = new TerrainChunk(32, 32, 4);
Random rand = new Random();
int len = chunk.vertices.length;
for (int i = 3; i < len; i += 4)
chunk.vertices[i] = Color.toFloatBits(rand.nextInt(255), rand.... |
@Override public void surfaceCreated () {
camera = new OrthographicCamera();
camera.setViewport(480, 320);
camera.getPosition().set(Gdx.graphics.getWidth() / 2, Gdx.graphics.getHeight() / 2, 0);
Pixmap pixmap = Gdx.graphics.newPixmap(Gdx.files.getFileHandle("data/badlogic.jpg", Files.FileType.Internal));
te... | @Override public void surfaceCreated () {
camera = new OrthographicCamera();
camera.setViewport(480, 320);
camera.getPosition().set(Gdx.graphics.getWidth() / 2, Gdx.graphics.getHeight() / 2, 0);
Pixmap pixmap = Gdx.graphics.newPixmap(Gdx.files.getFileHandle("data/badlogic.jpg", Files.FileType.Internal));
te... |
@Override public void surfaceCreated () {
if (!initialized) {
camera = new PerspectiveCamera();
camera.getPosition().set((WIDTH) / 2.0f, (HEIGHT) / 2.0f, WIDTH / 2.0f);
camera.setViewport(Gdx.graphics.getWidth(), Gdx.graphics.getWidth());
camera.setFov(90);
camera.setNear(0.1f);
camera.setFar(1000... | @Override public void surfaceCreated () {
if (!initialized) {
camera = new PerspectiveCamera();
camera.getPosition().set((WIDTH) / 2.0f, (HEIGHT) / 2.0f, WIDTH / 2.0f);
camera.setViewport(Gdx.graphics.getWidth(), Gdx.graphics.getWidth());
camera.setFov(90);
camera.setNear(0.1f);
camera.setFar(1000... |
public void render()
{
GL10 gl = Gdx.graphics.getGL10();
gl.glViewport( 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight() );
gl.glClear( GL10.GL_COLOR_BUFFER_BIT );
if( Gdx.input.isTouched() )
{
Actor actor = stage.hit( Gdx.input.getX(), Gdx.input.getY() );
if( actor != null )
{
if( a... | public void render()
{
GL10 gl = Gdx.graphics.getGL10();
gl.glViewport( 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight() );
gl.glClear( GL10.GL_COLOR_BUFFER_BIT );
if( Gdx.input.isTouched() )
{
Actor actor = stage.hit( Gdx.input.getX(), Gdx.input.getY() );
if( actor != null )
{
if( a... |
public ClearIndicesCacheRequest(String... indices) {
super(indices, null);
// we want to do the refresh in parallel on local shards...
operationThreading(BroadcastOperationThreading.THREAD_PER_SHARD);
}
| public ClearIndicesCacheRequest(String... indices) {
super(indices);
// we want to do the refresh in parallel on local shards...
operationThreading(BroadcastOperationThreading.THREAD_PER_SHARD);
}
|
public FlushRequest(String... indices) {
super(indices, null);
// we want to do the refresh in parallel on local shards...
operationThreading(BroadcastOperationThreading.THREAD_PER_SHARD);
}
| public FlushRequest(String... indices) {
super(indices);
// we want to do the refresh in parallel on local shards...
operationThreading(BroadcastOperationThreading.THREAD_PER_SHARD);
}
|
public OptimizeRequest(String... indices) {
super(indices, null);
// we want to do the optimize in parallel on local shards...
operationThreading(BroadcastOperationThreading.THREAD_PER_SHARD);
}
| public OptimizeRequest(String... indices) {
super(indices);
// we want to do the optimize in parallel on local shards...
operationThreading(BroadcastOperationThreading.THREAD_PER_SHARD);
}
|
public RefreshRequest(String... indices) {
super(indices, null);
// we want to do the refresh in parallel on local shards...
operationThreading(BroadcastOperationThreading.THREAD_PER_SHARD);
}
| public RefreshRequest(String... indices) {
super(indices);
// we want to do the refresh in parallel on local shards...
operationThreading(BroadcastOperationThreading.THREAD_PER_SHARD);
}
|
public IndicesStatusRequest(String... indices) {
super(indices, null);
}
| public IndicesStatusRequest(String... indices) {
super(indices);
}
|
@Override protected GroupShardsIterator shards(BroadcastPingRequest request, ClusterState clusterState) {
return indicesService.searchShards(clusterState, request.indices(), request.queryHint());
}
| @Override protected GroupShardsIterator shards(BroadcastPingRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint());
}
|
@Override protected GroupShardsIterator shards(CountRequest request, ClusterState clusterState) {
return indicesService.searchShards(clusterState, request.indices(), request.queryHint());
}
| @Override protected GroupShardsIterator shards(CountRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint());
}
|
@Override protected GroupShardsIterator shards(IndexDeleteByQueryRequest request) {
return indicesService.indexServiceSafe(request.index()).operationRouting().deleteByQueryShards(clusterService.state());
}
| @Override protected GroupShardsIterator shards(IndexDeleteByQueryRequest request) {
return clusterService.operationRouting().deleteByQueryShards(clusterService.state(), request.index());
}
|
@Override protected ShardsIterator shards(ClusterState clusterState, ShardDeleteByQueryRequest request) {
GroupShardsIterator group = indicesService.indexServiceSafe(request.index()).operationRouting().deleteByQueryShards(clusterService.state());
for (ShardsIterator shards : group) {
if ... | @Override protected ShardsIterator shards(ClusterState clusterState, ShardDeleteByQueryRequest request) {
GroupShardsIterator group = clusterService.operationRouting().deleteByQueryShards(clusterService.state(), request.index());
for (ShardsIterator shards : group) {
if (shards.shardId()... |
@Test public void testSimpleHighlighting() throws Exception {
SearchResponse searchResponse = client.prepareSearch()
.setIndices("test")
.setSearchType(QUERY_THEN_FETCH)
.setQuery(termQuery("_all", "test"))
.setFrom(0).setSize(60)
... | @Test public void testSimpleHighlighting() throws Exception {
SearchResponse searchResponse = client.prepareSearch()
.setIndices("test")
.setSearchType(DFS_QUERY_THEN_FETCH)
.setQuery(termQuery("_all", "test"))
.setFrom(0).setSize(60)
... |
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... |
public void generate(BuildConfig config, BuildTarget ... targets) {
// create all the directories for outputing object files, shared libs and natives jar as well as build scripts.
if(!config.libsDir.exists()) {
if(!config.libsDir.mkdirs()) throw new RuntimeException("Couldn't create directory for shared library... | public void generate(BuildConfig config, BuildTarget ... targets) {
// create all the directories for outputing object files, shared libs and natives jar as well as build scripts.
if(!config.libsDir.exists()) {
if(!config.libsDir.mkdirs()) throw new RuntimeException("Couldn't create directory for shared library... |
public void testRandom() throws Exception {
Directory directory = newDirectory();
final Random r = random();
final IndexWriterConfig iwc = LuceneTestCase.newIndexWriterConfig(r,
LuceneTestCase.TEST_VERSION_CURRENT, new MockAnalyzer(r))
.setMaxBufferedDocs(Inde... | public void testRandom() throws Exception {
Directory directory = newDirectory();
final Random r = random();
final IndexWriterConfig iwc = LuceneTestCase.newIndexWriterConfig(r,
LuceneTestCase.TEST_VERSION_CURRENT, new MockAnalyzer(r))
.setMaxBufferedDocs(Inde... |
public void testRandom() throws Exception {
Directory directory = newDirectory();
final Random r = random();
final IndexWriterConfig iwc = LuceneTestCase.newIndexWriterConfig(r,
LuceneTestCase.TEST_VERSION_CURRENT, new MockAnalyzer(r))
.setMaxBufferedDocs(Inde... | public void testRandom() throws Exception {
Directory directory = newDirectory();
final Random r = random();
final IndexWriterConfig iwc = LuceneTestCase.newIndexWriterConfig(r,
LuceneTestCase.TEST_VERSION_CURRENT, new MockAnalyzer(r))
.setMaxBufferedDocs(Inde... |
public LwjglAppletTest () {
super(new AnimationTest());
}
| public LwjglAppletTest () {
super(new AnimationTest(), false);
}
|
public Pixmap newPixmap(FileHandle file) {
return newPixmap(file.readFile());
}
| public Pixmap newPixmap(FileHandle file) {
return newPixmap(file.read());
}
|
public Pixmap newPixmap (FileHandle file) {
return newPixmap(file.readFile());
}
| public Pixmap newPixmap (FileHandle file) {
return newPixmap(file.read());
}
|
private void openAudioInputStream () throws UnsupportedAudioFileException, IOException {
ain = AudioSystem.getAudioInputStream(new BufferedInputStream(handle.readFile()));
AudioFormat baseFormat = ain.getFormat();
AudioFormat decodedFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, baseFormat.getSampleRa... | private void openAudioInputStream () throws UnsupportedAudioFileException, IOException {
ain = AudioSystem.getAudioInputStream(new BufferedInputStream(handle.read()));
AudioFormat baseFormat = ain.getFormat();
AudioFormat decodedFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, baseFormat.getSampleRate()... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.