buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
boolean queryFound = false;
Set<String> indices = Sets.newHashSet();
String queryName = null;
String cur... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
boolean queryFound = false;
Set<String> indices = Sets.newHashSet();
String queryName = null;
String cur... |
public CompressedString(String str) throws IOException {
UnicodeUtil.UTF8Result result = Unicode.unsafeFromStringAsUtf8(str);
this.bytes = LZFEncoder.encodeWithCache(result.result, result.length);
}
| public CompressedString(String str) throws IOException {
UnicodeUtil.UTF8Result result = Unicode.unsafeFromStringAsUtf8(str);
this.bytes = LZFEncoder.encode(result.result, result.length);
}
|
@Override protected ThreadLocals.CleanableValue<Entry> initialValue() {
HandlesStreamInput handles = new HandlesStreamInput();
LZFStreamInput lzf = new LZFStreamInput();
return new ThreadLocals.CleanableValue<Entry>(new Entry(handles, lzf));
}
};
| @Override protected ThreadLocals.CleanableValue<Entry> initialValue() {
HandlesStreamInput handles = new HandlesStreamInput();
LZFStreamInput lzf = new LZFStreamInput(null, true);
return new ThreadLocals.CleanableValue<Entry>(new Entry(handles, lzf));
}
};
|
@Override protected ThreadLocals.CleanableValue<Entry> initialValue() {
BytesStreamOutput bytes = new BytesStreamOutput();
HandlesStreamOutput handles = new HandlesStreamOutput(bytes);
LZFStreamOutput lzf = new LZFStreamOutput(bytes);
return new ThreadLocals.Clean... | @Override protected ThreadLocals.CleanableValue<Entry> initialValue() {
BytesStreamOutput bytes = new BytesStreamOutput();
HandlesStreamOutput handles = new HandlesStreamOutput(bytes);
LZFStreamOutput lzf = new LZFStreamOutput(bytes, true);
return new ThreadLocals... |
public int drawText (AnimationState as, int x, int y, CharSequence str, int start, int end) {
FontState fontState = evalFontState(as);
x += fontState.offsetX;
y += fontState.offsetY + yOffset;
com.badlogic.gdx.graphics.Color color = renderer.getColor(fontState.color);
return bitmapFont.draw(renderer.spriteBa... | public int drawText (AnimationState as, int x, int y, CharSequence str, int start, int end) {
FontState fontState = evalFontState(as);
x += fontState.offsetX;
y += fontState.offsetY + yOffset;
com.badlogic.gdx.graphics.Color color = renderer.getColor(fontState.color);
return bitmapFont.draw(renderer.spriteBa... |
public void writeValue (Object value, Class knownClass, Class elementType) {
try {
if (value == null) {
writer.value(null);
return;
}
Type knownType = ReflectionCache.getType(knownClass);
Type actualType = ReflectionCache.getType(value.getClass());
if (actualType.isPrimitive() || actualType.... | public void writeValue (Object value, Class knownClass, Class elementType) {
try {
if (value == null) {
writer.value(null);
return;
}
Type knownType = ReflectionCache.getType(knownClass);
Type actualType = ReflectionCache.getType(value.getClass());
if (actualType.isPrimitive() || actualType.... |
public void writeValue (Object value, Class knownType, Class elementType) {
try {
if (value == null) {
writer.value(null);
return;
}
if ((knownType != null && knownType.isPrimitive()) || knownType == String.class || knownType == Integer.class
|| knownType == Boolean.class || knownType == Float.... | public void writeValue (Object value, Class knownType, Class elementType) {
try {
if (value == null) {
writer.value(null);
return;
}
if ((knownType != null && knownType.isPrimitive()) || knownType == String.class || knownType == Integer.class
|| knownType == Boolean.class || knownType == Float.... |
public IndexFieldData<?> build(Index index, @IndexSettings Settings indexSettings, FieldMapper<?> mapper, IndexFieldDataCache cache,
CircuitBreakerService breakerService) {
FieldDataType type = mapper.fieldDataType();
final String precisionAsString ... | public IndexFieldData<?> build(Index index, @IndexSettings Settings indexSettings, FieldMapper<?> mapper, IndexFieldDataCache cache,
CircuitBreakerService breakerService) {
FieldDataType type = mapper.fieldDataType();
final String precisionAsString ... |
public Mapper.Builder parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException {
Builder builder = geoShapeField(name);
for (Map.Entry<String, Object> entry : node.entrySet()) {
String fieldName = Strings.toUnderscoreCase(en... | public Mapper.Builder parse(String name, Map<String, Object> node, ParserContext parserContext) throws MapperParsingException {
Builder builder = geoShapeField(name);
for (Map.Entry<String, Object> entry : node.entrySet()) {
String fieldName = Strings.toUnderscoreCase(en... |
public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
String field = null;
List<RangeAggregator.Range> ranges = null;
GeoPoint origin = null;
DistanceUnit unit = DistanceUnit.KILOMETERS;
GeoDistance distance... | public AggregatorFactory parse(String aggregationName, XContentParser parser, SearchContext context) throws IOException {
String field = null;
List<RangeAggregator.Range> ranges = null;
GeoPoint origin = null;
DistanceUnit unit = DistanceUnit.DEFAULT;
GeoDistance distanceTyp... |
public FacetExecutor 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;
GeoPoint poin... | public FacetExecutor 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;
GeoPoint poin... |
public SortField parse(XContentParser parser, SearchContext context) throws Exception {
String fieldName = null;
GeoPoint point = new GeoPoint();
DistanceUnit unit = DistanceUnit.KILOMETERS;
GeoDistance geoDistance = GeoDistance.DEFAULT;
boolean reverse = false;
SortM... | public SortField parse(XContentParser parser, SearchContext context) throws Exception {
String fieldName = null;
GeoPoint point = new GeoPoint();
DistanceUnit unit = DistanceUnit.DEFAULT;
GeoDistance geoDistance = GeoDistance.DEFAULT;
boolean reverse = false;
SortMode... |
private void assertPrecision(Distance expected) throws Exception {
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = client().admin().indices().getMappings(new GetMappingsRequest().indices("test").types("type1")).actionGet().getMappings();
assertNotNull(mappings);
... | private void assertPrecision(Distance expected) throws Exception {
ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetaData>> mappings = client().admin().indices().getMappings(new GetMappingsRequest().indices("test").types("type1")).actionGet().getMappings();
assertNotNull(mappings);
... |
public void testThatTimestampCanBeSwitchedOnAndOff() throws Exception {
String index = "foo";
String type = "mytype";
XContentBuilder builder = jsonBuilder().startObject().startObject("_timestamp").field("enabled", true).field("store", true).endObject().endObject();
assertAcked(clie... | public void testThatTimestampCanBeSwitchedOnAndOff() throws Exception {
String index = "foo";
String type = "mytype";
XContentBuilder builder = jsonBuilder().startObject().startObject("_timestamp").field("enabled", true).field("store", true).endObject().endObject();
assertAcked(clie... |
public void remove () {
if (currentIndex < 0) throw new IllegalStateException("next must be called before remove.");
if (currentIndex >= map.capacity) {
map.removeStashIndex(currentIndex);
nextIndex = currentIndex;
findNextIndex();
} else {
map.keyTable[currentIndex] = null;
map.valueTabl... | public void remove () {
if (currentIndex < 0) throw new IllegalStateException("next must be called before remove.");
if (currentIndex >= map.capacity) {
map.removeStashIndex(currentIndex);
nextIndex = currentIndex - 1;
findNextIndex();
} else {
map.keyTable[currentIndex] = null;
map.value... |
public void remove () {
if (currentIndex == INDEX_ZERO && map.hasZeroValue) {
map.hasZeroValue = false;
} else if (currentIndex < 0) {
throw new IllegalStateException("next must be called before remove.");
} else if (currentIndex >= map.capacity) {
map.removeStashIndex(currentIndex);
nextInde... | public void remove () {
if (currentIndex == INDEX_ZERO && map.hasZeroValue) {
map.hasZeroValue = false;
} else if (currentIndex < 0) {
throw new IllegalStateException("next must be called before remove.");
} else if (currentIndex >= map.capacity) {
map.removeStashIndex(currentIndex);
nextInde... |
public void remove () {
if (currentIndex == INDEX_ZERO && map.hasZeroValue) {
map.zeroValue = null;
map.hasZeroValue = false;
} else if (currentIndex < 0) {
throw new IllegalStateException("next must be called before remove.");
} else if (currentIndex >= map.capacity) {
map.removeStashIndex(c... | public void remove () {
if (currentIndex == INDEX_ZERO && map.hasZeroValue) {
map.zeroValue = null;
map.hasZeroValue = false;
} else if (currentIndex < 0) {
throw new IllegalStateException("next must be called before remove.");
} else if (currentIndex >= map.capacity) {
map.removeStashIndex(c... |
public void remove () {
if (currentIndex < 0) throw new IllegalStateException("next must be called before remove.");
if (currentIndex >= map.capacity) {
map.removeStashIndex(currentIndex);
nextIndex = currentIndex;
findNextIndex();
} else {
map.keyTable[currentIndex] = null;
}
currentIn... | public void remove () {
if (currentIndex < 0) throw new IllegalStateException("next must be called before remove.");
if (currentIndex >= map.capacity) {
map.removeStashIndex(currentIndex);
nextIndex = currentIndex - 1;
findNextIndex();
} else {
map.keyTable[currentIndex] = null;
}
curre... |
public void remove () {
if (currentIndex < 0) throw new IllegalStateException("next must be called before remove.");
if (currentIndex >= map.capacity) {
map.removeStashIndex(currentIndex);
nextIndex = currentIndex;
advance();
} else {
map.keyTable[currentIndex] = null;
map.valueTable[curr... | public void remove () {
if (currentIndex < 0) throw new IllegalStateException("next must be called before remove.");
if (currentIndex >= map.capacity) {
map.removeStashIndex(currentIndex);
nextIndex = currentIndex - 1;
advance();
} else {
map.keyTable[currentIndex] = null;
map.valueTable[... |
public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(
AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class,
GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class,
... | public static final List<Class<? extends GdxTest>> tests = new ArrayList<Class<? extends GdxTest>>(Arrays.asList(
AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class,
GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class,
... |
public LwjglApplication (ApplicationListener listener) {
this(listener, new LwjglApplicationConfiguration());
}
| public LwjglApplication (ApplicationListener listener) {
this(listener, listener.getClass().getSimpleName(), 640, 480, false);
}
|
public JglfwTestStarter () throws HeadlessException {
super("libgdx Tests");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(new TestList());
pack();
setSize(getWidth(), 600);
setLocationRelativeTo(null);
setVisible(true);
}
| public JglfwTestStarter () throws HeadlessException {
super("JGLFW libgdx Tests");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(new TestList());
pack();
setSize(getWidth(), 600);
setLocationRelativeTo(null);
setVisible(true);
}
|
private byte[] nodeMessagePayload() throws IOException {
ByteArrayDataOutputStream os = new ByteArrayDataOutputStream();
localNode.writeTo(os);
os.close();
return os.unsafeByteArray();
}
| private byte[] nodeMessagePayload() throws IOException {
ByteArrayDataOutputStream os = new ByteArrayDataOutputStream();
localNode.writeTo(os);
os.close();
return os.copiedByteArray();
}
|
@Inject public LogByteSizeMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsBytesSize("min_merge_size", new ByteSizeValue((long) (LogByteSi... | @Inject public LogByteSizeMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeSize = componentSettings.getAsBytesSize("min_merge_size", new ByteSizeValue((long) (LogByteSi... |
@Inject public LogDocMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeDocs = componentSettings.getAsInt("min_merge_docs", LogDocMergePolicy.DEFAULT_MIN_MERGE_DOCS);
... | @Inject public LogDocMergePolicyProvider(Store store) {
super(store.shardId(), store.indexSettings());
Preconditions.checkNotNull(store, "Store must be provided to merge policy");
this.minMergeDocs = componentSettings.getAsInt("min_merge_docs", LogDocMergePolicy.DEFAULT_MIN_MERGE_DOCS);
... |
@Inject public ConcurrentMergeSchedulerProvider(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.maxThreadCount = componentSettings.getAsInt("max_thread_count", 1);
logger.debug("Using [concurrent] merge scheduler with max_thread_count[{}]", maxT... | @Inject public ConcurrentMergeSchedulerProvider(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
this.maxThreadCount = componentSettings.getAsInt("max_thread_count", 1);
logger.debug("using [concurrent] merge scheduler with max_thread_count[{}]", maxT... |
@Inject public SerialMergeSchedulerProvider(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
logger.trace("Using [serial] merge scheduler");
}
| @Inject public SerialMergeSchedulerProvider(ShardId shardId, @IndexSettings Settings indexSettings) {
super(shardId, indexSettings);
logger.trace("using [serial] merge scheduler");
}
|
public Pixmap getGlyphBitmap(char character) {
Rect rect = new Rect();
paint.getTextBounds( "" + character, 0, 1, rect );
Bitmap bitmap = Bitmap.createBitmap( rect.width()==0?1:rect.width() + 5, getLineHeight(), Bitmap.Config.ARGB_4444 );
Canvas g = new Canvas( bitmap );
// paint.setAntiAlias(true);
paint... | public Pixmap getGlyphBitmap(char character) {
Rect rect = new Rect();
paint.getTextBounds( "" + character, 0, 1, rect );
Bitmap bitmap = Bitmap.createBitmap( rect.width()==0?1:rect.width() + 5, getLineHeight(), Bitmap.Config.ARGB_8888 );
Canvas g = new Canvas( bitmap );
// paint.setAntiAlias(true);
paint... |
public void surfaceCreated(Application app)
{
if( text == null )
{
cam = new OrthographicCamera();
font = app.getGraphics().newFont( app.getFiles().getInternalFileHandle( "data/arial.ttf"), 12, FontStyle.Plain, true );
text = font.newText( );
text.setText( "This is a test\nIt is a multline text!\ny... | public void surfaceCreated(Application app)
{
if( text == null )
{
cam = new OrthographicCamera();
font = app.getGraphics().newFont( app.getFiles().getInternalFileHandle( "data/arial.ttf"), 11, FontStyle.Plain, true );
text = font.newText( );
text.setText( "This is a test\nIt is a multline text!\ny... |
public AbstractStringTermsAggregator(String name, AggregatorFactories factories,
long estimatedBucketsCount, AggregationContext context, Aggregator parent,
Terms.Order order, BucketCountThresholds bucketCountThresholds, SubAggCollectionMode subAggCollectMode, boolean showTermDocCountError) {... | public AbstractStringTermsAggregator(String name, AggregatorFactories factories,
long estimatedBucketsCount, AggregationContext context, Aggregator parent,
InternalOrder order, BucketCountThresholds bucketCountThresholds, SubAggCollectionMode subAggCollectMode, boolean showTermDocCountError)... |
public DoubleTermsAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, @Nullable ValueFormat format, long estimatedBucketCount,
Terms.Order order, BucketCountThresholds bucketCountThresholds, AggregationContext aggregationContext, Aggregator parent, SubAggCollectionM... | public DoubleTermsAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, @Nullable ValueFormat format, long estimatedBucketCount,
InternalOrder order, BucketCountThresholds bucketCountThresholds, AggregationContext aggregationContext, Aggregator parent, SubAggCollectio... |
public LongTermsAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, @Nullable ValueFormat format, long estimatedBucketCount,
Terms.Order order, BucketCountThresholds bucketCountThresholds, AggregationContext aggregationContext, Aggregator parent, SubAggCollectionMod... | public LongTermsAggregator(String name, AggregatorFactories factories, ValuesSource.Numeric valuesSource, @Nullable ValueFormat format, long estimatedBucketCount,
InternalOrder order, BucketCountThresholds bucketCountThresholds, AggregationContext aggregationContext, Aggregator parent, SubAggCollectionM... |
public StringTermsAggregator(String name, AggregatorFactories factories, ValuesSource valuesSource, long estimatedBucketCount,
Terms.Order order, BucketCountThresholds bucketCountThresholds,
IncludeExclude includeExclude, AggregationContext aggregationContext, Aggregator... | public StringTermsAggregator(String name, AggregatorFactories factories, ValuesSource valuesSource, long estimatedBucketCount,
InternalOrder order, BucketCountThresholds bucketCountThresholds,
IncludeExclude includeExclude, AggregationContext aggregationContext, Aggregat... |
protected void configure() {
bind(GatewayAllocator.class).to(gatewayAllocator).asEagerSingleton();
bind(ShardsAllocator.class).to(shardsAllocator == null ? EvenShardsCountAllocator.class : shardsAllocator).asEagerSingleton();
}
| protected void configure() {
bind(GatewayAllocator.class).to(gatewayAllocator).asEagerSingleton();
bind(ShardsAllocator.class).to(shardsAllocator == null ? BalancedShardsAllocator.class : shardsAllocator).asEagerSingleton();
}
|
public ShardsAllocators(Settings settings) {
this(settings, new NoneGatewayAllocator(), new EvenShardsCountAllocator(settings));
}
| public ShardsAllocators(Settings settings) {
this(settings, new NoneGatewayAllocator(), new BalancedShardsAllocator(settings));
}
|
public void testAlways() {
AllocationService strategy = new AllocationService(settingsBuilder().put("cluster.routing.allocation.allow_rebalance", ClusterRebalanceAllocationDecider.ClusterRebalanceType.ALWAYS.toString()).build());
MetaData metaData = newMetaDataBuilder()
.put(newInde... | public void testAlways() {
AllocationService strategy = new AllocationService(settingsBuilder().put("cluster.routing.allocation.allow_rebalance", ClusterRebalanceAllocationDecider.ClusterRebalanceType.ALWAYS.toString()).build());
MetaData metaData = newMetaDataBuilder()
.put(newInde... |
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) {
String[] awarenessAttributes = awarenessAllocationDecider.awarenessAttributes();
if (awarenessAttr... |
public void shardsCleanup() {
try {
client1.admin().indices().prepareDelete("test").execute().actionGet();
} catch (Exception ex) {
// Ignore
}
logger.info("--> creating index [test] with one shard and on replica");
client1.admin().indices().create(cr... | public void shardsCleanup() {
try {
client1.admin().indices().prepareDelete("test").execute().actionGet();
} catch (Exception ex) {
// Ignore
}
logger.info("--> creating index [test] with one shard and on replica");
client1.admin().indices().create(cr... |
@Override public void writeTo(StreamOutput out) throws IOException {
index.writeTo(out);
out.writeInt(shardId);
}
| @Override public void writeTo(StreamOutput out) throws IOException {
index.writeTo(out);
out.writeVInt(shardId);
}
|
public void handleRequest(final RestRequest request, final RestChannel channel) {
ClusterHealthRequest clusterHealthRequest = clusterHealthRequest(Strings.splitStringByCommaToArray(request.param("index")));
clusterHealthRequest.local(request.paramAsBoolean("local", clusterHealthRequest.local()));
... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
ClusterHealthRequest clusterHealthRequest = clusterHealthRequest(Strings.splitStringByCommaToArray(request.param("index")));
clusterHealthRequest.local(request.paramAsBoolean("local", clusterHealth... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
String[] nodesIds = Strings.splitStringByCommaToArray(request.param("nodeId"));
Set<String> metrics = Strings.splitStringByCommaToSet(request.param("metric", "_all"));
NodesStatsRequest nodesStatsRequest = new... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
String[] nodesIds = Strings.splitStringByCommaToArray(request.param("nodeId"));
Set<String> metrics = Strings.splitStringByCommaToSet(request.param("metric", "_all"));
NodesStatsRequest no... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
DeleteRepositoryRequest deleteRepositoryRequest = deleteRepositoryRequest(request.param("repository"));
deleteRepositoryRequest.masterNodeTimeout(request.paramAsTime("master_timeout", deleteRepositoryRequest.masterNode... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
DeleteRepositoryRequest deleteRepositoryRequest = deleteRepositoryRequest(request.param("repository"));
deleteRepositoryRequest.masterNodeTimeout(request.paramAsTime("master_timeout", deleteReposit... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
PutRepositoryRequest putRepositoryRequest = putRepositoryRequest(request.param("repository"));
putRepositoryRequest.listenerThreaded(false);
putRepositoryRequest.source(request.content().toUtf8());
putR... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
PutRepositoryRequest putRepositoryRequest = putRepositoryRequest(request.param("repository"));
putRepositoryRequest.listenerThreaded(false);
putRepositoryRequest.source(request.content().to... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
final ClusterSearchShardsRequest clusterSearchShardsRequest = Requests.clusterSearchShardsRequest(indices);
clusterSearchShardsReque... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
final ClusterSearchShardsRequest clusterSearchShardsRequest = Requests.clusterSearchShardsRequest(indices);
clu... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
CreateSnapshotRequest createSnapshotRequest = createSnapshotRequest(request.param("repository"), request.param("snapshot"));
createSnapshotRequest.listenerThreaded(false);
createSnapshotRequest.source(request.c... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
CreateSnapshotRequest createSnapshotRequest = createSnapshotRequest(request.param("repository"), request.param("snapshot"));
createSnapshotRequest.listenerThreaded(false);
createSnapshotReq... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
DeleteSnapshotRequest deleteSnapshotRequest = deleteSnapshotRequest(request.param("repository"), request.param("snapshot"));
deleteSnapshotRequest.masterNodeTimeout(request.paramAsTime("master_timeout", deleteSnapshotR... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
DeleteSnapshotRequest deleteSnapshotRequest = deleteSnapshotRequest(request.param("repository"), request.param("snapshot"));
deleteSnapshotRequest.masterNodeTimeout(request.paramAsTime("master_time... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
String repository = request.param("repository");
String[] snapshots = request.paramAsStringArray("snapshot", Strings.EMPTY_ARRAY);
if (snapshots.length == 1 && "_all".equalsIgnoreCase(snapshots[0])) {
... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
String repository = request.param("repository");
String[] snapshots = request.paramAsStringArray("snapshot", Strings.EMPTY_ARRAY);
if (snapshots.length == 1 && "_all".equalsIgnoreCase(snaps... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
RestoreSnapshotRequest restoreSnapshotRequest = restoreSnapshotRequest(request.param("repository"), request.param("snapshot"));
restoreSnapshotRequest.masterNodeTimeout(request.paramAsTime("master_timeout", restoreSnap... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
RestoreSnapshotRequest restoreSnapshotRequest = restoreSnapshotRequest(request.param("repository"), request.param("snapshot"));
restoreSnapshotRequest.masterNodeTimeout(request.paramAsTime("master_... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
String repository = request.param("repository", "_all");
String[] snapshots = request.paramAsStringArray("snapshot", Strings.EMPTY_ARRAY);
if (snapshots.length == 1 && "_all".equalsIgnoreCase(snapshots[0])) {
... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
String repository = request.param("repository", "_all");
String[] snapshots = request.paramAsStringArray("snapshot", Strings.EMPTY_ARRAY);
if (snapshots.length == 1 && "_all".equalsIgnoreCa... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
ClusterStatsRequest clusterStatsRequest = new ClusterStatsRequest().nodesIds(request.paramAsStringArray("nodeId", null));
clusterStatsRequest.listenerThreaded(false);
client.admin().cluster().clusterStats(clust... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
ClusterStatsRequest clusterStatsRequest = new ClusterStatsRequest().nodesIds(request.paramAsStringArray("nodeId", null));
clusterStatsRequest.listenerThreaded(false);
client.admin().cluster... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
PendingClusterTasksRequest pendingClusterTasksRequest = new PendingClusterTasksRequest();
pendingClusterTasksRequest.masterNodeTimeout(request.paramAsTime("master_timeout", pendingClusterTasksRequest.masterNodeTimeout(... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
PendingClusterTasksRequest pendingClusterTasksRequest = new PendingClusterTasksRequest();
pendingClusterTasksRequest.masterNodeTimeout(request.paramAsTime("master_timeout", pendingClusterTasksReque... |
public void handleRequest(final RestRequest request, final RestChannel channel) throws Exception {
IndicesAliasesRequest indicesAliasesRequest = new IndicesAliasesRequest();
indicesAliasesRequest.listenerThreaded(false);
indicesAliasesRequest.masterNodeTimeout(request.paramAsTime("master_tim... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) throws Exception {
IndicesAliasesRequest indicesAliasesRequest = new IndicesAliasesRequest();
indicesAliasesRequest.listenerThreaded(false);
indicesAliasesRequest.masterNodeTimeout(request.pa... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
final String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
final String[] aliases = Strings.splitStringByCommaToArray(request.param("name"));
IndicesAliasesRequest indicesAliasesRequest... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
final String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
final String[] aliases = Strings.splitStringByCommaToArray(request.param("name"));
IndicesAliasesRequest ... |
public void handleRequest(final RestRequest request, final RestChannel channel) throws Exception {
String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
String alias = request.param("name");
Map<String, Object> filter = null;
String routing = null;
Str... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) throws Exception {
String[] indices = Strings.splitStringByCommaToArray(request.param("index"));
String alias = request.param("name");
Map<String, Object> filter = null;
String routin... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
String text = request.param("text");
if (text == null && request.hasContent()) {
text = request.content().toUtf8();
}
if (text == null) {
throw new ElasticsearchIllegalArgumentEx... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
String text = request.param("text");
if (text == null && request.hasContent()) {
text = request.content().toUtf8();
}
if (text == null) {
throw new Elasticse... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
CloseIndexRequest closeIndexRequest = new CloseIndexRequest(Strings.splitStringByCommaToArray(request.param("index")));
closeIndexRequest.listenerThreaded(false);
closeIndexRequest.masterNodeTimeout(request.par... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
CloseIndexRequest closeIndexRequest = new CloseIndexRequest(Strings.splitStringByCommaToArray(request.param("index")));
closeIndexRequest.listenerThreaded(false);
closeIndexRequest.masterNo... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
CreateIndexRequest createIndexRequest = new CreateIndexRequest(request.param("index"));
createIndexRequest.listenerThreaded(false);
if (request.hasContent()) {
createIndexRequest.source(request.cont... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
CreateIndexRequest createIndexRequest = new CreateIndexRequest(request.param("index"));
createIndexRequest.listenerThreaded(false);
if (request.hasContent()) {
createIndexReques... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest(Strings.splitStringByCommaToArray(request.param("index")));
deleteIndexRequest.listenerThreaded(false);
deleteIndexRequest.timeout(request.paramAsT... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
DeleteIndexRequest deleteIndexRequest = new DeleteIndexRequest(Strings.splitStringByCommaToArray(request.param("index")));
deleteIndexRequest.listenerThreaded(false);
deleteIndexRequest.tim... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
DeleteMappingRequest deleteMappingRequest = deleteMappingRequest(Strings.splitStringByCommaToArray(request.param("index")));
deleteMappingRequest.listenerThreaded(false);
deleteMappingRequest.types(Strings.spli... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
DeleteMappingRequest deleteMappingRequest = deleteMappingRequest(Strings.splitStringByCommaToArray(request.param("index")));
deleteMappingRequest.listenerThreaded(false);
deleteMappingReque... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
PutMappingRequest putMappingRequest = putMappingRequest(Strings.splitStringByCommaToArray(request.param("index")));
putMappingRequest.listenerThreaded(false);
putMappingRequest.type(request.param("type"));
... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
PutMappingRequest putMappingRequest = putMappingRequest(Strings.splitStringByCommaToArray(request.param("index")));
putMappingRequest.listenerThreaded(false);
putMappingRequest.type(request... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
OpenIndexRequest openIndexRequest = new OpenIndexRequest(Strings.splitStringByCommaToArray(request.param("index")));
openIndexRequest.listenerThreaded(false);
openIndexRequest.timeout(request.paramAsTime("timeo... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
OpenIndexRequest openIndexRequest = new OpenIndexRequest(Strings.splitStringByCommaToArray(request.param("index")));
openIndexRequest.listenerThreaded(false);
openIndexRequest.timeout(reque... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
UpdateSettingsRequest updateSettingsRequest = updateSettingsRequest(Strings.splitStringByCommaToArray(request.param("index")));
updateSettingsRequest.listenerThreaded(false);
updateSettingsRequest.timeout(reque... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
UpdateSettingsRequest updateSettingsRequest = updateSettingsRequest(Strings.splitStringByCommaToArray(request.param("index")));
updateSettingsRequest.listenerThreaded(false);
updateSettings... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
DeleteIndexTemplateRequest deleteIndexTemplateRequest = new DeleteIndexTemplateRequest(request.param("name"));
deleteIndexTemplateRequest.listenerThreaded(false);
deleteIndexTemplateRequest.masterNodeTimeout(re... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
DeleteIndexTemplateRequest deleteIndexTemplateRequest = new DeleteIndexTemplateRequest(request.param("name"));
deleteIndexTemplateRequest.listenerThreaded(false);
deleteIndexTemplateRequest... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
PutIndexTemplateRequest putRequest = new PutIndexTemplateRequest(request.param("name"));
putRequest.listenerThreaded(false);
putRequest.template(request.param("template", putRequest.template()));
putReq... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
PutIndexTemplateRequest putRequest = new PutIndexTemplateRequest(request.param("name"));
putRequest.listenerThreaded(false);
putRequest.template(request.param("template", putRequest.templat... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
DeleteWarmerRequest deleteWarmerRequest = new DeleteWarmerRequest(Strings.splitStringByCommaToArray(request.param("name")))
.indices(Strings.splitStringByCommaToArray(request.param("index")));
deleteWar... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
DeleteWarmerRequest deleteWarmerRequest = new DeleteWarmerRequest(Strings.splitStringByCommaToArray(request.param("name")))
.indices(Strings.splitStringByCommaToArray(request.param("index")... |
public void handleRequest(final RestRequest request, final RestChannel channel) {
PutWarmerRequest putWarmerRequest = new PutWarmerRequest(request.param("name"));
putWarmerRequest.listenerThreaded(false);
SearchRequest searchRequest = new SearchRequest(Strings.splitStringByCommaToArray(reque... | public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
PutWarmerRequest putWarmerRequest = new PutWarmerRequest(request.param("name"));
putWarmerRequest.listenerThreaded(false);
SearchRequest searchRequest = new SearchRequest(Strings.splitStrin... |
public void handleRequest(RestRequest request, RestChannel channel) {
if ("password".equals(request.header("Secret"))) {
RestResponse response = new BytesRestResponse(RestStatus.OK, "Access granted");
response.addHeader("Secret", "granted");
channel.sendResponse(response)... | public void handleRequest(RestRequest request, RestChannel channel, Client client) {
if ("password".equals(request.header("Secret"))) {
RestResponse response = new BytesRestResponse(RestStatus.OK, "Access granted");
response.addHeader("Secret", "granted");
channel.sendRes... |
@Inject public BlockingThreadPool(Settings settings) {
super(settings);
this.scheduledSize = componentSettings.getAsInt("scheduled_size", 20);
this.min = componentSettings.getAsInt("min", 10);
this.max = componentSettings.getAsInt("max", 100);
// capacity is set to 0 as it m... | @Inject public BlockingThreadPool(Settings settings) {
super(settings);
this.scheduledSize = componentSettings.getAsInt("scheduled_size", 20);
this.min = componentSettings.getAsInt("min", 10);
this.max = componentSettings.getAsInt("max", 100);
// capacity is set to 0 as it m... |
@Inject public CachedThreadPool(Settings settings) {
super(settings);
this.scheduledSize = componentSettings.getAsInt("scheduled_size", 20);
this.keepAlive = componentSettings.getAsTime("keep_alive", timeValueSeconds(60));
logger.debug("Initializing {} thread pool with keep_alive[{}]... | @Inject public CachedThreadPool(Settings settings) {
super(settings);
this.scheduledSize = componentSettings.getAsInt("scheduled_size", 20);
this.keepAlive = componentSettings.getAsTime("keep_alive", timeValueMinutes(60));
logger.debug("Initializing {} thread pool with keep_alive[{}]... |
@Inject public ScalingThreadPool(Settings settings) {
super(settings);
this.min = componentSettings.getAsInt("min", 10);
this.max = componentSettings.getAsInt("max", 100);
this.keepAlive = componentSettings.getAsTime("keep_alive", timeValueSeconds(60));
this.scheduledSize = c... | @Inject public ScalingThreadPool(Settings settings) {
super(settings);
this.min = componentSettings.getAsInt("min", 10);
this.max = componentSettings.getAsInt("max", 100);
this.keepAlive = componentSettings.getAsTime("keep_alive", timeValueMinutes(60));
this.scheduledSize = c... |
public float standardDeviation()
{
if( !hasEnoughData() )
return 0;
float mean = getMean();
float sum = 0;
for( int i = 0; i < values.length; i++ )
{
sum += (values[i] - mean) * (values[i] - mean);
}
return (float)Math.sqrt( sum / values.length );
}
| public float standardDeviation()
{
if( !hasEnoughData() )
return 0;
float mean = getMean();
float sum = 0;
for( int i = 0; i < values.length; i++ )
{
sum += (values[i] - mean) * (values[i] - mean);
}
return FastMath.sqrt( sum / values.length );
}
|
@Override protected void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(CustomBoostFactorQueryParser.NAME);
builder.field("query");
queryBuilder.toXContent(builder, params);
builder.field("indices", indices);
builder.endObject();
... | @Override protected void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(IndicesQueryParser.NAME);
builder.field("query");
queryBuilder.toXContent(builder, params);
builder.field("indices", indices);
builder.endObject();
}
|
private final static ImmutableMap<Tuple<String, String>, IndexFieldData.Builder> buildersByTypeAndFormat;
static {
buildersByType = MapBuilder.<String, IndexFieldData.Builder>newMapBuilder()
.put("string", new ConcreteBytesRefIndexFieldData.Builder())
.put("float", new F... | private final static ImmutableMap<Tuple<String, String>, IndexFieldData.Builder> buildersByTypeAndFormat;
static {
buildersByType = MapBuilder.<String, IndexFieldData.Builder>newMapBuilder()
.put("string", new ConcreteBytesRefIndexFieldData.Builder())
.put("float", new F... |
public ByteArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new ByteArrayAtomicFieldData.Single(new byte[0], 0);
}
| public ByteArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new ByteArrayAtomicFieldData.SingleFixedSet(new byte[1], 0, new... |
public DoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new DoubleArrayAtomicFieldData.Single(new double[0], 0);
... | public DoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new DoubleArrayAtomicFieldData.SingleFixedSet(new double[1], ... |
public FloatArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new FloatArrayAtomicFieldData.Single(new float[0], 0);
... | public FloatArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new FloatArrayAtomicFieldData.SingleFixedSet(new float[1], 0, ... |
public GeoPointDoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new GeoPointDoubleArrayAtomicFieldData.Single(new dou... | public GeoPointDoubleArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new GeoPointDoubleArrayAtomicFieldData.SingleFixedSet... |
public IntArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new IntArrayAtomicFieldData.Single(new int[0], 0);
}
| public IntArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new IntArrayAtomicFieldData.SingleFixedSet(new int[1], 0, new Fi... |
public LongArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new LongArrayAtomicFieldData.Single(new long[0], 0);
}
| public LongArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new LongArrayAtomicFieldData.SingleFixedSet(new long[1], 0, new... |
public ShortArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new ShortArrayAtomicFieldData.Single(new short[0], 0);
... | public ShortArrayAtomicFieldData loadDirect(AtomicReaderContext context) throws Exception {
AtomicReader reader = context.reader();
Terms terms = reader.terms(getFieldNames().indexName());
if (terms == null) {
return new ShortArrayAtomicFieldData.SingleFixedSet(new short[1], 0, ... |
private void addSortField(SearchContext context, List<SortField> sortFields, String fieldName, boolean reverse, boolean ignoreUnmapped, @Nullable final String missing) {
if (SCORE_FIELD_NAME.equals(fieldName)) {
if (reverse) {
sortFields.add(SORT_SCORE_REVERSE);
} els... | private void addSortField(SearchContext context, List<SortField> sortFields, String fieldName, boolean reverse, boolean ignoreUnmapped, @Nullable final String missing) {
if (SCORE_FIELD_NAME.equals(fieldName)) {
if (reverse) {
sortFields.add(SORT_SCORE_REVERSE);
} els... |
public void setEnvironment (String name) {
if (name == null) return;
if (cubemap != null) {
cubemap.dispose();
cubemap = null;
}
if (name.equals("<none>")) {
if (lights.has(CubemapAttribute.EnvironmentMap)) {
lights.remove(CubemapAttribute.EnvironmentMap);
shaderProvider.clear();
}
} else... | public void setEnvironment (String name) {
if (name == null) return;
if (cubemap != null) {
cubemap.dispose();
cubemap = null;
}
if (name.equals("<none>")) {
if (lights.has(CubemapAttribute.EnvironmentMap)) {
lights.remove(CubemapAttribute.EnvironmentMap);
shaderProvider.clear();
}
} else... |
public List<User> load(final Account account) {
List<User> orgs;
try {
orgs = accountDataManager.getOrgs();
} catch (final IOException e) {
Log.e(TAG, "Exception loading organizations", e);
ToastUtils.show(activity, e, string.error_orgs_load);
... | public List<User> load(final Account account) {
List<User> orgs;
try {
orgs = accountDataManager.getOrgs(false);
} catch (final IOException e) {
Log.e(TAG, "Exception loading organizations", e);
ToastUtils.show(activity, e, string.error_orgs_load);
... |
private void drawAABB (Fixture fixture, Transform transform) {
if (fixture.getType() == Type.Circle) {
CircleShape shape = (CircleShape)fixture.getShape();
float radius = shape.getRadius();
vertices[0].set(shape.getPosition());
transform.mul(vertices[0]);
lower.set(vertices[0].x - radius, vertices[0]... | private void drawAABB (Fixture fixture, Transform transform) {
if (fixture.getType() == Type.Circle) {
CircleShape shape = (CircleShape)fixture.getShape();
float radius = shape.getRadius();
vertices[0].set(shape.getPosition());
vertices[0].rotate(transform.getRotation()).add(transform.getPosition());
... |
@Override public void parse(XContentParser parser, SearchContext context) throws Exception {
XContentParser.Token token;
String topLevelFieldName = null;
List<SearchContextHighlight.Field> fields = newArrayList();
String[] globalPreTags = DEFAULT_PRE_TAGS;
String[] globalPos... | @Override public void parse(XContentParser parser, SearchContext context) throws Exception {
XContentParser.Token token;
String topLevelFieldName = null;
List<SearchContextHighlight.Field> fields = newArrayList();
String[] globalPreTags = DEFAULT_PRE_TAGS;
String[] globalPos... |
public void create() {
texture = Gdx.graphics.newTexture(Gdx.files.internal("data/badlogicsmall.jpg"), TextureFilter.Linear, TextureFilter.Linear, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
vaBatch = new SpriteBatch(1000);
vboBatch = new SpriteBatch(1000, VertexDataType.VertexBufferObject);
cache = new... | public void create() {
texture = Gdx.graphics.newTexture(Gdx.files.internal("data/badlogicsmall.jpg"), TextureFilter.Linear, TextureFilter.Linear, TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
vaBatch = new SpriteBatch(1000);
vboBatch = new SpriteBatch(1000, 1, VertexDataType.VertexBufferObject);
cache = ... |
public static void main (String[] argv) {
// this is only here for me to debug native code faster
// new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
// new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
// new Sha... | public static void main (String[] argv) {
// this is only here for me to debug native code faster
// new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
// new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
// new Sha... |
public BulletConstructor (final Model model, final float mass) {
final BoundingBox boundingBox = new BoundingBox();
model.calculateBoundingBox(boundingBox);
final Vector3 dimensions = boundingBox.getDimensions();
create(model, mass, dimensions.x, dimensions.y, dimensions.z);
}
| public BulletConstructor (final Model model, final float mass) {
final BoundingBox boundingBox = new BoundingBox();
model.getBoundingBox(boundingBox);
final Vector3 dimensions = boundingBox.getDimensions();
create(model, mass, dimensions.x, dimensions.y, dimensions.z);
}
|
public boolean isPlaying () {
return track.isPlaying();
}
| public boolean isPlaying () {
return track.isPlaying() && !track.isPaused();
}
|
static public String getSimpleName (Class c) {
return c.getName();
}
| static public String getSimpleName (Class c) {
return c.getSimpleName();
}
|
public boolean isPressed () {
return clickListener.isPressed();
}
| public boolean isPressed () {
return clickListener.isVisualPressed();
}
|
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new DownloadTest(), config);
}
| protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new BulletTestCollection(), config);
}
|
protected void doStart() throws ElasticSearchException {
try {
this.datagramPacketReceive = new DatagramPacket(new byte[bufferSize], bufferSize);
this.datagramPacketSend = new DatagramPacket(new byte[bufferSize], bufferSize, InetAddress.getByName(group), port);
} catch (Excep... | protected void doStart() throws ElasticSearchException {
try {
this.datagramPacketReceive = new DatagramPacket(new byte[bufferSize], bufferSize);
this.datagramPacketSend = new DatagramPacket(new byte[bufferSize], bufferSize, InetAddress.getByName(group), port);
} catch (Excep... |
protected String executor() {
return ThreadPool.Names.MANAGEMENT;
}
| protected String executor() {
return ThreadPool.Names.REFRESH;
}
|
@Override public XContentDocumentMapper parse(@Nullable String type, String source, String defaultSource) throws MapperParsingException {
Map<String, Object> mapping = null;
if (source != null) {
Tuple<String, Map<String, Object>> t = extractMapping(type, source);
type = t.v1... | @Override public XContentDocumentMapper parse(@Nullable String type, String source, String defaultSource) throws MapperParsingException {
Map<String, Object> mapping = null;
if (source != null) {
Tuple<String, Map<String, Object>> t = extractMapping(type, source);
type = t.v1... |
@Test public void testParseToJsonAndParse() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/xcontent/simple/test-mapping.json");
XContentDocumentMapper docMapper = XContentMapperTests.newParser().parse(mapping);
String builtMapping = docMapper.b... | @Test public void testParseToJsonAndParse() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/xcontent/simple/test-mapping.json");
XContentDocumentMapper docMapper = XContentMapperTests.newParser().parse(mapping);
String builtMapping = docMapper.m... |
@Test public void testSimpleMappings() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/xcontent/test-mapping.json");
XContentDocumentMapper docMapper = mapperParser.parse(mapping);
byte[] json = jsonBuilder().startObject().field("_id", 1).field(... | @Test public void testSimpleMappings() throws Exception {
String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/xcontent/test-mapping.json");
XContentDocumentMapper docMapper = mapperParser.parse(mapping);
byte[] json = jsonBuilder().startObject().field("_id", 1).field(... |
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<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<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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.