buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public T wrap (long handle) {
VM.setLong(VM.getObjectAddress(instance) + HANDLE_OFFSET, handle);
return instance;
}
}
private static final NSObjectWrapper<UITouch> UI_TOUCH_WRAPPER = new NSObjectWrapper<UITouch>(UITouch.class);
private static final NSObjectWrapper<UIAcceleration> UI_ACCELERATION_WRAPPER =... | public T wrap (long handle) {
VM.setLong(VM.getObjectAddress(instance) + HANDLE_OFFSET, handle);
return instance;
}
}
private static final NSObjectWrapper<UITouch> UI_TOUCH_WRAPPER = new NSObjectWrapper<UITouch>(UITouch.class);
static final NSObjectWrapper<UIAcceleration> UI_ACCELERATION_WRAPPER = new NSO... |
static public void drawDebug (Stage stage) {
if (!TableToolkit.drawDebug) return;
drawDebug(stage.getActors(), stage.getSpriteBatch());
}
| static public void drawDebug (Stage stage) {
if (!TableToolkit.drawDebug) return;
drawDebug(stage.getActors(), stage.getBatch());
}
|
public void parse(ParseContext context) throws IOException {
XContentParser parser = context.parser();
XContentParser.Token token = parser.currentToken();
String surfaceForm = null;
BytesRef payload = null;
long weight = -1;
List<String> inputs = Lists.newArrayListWi... | public void parse(ParseContext context) throws IOException {
XContentParser parser = context.parser();
XContentParser.Token token = parser.currentToken();
String surfaceForm = null;
BytesRef payload = null;
long weight = -1;
List<String> inputs = Lists.newArrayListWi... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
List<BytesRef> ids = new ArrayList<>();
Collection<String> types = null;
String filterName = null;
String currentFieldName = null;
... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
List<BytesRef> ids = new ArrayList<>();
Collection<String> types = null;
String filterName = null;
String currentFieldName = null;
... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
List<BytesRef> ids = new ArrayList<>();
Collection<String> types = null;
String currentFieldName = null;
float boost = 1.0f;
... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
List<BytesRef> ids = new ArrayList<>();
Collection<String> types = null;
String currentFieldName = null;
float boost = 1.0f;
... |
public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token = parser.nextToken();
if (token != XContentParser.Token.FIELD_NAME) {
throw new QueryParsingException(parseCo... | public Filter parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token = parser.nextToken();
if (token != XContentParser.Token.FIELD_NAME) {
throw new QueryParsingException(parseCo... |
private FieldSelector buildFieldSelectors(SearchContext context) {
if (context.hasScriptFields() && !context.hasFieldNames()) {
// we ask for script fields, and no field names, don't load the source
return UidFieldSelector.INSTANCE;
}
if (!context.hasFieldNames()) {
... | private FieldSelector buildFieldSelectors(SearchContext context) {
if (context.hasScriptFields() && !context.hasFieldNames()) {
// we ask for script fields, and no field names, don't load the source
return UidFieldSelector.INSTANCE;
}
if (!context.hasFieldNames()) {
... |
public static void main (String[] argv) {
new JoglApplication(new com.badlogic.gdx.tests.SoundTest(), "Debug Test", 480, 320, false);
}
| public static void main (String[] argv) {
new JoglApplication(new com.badlogic.gdx.tests.Box2DTest(), "Debug Test", 480, 320, false);
}
|
@Override public void clusterChanged(ClusterChangedEvent event) {
if (event.source().equals(RoutingTableUpdater.CLUSTER_UPDATE_TASK_SOURCE)) {
// that's us, ignore this event
return;
}
if (event.state().nodes().localNodeMaster()) {
// we are master, schedu... | @Override public void clusterChanged(ClusterChangedEvent event) {
if (event.source().equals(RoutingTableUpdater.CLUSTER_UPDATE_TASK_SOURCE)) {
// that's us, ignore this event
return;
}
if (event.state().nodes().localNodeMaster()) {
// we are master, schedu... |
String executor();
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.0 (the
... | String executor();
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.0 (the
... |
String executor();
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.0 (the
... | String executor();
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.0 (the
... |
public org.elasticsearch.index.fielddata.FieldDataType fieldDataType2() {
throw new ElasticSearchIllegalArgumentException("not implemented");
}
| public org.elasticsearch.index.fielddata.FieldDataType fieldDataType2() {
return new org.elasticsearch.index.fielddata.FieldDataType("int");
}
|
public int hashCode () {
int result = super.hashCode();
result = 947 * result + (blended ? 1 : 0);
result = 947 * result + sourceFunction;
result = 947 * result + destFunction;
result = 947 * result + NumberUtils.floatToRawIntBits(opacity);
return result;
}
| public int hashCode () {
int result = (int)type;
result = 947 * result + (blended ? 1 : 0);
result = 947 * result + sourceFunction;
result = 947 * result + destFunction;
result = 947 * result + NumberUtils.floatToRawIntBits(opacity);
return result;
}
|
public int hashCode () {
int result = super.hashCode();
result = 953 * result + color.hashCode();
return result;
}
| public int hashCode () {
int result = (int)type;
result = 953 * result + color.hashCode();
return result;
}
|
public int hashCode () {
int result = super.hashCode();
result = 967 * result + textureDescription.hashCode();
return result;
}
| public int hashCode () {
int result = (int)type;
result = 967 * result + textureDescription.hashCode();
return result;
}
|
public int hashCode () {
int result = super.hashCode();
result = 971 * result + depthFunc;
result = 971 * result + NumberUtils.floatToRawIntBits(depthRangeNear);
result = 971 * result + NumberUtils.floatToRawIntBits(depthRangeFar);
result = 971 * result + (depthMask ? 1 : 0);
return result;
}
| public int hashCode () {
int result = (int)type;
result = 971 * result + depthFunc;
result = 971 * result + NumberUtils.floatToRawIntBits(depthRangeNear);
result = 971 * result + NumberUtils.floatToRawIntBits(depthRangeFar);
result = 971 * result + (depthMask ? 1 : 0);
return result;
}
|
public int hashCode () {
int result = super.hashCode();
result = 977 * result + NumberUtils.floatToRawIntBits(value);
return result;
}
| public int hashCode () {
int result = (int)type;
result = 977 * result + NumberUtils.floatToRawIntBits(value);
return result;
}
|
public int hashCode () {
int result = super.hashCode();
result = 983 * result + value;
return result;
}
| public int hashCode () {
int result = (int)type;
result = 983 * result + value;
return result;
}
|
public int hashCode () {
int result = super.hashCode();
result = 991 * result + textureDescription.hashCode();
result = 991 * result + NumberUtils.floatToRawIntBits(offsetU);
result = 991 * result + NumberUtils.floatToRawIntBits(offsetV);
result = 991 * result + NumberUtils.floatToRawIntBits(scaleU);
resul... | public int hashCode () {
int result = (int)type;
result = 991 * result + textureDescription.hashCode();
result = 991 * result + NumberUtils.floatToRawIntBits(offsetU);
result = 991 * result + NumberUtils.floatToRawIntBits(offsetV);
result = 991 * result + NumberUtils.floatToRawIntBits(scaleU);
result = 991... |
public float getAngleAroundRad (final float axisX, final float axisY, final float axisZ) {
final float d = Vector3.dot(this.x, this.y, this.z, axisX, axisY, axisZ);
final float l2 = Quaternion.len2(axisX * d, axisY * d, axisZ * d, this.w);
return MathUtils.isZero(l2) ? 0f : (float)(2.0 * Math.acos(MathUtils.clam... | public float getAngleAroundRad (final float axisX, final float axisY, final float axisZ) {
final float d = Vector3.dot(this.x, this.y, this.z, axisX, axisY, axisZ);
final float l2 = Quaternion.len2(axisX * d, axisY * d, axisZ * d, this.w);
return MathUtils.isZero(l2) ? 0f : (float)(2.0 * Math.acos(this.w / Math.... |
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
config.useAccelerometer = false;
return new IOSApplication(new BulletTestCollection(), config);
}
| protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
config.useAccelerometer = false;
return new IOSApplication(new Box2DTestCollection(), config);
}
|
public ImmutableSet<Integer> shardIds() {
return ImmutableSet.copyOf(shards.keySet());
}
| public ImmutableSet<Integer> shardIds() {
return shards.keySet();
}
|
public static void main(String[] argv) {
// if(argv.length != 1 && argv.length != 2) {
// System.out.println("StillModelViewer <filename> ?<texture-filename>");
// System.exit(-1);
// }
// new JoglApplication(new StillModelViewer(argv[0], argv.length==2?argv[1]:null), "StillModel Viewer", 800, 480, false);
ne... | public static void main(String[] argv) {
// if(argv.length != 1 && argv.length != 2) {
// System.out.println("StillModelViewer <filename> ?<texture-filename>");
// System.exit(-1);
// }
// new JoglApplication(new StillModelViewer(argv[0], argv.length==2?argv[1]:null), "StillModel Viewer", 800, 480, false);
ne... |
public void testMultiGet() throws ExecutionException, InterruptedException {
assertAcked(prepareCreate("test").addAlias(new Alias("alias")));
ensureGreen("test");
int numDocs = iterations(10, 50);
IndexRequestBuilder[] indexRequestBuilders = new IndexRequestBuilder[numDocs];
... | public void testMultiGet() throws ExecutionException, InterruptedException {
assertAcked(prepareCreate("test").addAlias(new Alias("alias")));
ensureYellow("test");
int numDocs = iterations(10, 50);
IndexRequestBuilder[] indexRequestBuilders = new IndexRequestBuilder[numDocs];
... |
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new MusicTest(), config);
}
| protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
return new IOSApplication(new DownloadTest(), config);
}
|
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 StopTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.ignoreCase = settings.getAsBoolean("ignore_case", false);
this.stopWords = Analysis.parse... | public StopTokenFilterFactory(Index index, @IndexSettings Settings indexSettings, Environment env, @Assisted String name, @Assisted Settings settings) {
super(index, indexSettings, name, settings);
this.ignoreCase = settings.getAsBoolean("ignore_case", false);
this.stopWords = Analysis.parse... |
public boolean contentThreadSafe() {
return false;
}
| public boolean contentThreadSafe() {
return true;
}
|
public boolean equals (Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (!(obj instanceof Attribute)) return false;
final Attribute other = (Attribute)obj;
if (other.type != other.type) return false;
return equals(other);
}
| public boolean equals (Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (!(obj instanceof Attribute)) return false;
final Attribute other = (Attribute)obj;
if (this.type != other.type) return false;
return equals(other);
}
|
public IdentityMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextPo... | public IdentityMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils... |
public IntFloatMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextPo... | public IntFloatMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils... |
public IntIntMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextPowe... | public IntIntMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.n... |
public IntMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextPowerOf... | public IntMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.next... |
public IntSet (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextPowerOf... | public IntSet (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.next... |
public LongMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextPowerO... | public LongMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nex... |
public ObjectFloatMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nex... | public ObjectFloatMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUt... |
public ObjectIntMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextP... | public ObjectIntMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtil... |
public ObjectMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextPowe... | public ObjectMap (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.n... |
public ObjectSet (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (capacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.nextPowe... | public ObjectSet (int initialCapacity, float loadFactor) {
if (initialCapacity < 0) throw new IllegalArgumentException("initialCapacity must be >= 0: " + initialCapacity);
if (initialCapacity > 1 << 30) throw new IllegalArgumentException("initialCapacity is too large: " + initialCapacity);
capacity = MathUtils.n... |
@Override protected ClusterStateResponse masterOperation(ClusterStateRequest request) throws ElasticSearchException {
ClusterState currentState = clusterService.state();
ClusterState.Builder builder = newClusterStateBuilder();
if (!request.filterNodes()) {
builder.nodes(currentSt... | @Override protected ClusterStateResponse masterOperation(ClusterStateRequest request, ClusterState state) throws ElasticSearchException {
ClusterState currentState = clusterService.state();
ClusterState.Builder builder = newClusterStateBuilder();
if (!request.filterNodes()) {
bui... |
@Override protected IndicesAliasesResponse masterOperation(IndicesAliasesRequest request) throws ElasticSearchException {
MetaDataService.IndicesAliasesResult indicesAliasesResult = metaDataService.indicesAliases(request.aliasActions());
return new IndicesAliasesResponse();
}
} | @Override protected IndicesAliasesResponse masterOperation(IndicesAliasesRequest request, ClusterState state) throws ElasticSearchException {
MetaDataService.IndicesAliasesResult indicesAliasesResult = metaDataService.indicesAliases(request.aliasActions());
return new IndicesAliasesResponse();
}... |
@Override protected CreateIndexResponse masterOperation(CreateIndexRequest request) throws ElasticSearchException {
String cause = request.cause();
if (cause.length() == 0) {
cause = "api";
}
MetaDataService.CreateIndexResult createIndexResult = metaDataService.createInde... | @Override protected CreateIndexResponse masterOperation(CreateIndexRequest request, ClusterState state) throws ElasticSearchException {
String cause = request.cause();
if (cause.length() == 0) {
cause = "api";
}
MetaDataService.CreateIndexResult createIndexResult = metaDa... |
@Override protected DeleteIndexResponse masterOperation(DeleteIndexRequest request) throws ElasticSearchException {
MetaDataService.DeleteIndexResult deleteIndexResult = metaDataService.deleteIndex(request.index(), request.timeout());
return new DeleteIndexResponse(deleteIndexResult.acknowledged());... | @Override protected DeleteIndexResponse masterOperation(DeleteIndexRequest request, ClusterState state) throws ElasticSearchException {
MetaDataService.DeleteIndexResult deleteIndexResult = metaDataService.deleteIndex(request.index(), request.timeout());
return new DeleteIndexResponse(deleteIndexRes... |
@Override protected PutMappingResponse masterOperation(PutMappingRequest request) throws ElasticSearchException {
ClusterState clusterState = clusterService.state();
// update to concrete indices
request.indices(clusterState.metaData().concreteIndices(request.indices()));
final Stri... | @Override protected PutMappingResponse masterOperation(PutMappingRequest request, ClusterState state) throws ElasticSearchException {
ClusterState clusterState = clusterService.state();
// update to concrete indices
request.indices(clusterState.metaData().concreteIndices(request.indices()))... |
final ClusterBlock NO_MASTER_BLOCK = new ClusterBlock(2, "no master", true, ClusterBlockLevel.ALL);
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elasti... | final ClusterBlock NO_MASTER_BLOCK = new ClusterBlock(2, "no master", true, ClusterBlockLevel.ALL);
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elasti... |
public FileHandle[] list (String suffix) {
if (type == FileType.Internal) {
try {
String[] relativePaths = assets.list(file.getPath());
FileHandle[] handles = new FileHandle[relativePaths.length];
int count = 0;
for (int i = 0, n = handles.length; i < n; i++) {
String path = relativePaths[i];... | public FileHandle[] list (String suffix) {
if (type == FileType.Internal) {
try {
String[] relativePaths = assets.list(file.getPath());
FileHandle[] handles = new FileHandle[relativePaths.length];
int count = 0;
for (int i = 0, n = handles.length; i < n; i++) {
String path = relativePaths[i];... |
public float getAngleAroundRad (final float axisX, final float axisY, final float axisZ) {
final float d = Vector3.dot(this.x, this.y, this.z, axisX, axisY, axisZ);
final float l2 = Quaternion.len2(axisX * d, axisY * d, axisZ * d, this.w);
return MathUtils.isZero(l2) ? 0f : (float)(2.0 * Math.acos((float) (this.... | public float getAngleAroundRad (final float axisX, final float axisY, final float axisZ) {
final float d = Vector3.dot(this.x, this.y, this.z, axisX, axisY, axisZ);
final float l2 = Quaternion.len2(axisX * d, axisY * d, axisZ * d, this.w);
return MathUtils.isZero(l2) ? 0f : (float)(2.0 * Math.acos(this.w / Math.... |
private void writeImages (File outputDir, Array<Page> pages, String packFileName) {
String imageName = packFileName;
int dotIndex = imageName.lastIndexOf('.');
if (dotIndex != -1) imageName = imageName.substring(0, dotIndex);
int fileIndex = 0;
for (Page page : pages) {
int width = page.width, height = p... | private void writeImages (File outputDir, Array<Page> pages, String packFileName) {
String imageName = packFileName;
int dotIndex = imageName.indexOf('.');
if (dotIndex != -1) imageName = imageName.substring(0, dotIndex);
int fileIndex = 0;
for (Page page : pages) {
int width = page.width, height = page.... |
public BulkRequest add(byte[] data, int from, int length, boolean contentUnsafe) throws Exception {
XContent xContent = XContentFactory.xContent(data, from, length);
byte marker = xContent.streamSeparator();
while (true) {
int nextMarker = findNextMarker(marker, from, data, lengt... | public BulkRequest add(byte[] data, int from, int length, boolean contentUnsafe) throws Exception {
XContent xContent = XContentFactory.xContent(data, from, length);
byte marker = xContent.streamSeparator();
while (true) {
int nextMarker = findNextMarker(marker, from, data, lengt... |
public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
ensureNotDeleteByQuery(NAME, parseContext);
XContentParser parser = parseContext.parser();
boolean queryFound = false;
float boost = 1.0f;
String childType = null;
ScoreTyp... | public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
ensureNotDeleteByQuery(NAME, parseContext);
XContentParser parser = parseContext.parser();
boolean queryFound = false;
float boost = 1.0f;
String childType = null;
ScoreTyp... |
public void testBasicQuerySanities() {
Query childQuery = new TermQuery(new Term("field", "value"));
ScoreType scoreType = ScoreType.values()[random().nextInt(ScoreType.values().length)];
ParentFieldMapper parentFieldMapper = SearchContext.current().mapperService().documentMapper("child").pa... | public void testBasicQuerySanities() {
Query childQuery = new TermQuery(new Term("field", "value"));
ScoreType scoreType = ScoreType.values()[random().nextInt(ScoreType.values().length)];
ParentFieldMapper parentFieldMapper = SearchContext.current().mapperService().documentMapper("child").pa... |
@Override public void run() {
while (true) {
if (closed) {
return;
}
String lastSeq = null;
try {
client.admin().indices().prepareRefresh(riverIndexName).execute().actionGet();
... | @Override public void run() {
while (true) {
if (closed) {
return;
}
String lastSeq = null;
try {
client.admin().indices().prepareRefresh(riverIndexName).execute().actionGet();
... |
@Inject public NettyHttpServerTransport(Settings settings, NetworkService networkService) {
super(settings);
this.networkService = networkService;
SizeValue maxContentLength = componentSettings.getAsSize("max_content_length", new SizeValue(100, SizeUnit.MB));
this.workerCount = compo... | @Inject public NettyHttpServerTransport(Settings settings, NetworkService networkService) {
super(settings);
this.networkService = networkService;
SizeValue maxContentLength = componentSettings.getAsSize("max_content_length", settings.getAsSize("http.max_content_length", new SizeValue(100, S... |
public void testDeleteWarmerAcknowledgement() {
createIndex("test");
ensureGreen();
assertAcked(client().admin().indices().preparePutWarmer("custom_warmer")
.setSearchRequest(client().prepareSearch("test").setTypes("test").setQuery(QueryBuilders.matchAllQuery())));
... | public void testDeleteWarmerAcknowledgement() {
createIndex("test");
ensureGreen();
assertAcked(client().admin().indices().preparePutWarmer("custom_warmer")
.setSearchRequest(client().prepareSearch("test").setTypes("test").setQuery(QueryBuilders.matchAllQuery())));
... |
public void testPartialFields() throws Exception {
createIndex("test");
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForYellowStatus().execute().actionGet();
client().prepareIndex("test", "type1", "1").setSource(XContentFactory.jsonBuilder().startObj... | public void testPartialFields() throws Exception {
createIndex("test");
client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForYellowStatus().execute().actionGet();
client().prepareIndex("test", "type1", "1").setSource(XContentFactory.jsonBuilder().startObj... |
protected TransportBroadcastOperationAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters) {
super(settings, actionName, threadPool, actionFilters);
this.clusterService = clusterService;
... | protected TransportBroadcastOperationAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters) {
super(settings, actionName, threadPool, actionFilters);
this.clusterService = clusterService;
... |
protected TransportNodesOperationAction(Settings settings, String actionName, ClusterName clusterName, ThreadPool threadPool,
ClusterService clusterService, TransportService transportService, ActionFilters actionFilters) {
super(settings, actionName, threadPool, a... | protected TransportNodesOperationAction(Settings settings, String actionName, ClusterName clusterName, ThreadPool threadPool,
ClusterService clusterService, TransportService transportService, ActionFilters actionFilters) {
super(settings, actionName, threadPool, a... |
private String transportReplicaAction() {
return actionName + "/replica";
}
| private String transportReplicaAction() {
return actionName + "[r]";
}
|
protected TransportSingleCustomOperationAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters) {
super(settings, actionName, threadPool, actionFilters);
this.clusterService = clusterService;
... | protected TransportSingleCustomOperationAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters) {
super(settings, actionName, threadPool, actionFilters);
this.clusterService = clusterService;
... |
protected TransportShardSingleOperationAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters) {
super(settings, actionName, threadPool, actionFilters);
this.clusterService = clusterService;
... | protected TransportShardSingleOperationAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters) {
super(settings, actionName, threadPool, actionFilters);
this.clusterService = clusterService;
... |
protected String handleRequest(Channel channel, StreamInput buffer, long requestId, Version version) throws IOException {
final String action = buffer.readString();
final NettyTransportChannel transportChannel = new NettyTransportChannel(transport, action, channel, requestId, version);
try ... | protected String handleRequest(Channel channel, StreamInput buffer, long requestId, Version version) throws IOException {
final String action = buffer.readString();
final NettyTransportChannel transportChannel = new NettyTransportChannel(transport, action, channel, requestId, version);
try ... |
public void execute(SearchContext context) {
ResetFieldSelector fieldSelector;
List<String> extractFieldNames = null;
boolean sourceRequested = false;
if (!context.hasFieldNames()) {
if (context.hasPartialFields()) {
// partial fields need the source, so f... | public void execute(SearchContext context) {
ResetFieldSelector fieldSelector;
List<String> extractFieldNames = null;
boolean sourceRequested = false;
if (!context.hasFieldNames()) {
if (context.hasPartialFields()) {
// partial fields need the source, so f... |
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 View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(layout.gist_view, null);
headerView = inflater.inflate(layout.gist_header, null);
headerHolder = new GistHeaderViewHolder(headerView);
loadingView = infl... | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(layout.gist_view, null);
headerView = inflater.inflate(layout.gist_header, null);
headerHolder = new GistHeaderViewHolder(headerView);
loadingView = infl... |
public void onClick(View v) {
if (issue != null)
stateTask.confirm(STATE_OPEN.equals(issue.getState()));
}
});
headerHolder = new IssueHeaderViewHolder(headerView, avatarHelper);
loadingView = inflater.inflate(layout.comment_load_item,... | public void onClick(View v) {
if (issue != null)
stateTask.confirm(STATE_OPEN.equals(issue.getState()));
}
});
headerHolder = new IssueHeaderViewHolder(headerView, avatarHelper);
loadingView = inflater.inflate(layout.load_item, null);
... |
public Bundle getAuthToken(AccountAuthenticatorResponse response,
Account account, String authTokenType, Bundle options)
throws NetworkErrorException {
final Bundle bundle = new Bundle();
if (!authTokenType.equals(ACCOUNT_TYPE))
return bundle;
AccountMa... | public Bundle getAuthToken(AccountAuthenticatorResponse response,
Account account, String authTokenType, Bundle options)
throws NetworkErrorException {
final Bundle bundle = new Bundle();
if (!authTokenType.equals(ACCOUNT_TYPE))
return bundle;
AccountMa... |
public void initialize(ApplicationListener listener, AndroidApplicationConfiguration config) {
graphics = new AndroidGraphicsLiveWallpaper(this, config, config.resolutionStrategy==null?new FillResolutionStrategy():config.resolutionStrategy);
input = AndroidInputFactory.newAndroidInput(this, this.getService(), null... | public void initialize(ApplicationListener listener, AndroidApplicationConfiguration config) {
graphics = new AndroidGraphicsLiveWallpaper(this, config.useGL20, config.resolutionStrategy==null?new FillResolutionStrategy():config.resolutionStrategy);
input = AndroidInputFactory.newAndroidInput(this, this.getService... |
public static String VERSION = "0.9.9";
} | public static String VERSION = "0.9.8";
} |
@Override public void doJson(JsonBuilder builder) throws IOException {
builder.startObject(MatchAllJsonQueryParser.NAME);
if (boost != -1) {
builder.field("boost", boost);
}
if (normsField != null) {
builder.field("normsField", normsField);
}
b... | @Override public void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(MatchAllJsonQueryParser.NAME);
if (boost != -1) {
builder.field("boost", boost);
}
if (normsField != null) {
builder.field("normsField", normsField);
... |
@Override public void doJson(JsonBuilder builder) throws IOException {
builder.startObject(PrefixJsonFilterParser.NAME);
builder.field(name, value);
builder.endObject();
}
}
| @Override public void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(PrefixJsonFilterParser.NAME);
builder.field(name, value);
builder.endObject();
}
}
|
@Override public void doJson(JsonBuilder builder) throws IOException {
builder.startObject(PrefixJsonQueryParser.NAME);
if (boost == -1) {
builder.field(name, value);
} else {
builder.startObject(name);
builder.field("prefix", value);
builder.f... | @Override public void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(PrefixJsonQueryParser.NAME);
if (boost == -1) {
builder.field(name, value);
} else {
builder.startObject(name);
builder.field("prefix", value);
... |
@Override protected void doJson(JsonBuilder builder) throws IOException {
builder.startObject(QueryStringJsonQueryParser.NAME);
builder.field("query", queryString);
if (defaultField != null) {
builder.field("defaultField", defaultField);
}
if (defaultOperator != n... | @Override protected void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(QueryStringJsonQueryParser.NAME);
builder.field("query", queryString);
if (defaultField != null) {
builder.field("defaultField", defaultField);
}
if (defau... |
@Override protected void doJson(JsonBuilder builder) throws IOException {
builder.startObject(RangeJsonFilterParser.NAME);
builder.startObject(name);
builder.field("from", from);
builder.field("to", to);
builder.field("includeLower", includeLower);
builder.field("incl... | @Override protected void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(RangeJsonFilterParser.NAME);
builder.startObject(name);
builder.field("from", from);
builder.field("to", to);
builder.field("includeLower", includeLower);
buil... |
@Override protected void doJson(JsonBuilder builder) throws IOException {
builder.startObject(RangeJsonQueryParser.NAME);
builder.startObject(name);
builder.field("from", from);
builder.field("to", to);
builder.field("includeLower", includeLower);
builder.field("inclu... | @Override protected void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(RangeJsonQueryParser.NAME);
builder.startObject(name);
builder.field("from", from);
builder.field("to", to);
builder.field("includeLower", includeLower);
build... |
@Override public void doJson(JsonBuilder builder) throws IOException {
builder.startObject(SpanTermJsonQueryParser.NAME);
if (boost == -1) {
builder.field(name, value);
} else {
builder.startObject(name);
builder.field("value", value);
builder.... | @Override public void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(SpanTermJsonQueryParser.NAME);
if (boost == -1) {
builder.field(name, value);
} else {
builder.startObject(name);
builder.field("value", value);
... |
@Override public void doJson(JsonBuilder builder) throws IOException {
builder.startObject(TermJsonFilterParser.NAME);
builder.field(name, value);
builder.endObject();
}
}
| @Override public void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(TermJsonFilterParser.NAME);
builder.field(name, value);
builder.endObject();
}
}
|
@Override public void doJson(JsonBuilder builder) throws IOException {
builder.startObject(TermJsonQueryParser.NAME);
if (boost == -1) {
builder.field(name, value);
} else {
builder.startObject(name);
builder.field("value", value);
builder.fiel... | @Override public void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(TermJsonQueryParser.NAME);
if (boost == -1) {
builder.field(name, value);
} else {
builder.startObject(name);
builder.field("value", value);
... |
@Override public void doJson(JsonBuilder builder) throws IOException {
builder.startObject(TermsJsonFilterParser.NAME);
builder.startArray(name);
for (Object value : values) {
builder.value(value);
}
builder.endArray();
builder.endObject();
}
}
| @Override public void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(TermsJsonFilterParser.NAME);
builder.startArray(name);
for (Object value : values) {
builder.value(value);
}
builder.endArray();
builder.endObject();
... |
@Override public void doJson(JsonBuilder builder) throws IOException {
builder.startObject(WildcardJsonQueryParser.NAME);
if (boost == -1) {
builder.field(name, value);
} else {
builder.startObject(name);
builder.field("wildcard", value);
build... | @Override public void doJson(JsonBuilder builder, Params params) throws IOException {
builder.startObject(WildcardJsonQueryParser.NAME);
if (boost == -1) {
builder.field(name, value);
} else {
builder.startObject(name);
builder.field("wildcard", value);
... |
protected Field innerParseCreateField(ParseContext context) throws IOException, AlreadyExpiredException {
if (enabledState.enabled) {
long ttl = context.sourceToParse().ttl();
if (ttl <= 0 && defaultTTL > 0) { // no ttl provided so we use the default value
ttl = defau... | protected Field innerParseCreateField(ParseContext context) throws IOException, AlreadyExpiredException {
if (enabledState.enabled && !context.sourceToParse().flyweight()) {
long ttl = context.sourceToParse().ttl();
if (ttl <= 0 && defaultTTL > 0) { // no ttl provided so we use the d... |
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 JacksonTypesBenchmark(String jsonString) throws IOException {
Preconditions.checkNotNull(jsonString, "jsonString must have a value");
this.jsonString = jsonString;
this.objectMapper = newObjectMapper();
this.factor = 10;
this.cycles = 10000;
// warm things up
... | public JacksonTypesBenchmark(String jsonString) throws IOException {
Preconditions.checkNotNull(jsonString, "jsonString must have a value");
this.jsonString = jsonString;
this.objectMapper = defaultObjectMapper();
this.factor = 10;
this.cycles = 10000;
// warm things... |
private void serializeValue(JsonParseContext jsonContext, String currentFieldName, JsonToken token) throws IOException {
JsonMapper mapper = mappers.get(currentFieldName);
if (mapper != null) {
mapper.parse(jsonContext);
return;
}
if (!dynamic) {
r... | private void serializeValue(JsonParseContext jsonContext, String currentFieldName, JsonToken token) throws IOException {
JsonMapper mapper = mappers.get(currentFieldName);
if (mapper != null) {
mapper.parse(jsonContext);
return;
}
if (!dynamic) {
r... |
@Inject public RestMainAction(Settings settings, Client client, RestController controller) {
super(settings, client);
JsonNode rootNode;
int quotesSize;
try {
rootNode = Jackson.newObjectMapper().readValue(Classes.getDefaultClassLoader().getResourceAsStream("org/elasticse... | @Inject public RestMainAction(Settings settings, Client client, RestController controller) {
super(settings, client);
JsonNode rootNode;
int quotesSize;
try {
rootNode = Jackson.defaultObjectMapper().readValue(Classes.getDefaultClassLoader().getResourceAsStream("org/elast... |
public boolean equals (Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (!(obj instanceof Attribute)) return false;
final Attribute other = (Attribute)obj;
if (this.type != other.type) return false;
return equals(other);
}
| public boolean equals (Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (!(obj instanceof Attribute)) return false;
final Attribute other = (Attribute)obj;
if (other.type != other.type) return false;
return equals(other);
}
|
protected ShardClearIndicesCacheResponse shardOperation(ShardClearIndicesCacheRequest request) throws ElasticSearchException {
IndexService service = indicesService.indexService(request.index());
if (service != null) {
// we always clear the query cache
service.cache().queryP... | protected ShardClearIndicesCacheResponse shardOperation(ShardClearIndicesCacheRequest request) throws ElasticSearchException {
IndexService service = indicesService.indexService(request.index());
if (service != null) {
// we always clear the query cache
service.cache().queryP... |
public void close() {
injector.getInstance(TransportClientNodesService.class).close();
injector.getInstance(TransportService.class).close();
try {
injector.getInstance(MonitorService.class).close();
} catch (Exception e) {
// ignore, might not be bounded
... | public void close() {
injector.getInstance(TransportClientNodesService.class).close();
injector.getInstance(TransportService.class).close();
try {
injector.getInstance(MonitorService.class).close();
} catch (Exception e) {
// ignore, might not be bounded
... |
public void close() {
if (lifecycle.started()) {
stop();
}
if (!lifecycle.moveToClosed()) {
return;
}
ESLogger logger = Loggers.getLogger(Node.class, settings.get("name"));
logger.info("closing ...");
StopWatch stopWatch = new StopWat... | public void close() {
if (lifecycle.started()) {
stop();
}
if (!lifecycle.moveToClosed()) {
return;
}
ESLogger logger = Loggers.getLogger(Node.class, settings.get("name"));
logger.info("closing ...");
StopWatch stopWatch = new StopWat... |
private final ImmutableMap<String, StoreFileMetaData> metadata;
MetadataSnapshot(Directory directory, ESLogger logger) throws IOException {
metadata = buildMetadata(directory, logger);
}
ImmutableMap<String, StoreFileMetaData> buildMetadata(Directory directory, ESLogger log... | private final ImmutableMap<String, StoreFileMetaData> metadata;
MetadataSnapshot(Directory directory, ESLogger logger) throws IOException {
metadata = buildMetadata(directory, logger);
}
ImmutableMap<String, StoreFileMetaData> buildMetadata(Directory directory, ESLogger log... |
protected String models[] = new String[] {
"car.obj", "cube.obj", "scene.obj", "scene2.obj", "sphere.obj", "wheel.obj",
"g3d/cube_anim.g3dj", "g3d/cubes.g3dj", "g3d/head_parented.g3dj", "g3d/head.g3dj", "g3d/head2.g3dj", "g3d/teapot.g3db", "g3d/test.g3dj"
};
| protected String models[] = new String[] {
"car.obj", "cube.obj", "scene.obj", "scene2.obj", "sphere.obj", "wheel.obj",
"g3d/knight.g3dj", "g3d/knight.g3db"
};
|
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... | 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... |
private void uploadImageData(Pixmap pixmap) {
this.width = pixmap.getWidth();
this.height = pixmap.getHeight();
if(!MathUtils.isPowerOfTwo(width) || !MathUtils.isPowerOfTwo(height))
throw new GdxRuntimeException("texture width and height must be powers of two");
Gdx.gl.glBindTexture(GL10.GL_TEXTURE_2D,... | private void uploadImageData(Pixmap pixmap) {
this.width = pixmap.getWidth();
this.height = pixmap.getHeight();
if(Gdx.gl20 == null && (!MathUtils.isPowerOfTwo(width) || !MathUtils.isPowerOfTwo(height)))
throw new GdxRuntimeException("texture width and height must be powers of two");
Gdx.gl.glBindTextu... |
public static boolean dataNode(Settings settings) {
String data = settings.get("data");
if (data == null) {
return !clientNode(settings);
}
return data.equals("true");
}
| public static boolean dataNode(Settings settings) {
String data = settings.get("node.data");
if (data == null) {
return !clientNode(settings);
}
return data.equals("true");
}
|
public interface IdCache extends IndexComponent, CloseableComponent {
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file... | public interface IdCache extends IndexComponent, CloseableComponent {
/*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file... |
private void toTouchEvents (long touches, UIEvent uiEvent) {
long array = NSSetExtensions.allObjects(touches);
int length = (int)NSArrayExtensions.count(array);
for (int i = 0; i < length; i++) {
long touchHandle = NSArrayExtensions.objectAtIndex$(array, i);
UITouch touch = UI_TOUCH_WRAPPER.wrap(touchHandl... | private void toTouchEvents (long touches, UIEvent uiEvent) {
long array = NSSetExtensions.allObjects(touches);
int length = (int)NSArrayExtensions.count(array);
for (int i = 0; i < length; i++) {
long touchHandle = NSArrayExtensions.objectAtIndex$(array, i);
UITouch touch = UI_TOUCH_WRAPPER.wrap(touchHandl... |
public static boolean isValid(String extension) {
return "actionscript3".equals(extension) //
|| "applescript".equals(extension) //
|| "as3".equals(extension) //
|| "bash".equals(extension) //
|| "c".equals(extension) //
|| "cf"... | public static boolean isValid(String extension) {
return "actionscript3".equals(extension) //
|| "applescript".equals(extension) //
|| "as3".equals(extension) //
|| "bash".equals(extension) //
|| "c".equals(extension) //
|| "cf"... |
public static void assertOrderedSearchHits(SearchResponse searchResponse, String... ids) {
String shardStatus = formatShardStatus(searchResponse);
assertThat("Expected different hit count. " + shardStatus, searchResponse.getHits().hits().length, equalTo(ids.length));
for (int i=0; i<ids.leng... | public static void assertOrderedSearchHits(SearchResponse searchResponse, String... ids) {
String shardStatus = formatShardStatus(searchResponse);
assertThat("Expected different hit count. " + shardStatus, searchResponse.getHits().hits().length, equalTo(ids.length));
for (int i=0; i<ids.leng... |
public void close() throws ElasticsearchException {
filterCache.close();
queryParserCache.close();
docSetCache.clear("close");
fixedBitSetFilterCache.clear("close");
if (clusterService != null) {
clusterService.remove(this);
}
}
| public void close() throws ElasticsearchException {
filterCache.close();
queryParserCache.close();
docSetCache.clear("close");
fixedBitSetFilterCache.close();
if (clusterService != null) {
clusterService.remove(this);
}
}
|
public void testSearchingFilteringAliasesSingleIndex() throws Exception {
logger.info("--> creating index [test]");
createIndex("test");
ensureGreen();
logger.info("--> adding filtering aliases to index [test]");
assertAcked(admin().indices().prepareAliases().addAlias("test... | public void testSearchingFilteringAliasesSingleIndex() throws Exception {
logger.info("--> creating index [test]");
assertAcked(prepareCreate("test").addMapping("type1", "id", "type=string", "name", "type=string"));
ensureGreen();
logger.info("--> adding filtering aliases to index ... |
public void renameFile(DirectoryService directoryService, String from, String to) throws IOException {
Directory directory = getDirectory(from);
if (nameDirMapping.putIfAbsent(to, directory) != null) {
throw new IOException("Can't rename file from " + from
+ " to: " +... | public void renameFile(DirectoryService directoryService, String from, String to) throws IOException {
Directory directory = getDirectory(from);
if (nameDirMapping.putIfAbsent(to, directory) != null) {
throw new IOException("Can't rename file from " + from
+ " to: " +... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.