buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected IdFieldMapper(String name, String indexName, float boost, FieldType fieldType, String path,
PostingsFormatProvider provider) {
super(new Names(name, indexName, indexName, name), boost, fieldType, Lucene.KEYWORD_ANALYZER,
Lucene.KEYWORD_ANALYZER, provider... | protected IdFieldMapper(String name, String indexName, float boost, FieldType fieldType, String path,
PostingsFormatProvider provider) {
super(new Names(name, indexName, indexName, name), boost, fieldType, Lucene.KEYWORD_ANALYZER,
Lucene.KEYWORD_ANALYZER, provider... |
public IndexFieldMapper(String name, String indexName, float boost, FieldType fieldType, boolean enabled,
PostingsFormatProvider provider) {
super(new Names(name, indexName, indexName, name), boost, fieldType, Lucene.KEYWORD_ANALYZER,
Lucene.KEYWORD_ANALYZER, prov... | public IndexFieldMapper(String name, String indexName, float boost, FieldType fieldType, boolean enabled,
PostingsFormatProvider provider) {
super(new Names(name, indexName, indexName, name), boost, fieldType, Lucene.KEYWORD_ANALYZER,
Lucene.KEYWORD_ANALYZER, prov... |
protected ParentFieldMapper(String name, String indexName, String type, PostingsFormatProvider postingsFormat) {
super(new Names(name, indexName, indexName, name), Defaults.BOOST, new FieldType(Defaults.PARENT_FIELD_TYPE),
Lucene.KEYWORD_ANALYZER, Lucene.KEYWORD_ANALYZER, postingsFormat);
... | protected ParentFieldMapper(String name, String indexName, String type, PostingsFormatProvider postingsFormat) {
super(new Names(name, indexName, indexName, name), Defaults.BOOST, new FieldType(Defaults.PARENT_FIELD_TYPE),
Lucene.KEYWORD_ANALYZER, Lucene.KEYWORD_ANALYZER, postingsFormat, nul... |
protected RoutingFieldMapper(FieldType fieldType, boolean required, String path, PostingsFormatProvider provider) {
super(new Names(Defaults.NAME, Defaults.NAME, Defaults.NAME, Defaults.NAME), 1.0f, fieldType, Lucene.KEYWORD_ANALYZER,
Lucene.KEYWORD_ANALYZER, provider);
this.required... | protected RoutingFieldMapper(FieldType fieldType, boolean required, String path, PostingsFormatProvider provider) {
super(new Names(Defaults.NAME, Defaults.NAME, Defaults.NAME, Defaults.NAME), 1.0f, fieldType, Lucene.KEYWORD_ANALYZER,
Lucene.KEYWORD_ANALYZER, provider, null);
this.re... |
public SizeFieldMapper(boolean enabled, FieldType fieldType, PostingsFormatProvider provider) {
super(new Names(Defaults.NAME), Defaults.PRECISION_STEP, Defaults.FUZZY_FACTOR,
Defaults.BOOST, fieldType, Defaults.NULL_VALUE, Defaults.IGNORE_MALFORMED, provider);
this.enabled = enabled... | public SizeFieldMapper(boolean enabled, FieldType fieldType, PostingsFormatProvider provider) {
super(new Names(Defaults.NAME), Defaults.PRECISION_STEP, Defaults.FUZZY_FACTOR,
Defaults.BOOST, fieldType, Defaults.NULL_VALUE, Defaults.IGNORE_MALFORMED, provider, null);
this.enabled = e... |
protected SourceFieldMapper(String name, boolean enabled, String format, Boolean compress, long compressThreshold,
String[] includes, String[] excludes) {
super(new Names(name, name, name, name), Defaults.BOOST, new FieldType(Defaults.SOURCE_FIELD_TYPE),
Lucen... | protected SourceFieldMapper(String name, boolean enabled, String format, Boolean compress, long compressThreshold,
String[] includes, String[] excludes) {
super(new Names(name, name, name, name), Defaults.BOOST, new FieldType(Defaults.SOURCE_FIELD_TYPE),
Lucen... |
protected TTLFieldMapper(FieldType fieldType, boolean enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed,
PostingsFormatProvider provider) {
super(new Names(Defaults.NAME, Defaults.NAME, Defaults.NAME, Defaults.NAME), Defaults.PRECISION_STEP,
Defaults.FU... | protected TTLFieldMapper(FieldType fieldType, boolean enabled, long defaultTTL, Explicit<Boolean> ignoreMalformed,
PostingsFormatProvider provider) {
super(new Names(Defaults.NAME, Defaults.NAME, Defaults.NAME, Defaults.NAME), Defaults.PRECISION_STEP,
Defaults.FU... |
protected TimestampFieldMapper(FieldType fieldType, boolean enabled, String path,
FormatDateTimeFormatter dateTimeFormatter, boolean parseUpperInclusive,
Explicit<Boolean> ignoreMalformed, PostingsFormatProvider provider) {
super(new Name... | protected TimestampFieldMapper(FieldType fieldType, boolean enabled, String path,
FormatDateTimeFormatter dateTimeFormatter, boolean parseUpperInclusive,
Explicit<Boolean> ignoreMalformed, PostingsFormatProvider provider) {
super(new Name... |
public TypeFieldMapper(String name, String indexName, float boost, FieldType fieldType, PostingsFormatProvider provider) {
super(new Names(name, indexName, indexName, name), boost, fieldType, Lucene.KEYWORD_ANALYZER,
Lucene.KEYWORD_ANALYZER, provider);
}
| public TypeFieldMapper(String name, String indexName, float boost, FieldType fieldType, PostingsFormatProvider provider) {
super(new Names(name, indexName, indexName, name), boost, fieldType, Lucene.KEYWORD_ANALYZER,
Lucene.KEYWORD_ANALYZER, provider, null);
}
|
protected UidFieldMapper(String name, String indexName, PostingsFormatProvider postingsFormat) {
super(new Names(name, indexName, indexName, name), Defaults.BOOST, new FieldType(Defaults.UID_FIELD_TYPE),
Lucene.KEYWORD_ANALYZER, Lucene.KEYWORD_ANALYZER, postingsFormat);
}
| protected UidFieldMapper(String name, String indexName, PostingsFormatProvider postingsFormat) {
super(new Names(name, indexName, indexName, name), Defaults.BOOST, new FieldType(Defaults.UID_FIELD_TYPE),
Lucene.KEYWORD_ANALYZER, Lucene.KEYWORD_ANALYZER, postingsFormat, null);
}
|
public Similarity searchSimilarity() {
return indexQueryParser.similarityService != null ? indexQueryParser.similarityService.defaultSearchSimilarity() : null;
}
| public Similarity searchSimilarity() {
return indexQueryParser.similarityService != null ? indexQueryParser.similarityService.similarity() : null;
}
|
public CacheStats stats() {
return new CacheStats(fieldDataCache.evictions(), filterCache.evictions(), fieldDataCache.sizeInBytes(), filterCache.sizeInBytes(), filterCache.count(), bloomCache.sizeInBytes());
}
| public CacheStats stats() {
return new CacheStats(fieldDataCache.evictions(), filterCache.evictions(), filterCache.memEvictions(), fieldDataCache.sizeInBytes(), filterCache.sizeInBytes(), filterCache.count(), bloomCache.sizeInBytes());
}
|
@Override public void run() {
while (!stop.get()) {
client.prepareSearch()
.setQuery(filteredQuery(matchAllQuery(), rangeFilter("field").from(System.currentTimeMillis())))
.execute().actionGet();
}
... | @Override public void run() {
while (!stop.get()) {
client.prepareSearch()
.setQuery(filteredQuery(matchAllQuery(), rangeFilter("field").from(System.currentTimeMillis() - 1000000)))
.execute().actionGet();
... |
public void onListItemClick(ListView l, View v, int position, long id) {
startActivityForResult(ViewIssuesActivity.createIntent(items, position - getListAdapter().getHeadersCount()),
ISSUE_VIEW);
}
| public void onListItemClick(ListView l, View v, int position, long id) {
startActivityForResult(IssuesViewActivity.createIntent(items, position - getListAdapter().getHeadersCount()),
ISSUE_VIEW);
}
|
private void build () {
if (!Gdx.graphics.isGL20Available()) throw new GdxRuntimeException("GL2 is required.");
GL20 gl = Gdx.graphics.getGL20();
// iOS uses a different framebuffer handle! (not necessarily 0)
if (!defaultFramebufferHandleInitialized) {
defaultFramebufferHandleInitialized = true;
if ... | private void build () {
if (!Gdx.graphics.isGL20Available()) throw new GdxRuntimeException("GL2 is required.");
GL20 gl = Gdx.graphics.getGL20();
// iOS uses a different framebuffer handle! (not necessarily 0)
if (!defaultFramebufferHandleInitialized) {
defaultFramebufferHandleInitialized = true;
if ... |
public void onInternalTick (btDynamicsWorld dynamicsWorld, float timeStep) {
btCollisionObjectArray objs = dynamicsWorld.getCollisionObjectArray();
dynamicsWorld.clearForces();
int idx = 0;
for (int i = 0; i < objs.size(); i++) {
btRigidBody body = (btRigidBody)(objs.at(i));
if (body == null || bo... | public void onInternalTick (btDynamicsWorld dynamicsWorld, float timeStep) {
btCollisionObjectArray objs = dynamicsWorld.getCollisionObjectArray();
dynamicsWorld.clearForces();
int idx = 0;
for (int i = 0; i < objs.size(); i++) {
btRigidBody body = btRigidBody.upcast(objs.at(i));
if (body == null ... |
public boolean tap (float x, float y, int count, int button) {
Ray ray = camera.getPickRay(x, y);
rayFrom.set(ray.origin);
rayTo.set(ray.direction).scl(50f).add(rayFrom); // 50 meters max from the origin
// Because we reuse the ClosestRayResultCallback, we need reset it's values
rayTestCB.setM_collisionObje... | public boolean tap (float x, float y, int count, int button) {
Ray ray = camera.getPickRay(x, y);
rayFrom.set(ray.origin);
rayTo.set(ray.direction).scl(50f).add(rayFrom); // 50 meters max from the origin
// Because we reuse the ClosestRayResultCallback, we need reset it's values
rayTestCB.setM_collisionObje... |
public boolean touchDown (int screenX, int screenY, int pointer, int button) {
boolean result = false;
if (button == Buttons.LEFT) {
Ray ray = camera.getPickRay(screenX, screenY);
Vector3.tmp.set(ray.direction).scl(10f).add(ray.origin);
ClosestRayResultCallback cb = new ClosestRayResultCallback(ray.origin... | public boolean touchDown (int screenX, int screenY, int pointer, int button) {
boolean result = false;
if (button == Buttons.LEFT) {
Ray ray = camera.getPickRay(screenX, screenY);
Vector3.tmp.set(ray.direction).scl(10f).add(ray.origin);
ClosestRayResultCallback cb = new ClosestRayResultCallback(ray.origin... |
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Copyright (C) 2006 Google Inc.
*
* 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 copy of the License at
*
* http://www.apache.org/licenses/LIC... | import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Copyright (C) 2006 Google Inc.
*
* 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 copy of the License at
*
* http://www.apache.org/licenses/LIC... |
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Copyright (C) 2007 Google Inc.
*
* 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 copy of the License at
*
* http://www.apache.org/licenses/LIC... | import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Copyright (C) 2007 Google Inc.
*
* 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 copy of the License at
*
* http://www.apache.org/licenses/LIC... |
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Copyright (C) 2008 Google Inc.
*
* 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 copy of the License at
*
* http://www.apache.org/licenses/LIC... | import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Copyright (C) 2008 Google Inc.
*
* 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 copy of the License at
*
* http://www.apache.org/licenses/LIC... |
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Copyright (C) 2006 Google Inc.
*
* 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 copy of the License at
*
* http://www.apache.org/licenses/LIC... | import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Copyright (C) 2006 Google Inc.
*
* 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 copy of the License at
*
* http://www.apache.org/licenses/LIC... |
public boolean isVisualPressed () {
if (pressed) return true;
if (visualPressedTime <= 0) return false;
if (visualPressedTime > TimeUtils.nanoTime() && Gdx.graphics.isContinuousRendering()) return true;
visualPressedTime = 0;
return false;
}
| public boolean isVisualPressed () {
if (pressed) return true;
if (visualPressedTime <= 0) return false;
if (visualPressedTime > TimeUtils.nanoTime()) return true;
visualPressedTime = 0;
return false;
}
|
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new MyGdxGame(), config);
}
| protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new BulletTestCollection(), config);
}
|
private void innerFinishHim() {
sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values());
final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults);
String scrollId = null;
... | private void innerFinishHim() {
sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values());
final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults);
String scrollId = null;
... |
private void innerFinishHim() {
final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults);
String scrollId = null;
if (request.scroll() != null) {
scrollId = TransportSearchHelper.buildScrollId(req... | private void innerFinishHim() {
final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults);
String scrollId = null;
if (request.scroll() != null) {
scrollId = TransportSearchHelper.buildScrollId(req... |
@Override protected void moveToSecondPhase() {
sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values());
final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults);
String scrollId = n... | @Override protected void moveToSecondPhase() {
sortedShardList = searchPhaseController.sortDocs(queryFetchResults.values());
final InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryFetchResults, queryFetchResults);
String scrollId = n... |
private void innerFinishHim() {
InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults);
String scrollId = null;
if (request.scroll() != null) {
scrollId = TransportSearchHelper.buildScrollId(request.s... | private void innerFinishHim() {
InternalSearchResponse internalResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults);
String scrollId = null;
if (request.scroll() != null) {
scrollId = TransportSearchHelper.buildScrollId(request.s... |
private static String filter(String uncachedFilter) {
String filter = uncachedFilter;
if (cluster().hasFilterCache()) {
filter = "cached(" + filter + ")";
}
return filter;
}
| private static String filter(String uncachedFilter) {
String filter = uncachedFilter;
if (cluster().hasFilterCache()) {
filter = "cache(" + filter + ")";
}
return filter;
}
|
public TranslogService(ShardId shardId, @IndexSettings Settings indexSettings, IndexSettingsService indexSettingsService, ThreadPool threadPool, IndexShard indexShard, Translog translog) {
super(shardId, indexSettings);
this.threadPool = threadPool;
this.indexSettingsService = indexSettingsS... | public TranslogService(ShardId shardId, @IndexSettings Settings indexSettings, IndexSettingsService indexSettingsService, ThreadPool threadPool, IndexShard indexShard, Translog translog) {
super(shardId, indexSettings);
this.threadPool = threadPool;
this.indexSettingsService = indexSettingsS... |
@Inject public ASCIIFoldingTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
}
| @Inject public ASCIIFoldingTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
}
|
@Inject public ArabicStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
}
| @Inject public ArabicStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
}
|
@Inject public BrazilianStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
String[] stemExclusion = settings.getAsArray("stem_exclusion");
if (stemExclusion.length > 0) {
... | @Inject public BrazilianStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
String[] stemExclusion = settings.getAsArray("stem_exclusion");
if (stemExclusion.length > 0) ... |
@Inject public ChineseAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
analyzer = new ChineseAnalyzer();
}
| @Inject public ChineseAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
analyzer = new ChineseAnalyzer();
}
|
@Inject public CustomAnalyzerProvider(Index index,
Map<String, TokenizerFactoryFactory> tokenizerFactories,
Map<String, CharFilterFactoryFactory> charFilterFactories,
Map<String, TokenFilter... | @Inject public CustomAnalyzerProvider(Index index,
Map<String, TokenizerFactoryFactory> tokenizerFactories,
Map<String, CharFilterFactoryFactory> charFilterFactories,
Map<String, TokenFilter... |
@Inject public CzechStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
}
| @Inject public CzechStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
}
|
@Inject public DutchStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
String[] stemExclusion = settings.getAsArray("stem_exclusion");
if (stemExclusion.length > 0) {
... | @Inject public DutchStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
String[] stemExclusion = settings.getAsArray("stem_exclusion");
if (stemExclusion.length > 0) {
... |
@Inject public EdgeNGramTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.minGram = settings.getAsInt("min_gram", NGramTokenFilter.DEFAULT_MIN_NGRAM_SIZE);
this.maxGram = settin... | @Inject public EdgeNGramTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.minGram = settings.getAsInt("min_gram", NGramTokenFilter.DEFAULT_MIN_NGRAM_SIZE);
this.maxGra... |
@Inject public EdgeNGramTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.minGram = settings.getAsInt("min_gram", NGramTokenizer.DEFAULT_MIN_NGRAM_SIZE);
this.maxGram = settings.g... | @Inject public EdgeNGramTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.minGram = settings.getAsInt("min_gram", NGramTokenizer.DEFAULT_MIN_NGRAM_SIZE);
this.maxGram = ... |
@Inject public FrenchStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
String[] stemExclusion = settings.getAsArray("stem_exclusion");
if (stemExclusion.length > 0) {
... | @Inject public FrenchStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
String[] stemExclusion = settings.getAsArray("stem_exclusion");
if (stemExclusion.length > 0) {
... |
@Inject public GermanStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
String[] stemExclusion = settings.getAsArray("stem_exclusion");
if (stemExclusion.length > 0) {
... | @Inject public GermanStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
String[] stemExclusion = settings.getAsArray("stem_exclusion");
if (stemExclusion.length > 0) {
... |
@Inject public KeywordAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.keywordAnalyzer = new KeywordAnalyzer();
}
| @Inject public KeywordAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.keywordAnalyzer = new KeywordAnalyzer();
}
|
@Inject public KeywordTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
bufferSize = settings.getAsInt("buffer_size", 256);
}
| @Inject public KeywordTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
bufferSize = settings.getAsInt("buffer_size", 256);
}
|
@Inject public NGramTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.minGram = settings.getAsInt("min_gram", NGramTokenFilter.DEFAULT_MIN_NGRAM_SIZE);
this.maxGram = settings.g... | @Inject public NGramTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.minGram = settings.getAsInt("min_gram", NGramTokenFilter.DEFAULT_MIN_NGRAM_SIZE);
this.maxGram = ... |
@Inject public NGramTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.minGram = settings.getAsInt("min_gram", NGramTokenizer.DEFAULT_MIN_NGRAM_SIZE);
this.maxGram = settings.getAs... | @Inject public NGramTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.minGram = settings.getAsInt("min_gram", NGramTokenizer.DEFAULT_MIN_NGRAM_SIZE);
this.maxGram = sett... |
@Inject public PorterStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
}
| @Inject public PorterStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
}
|
@Inject public RussianLetterTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
}
| @Inject public RussianLetterTokenizerFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
}
|
@Inject public RussianStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
}
| @Inject public RussianStemTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
}
|
@Inject public ShingleTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
maxShingleSize = settings.getAsInt("max_shingle_size", ShingleFilter.DEFAULT_MAX_SHINGLE_SIZE);
outputUnigrams... | @Inject public ShingleTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
maxShingleSize = settings.getAsInt("max_shingle_size", ShingleFilter.DEFAULT_MAX_SHINGLE_SIZE);
outp... |
@Inject public SnowballTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.language = settings.get("language", settings.get("name", "English"));
}
| @Inject public SnowballTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.language = settings.get("language", settings.get("name", "English"));
}
|
@Inject public StandardHtmlStripAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
analyzer = new CustomAnalyzer(new StandardTokenizerFactory(index, indexSettings, name, settings),
... | @Inject public StandardHtmlStripAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
analyzer = new CustomAnalyzer(new StandardTokenizerFactory(index, indexSettings, name, settings),
... |
@Inject public AbstractCompoundWordTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
minWordSize = settings.getAsInt("min_word_size", CompoundWordTokenFilterBase.DEFAULT_MIN_WORD_SIZE);
... | @Inject public AbstractCompoundWordTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
minWordSize = settings.getAsInt("min_word_size", CompoundWordTokenFilterBase.DEFAULT_MIN_WORD_... |
@Override public TokenStream create(TokenStream tokenStream) {
return new DictionaryCompoundWordTokenFilter(tokenStream, wordList,
minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
}
| @Override public TokenStream create(TokenStream tokenStream) {
return new DictionaryCompoundWordTokenFilter(version, tokenStream, wordList,
minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
}
|
@Override public TokenStream create(TokenStream tokenStream) {
return new HyphenationCompoundWordTokenFilter(tokenStream,
hyphenationTree, wordList,
minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
}
| @Override public TokenStream create(TokenStream tokenStream) {
return new HyphenationCompoundWordTokenFilter(version, tokenStream,
hyphenationTree, wordList,
minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
}
|
@Inject public PhoneticTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.inject = settings.getAsBoolean("replace", true);
String encoder = settings.get("encoder");
if (e... | @Inject public PhoneticTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.inject = settings.getAsBoolean("replace", true);
String encoder = settings.get("encoder");
... |
@Inject public IcuCollationTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, Environment environment, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
Collator collator;
String rules = settings.get("rules");
if (rules != n... | @Inject public IcuCollationTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, Environment environment, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
Collator collator;
String rules = settings.get("rules");
if (... |
@Inject public IcuFoldingTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
}
| @Inject public IcuFoldingTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
}
|
@Inject public IcuNormalizerTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.name = settings.get("name", "nfkc_cf");
}
| @Inject public IcuNormalizerTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.name = settings.get("name", "nfkc_cf");
}
|
public static void main (String[] args) throws Exception {
// generate C/C++ code
new NativeCodeGenerator().generate("src", "bin", "jni");
// Flags to accomodate SWIG generated code
String cppFlags = "";
// SWIG doesn't emit strict aliasing compliant code
cppFlags += " -fno-strict-aliasing";
// SWIG di... | public static void main (String[] args) throws Exception {
// generate C/C++ code
new NativeCodeGenerator().generate("src", "bin", "jni");
// Flags to accomodate SWIG generated code
String cppFlags = "";
// SWIG doesn't emit strict aliasing compliant code
cppFlags += " -fno-strict-aliasing";
// SWIG di... |
private void process(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, int size) throws Exception {
transportServiceAdapter.received(size + 4);
int markedReaderIndex = buffer.readerIndex();
int expectedIndexReader = markedReaderIndex + size;
// netty always copies a... | private void process(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, int size) throws Exception {
transportServiceAdapter.received(size + 4);
int markedReaderIndex = buffer.readerIndex();
int expectedIndexReader = markedReaderIndex + size;
// netty always copies a... |
public void dispose () {
spriteBatch.dispose();
shipTexture.dispose();
invaderTexture.dispose();
backgroundTexture.dispose();
explosionTexture.dispose();
font.dispose();
explosionMesh.dispose();
shipMesh.dispose();
invaderMesh.dispose();
shotMesh.dispose();
blockMesh.dispose();
}
| public void dispose () {
spriteBatch.dispose();
shipTexture.dispose();
invaderTexture.dispose();
backgroundTexture.dispose();
explosionTexture.dispose();
// font.dispose();
explosionMesh.dispose();
shipMesh.dispose();
invaderMesh.dispose();
shotMesh.dispose();
blockMesh.dispose();
}
|
public CreateIndexRequest mapping(String type, Map source) {
// wrap it in a type map if its not
if (source.size() != 1 || source.containsKey(type)) {
source = MapBuilder.<String, Object>newMapBuilder().put(type, source).map();
}
try {
XContentBuilder builder ... | public CreateIndexRequest mapping(String type, Map source) {
// wrap it in a type map if its not
if (source.size() != 1 || !source.containsKey(type)) {
source = MapBuilder.<String, Object>newMapBuilder().put(type, source).map();
}
try {
XContentBuilder builder... |
public static void main (String[] argv) {
GdxTest test = new AlphaTest();
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.useGL20 = test.needsGL20();
config.vSyncEnabled = true;
new LwjglApplication(test, config);
}
| public static void main (String[] argv) {
GdxTest test = new AssetManagerTest();
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.useGL20 = test.needsGL20();
config.vSyncEnabled = true;
new LwjglApplication(test, config);
}
|
protected String models[] = new String[] {"car.obj", "cube.obj", "scene.obj", "scene2.obj", "wheel.obj", "g3d/invaders.g3dj",
"g3d/head.g3db", "g3d/house.g3dj", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/ship.obj", "g3d/shapes/cube_1.0x1.0.g3dj",
"g3d/shapes/cube_1.5x1.5.g3dj", "g3d/shapes/sphere.g3dj", "g3d/shape... | protected String models[] = new String[] {"car.obj", "cube.obj", "scene.obj", "scene2.obj", "wheel.obj", "g3d/invaders.g3dj",
"g3d/head.g3db", "g3d/knight.g3dj", "g3d/knight.g3db", "g3d/ship.obj", "g3d/shapes/cube_1.0x1.0.g3dj",
"g3d/shapes/cube_1.5x1.5.g3dj", "g3d/shapes/sphere.g3dj", "g3d/shapes/teapot.g3dj", "g... |
public boolean exists () {
return file().exists();
}
| public boolean exists () {
return file.exists();
}
|
public void update (float delta) {
if (Gdx.input.justTouched()) {
isDone = true;
}
}
| public void update (float delta) {
if (Gdx.input.isTouched()) {
isDone = true;
}
}
|
public enum TextureDataType {
Pixmap, Compressed,
}
| public enum TextureDataType {
Pixmap, Compressed, Float,
}
|
public void setScale (float scaleX, float scaleY) {
BitmapFontData data = this.data;
float x = scaleX / data.scaleX;
float y = scaleY / data.scaleY;
data.lineHeight = data.lineHeight * y;
data.spaceWidth = data.spaceWidth * x;
data.xHeight = data.xHeight * y;
data.capHeight = data.capHeight * y;
data.a... | public void setScale (float scaleX, float scaleY) {
BitmapFontData data = this.data;
float x = scaleX / data.scaleX;
float y = scaleY / data.scaleY;
data.lineHeight = data.lineHeight * x;
data.spaceWidth = data.spaceWidth * x;
data.xHeight = data.xHeight * y;
data.capHeight = data.capHeight * y;
data.a... |
public void onFailure(Throwable e) {
try {
channel.sendResponse(new XContentThrowableRestResponse(request, e));
} catch (Exception e1) {
logger.error("Failed to send failure response", e1);
}
}
});
... | public void onFailure(Throwable e) {
try {
channel.sendResponse(new StringRestResponse(INTERNAL_SERVER_ERROR));
} catch (Exception e1) {
logger.error("Failed to send failure response", e1);
}
}
});
... |
public Iterable<? extends Module> spawnModules() {
Class<? extends Module> indexStoreModule = NioFsIndexStoreModule.class;
// Same logic as FSDirectory#open ...
if ((Constants.WINDOWS || Constants.SUN_OS)
&& Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) {
... | public Iterable<? extends Module> spawnModules() {
Class<? extends Module> indexStoreModule = NioFsIndexStoreModule.class;
// Same logic as FSDirectory#open ...
if ((Constants.WINDOWS || Constants.SUN_OS || Constants.LINUX)
&& Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUP... |
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 GwtApplicationConfiguration getConfig () {
return new GwtApplicationConfiguration(480, 320);
}
| public GwtApplicationConfiguration getConfig () {
return new GwtApplicationConfiguration(640, 640);
}
|
public void execute(SearchContext searchContext) throws QueryPhaseExecutionException {
// set the filter on the searcher
if (searchContext.parsedQuery().scopePhases().length > 0) {
// we have scoped queries, refresh the id cache
try {
searchContext.idCache().r... | public void execute(SearchContext searchContext) throws QueryPhaseExecutionException {
// set the filter on the searcher
if (searchContext.parsedQuery().scopePhases().length > 0) {
// we have scoped queries, refresh the id cache
try {
searchContext.idCache().r... |
public static Vector2 triangleCentroid (float x1, float y1, float x2, float y2, float x3, float y3, Vector2 centroid) {
centroid.x = (x1 + x2 + x3) / 3;
centroid.y = (x1 + x2 + x3) / 3;
return centroid;
}
| public static Vector2 triangleCentroid (float x1, float y1, float x2, float y2, float x3, float y3, Vector2 centroid) {
centroid.x = (x1 + x2 + x3) / 3;
centroid.y = (y1 + y2 + y3) / 3;
return centroid;
}
|
package org.apache.lucene.queryparser.classic;
/*
* Licensed to ElasticSearch and Shay Banon 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 the Apache ... | package org.apache.lucene.queryparser.classic;
/*
* Licensed to ElasticSearch and Shay Banon 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 the Apache ... |
import org.apache.lucene.queryparser.classic.QueryParserSettings;
/*
* Licensed to ElasticSearch and Shay Banon 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 yo... | import org.apache.lucene.queryparser.classic.QueryParserSettings;
/*
* Licensed to ElasticSearch and Shay Banon 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 yo... |
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 static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
new SharedLib... | public static void main (String[] argv) {
// this is only here for me to debug native code faster
new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");
new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");
new SharedLib... |
@Inject public SnowballAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
String language = settings.get("language", "English");
Set<?> defaultStopwords = defaultLanguageStopwords.cont... | @Inject public SnowballAnalyzerProvider(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
String language = settings.get("language", settings.get("name", "English"));
Set<?> defaultStopwords = default... |
@Inject public SnowballTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.language = settings.get("language", "English");
}
| @Inject public SnowballTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name);
this.language = settings.get("language", settings.get("name", "English"));
}
|
@Test public void testSimpleJsonSettings() throws Exception {
Settings settings = settingsBuilder()
.loadFromClasspath("org/elasticsearch/util/settings/loader/test-settings.json")
.build();
assertThat(settings.get("test1.value1"), equalTo("value1"));
assertTh... | @Test public void testSimpleJsonSettings() throws Exception {
Settings settings = settingsBuilder()
.loadFromClasspath("org/elasticsearch/common/settings/loader/test-settings.json")
.build();
assertThat(settings.get("test1.value1"), equalTo("value1"));
assert... |
@Test public void testSimpleYamlSettings() throws Exception {
Settings settings = settingsBuilder()
.loadFromClasspath("org/elasticsearch/util/settings/loader/test-settings.yml")
.build();
assertThat(settings.get("test1.value1"), equalTo("value1"));
assertTha... | @Test public void testSimpleYamlSettings() throws Exception {
Settings settings = settingsBuilder()
.loadFromClasspath("org/elasticsearch/common/settings/loader/test-settings.yml")
.build();
assertThat(settings.get("test1.value1"), equalTo("value1"));
assertT... |
static public void freeAll (Array objects) {
if (objects == null) throw new IllegalArgumentException("objects cannot be null.");
for (int i = 0, n = objects.size; i < n; i++) {
Object object = objects.get(i);
if (objects == null) continue;
ReflectionPool pool = typePools.get(object.getClass());
if (poo... | static public void freeAll (Array objects) {
if (objects == null) throw new IllegalArgumentException("objects cannot be null.");
for (int i = 0, n = objects.size; i < n; i++) {
Object object = objects.get(i);
if (object == null) continue;
ReflectionPool pool = typePools.get(object.getClass());
if (pool... |
public void destroyBody (Body body) {
body.setUserData(null);
this.bodies.remove(body.addr);
for (int i = 0; i < body.getFixtureList().size(); i++) {
this.fixtures.remove(body.getFixtureList().get(i).addr).setUserData(null);
}
for (int i = 0; i < body.getJointList().size(); i++)
this.joints.remove(body... | public void destroyBody (Body body) {
body.setUserData(null);
this.bodies.remove(body.addr);
for (int i = 0; i < body.getFixtureList().size(); i++) {
this.fixtures.remove(body.getFixtureList().get(i).addr).setUserData(null);
}
for (int i = 0; i < body.getJointList().size(); i++)
destroyJoint(body.getJo... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
boolean queryFound = false;
float boost = 1.0f;
String scriptLang = null;
Map<String, Object> vars = null... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
Query query = null;
boolean queryFound = false;
float boost = 1.0f;
String scriptLang = null;
Map<String, Object> vars = null... |
public void testCustomFiltersScore_withFunctionScore() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet();
client().prepar... | public void testCustomFiltersScore_withFunctionScore() throws Exception {
client().admin().indices().prepareDelete().execute().actionGet();
client().admin().indices().prepareCreate("test").setSettings(settingsBuilder().put("index.number_of_shards", 1)).execute().actionGet();
client().prepar... |
public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) {
info.filename = fileName;
if (parameter == null || (parameter != null && parameter.textureData == null)) {
Pixmap pixmap = null;
Format format = null;
boolean genMipMaps = false;
info.texture = ... | public void loadAsync (AssetManager manager, String fileName, FileHandle file, TextureParameter parameter) {
info.filename = fileName;
if (parameter == null || parameter.textureData == null) {
Pixmap pixmap = null;
Format format = null;
boolean genMipMaps = false;
info.texture = null;
if (parameter... |
private int partition(int left, int right, int pivot) {
T pivotValue = array[pivot];
swap(right, pivot);
int storage = left;
for (int i = left; i < right; i++) {
if (comp.compare(array[i], pivotValue) < 0) {
swap(storage, i);
storage++;
}
}
swap(right, storage);
return storage;
}
| private int partition(int left, int right, int pivot) {
T pivotValue = array[pivot];
swap(right, pivot);
int storage = left;
for (int i = left; i < right; i++) {
if (comp.compare(array[i], pivotValue) == -1) {
swap(storage, i);
storage++;
}
}
swap(right, storage);
return storage;
}
|
@Override public String toString() {
return "IndexAction [" + index + "][" + type + "][" + id + "], source [" + Unicode.fromBytes(source) + "]";
}
| @Override public String toString() {
return "[" + index + "][" + type + "][" + id + "], source[" + Unicode.fromBytes(source) + "]";
}
|
protected ShardRefreshResponse shardOperation(ShardRefreshRequest request) throws ElasticSearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
indexShard.refresh(new Engine.Refresh().force(request.force()).source("api"));
log... | protected ShardRefreshResponse shardOperation(ShardRefreshRequest request) throws ElasticSearchException {
IndexShard indexShard = indicesService.indexServiceSafe(request.index()).shardSafe(request.shardId());
indexShard.refresh(new Engine.Refresh("api").force(request.force()));
logger.trace... |
protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.realtime()) {
... | protected GetResponse shardOperation(GetRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.realtime()) {
... |
protected MultiGetShardResponse shardOperation(MultiGetShardRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.... | protected MultiGetShardResponse shardOperation(MultiGetShardRequest request, int shardId) throws ElasticSearchException {
IndexService indexService = indicesService.indexServiceSafe(request.index());
IndexShard indexShard = indexService.shardSafe(shardId);
if (request.refresh() && !request.... |
private void refreshVersioningTable(long time) {
// we need to refresh in order to clear older version values
refresh(new Refresh().force(true).source("version_table"));
for (Map.Entry<HashedBytesRef, VersionValue> entry : versionMap.entrySet()) {
HashedBytesRef uid = entry.getKe... | private void refreshVersioningTable(long time) {
// we need to refresh in order to clear older version values
refresh(new Refresh("version_table").force(true));
for (Map.Entry<HashedBytesRef, VersionValue> entry : versionMap.entrySet()) {
HashedBytesRef uid = entry.getKey();
... |
public void run() {
recoveryStatus = new RecoveryStatus();
recoveryStatus.updateStage(RecoveryStatus.Stage.INIT);
try {
logger.debug("starting recovery from {} ...", shardGateway);
shardGateway.recover(indexShouldExists... | public void run() {
recoveryStatus = new RecoveryStatus();
recoveryStatus.updateStage(RecoveryStatus.Stage.INIT);
try {
logger.debug("starting recovery from {} ...", shardGateway);
shardGateway.recover(indexShouldExists... |
private void loadQueries(IndexShard shard) {
try {
shard.refresh(new Engine.Refresh().force(true).source("percolator_load_queries"));
Engine.Searcher searcher = shard.acquireSearcher("percolator_load_queries");
try {
Query query = n... | private void loadQueries(IndexShard shard) {
try {
shard.refresh(new Engine.Refresh("percolator_load_queries").force(true));
Engine.Searcher searcher = shard.acquireSearcher("percolator_load_queries");
try {
Query query = new XConst... |
@Override public boolean allocateUnassigned(NodeAllocations nodeAllocations, RoutingAllocation allocation) {
boolean changed = false;
DiscoveryNodes nodes = allocation.nodes();
RoutingNodes routingNodes = allocation.routingNodes();
for (IndexRoutingTable indexRoutingTable : routingN... | @Override public boolean allocateUnassigned(NodeAllocations nodeAllocations, RoutingAllocation allocation) {
boolean changed = false;
DiscoveryNodes nodes = allocation.nodes();
RoutingNodes routingNodes = allocation.routingNodes();
for (IndexRoutingTable indexRoutingTable : routingN... |
@Override public void recover(RecoveryStatus recoveryStatus) throws IndexShardGatewayRecoveryException {
recoveryStatus().index().startTime(System.currentTimeMillis());
long version = -1;
try {
if (IndexReader.indexExists(indexShard.store().directory())) {
version... | @Override public void recover(RecoveryStatus recoveryStatus) throws IndexShardGatewayRecoveryException {
recoveryStatus.index().startTime(System.currentTimeMillis());
long version = -1;
try {
if (IndexReader.indexExists(indexShard.store().directory())) {
version =... |
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 enum Type {
Circle, Edge, Polygon, Chain,
};
| public enum Type {
Circle, Polygon, Edge, Chain,
};
|
public void simpleDateRangeWithUpperInclusiveDisabledTests() throws Exception {
prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.mapping.date.parse_upper_inclusive", false)).execute().actionGet();
client().prepareIndex("test", "type1", "1").setSource("field", "2010-01... | public void simpleDateRangeWithUpperInclusiveDisabledTests() throws Exception {
prepareCreate("test").setSettings(ImmutableSettings.settingsBuilder().put("index.mapping.date.round_ceil", false)).execute().actionGet();
client().prepareIndex("test", "type1", "1").setSource("field", "2010-01-05T02:00")... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.