buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void create () {
super.create();
instructions = "Tap to toggle view\nLong press to toggle debug mode\nSwipe for next test";
tempManifoldArr = new btManifoldArray();
world.addConstructor("collisionBox", new BulletConstructor(world.getConstructor("box").model));
// Create the entities
final ... | public void create () {
super.create();
instructions = "Tap to toggle view\nLong press to toggle debug mode\nSwipe for next test";
tempManifoldArr = new btManifoldArray();
world.addConstructor("collisionBox", new BulletConstructor(world.getConstructor("box").model));
// Create the entities
final ... |
public synchronized IndexService createIndex(String sIndexName, Settings settings, String localNodeId) throws ElasticSearchException {
if (!lifecycle.started()) {
throw new ElasticSearchIllegalStateException("Can't create an index [" + sIndexName + "] is closed");
}
Index index =... | public synchronized IndexService createIndex(String sIndexName, Settings settings, String localNodeId) throws ElasticSearchException {
if (!lifecycle.started()) {
throw new ElasticSearchIllegalStateException("Can't create an index [" + sIndexName + "], node is closed");
}
Index i... |
@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 main(String[] argv) {
// if(argv.length != 1 && argv.length != 2) {
// System.out.println("KeyframedModelViewer <filename> ?<texture-filename>");
// System.exit(-1);
// }
new JoglApplication(new SkeletonModelViewer("data/robot-mesh.xml", "data/r2skin.jpg"), "SkeletonModel Viewer", 800, 480, ... | public static void main(String[] argv) {
// if(argv.length != 1 && argv.length != 2) {
// System.out.println("KeyframedModelViewer <filename> ?<texture-filename>");
// System.exit(-1);
// }
new JoglApplication(new SkeletonModelViewer("data/robot-mesh.xml", "data/robot.jpg"), "SkeletonModel Viewer", 800, 480, f... |
@Override public void create () {
Texture texture = new Texture(Gdx.files.internal("data/nskingr.jpg"));
Material mat = new Material("mat", new TextureAttribute(texture, 0, "s_tex"));
model = new OgreXmlLoader().load(Gdx.files.internal("data/ninja.mesh.xml"),
Gdx.files.internal("data/ninja.skele... | @Override public void create () {
Texture texture = new Texture(Gdx.files.internal("data/ninja.jpg"));
Material mat = new Material("mat", new TextureAttribute(texture, 0, "s_tex"));
model = new OgreXmlLoader().load(Gdx.files.internal("data/ninja.mesh.xml"),
Gdx.files.internal("data/ninja.skeleto... |
@Test public void testSimpleOperations() {
Translog.Snapshot snapshot = translog.snapshot();
assertThat(snapshot, translogSize(0));
snapshot.release();
translog.add(new Translog.Create("test", "1", new byte[]{1}));
snapshot = translog.snapshot();
assertThat(snapshot,... | @Test public void testSimpleOperations() {
Translog.Snapshot snapshot = translog.snapshot();
assertThat(snapshot, translogSize(0));
snapshot.release();
translog.add(new Translog.Create("test", "1", new byte[]{1}));
snapshot = translog.snapshot();
assertThat(snapshot,... |
public void testSimpleFacetEmptyFacetFilter() throws Exception {
createIndex("test");
ensureGreen();
client().prepareIndex("test", "type1").setSource(jsonBuilder().startObject()
.field("tag", "green")
.endObject()).execute().actionGet();
refresh();
... | public void testSimpleFacetEmptyFacetFilter() throws Exception {
createIndex("test");
ensureGreen();
client().prepareIndex("test", "type1").setSource(jsonBuilder().startObject()
.field("tag", "green")
.endObject()).execute().actionGet();
refresh();
... |
protected ShardOptimizeResponse shardOperation(ShardOptimizeRequest request) throws ElasticsearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.shardId().getIndex()).shardSafe(request.shardId().id());
indexShard.optimize(new Engine.Optimize()
.waitForMerg... | protected ShardOptimizeResponse shardOperation(ShardOptimizeRequest request) throws ElasticsearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.shardId().getIndex()).shardSafe(request.shardId().id());
indexShard.optimize(new Engine.Optimize()
.waitForMerg... |
public void surfaceCreated(Application app)
{
String vertexShader = "attribute vec4 a_position; \n" +
"attribute vec4 a_color;\n" +
"attribute vec2 a_texCoords;\n" +
"uniform mat4 u_worldView;\n" +
"varying vec3 v_color;" +
"varying vec2 v_t... | public void surfaceCreated(Application app)
{
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_t... |
public Cell<T> prefSize (float width, float height) {
prefSize(new Fixed(width));
return this;
}
| public Cell<T> prefSize (float width, float height) {
prefSize(new Fixed(width), new Fixed(height));
return this;
}
|
public String concreteSingleIndex(String indexOrAlias) throws IndexMissingException, ElasticsearchIllegalArgumentException {
String[] indices = concreteIndices(IndicesOptions.strictSingleIndexNoExpand(), indexOrAlias);
assert indices.length == 1 : "expected an exception to be thrown otherwise";
... | public String concreteSingleIndex(String indexOrAlias) throws IndexMissingException, ElasticsearchIllegalArgumentException {
String[] indices = concreteIndices(IndicesOptions.strictSingleIndexNoExpandForbidClosed(), indexOrAlias);
assert indices.length == 1 : "expected an exception to be thrown othe... |
public InputStream read () {
if (type == FileType.Classpath || (type == FileType.Internal && !file().exists())
|| (type == FileType.Local && !file().exists())) {
InputStream input = FileHandle.class.getResourceAsStream("/" + file.getPath().replace('\\', '/'));
if (input == null) throw new GdxRuntimeExceptio... | public InputStream read () {
if (type == FileType.Classpath || (type == FileType.Internal && !file().exists())
|| (type == FileType.Local && !file().exists())) {
InputStream input = FileHandle.class.getResourceAsStream("/" + file().getPath().replace('\\', '/'));
if (input == null) throw new GdxRuntimeExcept... |
public String mapLibraryName (String libraryName) {
if (isWindows) return libraryName + (is64Bit ? "64.dll" : ".dll");
if (isLinux) return "lib" + libraryName + (isARM ? "arm" + abi : "") + (is64Bit ? "64.so" : ".so");
if (isMac) return "lib" + libraryName + (is64Bit ? "64.dylib" : ".dylib");
return libraryNam... | public String mapLibraryName (String libraryName) {
if (isWindows) return libraryName + (is64Bit ? "64.dll" : ".dll");
if (isLinux) return "lib" + libraryName + (isARM ? "arm" + abi : "") + (is64Bit ? "64.so" : ".so");
if (isMac) return "lib" + libraryName + ".dylib";
return libraryName;
}
|
public void choose (T item) {
if (item == null) throw new IllegalArgumentException("item cannot be null.");
if (isDisabled) return;
if (selected.size > 0 && rangeSelect && multiple
&& (Gdx.input.isKeyPressed(Keys.SHIFT_LEFT) || Gdx.input.isKeyPressed(Keys.SHIFT_RIGHT))) {
int low = items.indexOf(getLastSel... | public void choose (T item) {
if (item == null) throw new IllegalArgumentException("item cannot be null.");
if (isDisabled) return;
if (selected.size > 0 && rangeSelect && multiple
&& (Gdx.input.isKeyPressed(Keys.SHIFT_LEFT) || Gdx.input.isKeyPressed(Keys.SHIFT_RIGHT))) {
int low = items.indexOf(getLastSel... |
private Vector3 calculateDirection (float angle) {
Matrix4 transform = new Matrix4();
Vector3 dir = new Vector3(-1, 0, 1).nor();
float rotAngle = (float)Math.toDegrees(Math.asin(Math.tan(Math.toRadians(angle))));
transform.setToRotation(new Vector3(1, 0, 1).nor(), angle);
dir.mul(transform).nor();
return d... | private Vector3 calculateDirection (float angle) {
Matrix4 transform = new Matrix4();
Vector3 dir = new Vector3(-1, 0, 1).nor();
float rotAngle = (float)Math.toDegrees(Math.asin(Math.tan(Math.toRadians(angle))));
transform.setToRotation(new Vector3(1, 0, 1).nor(), rotAngle);
dir.mul(transform).nor();
retur... |
@Inject public FsGateway(Settings settings, ClusterService clusterService,
Environment environment, ClusterName clusterName, ThreadPool threadPool) throws IOException {
super(settings, clusterService);
File gatewayFile;
String location = componentSettings.get("l... | @Inject public FsGateway(Settings settings, ClusterService clusterService,
Environment environment, ClusterName clusterName, ThreadPool threadPool) throws IOException {
super(settings, clusterService);
File gatewayFile;
String location = componentSettings.get("l... |
public void onDialogResult(int requestCode, int resultCode, Bundle arguments) {
if (RESULT_OK != resultCode)
return;
switch (requestCode) {
case ISSUE_MILESTONE_UPDATE:
milestoneTask.edit(arguments.getString(SingleChoiceDialogFragment.ARG_SELECTED));
brea... | public void onDialogResult(int requestCode, int resultCode, Bundle arguments) {
if (RESULT_OK != resultCode)
return;
switch (requestCode) {
case ISSUE_MILESTONE_UPDATE:
milestoneTask.edit(arguments.getString(SingleChoiceDialogFragment.ARG_SELECTED));
brea... |
private void testSimpleConfiguration(Settings settings) {
Index index = new Index("test");
Injector parentInjector = new ModulesBuilder().add(new SettingsModule(settings), new EnvironmentModule(new Environment(settings)), new IndicesAnalysisModule()).createInjector();
Injector injector = new... | private void testSimpleConfiguration(Settings settings) {
Index index = new Index("test");
Injector parentInjector = new ModulesBuilder().add(new SettingsModule(settings), new EnvironmentModule(new Environment(settings)), new IndicesAnalysisModule()).createInjector();
Injector injector = new... |
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
boolean includeDefaults = params.paramAsBoolean("include_defaults", false);
// all are defaults, don't write it at all
if (!includeDefaults && name().equals(Defaults.NAME) && nullValue == null &&
... | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
boolean includeDefaults = params.paramAsBoolean("include_defaults", false);
// all are defaults, don't write it at all
if (!includeDefaults && name().equals(Defaults.NAME) && nullValue == null &&
... |
public static void main(String[] args) throws Exception {
System.setProperty("es.logger.prefix", "");
int numberOfNodes = 2;
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.shard.check_index", true)
.put("gateway.type", "local")
... | public static void main(String[] args) throws Exception {
System.setProperty("es.logger.prefix", "");
int numberOfNodes = 2;
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.shard.check_on_startup", true)
.put("gateway.type", "local")
... |
public static void main(String[] args) throws Exception {
System.setProperty("es.logger.prefix", "");
int numberOfIndices = 100;
int numberOfDocs = 100;
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.shard.check_index", false)
.p... | public static void main(String[] args) throws Exception {
System.setProperty("es.logger.prefix", "");
int numberOfIndices = 100;
int numberOfDocs = 100;
Settings settings = ImmutableSettings.settingsBuilder()
.put("index.shard.check_on_startup", false)
... |
public static void main(String[] args) throws Exception {
System.setProperty("es.logger.prefix", "");
Settings settings = settingsBuilder()
.put("index.shard.check_index", true)
.put("gateway.type", "none")
.put("path.data", "data/data1,data/data2")
... | public static void main(String[] args) throws Exception {
System.setProperty("es.logger.prefix", "");
Settings settings = settingsBuilder()
.put("index.shard.check_on_startup", true)
.put("gateway.type", "none")
.put("path.data", "data/data1,data/data... |
public void testCustomFiltersScore() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet();
client().prepareIndex("test", "ty... | public void testCustomFiltersScore() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet();
client().prepareIndex("test", "ty... |
@Override protected void configure() {
boolean sigarLoaded = false;
try {
settings.getClassLoader().loadClass("org.hyperic.sigar.Sigar");
SigarService sigarService = new SigarService(settings);
if (sigarService.sigarAvailable()) {
bind(SigarService... | @Override protected void configure() {
boolean sigarLoaded = false;
try {
settings.getClassLoader().loadClass("org.hyperic.sigar.Sigar");
SigarService sigarService = new SigarService(settings);
if (sigarService.sigarAvailable()) {
bind(SigarService... |
@Inject public SigarService(Settings settings) {
super(settings);
Sigar sigar = null;
try {
sigar = new Sigar();
// call it to make sure the library was loaded
sigar.getPid();
} catch (Throwable t) {
logger.debug("Failed to load sigar"... | @Inject public SigarService(Settings settings) {
super(settings);
Sigar sigar = null;
try {
sigar = new Sigar();
// call it to make sure the library was loaded
sigar.getPid();
} catch (Throwable t) {
logger.trace("Failed to load sigar"... |
public Type type() {
return TYPE;
}
@Override
InternalSignificantTerms newAggregation(long subsetSize, long supersetSize,
List<InternalSignificantTerms.Bucket> buckets) {
return new SignificantLongTerms(subsetSize, supersetSize, getName(), formatter, requiredSize, supersetSi... | public Type type() {
return TYPE;
}
@Override
InternalSignificantTerms newAggregation(long subsetSize, long supersetSize,
List<InternalSignificantTerms.Bucket> buckets) {
return new SignificantLongTerms(subsetSize, supersetSize, getName(), formatter, requiredSize, minDocCoun... |
public Type type() {
return TYPE;
}
@Override
InternalSignificantTerms newAggregation(long subsetSize, long supersetSize,
List<InternalSignificantTerms.Bucket> buckets) {
return new SignificantStringTerms(subsetSize, supersetSize, getName(), requiredSize, supersetSize, bucke... | public Type type() {
return TYPE;
}
@Override
InternalSignificantTerms newAggregation(long subsetSize, long supersetSize,
List<InternalSignificantTerms.Bucket> buckets) {
return new SignificantStringTerms(subsetSize, supersetSize, getName(), requiredSize, minDocCount, bucket... |
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 Filter extractFilterIfApplicable(Query query) {
if (query instanceof FilteredQuery) {
FilteredQuery fQuery = (FilteredQuery) query;
if (Queries.isMatchAllQuery(fQuery.getQuery())) {
return fQuery.getFilter();
}
} else if (query instanceof D... | private Filter extractFilterIfApplicable(Query query) {
if (query instanceof FilteredQuery) {
FilteredQuery fQuery = (FilteredQuery) query;
if (Queries.isConstantMatchAllQuery(fQuery.getQuery())) {
return fQuery.getFilter();
}
} else if (query inst... |
public void preProcess() {
if (query() == null) {
parsedQuery(ParsedQuery.MATCH_ALL_PARSED_QUERY);
}
if (queryBoost() != 1.0f) {
parsedQuery(new ParsedQuery(new FunctionScoreQuery(query(), new BoostScoreFunction(queryBoost)), parsedQuery()));
}
Filter ... | public void preProcess() {
if (query() == null) {
parsedQuery(ParsedQuery.MATCH_ALL_PARSED_QUERY);
}
if (queryBoost() != 1.0f) {
parsedQuery(new ParsedQuery(new FunctionScoreQuery(query(), new BoostScoreFunction(queryBoost)), parsedQuery()));
}
Filter ... |
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException {
String fieldName = null;
String valueFieldName = null;
String valueScript = null;
String scriptLang = null;
Map<String, Object> params = null;
do... | @Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException {
String fieldName = null;
String valueFieldName = null;
String valueScript = null;
String scriptLang = null;
Map<String, Object> params = null;
do... |
@Override protected List<DiscoveryNode> buildDynamicNodes() {
List<DiscoveryNode> discoNodes = newArrayList();
Set<? extends ComputeMetadata> nodes = computeService.listNodes(GetNodesOptions.Builder.withDetails());
if (logger.isTraceEnabled()) {
StringBuilder sb = new StringBuild... | @Override protected List<DiscoveryNode> buildDynamicNodes() {
List<DiscoveryNode> discoNodes = newArrayList();
Set<? extends ComputeMetadata> nodes = computeService.listNodes(GetNodesOptions.Builder.withDetails());
if (logger.isTraceEnabled()) {
StringBuilder sb = new StringBuild... |
@Override public Snapshot snapshot(Snapshot snapshot) {
synchronized (mutex) {
if (currentId() != snapshot.translogId()) {
return snapshot();
}
try {
raf.increaseRefCount();
if (useStream) {
FsStreamSnaps... | @Override public Snapshot snapshot(Snapshot snapshot) {
synchronized (mutex) {
if (currentId() != snapshot.translogId()) {
return snapshot();
}
try {
raf.increaseRefCount();
if (useStream) {
FsStreamSnaps... |
public Preferences getPreferences (String name) {
if (preferences.containsKey(name)) {
return preferences.get(name);
} else {
Preferences prefs = new LwjglPreferences(name);
preferences.put(name, prefs);
return prefs;
}
}
| public Preferences getPreferences (String name) {
if (preferences.containsKey(name)) {
return preferences.get(name);
} else {
Preferences prefs = new LwjglPreferences(name, ".prefs/");
preferences.put(name, prefs);
return prefs;
}
}
|
public LwjglApplication (ApplicationListener listener, LwjglApplicationConfiguration config, LwjglGraphics graphics) {
LwjglNativesLoader.load();
if (config.title == null) config.title = listener.getClass().getSimpleName();
this.graphics = graphics;
if (!LwjglApplicationConfiguration.disableAudio)
audio =... | public LwjglApplication (ApplicationListener listener, LwjglApplicationConfiguration config, LwjglGraphics graphics) {
LwjglNativesLoader.load();
if (config.title == null) config.title = listener.getClass().getSimpleName();
this.graphics = graphics;
if (!LwjglApplicationConfiguration.disableAudio)
audio =... |
private void writeImages (File outputDir, Array<Page> pages, String packFileName) {
String imageName = packFileName;
int dotIndex = imageName.indexOf('.');
if (dotIndex != -1) imageName = imageName.substring(0, dotIndex);
int fileIndex = 0;
for (Page page : pages) {
int width = page.width, height = page.... | private void writeImages (File outputDir, Array<Page> pages, String packFileName) {
String imageName = packFileName;
int dotIndex = imageName.lastIndexOf('.');
if (dotIndex != -1) imageName = imageName.substring(0, dotIndex);
int fileIndex = 0;
for (Page page : pages) {
int width = page.width, height = p... |
private ShardIterator preferenceActiveShardIterator(IndexShardRoutingTable indexShard, String localNodeId, DiscoveryNodes nodes, @Nullable String preference) {
if (preference == null) {
String[] awarenessAttributes = awarenessAllocationDecider.awarenessAttributes();
if (awarenessAttr... | private ShardIterator preferenceActiveShardIterator(IndexShardRoutingTable indexShard, String localNodeId, DiscoveryNodes nodes, @Nullable String preference) {
if (preference == null || preference.isEmpty()) {
String[] awarenessAttributes = awarenessAllocationDecider.awarenessAttributes();
... |
public static native String getFailureReason (); /*
return return env->NewStringUTF(gdx2d_get_failure_reason());
*/
| public static native String getFailureReason (); /*
return env->NewStringUTF(gdx2d_get_failure_reason());
*/
|
protected boolean forceAnalyzeQueryString() {
return this.queryBuilder.forceAnalyzeQueryString();
}
| protected boolean forceAnalyzeQueryString() {
return this.queryBuilder == null ? super.forceAnalyzeQueryString() : this.queryBuilder.forceAnalyzeQueryString();
}
|
public void testToJTSGeometry() {
ShapeBuilder.PolygonBuilder polygonBuilder = ShapeBuilder.newPolygon()
.point(-45, 30)
.point(45, 30)
.point(45, -30)
.point(-45, -30)
.point(-45, 30);
Shape polygon = polygonBuilder.bu... | public void testToJTSGeometry() {
ShapeBuilder.PolygonBuilder polygonBuilder = ShapeBuilder.newPolygon()
.point(-45, 30)
.point(45, 30)
.point(45, -30)
.point(-45, -30)
.close();
Shape polygon = polygonBuilder.build();
... |
public float freq() throws IOException {
return docs[index].count; // The number of matches in the child doc, which is propagated to parent
}
}
} | public int freq() throws IOException {
return docs[index].count; // The number of matches in the child doc, which is propagated to parent
}
}
} |
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... |
@Override protected ClusterStateResponse masterOperation(ClusterStateRequest request, ClusterState state) throws ElasticSearchException {
ClusterState currentState = clusterService.state();
ClusterState.Builder builder = newClusterStateBuilder();
if (!request.filterNodes()) {
bui... | @Override protected ClusterStateResponse masterOperation(ClusterStateRequest request, ClusterState state) throws ElasticSearchException {
ClusterState currentState = clusterService.state();
ClusterState.Builder builder = newClusterStateBuilder();
if (!request.filterNodes()) {
bui... |
private synchronized void lazyInitialize() {
if (initialized) {
return;
}
initialized = true;
// if this is not a possible master node or data node, bail, we won't save anything here...
if (!clusterService.localNode().masterNode() || !clusterService.localNode().d... | private synchronized void lazyInitialize() {
if (initialized) {
return;
}
initialized = true;
// if this is not a possible master node or data node, bail, we won't save anything here...
if (!clusterService.localNode().masterNode() && !clusterService.localNode().d... |
private void enlargeBuffer (int min) {
int newSize = (chars.length >> 1) + chars.length + 2;
char[] newData = new char[min > newSize ? min : newSize];
System.arraycopy(chars, 0, newData, 0, length);
chars = newData;
}
final void appendNull () {
int newSize = length + 4;
if (newSize > chars.length) {
... | private void enlargeBuffer (int min) {
int newSize = (chars.length >> 1) + chars.length + 2;
char[] newData = new char[min > newSize ? min : newSize];
System.arraycopy(chars, 0, newData, 0, length);
chars = newData;
}
final void appendNull () {
int newSize = length + 4;
if (newSize > chars.length) {
... |
private WriteResult shardDeleteOperation(DeleteRequest deleteRequest, IndexShard indexShard) {
Engine.Delete delete = indexShard.prepareDelete(deleteRequest.type(), deleteRequest.id(), deleteRequest.version()).versionType(deleteRequest.versionType()).origin(Engine.Operation.Origin.PRIMARY);
indexSha... | private WriteResult shardDeleteOperation(DeleteRequest deleteRequest, IndexShard indexShard) {
Engine.Delete delete = indexShard.prepareDelete(deleteRequest.type(), deleteRequest.id(), deleteRequest.version()).versionType(deleteRequest.versionType()).origin(Engine.Operation.Origin.PRIMARY);
indexSha... |
protected PrimaryResponse<ShardDeleteResponse, ShardDeleteRequest> shardOperationOnPrimary(ClusterState clusterState, PrimaryOperationRequest shardRequest) {
ShardDeleteRequest request = shardRequest.request;
IndexShard indexShard = indicesService.indexServiceSafe(shardRequest.request.index()).shard... | protected PrimaryResponse<ShardDeleteResponse, ShardDeleteRequest> shardOperationOnPrimary(ClusterState clusterState, PrimaryOperationRequest shardRequest) {
ShardDeleteRequest request = shardRequest.request;
IndexShard indexShard = indicesService.indexServiceSafe(shardRequest.request.index()).shard... |
public void simpleGetTests() {
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.refresh_interval", -1)).execute().actionGet();
ensureGreen();
GetResponse response = client().prepareGet("test", "type1", "1").execute().actionGet();
... | public void simpleGetTests() {
client().admin().indices().prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.refresh_interval", -1)).execute().actionGet();
ensureGreen();
GetResponse response = client().prepareGet("test", "type1", "1").execute().actionGet();
... |
public void simpleNested() throws Exception {
XContentBuilder builder = jsonBuilder().
startObject().
field("type1").
startObject().
field("properties").
startObject().
field("nested1").
startObje... | public void simpleNested() throws Exception {
XContentBuilder builder = jsonBuilder().
startObject().
field("type1").
startObject().
field("properties").
startObject().
field("nested1").
startObje... |
public void run() {
try {
XContentBuilder doc = XContentFactory.jsonBuilder().startObject()
.field("query", termQuery("field1", "value")).endObject();
outer:
while (run.get()) {
... | public void run() {
try {
XContentBuilder doc = XContentFactory.jsonBuilder().startObject()
.field("query", termQuery("field1", "value")).endObject();
outer:
while (run.get()) {
... |
@Override public void execute(SearchContext context) throws ElasticSearchException {
if (context.facets() == null) {
return;
}
if (context.queryResult().facets() != null) {
// no need to compute the facets twice, they should be computed on a per context basis
... | @Override public void execute(SearchContext context) throws ElasticSearchException {
if (context.facets() == null) {
return;
}
if (context.queryResult().facets() != null) {
// no need to compute the facets twice, they should be computed on a per context basis
... |
public void render () {
// first we update the world. For simplicity
// we use the delta time provided by the Graphics
// instance. Normally you'll want to fix the time
// step.
long start = System.nanoTime();
world.step(Gdx.graphics.getDeltaTime(), 3, 3);
float updateTime = (System.nanoTime() - start) /... | public void render () {
// first we update the world. For simplicity
// we use the delta time provided by the Graphics
// instance. Normally you'll want to fix the time
// step.
long start = System.nanoTime();
world.step(Gdx.graphics.getDeltaTime(), 8, 3);
float updateTime = (System.nanoTime() - start) /... |
@Override protected void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(GeoDistanceFilterParser.NAME);
if (geohash != null) {
builder.field(name, geohash);
} else {
builder.startArray(name).value(lat).value(lon).endArray();... | @Override protected void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(GeoDistanceFilterParser.NAME);
if (geohash != null) {
builder.field(name, geohash);
} else {
builder.startArray(name).value(lon).value(lat).endArray();... |
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
if (fieldName == null) {
throw new SearchSourceBuilderException("field must be set on geo_distance facet for facet [" + name + "]");
}
if (entries.isEmpty()) {
thr... | @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
if (fieldName == null) {
throw new SearchSourceBuilderException("field must be set on geo_distance facet for facet [" + name + "]");
}
if (entries.isEmpty()) {
thr... |
@Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject("_geo_distance");
if (geohash != null) {
builder.field(fieldName, geohash);
} else {
builder.startArray(fieldName).value(lat).value(lon).endAr... | @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject("_geo_distance");
if (geohash != null) {
builder.field(fieldName, geohash);
} else {
builder.startArray(fieldName).value(lon).value(lat).endAr... |
public static final String MERGE_SCHEDULER_TYPE_KEY = "index.merge.scheduler.type";
public static final Class<? extends MergeSchedulerProvider> DEFAULT = ConcurrentMergeSchedulerProvider.class;
| public static final String MERGE_SCHEDULER_TYPE_KEY = "index.merge.scheduler.type";
public static final Class<? extends MergeSchedulerProvider> DEFAULT = SerialMergeSchedulerProvider.class;
|
private void updateList(RepositoryCommitCompare compare) {
if (!isUsable())
return;
this.compare = compare;
ViewUtils.setGone(progress, true);
ViewUtils.setGone(list, false);
LayoutInflater inflater = getActivity().getLayoutInflater();
adapter.clearHead... | private void updateList(RepositoryCommitCompare compare) {
if (!isUsable())
return;
this.compare = compare;
ViewUtils.setGone(progress, true);
ViewUtils.setGone(list, false);
LayoutInflater inflater = getActivity().getLayoutInflater();
adapter.clearHead... |
protected void configureList(Activity activity, ListView listView) {
super.configureList(activity, listView);
getListAdapter().addHeader(filterHeader, null, false);
}
| protected void configureList(Activity activity, ListView listView) {
super.configureList(activity, listView);
getListAdapter().addHeader(filterHeader);
}
|
public void onRefreshSettings(Settings settings) {
int maxSize = settings.getAsInt("index.cache.field.max_size", ResidentFieldDataCache.this.maxSize);
TimeValue expire = settings.getAsTime("index.cache.field.expire", ResidentFieldDataCache.this.expire);
boolean changed = fals... | public void onRefreshSettings(Settings settings) {
int maxSize = settings.getAsInt("index.cache.field.max_size", ResidentFieldDataCache.this.maxSize);
TimeValue expire = settings.getAsTime("index.cache.field.expire", ResidentFieldDataCache.this.expire);
boolean changed = fals... |
public EntriesStats(long sizeInBytes, long count) {
this.sizeInBytes = sizeInBytes;
this.count = count;
}
}
String type();
Filter cache(Filter filterToCache);
boolean isCached(Filter filter);
void clear(IndexReader reader);
void clear();
EntriesS... | public EntriesStats(long sizeInBytes, long count) {
this.sizeInBytes = sizeInBytes;
this.count = count;
}
}
String type();
Filter cache(Filter filterToCache);
boolean isCached(Filter filter);
void clear(IndexReader reader);
void clear(String reason);
... |
@Override public void handleException(RemoteTransportException exp) {
logger.warn("failed to send cluster state to [{}], should be detected as failed soon...", exp, node);
}
});
}
}
| @Override public void handleException(RemoteTransportException exp) {
logger.debug("failed to send cluster state to [{}], should be detected as failed soon...", exp, node);
}
});
}
}
|
public void testCallWithDifferentFlagsFails() throws Exception {
initTestData();
// should throw an exception, we cannot call with different flags twice
// if the flags of the second call were not included in the first call.
String script = "term = _index['int_payload_field']['b'];... | public void testCallWithDifferentFlagsFails() throws Exception {
initTestData();
// should throw an exception, we cannot call with different flags twice
// if the flags of the second call were not included in the first call.
String script = "term = _index['int_payload_field']['b'];... |
public NettyTransport(Settings settings, ThreadPool threadPool, NetworkService networkService, Version version) {
super(settings);
this.threadPool = threadPool;
this.networkService = networkService;
this.version = version;
if (settings.getAsBoolean("netty.epollBugWorkaround"... | public NettyTransport(Settings settings, ThreadPool threadPool, NetworkService networkService, Version version) {
super(settings);
this.threadPool = threadPool;
this.networkService = networkService;
this.version = version;
if (settings.getAsBoolean("netty.epollBugWorkaround"... |
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.... |
@Override protected GroupShardsIterator shards(BroadcastPingRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint());
}
| @Override protected GroupShardsIterator shards(BroadcastPingRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint(), null);
}
|
@Override protected GroupShardsIterator shards(CountRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint());
}
| @Override protected GroupShardsIterator shards(CountRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint(), request.routing());
}
|
@Override protected GroupShardsIterator shards(IndexDeleteByQueryRequest request) {
return clusterService.operationRouting().deleteByQueryShards(clusterService.state(), request.index());
}
| @Override protected GroupShardsIterator shards(IndexDeleteByQueryRequest request) {
return clusterService.operationRouting().deleteByQueryShards(clusterService.state(), request.index(), request.routing());
}
|
@Override protected ShardsIterator shards(ClusterState clusterState, ShardDeleteByQueryRequest request) {
GroupShardsIterator group = clusterService.operationRouting().deleteByQueryShards(clusterService.state(), request.index());
for (ShardsIterator shards : group) {
if (shards.shardId()... | @Override protected ShardsIterator shards(ClusterState clusterState, ShardDeleteByQueryRequest request) {
GroupShardsIterator group = clusterService.operationRouting().deleteByQueryShards(clusterService.state(), request.index(), request.routing());
for (ShardsIterator shards : group) {
i... |
private void applyMappings(ClusterChangedEvent event) {
// go over and update mappings
for (IndexMetaData indexMetaData : event.state().metaData()) {
if (!indicesService.hasIndex(indexMetaData.index())) {
// we only create / update here
continue;
... | private void applyMappings(ClusterChangedEvent event) {
// go over and update mappings
for (IndexMetaData indexMetaData : event.state().metaData()) {
if (!indicesService.hasIndex(indexMetaData.index())) {
// we only create / update here
continue;
... |
public static void main (String[] argv) {
JoglApplicationConfiguration config = new JoglApplicationConfiguration();
config.useGL20 = true;
config.vSyncEnabled = false;
new JoglApplication(new com.badlogic.gdx.tests.AssetManagerTest(), config);
}
| public static void main (String[] argv) {
JoglApplicationConfiguration config = new JoglApplicationConfiguration();
config.useGL20 = true;
config.vSyncEnabled = false;
new JoglApplication(new com.badlogic.gdx.tests.InputTest(), config);
}
|
public DocumentMapper documentMapperWithAutoCreate(String type) {
DocumentMapper mapper = mappers.get(type);
if (mapper != null) {
return mapper;
}
if (!dynamic) {
return null;
}
// go ahead and dynamically create it
synchronized (mutex... | public DocumentMapper documentMapperWithAutoCreate(String type) {
DocumentMapper mapper = mappers.get(type);
if (mapper != null) {
return mapper;
}
if (!dynamic) {
throw new TypeMissingException(index, type, "typing to auto create mapping, but dynamic mapping ... |
public void update() {
projection.setToOrtho(zoom * -viewportWidth / 2, zoom * viewportWidth / 2, zoom * -viewportHeight / 2, zoom * viewportHeight / 2, Math.abs(near), Math.abs(far));
view.setToLookAt(position, tmp.set(position).add(direction), up);
combined.set(projection);
Matrix4.mul(combined.val, view.va... | public void update() {
projection.setToOrtho(zoom * -viewportWidth / 2, zoom * viewportWidth / 2, zoom * -viewportHeight / 2, zoom * viewportHeight / 2, Math.abs(near), Math.abs(far));
view.setToLookAt(position, tmp.set(position).add(direction), up);
combined.set(projection);
Matrix4.mul(combined.val, view.va... |
public XContentBuilder toXContent(XContentBuilder builder, Params params, @Nullable SettingsFilter settingsFilter) throws IOException {
builder.startObject(Fields.INDICES);
for (IndexStatus indexStatus : indices().values()) {
builder.startObject(indexStatus.index(), XContentBuilder.Field... | public XContentBuilder toXContent(XContentBuilder builder, Params params, @Nullable SettingsFilter settingsFilter) throws IOException {
builder.startObject(Fields.INDICES);
for (IndexStatus indexStatus : indices().values()) {
builder.startObject(indexStatus.index(), XContentBuilder.Field... |
@Override protected PercolateResponse shardOperation(PercolateRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
PercolatorService percolatorService = indexService.percolateService();
PercolatorExecutor... | @Override protected PercolateResponse shardOperation(PercolateRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
PercolatorService percolatorService = indexService.percolateService();
PercolatorExecutor... |
@Override public void toJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject();
builder.field("_index", shard.index());
// builder.field("_shard", shard.shardId());
// builder.field("_node", shard.nodeId());
builder.field("_type", type());
b... | @Override public void toJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject();
builder.field("_index", shard.index());
// builder.field("_shard", shard.shardId());
// builder.field("_node", shard.nodeId());
builder.field("_type", type());
b... |
public boolean apply(Object input) {
ClusterHealthStatus test = client().admin().cluster()
.health(Requests.clusterHealthRequest("test")).actionGet().getStatus();
return test == ClusterHealthStatus.RED;
}
}, 5, TimeUnit.MINUTES);// ... | public boolean apply(Object input) {
ClusterHealthStatus test = client().admin().cluster()
.health(Requests.clusterHealthRequest("test")).actionGet().getStatus();
return test == ClusterHealthStatus.RED;
}
}, 5, TimeUnit.MINUTES);// ... |
public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("index.engine.robin.refreshInterval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 2)
.put(SETTING_NUMBER_OF_REPLICAS, 1)... | public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("refresh_interval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 2)
.put(SETTING_NUMBER_OF_REPLICAS, 1)
.... |
public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("index.engine.robin.refreshInterval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)... | public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("refresh_interval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)
.... |
public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("index.engine.robin.refreshInterval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)... | public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("index.refresh_interval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)
... |
public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("index.engine.robin.refreshInterval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)... | public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("index.refresh_interval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)
... |
public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("index.engine.robin.refreshInterval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)... | public static void main(String[] args) throws Exception {
Settings settings = settingsBuilder()
.put("index.refresh_interval", "-1")
.put("gateway.type", "local")
.put(SETTING_NUMBER_OF_SHARDS, 1)
.put(SETTING_NUMBER_OF_REPLICAS, 0)
... |
public void testRobinEngineGCDeletesSetting() throws InterruptedException {
createIndex("test");
client().prepareIndex("test", "type", "1").setSource("f", 1).get(); // set version to 1
client().prepareDelete("test", "type", "1").get(); // sets version to 2
client().prepareIndex("test... | public void testEngineGCDeletesSetting() throws InterruptedException {
createIndex("test");
client().prepareIndex("test", "type", "1").setSource("f", 1).get(); // set version to 1
client().prepareDelete("test", "type", "1").get(); // sets version to 2
client().prepareIndex("test", "t... |
protected void configure() {
bind(Engine.class).to(MockRobinEngine.class).asEagerSingleton();
}
| protected void configure() {
bind(Engine.class).to(MockInternalEngine.class).asEagerSingleton();
}
|
protected ExplainResponse shardOperation(ExplainRequest request, ShardId shardId) throws ElasticsearchException {
IndexService indexService = indicesService.indexService(shardId.getIndex());
IndexShard indexShard = indexService.shardSafe(shardId.id());
Term uidTerm = new Term(UidFieldMapper.... | protected ExplainResponse shardOperation(ExplainRequest request, ShardId shardId) throws ElasticsearchException {
IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());
IndexShard indexShard = indexService.shardSafe(shardId.id());
Term uidTerm = new Term(UidFieldMap... |
private Directory getStoreDirectory(String index, int shardId) {
Set<String> nodes = internalCluster().nodesInclude("test");
assertThat(nodes.isEmpty(), equalTo(false));
IndicesService indicesService = internalCluster().getInstance(IndicesService.class, nodes.iterator().next());
Inte... | private Directory getStoreDirectory(String index, int shardId) {
Set<String> nodes = internalCluster().nodesInclude("test");
assertThat(nodes.isEmpty(), equalTo(false));
IndicesService indicesService = internalCluster().getInstance(IndicesService.class, nodes.iterator().next());
Inte... |
public FileHandle[] list (String suffix) {
if (type == FileType.Internal) {
try {
String[] relativePaths = assets.list(file.getPath());
FileHandle[] handles = new FileHandle[relativePaths.length];
int count = 0;
for (int i = 0, n = handles.length; i < n; i++) {
String path = relativePaths[i];... | public FileHandle[] list (String suffix) {
if (type == FileType.Internal) {
try {
String[] relativePaths = assets.list(file.getPath());
FileHandle[] handles = new FileHandle[relativePaths.length];
int count = 0;
for (int i = 0, n = handles.length; i < n; i++) {
String path = relativePaths[i];... |
public FileHandle[] list (String suffix) {
if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot list a classpath directory: " + file);
String[] relativePaths = file().list();
if (relativePaths == null) return new FileHandle[0];
FileHandle[] handles = new FileHandle[relativePaths.length];
int... | public FileHandle[] list (String suffix) {
if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot list a classpath directory: " + file);
String[] relativePaths = file().list();
if (relativePaths == null) return new FileHandle[0];
FileHandle[] handles = new FileHandle[relativePaths.length];
int... |
public void render () {
super.render();
if (renderer.batch != null) {
renderer.batch.begin();
renderer.batch.drawText(renderer.font, "Keys (w), (a), (d) to fly", 0, Gdx.app.getGraphics().getHeight(), Color.WHITE);
renderer.batch.end();
}
}
| public void render () {
super.render();
if (renderer.batch != null) {
renderer.batch.begin();
// renderer.batch.drawText(renderer.font, "Keys (w), (a), (d) to fly", 0, Gdx.app.getGraphics().getHeight(), Color.WHITE);
renderer.batch.end();
}
}
|
public static void main (String[] argv) {
new JoglApplication(new Bouncy(), "Bouncy", 320, 480, false);
}
| public static void main (String[] argv) {
new JoglApplication(new Bouncy(), "Bouncy", 320, 480, true);
}
|
public void create () {
boolean flip = false;
batch = new SpriteBatch();
if(flip) {
OrthographicCamera cam = new OrthographicCamera();
cam.setToOrtho(flip);
cam.update();
batch.setProjectionMatrix(cam.combined);
}
font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), flip);
FileHandle ... | public void create () {
boolean flip = false;
batch = new SpriteBatch();
if(flip) {
OrthographicCamera cam = new OrthographicCamera();
cam.setToOrtho(flip);
cam.update();
batch.setProjectionMatrix(cam.combined);
}
font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), flip);
FileHandle ... |
private void assertPluginAvailable(String pluginName) {
HttpClient httpClient = new HttpClient("http://localhost:9200/");
HttpClientResponse response = httpClient.request("_plugin/" + pluginName + "/");
assertThat(response.errorCode(), Matchers.equalTo(RestStatus.OK.getStatus()));
}
| private void assertPluginAvailable(String pluginName) {
HttpClient httpClient = new HttpClient("http://127.0.0.1:9200/");
HttpClientResponse response = httpClient.request("_plugin/" + pluginName + "/");
assertThat(response.errorCode(), Matchers.equalTo(RestStatus.OK.getStatus()));
}
|
private int findPlaceholderEndIndex(CharSequence buf, int startIndex) {
int index = startIndex + this.placeholderPrefix.length();
int withinNestedPlaceholder = 0;
while (index < buf.length()) {
if (Strings.substringMatch(buf, index, this.placeholderSuffix)) {
if (... | private int findPlaceholderEndIndex(CharSequence buf, int startIndex) {
int index = startIndex + this.placeholderPrefix.length();
int withinNestedPlaceholder = 0;
while (index < buf.length()) {
if (Strings.substringMatch(buf, index, this.placeholderSuffix)) {
if (... |
@Override public void handleException(RemoteTransportException exp) {
}
} | @Override public void handleException(TransportException exp) {
}
} |
void handleException(TransportException exp);
/*
* 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... | void handleException(TransportException exp);
/*
* 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... |
@Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException {
String keyField = null;
String valueField = null;
String keyScript = null;
String valueScript = null;
String scriptLang = null;
Map<String, Objec... | @Override public FacetCollector parse(String facetName, XContentParser parser, SearchContext context) throws IOException {
String keyField = null;
String valueField = null;
String keyScript = null;
String valueScript = null;
String scriptLang = null;
Map<String, Objec... |
public static void registerStreams() {
InternalCountAndTotalHistogramFacet.registerStreams();
InternalCountHistogramFacet.registerStreams();
}
| public static void registerStreams() {
InternalFullHistogramFacet.registerStreams();
InternalCountHistogramFacet.registerStreams();
}
|
private void queryBasedPercolating(Engine.Searcher percolatorSearcher, PercolateContext context, QueryCollector percolateCollector) throws IOException {
Filter percolatorTypeFilter = context.indexService().mapperService().documentMapper(TYPE_NAME).typeFilter();
percolatorTypeFilter = context.indexSe... | private void queryBasedPercolating(Engine.Searcher percolatorSearcher, PercolateContext context, QueryCollector percolateCollector) throws IOException {
Filter percolatorTypeFilter = context.indexService().mapperService().documentMapper(TYPE_NAME).typeFilter();
percolatorTypeFilter = context.indexSe... |
public void layout () {
float regionWidth, regionHeight;
if (patch != null) {
regionWidth = patch.getTotalWidth();
regionHeight = patch.getTotalHeight();
} else if (region != null) {
regionWidth = region.getRegionWidth();
regionHeight = region.getRegionHeight();
} else
return;
Vector2 size = ... | public void layout () {
float regionWidth, regionHeight;
if (patch != null) {
regionWidth = patch.getTotalWidth();
regionHeight = patch.getTotalHeight();
} else if (region != null) {
regionWidth = region.getRegionWidth();
regionHeight = region.getRegionHeight();
} else
return;
Vector2 size = ... |
private void initiateGLInstances () {
String version = org.lwjgl.opengl.GL11.glGetString(GL11.GL_VERSION);
major = Integer.parseInt("" + version.charAt(0));
minor = Integer.parseInt("" + version.charAt(2));
if (config.useGL20 && major >= 2) {
// FIXME add check whether gl 2.0 is supported
gl20 = new Lwj... | private void initiateGLInstances () {
String version = org.lwjgl.opengl.GL11.glGetString(GL11.GL_VERSION);
major = Integer.parseInt("" + version.charAt(0));
minor = Integer.parseInt("" + version.charAt(2));
if (config.useGL20 && (major >= 2 || version.contains("2.1"))) { // special case for MESA, wtf...
//... |
protected String models[] = new String[] {
"car.obj", "cube.obj", "scene.obj", "scene2.obj", "sphere.obj", "wheel.obj",
"g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/teapot.g3db", "g3d/fighter.g3db"
};
| protected String models[] = new String[] {
"car.obj", "cube.obj", "scene.obj", "scene2.obj", "sphere.obj", "wheel.obj",
"g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/teapot.g3db"
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.