buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
List<RangeAggregator.Range... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
List<RangeAggregator.Range... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
List<RangeAggregator.Range... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
List<RangeAggregator.Range... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
String field = null;
String script = null;
String scriptLang = null;
Map<String, Object> scriptParams = null;
Terms.ValueType valueType = null;
i... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
String field = null;
String script = null;
String scriptLang = null;
Map<String, Object> scriptParams = null;
Terms.ValueType valueType = null;
i... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
String script = null;
... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<NumericValuesSource> config = new ValuesSourceConfig<NumericValuesSource>(NumericValuesSource.class);
String field = null;
String script = null;
... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<BytesValuesSource> config = new ValuesSourceConfig<BytesValuesSource>(BytesValuesSource.class);
String field = null;
String script = null;
St... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
ValuesSourceConfig<BytesValuesSource> config = new ValuesSourceConfig<BytesValuesSource>(BytesValuesSource.class);
String field = null;
String script = null;
St... |
public void draw (Batch spriteBatch) {
TextureRegion[] regions = font.getRegions();
for (int j = 0, n = vertexData.length; j < n; j++) {
if (idx[j] >= 0) { // ignore if this texture has no glyphs
float[] vertices = vertexData[j];
spriteBatch.draw(regions[j].getTexture(), vertices, 0, idx[j]);
}
}
... | public void draw (Batch spriteBatch) {
TextureRegion[] regions = font.getRegions();
for (int j = 0, n = vertexData.length; j < n; j++) {
if (idx[j] > 0) { // ignore if this texture has no glyphs
float[] vertices = vertexData[j];
spriteBatch.draw(regions[j].getTexture(), vertices, 0, idx[j]);
}
}
}... |
public GetResult innerGet(String type, String id, String[] gFields, boolean realtime) throws ElasticSearchException {
boolean loadSource = gFields == null || gFields.length > 0;
Engine.GetResult get = null;
if (type == null || type.equals("_all")) {
for (String typeX : mapperServ... | public GetResult innerGet(String type, String id, String[] gFields, boolean realtime) throws ElasticSearchException {
boolean loadSource = gFields == null || gFields.length > 0;
Engine.GetResult get = null;
if (type == null || type.equals("_all")) {
for (String typeX : mapperServ... |
public void draw (Batch batch, float parentAlpha) {
validate();
Color color = getColor();
if (style.background != null) {
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
}
cache.setColor(style.fontColor == null ? c... | public void draw (Batch batch, float parentAlpha) {
validate();
Color color = getColor();
if (style.background != null) {
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
}
cache.setColor(style.fontColor == null ? c... |
private String source(String id, String nameValue) {
return "{ type1 : { \"id\" : \"" + id + "\", \"name\" : \"" + nameValue + "\" } }";
}
| private String source(String id, String nameValue) {
return "{ \"id\" : \"" + id + "\", \"name\" : \"" + nameValue + "\" }";
}
|
public void render (Renderable renderable) {
if(renderable.worldTransform.det() == 0) return;
combinedAttributes.clear();
| public void render (Renderable renderable) {
if(renderable.worldTransform.det3x3() == 0) return;
combinedAttributes.clear();
|
public interface Vector<T extends Vector> {
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a... | public interface Vector<T extends Vector> {
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a... |
private static int getMaxTextureUnits () {
IntBuffer buffer = BufferUtils.newIntBuffer(16);
Gdx.gl.glGetIntegerv(GL20.GL_MAX_TEXTURE_UNITS, buffer);
return buffer.get(0);
}
| private static int getMaxTextureUnits () {
IntBuffer buffer = BufferUtils.newIntBuffer(16);
Gdx.gl.glGetIntegerv(GL20.GL_MAX_TEXTURE_IMAGE_UNITS, buffer);
return buffer.get(0);
}
|
public RoutingNodes(ClusterState clusterState) {
this.metaData = clusterState.metaData();
this.blocks = clusterState.blocks();
this.routingTable = clusterState.routingTable();
Map<String, List<MutableShardRouting>> nodesToShards = newHashMap();
for (IndexRoutingTable indexRou... | public RoutingNodes(ClusterState clusterState) {
this.metaData = clusterState.metaData();
this.blocks = clusterState.blocks();
this.routingTable = clusterState.routingTable();
Map<String, List<MutableShardRouting>> nodesToShards = newHashMap();
for (IndexRoutingTable indexRou... |
private void applyNewNodes(RoutingNodes routingNodes, Iterable<DiscoveryNode> liveNodes) {
for (DiscoveryNode node : liveNodes) {
if (!routingNodes.nodesToShards().containsKey(node.id())) {
RoutingNode routingNode = new RoutingNode(node);
routingNodes.nodesToShard... | private void applyNewNodes(RoutingNodes routingNodes, Iterable<DiscoveryNode> liveNodes) {
for (DiscoveryNode node : liveNodes) {
if (!routingNodes.nodesToShards().containsKey(node.id())) {
RoutingNode routingNode = new RoutingNode(node.id(), node);
routingNodes.n... |
public void draw (SpriteBatch batch, float x, float y, float width, float height) {
TextureRegion region = getRegion();
float regionWidth = region.getRegionWidth(), regionHeight = region.getRegionWidth();
float remainingX = width % regionWidth, remainingY = height % regionHeight;
float startX = x, startY = y;
... | public void draw (SpriteBatch batch, float x, float y, float width, float height) {
TextureRegion region = getRegion();
float regionWidth = region.getRegionWidth(), regionHeight = region.getRegionHeight();
float remainingX = width % regionWidth, remainingY = height % regionHeight;
float startX = x, startY = y;... |
public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
new SharedLibraryLoader("../../extensions/... | public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
new SharedLibraryLoader("../../extensions/... |
public void handleException(TransportException e) {
logger.info("failed to get local cluster state for {}, disconnecting...", e, listedNode);
transportService.disconnectFromNode(listedNode);
... | public void handleException(TransportException e) {
logger.info("failed to get local cluster state for {}, disconnecting...", e, listedNode);
transportService.disconnectFromNode(listedNode);
... |
private void addValue(String name, Object value) {
if (fieldsValues == null) {
fieldsValues = newHashMap();
}
List<Object> values = fieldsValues.get(name);
if (values == null) {
values = new ArrayList<>(2);
fieldsValues.put(name, values);
... | public void reset() {
if (fieldsValues != null) fieldsValues.clear();
source = null;
uid = null;
}
void addValue(String name, Object value) {
if (fieldsValues == null) {
fieldsValues = newHashMap();
}
List<Object> values = fieldsValues.get(name);... |
public PolygonRegion (TextureRegion region, float[] vertices, short[] triangles) {
this.region = region;
this.vertices = vertices;
this.triangles = triangles;
float[] textureCoords = this.textureCoords = new float[vertices.length];
float u = region.u, v = region.u;
float uvWidth = region.u2 - u;
float u... | public PolygonRegion (TextureRegion region, float[] vertices, short[] triangles) {
this.region = region;
this.vertices = vertices;
this.triangles = triangles;
float[] textureCoords = this.textureCoords = new float[vertices.length];
float u = region.u, v = region.v;
float uvWidth = region.u2 - u;
float u... |
public float[] getTransformedVertices () {
if (!dirty) return worldVertices;
dirty = false;
final float[] localVertices = this.localVertices;
if (worldVertices == null || worldVertices.length < localVertices.length) worldVertices = new float[localVertices.length];
final float[] worldVertices = this.worldVe... | public float[] getTransformedVertices () {
if (!dirty) return worldVertices;
dirty = false;
final float[] localVertices = this.localVertices;
if (worldVertices == null || worldVertices.length != localVertices.length) worldVertices = new float[localVertices.length];
final float[] worldVertices = this.worldV... |
public Filter rangeFilter(QueryParseContext parseContext, Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, @Nullable QueryParseContext context, boolean explicitCaching) {
boolean cache = explicitCaching;
Long lowerVal = null;
Long upperVal = null;
if (l... | public Filter rangeFilter(QueryParseContext parseContext, Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, @Nullable QueryParseContext context, boolean explicitCaching) {
boolean cache = explicitCaching;
Long lowerVal = null;
Long upperVal = null;
if (l... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
boolean cache = false;
CacheKeyFilter.Key cacheKey = null;
String fieldName = null;
double top = Double.NaN;
double bottom ... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
boolean cache = false;
CacheKeyFilter.Key cacheKey = null;
String fieldName = null;
double top = Double.NaN;
double bottom ... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token;
boolean cache = false;
CacheKeyFilter.Key cacheKey = null;
String filterName = null;
String cur... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token;
boolean cache = false;
CacheKeyFilter.Key cacheKey = null;
String filterName = null;
String cur... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token;
boolean cache = false;
CacheKeyFilter.Key cacheKey = null;
String filterName = null;
String cur... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token;
boolean cache = false;
CacheKeyFilter.Key cacheKey = null;
String filterName = null;
String cur... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
boolean cache = false;
CacheKeyFilter.Key cacheKey = null;
String fieldName = null;
List<GeoPoint> shell = Lists.newArrayList();
... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
boolean cache = false;
CacheKeyFilter.Key cacheKey = null;
String fieldName = null;
List<GeoPoint> shell = Lists.newArrayList();
... |
public void collect(int parentDoc, long bucketOrd) throws IOException {
// here we translate the parent doc to a list of its nested docs, and then call super.collect for evey one of them
// so they'll be collected
if (parentDoc == 0 || parentDocs == null) {
return;
}
... | public void collect(int parentDoc, long bucketOrd) throws IOException {
// here we translate the parent doc to a list of its nested docs, and then call super.collect for evey one of them
// so they'll be collected
if (parentDoc == 0 || parentDocs == null) {
return;
}
... |
public static void main(String[] args) throws Exception {
final IndexWriterConfig iwc = new IndexWriterConfig(Lucene.VERSION, new KeywordAnalyzer());
final String fieldName = "f";
final int numDocs = 1000000;
System.out.println("Data\tLoading time\tImplementation\tActual size\tExpect... | public static void main(String[] args) throws Exception {
final IndexWriterConfig iwc = new IndexWriterConfig(Lucene.VERSION, new KeywordAnalyzer());
final String fieldName = "f";
final int numDocs = 1000000;
System.out.println("Data\tLoading time\tImplementation\tActual size\tExpect... |
public void singleValueField() throws Exception {
SearchResponse response = client().prepareSearch("idx").setTypes("type")
.addAggregation(terms("terms")
.executionHint(randomExecutionHint())
.field(SINGLE_VALUED_FIELD_NAME)
... | public void singleValueField() throws Exception {
SearchResponse response = client().prepareSearch("idx").setTypes("type")
.addAggregation(terms("terms")
.executionHint(randomExecutionHint())
.field(SINGLE_VALUED_FIELD_NAME)
... |
public int getVersion () {
return android.os.Build.VERSION.SDK_INT;
}
| public int getVersion () {
return Integer.parseInt(android.os.Build.VERSION.SDK);
}
|
public static void generateMipMap (int target, Pixmap pixmap, int textureWidth, int textureHeight) {
if (!useHWMipMap) {
generateMipMapCPU(target, pixmap, textureWidth, textureHeight);
return;
}
if (Gdx.app.getType() == ApplicationType.Android || Gdx.app.getType() == ApplicationType.WebGL || Gdx.app.getTy... | public static void generateMipMap (int target, Pixmap pixmap, int textureWidth, int textureHeight) {
if (!useHWMipMap) {
generateMipMapCPU(target, pixmap, textureWidth, textureHeight);
return;
}
if (Gdx.app.getType() == ApplicationType.Android || Gdx.app.getType() == ApplicationType.WebGL) {
if (Gdx.gr... |
private boolean canWrite (File file) {
if (file.canWrite() && file.canExecute()) return true; // File exists and is writable.
File parent = file.getParentFile();
parent.mkdirs();
if (!parent.isDirectory()) return false;
try {
new FileOutputStream(file).close();
file.delete();
return true;
} catch ... | private boolean canWrite (File file) {
if (file.canWrite()) return true; // File exists and is writable.
File parent = file.getParentFile();
parent.mkdirs();
if (!parent.isDirectory()) return false;
try {
new FileOutputStream(file).close();
file.delete();
return true;
} catch (Throwable ex) {
r... |
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) {
... |
import org.elasticsearch.search.aggregations.support.format.ValueParser;
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* t... | import org.elasticsearch.search.aggregations.support.format.ValueParser;
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* t... |
public <IFD extends IndexFieldData> IFD getForField(FieldMapper.Names fieldNames, FieldDataType type) {
IndexFieldData fieldData = loadedFieldData.get(fieldNames.indexName());
if (fieldData == null) {
synchronized (loadedFieldData) {
fieldData = loadedFieldData.get(fieldN... | public <IFD extends IndexFieldData> IFD getForField(FieldMapper.Names fieldNames, FieldDataType type) {
IndexFieldData fieldData = loadedFieldData.get(fieldNames.indexName());
if (fieldData == null) {
synchronized (loadedFieldData) {
fieldData = loadedFieldData.get(fieldN... |
public boolean act (float delta) {
if (complete) return true;
complete = true;
Array<Action> actions = this.actions;
for (int i = 0, n = actions.size; i < n && actor != null; i++)
if (!actions.get(i).act(delta)) complete = false;
return complete;
}
| public boolean act (float delta) {
if (complete) return true;
complete = true;
Array<Action> actions = this.actions;
for (int i = 0, n = actions.size; i < n; i++)
if (!actions.get(i).act(delta)) complete = false;
return complete;
}
|
protected final BulletTest[] tests = {new ShootTest(), new BasicShapesTest(), new KinematicTest(), new ConstraintsTest(),
new MeshShapeTest(), new ConvexHullTest(), new RayCastTest(), new RayPickRagdollTest(), new InternalTickTest(),
new CollisionWorldTest(), new CollisionTest(), new FrustumCullingTest(), new Co... | protected final BulletTest[] tests = {new ShootTest(), new BasicShapesTest(), new KinematicTest(), new ConstraintsTest(),
new MeshShapeTest(), new ConvexHullTest(), new RayCastTest(), new RayPickRagdollTest(), new InternalTickTest(),
new CollisionWorldTest(), new CollisionTest(), new FrustumCullingTest(), new Co... |
@Override protected GroupShardsIterator shards(BroadcastPingRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint(), null);
}
| @Override protected GroupShardsIterator shards(BroadcastPingRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint(), null, null);
}
|
@Override protected GroupShardsIterator shards(CountRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint(), request.routing());
}
| @Override protected GroupShardsIterator shards(CountRequest request, ClusterState clusterState) {
return clusterService.operationRouting().searchShards(clusterState, request.indices(), request.queryHint(), request.routing(), null);
}
|
@Override protected void doExecute(SearchRequest searchRequest, ActionListener<SearchResponse> listener) {
// optimize search type for cases where there is only one shard group to search on
if (optimizeSingleShard && searchRequest.searchType() != SCAN && searchRequest.searchType() != COUNT) {
... | @Override protected void doExecute(SearchRequest searchRequest, ActionListener<SearchResponse> listener) {
// optimize search type for cases where there is only one shard group to search on
if (optimizeSingleShard && searchRequest.searchType() != SCAN && searchRequest.searchType() != COUNT) {
... |
@Override public void run() {
// recheck here, since the cluster event can be called
if (indexShard.ignoreRecoveryAttempt()) {
return;
}
try {
RecoveryAction recoveryAction = indexService.shardInjector(sh... | @Override public void run() {
// recheck here, since the cluster event can be called
if (indexShard.ignoreRecoveryAttempt()) {
return;
}
try {
RecoveryAction recoveryAction = indexService.shardInjectorSaf... |
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 DocumentMapper documentMapperWithAutoCreate(String type) {
DocumentMapper mapper = mappers.get(type);
if (mapper != null) {
return mapper;
}
if (!dynamic) {
throw new TypeMissingException(index, type, "trying to auto create mapping, but dynamic mapping ... |
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(getString(string.filter_issues_title));
setContentView(layout.issue_filter_list);
}
| protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(getString(string.saved_filters_title));
setContentView(layout.issue_filter_list);
}
|
@Override protected ShardStatus shardOperation(IndexShardStatusRequest request) throws ElasticSearchException {
InternalIndexShard indexShard = (InternalIndexShard) indicesService.indexServiceSafe(request.index()).shard(request.shardId());
ShardStatus shardStatus = new ShardStatus(indexShard.routing... | @Override protected ShardStatus shardOperation(IndexShardStatusRequest request) throws ElasticSearchException {
InternalIndexShard indexShard = (InternalIndexShard) indicesService.indexServiceSafe(request.index()).shard(request.shardId());
ShardStatus shardStatus = new ShardStatus(indexShard.routing... |
private void parseMaterials (ModelData model, JsonValue json, String materialDir) {
JsonValue materials = json.get("materials");
if(materials == null) {
// we should probably create some default material in this case
}
else {
model.materials.ensureCapacity(materials.size());
for (JsonValue material = ... | private void parseMaterials (ModelData model, JsonValue json, String materialDir) {
JsonValue materials = json.get("materials");
if(materials == null) {
// we should probably create some default material in this case
}
else {
model.materials.ensureCapacity(materials.size());
for (JsonValue material = ... |
public BytesRef indexedValueForSearch(Object value) {
BytesRef bytesRef = new BytesRef();
NumericUtils.intToPrefixCoded(parseValue(value), precisionStep(), bytesRef);
return bytesRef;
}
| public BytesRef indexedValueForSearch(Object value) {
BytesRef bytesRef = new BytesRef();
NumericUtils.intToPrefixCoded(parseValue(value), 0, bytesRef); // 0 because of exact match
return bytesRef;
}
|
public BytesRef indexedValueForSearch(Object value) {
BytesRef bytesRef = new BytesRef();
NumericUtils.longToPrefixCoded(parseValue(value), precisionStep(), bytesRef);
return bytesRef;
}
| public BytesRef indexedValueForSearch(Object value) {
BytesRef bytesRef = new BytesRef();
NumericUtils.longToPrefixCoded(parseValue(value), 0, bytesRef); // 0 because of exact match
return bytesRef;
}
|
public BytesRef indexedValueForSearch(Object value) {
long longValue = NumericUtils.doubleToSortableLong(parseValue(value));
BytesRef bytesRef = new BytesRef();
NumericUtils.longToPrefixCoded(longValue, precisionStep(), bytesRef);
return bytesRef;
}
| public BytesRef indexedValueForSearch(Object value) {
long longValue = NumericUtils.doubleToSortableLong(parseValue(value));
BytesRef bytesRef = new BytesRef();
NumericUtils.longToPrefixCoded(longValue, 0, bytesRef); // 0 because of exact match
return bytesRef;
}
|
public BytesRef indexedValueForSearch(Object value) {
int intValue = NumericUtils.floatToSortableInt(parseValue(value));
BytesRef bytesRef = new BytesRef();
NumericUtils.intToPrefixCoded(intValue, precisionStep(), bytesRef);
return bytesRef;
}
| public BytesRef indexedValueForSearch(Object value) {
int intValue = NumericUtils.floatToSortableInt(parseValue(value));
BytesRef bytesRef = new BytesRef();
NumericUtils.intToPrefixCoded(intValue, 0, bytesRef); // 0 because of exact match
return bytesRef;
}
|
public BytesRef indexedValueForSearch(Object value) {
BytesRef bytesRef = new BytesRef();
NumericUtils.longToPrefixCoded(parseValue(value), precisionStep(), bytesRef);
return bytesRef;
}
| public BytesRef indexedValueForSearch(Object value) {
BytesRef bytesRef = new BytesRef();
NumericUtils.longToPrefixCoded(parseValue(value), 0, bytesRef); // 0 because of exact match
return bytesRef;
}
|
public BytesRef indexedValueForSearch(Object value) {
BytesRef bytesRef = new BytesRef();
NumericUtils.intToPrefixCoded(parseValue(value), precisionStep(), bytesRef);
return bytesRef;
}
| public BytesRef indexedValueForSearch(Object value) {
BytesRef bytesRef = new BytesRef();
NumericUtils.intToPrefixCoded(parseValue(value), 0, bytesRef); // 0 because of exact match
return bytesRef;
}
|
public static void main(String[] argv) {
// if(argv.length != 1 && argv.length != 2) {
// System.out.println("StillModelViewer <filename> ?<texture-filename>");
// System.exit(-1);
// }
// new JoglApplication(new StillModelViewer(argv[0], argv.length==2?argv[1]:null), "StillModel Viewer", 800, 480, false);
ne... | public static void main(String[] argv) {
// if(argv.length != 1 && argv.length != 2) {
// System.out.println("StillModelViewer <filename> ?<texture-filename>");
// System.exit(-1);
// }
// new JoglApplication(new StillModelViewer(argv[0], argv.length==2?argv[1]:null), "StillModel Viewer", 800, 480, false);
ne... |
public abstract SortField.Type reducedType();
}
interface Builder {
IndexFieldData build(Index index, @IndexSettings Settings indexSettings, FieldMapper.Names fieldNames, FieldDataType type, IndexFieldDataCache cache);
}
public interface WithOrdinals<FD extends AtomicFieldData.WithOrd... | public abstract SortField.Type reducedType();
}
interface Builder {
IndexFieldData build(Index index, @IndexSettings Settings indexSettings, FieldMapper<?> mapper, IndexFieldDataCache cache);
}
public interface WithOrdinals<FD extends AtomicFieldData.WithOrdinals> extends IndexFieldDa... |
public void setIndices (short[] indices, int offset, int count) {
isDirty = true;
buffer.clear();
buffer.put(indices, offset, count);
buffer.flip();
byteBuffer.position(0);
byteBuffer.limit(count << 1);
if (isBound) {
if (Gdx.gl11 != null) {
GL11 gl = Gdx.gl11;
// gl.glBufferData(GL11.GL_ELEMENT_... | public void setIndices (short[] indices, int offset, int count) {
isDirty = true;
buffer.clear();
buffer.put(indices, offset, count);
buffer.flip();
byteBuffer.position(0);
byteBuffer.limit(count << 1);
if (isBound) {
if (Gdx.gl11 != null) {
GL11 gl = Gdx.gl11;
// gl.glBufferData(GL11.GL_ELEMENT_... |
public void setRotation (Vector3 dir, Vector3 up) {
tmp.set(up).crs(dir).nor();
tmp2.set(dir).crs(tmp).nor();
rotation.setFromAxes(tmp.x, tmp.y, tmp.z, tmp2.x, tmp2.y, tmp2.z, dir.x, dir.y, dir.z);
updated = false;
}
| public void setRotation (Vector3 dir, Vector3 up) {
tmp.set(up).crs(dir).nor();
tmp2.set(dir).crs(tmp).nor();
rotation.setFromAxes(tmp.x, tmp2.x, dir.x, tmp.y, tmp2.y, dir.y, tmp.z, tmp2.z, dir.z);
updated = false;
}
|
private MetaData readMetaData(byte[] data) throws IOException {
XContentParser parser = null;
try {
if (LZF.isCompressed(data)) {
BytesStreamInput siBytes = new BytesStreamInput(data);
LZFStreamInput siLzf = CachedStreamInput.cachedLzf(siBytes);
... | private MetaData readMetaData(byte[] data) throws IOException {
XContentParser parser = null;
try {
if (LZF.isCompressed(data)) {
BytesStreamInput siBytes = new BytesStreamInput(data, false);
LZFStreamInput siLzf = CachedStreamInput.cachedLzf(siBytes);
... |
public static Translog.Source readSource(byte[] data) throws IOException {
BytesStreamInput in = new BytesStreamInput(data);
in.readInt(); // the size header
Translog.Operation.Type type = Translog.Operation.Type.fromId(in.readByte());
Translog.Operation operation;
switch (ty... | public static Translog.Source readSource(byte[] data) throws IOException {
BytesStreamInput in = new BytesStreamInput(data, false);
in.readInt(); // the size header
Translog.Operation.Type type = Translog.Operation.Type.fromId(in.readByte());
Translog.Operation operation;
swi... |
public boolean hasNext() {
try {
if (position > length) {
return false;
}
if (cacheBuffer == null) {
cacheBuffer = ByteBuffer.allocate(1024);
}
cacheBuffer.limit(4);
int bytesRead = channel.read(cacheBuff... | public boolean hasNext() {
try {
if (position > length) {
return false;
}
if (cacheBuffer == null) {
cacheBuffer = ByteBuffer.allocate(1024);
}
cacheBuffer.limit(4);
int bytesRead = channel.read(cacheBuff... |
public static void restDocumentSource(byte[] source, int offset, int length, XContentBuilder builder, ToXContent.Params params) throws IOException {
if (LZF.isCompressed(source, offset, length)) {
BytesStreamInput siBytes = new BytesStreamInput(source, offset, length);
LZFStreamInput... | public static void restDocumentSource(byte[] source, int offset, int length, XContentBuilder builder, ToXContent.Params params) throws IOException {
if (LZF.isCompressed(source, offset, length)) {
BytesStreamInput siBytes = new BytesStreamInput(source, offset, length, false);
LZFStre... |
public void run() {
targetTransport.messageReceived(data, action, LocalTransport.this, requestId);
}
});
} finally {
CachedStreamOutput.pushEntry(cachedEntry);
}
}
ThreadPool threadPool() {
return this.threadPoo... | public void run() {
targetTransport.messageReceived(data, action, LocalTransport.this, requestId);
}
});
} finally {
CachedStreamOutput.pushEntry(cachedEntry);
}
}
ThreadPool threadPool() {
return this.threadPoo... |
public void testRoutingTableSerialization() throws Exception {
MetaData metaData = newMetaDataBuilder()
.put(newIndexMetaDataBuilder("test").numberOfShards(10).numberOfReplicas(1))
.build();
RoutingTable routingTable = routingTable()
.add(indexRouting... | public void testRoutingTableSerialization() throws Exception {
MetaData metaData = newMetaDataBuilder()
.put(newIndexMetaDataBuilder("test").numberOfShards(10).numberOfReplicas(1))
.build();
RoutingTable routingTable = routingTable()
.add(indexRouting... |
public void testSimpleStreams() throws Exception {
BytesStreamOutput out = CachedStreamOutput.popEntry().cachedBytes();
out.writeBoolean(false);
out.writeByte((byte) 1);
out.writeShort((short) -1);
out.writeInt(-1);
out.writeVInt(2);
out.writeLong(-3);
... | public void testSimpleStreams() throws Exception {
BytesStreamOutput out = CachedStreamOutput.popEntry().cachedBytes();
out.writeBoolean(false);
out.writeByte((byte) 1);
out.writeShort((short) -1);
out.writeInt(-1);
out.writeVInt(2);
out.writeLong(-3);
... |
public void testSharedUTFHandles() throws Exception {
BytesStreamOutput bytesOut = new BytesStreamOutput();
HandlesStreamOutput out = new HandlesStreamOutput(bytesOut, 5);
String lowerThresholdValue = "test";
String higherThresholdValue = "something that is higher than 5";
ou... | public void testSharedUTFHandles() throws Exception {
BytesStreamOutput bytesOut = new BytesStreamOutput();
HandlesStreamOutput out = new HandlesStreamOutput(bytesOut, 5);
String lowerThresholdValue = "test";
String higherThresholdValue = "something that is higher than 5";
ou... |
public void buildNode1() throws Exception {
super.setUp();
Builder builder = ImmutableSettings.builder();
builder.put("cluster.routing.schedule", "100ms");
builder.put("gateway.type", "fs");
if (between(0, 5) == 0) {
builder.put("gateway.fs.buffer_size", between(1... | public void buildNode1() throws Exception {
super.setUp();
Builder builder = ImmutableSettings.builder();
builder.put("cluster.routing.schedule", "100ms");
builder.put("gateway.type", "fs");
if (between(0, 5) == 0) {
builder.put("gateway.fs.buffer_size", between(1... |
@Inject public Ec2Discovery(Settings settings, ClusterName clusterName, ThreadPool threadPool, TransportService transportService,
ClusterService clusterService, ZenPingService pingService, AwsEc2Service ec2Service) {
super(settings, clusterName, threadPool, transportService, ... | @Inject public Ec2Discovery(Settings settings, ClusterName clusterName, ThreadPool threadPool, TransportService transportService,
ClusterService clusterService, ZenPingService pingService, AwsEc2Service ec2Service) {
super(settings, clusterName, threadPool, transportService, ... |
public FieldComparator<BytesRef> setNextReader(AtomicReaderContext context) throws IOException {
docTerms = indexFieldData.load(context).getBytesValues(false);
return this;
}
| public FieldComparator<BytesRef> setNextReader(AtomicReaderContext context) throws IOException {
docTerms = indexFieldData.load(context).getBytesValues();
return this;
}
|
public AtomicFieldDataWithOrdinalsTermsEnum(AtomicFieldData.WithOrdinals afd) {
this.bytesValues = afd.getBytesValues(false);
this.ordinals = bytesValues.ordinals();
this.maxOrd = ordinals.getMaxOrd();
}
| public AtomicFieldDataWithOrdinalsTermsEnum(AtomicFieldData.WithOrdinals afd) {
this.bytesValues = afd.getBytesValues();
this.ordinals = bytesValues.ordinals();
this.maxOrd = ordinals.getMaxOrd();
}
|
public Strings getScriptValues() {
return new ScriptDocValues.Strings(getBytesValues(false));
}
| public Strings getScriptValues() {
return new ScriptDocValues.Strings(getBytesValues());
}
|
public void onDoc(int docId, BytesValues values) {
final int length = values.setDocument(docId);
int pendingMissing = 1;
total += length;
for (int i = 0; i < length; i++) {
final BytesRef value = values.nextValue();
onValue(docId, value, values.currentValueHas... | public void onDoc(int docId, BytesValues values) {
final int length = values.setDocument(docId);
int pendingMissing = 1;
total += length;
for (int i = 0; i < length; i++) {
final BytesRef value = values.nextValue();
onValue(docId, value, value.hashCode(), valu... |
public void testDocValue() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("test")
.startObject("properties")
.startObject("field")
.field("type", "binary")
.startObject("fielddata").field("format", "... | public void testDocValue() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("test")
.startObject("properties")
.startObject("field")
.field("type", "binary")
.startObject("fielddata").field("format", "... |
@Inject public InternalClusterService(Settings settings, DiscoveryService discoveryService, OperationRouting operationRouting, TransportService transportService, ThreadPool threadPool,
TimerService timerService) {
super(settings);
this.operationRouting = ope... | @Inject public InternalClusterService(Settings settings, DiscoveryService discoveryService, OperationRouting operationRouting, TransportService transportService, ThreadPool threadPool,
TimerService timerService) {
super(settings);
this.operationRouting = ope... |
private SearchContext createContext(InternalSearchRequest request) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(request.shardId());
SearchShardTarget shardTarget = new SearchShard... | private SearchContext createContext(InternalSearchRequest request) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(request.shardId());
SearchShardTarget shardTarget = new SearchShard... |
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.repo_search);
ActionBar actionBar = getSupportActionBar();
actionBar.setSubtitle(string.repositories_title);
actionBar.setDisplayHomeAsUpEnabled(true);
rep... | protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layout.repo_search);
ActionBar actionBar = getSupportActionBar();
actionBar.setSubtitle(string.repositories);
actionBar.setDisplayHomeAsUpEnabled(true);
repoFragm... |
public String getTitle(int position) {
switch (position) {
case 0:
return resources.getString(string.news);
case 1:
return resources.getString(string.repos);
case 2:
return resources.getString(defaultUser ? string.followers : string.members);
... | public String getTitle(int position) {
switch (position) {
case 0:
return resources.getString(string.news);
case 1:
return resources.getString(string.repositories);
case 2:
return resources.getString(defaultUser ? string.followers : string.members)... |
public String getTitle(final int position) {
switch (position) {
case 0:
return resources.getString(string.news);
case 1:
return resources.getString(string.repos);
case 2:
return resources.getString(string.followers);
case 3:
re... | public String getTitle(final int position) {
switch (position) {
case 0:
return resources.getString(string.news);
case 1:
return resources.getString(string.repositories);
case 2:
return resources.getString(string.followers);
case 3:
... |
public Preferences getPreferences (String name) {
return null;
}
| public Preferences getPreferences (String name) {
return new IOSPreferences();
}
|
protected ShardClearIndicesCacheResponse shardOperation(ShardClearIndicesCacheRequest request) throws ElasticsearchException {
IndexService service = indicesService.indexService(request.index());
if (service != null) {
// we always clear the query cache
service.cache().queryP... | protected ShardClearIndicesCacheResponse shardOperation(ShardClearIndicesCacheRequest request) throws ElasticsearchException {
IndexService service = indicesService.indexService(request.index());
if (service != null) {
// we always clear the query cache
service.cache().queryP... |
public Label (String text, LabelStyle style, String name) {
super(name);
if (text == null) throw new IllegalArgumentException("text cannot be null.");
this.text = text;
setStyle(style);
touchable = false;
}
| public Label (String text, LabelStyle style, String name) {
super(name);
if (text == null) text = "";
this.text = text;
setStyle(style);
touchable = false;
}
|
protected void onLoaded () {
if (currentlyLoading == null || currentlyLoading.isEmpty()) return;
instances.clear();
animationControllers.clear();
final ModelInstance instance = new ModelInstance(assets.get(currentlyLoading, Model.class));
instance.transform = transform;
instances.add(instance);
if (inst... | protected void onLoaded () {
if (currentlyLoading == null || currentlyLoading.length() == 0) return;
instances.clear();
animationControllers.clear();
final ModelInstance instance = new ModelInstance(assets.get(currentlyLoading, Model.class));
instance.transform = transform;
instances.add(instance);
if (... |
protected void onLoaded () {
if (currentlyLoading == null || currentlyLoading.isEmpty()) return;
if (loadingMaterial) {
loadingMaterial = false;
if (currentMaterial != null && !currentMaterial.equals(currentlyLoading)) assets.unload(currentMaterial);
currentMaterial = currentlyLoading;
currentlyLoadin... | protected void onLoaded () {
if (currentlyLoading == null || currentlyLoading.length() == 0) return;
if (loadingMaterial) {
loadingMaterial = false;
if (currentMaterial != null && !currentMaterial.equals(currentlyLoading)) assets.unload(currentMaterial);
currentMaterial = currentlyLoading;
currentlyLo... |
protected ShardStatus shardOperation(IndexShardStatusRequest request) throws ElasticsearchException {
InternalIndexService indexService = (InternalIndexService) indicesService.indexServiceSafe(request.index());
InternalIndexShard indexShard = (InternalIndexShard) indexService.shardSafe(request.shard... | protected ShardStatus shardOperation(IndexShardStatusRequest request) throws ElasticsearchException {
InternalIndexService indexService = (InternalIndexService) indicesService.indexServiceSafe(request.index());
InternalIndexShard indexShard = (InternalIndexShard) indexService.shardSafe(request.shard... |
protected ShardValidateQueryResponse shardOperation(ShardValidateQueryRequest request) throws ElasticsearchException {
IndexQueryParserService queryParserService = indicesService.indexServiceSafe(request.index()).queryParserService();
IndexService indexService = indicesService.indexServiceSafe(reque... | protected ShardValidateQueryResponse shardOperation(ShardValidateQueryRequest request) throws ElasticsearchException {
IndexQueryParserService queryParserService = indicesService.indexServiceSafe(request.index()).queryParserService();
IndexService indexService = indicesService.indexServiceSafe(reque... |
protected ShardCountResponse shardOperation(ShardCountRequest request) throws ElasticsearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(request.shardId());
SearchShardTarget shardTarget = new SearchS... | protected ShardCountResponse shardOperation(ShardCountRequest request) throws ElasticsearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(request.shardId());
SearchShardTarget shardTarget = new SearchS... |
protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticsearchException {
IndexService indexService = indicesService.indexService(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
Term uidTerm = new Term(UidFieldMapper.NAME, Uid.cr... | protected ExplainResponse shardOperation(ExplainRequest request, int shardId) throws ElasticsearchException {
IndexService indexService = indicesService.indexService(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
Term uidTerm = new Term(UidFieldMapper.NAME, Uid.cr... |
protected ShardSuggestResponse shardOperation(ShardSuggestRequest request) throws ElasticsearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(request.shardId());
final Engine.Searcher searcher = indexSh... | protected ShardSuggestResponse shardOperation(ShardSuggestRequest request) throws ElasticsearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(request.shardId());
final Engine.Searcher searcher = indexSh... |
public void operationComplete(ChannelFuture future) throws Exception {
releasable.release();
}
| public void operationComplete(ChannelFuture future) throws Exception {
releasable.close();
}
|
public void sendResponse(RestResponse response) {
// Decide whether to close the connection or not.
boolean http10 = nettyRequest.getProtocolVersion().equals(HttpVersion.HTTP_1_0);
boolean close =
HttpHeaders.Values.CLOSE.equalsIgnoreCase(nettyRequest.headers().get(HttpHeader... | public void sendResponse(RestResponse response) {
// Decide whether to close the connection or not.
boolean http10 = nettyRequest.getProtocolVersion().equals(HttpVersion.HTTP_1_0);
boolean close =
HttpHeaders.Values.CLOSE.equalsIgnoreCase(nettyRequest.headers().get(HttpHeader... |
private void loadQueries(IndexShard shard) {
try {
shard.refresh(new Engine.Refresh("percolator_load_queries").force(true));
// Maybe add a mode load? This isn't really a write. We need write b/c state=post_recovery
Engine.Searcher searcher = shard.acq... | private void loadQueries(IndexShard shard) {
try {
shard.refresh(new Engine.Refresh("percolator_load_queries").force(true));
// Maybe add a mode load? This isn't really a write. We need write b/c state=post_recovery
Engine.Searcher searcher = shard.acq... |
public void snapshot(final SnapshotId snapshotId, final IndexShardSnapshotStatus snapshotStatus) {
IndexShardRepository indexShardRepository = repositoriesService.indexShardRepository(snapshotId.getRepository());
if (!indexShard.routingEntry().primary()) {
throw new IndexShardSnapshotFai... | public void snapshot(final SnapshotId snapshotId, final IndexShardSnapshotStatus snapshotStatus) {
IndexShardRepository indexShardRepository = repositoriesService.indexShardRepository(snapshotId.getRepository());
if (!indexShard.routingEntry().primary()) {
throw new IndexShardSnapshotFai... |
public TermVectorResponse getTermVector(TermVectorRequest request) {
final Engine.Searcher searcher = indexShard.acquireSearcher("term_vector");
IndexReader topLevelReader = searcher.reader();
final TermVectorResponse termVectorResponse = new TermVectorResponse(request.index(), request.type(... | public TermVectorResponse getTermVector(TermVectorRequest request) {
final Engine.Searcher searcher = indexShard.acquireSearcher("term_vector");
IndexReader topLevelReader = searcher.reader();
final TermVectorResponse termVectorResponse = new TermVectorResponse(request.index(), request.type(... |
private void purgeShards(List<IndexShard> shardsToPurge) {
for (IndexShard shardToPurge : shardsToPurge) {
Query query = NumericRangeQuery.newLongRange(TTLFieldMapper.NAME, null, System.currentTimeMillis(), false, true);
Engine.Searcher searcher = shardToPurge.acquireSearcher("indice... | private void purgeShards(List<IndexShard> shardsToPurge) {
for (IndexShard shardToPurge : shardsToPurge) {
Query query = NumericRangeQuery.newLongRange(TTLFieldMapper.NAME, null, System.currentTimeMillis(), false, true);
Engine.Searcher searcher = shardToPurge.acquireSearcher("indice... |
public InternalGeoHashGrid reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalGeoHashGrid grid = (InternalGeoHashGrid) aggregations.get(0);
grid.reduceAndTrimBuckets(reduceContex... | public InternalGeoHashGrid reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalGeoHashGrid grid = (InternalGeoHashGrid) aggregations.get(0);
grid.reduceAndTrimBuckets(reduceContex... |
public InternalAggregation reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalHistogram<B> histo = (InternalHistogram<B>) aggregations.get(0);
if (minDocCount == 1) {
... | public InternalAggregation reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalHistogram<B> histo = (InternalHistogram<B>) aggregations.get(0);
if (minDocCount == 1) {
... |
public InternalTerms reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalTerms terms = (InternalTerms) aggregations.get(0);
terms.trimExcessEntries(reduceContext.bigArrays());
... | public InternalTerms reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalTerms terms = (InternalTerms) aggregations.get(0);
terms.trimExcessEntries(reduceContext.bigArrays());
... |
public InternalTerms reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalTerms terms = (InternalTerms) aggregations.get(0);
terms.trimExcessEntries(reduceContext.bigArrays());
... | public InternalTerms reduce(ReduceContext reduceContext) {
List<InternalAggregation> aggregations = reduceContext.aggregations();
if (aggregations.size() == 1) {
InternalTerms terms = (InternalTerms) aggregations.get(0);
terms.trimExcessEntries(reduceContext.bigArrays());
... |
public InternalFacet buildFacet(String facetName) {
InternalCountDateHistogramFacet.CountEntry[] countEntries = new InternalCountDateHistogramFacet.CountEntry[counts.v().size()];
final boolean[] states = counts.v().allocated;
final long[] keys = counts.v().keys;
final long[] values =... | public InternalFacet buildFacet(String facetName) {
InternalCountDateHistogramFacet.CountEntry[] countEntries = new InternalCountDateHistogramFacet.CountEntry[counts.v().size()];
final boolean[] states = counts.v().allocated;
final long[] keys = counts.v().keys;
final long[] values =... |
public Facet reduce(ReduceContext context) {
List<Facet> facets = context.facets();
if (facets.size() == 1) {
InternalCountDateHistogramFacet histoFacet = (InternalCountDateHistogramFacet) facets.get(0);
Arrays.sort(histoFacet.entries, histoFacet.comparatorType.comparator());... | public Facet reduce(ReduceContext context) {
List<Facet> facets = context.facets();
if (facets.size() == 1) {
InternalCountDateHistogramFacet histoFacet = (InternalCountDateHistogramFacet) facets.get(0);
Arrays.sort(histoFacet.entries, histoFacet.comparatorType.comparator());... |
public Facet reduce(ReduceContext context) {
List<Facet> facets = context.facets();
if (facets.size() == 1) {
// we need to sort it
InternalFullDateHistogramFacet internalFacet = (InternalFullDateHistogramFacet) facets.get(0);
List<FullEntry> entries = internalFac... | public Facet reduce(ReduceContext context) {
List<Facet> facets = context.facets();
if (facets.size() == 1) {
// we need to sort it
InternalFullDateHistogramFacet internalFacet = (InternalFullDateHistogramFacet) facets.get(0);
List<FullEntry> entries = internalFac... |
public InternalFacet buildFacet(String facetName) {
ArrayList<InternalFullDateHistogramFacet.FullEntry> entries1 = new ArrayList<>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) ... | public InternalFacet buildFacet(String facetName) {
ArrayList<InternalFullDateHistogramFacet.FullEntry> entries1 = new ArrayList<>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) ... |
public InternalFacet buildFacet(String facetName) {
ArrayList<InternalFullDateHistogramFacet.FullEntry> entries1 = new ArrayList<>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) ... | public InternalFacet buildFacet(String facetName) {
ArrayList<InternalFullDateHistogramFacet.FullEntry> entries1 = new ArrayList<>(entries.v().size());
final boolean[] states = entries.v().allocated;
final Object[] values = entries.v().values;
for (int i = 0; i < states.length; i++) ... |
public InternalFacet buildFacet(String facetName) {
InternalCountHistogramFacet.CountEntry[] entries = new InternalCountHistogramFacet.CountEntry[counts.v().size()];
final boolean[] states = counts.v().allocated;
final long[] keys = counts.v().keys;
final long[] values = counts.v().v... | public InternalFacet buildFacet(String facetName) {
InternalCountHistogramFacet.CountEntry[] entries = new InternalCountHistogramFacet.CountEntry[counts.v().size()];
final boolean[] states = counts.v().allocated;
final long[] keys = counts.v().keys;
final long[] values = counts.v().v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.