repo_name
stringlengths 6
101
| path
stringlengths 4
300
| text
stringlengths 7
1.31M
|
|---|---|---|
vlmillet/phantom
|
projects/Phantom/phantom/lang/registration/AliasTemplate.h
|
<gh_stars>10-100
// license [
// This file is part of the Phantom project. Copyright 2011-2020 <NAME>.
// Distributed under the MIT license. Text available here at
// https://github.com/vlmillet/phantom
// ]
#pragma once
#include "GlobalRegistrer.h"
#include "Namespace.h"
#include <phantom/lang/Alias.h>
#include <phantom/lang/Application.h>
#include <phantom/lang/Namespace.h>
#include <phantom/lang/Template.h>
#include <phantom/lang/TemplateSignature.h>
#include <phantom/lang/TemplateSpecialization.h>
#define _PHNTM_POST_ALIAS_TEMPLATE(...) PHANTOM_PP_VARARG_0_X(_PHNTM_POST_ALIAS_TEMPLATE, ##__VA_ARGS__)
#define _PHNTM_POST_ALIAS_TEMPLATE0(...) \
_PHNTM_AlTpl->setMetaData __VA_ARGS__; \
}
#define _PHNTM_POST_ALIAS_TEMPLATEX(...) \
_PHNTM_AlTpl->setMetaData __VA_ARGS__; \
}
#define PHANTOM_ALIAS_TEMPLATE(...) PHANTOM_PP_VARARG(_PHANTOM_ALIAS_TEMPLATE_, ##__VA_ARGS__)
#define PHANTOM_ALIAS_TEMPLATE_V(...) PHANTOM_PP_VARARG(_PHANTOM_ALIAS_TEMPLATE_V_, ##__VA_ARGS__)
namespace phantom
{
namespace lang
{
PHANTOM_EXPORT_PHANTOM void SolveAliasTemplateDefaultArguments(TemplateSignature* a_pTS, StringView a_Defaults);
template<class T>
void SolveAliasTemplate(Source* a_pSource, RegistrationStep a_Step, Template*& a_rpTemplate, T& a_Builder,
StringView a_TemplateTypes, StringView a_TemplateParams, StringView a_Name,
StringView a_TemplateDep, StringView a_Defaults)
{
if (a_Step == RegistrationStep::Typedefs)
{
TemplateSignature* pTS = TemplateSignature::Parse(a_pSource, a_TemplateTypes, a_TemplateParams,
a_Builder._PHNTM_getMeta(), PHANTOM_R_FLAG_NATIVE);
PHANTOM_ASSERT(pTS, "cannot resolved template signature %.*s %.*s",
PHANTOM_STRING_AS_PRINTF_ARG(a_TemplateTypes), PHANTOM_STRING_AS_PRINTF_ARG(a_TemplateParams));
a_rpTemplate = a_pSource->New<Template>(pTS, a_Name, PHANTOM_R_NONE, PHANTOM_R_FLAG_NATIVE);
a_Builder._PHNTM_getSource()->addTemplate(a_rpTemplate);
a_Builder._PHNTM_getMeta()->addTemplate(a_rpTemplate);
a_Builder._PHNTM_getSource()->addTemplateSpecialization(a_rpTemplate->getEmptyTemplateSpecialization());
}
else // PostTypes
{
SolveAliasTemplateDefaultArguments(a_rpTemplate->getTemplateSignature(), a_Defaults);
while (::isspace(a_TemplateDep.front()))
a_TemplateDep.dropFront();
if (a_TemplateDep.startsWith("typename "))
a_TemplateDep = a_TemplateDep.substr(9);
Type* pType = Application::Get()->findCppType(a_TemplateDep, a_rpTemplate->getTemplateSignature());
PHANTOM_ASSERT(pType, "cannot resolve template dependant type '%.*s'",
PHANTOM_STRING_AS_PRINTF_ARG(a_TemplateDep));
Alias* pAlias = a_pSource->NewDeferred<Alias>(pType, a_Name, PHANTOM_R_NONE, PHANTOM_R_FLAG_NATIVE);
if (std::is_same<T, NamespaceBuilder>::value)
((Namespace*)a_Builder._PHNTM_getNamingScope())->addAlias(pAlias);
a_rpTemplate->getEmptyTemplateSpecialization()->setTemplated(pAlias);
}
a_Builder._PHNTM_getRegistrer()->_PHNTM_setLastSymbol(a_rpTemplate);
}
} // namespace lang
} // namespace phantom
#define _PHANTOM_ALIAS_TEMPLATE_5(TemplateTypes, TemplateParams, Defaults, Name, Aliased) \
PHANTOM_REGISTER(Typedefs, PostTypes) \
{ \
static phantom::lang::Template* pAliasT = nullptr; \
SolveAliasTemplate(namespace_()._PHNTM_getSource(), PHANTOM_REGISTRATION_STEP, pAliasT, this_(), \
PHANTOM_PP_QUOTE TemplateTypes, PHANTOM_PP_QUOTE TemplateParams, PHANTOM_PP_QUOTE(Name), \
PHANTOM_PP_IDENTITY(PHANTOM_PP_QUOTE)(PHANTOM_PP_REMOVE_PARENS(Aliased)), \
PHANTOM_PP_QUOTE Defaults); \
} \
_PHNTM_PRE_TRAILING_METADATA _PHNTM_TRAILING_METADATA_COUNTER_MINUS_1
#define _PHANTOM_ALIAS_TEMPLATE_4(TemplateTypes, TemplateParams, Name, Aliased) \
_PHANTOM_ALIAS_TEMPLATE_5(TemplateTypes, TemplateParams, ($), Name, Aliased)
#define _PHANTOM_ALIAS_TEMPLATE_V_3(VariadicPair, Name, Aliased) \
PHANTOM_REGISTER(Typedefs, PostTypes) \
{ \
static phantom::lang::Template* pAliasT = nullptr; \
SolveAliasTemplate(namespace_()._PHNTM_getSource(), PHANTOM_REGISTRATION_STEP, pAliasT, this_(), \
PHANTOM_PP_QUOTE_ARG_0 VariadicPair "...", PHANTOM_PP_QUOTE_ARG_1 VariadicPair, \
PHANTOM_PP_QUOTE(Name), \
PHANTOM_PP_IDENTITY(PHANTOM_PP_QUOTE)(PHANTOM_PP_REMOVE_PARENS(Aliased)), "$"); \
} \
_PHNTM_PRE_TRAILING_METADATA _PHNTM_TRAILING_METADATA_COUNTER_MINUS_1
|
PanRybaPl/fish-factions
|
src/main/java/pl/panryba/mc/guilds/commands/guild/admin/GuildNameCommand.java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package pl.panryba.mc.guilds.commands.guild.admin;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import pl.panryba.mc.guilds.GuildRole;
import pl.panryba.mc.guilds.PluginApi;
import pl.panryba.mc.guilds.commands.GuildSubCommand;
import pl.panryba.mc.guilds.entities.Guild;
import pl.panryba.mc.guilds.entities.GuildMember;
/**
*
* @author PanRyba.pl
*/
public class GuildNameCommand implements GuildSubCommand {
private PluginApi api;
public GuildNameCommand(PluginApi api) {
this.api = api;
}
@Override
public boolean onCommand(CommandSender cs, String[] strings) {
if (!(cs instanceof Player)) {
return false;
}
if (strings.length != 1) {
return false;
}
Player player = (Player) cs;
GuildMember member = api.getPlayerMember(player);
if (member == null) {
player.sendMessage(ChatColor.GRAY + "Nie nalezysz do zadnej gildii wiec nie mozesz zmienic nazwy");
return true;
}
if (!api.canNameGuild(member)) {
player.sendMessage(ChatColor.GRAY + "Nie masz uprawnien do zmiany nazwy Twojej gildii");
return true;
}
Guild guild = member.getGuild();
if(guild.hasExpired()) {
player.sendMessage(ChatColor.GRAY + "Nie mozesz zmienic nazwy wygaslej gildii");
return true;
}
String newName = strings[0];
api.setGuildName(guild, newName);
String fullName = guild.getFullName();
player.sendMessage(ChatColor.YELLOW + "Zmieniles nazwe Twojej gildii na " + ChatColor.GREEN + fullName);
api.sendToOtherMembers(guild, player, ChatColor.GREEN + player.getName() + ChatColor.YELLOW + " zmienil nazwe Twojej gildii na " + ChatColor.GREEN + fullName);
return true;
}
@Override
public String getDescription() {
return "zmiana nazwy gildii";
}
@Override
public String getUsage() {
return "<command> <nowa nazwa>";
}
@Override
public boolean canUse(GuildMember member) {
if (member == null) {
return false;
}
if (!member.hasRole(GuildRole.ADMIN)) {
return false;
}
return true;
}
}
|
DDouteaux/MTG_Builder
|
app/models/joints/card_user.js
|
const card_user_create = require('./card_user_create');
const card_user_get = require('./card_user_get');
var mongoose = require('mongoose');
const userCardSchema = mongoose.Schema({
cardId: String,
userId: String,
foil: Number,
normal: Number
})
userCardSchema.index({ cardId: 1, userId: 1}, { unique: true });
userCardSchema.plugin(card_user_create);
userCardSchema.plugin(card_user_get);
var UserCard = mongoose.model("UserCard", userCardSchema);
module.exports = UserCard;
|
DariaMachado/Algoritmos_Java
|
duracao.java
|
<reponame>DariaMachado/Algoritmos_Java<gh_stars>0
import java.util.Locale;
import java.util.Scanner;
public class duracao {
public static void main(String[] args) {
Locale.setDefault(Locale.US);
Scanner sc = new Scanner(System.in);
int horas, minutos, segundos, duracao, resto;
System.out.print("Digite a duracao em segundos: ");
duracao = sc.nextInt();
horas = duracao / 3600;
resto = duracao % 3600;
minutos = resto / 60;
segundos = resto % 60;
System.out.println(horas + ":" + minutos + ":" + segundos);
sc.close();
}
}
|
jozanek/sigmastate-interpreter
|
sigmastate/src/test/scala/sigmastate/helpers/ErgoTransactionValidator.scala
|
package sigmastate.helpers
import org.ergoplatform._
import sigmastate.eval.IRContext
import sigmastate.interpreter.ErgoTreeEvaluator.DefaultEvalSettings
import sigmastate.interpreter.EvalSettings
import org.ergoplatform.settings.ErgoAlgos
import org.ergoplatform.validation.{ValidationRules, SigmaValidationSettings}
import sigmastate.eval.{IRContext, CompiletimeIRContext}
import sigmastate.interpreter.Interpreter.{ScriptNameProp, emptyEnv}
import sigmastate.interpreter.{CacheKey, PrecompiledScriptProcessor, ProcessorStats, ScriptProcessorSettings}
import scala.util.{Success, Failure}
/** Base class for interpreters used in tests.
* @see derived classes */
class ErgoLikeTestInterpreter(implicit override val IR: IRContext) extends ErgoLikeInterpreter {
override type CTX = ErgoLikeContext
override val evalSettings: EvalSettings = DefaultEvalSettings.copy(
isMeasureOperationTime = true,
isDebug = true,
isTestRun = true)
override val precompiledScriptProcessor = ErgoLikeTestInterpreter.DefaultProcessorInTests
}
object ErgoLikeTestInterpreter {
val predefScriptsInTests = Seq(
// for property("emission specification")
"100b0400040004e04e0580bcc1960b0580bcc1960b05808c8d9e02040204e04e04a00b040005808c8d9e02d1ec9683040193e4c6b2a57300000404a391a3e4c6a7040493c2a7c2b2a573010093958fa3730273039973049c73057e9a73069d99a3730773080599c1a7c1b2a5730900ed91a3e4c6a7040490c1a7730a"
)
/** A list of settings, one for each soft-fork. */
val validationSettings: Seq[SigmaValidationSettings] = Array(
ValidationRules.currentSettings // for v4.0
// add v5.0 settings here...
)
/** Script processor which uses [[CompiletimeIRContext]] to process graphs. */
val DefaultProcessorInTests: PrecompiledScriptProcessor = {
val scriptKeys = predefScriptsInTests.flatMap { s =>
val bytes = ErgoAlgos.decodeUnsafe(s)
validationSettings.map(vs => CacheKey(bytes, vs))
}
new PrecompiledScriptProcessor(
ScriptProcessorSettings(
predefScripts = scriptKeys,
maxCacheSize = 10,
recordCacheStats = true,
reportingInterval = 10)) {
override protected def createIR(): IRContext = new CompiletimeIRContext
override protected def onReportStats(stats: ProcessorStats): Unit = {
println(s"Processor Stats: $stats")
}
override protected def onEvictedCacheEntry(key: CacheKey): Unit = {
val scriptHex = ErgoAlgos.encode(key.ergoTreeBytes.toArray)
println(s"Evicted: ${scriptHex}")
}
}
}
}
class ErgoTransactionValidator(activatedVersion: Byte)(implicit IR: IRContext) {
val verifier = new ErgoLikeTestInterpreter()
def validate(tx: ErgoLikeTransaction,
blockchainState: BlockchainState,
minerPubkey: Array[Byte],
boxesReader: ErgoBoxReader): Either[Throwable, Long] = {
val msg = tx.messageToSign
val inputs = tx.inputs
val boxes: IndexedSeq[ErgoBox] = tx.inputs.map(_.boxId).map{id =>
boxesReader.byId(id) match {
case Success(box) => box
case Failure(e) => return Left[Throwable, Long](e)
}
}
val txCost = boxes.zipWithIndex.foldLeft(0L) { case (accCost, (box, idx)) =>
val input = inputs(idx)
val proof = input.spendingProof
val proverExtension = tx.inputs(idx).spendingProof.extension
val context =
ErgoLikeContextTesting(blockchainState.currentHeight, blockchainState.lastBlockUtxoRoot, minerPubkey, boxes,
tx, box, activatedVersion, proverExtension)
val verificationResult = verifier.verify(
emptyEnv + (ScriptNameProp -> s"height_${blockchainState.currentHeight }_verify"),
box.ergoTree, context, proof, msg)
val scriptCost: Long = verificationResult match {
case Success((res, cost)) =>
if(!res) return Left[Throwable, Long](new Exception(s"Validation failed for input #$idx"))
else cost
case Failure(e) =>
return Left[Throwable, Long](e)
}
accCost + scriptCost
}
Right(txCost)
}
}
|
Tokni/cfo
|
src/MainContainer/ContentContainer/Tax/Tax.js
|
<reponame>Tokni/cfo
import React, { Fragment } from 'react'
import CreateTax from './CreateTax'
import GetTaxes from './GetTaxes'
const Tax = () => {
return (
<Fragment>
<CreateTax/>
<GetTaxes/>
</Fragment>
)
}
export default Tax
|
Tifosi-M/Hi-Top
|
src/domain/businessEntity/Community/GroupsData.java
|
<gh_stars>0
package domain.businessEntity.Community;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
@DatabaseTable(tableName = "T_GroupsData")
public class GroupsData {
public GroupsData() {}
@DatabaseField(generatedId = false)
protected String gid;
@DatabaseField(canBeNull = false)
protected String groupname;
@DatabaseField(canBeNull = false)
protected String place;
@DatabaseField(canBeNull = false)
protected String time;
@DatabaseField(canBeNull = false)
protected String info;
@DatabaseField(canBeNull = false)
protected String sponsor;
@DatabaseField(canBeNull = true)
protected String isMyJoin;
public String getGid() {
return gid;
}
public void setGid(String gid) {
this.gid = gid;
}
public String getGroupname() {
return groupname;
}
public void setGroupname(String groupname) {
this.groupname = groupname;
}
public String getPlace() {
return place;
}
public void setPlace(String place) {
this.place = place;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
public String getSponsor() {
return sponsor;
}
public void setSponsor(String sponsor) {
this.sponsor = sponsor;
}
public String getIsMyJoin() {
return isMyJoin;
}
public void setIsMyJoin(String isMyJoin) {
this.isMyJoin = isMyJoin;
}
}
|
mcvine/mcvine
|
packages/mccomponents/mccomponentsbpmodule/wrap_SQEkernel.cc
|
<filename>packages/mccomponents/mccomponentsbpmodule/wrap_SQEkernel.cc
// -*- C++ -*-
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// <NAME>
// California Institute of Technology
// (C) 2007 All Rights Reserved
//
// {LicenseText}
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
#include <sstream>
#include <boost/python.hpp>
#include "mccomponents/kernels/sample/AbstractSQE.h"
#include "mccomponents/kernels/sample/SQEkernel.h"
#include "mccomponents/boostpython_binding/wrap_kernel.h"
namespace wrap_mccomponents {
void wrap_SQEkernel()
{
using namespace boost::python;
using namespace mccomponents::boostpython_binding;
using namespace mccomponents::sample;
typedef mccomponents::kernels::SQEkernel w_t;
kernel_wrapper<w_t>::wrap
("SQEkernel",
init<double, double, double,
AbstractSQE &,
double, double, double, double> ()
[with_custodian_and_ward<1,5> () ]
)
;
class_<AbstractSQE, boost::noncopyable>
("AbstractSQE", no_init)
.def("__call__", &AbstractSQE::operator() )
;
}
}
// version
// $Id$
// End of file
|
hide24/ezidpums
|
test/controllers/idp_attribute_assigns_controller_test.rb
|
<reponame>hide24/ezidpums
require 'test_helper'
class IdpAttributeAssignsControllerTest < ActionDispatch::IntegrationTest
setup do
@idp_attribute_assign = idp_attribute_assigns(:one)
@service_provider = service_providers(:one)
@idp_attribute = idp_attributes(:one)
end
test "should get index" do
get idp_attribute_assigns_url
assert_response :success
end
# Does not support create idp_attribute_assigns record, directry.
# It should be created by assosiation (ServiceProvider of IdpAttribute)
# test "should get new" do
# get new_idp_attribute_assign_url
# assert_response :success
# end
#
# test "should create idp_attribute_assign" do
# assert_difference('IdpAttributeAssign.count') do
# post idp_attribute_assigns_url, params: { idp_attribute_assign: { idp_attribute_id: @idp_attribute_assign.idp_attribute_id, service_provider_id: @idp_attribute_assign.service_provider_id } }
# end
#
# assert_redirected_to idp_attribute_assign_url(IdpAttributeAssign.last)
# end
# Show action displaies ServiceProvider entity, does not IdpAttributeAssign entity.
# test "should show idp_attribute_assign" do
# get idp_attribute_assign_url(@service_provider)
# assert_response :success
# end
test "should get edit" do
get edit_idp_attribute_assign_url(@service_provider)
assert_response :success
end
test "should update idp_attribute_assign" do
patch idp_attribute_assign_url(@idp_attribute_assign), params: { idp_attribute_id: [@idp_attribute.id] }
assert_redirected_to idp_attribute_assigns_url
end
test "should destroy idp_attribute_assign" do
assert_difference('IdpAttributeAssign.where(service_provider_id: @idp_attribute_assign.id).count', -1) do
delete idp_attribute_assign_url(@idp_attribute_assign)
end
assert_redirected_to idp_attribute_assigns_url
end
end
|
dbmdz/digitalcollections-cms
|
dc-cudami-client/src/main/java/de/digitalcollections/cudami/client/identifiable/entity/CudamiWebsitesClient.java
|
<filename>dc-cudami-client/src/main/java/de/digitalcollections/cudami/client/identifiable/entity/CudamiWebsitesClient.java
package de.digitalcollections.cudami.client.identifiable.entity;
import com.fasterxml.jackson.databind.ObjectMapper;
import de.digitalcollections.model.exception.TechnicalException;
import de.digitalcollections.model.identifiable.entity.Website;
import de.digitalcollections.model.identifiable.web.Webpage;
import de.digitalcollections.model.list.paging.PageRequest;
import de.digitalcollections.model.list.paging.PageResponse;
import java.net.http.HttpClient;
import java.util.List;
import java.util.Locale;
import java.util.UUID;
public class CudamiWebsitesClient extends CudamiEntitiesClient<Website> {
public CudamiWebsitesClient(HttpClient http, String serverUrl, ObjectMapper mapper) {
super(http, serverUrl, Website.class, mapper, API_VERSION_PREFIX + "/websites");
}
public PageResponse<Webpage> findRootWebpages(UUID uuid, PageRequest pageRequest)
throws TechnicalException {
return doGetRequestForPagedObjectList(
String.format("%s/%s/rootpages", baseEndpoint, uuid), pageRequest, Webpage.class);
}
public List<Locale> getLanguages() throws TechnicalException {
return doGetRequestForObjectList(String.format("%s/languages", baseEndpoint), Locale.class);
}
public boolean updateRootWebpagesOrder(UUID websiteUuid, List<Webpage> rootpages)
throws TechnicalException {
return Boolean.parseBoolean(
doPutRequestForString(
String.format("%s/%s/rootpages", baseEndpoint, websiteUuid), rootpages));
}
}
|
tolivb/tbasteroids
|
src/spaceObjects/enemyShip.h
|
<gh_stars>0
#include <allegro.h>
#include "spaceObject.h"
#include "../weapons/weapon.h"
#ifndef ENEMYSHIP_H_
#define ENEMYSHIP_H_
class enemyShip : public spaceObject{
public:
enemyShip(int, int, int, int);
void draw(BITMAP*);
void doAction(int);
bool resurect();
int getId();
bool collidesWith(spaceObject*);
virtual ~enemyShip();
private:
void moveLeft(int pos=5);
void moveRight(int pos=5);
void moveUp(int pos=1);
void moveDown(int pos=1);
void recalcCenter();
int x1, y1, x2, y2;
int id;
int speed;
weapon* gun;
};
#endif /*ENEMYSHIP_H_*/
|
kevinah95/sedec
|
routes/api.results.js
|
var mysql = require('mysql');
var pool = mysql.createPool(require('../config/database').connection);
var results = {
getAllByUserId: function(req, res, next) {
pool.query('CALL results_find_by_user_id(?)', [req.user.userId], function(error, rows) {
if (error) {
res.status(500).send({ message: error.message });
return next(error);
};
if (!rows[0].length) {
res.status(204).send();
} else {
res.send(rows[0]);
}
});
},
getAll: function(req, res, next) {
pool.query('CALL get_all_results()', [], function(error, rows) {
if (error) {
res.status(500).send({ message: error.message });
return next(error);
};
if (!rows[0].length) {
res.status(204).send();
} else {
res.send(rows[0]);
}
});
}
};
module.exports = results;
|
nickporubsky/boost-simd-clone
|
test/function/simd/shift_right.cpp
|
<gh_stars>1-10
//==================================================================================================
/**
Copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
**/
//==================================================================================================
#include <boost/simd/function/shift_right.hpp>
#include <boost/simd/logical.hpp>
#include <boost/simd/pack.hpp>
#include <simd_test.hpp>
#include <boost/simd/constant/inf.hpp>
#include <boost/simd/constant/minf.hpp>
#include <boost/simd/constant/mone.hpp>
#include <boost/simd/constant/nan.hpp>
#include <boost/simd/constant/one.hpp>
#include <boost/simd/constant/zero.hpp>
namespace bs = boost::simd;
namespace bd = boost::dispatch;
template <typename T, int N, typename Env>
void test(Env& $)
{
using p_t = bs::pack<T, N>;
T a1[N];
T b[N], c[N];
std::size_t sh1 = sizeof(T)*8-1;
int sh2 = 1;
for(int i = 0; i < N; ++i)
{
a1[i] = (i%2) ? T(i) : T(-i);
b[i] = bs::shift_right(a1[i], sh1);
c[i] = bs::shift_right(a1[i], sh2);
}
p_t aa1(&a1[0], &a1[0]+N);
p_t bb(&b[0], &b[0]+N);
p_t cc(&c[0], &c[0]+N);
STF_EQUAL(bs::shift_right(aa1, sh1), bb);
STF_EQUAL(bs::shift_right(aa1, sh2), cc);
STF_EQUAL((aa1 >> sh1), bb);
STF_EQUAL((aa1 >> sh2), cc);
}
STF_CASE_TPL("Check shift_right on pack with integral shift" , STF_INTEGRAL_TYPES)
{
static const std::size_t N = bs::pack<T>::static_size;
test<T, N>($);
test<T, N/2>($);
test<T, N*2>($);
}
template <typename T, int N, typename Env>
void tests(Env& $)
{
using iT = bd::as_integer_t<T>;
using p_t = bs::pack<T, N>;
using i_t = bs::pack<iT, N>;
T a1[N], b[N];
iT sh[N];
for(int i = 0; i < N; ++i)
{
sh[i] = i%(8*sizeof(T));
a1[i] = (i%2) ? T(i) : T(-i);
b[i] = bs::shift_right(a1[i],sh[i]);
}
p_t aa1(&a1[0], &a1[0]+N);
p_t bb(&b[0], &b[0]+N);
i_t sh1(&sh[0], &sh[0]+N);
STF_EQUAL(bs::shift_right(aa1, sh1), bb);
STF_EQUAL((aa1 >> sh1), bb);
}
STF_CASE_TPL("Check shift_right on pack with pack shift" , STF_INTEGRAL_TYPES)
{
static const std::size_t N = bs::pack<T>::static_size;
tests<T, N>($);
tests<T, N/2>($);
tests<T, N*2>($);
}
STF_CASE_TPL (" shift_right integer", STF_INTEGRAL_TYPES)
{
namespace bs = boost::simd;
namespace bd = boost::dispatch;
using p_t = bs::pack<T>;
using bs::shift_right;
using ip_t = bd::as_integer_t<p_t>;
using r_t = decltype(shift_right(p_t(), ip_t()));
// return type conformity test
STF_TYPE_IS(r_t, p_t);
// specific values tests
STF_EQUAL(shift_right(bs::One<p_t>(),bs::One<ip_t>()), bs::Zero<r_t>());
STF_EQUAL(shift_right(bs::One<p_t>(),bs::Zero<ip_t>()), bs::One<r_t>());
STF_EQUAL(shift_right(bs::Zero<p_t>(),bs::One<ip_t>()), bs::Zero<r_t>());
} // end of test for integer_
STF_CASE_TPL (" shift_right real", STF_IEEE_TYPES)
{
namespace bs = boost::simd;
namespace bd = boost::dispatch;
using p_t = bs::pack<T>;
using bs::shift_right;
using ip_t = bd::as_integer_t<p_t>;
using r_t = decltype(shift_right(p_t(), ip_t()));
// return type conformity test
STF_TYPE_IS(r_t, p_t);
// specific values tests
STF_EQUAL(shift_right(bs::One<p_t>(),bs::Zero<ip_t>()), bs::One<r_t>());
STF_EQUAL(shift_right(bs::Zero<p_t>(),bs::One<ip_t>()), bs::Zero<r_t>());
} // end of test for floating_
|
manjukiran/MKImageMarkup
|
MK ImageMarkup Example/MKImageMarkup.framework/Headers/MKImageMarkup.h
|
//
// MKImageMarkup.h
// Inkpad
//
// Created by <NAME> on 23/02/2015.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) 2015 <NAME>
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "WDCanvasController.h"
//! Project version number for MKImageMarkup.
FOUNDATION_EXPORT double MKImageMarkupVersionNumber;
//! Project version string for MKImageMarkup.
FOUNDATION_EXPORT const unsigned char MKImageMarkupVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <MKImageMarkup/PublicHeader.h>
@protocol MKImageMarkupDelegate <NSObject>
@required
-(void)didDismissMarkupSessionWithImage:(UIImage*)image imageEdited:(BOOL)imageEdited;
@end
@interface MKImageMarkup : NSObject <UINavigationControllerDelegate,
UIImagePickerControllerDelegate,
UIPopoverControllerDelegate,
UIActionSheetDelegate,
WDCanvasControllerDelegate>
@property (nonatomic,weak) id <MKImageMarkupDelegate> delegate;
-(instancetype) initPopOverInViewController:(UIViewController*)viewController
fromButton:(UIButton*)button;
-(void) startEditingImage:(UIImage*)image sourceViewController:(UIViewController*)sourceVC;
@end
|
shettyh/azure-cosmosdb-java
|
commons/src/main/java/com/microsoft/azure/cosmosdb/rx/internal/RMResources.java
|
/*
* The MIT License (MIT)
* Copyright (c) 2018 Microsoft Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.microsoft.azure.cosmosdb.rx.internal;
public class RMResources {
public static final String UnknownResourceType = "Resource type %s is unknown";
public static final String InvalidDocumentCollection = "The specified document collection is invalid.";
public static final String StringArgumentNullOrEmpty = "String agument %s is null or empty";
public static final String PartitionKeyAndParitionKeyRangeIdBothSpecified = "Both Partition Key and Partition Key range are Specified in %s";
public static final String PartitionKeyRangeIdOrPartitionKeyMustBeSpecified = "One of the partition key range id or partition key must be specified";
public static final String TooFewPartitionKeyComponents = "PartitionKey has fewer components than defined the collection resource.";
public static final String TooManyPartitionKeyComponents = "PartitionKey has more components than defined the collection resource.";
public static final String UnableToDeserializePartitionKeyValue = "Cannot deserialize PartitionKey value '%s";
public static final String Gone = "The requested resource is no longer available at the server.";
public static final String ExceptionMessageAddIpAddress = "%s, Local IP: %s";
public static final String ExceptionMessage = "Message: %s";
public static final String ServiceUnavailable = "Service is currently unavailable, please retry after a while. If this problem persists please contact support.";
public static final String InternalServerError = "Unknown server error occurred when processing this request.";
public static final String InvalidBackendResponse = "The backend response was not in the correct format.";
public static final String PartitionKeyRangeNotFound = "PartitionKeyRange with id %s in collection %s doesn't exist";
public static final String InvalidTarget = "Target for the request is invalid";
public static final String InvalidPartitionKey = "Partition key %s is invalid.";
public static final String PartitionKeyMismatch = "Partition key provided either doesn't correspond to definition in the collection or doesn't match partition key field values specified in the document.";
public static final String MissingPartitionKeyValue = "PartitionKey value must be supplied for this operation.";
public static final String InvalidConflictResolutionMode = "Invalid mode '%s' for setting '%s'. MODE expected is '%s'.";
public static final String InvalidRegionsInSessionToken = "Compared session tokens '%s' and '%s' has unexpected regions.";
public static final String InvalidSessionToken = "The session token provided '%s' is invalid.";
public static final String ResourceTokenNotFound = "Resource token not found.";
public static final String Unauthorized = "Unable to authenticate the request. The request requires valid user authentication.";
public static final String Forbidden = "Unable to proceed with the request. Please check the authorization claims to ensure the required permissions to process the request.";
public static final String NotFound = "Entity with the specified id does not exist in the system.";
public static final String BadRequest = "One of the input values is invalid.";
public static final String MethodNotAllowed = "The requested verb is not supported.";
public static final String EntityAlreadyExists = "Entity with the specified id already exists in the system.";
public static final String PreconditionFailed = "Operation cannot be performed because one of the specified precondition is not met.";
public static final String RequestEntityTooLarge = "The size of the response exceeded the maximum allowed size, limit the response size by specifying smaller value for '%s' header.";
public static final String Locked = "";
public static final String RetryWith = "Retry the request.";
public static final String TooManyRequests = "The request rate is too large. Please retry after sometime.";
public static final String UnexpectedResourceType = "ResourceType %s is unexpected.";
public static final String InvalidHeaderValue = "Value '%s' specified for the header '%s' is invalid.";
public static final String RequestTimeout = "Request timed out.";
public static final String GlobalStrongWriteBarrierNotMet = "Global Strong write barrier has not been met for the request.";
public static final String InvalidRequestHeaderValue = "Invalid value for request header %s: %s";
public static final String InvalidResourceAddress = "Invalid address for resource %s: %s";
public static final String ReadQuorumNotMet = "Read Quorum size of %d is not met for the request.";
public static final String ReadSessionNotAvailable = "The read session is not available for the input session token.";
public static final String InvalidUrl = "InvalidUrl";
public static final String InvalidResourceUrlQuery = "The value %s specified for query %s is invalid.";
public static final String PartitionKeyRangeIdAbsentInContext = "PartitionKeyRangeId is absent in the context.";
}
|
CoderLee-Y/Sportmeeting-system
|
TechPrototype/src/main/java/com/sportsmeeting/daoimpl/FileDaoImpl.java
|
package com.sportsmeeting.daoimpl;
import com.sportsmeeting.dao.FileDao;
import com.sportsmeeting.entity.Institute;
import com.sportsmeeting.entity.User;
import com.sportsmeeting.entity.UserAuthority;
import com.sportsmeeting.repository.InstituteRepository;
import com.sportsmeeting.repository.UserAuthorityRepository;
import com.sportsmeeting.repository.UserRepository;
import javassist.bytecode.Descriptor;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@Repository
public class FileDaoImpl implements FileDao {
UserRepository userRepository;
UserAuthorityRepository userAuthorityRepository;
InstituteRepository instituteRepository;
@Autowired
void setUserRepository(UserRepository userRepository){
this.userRepository=userRepository;
}
@Autowired
void setUserAuthorityRepository(UserAuthorityRepository userAuthorityRepository) {this.userAuthorityRepository = userAuthorityRepository;}
@Autowired
void setInstituteRepository(InstituteRepository instituteRepository){
this.instituteRepository=instituteRepository;
}
@Override
@Transactional
public void userUpload(List<User> newUsers)
{
Iterator<User> it = newUsers.iterator();
while (it.hasNext()){
User p = (User)it.next();
String userId = p.getUserId();
//System.out.println(p);
User temp1 = userRepository.getUserById(userId);
if(temp1 != null)
userRepository.deleteUserById(userId);
userRepository.userUpload(userId,p.getUserIcon(),p.getUserIdentity(),p.getUsername(),p.getUserAge(),p.getUserGender(),p.getUserGrade(),p.getUserInstitute(),p.getEMail());
UserAuthority temp2 = userAuthorityRepository.getUserAuthorityById(userId);
if(temp2 != null)
userAuthorityRepository.deleteUserAuthorityById(userId);
userAuthorityRepository.userAuthorityUpload(userId, p.getUsername(), 123, p.getUserIdentity());
}
}
@Override
@Transactional
public void athleteUpload(JSONArray result)
{
for(int i = 0; i < result.size(); i++)
{
JSONObject jo = result.getJSONObject(i);
User u = new User();
u.setUserId(jo.getString("学号"));
u.setUserAge(Integer.parseInt(jo.getString("年龄")));
u.setUserGender(jo.getString("性别"));
u.setUsername(jo.getString("姓名"));
u.setEMail(jo.getString("email"));
u.setUserIcon("https://cdn.jsdelivr.net/gh/Okabe-Rintarou-0/web-images@master/books/sjtu.9m0nx5y4ga4.jpg");
if(jo.has("年级")) {
u.setUserGrade(jo.getString("年级"));
}else {
u.setUserGrade(null);
}
if(jo.has("学院")){
String insName = jo.getString("学院");
Institute ins = instituteRepository.getInstituteByName(insName);
u.setUserInstitute(ins.getInstituteId());
} else{
u.setUserInstitute(null);
}
u.setUserIdentity(0);
String userId = u.getUserId();
//System.out.println(p);
User temp1 = userRepository.getUserById(userId);
if(temp1 != null)
userRepository.deleteUserById(userId);
userRepository.userUpload(userId,u.getUserIcon(),u.getUserIdentity(),u.getUsername(),u.getUserAge(),u.getUserGender(),u.getUserGrade(),u.getUserInstitute(),u.getEMail());
UserAuthority temp2 = userAuthorityRepository.getUserAuthorityById(userId);
if(temp2 != null)
userAuthorityRepository.deleteUserAuthorityById(userId);
userAuthorityRepository.userAuthorityUpload(userId, u.getUsername(), 123, u.getUserIdentity());
}
}
@Override
@Transactional
public void judgeUpload(JSONArray result)
{
List<User> newJudges = new ArrayList<>();
for(int i = 0; i < result.size(); i++)
{
JSONObject jo = result.getJSONObject(i);
User u = new User();
u.setUserId(jo.getString("工号"));
System.out.println(u.getUserId());
u.setUserGrade(null);
if(jo.has("头像")){
u.setUserIcon(jo.getString("头像"));
} else{
u.setUserIcon("https://cdn.jsdelivr.net/gh/Okabe-Rintarou-0/web-images@master/books/sjtu.9m0nx5y4ga4.jpg");
}
u.setEMail(jo.getString("email"));
u.setUserAge(Integer.parseInt(jo.getString("年龄")));
u.setUserGender(jo.getString("性别"));
u.setUserGrade(null);
u.setUsername(jo.getString("姓名"));
if(jo.has("学院")){
String insName = jo.getString("学院");
Institute ins = instituteRepository.getInstituteByName(insName);
u.setUserInstitute(ins.getInstituteId());
} else{
u.setUserInstitute(null);
}
u.setUserIdentity(2);
String userId = u.getUserId();
//System.out.println(p);
User temp1 = userRepository.getUserById(userId);
if(temp1 != null)
userRepository.deleteUserById(userId);
userRepository.userUpload(userId,u.getUserIcon(),u.getUserIdentity(),u.getUsername(),u.getUserAge(),u.getUserGender(),u.getUserGrade(),u.getUserInstitute(),u.getEMail());
UserAuthority temp2 = userAuthorityRepository.getUserAuthorityById(userId);
if(temp2 != null)
userAuthorityRepository.deleteUserAuthorityById(userId);
userAuthorityRepository.userAuthorityUpload(userId, u.getUsername(), 123, u.getUserIdentity());
}
}
@Override
@Transactional
public void managerUpload(JSONArray result)
{
for(int i = 0; i < result.size(); i++)
{
JSONObject jo = result.getJSONObject(i);
User u = new User();
u.setUserId(jo.getString("工号"));
u.setUserAge(Integer.parseInt(jo.getString("年龄")));
u.setUserGender(jo.getString("性别"));
u.setUsername(jo.getString("姓名"));
u.setEMail(jo.getString("email"));
u.setUserGrade(null);
u.setUserIcon("https://cdn.jsdelivr.net/gh/Okabe-Rintarou-0/web-images@master/books/sjtu.9m0nx5y4ga4.jpg");
if(jo.has("学院")){
String insName = jo.getString("学院");
Institute ins = instituteRepository.getInstituteByName(insName);
u.setUserInstitute(ins.getInstituteId());
} else{
u.setUserInstitute(null);
}
u.setUserIdentity(1);
String userId = u.getUserId();
//System.out.println(p);
User temp1 = userRepository.getUserById(userId);
if(temp1 != null)
userRepository.deleteUserById(userId);
userRepository.userUpload(userId,u.getUserIcon(),u.getUserIdentity(),u.getUsername(),u.getUserAge(),u.getUserGender(),u.getUserGrade(),u.getUserInstitute(),u.getEMail());
UserAuthority temp2 = userAuthorityRepository.getUserAuthorityById(userId);
if(temp2 != null)
userAuthorityRepository.deleteUserAuthorityById(userId);
userAuthorityRepository.userAuthorityUpload(userId, u.getUsername(), 123, u.getUserIdentity());
}
}
}
|
zakharchenkoAndrii/expo
|
ios/versioned-react-native/ABI43_0_0/ReactNative/ReactCommon/react/renderer/imagemanager/platform/ios/ABI43_0_0RCTSyncImageManager.h
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <ABI43_0_0RCTImageManagerProtocol.h>
NS_ASSUME_NONNULL_BEGIN
@protocol ABI43_0_0RCTImageLoaderWithAttributionProtocol;
/**
* iOS-specific ImageManager.
*/
@interface ABI43_0_0RCTSyncImageManager : NSObject <ABI43_0_0RCTImageManagerProtocol>
- (instancetype)initWithImageLoader:(id<ABI43_0_0RCTImageLoaderWithAttributionProtocol>)imageLoader;
- (ABI43_0_0facebook::ABI43_0_0React::ImageRequest)requestImage:(ABI43_0_0facebook::ABI43_0_0React::ImageSource)imageSource
surfaceId:(ABI43_0_0facebook::ABI43_0_0React::SurfaceId)surfaceId;
@end
NS_ASSUME_NONNULL_END
|
StandCN/spring-integration
|
spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/CachingClientConnectionFactory.java
|
/*
* Copyright 2002-2021 the original author or authors.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.ip.tcp.connection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.core.serializer.Deserializer;
import org.springframework.core.serializer.Serializer;
import org.springframework.integration.ip.IpHeaders;
import org.springframework.integration.support.AbstractIntegrationMessageBuilder;
import org.springframework.integration.util.SimplePool;
import org.springframework.lang.Nullable;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
import org.springframework.messaging.support.ErrorMessage;
/**
* Connection factory that caches connections from the underlying target factory. The underlying
* factory will be reconfigured to have {@code singleUse=true} in order for the connection to be
* returned to the cache after use. Users should not subsequently set the underlying property to
* false, or cache starvation will result.
*
* @author <NAME>
* @since 2.2
*
*/
public class CachingClientConnectionFactory extends AbstractClientConnectionFactory implements DisposableBean {
private final AbstractClientConnectionFactory targetConnectionFactory;
private final SimplePool<TcpConnectionSupport> pool;
/**
* Construct a caching connection factory that delegates to the provided factory, with
* the provided pool size.
* @param target the target factory.
* @param poolSize the number of connections to allow.
*/
public CachingClientConnectionFactory(AbstractClientConnectionFactory target, int poolSize) {
super("", 0);
// override single-use to true so the target creates multiple connections
target.setSingleUse(true);
this.targetConnectionFactory = target;
class Callback implements SimplePool.PoolItemCallback<TcpConnectionSupport> {
@Override
public TcpConnectionSupport createForPool() {
try {
return CachingClientConnectionFactory.this.targetConnectionFactory.getConnection();
}
catch (Exception e) {
throw new MessagingException("Failed to obtain connection", e);
}
}
@Override
public boolean isStale(TcpConnectionSupport connection) {
return !connection.isOpen();
}
@Override
public void removedFromPool(TcpConnectionSupport connection) {
connection.close();
}
}
this.pool = new SimplePool<TcpConnectionSupport>(poolSize, new Callback());
}
/**
* @param connectionWaitTimeout the new timeout.
* @see SimplePool#setWaitTimeout(long)
*/
public void setConnectionWaitTimeout(int connectionWaitTimeout) {
this.pool.setWaitTimeout(connectionWaitTimeout);
}
/**
* @param poolSize the new pool size.
* @see SimplePool#setPoolSize(int)
*/
public void setPoolSize(int poolSize) {
this.pool.setPoolSize(poolSize);
}
/**
* @return the pool size.
* @see SimplePool#getPoolSize()
*/
public int getPoolSize() {
return this.pool.getPoolSize();
}
/**
* @return the idle count.
* @see SimplePool#getIdleCount()
*/
public int getIdleCount() {
return this.pool.getIdleCount();
}
/**
* @return the active count.
* @see SimplePool#getActiveCount()
*/
public int getActiveCount() {
return this.pool.getActiveCount();
}
/**
* @return the allocated count.
* @see SimplePool#getAllocatedCount()
*/
public int getAllocatedCount() {
return this.pool.getAllocatedCount();
}
@Override
public TcpConnectionSupport obtainConnection() {
return new CachedConnection(this.pool.getItem(), getListener());
}
///////////////// DELEGATE METHODS ///////////////////////
@Override
public boolean isRunning() {
return this.targetConnectionFactory.isRunning();
}
@Override
public int hashCode() {
return this.targetConnectionFactory.hashCode();
}
@Override
public void setComponentName(String componentName) {
this.targetConnectionFactory.setComponentName(componentName);
}
@Override
public String getComponentType() {
return this.targetConnectionFactory.getComponentType();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CachingClientConnectionFactory that = (CachingClientConnectionFactory) o;
return this.targetConnectionFactory.equals(that.targetConnectionFactory);
}
@Override
public int getSoTimeout() {
return this.targetConnectionFactory.getSoTimeout();
}
@Override
public void setSoTimeout(int soTimeout) {
this.targetConnectionFactory.setSoTimeout(soTimeout);
}
@Override
public int getSoReceiveBufferSize() {
return this.targetConnectionFactory.getSoReceiveBufferSize();
}
@Override
public void setSoReceiveBufferSize(int soReceiveBufferSize) {
this.targetConnectionFactory.setSoReceiveBufferSize(soReceiveBufferSize);
}
@Override
public int getSoSendBufferSize() {
return this.targetConnectionFactory.getSoSendBufferSize();
}
@Override
public void setSoSendBufferSize(int soSendBufferSize) {
this.targetConnectionFactory.setSoSendBufferSize(soSendBufferSize);
}
@Override
public boolean isSoTcpNoDelay() {
return this.targetConnectionFactory.isSoTcpNoDelay();
}
@Override
public void setSoTcpNoDelay(boolean soTcpNoDelay) {
this.targetConnectionFactory.setSoTcpNoDelay(soTcpNoDelay);
}
@Override
public int getSoLinger() {
return this.targetConnectionFactory.getSoLinger();
}
@Override
public void setSoLinger(int soLinger) {
this.targetConnectionFactory.setSoLinger(soLinger);
}
@Override
public boolean isSoKeepAlive() {
return this.targetConnectionFactory.isSoKeepAlive();
}
@Override
public void setSoKeepAlive(boolean soKeepAlive) {
this.targetConnectionFactory.setSoKeepAlive(soKeepAlive);
}
@Override
public int getSoTrafficClass() {
return this.targetConnectionFactory.getSoTrafficClass();
}
@Override
public void setSoTrafficClass(int soTrafficClass) {
this.targetConnectionFactory.setSoTrafficClass(soTrafficClass);
}
@Override
public String getHost() {
return this.targetConnectionFactory.getHost();
}
@Override
public int getPort() {
return this.targetConnectionFactory.getPort();
}
@Override
public TcpSender getSender() {
return this.targetConnectionFactory.getSender();
}
@Override
public Serializer<?> getSerializer() {
return this.targetConnectionFactory.getSerializer();
}
@Override
public Deserializer<?> getDeserializer() {
return this.targetConnectionFactory.getDeserializer();
}
@Override
public TcpMessageMapper getMapper() {
return this.targetConnectionFactory.getMapper();
}
/**
* Delegate TCP Client Connection factories that are used to receive
* data need a Listener to send the messages to.
* This applies to client factories used for outbound gateways
* or for a pair of collaborating channel adapters.
* <p>
* During initialization, if a factory detects it has no listener
* it's listening logic (active thread) is terminated.
* <p>
* The listener registered with a factory is provided to each
* connection it creates so it can call the onMessage() method.
* <p>
* This code satisfies the first requirement in that this
* listener signals to the factory that it needs to run
* its listening logic.
* <p>
* When we wrap actual connections with CachedConnections,
* the connection is given the wrapper as a listener, so it
* can enhance the headers in onMessage(); the wrapper then invokes
* the real listener supplied here, with the modified message.
*/
@Override
public void registerListener(TcpListener listener) {
super.registerListener(listener);
this.targetConnectionFactory.enableManualListenerRegistration();
}
@Override
public void registerSender(TcpSender sender) {
this.targetConnectionFactory.registerSender(sender);
}
@Override
public void setTaskExecutor(Executor taskExecutor) {
this.targetConnectionFactory.setTaskExecutor(taskExecutor);
}
@Override
public void setDeserializer(Deserializer<?> deserializer) {
this.targetConnectionFactory.setDeserializer(deserializer);
}
@Override
public void setSerializer(Serializer<?> serializer) {
this.targetConnectionFactory.setSerializer(serializer);
}
@Override
public void setMapper(TcpMessageMapper mapper) {
this.targetConnectionFactory.setMapper(mapper);
}
@Override
public boolean isSingleUse() {
return true;
}
/**
* Ignored on this factory; connections are always cached in the pool. The underlying
* connection factory will have its singleUse property coerced to true (causing the
* connection to be returned). Setting it to false on the underlying factory after initialization
* will cause cache starvation.
* @param singleUse the singleUse.
*/
@Override
public void setSingleUse(boolean singleUse) {
if (!singleUse && logger.isDebugEnabled()) {
logger.debug("singleUse=false is not supported; cached connections are never closed");
}
}
@Override
public void setInterceptorFactoryChain(TcpConnectionInterceptorFactoryChain interceptorFactoryChain) {
this.targetConnectionFactory.setInterceptorFactoryChain(interceptorFactoryChain);
}
@Override
public void setLookupHost(boolean lookupHost) {
this.targetConnectionFactory.setLookupHost(lookupHost);
}
@Override
public boolean isLookupHost() {
return this.targetConnectionFactory.isLookupHost();
}
@Override
public void forceClose(TcpConnection connection) {
if (connection instanceof CachedConnection) {
((CachedConnection) connection).physicallyClose();
}
// will be returned to pool but stale, so will be re-established
super.forceClose(connection);
}
@Override
public void enableManualListenerRegistration() {
super.enableManualListenerRegistration();
this.targetConnectionFactory.enableManualListenerRegistration();
}
@Override
public void start() {
setActive(true);
this.targetConnectionFactory.start();
super.start();
}
@Override
public synchronized void stop() {
this.targetConnectionFactory.stop();
this.pool.removeAllIdleItems();
}
@Override
public void destroy() throws Exception {
this.pool.close();
}
private final class CachedConnection extends TcpConnectionInterceptorSupport {
private final AtomicBoolean released = new AtomicBoolean();
CachedConnection(TcpConnectionSupport connection,
@Nullable TcpListener tcpListener) { // NOSONAR false positive, connection not marked @Nullable
super.setTheConnection(connection);
super.registerListener(tcpListener);
}
@Override
public void close() {
if (!this.released.compareAndSet(false, true)) {
if (logger.isDebugEnabled()) {
logger.debug("Connection " + getConnectionId() + " has already been released");
}
}
else {
/*
* If the delegate is stopped, actually close the connection, but still release
* it to the pool, it will be discarded/renewed the next time it is retrieved.
*/
if (!isRunning()) {
if (logger.isDebugEnabled()) {
logger.debug("Factory not running - closing " + getConnectionId());
}
super.close();
}
CachingClientConnectionFactory.this.pool.releaseItem(getTheConnection());
}
}
@Override
public String getConnectionId() {
return "Cached:" + super.getConnectionId();
}
@Override
public String toString() {
return getConnectionId();
}
/**
* We have to intercept the message to replace the connectionId header with
* ours so the listener can correlate a response with a request. We supply
* the actual connectionId in another header for convenience and tracing
* purposes.
*/
@Override
public boolean onMessage(Message<?> message) {
Message<?> modifiedMessage;
if (message instanceof ErrorMessage) {
Map<String, Object> headers = new HashMap<String, Object>(message.getHeaders());
headers.put(IpHeaders.CONNECTION_ID, getConnectionId());
if (headers.get(IpHeaders.ACTUAL_CONNECTION_ID) == null) {
headers.put(IpHeaders.ACTUAL_CONNECTION_ID,
message.getHeaders().get(IpHeaders.CONNECTION_ID));
}
modifiedMessage = new ErrorMessage((Throwable) message.getPayload(), headers);
}
else {
AbstractIntegrationMessageBuilder<?> messageBuilder =
CachingClientConnectionFactory.this.getMessageBuilderFactory()
.fromMessage(message)
.setHeader(IpHeaders.CONNECTION_ID, getConnectionId());
if (message.getHeaders().get(IpHeaders.ACTUAL_CONNECTION_ID) == null) {
messageBuilder.setHeader(IpHeaders.ACTUAL_CONNECTION_ID,
message.getHeaders().get(IpHeaders.CONNECTION_ID));
}
modifiedMessage = messageBuilder.build();
}
TcpListener listener = getListener();
if (listener != null) {
listener.onMessage(modifiedMessage);
}
else {
if (logger.isDebugEnabled()) {
logger.debug("Message discarded; no listener: " + message);
}
}
return true;
}
private void physicallyClose() {
getTheConnection().close();
}
}
}
|
krashnakant/jhipster-lite
|
src/main/java/tech/jhipster/lite/generator/server/javatool/base/domain/JavaBaseModuleFactory.java
|
package tech.jhipster.lite.generator.server.javatool.base.domain;
import static tech.jhipster.lite.generator.module.domain.JHipsterModule.*;
import tech.jhipster.lite.error.domain.Assert;
import tech.jhipster.lite.generator.module.domain.JHipsterDestination;
import tech.jhipster.lite.generator.module.domain.JHipsterModule;
import tech.jhipster.lite.generator.module.domain.JHipsterSource;
import tech.jhipster.lite.generator.module.domain.properties.JHipsterModuleProperties;
public class JavaBaseModuleFactory {
private static final String SOURCE_FOLDER = "server/javatool/base";
private enum Destination {
COMMON("common"),
COMMON_DOMAIN("common/domain"),
ERROR("error"),
ERROR_DOMAIN("error/domain");
private final String path;
Destination(String path) {
this.path = path;
}
String path() {
return this.path;
}
}
public JHipsterModule buildModule(JHipsterModuleProperties properties) {
Assert.notNull("properties", properties);
String packagePath = properties.basePackage().path();
String baseClassName = properties.projectBaseName().capitalized();
JHipsterDestination testDestination = toSrcTestJava().append(packagePath);
JHipsterDestination mainDestination = toSrcMainJava().append(packagePath);
//@formatter:off
return moduleForProject(properties)
.context()
.packageName(properties.basePackage())
.put("collectionClass", baseClassName)
.and()
.files()
.batch(source(), mainDestination)
.add("BusinessContext.java")
.add("SharedKernel.java")
.and()
.batch(source(), mainDestination.append(Destination.ERROR_DOMAIN.path()))
.add("Assert.java")
.add("MissingMandatoryValueException.java")
.add("AssertionException.java")
.add("NotAfterTimeException.java")
.add("NotBeforeTimeException.java")
.add("NullElementInCollectionException.java")
.add("NumberValueTooHighException.java")
.add("NumberValueTooLowException.java")
.add("StringTooLongException.java")
.add("StringTooShortException.java")
.add("TooManyElementsException.java")
.and()
.batch(source(), testDestination.append(Destination.ERROR_DOMAIN.path()))
.add("AssertTest.java")
.add("MissingMandatoryValueExceptionTest.java")
.and()
.batch(source(), testDestination)
.add("UnitTest.java")
.add("ComponentTest.java")
.add("ReplaceCamelCase.java")
.and()
.add(source().template("package-info-error.java"), packageInfoDestination(mainDestination, Destination.ERROR))
.add(source().template("package-info-common.java"), packageInfoDestination(mainDestination, Destination.COMMON))
.add(source().template("ProjectCollections.java"), collectionsDestination(baseClassName, mainDestination))
.add(source().template("ProjectCollectionsTest.java"), collectionsTestDestination(baseClassName, testDestination))
.and()
.build();
//@formatter:on
}
private JHipsterDestination packageInfoDestination(JHipsterDestination mainDestination, Destination destination) {
return mainDestination.append(destination.path()).append("package-info.java");
}
private JHipsterDestination collectionsDestination(String className, JHipsterDestination mainDestination) {
return mainDestination.append(Destination.COMMON_DOMAIN.path()).append(className + "Collections.java");
}
private JHipsterDestination collectionsTestDestination(String className, JHipsterDestination testDestination) {
return testDestination.append(Destination.COMMON_DOMAIN.path()).append(className + "CollectionsTest.java");
}
private JHipsterSource source() {
return from(SOURCE_FOLDER);
}
}
|
klada/online
|
wsd/Exceptions.hpp
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// Exception classes to differentiate between the
// different error situations and handling.
#pragma once
#include <atomic>
#include <exception>
#include <stdexcept>
#include <string>
// not beautiful
#define EXCEPTION_DECL(type,parent_cl) \
class type : public parent_cl \
{ \
public: \
static std::atomic<size_t> count; \
type(const std::string &str) : parent_cl(str) \
{ type::count++; } \
};
// Generic COOL errors and base for others.
class CoolException : public std::runtime_error
{
public:
std::string toString() const
{
return what();
}
protected:
using std::runtime_error::runtime_error;
};
EXCEPTION_DECL(StorageSpaceLowException,CoolException)
/// General exception thrown when we are not able to
/// connect to storage.
EXCEPTION_DECL(StorageConnectionException,CoolException)
/// A bad-request exception that is meant to signify,
/// and translate into, an HTTP bad request.
EXCEPTION_DECL(BadRequestException,CoolException)
/// A bad-argument exception that is meant to signify,
/// and translate into, an HTTP bad request.
EXCEPTION_DECL(BadArgumentException,BadRequestException)
/// An authorization exception that is meant to signify,
/// and translate into, an HTTP unauthorized error.
EXCEPTION_DECL(UnauthorizedRequestException,CoolException)
/// A service-unavailable exception that is meant to signify
/// an internal error.
EXCEPTION_DECL(ServiceUnavailableException,CoolException)
/// Badly formed data we are parsing
EXCEPTION_DECL(ParseError,CoolException)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
iltempe/osmosi
|
sumo/tools/projects/TaxiFCD_Krieg/src/fcdToRoutes/differentDepartRoutes.py
|
#!/usr/bin/env python
# -*- coding: Latin-1 -*-
"""
@file GenerateTaxiRoutesMain.py
@author <NAME>
@author <NAME>
@author <NAME>
@date 2008-08-30
@version $Id$
Reads taxi routes and create several new routeFile with different depart times for each route.
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2008-2017 DLR (http://www.dlr.de/) and contributors
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
"""
from __future__ import absolute_import
from __future__ import print_function
import util.Path as path
# global vars
taxiDict = {}
def main():
print("start program")
readRouteFile()
writeRoutes()
print("end")
def readRouteFile():
inputFile = open(path.taxiRoutesComplete, 'r')
taxi = ''
for line in inputFile:
words = line.split('"')
if words[0].find("<vehicle") != -1:
# id depart
taxiDict.setdefault(words[1], []).append(int(words[5]))
taxi = words[1]
elif words[0].find("<route>") != -1:
words = line[line.find(">") + 1:line.find("</")].split(" ")
taxiDict[taxi].append(words)
inputFile.close()
def writeRoutes():
"""Writes the collected values in a Sumo-Routes-File"""
for i in range(-13, 15, 2):
print(i)
outputFile = open(path.taxiRoutesDiffDepart + str(i) + ".rou.xml", 'w')
outputFile.write("<routes>\n")
# known for like used in java
for taxi, elm in taxiDict.iteritems():
outputFile.write(
"\t<vehicle id=\"" + taxi + "\" type=\"taxi\" depart=\"" + str(elm[0] + i) + "\" color=\"1,0,0\">\n")
outputFile.write("\t\t<route>")
for edge in elm[1]:
outputFile.write(str(edge) + " ")
# delete the space between the last edge and </route>
outputFile.seek(-1, 1)
outputFile.write("</route>\n")
outputFile.write("\t</vehicle>\n")
outputFile.write("</routes>")
outputFile.close()
# start the program
main()
|
Teezkad/quizroom-beta
|
node_modules/nativescript-telerik-ui-pro/platforms/ios/TelerikUI.framework/Headers/TKCalendarIPadTheme.h
|
//
// TKCalendarSquareTheme.h
// Telerik UI
//
// Copyright (c) 2014 Telerik. All rights reserved.
//
/**
@discussion A theme for TKCalendar designed for iPad.
*/
@interface TKCalendarIPadTheme : TKTheme
@end
|
gilbertjgonzales/php-src
|
ext/intl/collator/collator_arginfo.h
|
<filename>ext/intl/collator/collator_arginfo.h
/* This is a generated file, edit the .stub.php file instead. */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
ZEND_END_ARG_INFO()
#define arginfo_class_Collator_create arginfo_class_Collator___construct
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_compare, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, str1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, str2, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_sort, 0, 0, 1)
ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0)
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, sort_flag, "Collator::SORT_REGULAR")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_sortWithSortKeys, 0, 0, 1)
ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_asort, 0, 0, 1)
ZEND_ARG_TYPE_INFO(1, arr, IS_ARRAY, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sort_flag, IS_LONG, 0, "Collator::SORT_REGULAR")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_getAttribute, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_setAttribute, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, attr, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, val, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_getStrength, 0, 0, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_setStrength, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, strength, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_getLocale, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
ZEND_END_ARG_INFO()
#define arginfo_class_Collator_getErrorCode arginfo_class_Collator_getStrength
#define arginfo_class_Collator_getErrorMessage arginfo_class_Collator_getStrength
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Collator_getSortKey, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_END_ARG_INFO()
|
RandomCodeOrg/SimplePDF
|
src/main/java/com/github/randomcodeorg/simplepdf/creation/RenderTable.java
|
package com.github.randomcodeorg.simplepdf.creation;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.github.randomcodeorg.simplepdf.DocumentElement;
import com.github.randomcodeorg.simplepdf.SimplePDFDocument;
import com.github.randomcodeorg.simplepdf.Size;
import com.github.randomcodeorg.simplepdf.Spacing;
import com.github.randomcodeorg.simplepdf.Table;
import com.github.randomcodeorg.simplepdf.TableRow;
/**
* The render element corresponding to the {@link Table} element.
* @author <NAME>
*
*/
public class RenderTable extends RenderElement<Table> {
private float[] columnWidths;
/**
* Creates a new instance of {@link RenderTable}.
* @param document The containing document.
* @param documentElement The corresponding document element.
*/
public RenderTable(SimplePDFDocument document, Table documentElement) {
super(document, documentElement);
createColumnWidths();
}
/**
* Calculated the column widths.
*/
private void createColumnWidths() {
if (columnWidths != null)
return;
int width = 0;
if (documentElement.getDoAutoAligment()) {
for (TableRow tr : documentElement.getRows()) {
if (tr.getCells().size() > width)
width = tr.getCells().size();
}
columnWidths = new float[width];
for (int i = 0; i < width; i++)
columnWidths[i] = 1.0f / width;
} else {
TableRow row = documentElement.getRows().get(0);
columnWidths = new float[row.getCells().size()];
for (int i = 0; i < row.getCells().size(); row.getCells()) {
columnWidths[i] = (float) (row.getCells().get(i).getWidth() / 100.0f);
}
}
}
@Override
public Size getRenderSize(PreRenderInformation info, Size parentSize) throws RenderingException {
return null;
}
@Override
public Collection<RenderElement<?>> preSplit() {
List<RenderElement<? extends DocumentElement>> result = new ArrayList<RenderElement<? extends DocumentElement>>();
for (TableRow tr : documentElement.getRows()) {
result.add(new RenderTableRow(document, documentElement, tr, columnWidths));
}
return result;
}
@Override
public Spacing getRenderMargin(DocumentGraphics g) throws RenderingException {
return null;
}
@Override
public void render(RenderingInformation info) throws RenderingException {
}
@Override
protected boolean isLineBreak() {
return true;
}
@Override
protected List<RenderElement<? extends DocumentElement>> splitToFit(PreRenderInformation info, Size s)
throws RenderingException {
return null;
}
}
|
markovandooren/rejuse
|
src/main/java/org/aikodi/rejuse/junit/Revision.java
|
<reponame>markovandooren/rejuse
package org.aikodi.rejuse.junit;
/**
* <p>A class of Revisions of something.</p>
*
* <p>An example of a revision is software revison. A revision consists of a sequence of numbers.
* The first three numbers are called "major", "minor" and "micro". Further numbers have no name.</p>
*
* <center>
* <img src="doc-files/Revision.png"/>
* </center>
*
* @author <NAME>
*/
public interface Revision extends Comparable<Revision> {
/* The revision of this class */
public final static String CVS_REVISION ="$Revision$";
/**
* Return the major number of this Revision.
*/
/*@
@ public behavior
@
@ post \result == getNumber(1);
@*/
public /*@ pure @*/ int getMajor();
/**
* Return the minor number of this Revision.
*/
/*@
@ public behavior
@
@ post \result == getNumber(2);
@*/
public /*@ pure @*/ int getMinor();
/**
* Return the micro number of this Revision.
*/
/*@
@ public behavior
@
@ post \result == getNumber(3);
@*/
public /*@ pure @*/ int getMicro();
/**
* Return the index'th number of this Revision.
*
* @param index
* The index of the requested number.
*/
/*@
@ pre index >= 1;
@
@ post \result >=0;
@ post (index > length()) ==> (\result == 0);
@*/
public /*@ pure @*/ int getNumber(int index);
/**
* Return the number of numbers in this Revision.
*/
/*@
@ public behavior
@
@ post \result >= 1;
@*/
public /*@ pure @*/ int length();
/**
* Check whether or not this revision is equal to another
*
* @param other
* The other revision.
*/
/*@
@ also public behavior
@
@ post (! (other instanceof Revision)) ==> (\result == false);
@ post (other instanceof Revision) ==> \result ==
@ (\forall int i; i>=1;
@ getNumber(i) == ((Revision)other).getNumber(i));
@*/
public /*@ pure @*/ boolean equals(Object other);
/**
* Compare this revision to the other revision.
*/
/*@
@ public behavior
@
@ post o == null ==> \result > 0;
@ post (\exists i; i > 0 & length() >= i;
@ (\forall j; j > 0 & j < i; getNumber(j) == o.getNumber(j)) &&
@ ((o.length() < i) || (getNumber(i) > o.getNumber(i)))
@ )
@ ==> \result > 0;
@ (\exists i; i > 0 & o.length() >= i;
@ (\forall j; j > 0 & j < i; getNumber(j) == o.getNumber(j)) &&
@ ((length() < i ) || (getNumber(i) < o.getNumber(i)))
@ )
@ ==> \result < 0;
@*/
public /*@ pure @*/ int compareTo(Revision o);
}
|
yalla-coop/website-redesign
|
src/styles/caseStudies.js
|
<filename>src/styles/caseStudies.js
// TODO: Migrate all common case studies styles to this file
import styled from 'styled-components'
import {
breakpoints,
spacings,
size,
letterSpacing,
lineHeight,
psize,
colors,
} from '../utils'
import { Wrapper as ContentWrapper } from '../components/contentWrapper'
export const Context = styled(ContentWrapper)`
${breakpoints.mobileSmall} {
h2 {
font-size: ${size.sm};
letter-spacing: ${letterSpacing.small};
line-height: ${lineHeight.xl};
margin-bottom: ${spacings[4]};
padding-right: ${spacings[2]};
}
}
${breakpoints.tabletVertical} {
h2 {
font-size: ${size.md};
}
}
${breakpoints.laptopLarge} {
padding-bottom: 0;
h2 {
font-size: ${size.lg};
line-height: 4.8rem;
margin-bottom: ${spacings[6]};
}
p {
font-size: ${psize.xl};
line-height: 3.6rem;
padding-bottom: ${spacings[6]};
}
}
`
export const WhereItAllStartedSection = styled(ContentWrapper)`
h2 {
margin-bottom: ${spacings[2]};
}
p:not(:last-child) {
margin-bottom: ${spacings[3]};
}
${breakpoints.laptopLarge} {
padding-top: 0;
background: white;
padding-bottom: ${spacings[5]};
}
${breakpoints.laptopLarge} {
h2 {
font-size: ${size.s};
line-height: 3rem;
}
p {
font-size: ${psize.l};
line-height: 3rem;
}
}
`
export const WhereWeCameInSection = styled(WhereItAllStartedSection)`
background: white;
${breakpoints.laptopLarge} {
padding-top: ${spacings[8]};
padding-bottom: ${spacings[8]};
background: #f9f9f9;
}
`
export const WhatWeDeliveredSection = styled(WhereItAllStartedSection)`
background: white;
h3 {
font-size: ${size.sm};
margin-top: ${spacings[3]};
margin-bottom: ${spacings[3]};
}
${breakpoints.laptopLarge} {
padding-top: ${spacings[8]};
h3 {
font-size: ${size.md};
padding-top: ${spacings[6]};
}
}
`
export const IntroAndMetaSection = styled.div`
${breakpoints.tabletVertical} {
display: flex;
justify-content: space-between;
align-items: baseline;
}
`
export const MetaDataContainer = styled.div`
background-color: ${colors.LightestGray};
padding: ${spacings[4]};
${breakpoints.tabletVertical} {
order: 2;
width: 30%;
padding: ${spacings[4]};
background-color: ${colors.white};
}
`
|
andriydzyuba/new-cdms
|
app/publications-state/manual-state/manual.route.js
|
(function(){
'use strict';
angular
.module('app')
.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
$stateProvider
.state('manual', {
url:'/manual/:id',
templateUrl: 'publications-state/manual-state/manual.view.html',
controller: 'ManualController',
controllerAs: 'vm'
})
}])
})();
|
scifier/sdk
|
lib/contracts/error/missing-api-error.js
|
const RepositoryError = require('./repository-error');
class MissingApiError extends RepositoryError {
/**
* @param {string} name
* @param {...any} args
*/
constructor(name, ...args) {
super(`Missing API for contract "${name}"`, ...args);
}
}
module.exports = MissingApiError;
|
oliver-nicoll/tourney-maker
|
src/Components/Containers/Footer.js
|
<gh_stars>0
import React from 'react';
import Footer from '../Footer'
export function FooterContainer () {
return (
<Footer>
<Footer.Wrapper>
<Footer.Row>
<Footer.Column>
<Footer.Title>About Us</Footer.Title>
<Footer.Link href="/">Home</Footer.Link>
<Footer.Link href="/about">About</Footer.Link>
</Footer.Column>
<Footer.Column>
<Footer.Title>Tournaments</Footer.Title>
<Footer.Link href="/events">View Tournaments</Footer.Link>
<Footer.Link href="/events">Create Tournament</Footer.Link>
</Footer.Column>
<Footer.Column>
<Footer.Title>Teams</Footer.Title>
<Footer.Link href="/teams">View Teams</Footer.Link>
<Footer.Link href="/teams">Create Teams</Footer.Link>
</Footer.Column>
<Footer.Column>
<Footer.Title>ScoreBoard</Footer.Title>
<Footer.Link href="/scoreboard">Keep Score</Footer.Link>
</Footer.Column>
</Footer.Row>
</Footer.Wrapper>
</Footer>
)
}
|
uk-gov-mirror/alphagov.content-publisher
|
db/migrate/20191120204541_add_government_id_to_edition.rb
|
<reponame>uk-gov-mirror/alphagov.content-publisher
class AddGovernmentIdToEdition < ActiveRecord::Migration[5.2]
def change
add_column :editions, :government_id, :uuid
end
end
|
s884812/Piggy2
|
scripts/reactor/2618002.js
|
/**
* @author: Eric
* @reactor: Card Data reactor 2
* @func: Romeo and Juliet GMS-like PQ
*/
function act() {
if (rm.haveItem(4001133)) {
rm.getMap(rm.getMapId() + 1).getReactorByName(rm.getMapId() == 926100200 ? "rnj31_out" : "jnr31_out").forceHitReactor(1);
rm.gainItem(4001133, -1);
}
}
|
keithroe/vtkoptix
|
Filters/Extraction/vtkExtractEdges.cxx
|
/*=========================================================================
Program: Visualization Toolkit
Module: vtkExtractEdges.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkExtractEdges.h"
#include "vtkCellArray.h"
#include "vtkCellData.h"
#include "vtkDataSet.h"
#include "vtkEdgeTable.h"
#include "vtkGenericCell.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkMergePoints.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkPolyData.h"
#include "vtkIncrementalPointLocator.h"
vtkStandardNewMacro(vtkExtractEdges);
//----------------------------------------------------------------------------
// Construct object.
vtkExtractEdges::vtkExtractEdges()
{
this->Locator = NULL;
}
//----------------------------------------------------------------------------
vtkExtractEdges::~vtkExtractEdges()
{
if ( this->Locator )
{
this->Locator->UnRegister(this);
this->Locator = NULL;
}
}
//----------------------------------------------------------------------------
// Generate feature edges for mesh
int vtkExtractEdges::RequestData(
vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector)
{
// get the info objects
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkInformation *outInfo = outputVector->GetInformationObject(0);
// get the input and output
vtkDataSet *input = vtkDataSet::SafeDownCast(
inInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkPolyData *output = vtkPolyData::SafeDownCast(
outInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkPoints *newPts;
vtkCellArray *newLines;
vtkIdType numCells, cellNum, numPts, newId;
int edgeNum, numEdgePts, numCellEdges;
int i, abort = 0;
vtkIdType pts[2];
vtkIdType pt1 = 0, pt2;
double x[3];
vtkEdgeTable *edgeTable;
vtkGenericCell *cell;
vtkCell *edge;
vtkPointData *pd, *outPD;
vtkCellData *cd, *outCD;
vtkDebugMacro(<<"Executing edge extractor");
// Check input
//
numPts=input->GetNumberOfPoints();
if ( (numCells=input->GetNumberOfCells()) < 1 || numPts < 1 )
{
return 1;
}
// Set up processing
//
edgeTable = vtkEdgeTable::New();
edgeTable->InitEdgeInsertion(numPts);
newPts = vtkPoints::New();
newPts->Allocate(numPts);
newLines = vtkCellArray::New();
newLines->EstimateSize(numPts*4,2);
pd = input->GetPointData();
outPD = output->GetPointData();
outPD->CopyAllocate(pd,numPts);
cd = input->GetCellData();
outCD = output->GetCellData();
outCD->CopyAllocate(cd,numCells);
cell = vtkGenericCell::New();
vtkIdList *edgeIds, *HEedgeIds=vtkIdList::New();
vtkPoints *edgePts, *HEedgePts=vtkPoints::New();
// Get our locator for merging points
//
if ( this->Locator == NULL )
{
this->CreateDefaultLocator();
}
this->Locator->InitPointInsertion (newPts, input->GetBounds());
// Loop over all cells, extracting non-visited edges.
//
vtkIdType tenth = numCells/10 + 1;
for (cellNum=0; cellNum < numCells && !abort; cellNum++ )
{
if ( ! (cellNum % tenth) ) //manage progress reports / early abort
{
this->UpdateProgress (static_cast<double>(cellNum) / numCells);
abort = this->GetAbortExecute();
}
input->GetCell(cellNum,cell);
numCellEdges = cell->GetNumberOfEdges();
for (edgeNum=0; edgeNum < numCellEdges; edgeNum++ )
{
edge = cell->GetEdge(edgeNum);
numEdgePts = edge->GetNumberOfPoints();
// Tessellate higher-order edges
if ( ! edge->IsLinear() )
{
edge->Triangulate(0, HEedgeIds, HEedgePts);
edgeIds = HEedgeIds;
edgePts = HEedgePts;
for ( i=0; i < (edgeIds->GetNumberOfIds()/2); i++ )
{
pt1 = edgeIds->GetId(2*i);
pt2 = edgeIds->GetId(2*i+1);
edgePts->GetPoint(2*i, x);
if ( this->Locator->InsertUniquePoint(x, pts[0]) )
{
outPD->CopyData (pd,pt1,pts[0]);
}
edgePts->GetPoint(2*i+1, x);
if ( this->Locator->InsertUniquePoint(x, pts[1]) )
{
outPD->CopyData (pd,pt2,pts[1]);
}
if ( edgeTable->IsEdge(pt1,pt2) == -1 )
{
edgeTable->InsertEdge(pt1, pt2);
newId = newLines->InsertNextCell(2,pts);
outCD->CopyData(cd, cellNum, newId);
}
}
} //if non-linear edge
else // linear edges
{
edgeIds = edge->PointIds;
edgePts = edge->Points;
for ( i=0; i < numEdgePts; i++, pt1=pt2, pts[0]=pts[1] )
{
pt2 = edgeIds->GetId(i);
edgePts->GetPoint(i, x);
if ( this->Locator->InsertUniquePoint(x, pts[1]) )
{
outPD->CopyData (pd,pt2,pts[1]);
}
if ( i > 0 && edgeTable->IsEdge(pt1,pt2) == -1 )
{
edgeTable->InsertEdge(pt1, pt2);
newId = newLines->InsertNextCell(2,pts);
outCD->CopyData(cd, cellNum, newId);
}
}//if linear edge
}
}//for all edges of cell
}//for all cells
vtkDebugMacro(<<"Created " << newLines->GetNumberOfCells() << " edges");
// Update ourselves.
//
HEedgeIds->Delete();
HEedgePts->Delete();
edgeTable->Delete();
cell->Delete();
output->SetPoints(newPts);
newPts->Delete();
output->SetLines(newLines);
newLines->Delete();
output->Squeeze();
return 1;
}
//----------------------------------------------------------------------------
// Specify a spatial locator for merging points. By
// default an instance of vtkMergePoints is used.
void vtkExtractEdges::SetLocator(vtkIncrementalPointLocator *locator)
{
if ( this->Locator == locator )
{
return;
}
if ( this->Locator )
{
this->Locator->UnRegister(this);
this->Locator = NULL;
}
if ( locator )
{
locator->Register(this);
}
this->Locator = locator;
this->Modified();
}
//----------------------------------------------------------------------------
void vtkExtractEdges::CreateDefaultLocator()
{
if ( this->Locator == NULL )
{
vtkMergePoints *locator = vtkMergePoints::New();
this->SetLocator(locator);
locator->Delete();
}
}
//----------------------------------------------------------------------------
int vtkExtractEdges::FillInputPortInformation(int, vtkInformation *info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
//----------------------------------------------------------------------------
void vtkExtractEdges::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
if ( this->Locator )
{
os << indent << "Locator: " << this->Locator << "\n";
}
else
{
os << indent << "Locator: (none)\n";
}
}
//----------------------------------------------------------------------------
vtkMTimeType vtkExtractEdges::GetMTime()
{
vtkMTimeType mTime=this-> Superclass::GetMTime();
vtkMTimeType time;
if ( this->Locator != NULL )
{
time = this->Locator->GetMTime();
mTime = ( time > mTime ? time : mTime );
}
return mTime;
}
|
nickmelnikov82/dash
|
tests/unit/development/conftest.py
|
<reponame>nickmelnikov82/dash
import json
import os
from collections import OrderedDict
import pytest
from . import _dir
@pytest.fixture
def load_test_metadata_json():
json_path = os.path.join(_dir, "metadata_test.json")
with open(json_path) as data_file:
json_string = data_file.read()
data = json.JSONDecoder(object_pairs_hook=OrderedDict).decode(json_string)
return data
|
chanchanchong/Crash-Course-On-Python
|
Week 2/Conditionals/Comparing Things/topic.py
|
# We've seen a few arithmetic expressions so far, like addition,
# subtraction, and division. Remember when we turned Python into a
# calculator? Well, Python can also compare values. This lets us check
# whether something is smaller than, equal to, or bigger than something
# else. This allows us to take the result of our expressions and use them to
# make decisions. Check out these three examples. In the first example 10 is
# greater than 1, so the value true is printed as a result. True is a value that
# belongs to another data type called the Boolean. Booleans represent one
# of two possible states, either true or false. Every time you compare things
# in Python the result is a Boolean of the appropriate value. In the second
# example we can see your very first equality operator, which is formed by
# putting two equal signs together. We use this operator to test whether two
# things are equal signs together. We use this operator to test whether two
# things are equal to each other. In this example the string cat is not equal to
# the string dog, so the Boolean that's printed is false. In our third example
# we're doing the opposite comparison. By pairing an exclamation mark and
# an equal sign we're using the not equals operator, which is the negated
# form of the equality operator. In this particular line of code the operator
# checks that 1 isn't equal to 2. We call out before that the plus operator
# doesn't work between integers and string? Let's find out by seeing if the
# number 1 is taller than the string 1.
# Wha , wha, wha, we get a type error. That's the same error we got before.
# This happens because Python doesn't know how to check if a number is
# smaller than a string. And what about the equality operator?
# In this case the Interpreter has no problem telling us that the integer 1 and
# the string 1 aren't the same. So what gives? Basically although they may
# seem similar to us because they both contain the same number, it's clear
# to the computer that one is a number and the other is the string. For the
# computer it's obvious that they are completely different entities.
# On top of the comparison and equality operators, Python also has a set of
# logical operators. These operators allow you to connect multiple
# statements together and perform more complex comparisons. In Python
# the logical operators are the words and, or, and not, let's look at some
# examples.
# To evaluate as true the and operator would need both expressions to be
# true at the same time here. Here we're comparing strings, and the bigger
# and smaller operators refer to alphabetical order. Yellow comes after cyan,
# but brown doesn't come after magenta. So this means that the first
# statement is true, but the second one isn't, which makes the result of the
# whole expression false. If we use or operator instead the expression
# will be true if either of the expressions are true, and false only when both
# expressions are false. Let's try it out. 25 is definitely not bigger than 50, but
# 1 is different than 2. So in the end the whole expression is true. Last up,
# the not operator inverts the value of the expression that's in front of it. If
# the expression is true, it becomes false. If it's false, it becomes true. Just
# like this. Logical operators are important because they help us write more
# complex expressions. We'll see this in action in the next few videos. If this
# is the first time you've come across these operators it might seem like
# there's a lot to remember. But don't worry, you'll learn most of them very
# quickly just by practicing. And in the next reading we have a cheat sheet
# that lists all the operators available and what each one does. It's a handy
# resource you're sure to find useful when writing your own scripts.
# Figure out what's the relationship between the strings "cat" and "Cat" by
# replacing the plus sign with comparison operators.
print("cat" > "Cat")
|
npocmaka/Windows-Server-2003
|
windows/core/ntgdi/kdexts2/region.cxx
|
/*++
Copyright (c) 2001 Microsoft Corporation
Module Name:
region.cxx
Abstract:
This file contains the routines to debug regions.
Author:
<NAME> (JasonHa) 2001-04-30
Environment:
User Mode
--*/
#include "precomp.hxx"
/******************************Public*Routine******************************\
* DECLARE_API( dr )
*
* Debugger extension to dump a region
*
* 21-Feb-1995 -by- <NAME> [lingyunw]
* Wrote it.
\**************************************************************************/
DECLARE_API( dr )
{
OutputControl OutCtl(Client);
OutCtl.Output("Obsolete: Use 'region hrgn|prgn'.\n");
return S_OK;
}
/******************************Public*Routine******************************\
* DECLARE_API( cr )
*
* Debugger extension to check a region
*
* 21-Feb-1995 -by- <NAME> [lingyunw]
* Wrote it.
\**************************************************************************/
DECLARE_API( cr )
{
OutputControl OutCtl(Client);
OutCtl.Output("Obsolete: Use 'region -c hrgn|prgn'\n");
return S_OK;
}
/******************************Public*Routine******************************\
* DECLARE_API( region )
*
* Debugger extension to dump and validate a region
*
* 22-May-2000 -by- <NAME> [jasonha]
* Converted from old dr & cr
*
\**************************************************************************/
DECLARE_API( region )
{
ULONG64 RgnAddr;
ULONG error;
ULONG Flags = 0;
#define REGION_CSCANS 0
#define REGION_SCAN_ADDRESS 1
#define REGION_SCAN_TAIL 2
#define REGION_SIZEOBJ 3
#define NUM_REGION_BASEOBJ_FIELDS 3
FIELD_INFO RegionFields[] = {
{ DbgStr("cScans"), DbgStr("cScans :"), 0, DBG_DUMP_FIELD_FULL_NAME, 0, NULL}, // REGION_CSCANS
{ DbgStr("scan"), DbgStr("scan <- pscnHead :"), 0, DBG_DUMP_FIELD_RETURN_ADDRESS | DBG_DUMP_FIELD_FULL_NAME, 0, AddressPrintCallback}, // REGION_SCAN_ADDRESS
{ DbgStr("pscnTail"), DbgStr("pscnTail :"), 0, DBG_DUMP_FIELD_FULL_NAME, 0, NULL}, // REGION_SCAN_TAIL
{ DbgStr("sizeObj"), DbgStr("sizeObj :"), 0, DBG_DUMP_FIELD_FULL_NAME, 0, NULL}, // REGION_SIZEOBJ
{ DbgStr("sizeRgn"), DbgStr("sizeRgn :"), 0, DBG_DUMP_FIELD_FULL_NAME, 0, NULL},
{ DbgStr("cRefs"), DbgStr("cRefs :"), 0, DBG_DUMP_FIELD_FULL_NAME, 0, NULL},
{ DbgStr("rcl"), DbgStr("rcl :"), 0, DBG_DUMP_FIELD_RETURN_ADDRESS | DBG_DUMP_FIELD_FULL_NAME, 0, RECTLCallback},
{ DbgStr("hHmgr"), DbgStr("hHmgr :"), 0, DBG_DUMP_FIELD_FULL_NAME, 0, NULL},
{ DbgStr("cExclusiveLock"), DbgStr("cExclusiveLock :"), 0, DBG_DUMP_FIELD_FULL_NAME, 0, NULL},
{ DbgStr("Tid"), DbgStr("Tid :"), 0, DBG_DUMP_FIELD_FULL_NAME, 0, NULL},
};
SYM_DUMP_PARAM RegionSym = {
sizeof (SYM_DUMP_PARAM), DbgStr(GDIType(REGION)), DBG_DUMP_COMPACT_OUT, 0/*RgnAddr*/,
NULL, &RegionSym, NewlineCallback, sizeof(RegionFields)/sizeof(RegionFields[0]), RegionFields
};
PrepareCallbacks(TRUE);
INIT_API();
PARSE_POINTER(region_help);
if (ntok > 1)
{
if (parse_iFindSwitch(tokens, ntok, 'c')!=-1)
{
Flags |= SCAN_DUMPER_NO_PRINT;
}
else if (parse_iFindSwitch(tokens, ntok, 'f')!=-1)
{
Flags |= SCAN_DUMPER_FORCE;
}
if (parse_iFindSwitch(tokens, ntok, 'r')!=-1)
{
Flags |= SCAN_DUMPER_FROM_TAIL;
}
}
// get pointer to object from handle or use param as pointer
if ((GetObjectAddress(Client,arg,&RgnAddr,RGN_TYPE,TRUE,TRUE) != S_OK) ||
(RgnAddr == 0))
{
ULONG64 ObjHandle;
ULONG64 RgnAddrFromHmgr;
RgnAddr = arg;
if (error = GetFieldValue(RgnAddr, GDIType(REGION), "hHmgr", ObjHandle))
{
ExtErr("Unable to get contents of REGION::hHmgr\n");
ExtErr(" (Ioctl returned %s)\n", pszWinDbgError(error));
ExtErr(" %#p is neither an HRGN nor valid REGION address\n", arg);
EXIT_API(S_OK);
}
if (!ObjHandle)
{
ExtOut("\tREGION is reserved for system use (no handle manger entry).\n");
RegionSym.nFields -= NUM_REGION_BASEOBJ_FIELDS;
}
else if (GetObjectAddress(Client,ObjHandle,&RgnAddrFromHmgr,
RGN_TYPE,TRUE,FALSE) == S_OK &&
RgnAddrFromHmgr != RgnAddr)
{
ExtOut("\tNote: REGION may not be valid.\n\t It does not have a valid handle manager entry.\n");
}
}
ExtOut("REGION @ %#p\n ", RgnAddr);
RegionSym.addr = RgnAddr;
error = Ioctl( IG_DUMP_SYMBOL_INFO, &RegionSym, RegionSym.size );
if (error)
{
ExtErr("Unable to get contents of REGION\n");
ExtErr(" (Ioctl returned %s)\n", pszWinDbgError(error));
}
else
{
ScanDumper Dumper(RegionFields[REGION_SCAN_ADDRESS].address,
RegionFields[REGION_SCAN_TAIL].address,
(ULONG)RegionFields[REGION_CSCANS].address,
RegionFields[REGION_SCAN_ADDRESS].address,
RgnAddr+RegionFields[REGION_SIZEOBJ].address,
Flags
);
BOOL Valid;
if ((Flags & SCAN_DUMPER_FROM_TAIL) != 0 && !Dumper.Reverse)
{
// We rquested a reverse dump, but Dumper wouldn't allow it.
EXIT_API(S_OK);
}
Valid = Dumper.DumpScans((ULONG)RegionFields[REGION_CSCANS].address);
if (Dumper.Reverse)
{
if (Dumper.ScanAddr != RegionFields[REGION_SCAN_ADDRESS].address)
{
ExtOut(" * Final ScanAddr (%#p) is not at head address (%#p)\n",
Dumper.ScanAddr, RegionFields[REGION_SCAN_ADDRESS].address);
Valid = FALSE;
}
}
else
{
if (Dumper.ScanAddr != RegionFields[REGION_SCAN_TAIL].address)
{
ExtOut(" * Final ScanAddr (%#p) is not at tail address (%#p)\n",
Dumper.ScanAddr, RegionFields[REGION_SCAN_TAIL].address);
Valid = FALSE;
}
}
if (Valid)
{
ExtOut(" Region is valid.\n");
}
else
{
ExtOut(" Region is NOT valid.\n");
}
}
EXIT_API(S_OK);
region_help:
ExtOut("Usage: region [-?cfr] hrgn|prgn\n");
ExtOut(" dumps/validates a region\n");
ExtOut(" c - doesn't print scans; validation only\n");
ExtOut(" f - continue printing even if an error is found\n");
ExtOut(" r - read scans in reverse order\n");
EXIT_API(S_OK);
}
/**************************************************************************\
*
\**************************************************************************/
BOOL bStrInStr(CHAR *pchTrg, CHAR *pchSrc)
{
BOOL bRes = 0;
int c = strlen(pchSrc);
//CHECKLOOP umm? This could be difficult to detect
while (TRUE)
{
// find the first character
pchTrg = strchr(pchTrg,*pchSrc);
// didn't find it?, fail!
if (pchTrg == NULL)
return(FALSE);
// did we find the string? succeed
if (strncmp(pchTrg,pchSrc,c) == 0)
return(TRUE);
// go get the next one.
pchTrg++;
}
}
/******************************Public*Routine******************************\
* rgnlog
*
\**************************************************************************/
#define MAXSEARCH 4
DECLARE_API( rgnlog )
{
#if 1
HRESULT hr = S_OK;
BOOL BadArg = FALSE;
ULONG RemainingArgIndex;
DEBUG_VALUE DumpCount = { 0, DEBUG_VALUE_INVALID };
CHAR EmptySearchString[] = "";
PSTR SearchStringList = EmptySearchString;
PSTR SearchString = SearchStringList;
OutputControl OutCtl(Client);
while (!BadArg && hr == S_OK)
{
while (isspace(*args)) args++;
if (*args == '-')
{
args++;
if (*args == '\0' || isspace(*args))
{
BadArg = TRUE;
}
else if (DumpCount.Type == DEBUG_VALUE_INVALID &&
args[0] == '1' && (args[1] == '\0' || isspace(args[1])))
{
DumpCount.I32 = -1;
DumpCount.Type = DEBUG_VALUE_INT32;
}
else
{
while (*args != '\0' && !isspace(*args))
{
switch (*args)
{
case '?':
default:
BadArg = TRUE;
break;
}
if (BadArg) break;
args++;
}
}
}
else
{
if (DumpCount.Type == DEBUG_VALUE_INVALID)
{
if (Evaluate(Client, args, DEBUG_VALUE_INT32, EVALUATE_DEFAULT_RADIX,
&DumpCount, &RemainingArgIndex, NULL, EVALUATE_COMPACT_EXPR) != S_OK ||
DumpCount.I32 == 0)
{
BadArg = TRUE;
}
else
{
args += RemainingArgIndex;
}
}
else
{
if (SearchStringList == EmptySearchString)
{
SearchStringList = (PSTR)HeapAlloc(GetProcessHeap(), 0,
sizeof(*SearchStringList)*(strlen(args)+2));
if (SearchStringList == NULL)
{
hr = E_OUTOFMEMORY;
}
else
{
SearchString = SearchStringList;
*SearchString = '\0';
}
}
if (hr == S_OK)
{
if (*args == '`' || *args == '\'' || *args == '\"')
{
CHAR StringEnd = *args;
if (args[1] == StringEnd || args[1] == '\0')
{
BadArg = TRUE;
}
else
{
while (*args != StringEnd && *args != '\0')
{
*SearchString++ = *args++;
}
if (*args == StringEnd) args++;
if (!isspace(*args) || *args != '\0')
{
OutCtl.Output("Malformed Search String at '%s'.\n",
args);
BadArg = TRUE;
}
else
{
*SearchString++ = '\0';
}
}
}
else
{
while (!isspace(*args) && *args != '\0')
{
*SearchString++ = *args++;
}
*SearchString++ = '\0';
}
}
}
}
}
if (hr == S_OK)
{
if (BadArg)
{
if (*args == '?') OutCtl.Output("rgnlog - dump/search rgnlog from checked builds.\n");
OutCtl.Output("Usage: rgnlog [-?] <Entries> [<Search Strings>]\n"
"\n"
" Entries - Number of tailing entries to dump/search\n"
" Search Strings - Dump only logs contain one of strings specified\n");
}
else
{
// Mark end of search string list with a NULL string.
*SearchString = '\0';
LONG iLog, iPass;
ULONG LogArraySize, LogLength, LogEntrySize;
CHAR SymName[80];
sprintf(SymName, "%s!iLog", GDIKM_Module.Name);
hr = ReadSymbolData(Client, SymName, &iLog, sizeof(iLog), NULL);
if (hr != S_OK) OutCtl.OutErr("Unable to get contents of %s\n", SymName);
if (hr == S_OK)
{
sprintf(SymName, "%s!iPass", GDIKM_Module.Name);
hr = ReadSymbolData(Client, SymName, &iPass, sizeof(iPass), NULL);
if (hr != S_OK) OutCtl.OutErr("Unable to get contents of %s\n", SymName);
}
if (hr == S_OK)
{
sprintf(SymName, "%s!argnlog", GDIKM_Module.Name);
hr = GetArrayDimensions(Client, SymName, NULL,
&LogArraySize, &LogLength, &LogEntrySize);
if (hr != S_OK) OutCtl.OutErr("Unable to get dimensions of %s\n", SymName);
}
if (hr == S_OK)
{
}
if (hr == S_OK)
{
if (*SearchStringList != '\0')
{
OutCtl.Output("Searching last %ld entries for:\n",
DumpCount.I32);
for (SearchString = SearchStringList;
*SearchString != '\0';
*SearchString += strlen(SearchString)+1)
{
OutCtl.Output(" \"%s\"\n", SearchString);
}
}
else
{
OutCtl.Output("Dumping last %ld entries.\n",
DumpCount.I32);
}
// To Do
}
}
}
if (SearchStringList != EmptySearchString)
{
HeapFree(GetProcessHeap(), 0, SearchStringList);
}
return hr;
#else
dprintf("Extension 'rgnlog' is not converted.\n");
#if ENABLE_OLD_EXTS // DOES NOT SUPPORT API64
LONG cDump;
LONG iCurrent;
RGNLOGENTRY rl;
RGNLOGENTRY *prl;
LONG gml; // gMaxRgnLog
int i, j;
PVOID pv;
CHAR achTmp[30];
CHAR achBuf[256];
PCHAR pchS[MAXSEARCH];
int cSearch;
BOOL bPrint;
PARSE_ARGUMENTS(rgnlog_help);
if(ntok<1) { goto rgnlog_help; }
tok_pos = parse_FindNonSwitch(tokens, ntok);
if(tok_pos==-1) { goto rgnlog_help; }
//check that this supports decimal
cDump = (LONG)GetExpression(tokens[tok_pos]);
if(cDump==0) { goto rgnlog_help; }
cSearch = 0;
while(cSearch<MAXSEARCH) {
tok_pos = parse_FindNonSwitch(tokens, ntok, tok_pos+1);
if(tok_pos==-1) {break;}
pchS[cSearch]=tokens[tok_pos];
cSearch++;
}
for (i = 0; i < cSearch; ++i)
dprintf("search[%s]\n",pchS[i]);
// get some stuff
GetAddress(pv, "&win32k!iLog");
dprintf("&iLog = %lx\n",pv);
if (pv == NULL)
{
dprintf("iCurrent was NULL\n");
return;
}
move(iCurrent, pv);
GetAddress(i,"&win32k!iPass");
if (pv == NULL)
{
dprintf("iPass was NULL\n");
return;
}
move(i,i);
dprintf("--------------------------------------------------\n");
dprintf("rgn log list, cDump = %ld, iCur = %ld, iPass = %ld\n", cDump,iCurrent,i);
dprintf("%5s-%4s:%8s,%8s,(%8s),%8s,%8s,%4s\n",
"TEB ","i","hrgn","prgn","return","arg1","arg2","arg3");
dprintf("--------------------------------------------------\n");
// Dereference the handle via the engine's handle manager.
GetAddress(prl, "win32k!argnlog");
if (!prl)
{
dprintf("prl was NULL\n");
return;
}
GetAddress(gml, "&win32k!gMaxRgnLog");
if (!gml)
{
dprintf("gml was NULL\n");
return;
}
move(gml,gml);
// set iCurrent to the first thing to dump
if (cDump > gml)
cDump = gml;
if (cDump > iCurrent)
iCurrent += gml;
iCurrent -= cDump;
dprintf("prl = %lx, gml = %ld, cDump = %ld, iCurrent = %ld\n",prl,gml,cDump,iCurrent);
//CHECKLOOP add exit/more support
for (i = 0; i < cDump; ++i)
{
move(rl,&prl[iCurrent]);
if (rl.pszOperation != NULL)
{
move2(achTmp,rl.pszOperation,30);
}
else
achTmp[0] = 0;
sprintf(achBuf,"%5lx-%4ld:%p,%p,(%8lx),%p, %p,%p, %s, %p, %p\n",
(ULONG_PTR)rl.teb >> 12,iCurrent,rl.hrgn,rl.prgn,rl.lRes,rl.lParm1,
rl.lParm2,rl.lParm3,achTmp,rl.pvCaller,rl.pvCallersCaller);
bPrint = (cSearch == 0);
for (j = 0; (j < cSearch) && !bPrint; ++j)
bPrint |= bStrInStr(achBuf,pchS[j]);
if (bPrint)
{
dprintf(achBuf);
}
if (++iCurrent >= gml)
iCurrent = 0;
if (CheckControlC())
return;
}
return;
rgnlog_help:
dprintf("\n rgnlog nnn [search1] [search2] [search3] [search4]\n");
dprintf("\t nnn - dumps the last n entries of the rgn log\n");
dprintf("\t search[n] - displays only entries containing one of n strings\n");
dprintf("\t NOTE: only works on checked builds. you must set bLogRgn at run time\n");
#endif // DOES NOT SUPPORT API64
EXIT_API(S_OK);
#endif
}
|
lemrey/zephyr
|
ext/hal/cypress/PDL/3.1.0/drivers/source/cy_usbfs_dev_drv.c
|
<reponame>lemrey/zephyr
/***************************************************************************//**
* \file cy_usbfs_dev_drv.c
* \version 1.0
*
* Provides general API implementation of the USBFS driver.
*
********************************************************************************
* \copyright
* Copyright 2018, Cypress Semiconductor Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*******************************************************************************/
#include "cy_usbfs_dev_drv.h"
#include "cy_usbfs_dev_drv_pvt.h"
#ifdef CY_IP_MXUSBFS
#if defined(__cplusplus)
extern "C" {
#endif
/*******************************************************************************
* Internal Constants
*******************************************************************************/
/* Wait 2us: number re-used from MKAD-172 */
#define WAIT_SUSPEND_DISABLE (2UL)
/* The bus reset counter is driven by 100kHz clock and detects bus reset
* condition after 100 us.
*/
#define BUS_RESET_PERIOD (10UL)
/*******************************************************************************
* Internal Functions Prototypes
*******************************************************************************/
static void LpmIntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context);
static void SofIntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context);
static void Ep0IntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context);
static void BusResetIntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context);
static void ArbiterIntrHandler (USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context);
static void SieEnpointIntrHandler(USBFS_Type *base, uint32_t endpoint, cy_stc_usbfs_dev_drv_context_t *context);
static uint32_t WriteEp0Buffer(USBFS_Type *base, uint8_t *buf, uint32_t size);
static uint32_t ReadEp0Buffer(USBFS_Type *base, uint8_t *buf, uint32_t size);
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Init
****************************************************************************//**
*
* Initializes the USBFS in device mode. If DMAs are used, initialize the DMAs.
*
* \param base
* The pointer to the USBFS instance.
*
* \param config
* The pointer to the configuration structure \ref cy_stc_usbfs_dev_config_t.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
* \return
* Status of executed operation \ref cy_en_usbfs_dev_drv_status_t.
*
*******************************************************************************/
cy_en_usbfs_dev_drv_status_t Cy_USBFS_Dev_Drv_Init(USBFS_Type *base,
cy_stc_usbfs_dev_drv_config_t const *config,
cy_stc_usbfs_dev_drv_context_t *context)
{
cy_en_usbfs_dev_drv_status_t retStatus = CY_USBFS_DEV_DRV_BAD_PARAM;
/* Input parameters verification */
if ((NULL == base) || (NULL == config) || (NULL == context))
{
return CY_USBFS_DEV_DRV_BAD_PARAM;
}
CY_ASSERT_L3(CY_USBFS_DEV_DRV_IS_MODE_VALID(config->mode));
/* Enable clock to mxusb IP */
base->USBDEV.USB_CLK_EN = CY_USBFS_DEV_DRV_WRITE_ODD(USBFS_USBDEV_USB_CLK_EN_CSR_CLK_EN_Msk);
/* Clear register (except reserved): the IOMODE = 0 means usb IP controls the usb pins */
base->USBDEV.USBIO_CR1 = (base->USBDEV.USBIO_CR1 & USBFS_USBDEV_USBIO_CR1_RESERVED_2_Msk);
/* Set number of clocks (divided version of Clk_Peri) to detect bus reset */
base->USBDEV.BUS_RST_CNT = BUS_RESET_PERIOD;
/* Enable PHY detector and single-ended and differential receivers */
base->USBLPM.POWER_CTL = (USBFS_USBLPM_POWER_CTL_SUSPEND_Msk |
USBFS_USBLPM_POWER_CTL_ENABLE_DPO_Msk |
USBFS_USBLPM_POWER_CTL_ENABLE_DMO_Msk);
/* Push bufferable write to execute */
(void) base->USBLPM.POWER_CTL;
/* Suspend clear sequence */
Cy_SysLib_DelayUs(WAIT_SUSPEND_DISABLE);
base->USBLPM.POWER_CTL &= ~USBFS_USBLPM_POWER_CTL_SUSPEND_Msk;
/* Push bufferable write to execute */
(void) base->USBLPM.POWER_CTL;
/* Clear register (except reserved) and enable IMO lock */
base->USBDEV.CR1 = USBFS_USBDEV_CR1_ENABLE_LOCK_Msk |
(base->USBDEV.CR1 & USBFS_USBDEV_CR1_RESERVED_3_Msk);
/* Configure level selection (HI, MED, LO) for each interrupt source */
base->USBLPM.INTR_LVL_SEL = config->intrLevelSel;
/* Enable interrupt sources: Bus Reset and EP0 */
base->USBLPM.INTR_SIE_MASK = (USBFS_USBLPM_INTR_SIE_BUS_RESET_INTR_Msk |
USBFS_USBLPM_INTR_SIE_EP0_INTR_Msk);
if (config->enableLmp)
{
/* Enable device to ACK LMP requests */
base->USBLPM.LPM_CTL = (USBFS_USBLPM_LPM_CTL_LPM_EN_Msk |
USBFS_USBLPM_LPM_CTL_LPM_ACK_RESP_Msk);
}
/* Copy configuration in the context */
context->mode = config->mode;
context->useReg16 = (config->epAccess == CY_USBFS_DEV_DRV_USE_16_BITS_DR);
context->epSharedBuf = config->epBuffer;
context->epSharedBufSize = config->epBufferSize;
/* Initialize pointers to functions which works with data endpoint */
switch(config->mode)
{
case CY_USBFS_DEV_DRV_EP_MANAGEMENT_CPU:
context->addEndpoint = &AddEndpointHwBuffer;
context->loadInEndpoint = &LoadInEndpointCpu;
context->readOutEndpoint = &ReadOutEndpointCpu;
base->USBDEV.ARB_CFG = _VAL2FLD(USBFS_USBDEV_ARB_CFG_DMA_CFG,
CY_USBFS_DEV_DRV_EP_MANAGEMENT_CPU);
retStatus = CY_USBFS_DEV_DRV_SUCCESS;
break;
case CY_USBFS_DEV_DRV_EP_MANAGEMENT_DMA:
context->addEndpoint = &AddEndpointHwBuffer;
context->loadInEndpoint = &LoadInEndpointDma;
context->readOutEndpoint = &ReadOutEndpointDma;
base->USBDEV.ARB_CFG = _VAL2FLD(USBFS_USBDEV_ARB_CFG_DMA_CFG,
CY_USBFS_DEV_DRV_EP_MANAGEMENT_DMA);
break;
case CY_USBFS_DEV_DRV_EP_MANAGEMENT_DMA_AUTO:
context->addEndpoint = &AddEndpointRamBuffer;
context->loadInEndpoint = &LoadInEndpointDmaAuto;
context->readOutEndpoint = &ReadOutEndpointDmaAuto;
base->USBDEV.ARB_CFG = (_VAL2FLD(USBFS_USBDEV_ARB_CFG_DMA_CFG,
CY_USBFS_DEV_DRV_EP_MANAGEMENT_DMA_AUTO) |
USBFS_USBDEV_ARB_CFG_AUTO_MEM_Msk);
break;
default:
break;
}
/* Configure DMA and store info about DMA channels */
if (context->mode != CY_USBFS_DEV_DRV_EP_MANAGEMENT_CPU)
{
retStatus = DmaInit(config, context);
}
return retStatus;
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_DeInit
****************************************************************************//**
*
* Deinit UBSFS hardware.
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
void Cy_USBFS_Dev_Drv_DeInit(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
uint32_t i;
uint32_t regVal;
cy_stc_usbfs_dev_drv_acces_sie_t *sieRegs = (cy_stc_usbfs_dev_drv_acces_sie_t *) base;
cy_stc_usbfs_dev_drv_access_arb_t *arbRegs = (cy_stc_usbfs_dev_drv_access_arb_t *) base;
/* Set USBLPM registers into the default state */
base->USBLPM.POWER_CTL = 0UL;
base->USBLPM.USBIO_CTL = 0UL;
base->USBLPM.FLOW_CTL = 0UL;
base->USBLPM.LPM_CTL = 0UL;
base->USBLPM.INTR_SIE = 0UL;
base->USBLPM.INTR_SIE_SET = 0UL;
base->USBLPM.INTR_SIE_MASK = 0UL;
base->USBLPM.INTR_LVL_SEL = 0UL;
/* Set USBDEV registers into the default state */
base->USBDEV.CR0 = 0UL;
/* Do not touch reserved bits */
base->USBDEV.CR1 = (base->USBDEV.CR1 & USBFS_USBDEV_CR1_RESERVED_3_Msk);
base->USBDEV.USBIO_CR0 = 0UL;
/* Do not touch reserved bits */
regVal = CY_USBFS_DEV_READ_ODD(base->USBDEV.USBIO_CR2);
base->USBDEV.USBIO_CR2 = CY_USBFS_DEV_DRV_WRITE_ODD(regVal) & USBFS_USBDEV_USBIO_CR2_RESERVED_7_Msk;
base->USBDEV.USBIO_CR1 = USBFS_USBDEV_USBIO_CR1_IOMODE_Msk;
base->USBDEV.BUS_RST_CNT = BUS_RESET_PERIOD;
base->USBDEV.USB_CLK_EN = CY_USBFS_DEV_DRV_WRITE_ODD(0UL);
base->USBDEV.EP0_CR = 0UL;
base->USBDEV.EP0_CNT = CY_USBFS_DEV_DRV_WRITE_ODD(0UL);
base->USBDEV.ARB_CFG = 0UL;
base->USBDEV.ARB_INT_EN = 0UL;
base->USBDEV.DYN_RECONFIG = 0UL;
base->USBDEV.BUF_SIZE = 0UL;
base->USBDEV.DMA_THRES16 = 0UL;
base->USBDEV.EP_ACTIVE = 0UL;
base->USBDEV.EP_TYPE = CY_USBFS_DEV_DRV_WRITE_ODD(0UL);
base->USBDEV.CWA16 = 0UL;
base->USBDEV.SIE_EP_INT_EN = 0UL;
base->USBDEV.SIE_EP_INT_SR = 0UL;
/* Set SIE endpoint register into the default state */
for (i = 0UL; i < CY_USBFS_DEV_DRV_NUM_EPS_MAX; ++i)
{
sieRegs->EP[i].SIE_EP_CR0 = 0UL;
sieRegs->EP[i].SIE_EP_CNT0 = 0UL;
sieRegs->EP[i].SIE_EP_CNT1 = 0UL;
}
/* Set ARBITER endpoint register into the default state */
for (i = 0UL; i < CY_USBFS_DEV_DRV_NUM_EPS_MAX; ++i)
{
arbRegs->EP8[i].ARB_EP_CFG = 0UL;
arbRegs->EP8[i].ARB_EP_INT_EN = 0UL;
arbRegs->EP16[i].ARB_RW_RA16 = 0UL;
arbRegs->EP16[i].ARB_RW_WA16 = 0UL;
}
/* Clean-up context callbacks */
context->cbSof = NULL;
context->cbLpm = NULL;
for (i = 0UL; i < CY_USBFS_DEV_DRV_NUM_EPS_MAX; ++i)
{
context->epPool[i].address = 0U;
context->epPool[i].userMemcpy = NULL;
context->epPool[i].cbEpComplete = NULL;
context->epPool[i].buffer = NULL;
}
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_Enable
****************************************************************************//**
*
* Enable UBSFS hardware.
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
void Cy_USBFS_Dev_Drv_Enable(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
/* Suppress a compiler warning about unused variables */
(void) context;
/* Clear EP0 count register */
base->USBDEV.EP0_CNT = CY_USBFS_DEV_DRV_WRITE_ODD(0UL);
/* Set EP0.CR: ACK Setup, NAK IN/OUT */
base->USBDEV.EP0_CR = CY_USBFS_DEV_DRV_EP_CR_NAK_INOUT;
/* Enable D+ pull-up, the device appears on the bus */
base->USBLPM.POWER_CTL |= USBFS_USBLPM_POWER_CTL_DP_UP_EN_Msk;
/* Push bufferable write to execute */
(void) base->USBLPM.POWER_CTL;
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_Disable
****************************************************************************//**
*
* Disable UBSFS hardware.
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
void Cy_USBFS_Dev_Drv_Disable(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
/* Suppress a compiler warning about unused variables */
(void) context;
/* Disable D+ pull-up */
base->USBLPM.POWER_CTL &= ~USBFS_USBLPM_POWER_CTL_DP_UP_EN_Msk;
/* Push bufferable write to execute */
(void) base->USBLPM.POWER_CTL;
/* Disable device to respond to usb traffic */
base->USBDEV.CR0 &= ~USBFS_USBDEV_CR0_USB_ENABLE_Msk;
/* Disable DMA channels */
DmaDisable(context);
}
/*******************************************************************************
* Function Name: LpmIntrHandler
****************************************************************************//**
*
* TBD
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
static void LpmIntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
if (context->cbLpm != NULL)
{
context->cbLpm(base, context);
}
}
/*******************************************************************************
* Function Name: SofIntrHandler
****************************************************************************//**
*
* TBD
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
static void SofIntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
if (context->cbSof != NULL)
{
context->cbSof(base, context);
}
}
/*******************************************************************************
* Function Name: Ep0IntrHandler
****************************************************************************//**
*
* TBD
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
static void Ep0IntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
/* Read CR register */
uint32_t ep0Cr = base->USBDEV.EP0_CR;
/* Check if packet was ACKed */
if (0U != (ep0Cr & USBFS_USBDEV_EP0_CR_ACKED_TXN_Msk))
{
bool updateCr0 = false;
/* Check packet direction */
if (_FLD2BOOL(USBFS_USBDEV_EP0_CR_SETUP_RCVD, ep0Cr))
{
/* Handle SETUP */
if (_FLD2VAL(USBFS_USBDEV_EP0_CR_MODE, ep0Cr) == CY_USBFS_DEV_DRV_EP_CR_NAK_INOUT)
{
/* Try to unlock CR0 register: read and then write.
* The success write clears 8-4 bits in the register.
*/
ep0Cr = base->USBDEV.EP0_CR;
base->USBDEV.EP0_CR = ep0Cr;
/* Check if CR0 register unlocked (bits cleared) */
ep0Cr = base->USBDEV.EP0_CR;
if (false == _FLD2BOOL(USBFS_USBDEV_EP0_CR_SETUP_RCVD, ep0Cr))
{
/* Reset EP0 cnt register (data toggle 0) */
context->ep0CntReg = 0UL;
/* Call Device layer to service request */
context->ep0Setup(base, context);
updateCr0 = true;
}
}
}
/* Handle IN */
else if (_FLD2BOOL(USBFS_USBDEV_EP0_CR_IN_RCVD, ep0Cr))
{
context->ep0In(base, context);
updateCr0 = true;
}
else if (_FLD2BOOL(USBFS_USBDEV_EP0_CR_OUT_RCVD, ep0Cr))
{
/* Handle OUT */
context->ep0Out(base, context);
updateCr0 = true;
}
else
{
/* Do nothing - unknown source */
}
if (updateCr0)
{
/* Check if CR0 register unlocked (bits cleared) */
ep0Cr = base->USBDEV.EP0_CR;
if (false == _FLD2BOOL(USBFS_USBDEV_EP0_CR_SETUP_RCVD, ep0Cr))
{
/* Update count and mode registers */
base->USBDEV.EP0_CNT = CY_USBFS_DEV_DRV_WRITE_ODD(context->ep0CntReg);
base->USBDEV.EP0_CR = context->ep0ModeReg;
/* Push bufferable write to execute */
base->USBDEV.EP0_CR;
}
}
}
}
/*******************************************************************************
* Function Name: BusResetIntrHandler
****************************************************************************//**
*
* TBD
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
static void BusResetIntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
/* Reset driver variables if any */
/* Cypress ID# 293217: write CR0 when pull-up is enabled */
if (_FLD2BOOL(USBFS_USBLPM_POWER_CTL_DP_UP_EN, base->USBLPM.POWER_CTL))
{
/* Pass event to the Device layer */
context->busReset(base, context);
/* Clear EP0 count register */
base->USBDEV.EP0_CNT = CY_USBFS_DEV_DRV_WRITE_ODD(0UL);
/* Set EP0.CR: ACK Setup, NAK IN/OUT */
base->USBDEV.EP0_CR = CY_USBFS_DEV_DRV_EP_CR_NAK_INOUT;
/* Enable device to responds to usb traffic with address 0 */
base->USBDEV.CR0 = USBFS_USBDEV_CR0_USB_ENABLE_Msk;
/* Push bufferable write to execute */
(void) base->USBDEV.CR0;
}
}
/*******************************************************************************
* Function Name: ArbiterIntrHandler
****************************************************************************//**
*
* TBD
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
static void ArbiterIntrHandler(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
uint32_t endpoint = 0UL;
uint32_t intrMask = Cy_USBFS_Dev_Drv_GetArbAllEpsInterruptStatus(base);
/* Handle active interrupt sources */
while (0U != intrMask)
{
if (0U != (intrMask & 0x01U))
{
/* Get endpoint enable interrupt sources */
uint32_t sourceMask = Cy_USBFS_Dev_Drv_GetArbEpInterruptStatusMasked(base, endpoint);
Cy_USBFS_Dev_Drv_ClearArbEpInterrupt(base, endpoint, sourceMask);
/* Mode 2/3: Handle IN endpoint buffer full event: trigger after
* endpoint buffer has been loaded
*/
if (0U != (sourceMask & USBFS_USBDEV_ARB_EP_IN_BUF_FULL_Msk))
{
Cy_USBFS_Dev_Drv_ClearArbCfgEpInReady(base, endpoint);
/* Arm IN endpoint */
Cy_USBFS_Dev_Drv_SetSieEpMode(base, endpoint, context->epPool[endpoint].sieMode);
}
/* Mode 2: Handle DMA completion event for OUT endpoints */
if (0U != (sourceMask & USBFS_USBDEV_ARB_EP_DMA_GNT_Msk))
{
/* Notify user that data has been copied from endpoint buffer */
context->epPool[endpoint].state = CY_USB_DEV_EP_COMPLETED;
}
/* Mode 3: Handle DMA completion event for OUT endpoints */
if (0U != (sourceMask & USBFS_USBDEV_ARB_EP_DMA_TERMIN_Msk))
{
DmaOutEndpointRestore(&context->epPool[endpoint]);
/* Set complete event and update data toggle */
context->epPool[endpoint].state = CY_USB_DEV_EP_COMPLETED;
context->epPool[endpoint].toggle ^= USBFS_USBDEV_SIE_EP_DATA_TOGGLE_Msk;
/* Involve callback if registered */
if (context->epPool[endpoint].cbEpComplete != NULL)
{
uint32_t errorType = 0UL;
/* Check transfer errors (detect by hardware) */
if (0U != Cy_USBFS_Dev_Drv_GetSieEpError(base, endpoint))
{
errorType |= CY_USBFS_DEV_ENDPOINT_TRANSFER_ERROR;
}
/* Check data toggle bit of current transfer */
if (context->epPool[endpoint].toggle == Cy_USBFS_Dev_Drv_GetSieEpToggle(base, endpoint))
{
errorType |= CY_USBFS_DEV_ENDPOINT_SAME_DATA_TOGGLE;
}
context->epPool[endpoint].cbEpComplete(base, errorType, context);
}
}
/* This error condition indicates system failure */
if (0U != (sourceMask & USBFS_USBDEV_ARB_EP_BUF_OVER_Msk))
{
/* The DMA is not capable to move data from the mxusbfs IP
* hardware buffer fast enough what caused overflow. Give DMA
* channel for this endpoint greater priority or increase clock
* it operates.
*/
while(1UL);
}
/* This error condition indicates system failure */
if (0U != (sourceMask & USBFS_USBDEV_ARB_EP_BUF_UNDER_Msk))
{
/* The DMA is not capable to move data into the mxusbfs IP
* hardware buffer fast enough what caused underflow. Give DMA
* channel for this endpoint greater priority or increase clock
* it operates.
*/
while(1UL);
}
}
/* Move to next endpoint */
intrMask >>= 1UL;
++endpoint;
}
}
/*******************************************************************************
* Function Name: SieEnpointIntrHandler
****************************************************************************//**
*
* TBD
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
*******************************************************************************/
static void SieEnpointIntrHandler(USBFS_Type *base, uint32_t endpoint, cy_stc_usbfs_dev_drv_context_t *context)
{
Cy_USBFS_Dev_Drv_ClearSieEpInterrupt(base, endpoint);
/* Special case: mode = CY_USBFS_DEV_DRV_EP_MANAGEMENT_DMA_AUTO
* OUT endpoints completion is handled by Arbiter Interrupt (source DMA_TERMIN)
*/
if (0U == (Cy_USBFS_Dev_Drv_GetArbEpInterruptMask(base, endpoint) & USBFS_USBDEV_ARB_EP_DMA_TERMIN_Msk))
{
/* Set complete event and update data toggle */
context->epPool[endpoint].state = CY_USB_DEV_EP_COMPLETED;
context->epPool[endpoint].toggle ^= USBFS_USBDEV_SIE_EP_DATA_TOGGLE_Msk;
/* Involve callback if it is registered */
if (context->epPool[endpoint].cbEpComplete != NULL)
{
uint32_t errorType = 0UL;
/* Check transfer errors (detect by hardware) */
if (0U != Cy_USBFS_Dev_Drv_GetSieEpError(base, endpoint))
{
errorType |= CY_USBFS_DEV_ENDPOINT_TRANSFER_ERROR;
}
/* Check data toggle bit of current transfer */
if (context->epPool[endpoint].toggle == Cy_USBFS_Dev_Drv_GetSieEpToggle(base, endpoint))
{
errorType |= CY_USBFS_DEV_ENDPOINT_SAME_DATA_TOGGLE;
}
context->epPool[endpoint].cbEpComplete(base, errorType, context);
}
}
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_Interrupt
****************************************************************************//**
*
* Handles interrupt events.
*
* \param base
* The pointer to the USBFS instance.
*
* \param intrCause
* The interrupt cause register value.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user. The structure is used during the EZI2C operation for
* internal configuration and data keeping. The user must not modify anything
* in this structure.
*
*******************************************************************************/
void Cy_USBFS_Dev_Drv_Interrupt(USBFS_Type *base, uint32_t intrCause, cy_stc_usbfs_dev_drv_context_t *context)
{
uint32_t endpoint = 0u;
/* Clear SIE interrupts while are served below */
Cy_USBFS_Dev_Drv_ClearSieInterrupt(base, intrCause);
/* LPM */
if (0u != (intrCause & USBFS_USBLPM_INTR_CAUSE_LPM_INTR_Msk))
{
LpmIntrHandler(base, context);
}
/* Arbiter: Data endpoints */
if (0u != (intrCause & USBFS_USBLPM_INTR_CAUSE_ARB_EP_INTR_Msk))
{
/* This interrupt is cleared inside the handler */
ArbiterIntrHandler(base, context);
}
/* Control EP0 */
if (0u != (intrCause & USBFS_USBLPM_INTR_CAUSE_EP0_INTR_Msk))
{
Ep0IntrHandler(base, context);
}
/* SOF */
if (0u != (intrCause & USBFS_USBLPM_INTR_CAUSE_SOF_INTR_Msk))
{
SofIntrHandler(base, context);
}
/* Bus Reset */
if (0u != (intrCause & USBFS_USBLPM_INTR_CAUSE_BUS_RESET_INTR_Msk))
{
BusResetIntrHandler(base, context);
}
/* Remove handled interrupt statuses */
intrCause >>= USBFS_USBLPM_INTR_CAUSE_EP1_INTR_Pos;
/* SIE: Data endpoints */
while (0u != intrCause)
{
if (0u != (intrCause & 0x1u))
{
/* These interrupts are cleared inside the handler */
SieEnpointIntrHandler(base, endpoint, context);
}
intrCause >>= 1u;
++endpoint;
}
}
/*******************************************************************************
* Function Name: WriteEp0Buffer
****************************************************************************//**
*
* Writes data into endpoint 0 buffer and returns how many bytes were written.
*
* \param base
* The pointer to the USBFS instance.
*
* \param buffer
* Pointer to the buffer where data is written.
*
* \param size
* Number of bytes to write into the buffer.
*
* \return
* Number of bytes which were written.
*
*******************************************************************************/
static uint32_t WriteEp0Buffer(USBFS_Type *base, uint8_t *buf, uint32_t size)
{
uint32_t cnt;
/* Cut message size if too many bytes to write are requested */
if (size > CY_USBFS_DEV_DRV_EP0_BUFFER_SIZE)
{
size = CY_USBFS_DEV_DRV_EP0_BUFFER_SIZE;
}
/* Write data into the hardware buffer */
for (cnt = 0UL; cnt < size; ++cnt)
{
if (0U == (cnt & 0x1U))
{
base->USBDEV.EP0_DR[cnt] = buf[cnt];
}
else
{
/* Apply special write for odd offset registers */
base->USBDEV.EP0_DR[cnt] = CY_USBFS_DEV_DRV_WRITE_ODD(buf[cnt]);
}
}
return cnt;
}
/*******************************************************************************
* Function Name: ReadEp0Buffer
****************************************************************************//**
*
* Reads data from endpoint 0 buffer and returns how many bytes were read.
*
* \param base
* The pointer to the USBFS instance.
*
* \param buffer
* Pointer to the buffer where data is read.
*
* \param size
* Number of bytes to read from the buffer.
*
* \return
* Number of bytes which were read.
*
*******************************************************************************/
static uint32_t ReadEp0Buffer(USBFS_Type *base, uint8_t *buf, uint32_t size)
{
uint32_t cnt;
/* Get number of received bytes */
uint32_t numToCopy = Cy_USBFS_Dev_Drv_GetEp0Count(base);
/* Read only received bytes */
if (size > numToCopy)
{
size = numToCopy;
}
/* Get data from the buffer */
for (cnt = 0UL; cnt < size; ++cnt)
{
if (0U == (cnt & 0x1U))
{
buf[cnt] = base->USBDEV.EP0_DR[cnt];
}
else
{
/* Apply special write for odd offset registers */
buf[cnt] = CY_USBFS_DEV_READ_ODD(base->USBDEV.EP0_DR[cnt]);
}
}
return cnt;
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_Ep0GetSetup
****************************************************************************//**
*
* Reads setup packed from endpoint 0 buffer to provided buffer.
*
* \param base
* The pointer to the USBFS instance.
*
* \param buffer
* Pointer to the buffer where store data.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
*
*******************************************************************************/
void Cy_USBFS_Dev_Drv_Ep0GetSetup(USBFS_Type *base, uint8_t *buffer, cy_stc_usbfs_dev_drv_context_t *context)
{
/* Suppress a compiler warning about unused variables */
(void) context;
(void) ReadEp0Buffer(base, buffer, CY_USBFS_DEV_DRV_EP0_BUFFER_SIZE);
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_Ep0Write
****************************************************************************//**
*
* Writes data into endpoint 0 buffer and returns how many bytes were written.
*
* \param base
* The pointer to the USBFS instance.
*
* \param buffer
* Pointer to the buffer where stored data to be written.
*
* \param size
* Number of bytes to write into the endpoint 0 buffer.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
*
* \return
* Number of bytes which were written into the endpoint 0 buffer.
*
*******************************************************************************/
uint32_t Cy_USBFS_Dev_Drv_Ep0Write(USBFS_Type *base, uint8_t *buffer, uint32_t size, cy_stc_usbfs_dev_drv_context_t *context)
{
CY_ASSERT_L1((size > 0U) ? (NULL != buffer) : true);
uint32_t numBytes = 0UL;
if (buffer != NULL)
{
/* DATA stage (IN direction): load data to be sent (include zero length packet) */
/* Put data into the buffer */
numBytes = WriteEp0Buffer(base, buffer, size);
/* Update data toggle and counter */
context->ep0CntReg ^= USBFS_USBDEV_EP0_CNT_DATA_TOGGLE_Msk;
context->ep0CntReg = _CLR_SET_FLD32U(context->ep0CntReg, USBFS_USBDEV_EP0_CNT_BYTE_COUNT, numBytes);
/* Update EP0 mode register to continue transfer */
context->ep0ModeReg = CY_USBFS_DEV_DRV_EP_CR_ACK_IN_STATUS_OUT;
}
else
{
/* STATUS stage (IN direction): prepare return zero-length and get ACK response */
context->ep0CntReg = USBFS_USBDEV_EP0_CNT_DATA_TOGGLE_Msk;
context->ep0ModeReg = CY_USBFS_DEV_DRV_EP_CR_STATUS_IN_ONLY;
}
return numBytes;
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_Ep0Read
****************************************************************************//**
*
* Reads data from endpoint 0 buffer and returns how many bytes were read.
*
* \param base
* The pointer to the USBFS instance.
*
* \param buffer
* Pointer to the buffer where store data.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
*
* \return
* Number of bytes which were read from the endpoint 0 buffer.
*
*******************************************************************************/
uint32_t Cy_USBFS_Dev_Drv_Ep0Read(USBFS_Type *base, uint8_t *buffer, uint32_t size, cy_stc_usbfs_dev_drv_context_t *context)
{
uint32_t numBytes = 0UL;
if (buffer != NULL)
{
/* DATA stage (OUT direction): get receive data and continue */
/* Get received data */
numBytes = ReadEp0Buffer(base, buffer, size);
/* Update EP0 registers to continue transfer */
context->ep0CntReg ^= USBFS_USBDEV_EP0_CNT_DATA_TOGGLE_Msk;
context->ep0ModeReg = CY_USBFS_DEV_DRV_EP_CR_ACK_OUT_STATUS_IN;
}
else
{
/* STATUS stage (OUT direction): prepare to send ACK handshake */
context->ep0CntReg = USBFS_USBDEV_EP0_CNT_DATA_TOGGLE_Msk;
context->ep0ModeReg = CY_USBFS_DEV_DRV_EP_CR_STATUS_OUT_ONLY;
}
return numBytes;
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_RegisterServiceCallback
****************************************************************************//**
*
* Register callbacks to the service events (Bus Reset and Endpoint 0).
*
* \param base
* The pointer to the USBFS instance.
*
* \param source
* \ref cy_en_usbfs_dev_drv_service_cb_t
*
* \param callback
* Callback function which is called for event define by source parameter.
*
* \param context
* The pointer to the context structure \ref cy_stc_usbfs_dev_drv_context_t
* allocated by the user.
*
* \return
* Status of executed operation cy_en_usbfs_dev_drv_status_t.
*
*******************************************************************************/
void Cy_USBFS_Dev_Drv_RegisterServiceCallback(cy_en_usb_dev_service_cb_t source,
cy_cb_usbfs_dev_drv_callback_t callback,
cy_stc_usbfs_dev_drv_context_t *context)
{
switch(source)
{
case CY_USB_DEV_BUS_RESET:
context->busReset = callback;
break;
case CY_USB_DEV_EP0_SETUP:
context->ep0Setup = callback;
break;
case CY_USB_DEV_EP0_IN:
context->ep0In = callback;
break;
case CY_USB_DEV_EP0_OUT:
context->ep0Out = callback;
break;
default:
break;
}
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_Suspend
****************************************************************************//**
*
* Prepares the USBFS component to enter deep sleep mode. The pull-up is enabled
* on the Dp line while device is low power mode.
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the driver context structure
*
* \note
* After entering low power mode, the data which is left in the IN or OUT
* endpoint buffers are not restored after wakeup, and lost. Therefore, it should
* be stored in the SRAM for OUT endpoint or read by the host for IN endpoint
* before entering low power mode.
*
*******************************************************************************/
void Cy_USBFS_Dev_Drv_Suspend(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
(void) base; (void) context;
}
/*******************************************************************************
* Function Name: Cy_USBFS_Dev_Drv_Resume
****************************************************************************//**
*
* Enables the USBFS block after power down mode. It should be called just after
* waking from sleep. While the device is suspended, it periodically checks to
* determine if the conditions to leave the suspended state were met. One way to
* check resume conditions is to use the sleep timer to periodically wake the
* device. The second way is to configure the device to wake up from the PICU.
* If the resume conditions are met, the application calls the Resume() function.
* This function enables the SIE and Transceiver, bringing them out of power down
* mode. It does not change the USB address field of the USBCR register; it
* maintains the USB address previously assigned by the host.
*
* \param base
* The pointer to the USBFS instance.
*
* \param context
* The pointer to the driver context structure
*
*******************************************************************************/
void Cy_USBFS_Dev_Drv_Resume(USBFS_Type *base, cy_stc_usbfs_dev_drv_context_t *context)
{
(void) base; (void) context;
}
#if defined(__cplusplus)
}
#endif
#endif /* CY_IP_MXUSBFS */
/* [] END OF FILE */
|
realityforge/replicant-example
|
vendor/tools/domgen/lib/domgen/timerstatus/model.rb
|
<reponame>realityforge/replicant-example<filename>vendor/tools/domgen/lib/domgen/timerstatus/model.rb
#
# 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/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
module Domgen
FacetManager.facet(:timerstatus) do |facet|
facet.enhance(Repository) do
include Domgen::Java::BaseJavaGenerator
include Domgen::Java::JavaClientServerApplication
java_artifact :blocking_filter, :filter, :server, :timerstatus, '#{repository.name}TimerAppBlockingFilter'
java_artifact :integration_test, :rest, :integration, :timerstatus, '#{repository.name}TimerstatusTest'
def additional_timers
@additional_timers ||= []
end
def timers
timers = []
repository.data_modules.select{|data_module| data_module.ejb?}.each do |data_module|
data_module.services.select{|service| service.ejb?}.each do |service|
service.methods.select{|method|method.ejb? && method.ejb.schedule?}.each do |method|
timers << method.ejb.schedule.info
end
end
end
timers + additional_timers
end
def pre_complete
repository.jaxrs.extensions << 'iris.timerstatus.server.service.TimerStatusService' if repository.jaxrs?
end
end
end
end
|
aziesemer/gme-ufrgs
|
Astran/src/gds.h
|
/*
* gds.h
* veja gds.cpp
* <NAME> - <EMAIL>
*/
#pragma once
#include <fstream>
#include <string>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "util.h"
class Gds {
public:
Gds(string);
~Gds();
bool open();
void generateHeader(int);
void generateUnits();
void generateLibrary();
void generateLibname(char*);
void generateStruct();
void generateStructname(char*);
void generateString(const char* a);
void add_Layer(short int &);
void add_Boxtype(short int &);
void add_XY(long int&, long int&, long int&, long int&);
void generateBox(short int,long int, long int, long int, long int);
void generateLabel(short int layer, long int x, long int y, const char* text);
void generateEndelement();
void generateEndStruct();
void generateEndLibrary();
void add_longint(long int&);
private:
union conv_2b{
char c[2];
int l;
};
union conv_4b{
char c[4];
long int l;
};
ofstream file;
string filename;
vector<char> f;
time_t tempo;
tm ts;
long int x1, x2, y1, y2;
short int layer;
void write();
};
|
ChihChengLiang/ethSTARK
|
src/starkware/algebra/field_element_base.inl
|
namespace starkware {
template <typename FieldElementT>
std::enable_if_t<kIsFieldElement<FieldElementT>, std::ostream&> operator<<(
std::ostream& out, const FieldElementT& element) {
return out << element.AsDerived().ToString();
}
template <typename Derived>
Derived& FieldElementBase<Derived>::operator+=(const Derived& other) {
return AsDerived() = AsDerived() + other;
}
template <typename Derived>
Derived& FieldElementBase<Derived>::operator*=(const Derived& other) {
return AsDerived() = AsDerived() * other;
}
template <typename Derived>
Derived FieldElementBase<Derived>::operator/(const Derived& other) const {
return AsDerived() * other.Inverse();
}
template <typename Derived>
constexpr bool FieldElementBase<Derived>::operator!=(const Derived& other) const {
return !(AsDerived() == other);
}
} // namespace starkware
|
sja/terraform-provider-instana
|
instana/resource-alerting-channel-webhook_test.go
|
<reponame>sja/terraform-provider-instana<filename>instana/resource-alerting-channel-webhook_test.go
package instana_test
import (
"fmt"
"net/http"
"strconv"
"strings"
"testing"
"github.com/gorilla/mux"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
"github.com/stretchr/testify/assert"
. "github.com/gessnerfl/terraform-provider-instana/instana"
"github.com/gessnerfl/terraform-provider-instana/instana/restapi"
"github.com/gessnerfl/terraform-provider-instana/testutils"
"github.com/gessnerfl/terraform-provider-instana/utils"
)
var testAlertingChannelWebhookProviders = map[string]terraform.ResourceProvider{
"instana": Provider(),
}
const resourceAlertingChannelWebhookDefinitionTemplate = `
provider "instana" {
api_token = "<PASSWORD>"
endpoint = "localhost:{{PORT}}"
default_name_prefix = "prefix"
default_name_suffix = "suffix"
}
resource "instana_alerting_channel_webhook" "example" {
name = "name {{ITERATOR}}"
webhook_urls = [ "url1", "url2" ]
http_headers = {
key1 = "value1"
key2 = "value2"
}
}
`
const alertingChannelWebhookServerResponseTemplate = `
{
"id" : "{{id}}",
"name" : "prefix name suffix",
"kind" : "WEB_HOOK",
"webhookUrls" : [ "url1", "url2" ],
"headers" : [ "key1: value1", "key2: value2" ]
}
`
const alertingChannelWebhookApiPath = restapi.AlertingChannelsResourcePath + "/{id}"
const testAlertingChannelWebhookDefinition = "instana_alerting_channel_webhook.example"
func TestCRUDOfAlertingChannelWebhookResourceWithMockServer(t *testing.T) {
testutils.DeactivateTLSServerCertificateVerification()
httpServer := testutils.NewTestHTTPServer()
httpServer.AddRoute(http.MethodPut, alertingChannelWebhookApiPath, testutils.EchoHandlerFunc)
httpServer.AddRoute(http.MethodDelete, alertingChannelWebhookApiPath, testutils.EchoHandlerFunc)
httpServer.AddRoute(http.MethodGet, alertingChannelWebhookApiPath, func(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
json := strings.ReplaceAll(alertingChannelWebhookServerResponseTemplate, "{{id}}", vars["id"])
w.Header().Set(contentType, r.Header.Get(contentType))
w.WriteHeader(http.StatusOK)
w.Write([]byte(json))
})
httpServer.Start()
defer httpServer.Close()
resourceDefinitionWithoutName := strings.ReplaceAll(resourceAlertingChannelWebhookDefinitionTemplate, "{{PORT}}", strconv.Itoa(httpServer.GetPort()))
resourceDefinitionWithoutName0 := strings.ReplaceAll(resourceDefinitionWithoutName, iteratorPlaceholder, "0")
resourceDefinitionWithoutName1 := strings.ReplaceAll(resourceDefinitionWithoutName, iteratorPlaceholder, "1")
hashFunctionUrls := schema.HashSchema(AlertingChannelWebhookWebhookURLsSchemaField.Elem.(*schema.Schema))
url1 := "url1"
url2 := "url2"
resource.UnitTest(t, resource.TestCase{
Providers: testAlertingChannelWebhookProviders,
Steps: []resource.TestStep{
{
Config: resourceDefinitionWithoutName0,
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(testAlertingChannelWebhookDefinition, "id"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, AlertingChannelFieldName, "name 0"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, AlertingChannelFieldFullName, "prefix name 0 suffix"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, fmt.Sprintf("%s.%d", AlertingChannelWebhookFieldWebhookURLs, hashFunctionUrls(url1)), url1),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, fmt.Sprintf("%s.%d", AlertingChannelWebhookFieldWebhookURLs, hashFunctionUrls(url2)), url2),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, AlertingChannelWebhookFieldHTTPHeaders+".key1", "value1"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, AlertingChannelWebhookFieldHTTPHeaders+".key2", "value2"),
),
},
{
Config: resourceDefinitionWithoutName1,
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(testAlertingChannelWebhookDefinition, "id"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, AlertingChannelFieldName, "name 1"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, AlertingChannelFieldFullName, "prefix name 1 suffix"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, fmt.Sprintf("%s.%d", AlertingChannelWebhookFieldWebhookURLs, hashFunctionUrls(url1)), "url1"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, fmt.Sprintf("%s.%d", AlertingChannelWebhookFieldWebhookURLs, hashFunctionUrls(url2)), "url2"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, AlertingChannelWebhookFieldHTTPHeaders+".key1", "value1"),
resource.TestCheckResourceAttr(testAlertingChannelWebhookDefinition, AlertingChannelWebhookFieldHTTPHeaders+".key2", "value2"),
),
},
},
})
}
func TestResourceAlertingChannelWebhookDefinition(t *testing.T) {
resource := NewAlertingChannelWebhookResourceHandle()
schemaMap := resource.Schema
schemaAssert := testutils.NewTerraformSchemaAssert(schemaMap, t)
schemaAssert.AssertSchemaIsRequiredAndOfTypeString(AlertingChannelFieldName)
schemaAssert.AssertSchemaIsComputedAndOfTypeString(AlertingChannelFieldFullName)
schemaAssert.AssertSchemaIsRequiredAndOfTypeSetOfStrings(AlertingChannelWebhookFieldWebhookURLs)
}
func TestShouldReturnCorrectResourceNameForAlertingChannelWebhook(t *testing.T) {
name := NewAlertingChannelWebhookResourceHandle().ResourceName
assert.Equal(t, name, "instana_alerting_channel_webhook")
}
func TestAlertingChannelWebhookShouldHaveSchemaVersionOne(t *testing.T) {
assert.Equal(t, 1, NewAlertingChannelWebhookResourceHandle().SchemaVersion)
}
func TestAlertingChannelWebhookShouldHaveOneStateUpgraderForVersionZero(t *testing.T) {
resourceHandler := NewAlertingChannelWebhookResourceHandle()
assert.Equal(t, 1, len(resourceHandler.StateUpgraders))
assert.Equal(t, 0, resourceHandler.StateUpgraders[0].Version)
}
func TestShouldReturnStateOfAlertingChannelWebhookUnchangedWhenMigratingFromVersion0ToVersion1(t *testing.T) {
rawData := make(map[string]interface{})
rawData[AlertingChannelFieldName] = "name"
rawData[AlertingChannelFieldFullName] = "fullname"
rawData[AlertingChannelWebhookFieldWebhookURLs] = []interface{}{"url1", "url2"}
rawData[AlertingChannelWebhookFieldHTTPHeaders] = map[string]interface{}{
"key1": "value1",
"key2": "value2",
}
meta := "dummy"
result, err := NewAlertingChannelWebhookResourceHandle().StateUpgraders[0].Upgrade(rawData, meta)
assert.Nil(t, err)
assert.Equal(t, rawData, result)
}
func TestShouldUpdateResourceStateForAlertingChanneWebhookWhenNoHeaderIsProvided(t *testing.T) {
testShouldUpdateResourceStateForAlertingChanneWebhook(t, []string{}, make(map[string]interface{}))
}
func TestShouldUpdateResourceStateForAlertingChanneWebhookWhenHeadersAreProvided(t *testing.T) {
headers := []string{"key1: value1", "key2: value2"}
expectedHeaderMap := map[string]interface{}{
"key1": "value1",
"key2": "value2",
}
testShouldUpdateResourceStateForAlertingChanneWebhook(t, headers, expectedHeaderMap)
}
func TestShouldUpdateResourceStateForAlertingChanneWebhookWhenHeaderValueIsNotDefined(t *testing.T) {
headers := []string{"key1", "key2:"}
expectedHeaderMap := map[string]interface{}{
"key1": "",
"key2": "",
}
testShouldUpdateResourceStateForAlertingChanneWebhook(t, headers, expectedHeaderMap)
}
func testShouldUpdateResourceStateForAlertingChanneWebhook(t *testing.T, headersFromApi []string, headersMapped map[string]interface{}) {
testHelper := NewTestHelper(t)
resourceHandle := NewAlertingChannelWebhookResourceHandle()
resourceData := testHelper.CreateEmptyResourceDataForResourceHandle(resourceHandle)
webhookURLs := []string{"url1", "url2"}
data := restapi.AlertingChannel{
ID: "id",
Name: "name",
WebhookURLs: webhookURLs,
Headers: headersFromApi,
}
err := resourceHandle.UpdateState(resourceData, data)
assert.Nil(t, err)
assert.Equal(t, "id", resourceData.Id(), "id should be equal")
assert.Equal(t, "name", resourceData.Get(AlertingChannelFieldFullName), "name should be equal to full name")
assert.Equal(t, headersMapped, resourceData.Get(AlertingChannelWebhookFieldHTTPHeaders))
urls := resourceData.Get(AlertingChannelWebhookFieldWebhookURLs).(*schema.Set)
assert.Equal(t, 2, urls.Len())
assert.Contains(t, urls.List(), "url1")
assert.Contains(t, urls.List(), "url2")
}
func TestShouldConvertStateOfAlertingChannelWebhookToDataModelWhenNoHeaderIsAvailable(t *testing.T) {
testHelper := NewTestHelper(t)
resourceHandle := NewAlertingChannelWebhookResourceHandle()
webhookURLs := []string{"url1", "url2"}
resourceData := testHelper.CreateEmptyResourceDataForResourceHandle(resourceHandle)
resourceData.SetId("id")
resourceData.Set(AlertingChannelFieldName, "name")
resourceData.Set(AlertingChannelFieldFullName, "prefix name suffix")
resourceData.Set(AlertingChannelWebhookFieldWebhookURLs, webhookURLs)
model, err := resourceHandle.MapStateToDataObject(resourceData, utils.NewResourceNameFormatter("prefix ", " suffix"))
assert.Nil(t, err)
assert.IsType(t, restapi.AlertingChannel{}, model, "Model should be an alerting channel")
assert.Equal(t, "id", model.GetID())
assert.Equal(t, "prefix name suffix", model.(restapi.AlertingChannel).Name, "name should be equal to full name")
assert.Len(t, model.(restapi.AlertingChannel).WebhookURLs, 2)
assert.Contains(t, model.(restapi.AlertingChannel).WebhookURLs, "url1")
assert.Contains(t, model.(restapi.AlertingChannel).WebhookURLs, "url2")
assert.Equal(t, []string{}, model.(restapi.AlertingChannel).Headers, "There should be no headers")
}
|
Jack2Hub/mindproject
|
mindsystem/mindsee/mindnvr/app/ui/thirdparty/include/mgncs/pieces/mboxlayoutpiece.h
|
<reponame>Jack2Hub/mindproject<gh_stars>1-10
#ifndef _MGUI_NCSCTRL_BOXLAYOUTPIECE_H
#define _MGUI_NCSCTRL_BOXLAYOUTPIECE_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _mBoxLayoutPieceClass mBoxLayoutPieceClass;
typedef struct _mBoxLayoutPiece mBoxLayoutPiece;
#define mBoxLayoutPieceClassHeader(clss, superCls) \
mLayoutPieceClassHeader(clss, superCls) \
/** procted **/ \
void (*recalcBox)(clss *); \
int (*getCellAutoSize)(clss *, int i); \
/** public **/ \
int (*setCellInfo)(clss *, int idx, int size, int type/*=NCS_BOXLAYOUTPIECE_ST_FIXED*/, BOOL bupdate/*=FALSE*/); \
mHotPiece* (*setCell)(clss *, int idx, mHotPiece *cell); \
mHotPiece* (*getCell)(clss *, int idx);
struct _mBoxLayoutPieceClass
{
mBoxLayoutPieceClassHeader(mBoxLayoutPiece, mLayoutPiece)
};
MGNCS_EXPORT extern mBoxLayoutPieceClass g_stmBoxLayoutPieceCls;
#define mBoxLayoutPieceHeader(clss) \
mLayoutPieceHeader(clss) \
int left:16; \
int top:16; \
int right:16; \
int bottom:16; \
unsigned short count; \
unsigned char margin; \
unsigned char space; \
unsigned short * cell_info; \
mHotPiece ** cells;
struct _mBoxLayoutPiece
{
mBoxLayoutPieceHeader(mBoxLayoutPiece)
};
#define mBoxLayoutPiece_getSizeType(size) mLayoutPiece_getSizeType(size)
#define mBoxLayoutPiece_setSizeType(size, type) mLayoutPiece_setSizeType(size, type)
#define mBoxLayoutPiece_setSize(size, value) mLayoutPiece_setSize(size, value)
#define mBoxLayoutPiece_getSize(size) mLayoutPiece_getSize(size)
enum mBoxLayoutPieceProps{
NCSP_BOXLAYOUTPIECE_COUNT = BOXLAYOUTPIECE_PROP_BEGIN,
NCSP_BOXLAYOUTPIECE_SPACE = PIECECOMM_PROP_SPACE,
NCSP_BOXLAYOUTPIECE_MARGIN = PIECECOMM_PROP_MARGIN
};
/** protected functio */
BOOL mBoxLayoutPiece_calcSize(mBoxLayoutPiece *self, int total_size, int *sizes);
#ifdef __cplusplus
}
#endif
#endif
|
honigbeutler123/AtomicGameEngine
|
Source/AtomicEditor/Editors/SceneEditor3D/SceneEditOp.h
|
<filename>Source/AtomicEditor/Editors/SceneEditor3D/SceneEditOp.h
//
// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
// LICENSE: Atomic Game Engine Editor and Tools EULA
// Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
// license information: https://github.com/AtomicGameEngine/AtomicGameEngine
//
#pragma once
#include <Atomic/Core/Object.h>
#include <Atomic/IO/VectorBuffer.h>
namespace Atomic
{
class Node;
class Component;
}
using namespace Atomic;
namespace AtomicEditor
{
enum SceneEditType
{
SCENEEDIT_UNKNOWN = 0,
SCENEEDIT_SELECTION
};
class SceneEditOp
{
public:
SceneEditOp(Scene* scene, SceneEditType type) { type_ = type; scene_ = scene;}
virtual ~SceneEditOp() { }
virtual bool Undo() = 0;
virtual bool Redo() = 0;
/// Returns true if the states are identical
bool CompareStates(const VectorBuffer& stateOne, const VectorBuffer& stateTwo) const
{
if (stateOne.GetSize() != stateTwo.GetSize())
return false;
if (memcmp(stateOne.GetData(), stateTwo.GetData(), stateOne.GetSize()))
return false;
return true;
}
SharedPtr<Scene> scene_;
SceneEditType type_;
};
class SelectionEditOp : public SceneEditOp
{
public:
SelectionEditOp(Scene* scene);
~SelectionEditOp();
bool Undo();
bool Redo();
void RegisterEdit();
void SetNodes(Vector<SharedPtr<Node>>& nodes);
void AddNode(Node* node);
void NodeAdded(Node* node, Node* parent);
void NodeRemoved(Node* node, Node* parent);
// Erases a node from the edit op, return true if no other nodes in the operation
bool EraseNode(Node *node);
bool Commit();
private:
struct EditComponent
{
SharedPtr<Component> component_;
SharedPtr<Node> nodeBegin_;
SharedPtr<Node> nodeEnd_;
VectorBuffer stateBegin_;
VectorBuffer stateEnd_;
};
struct EditNode
{
SharedPtr<Node> node_;
SharedPtr<Node> parentBegin_;
SharedPtr<Node> parentEnd_;
VectorBuffer stateBegin_;
VectorBuffer stateEnd_;
PODVector<EditComponent*> components_;
};
PODVector<EditNode*> editNodes_;
};
}
|
smart-cow/scow
|
cow-webapp/src/main/java/org/wiredwidgets/cow/webapp/client/components/MyTasksListGrid.java
|
/**
* Approved for Public Release: 10-4800. Distribution Unlimited.
* Copyright 2014 The MITRE Corporation,
* 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/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied.
*
* See the License for the specific language governing permissions and limitations under the License.
*/
package org.wiredwidgets.cow.webapp.client.components;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import org.wiredwidgets.cow.webapp.client.BpmServiceMain;
import org.wiredwidgets.cow.webapp.client.PageManager;
import org.wiredwidgets.cow.webapp.client.PageManager.Pages;
import org.wiredwidgets.cow.webapp.client.bpm.Task;
import org.wiredwidgets.cow.webapp.client.page.PageWidget;
import org.wiredwidgets.cow.webapp.client.page.Tasks;
import org.wiredwidgets.cow.webapp.client.page.ViewWorkflow;
import org.wiredwidgets.cow.webapp.client.bpm.Parse;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.gwt.components.client.xml.Document;
import com.gwt.components.client.xml.Node;
import com.smartgwt.client.data.DataSourceField;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.ListGridEditEvent;
import com.smartgwt.client.types.ListGridFieldType;
import com.smartgwt.client.types.RowEndEditAction;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.BaseWidget;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.FormItem;
import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
import com.smartgwt.client.widgets.grid.CellFormatter;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.viewer.DetailFormatter;
import com.smartgwt.client.widgets.viewer.DetailViewer;
import com.smartgwt.client.widgets.viewer.DetailViewerField;
/**
* A custom ListGrid that displays a variable list of fields
* for each item, rather than a fixed set for all items. Also
* formats some of the fields that have special identifiers
* before them. Auto-detects URLs and makes them links.
*
*
*
*/
public class MyTasksListGrid extends ListGrid {
public MyTasksListGrid() {
super();
}
public MyTasksListGrid(JavaScriptObject jsObj) {
super(jsObj);
}
@Override
/**
* Used to display Task details on the Tasks page
*/
public Canvas getExpansionComponent(final ListGridRecord record) {
final ListGrid grid = this;
final ArrayList<String> outcomeString = new ArrayList<String>();
outcomeString.add("");
VLayout layout = new VLayout(5);
layout.setPadding(5);
HLayout hlayoutUpper = new HLayout();
final ListGrid taskGrid = new ListGrid(){
//Doesn't allow the varible name or required flag to be changed unless a user has just added it
@Override
protected boolean canEditCell (int rowNum, int colNum){
ListGridRecord existingRecord = getRecord(rowNum);
if (existingRecord != null &&
existingRecord.getAttribute("varname") != null &&
//Used to verify GWT hasn't added a non-breaking space for the table
existingRecord.getAttribute("varname").replace("\u00a0","").replace(" ","").length() >= 0) {
//Ensures this is the value
return (colNum ==1) && super.canEditCell(rowNum, colNum) ;
}
return true;
};
};
taskGrid.setWidth(750);
taskGrid.setHeight(130);
taskGrid.setCellHeight(22);
taskGrid.setCanEdit(true);
//taskGrid.setModalEditing(true);
taskGrid.setEditByCell(true);
taskGrid.setEditEvent(ListGridEditEvent.CLICK);
taskGrid.setListEndEditAction(RowEndEditAction.NEXT);
taskGrid.setAutoSaveEdits(false);
ListGridField variable = new ListGridField("varname", "Variable Name");
//variable.setCanEdit(false);
CellFormatter formatter = new CellFormatter() {
public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
if(value == null) return "";
String s = value.toString();
if(!record.getAttribute(s).equals("$#description")) {
String[] stringToCheck = s.split(" ");
s = "";
for(int i = 0; i < stringToCheck.length; i++) {
if(isURL(stringToCheck[i])) {
if(!stringToCheck[i].contains("://"))
stringToCheck[i] = "http://" + stringToCheck[i];
stringToCheck[i] = "<a href=\"" + stringToCheck[i] + "\" target=\"_blank\">" + stringToCheck[i] + "</a>";
} else {
stringToCheck[i] = BpmServiceMain.xmlEncode(stringToCheck[i]);
}
s += (s.equals("") ? stringToCheck[i] : " " + stringToCheck[i]);
}
}
return s;
}
};
ListGridField required = new ListGridField("required", "Required");
required.setType(ListGridFieldType.BOOLEAN);
taskGrid.setFields(variable, new ListGridField("value", "Value"),required);
taskGrid.setCellFormatter(formatter);
Integer count = 0;
ListGridRecord[] records = new ListGridRecord[record.getAttributes().length];
ListGridRecord lgr = null;
for(String s : record.getAttributes()) {
lgr = new ListGridRecord();
if (s == "task"){
s = Parse.clean(record.getAttribute(s));
Document doc = Document.xmlParse(s);
ArrayList<Node> children = ((Node)doc.getChildren().get(0)).getChildNodes();
for(int j = 0; j < children.size(); j++) {
String s1 = children.get(j).getName();
//SC.say("Inside:" + (counters+=s1));
if(s1.equals("variables")) {
ArrayList<Node> variables = children.get(j).getChildNodes();
for(int k = 0; k < variables.size(); k++) {
String varname = Parse.getAttributeValue(variables.get(k), "name");
String varval = Parse.getAttributeValue(variables.get(k), "value");
lgr = new ListGridRecord();
//lgr.setAttribute("taskname", t.get("id"));
lgr.setAttribute("varname", varname);
lgr.setAttribute("value", varval);
lgr.setAttribute("required",((Boolean)(s1.charAt(0) < 'p')));
records[count] = lgr;
count++;
}
}
}
}
}
taskGrid.setData(records);
layout.addMember(taskGrid);
HLayout hLayout = new HLayout(10);
hLayout.setAlign(Alignment.LEFT);
IButton saveButton = new IButton("Save");
saveButton.setTop(250);
saveButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
taskGrid.saveAllEdits();
//TODO currently can only SAVE Variables back to server when completing - so that is what this does
String varString = "";
ListGridRecord[] recs = taskGrid.getRecords();
for (ListGridRecord rec: recs){
String var = rec.getAttribute("varname");
//Current vars must start with $# //Do they? MH
//if (var.startsWith("$#") && var!=("$#id")){
//var = var.substring(2);
varString += "&var=" + BpmServiceMain.urlEncode(var+ ":"+rec.getAttribute("value"));
//}
}
Task t = (Task)record.getAttributeAsObject("task");
if (t.getOutcomes().size() > 0){
if (!(outcomeString.get(0).startsWith("?"))){
SC.say("Error. Please make your decision.");
return;
}
}
if(outcomeString.get(0).equals(""))
varString = varString.replaceFirst("&", "?");
final String tempString = record.getAttribute("id") + outcomeString.get(0) + varString;
BpmServiceMain.sendDelete("/tasks/active/" + tempString, true, new AsyncCallback<Void>() {
public void onFailure(Throwable arg0) {
SC.say("Error. Please ensure that you are connected to the Internet, that the server is currently online, and that the task was not already completed.");
}
public void onSuccess(Void arg0) {
((Tasks) PageManager.getInstance().getPage()).updateTasks();
}
});
}
});
hLayout.addMember(saveButton);
IButton discardButton = new IButton("Discard");
discardButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
taskGrid.discardAllEdits();
}
});
hLayout.addMember(discardButton);
IButton closeButton = new IButton("Close");
closeButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
grid.collapseRecord(record);
}
});
hLayout.addMember(closeButton);
IButton addRowButton = new IButton("Add Variable");
addRowButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
taskGrid.startEditingNew();
}
});
hLayout.addMember(addRowButton);
layout.addMember(hLayout);
hlayoutUpper.addMember(layout);
Task t = (Task)record.getAttributeAsObject("task");
ArrayList<String> outcomes = t.getOutcomes();
if (outcomes.size() > 0 ){
final DynamicForm form = new DynamicForm();
form.setWidth(300);
SelectItem item = new SelectItem();
item.setTitle("Decision");
item.setValueMap(outcomes.toArray(new String[outcomes.size()]));
//item.setValueMap((String[]) outcomes.toArray());
item.setWidth(250);
item.setPickListWidth(250);
ChangedHandler handler = new ChangedHandler(){
public void onChanged(ChangedEvent event){
outcomeString.set(0, "?outcome=" + BpmServiceMain.urlEncode((String)event.getValue()));
}
};
item.addChangedHandler(handler);
form.setItems(item);
hlayoutUpper.addMember(form);
hlayoutUpper.setAlign(Alignment.LEFT);
}
return hlayoutUpper;
}
/**
* Checks whether or not a String is a URL
* @param url The String to check
* @return true if it is a URL, otherwise false
*/
public static native boolean isURL(String url) /*-{
if(url.match(/[-a-zA-Z0-9@:%_\+.~#?&\/\/=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)?/gi))
return true;
return false;
}-*/;
public static native void viewWorkflow(String workflow, boolean init) /*-{
if(init) return;
@org.wiredwidgets.cow.webapp.client.components.CustomListGrid::switchToWorkflow(Ljava/lang/String;)(workflow);
}-*/;
public static void switchToWorkflow(String workflow) {
Object[] args = {workflow,true};
PageManager.getInstance().setPageHistory(Pages.WORKFLOW, args);
}
}
|
dapperfu/STM32F4-Discovery_FW_V1.1.0_Makefiles
|
FreeRTOS/FreeRTOS/Demo/PIC32MZ_MPLAB/ConfigPerformance.c
|
/*
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
***************************************************************************
* *
* FreeRTOS provides completely free yet professionally developed, *
* robust, strictly quality controlled, supported, and cross *
* platform software that has become a de facto standard. *
* *
* Help yourself get started quickly and support the FreeRTOS *
* project by purchasing a FreeRTOS tutorial book, reference *
* manual, or both from: http://www.FreeRTOS.org/Documentation *
* *
* Thank you! *
* *
***************************************************************************
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
>>! NOTE: The modification to the GPL is included to allow you to distribute
>>! a combined work that includes FreeRTOS without being obliged to provide
>>! the source code for proprietary components outside of the FreeRTOS
>>! kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available from the following
link: http://www.freertos.org/a00114.html
1 tab == 4 spaces!
***************************************************************************
* *
* Having a problem? Start by reading the FAQ "My application does *
* not run, what could be wrong?" *
* *
* http://www.FreeRTOS.org/FAQHelp.html *
* *
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
/*
* This file implements functions to access and manipulate the PIC32 hardware
* without reliance on third party library functions that may be liable to
* change.
*/
/* FreeRTOS includes. */
#include "FreeRTOS.h"
/* Demo includes. */
#include "ConfigPerformance.h"
#define hwUNLOCK_KEY_0 ( 0xAA996655UL )
#define hwUNLOCK_KEY_1 ( 0x556699AAUL )
/*-----------------------------------------------------------*/
void vHardwareConfigurePerformance( void )
{
/* set PBCLK2 to deliver 40Mhz clock for PMP/I2C/UART/SPI. */
SYSKEY = hwUNLOCK_KEY_0;
SYSKEY = hwUNLOCK_KEY_1;
/* 200MHz / 5 = 40MHz */
PB2DIVbits.PBDIV = 0b100;
/* Timers use clock PBCLK3, set this to 40MHz. */
PB3DIVbits.PBDIV = 0b100;
/* Ports use PBCLK4. */
PB4DIVbits.PBDIV = 0b000;
SYSKEY = 0;
/* Disable interrupts - note taskDISABLE_INTERRUPTS() cannot be used here as
FreeRTOS does not globally disable interrupt. */
__builtin_disable_interrupts();
}
/*-----------------------------------------------------------*/
void vHardwareUseMultiVectoredInterrupts( void )
{
/* Enable multi-vector interrupts. */
_CP0_BIS_CAUSE( 0x00800000U );
INTCONSET = _INTCON_MVEC_MASK;
__builtin_enable_interrupts();
}
|
reschke/oakpal
|
webster/src/test/java/net/adamcin/oakpal/webster/CndExporterTest.java
|
<gh_stars>0
/*
* Copyright 2019 <NAME>
*
* 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/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.adamcin.oakpal.webster;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
import java.util.function.Function;
import java.util.stream.Stream;
import javax.jcr.Workspace;
import javax.jcr.nodetype.NodeTypeManager;
import net.adamcin.oakpal.core.JcrNs;
import net.adamcin.oakpal.core.JsonCnd;
import net.adamcin.oakpal.core.Result;
import org.apache.jackrabbit.spi.commons.namespace.NamespaceMapping;
import org.junit.Test;
public class CndExporterTest {
final File testBaseDir = new File("target/repos/CndExporterTest");
@Test
public void testWriteNodetypesWithBuiltins() throws Exception {
final File tempDir = new File(testBaseDir, "testWriteNodetypesWithBuiltins");
final File fromRepoDir = new File(tempDir, "fromRepo/segmentstore");
final File explicitTypesCnd = new File(tempDir, "explicitTypes.cnd");
final File allTypesCnd = new File(tempDir, "allTypes.cnd");
TestUtil.prepareRepo(fromRepoDir, session -> {
final URL slingNodetypes = getClass().getResource("/sling_nodetypes.cnd");
TestUtil.installCndFromURL(session, slingNodetypes);
});
if (explicitTypesCnd.exists()) {
explicitTypesCnd.delete();
}
if (allTypesCnd.exists()) {
allTypesCnd.delete();
}
TestUtil.withReadOnlyFixture(fromRepoDir, session -> {
new CndExporter.Builder().withIncludeBuiltins(true).build()
.writeNodetypes(explicitTypesCnd, session, Arrays.asList("sling:Folder", "nt:folder"));
try (Scanner scanner = new Scanner(explicitTypesCnd, StandardCharsets.UTF_8.name())) {
assertNull("nt:query should not be defined", scanner.findWithinHorizon("\\[nt:query]", 0));
}
try (Scanner scanner = new Scanner(explicitTypesCnd, StandardCharsets.UTF_8.name())) {
assertNull("sling:OrderedFolder should not be defined", scanner.findWithinHorizon("\\[sling:OrderedFolder]", 0));
}
try (Scanner scanner = new Scanner(explicitTypesCnd, StandardCharsets.UTF_8.name())) {
assertNotNull("nt:folder should be defined", scanner.findWithinHorizon("\\[nt:folder]", 0));
}
try (Scanner scanner = new Scanner(explicitTypesCnd, StandardCharsets.UTF_8.name())) {
assertNotNull("sling:Folder should be defined", scanner.findWithinHorizon("\\[sling:Folder]", 0));
}
});
}
@Test
public void testWriteNodetypes() throws Exception {
final File tempDir = new File(testBaseDir, "testWriteNodetypes");
final File fromRepoDir = new File(tempDir, "fromRepo/segmentstore");
final File toRepoDir = new File(tempDir, "toRepo/segmentstore");
final File exportedCnd = new File(tempDir, "exported.cnd");
TestUtil.prepareRepo(fromRepoDir, session -> {
final URL slingNodetypes = getClass().getResource("/sling_nodetypes.cnd");
TestUtil.installCndFromURL(session, slingNodetypes);
});
if (exportedCnd.exists()) {
exportedCnd.delete();
}
TestUtil.withReadOnlyFixture(fromRepoDir, session -> {
final Workspace workspace = session.getWorkspace();
NodeTypeManager ntManager = workspace.getNodeTypeManager();
assertTrue("sling:Folder should be imported",
ntManager.hasNodeType("sling:Folder"));
assertTrue("sling:OrderedFolder should be imported",
ntManager.hasNodeType("sling:OrderedFolder"));
new CndExporter.Builder().build()
.writeNodetypes(exportedCnd, session, Arrays.asList("sling:Folder", "sling:OrderedFolder"));
});
TestUtil.prepareRepo(toRepoDir, session -> {
final URL exportedUrl = exportedCnd.toURL();
TestUtil.installCndFromURL(session, exportedUrl);
});
TestUtil.withReadOnlyFixture(toRepoDir, session -> {
final Workspace workspace = session.getWorkspace();
NodeTypeManager ntManager = workspace.getNodeTypeManager();
assertTrue("sling:Folder should be imported",
ntManager.hasNodeType("sling:Folder"));
assertTrue("sling:OrderedFolder should be imported",
ntManager.hasNodeType("sling:OrderedFolder"));
});
}
@Test
public void testWriteNodetypesByName() throws Exception {
final File tempDir = new File(testBaseDir, "testWriteNodetypesByName");
final File fromRepoDir = new File(tempDir, "fromRepo/segmentstore");
final File toRepoDir = new File(tempDir, "toRepo/segmentstore");
final File exportedCnd = new File(tempDir, "exported.cnd");
TestUtil.prepareRepo(fromRepoDir, session -> {
final URL slingNodetypes = getClass().getResource("/sling_nodetypes.cnd");
TestUtil.installCndFromURL(session, slingNodetypes);
});
if (exportedCnd.exists()) {
exportedCnd.delete();
}
TestUtil.withReadOnlyFixture(fromRepoDir, session -> {
final Workspace workspace = session.getWorkspace();
NodeTypeManager ntManager = workspace.getNodeTypeManager();
assertTrue("sling:Folder should be imported",
ntManager.hasNodeType("sling:Folder"));
assertTrue("sling:OrderedFolder should be imported",
ntManager.hasNodeType("sling:OrderedFolder"));
new CndExporter.Builder().build()
.writeNodetypes(exportedCnd, session, Collections.singletonList("sling:Folder"));
});
TestUtil.prepareRepo(toRepoDir, session -> {
final URL exportedUrl = exportedCnd.toURL();
TestUtil.installCndFromURL(session, exportedUrl);
});
TestUtil.withReadOnlyFixture(toRepoDir, session -> {
final Workspace workspace = session.getWorkspace();
NodeTypeManager ntManager = workspace.getNodeTypeManager();
assertTrue("sling:Folder should be imported",
ntManager.hasNodeType("sling:Folder"));
assertFalse("sling:OrderedFolder should NOT be imported",
ntManager.hasNodeType("sling:OrderedFolder"));
});
}
static final class NoStringConstructorException extends Exception {
public NoStringConstructorException() {
super("NoStringConstructorException");
}
}
@Test(expected = IllegalStateException.class)
public void testCombineCauseMessages_reflectiveError() throws NoStringConstructorException {
CndExporter.combineCauseMessages(
Stream.of(
Result.failure(new Exception("one")),
Result.failure(new Exception("two"))),
Exception.class,
NoStringConstructorException.class);
}
@Test
public void testNsRemapName() {
final NamespaceMapping from = JsonCnd
.toNamespaceMapping(Collections
.singletonList(JcrNs.create("fooFrom", "http://foo.com")));
final NamespaceMapping to = JsonCnd
.toNamespaceMapping(Collections
.singletonList(JcrNs.create("fooTo", "http://foo.com")));
final Function<String, String> remapper = ChecklistExporter.nsRemapName(from, to);
assertEquals("expect new prefix", "fooTo:mixin", remapper.apply("fooFrom:mixin"));
}
}
|
chromia/pyspk
|
spark/src/Core/SPK_BufferHandler.cpp
|
//////////////////////////////////////////////////////////////////////////////////
// SPARK particle engine //
// Copyright (C) 2008-2009 - <NAME> - <EMAIL> //
// //
// This software is provided 'as-is', without any express or implied //
// warranty. In no event will the authors be held liable for any damages //
// arising from the use of this software. //
// //
// Permission is granted to anyone to use this software for any purpose, //
// including commercial applications, and to alter it and redistribute it //
// freely, subject to the following restrictions: //
// //
// 1. The origin of this software must not be misrepresented; you must not //
// claim that you wrote the original software. If you use this software //
// in a product, an acknowledgment in the product documentation would be //
// appreciated but is not required. //
// 2. Altered source versions must be plainly marked as such, and must not be //
// misrepresented as being the original software. //
// 3. This notice may not be removed or altered from any source distribution. //
//////////////////////////////////////////////////////////////////////////////////
#include "Core/SPK_BufferHandler.h"
namespace SPK
{
bool BufferHandler::bufferCreation = true;
void BufferHandler::enableBuffersCreation(bool creation)
{
bufferCreation = creation;
}
bool BufferHandler::isBuffersCreationEnabled()
{
return bufferCreation;
}
bool BufferHandler::prepareBuffers(const Group& group)
{
if (!checkBuffers(group))
{
if (isBuffersCreationEnabled())
{
destroyBuffers(group);
createBuffers(group);
return true;
}
return false;
}
return true;
}
}
|
olavloite/spanner-jdbc
|
src/test/java/nl/topicus/jdbc/test/integration/specific/ResultSetMetaDataStringMaxLengthIT.java
|
<reponame>olavloite/spanner-jdbc
package nl.topicus.jdbc.test.integration.specific;
import static org.junit.Assert.assertEquals;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import nl.topicus.jdbc.test.category.IntegrationTest;
@Category(IntegrationTest.class)
public class ResultSetMetaDataStringMaxLengthIT extends AbstractSpecificIntegrationTest {
/**
* STRING(MAX) columns have an actual max length of 2621440 (see
* https://cloud.google.com/spanner/docs/data-definition-language#scalars)
*/
private static final int STRING_MAX_LENGTH = 2621440;
/**
* BYTES(MAX) columns have an actual max length of 10485760 (see
* https://cloud.google.com/spanner/docs/data-definition-language#scalars)
*/
private static final int BYTES_MAX_LENGTH = 10485760;
@Test
public void testStringMaxColumnLength() throws SQLException {
try (
ResultSet rs = getConnection().createStatement().executeQuery("select * from test_table")) {
ResultSetMetaData metadata = rs.getMetaData();
assertEquals(100, metadata.getPrecision(2));
assertEquals(STRING_MAX_LENGTH, metadata.getPrecision(3));
assertEquals(100, metadata.getPrecision(4));
assertEquals(BYTES_MAX_LENGTH, metadata.getPrecision(5));
}
}
@Before
public void before() throws SQLException {
createTestTable();
insertRecords();
}
@After
public void after() throws SQLException {
dropTable();
}
private void createTestTable() throws SQLException {
getConnection().createStatement().executeUpdate(
"create table test_table (id int64 not null, name string(100), description string(max), data1 bytes(100), data2 bytes(max)) primary key (id)");
}
private void insertRecords() throws SQLException {
String sql = "insert into test_table (id, name) values (?, ?)";
PreparedStatement ps = getConnection().prepareStatement(sql);
for (long l = 1L; l <= 10; l++) {
ps.setLong(1, l);
ps.setString(2, String.format("record %d", l));
ps.setString(3, String.format("description of record %d", l));
ps.setBytes(4, String.format("record %d", l).getBytes());
ps.setBytes(5, String.format("description of record %d", l).getBytes());
ps.addBatch();
ps.clearParameters();
}
ps.executeBatch();
getConnection().commit();
// check record count
assertEquals(10L, getRecordCount());
}
private long getRecordCount() throws SQLException {
try (ResultSet rs =
getConnection().createStatement().executeQuery("select count(*) from test_table")) {
if (rs.next())
return rs.getLong(1);
}
return -1L;
}
private void dropTable() throws SQLException {
getConnection().createStatement().executeUpdate("drop table test_table");
}
}
|
rok-cesnovar/stan-distributions
|
math-cpp/scaled_inv_chi_square.cpp
|
#include <emscripten/bind.h>
#include <stan/math/prim.hpp>
#include <cmath>
using namespace emscripten;
double scaled_inv_chi_square_lpdf(double y, double nu, double sigma) {
return stan::math::scaled_inv_chi_square_lpdf(y, nu, sigma);
}
EMSCRIPTEN_BINDINGS(my_module) {
function("scaled_inv_chi_square_lpdf", &scaled_inv_chi_square_lpdf);
}
|
lechium/iOS1351Headers
|
System/Library/PrivateFrameworks/Celestial.framework/FigCaptureAudioFileSinkPipeline.h
|
<filename>System/Library/PrivateFrameworks/Celestial.framework/FigCaptureAudioFileSinkPipeline.h
/*
* This header is generated by classdump-dyld 1.5
* on Friday, April 30, 2021 at 11:36:24 AM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image Source: /System/Library/PrivateFrameworks/Celestial.framework/Celestial
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>. Updated by <NAME>.
*/
#import <Celestial/FigCaptureSinkPipeline.h>
@class BWFileCoordinatorNode, BWAudioConverterNode, BWAudioFileSinkNode;
@interface FigCaptureAudioFileSinkPipeline : FigCaptureSinkPipeline {
BWFileCoordinatorNode* _fileCoordinatorNode;
BWAudioConverterNode* _audioConverterNode;
BWAudioFileSinkNode* _audioFileSinkNode;
}
@property (nonatomic,readonly) BWFileCoordinatorNode * fileCoordinatorNode; //@synthesize fileCoordinatorNode=_fileCoordinatorNode - In the implementation block
@property (nonatomic,readonly) BWAudioFileSinkNode * audioFileSinkNode; //@synthesize audioFileSinkNode=_audioFileSinkNode - In the implementation block
+(void)initialize;
-(void)dealloc;
-(BWFileCoordinatorNode *)fileCoordinatorNode;
-(BWAudioFileSinkNode *)audioFileSinkNode;
-(id)initWithConfiguration:(id)arg1 graph:(id)arg2 name:(id)arg3 sourceAudioOutput:(id)arg4 recordingStatusDelegate:(id)arg5 ;
-(int)_buildAudioFileSinkPipeline:(id)arg1 graph:(id)arg2 sourceAudioOutput:(id)arg3 recordingStatusDelegate:(id)arg4 ;
@end
|
milangrahovac/ui
|
vendor/github.com/takama/router/example/example.go
|
<reponame>milangrahovac/ui
package main
import (
"github.com/takama/router"
)
// Data is helper to construct JSON
type Data map[string]interface{}
func main() {
r := router.New()
r.GET("/hello/:name", func(c *router.Control) {
c.Body("Hello " + c.Get(":name"))
})
r.GET("/api/v1/settings/database/:db", func(c *router.Control) {
c.UseTimer()
// Do something
data := Data{
"Database settings": Data{
"database": c.Get(":db"),
"host": "localhost",
"port": "3306",
},
}
c.Code(200).Body(data)
})
// Listen and serve on 0.0.0.0:8888
r.Listen(":8888")
}
|
cameroncooke/XcodeHeaders
|
PlugIns/IDEInterfaceBuilderCocoaIntegration/IBNSWindowEditor.h
|
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "IBEditor.h"
#import "NSAnimationDelegate.h"
@class NSString;
@interface IBNSWindowEditor : IBEditor <NSAnimationDelegate>
{
id <DVTInvalidation> resourcesDidUpdateToken;
BOOL toolbarSheetIsUp;
}
- (void).cxx_destruct;
- (void)resizeFrameViewWithEvent:(id)arg1 fromEditorCanvasFrameKnob:(CDUnion_42e99c75)arg2;
- (CDStruct_d2b197d1)canvasAlignmentInsetForEditorFrame;
- (BOOL)childEditorShouldDrawActivationDarkening:(id)arg1;
- (BOOL)isChildToolbarEditor:(id)arg1;
- (BOOL)canSizeSelectionToFit;
- (void)sizeSelectionToFit:(id)arg1;
- (void)drawSelectionHighlightForObject:(id)arg1;
- (void)selectionOwner:(id)arg1 didSelect:(id)arg2 andDeselect:(id)arg3;
- (void)didActivate;
- (void)willEditChild:(id)arg1 inFrameController:(id)arg2;
- (void)positionChildEditorFrame;
- (BOOL)shouldCloseWithEvent:(id)arg1;
- (BOOL)shouldDragFrameWithMouseDownInEditedRect:(id)arg1;
- (BOOL)isSimulatingSheet;
- (BOOL)interceptEvent:(id)arg1;
- (void)noteDescendant:(id)arg1 didChangeProperty:(id)arg2 fromValue:(id)arg3;
- (id)deepestEditor;
- (BOOL)isUndoingOrRedoing;
- (void)rebuildToolbar;
- (void)willClose;
- (void)didOpen;
- (id)editorToolbarCounterpart;
- (id)editedContentView;
- (struct CGRect)toolbarRectInView:(id)arg1;
- (id)toolbar;
- (id)windowEditorView;
- (id)layoutManager;
- (id)viewEditorCanvasFrameController;
- (id)windowTitleForDocumentDisplayName:(id)arg1;
- (id)editedWindowTemplate;
- (id)viewEditorFrameController;
// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;
@end
|
wilebeast/FireFox-OS
|
B2G/gecko/browser/app/profile/extensions/testpilot@labs.mozilla.com/content/all-studies-window.js
|
<filename>B2G/gecko/browser/app/profile/extensions/testpilot@labs.mozilla.com/content/all-studies-window.js
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// TODO Show individual status page in new chromeless window as html with
// background color set to "moz-dialog".
const NO_STUDIES_IMG = "chrome://testpilot/skin/testPilot_200x200.png";
const PROPOSE_STUDY_URL =
"https://wiki.mozilla.org/Labs/Test_Pilot#For_researchers";
var TestPilotXulWindow = {
_stringBundle : null,
onSubmitButton: function(experimentId) {
Components.utils.import("resource://testpilot/modules/setup.js");
let task = TestPilotSetup.getTaskById(experimentId);
let button = document.getElementById("submit-button-" + task.id);
// Hide the upload button so it doesn't get clicked again...
let parent = button.parentNode;
while (parent.firstChild) {
parent.removeChild(parent.firstChild);
}
// Replace it with a message:
this.addLabel(
parent,
this._stringBundle.getString("testpilot.studiesWindow.uploading"));
let self = this;
task.upload( function(success) {
while (parent.firstChild) {
parent.removeChild(parent.firstChild);
}
if (success) {
self.addThanksMessage(parent);
// TODO or should we move it to 'finished studies' immediately?
} else {
// TODO a better error message?
self.addLabel(
parent,
self._stringBundle.getString(
"testpilot.studiesWindow.unableToReachServer"));
}
});
},
addThanksMessage: function(container) {
// Fill in status box with icon and message to show success
let hbox = document.createElement("hbox");
container.appendChild(this.makeSpacer());
container.appendChild(hbox);
this.addLabel(
container,
this._stringBundle.getString(
"testpilot.studiesWindow.thanksForContributing"));
container.appendChild(this.makeSpacer());
hbox.appendChild(this.makeSpacer());
this.addImg(hbox, "study-submitted");
hbox.appendChild(this.makeSpacer());
},
addXulLink: function (container, text, url, openInTab) {
let linkContainer = document.createElement("hbox");
let link = document.createElement("label");
let spacer = document.createElement("spacer");
link.setAttribute("value", text);
link.setAttribute("class", "text-link");
if (openInTab) {
link.setAttribute(
"onclick",
"if (event.button==0) { " +
"TestPilotWindowUtils.openInTab('" + url + "'); }");
} else {
link.setAttribute(
"onclick",
"if (event.button==0) { " +
"TestPilotWindowUtils.openChromeless('" + url + "'); }");
}
linkContainer.appendChild(link);
spacer.setAttribute("flex", "1");
linkContainer.appendChild(spacer);
container.appendChild(linkContainer);
},
addLabel: function(container, text, styleClass) {
let label = document.createElement("label");
label.setAttribute("value", text);
if (styleClass) {
label.setAttribute("class", styleClass);
}
container.appendChild(label);
},
addImg: function(container, iconClass) {
let newImg = document.createElement("image");
newImg.setAttribute("class", iconClass);
container.appendChild(newImg);
},
makeSpacer: function() {
let spacer = document.createElement("spacer");
spacer.setAttribute("flex", "1");
return spacer;
},
addThumbnail: function(container, imgUrl) {
let boundingBox = document.createElement("vbox");
boundingBox.setAttribute("class", "results-thumbnail");
let bBox2 = document.createElement("hbox");
boundingBox.appendChild(this.makeSpacer());
boundingBox.appendChild(bBox2);
boundingBox.appendChild(this.makeSpacer());
bBox2.appendChild(this.makeSpacer());
let newImg = document.createElement("image");
newImg.setAttribute("src", imgUrl);
newImg.setAttribute("class", "results-thumbnail");
bBox2.appendChild(newImg);
bBox2.appendChild(this.makeSpacer());
container.appendChild(boundingBox);
},
addProgressBar: function(container, percent) {
let progBar = document.createElement("progressmeter");
progBar.setAttribute("mode", "determined");
progBar.setAttribute("value", Math.ceil(percent).toString());
container.appendChild(progBar);
},
addDescription: function(container, title, paragraph) {
let desc = document.createElement("description");
desc.setAttribute("class", "study-title");
let txtNode = document.createTextNode(title);
desc.appendChild(txtNode);
container.appendChild(desc);
desc = document.createElement("description");
desc.setAttribute("class", "study-description");
desc.setAttribute("crop", "none");
txtNode = document.createTextNode(paragraph);
desc.appendChild(txtNode);
container.appendChild(desc);
},
addButton: function(container, label, id, onClickHandler) {
let button = document.createElement("button");
button.setAttribute("label", label);
button.setAttribute("id", id);
button.setAttribute("oncommand", onClickHandler);
container.appendChild(button);
},
_sortNewestFirst: function(experiments) {
experiments.sort(
function sortFunc(a, b) {
if (a.endDate && b.endDate) {
return b.endDate - a.endDate;
}
if (a.publishDate && b.publishDate) {
if (isNaN(a.publishDate) || isNaN(b.publishDate)) {
return 0;
}
return b.publishDate - a.publishDate;
}
return 0;
});
return experiments;
},
onLoad: function () {
Components.utils.import("resource://testpilot/modules/Observers.js");
Components.utils.import("resource://testpilot/modules/setup.js");
Components.utils.import("resource://testpilot/modules/tasks.js");
this._stringBundle = document.getElementById("testpilot-stringbundle");
this.sizeWindow();
this._init(false);
Observers.add("testpilot:task:changed", this._onTaskStatusChanged, this);
},
onUnload: function() {
document.getElementById("settings-pane").writePreferences(true);
Observers.remove("testpilot:task:changed", this._onTaskStatusChanged, this);
},
_onTaskStatusChanged : function() {
this._init(true);
},
onTakeSurveyButton: function(taskId) {
let task = TestPilotSetup.getTaskById(taskId);
TestPilotWindowUtils.openChromeless(task.defaultUrl);
task.onDetailPageOpened();
},
_init: function(aReload) {
let experiments;
let ready = false;
// Are we done loading tasks?
if (TestPilotSetup.startupComplete) {
experiments = TestPilotSetup.getAllTasks();
if (experiments.length > 0 ) {
ready = true;
}
}
if (!ready) {
// If you opened the window before tasks are done loading, exit now
// but try again in a few seconds.
window.setTimeout(
function() { TestPilotXulWindow._init(aReload); }, 2000);
return;
}
let numFinishedStudies = 0;
let numCurrentStudies = 0;
/* Remove 'loading' message */
let msg = window.document.getElementById("still-loading-msg");
msg.setAttribute("hidden", "true");
if (aReload) {
/* If we're reloading, start by clearing out any old stuff already
* present in the listboxes. */
let listboxIds =
["current-studies-listbox", "finished-studies-listbox",
"study-results-listbox"];
for (let i = 0; i < listboxIds.length; i++) {
let listbox = document.getElementById(listboxIds[i]);
while (listbox.lastChild) {
listbox.removeChild(listbox.lastChild);
}
}
}
experiments = this._sortNewestFirst(experiments);
for (let i = 0; i < experiments.length; i++) {
let task = experiments[i];
let newRow = document.createElement("richlistitem");
newRow.setAttribute("class", "tp-study-list");
this.addThumbnail(newRow, task.thumbnail);
let textVbox = document.createElement("vbox");
newRow.appendChild(textVbox);
let openInTab = (task.taskType == TaskConstants.TYPE_LEGACY);
this.addDescription(textVbox, task.title, task.summary);
this.addXulLink(
textVbox, this._stringBundle.getString("testpilot.moreInfo"),
task.defaultUrl, openInTab);
// Create the rightmost status area, depending on status:
let statusVbox = document.createElement("vbox");
if (task.status == TaskConstants.STATUS_FINISHED) {
this.addLabel(
statusVbox,
this._stringBundle.getFormattedString(
"testpilot.studiesWindow.finishedOn",
[(new Date(task.endDate)).toLocaleDateString()]));
this.addButton(statusVbox,
this._stringBundle.getString("testpilot.submit"),
"submit-button-" + task.id,
"TestPilotXulWindow.onSubmitButton(" + task.id + ");");
}
if (task.status == TaskConstants.STATUS_CANCELLED) {
let hbox = document.createElement("hbox");
newRow.setAttribute("class", "tp-opted-out");
statusVbox.appendChild(this.makeSpacer());
statusVbox.appendChild(hbox);
this.addLabel(
statusVbox,
this._stringBundle.getString("testpilot.studiesWindow.canceledStudy"));
statusVbox.appendChild(this.makeSpacer());
hbox.appendChild(this.makeSpacer());
this.addImg(hbox, "study-canceled");
hbox.appendChild(this.makeSpacer());
}
if (task.status == TaskConstants.STATUS_NEW ||
task.status == TaskConstants.STATUS_PENDING ) {
newRow.setAttribute("class", "tp-new-results");
if (task.taskType == TaskConstants.TYPE_SURVEY) {
this.addButton(
statusVbox,
this._stringBundle.getString("testpilot.takeSurvey"),
"survey-button",
"TestPilotXulWindow.onTakeSurveyButton('" + task.id + "');");
} else if (task.taskType == TaskConstants.TYPE_EXPERIMENT) {
if (task.startDate) {
this.addLabel(
statusVbox,
this._stringBundle.getFormattedString(
"testpilot.studiesWindow.willStart",
[(new Date(task.startDate)).toLocaleDateString()]));
}
}
}
if (task.status == TaskConstants.STATUS_IN_PROGRESS ||
task.status == TaskConstants.STATUS_STARTING) {
if (task.taskType == TaskConstants.TYPE_SURVEY) {
this.addButton(
statusVbox,
this._stringBundle.getString("testpilot.takeSurvey"),
"survey-button",
"TestPilotXulWindow.onTakeSurveyButton('" + task.id + "');");
} else if (task.taskType == TaskConstants.TYPE_EXPERIMENT) {
this.addLabel(
statusVbox,
this._stringBundle.getString(
"testpilot.studiesWindow.gatheringData"));
let now = (new Date()).getTime();
let progress =
100 * (now - task.startDate) / (task.endDate - task.startDate);
this.addProgressBar(statusVbox, progress);
this.addLabel(
statusVbox,
this._stringBundle.getFormattedString(
"testpilot.studiesWindow.willFinish",
[(new Date(task.endDate)).toLocaleDateString()]));
}
}
if (task.status >= TaskConstants.STATUS_SUBMITTED) {
if (task.taskType == TaskConstants.TYPE_RESULTS) {
let maintask = TestPilotSetup.getTaskById(task.relatedStudyId);
if (maintask && maintask.status >= TaskConstants.STATUS_SUBMITTED) {
this.addThanksMessage(statusVbox);
}
} else {
if (task.status == TaskConstants.STATUS_MISSED) {
// Icon for missed studies
let hbox = document.createElement("hbox");
newRow.setAttribute("class", "tp-opted-out");
statusVbox.appendChild(this.makeSpacer());
statusVbox.appendChild(hbox);
this.addLabel(
statusVbox,
this._stringBundle.getString("testpilot.studiesWindow.missedStudy"));
statusVbox.appendChild(this.makeSpacer());
hbox.appendChild(this.makeSpacer());
this.addImg(hbox, "study-missed");
hbox.appendChild(this.makeSpacer());
} else {
this.addThanksMessage(statusVbox);
numFinishedStudies ++;
}
}
}
let spacer = document.createElement("spacer");
spacer.setAttribute("flex", "1");
newRow.appendChild(spacer);
newRow.appendChild(statusVbox);
// Use status to decide which panel to add this to:
let rowset;
if (task.taskType == TaskConstants.TYPE_RESULTS) {
rowset = document.getElementById("study-results-listbox");
} else if (task.status > TaskConstants.STATUS_FINISHED) {
rowset = document.getElementById("finished-studies-listbox");
} else {
rowset = document.getElementById("current-studies-listbox");
numCurrentStudies++;
}
// TODO further distinguish by background colors.
rowset.appendChild(newRow);
}
// If there are no current studies, show a message about upcoming
// studies:
if (numCurrentStudies == 0) {
let newRow = document.createElement("richlistitem");
newRow.setAttribute("class", "tp-study-list");
this.addThumbnail(newRow, NO_STUDIES_IMG);
let textVbox = document.createElement("vbox");
textVbox.setAttribute("class", "pilot-largetext");
newRow.appendChild(textVbox);
this.addDescription(
textVbox, "",
this._stringBundle.getString("testpilot.studiesWindow.noStudies"));
this.addXulLink(
textVbox,
this._stringBundle.getString("testpilot.studiesWindow.proposeStudy"),
PROPOSE_STUDY_URL, true);
document.getElementById("current-studies-listbox").appendChild(newRow);
}
// Show number of studies the user finished on badge:
document.getElementById("num-finished-badge").setAttribute(
"value", numFinishedStudies);
},
sizeWindow: function() {
// Size listboxes based on available screen size, then size window to fit
// list boxes.
let currList = document.getElementById("current-studies-listbox");
let finList = document.getElementById("finished-studies-listbox");
let resultsList = document.getElementById("study-results-listbox");
let screenWidth = window.screen.availWidth;
let screenHeight = window.screen.availHeight;
let width = screenWidth >= 800 ? 700 : screenWidth - 100;
let height = screenHeight >= 800 ? 700 : screenHeight - 100;
height -= 130; // Or whatever is height of title bar plus windowdragbox
currList.width = width;
currList.height = height;
finList.width = width;
finList.height = height;
resultsList.width = width;
resultsList.height = height;
window.sizeToContent();
},
focusPane: function(paneIndex) {
document.getElementById("tp-xulwindow-deck").selectedIndex = paneIndex;
// When you focus the 'study findings' tab, any results there which
// are still marked "new" should have their status changed as the user
// is considered to have seen them.
if (paneIndex == 2) {
Components.utils.import("resource://testpilot/modules/setup.js");
Components.utils.import("resource://testpilot/modules/tasks.js");
let experiments = TestPilotSetup.getAllTasks();
for each (let experiment in experiments) {
if (experiment.taskType == TaskConstants.TYPE_RESULTS) {
if (experiment.status == TaskConstants.STATUS_NEW) {
experiment.changeStatus(TaskConstants.STATUS_ARCHIVED, true);
}
}
}
}
}
};
|
Megadrive-Vault/SGDK
|
tools/resourcemanager/src/main/java/org/sgdk/resourcemanager/ui/panels/components/FXSoundComponentsPanel.java
|
<reponame>Megadrive-Vault/SGDK
package org.sgdk.resourcemanager.ui.panels.components;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import org.sgdk.resourcemanager.entities.SGDKFXSound;
import org.sgdk.resourcemanager.ui.panels.components.components.DriverComponent;
import org.sgdk.resourcemanager.ui.panels.components.components.OutrateComponent;
public class FXSoundComponentsPanel extends JPanel {
/**
*
*/
private static final long serialVersionUID = 1L;
private DriverComponent driverComponent;
private OutrateComponent outrateComponent = new OutrateComponent();
public FXSoundComponentsPanel(){
super();
setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
driverComponent = new DriverComponent(outrateComponent);
add(driverComponent);
add(outrateComponent);
}
public void setComponents(SGDKFXSound e) {
clean();
driverComponent.setSGDKFXSound(e);
}
private void clean() {
// TODO Auto-generated method stub
}
}
|
RichardChiang/platypush
|
platypush/backend/stt/__init__.py
|
<gh_stars>100-1000
import time
from platypush.backend import Backend
from platypush.context import get_plugin
from platypush.plugins.stt import SttPlugin
class SttBackend(Backend):
"""
Base class for speech-to-text backends.
"""
def __init__(self, plugin_name: str, retry_sleep: float = 5.0, *args, **kwargs):
"""
:param plugin_name: Plugin name of the class that will be used for speech detection. Must be an instance of
:class:`platypush.plugins.stt.SttPlugin`.
:param retry_sleep: Number of seconds the backend will wait on failure before re-initializing the plugin
(default: 5 seconds).
"""
super().__init__(*args, **kwargs)
self.plugin_name = plugin_name
self.retry_sleep = retry_sleep
def run(self):
super().run()
self.logger.info('Starting {} speech-to-text backend'.format(self.__class__.__name__))
while not self.should_stop():
try:
plugin: SttPlugin = get_plugin(self.plugin_name)
with plugin:
# noinspection PyProtectedMember
plugin._detection_thread.join()
except Exception as e:
self.logger.exception(e)
self.logger.warning('Encountered an unexpected error, retrying in {} seconds'.format(self.retry_sleep))
time.sleep(self.retry_sleep)
# vim:sw=4:ts=4:et:
|
pierredup/sentry
|
tests/sentry/buffer/base/tests.py
|
<reponame>pierredup/sentry<gh_stars>0
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from sentry.utils.compat import mock
from datetime import timedelta
from django.utils import timezone
from sentry.buffer.base import Buffer
from sentry.models import Group, Organization, Project, Release, ReleaseProject, Team
from sentry.testutils import TestCase
class BufferTest(TestCase):
def setUp(self):
self.buf = Buffer()
@mock.patch("sentry.buffer.base.process_incr")
def test_incr_delays_task(self, process_incr):
model = mock.Mock()
columns = {"times_seen": 1}
filters = {"id": 1}
self.buf.incr(model, columns, filters)
kwargs = dict(model=model, columns=columns, filters=filters, extra=None, signal_only=None)
process_incr.apply_async.assert_called_once_with(kwargs=kwargs)
def test_process_saves_data(self):
group = Group.objects.create(project=Project(id=1))
columns = {"times_seen": 1}
filters = {"id": group.id, "project_id": 1}
self.buf.process(Group, columns, filters)
assert Group.objects.get(id=group.id).times_seen == group.times_seen + 1
def test_process_saves_data_without_existing_row(self):
columns = {"times_seen": 1}
filters = {"message": "foo bar", "project_id": 1}
self.buf.process(Group, columns, filters)
group = Group.objects.get(message="foo bar")
# the default value for times_seen is 1, so we actually end up
# incrementing it to 2 here
assert group.times_seen == 2
assert group.project_id == 1
def test_process_saves_extra(self):
group = Group.objects.create(project=Project(id=1))
columns = {"times_seen": 1}
filters = {"id": group.id, "project_id": 1}
the_date = timezone.now() + timedelta(days=5)
self.buf.process(Group, columns, filters, {"last_seen": the_date})
group_ = Group.objects.get(id=group.id)
assert group_.times_seen == group.times_seen + 1
assert group_.last_seen == the_date
def test_increments_when_null(self):
org = Organization.objects.create(slug="test-org")
team = Team.objects.create(organization=org, slug="test-team")
project = Project.objects.create(organization=org, slug="test-project")
project.add_team(team)
release = Release.objects.create(organization=org, version="abcdefg")
release_project = ReleaseProject.objects.create(project=project, release=release)
assert release_project.new_groups == 0
columns = {"new_groups": 1}
filters = {"id": release_project.id}
self.buf.process(ReleaseProject, columns, filters)
release_project_ = ReleaseProject.objects.get(id=release_project.id)
assert release_project_.new_groups == 1
@mock.patch("sentry.models.Group.objects.create_or_update")
def test_signal_only(self, create_or_update):
group = Group.objects.create(project=Project(id=1))
columns = {"times_seen": 1}
filters = {"id": group.id, "project_id": 1}
the_date = timezone.now() + timedelta(days=5)
prev_times_seen = group.times_seen
self.buf.process(Group, columns, filters, {"last_seen": the_date}, signal_only=True)
group.refresh_from_db()
assert group.times_seen == prev_times_seen
|
aantthony/equation-language
|
lib/commands/dimensions.js
|
<filename>lib/commands/dimensions.js
'use strict'
var Definition = require('../definition')
var List = require('./list')
var Real = require('./real')
var Plus = require('./plus')
var Times = require('./times')
var Dot = require('./dot')
var Concat = require('./concat')
var Transpose = require('./transpose')
var Reverse = require('./reverse')
var Length = require('./length')
var ArrayTail = require('./array-tail')
var ArrayWithoutLast = require('./array-without-last')
// dim([1,2,3]) = [3]
// dim([[1,2,3]]) = [1,3]
// dim([[1,2,3]].[1,2,3]) = [1,1]
// dim([[]])
// dim([[1],[2],[3]]) = [3,1]
//
// 1 2 3 1 2 3 4 a b c d
// dim ( 4 5 6 . 5 6 7 8 ) = f([2,3], [3,4]) = dim ( e f g h ) = [2,4]
// 9 0 1 2
//
// dim( [1,2,3] * [[1],[2],[3]]) = f( [3], [3, 1] ) =
//
var dim = module.exports = new Definition(function (expr) {
if (!expr || arguments.length > 1) return
var hd = expr.head().def()
if (!hd) return
var firstArg = expr.args()[0]
if (hd === Real) {
return new List()
}
if (hd === List) {
if (!firstArg) return
var innerDim = dim(firstArg)
var nOuter = new Length(expr)
return new Concat(new List(new List(nOuter), innerDim))
}
if (hd === Plus) {
return dim(firstArg)
}
if (hd === Transpose) {
return new Reverse(dim(firstArg))
}
if (hd === Dot) {
var dAll = dim(firstArg)
expr.args().forEach(function (arg, i) {
if (i === 0) return
var d = new ArrayTail(dim(arg))
dAll = new Concat(new List(new ArrayWithoutLast(dAll), d))
})
return dAll
}
if (hd === Times) {
}
if (!hd.has(Definition.HOLD_LIST) && firstArg) {
return dim(firstArg)
}
}, [Definition.LAZY])
|
Deji69/SCRambl
|
SCRambl/ScriptObjects.h
|
/**********************************************************/
// SCRambl Advanced SCR Compiler/Assembler
// This program is distributed freely under the MIT license
// (See the LICENSE file provided
// or copy at http://opensource.org/licenses/MIT)
/**********************************************************/
#pragma once
#include <string>
#include <vector>
#include <map>
#include <stack>
#include <unordered_map>
#include "Types.h"
namespace SCRambl
{
template<typename TObj, typename TKey = std::string>
class ScriptObject;
/*\ Scope - Scope of variables, labels, you name it \*/
template<typename TObj, typename TKey = std::string>
class Scope
{
public:
using Map = std::unordered_map<TKey, TObj*>;
private:
Map m_Stuff;
public:
Scope() = default;
Scope(const Scope& v) = delete;
Scope(Scope&& v) : m_Stuff(std::move(v.m_Stuff))
{ }
virtual ~Scope() { }
Scope& operator=(const Scope& v) = delete;
Scope& operator=(Scope&& v) {
if (this != &v) {
std::swap(m_Stuff, v.m_Stuff);
}
return *this;
}
inline void Add(const TKey& key, TObj* obj) {
m_Stuff.emplace(key, obj);
}
inline typename Map::iterator Begin() {
return m_Stuff.begin();
}
inline typename Map::iterator End() {
return m_Stuff.end();
}
inline typename Map::const_iterator Begin() const {
return m_Stuff.begin();
}
inline typename Map::const_iterator End() const {
return m_Stuff.end();
}
inline typename Map::iterator begin() { return Begin(); }
inline typename Map::iterator end() { return End(); }
inline typename Map::const_iterator begin() const { return Begin(); }
inline typename Map::const_iterator end() const { return End(); }
inline size_t Size() const { return m_Stuff.size(); }
TObj* Find(const TKey & key) const {
auto it = m_Stuff.find(key);
return it == m_Stuff.end() ? nullptr : it->second;
}
};
/*\ ScriptObjects - Manager for script objects \*/
template<typename TObj, typename TKey = std::string>
class ScriptObjects
{
public:
using Key = TKey;
using Object = TObj;
using ScriptObject = ScriptObject<Object, Key>;
using ObjectScope = Scope<Object, Key>;
using List = std::list<ScriptObject>;
using Map = std::unordered_map<Key, typename List::iterator>;
ScriptObjects() = default;
virtual ~ScriptObjects() = default;
template<typename... TArgs>
ScriptObject* Add(const Types::Type* type, Key key, TArgs&&... args) {
bool global = true;
if (auto varval = type->GetVarValue()) {
auto vartype = varval->GetVarType();
global = vartype->IsGlobalVar();
}
else if (auto labelval = type->GetLabelValue()) {
global = labelval->IsGlobal();
}
auto& scope = global ? Global() : Local();
// create object
auto idx = m_Objects.size();
m_Objects.emplace_back(scope, type, scope.Size(), key, args...);
ASSERT(m_Objects.size() > idx);
// add to scope
scope.Add(key, m_Objects.back().Ptr());
// add to global map
m_Map.emplace(key, std::prev(m_Objects.end()));
return &m_Objects.back();
}
ScriptObject* Find(Key key) const {
auto it = m_Map.find(key);
return it == m_Map.end() ? nullptr : &*it->second;
}
size_t LocalDepth() const { return m_Scopes.size(); }
bool HasLocal() const { return !m_Scopes.empty(); }
const ObjectScope& Global() const {
return m_Global;
}
const ObjectScope& Local() const {
ASSERT(HasLocal());
return m_Scopes.back();
}
const ObjectScope& Scope() const {
return HasLocal() ? Local() : Global();
}
const ObjectScope& BeginLocal() {
m_Scopes.emplace_back();
return Scope();
}
const ObjectScope& EndLocal() {
ASSERT(LocalDepth() > 0);
for (auto it : m_Scopes.back()) {
// destroy all in it's name
auto rg = m_Map.equal_range(it.first);
// duh, don't do this, the object still has to exist for compilation
/*for (auto it = rg.first; it != rg.second; ++it) {
m_Objects.erase(it->second);
}*/
m_Map.erase(rg.first, rg.second);
}
m_Scopes.erase(m_Scopes.end()-1);
return Scope();
}
private:
ObjectScope& Global() {
return m_Global;
}
ObjectScope& Local() {
ASSERT(HasLocal());
return m_Scopes.back();
}
Map m_Map;
List m_Objects;
ObjectScope m_Global;
std::vector<ObjectScope> m_Scopes;
};
/*\ ScriptObj - A script object \*/
template<typename TObj, typename TKey>
class ScriptObject
{
public:
using Scope = Scope<TObj, TKey>;
template<typename... TArgs>
ScriptObject(Scope& scope, TArgs&&... args) : m_Object(std::make_unique<TObj>(args...)), m_Scope(scope)
{ }
ScriptObject(ScriptObject&& v) : m_Object(std::move(v.m_Object)), m_Scope(std::move(v.m_Scope))
{ }
ScriptObject(const ScriptObject&) = delete;
virtual ~ScriptObject() = default;
ScriptObject& operator=(const ScriptObject&) = delete;
ScriptObject& operator=(ScriptObject&& v) {
if (this != &v) {
m_Object = std::move(v.m_Object);
m_Scope = std::move(v.m_Scope);
}
return *this;
}
inline TObj& Get() const { return *m_Object; }
inline TObj* Ptr() const { return m_Object.get(); }
inline TObj& operator*() const { return Get(); }
inline TObj* operator->() const { return Ptr(); }
private:
std::unique_ptr<TObj> m_Object;
Scope& m_Scope;
};
}
|
JockX/marathonv5
|
marathon-javafx/marathon-fxtest-helpers/javafx-samples-2.2.80/src/FXML-LoginDemo/src/demo/Main.java
|
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
*/
package demo;
import java.io.InputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.fxml.JavaFXBuilderFactory;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import demo.model.User;
import demo.security.Authenticator;
/**
* Main Application. This class handles navigation and user session.
*/
public class Main extends Application {
private Stage stage;
private User loggedUser;
private final double MINIMUM_WINDOW_WIDTH = 390.0;
private final double MINIMUM_WINDOW_HEIGHT = 500.0;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Application.launch(Main.class, (java.lang.String[])null);
}
@Override
public void start(Stage primaryStage) {
try {
stage = primaryStage;
stage.setTitle("FXML Login Sample");
stage.setMinWidth(MINIMUM_WINDOW_WIDTH);
stage.setMinHeight(MINIMUM_WINDOW_HEIGHT);
gotoLogin();
primaryStage.show();
} catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
public User getLoggedUser() {
return loggedUser;
}
public boolean userLogging(String userId, String password){
if (Authenticator.validate(userId, password)) {
loggedUser = User.of(userId);
gotoProfile();
return true;
} else {
return false;
}
}
void userLogout(){
loggedUser = null;
gotoLogin();
}
private void gotoProfile() {
try {
ProfileController profile = (ProfileController) replaceSceneContent("Profile.fxml");
profile.setApp(this);
} catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
private void gotoLogin() {
try {
LoginController login = (LoginController) replaceSceneContent("Login.fxml");
login.setApp(this);
} catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
private Initializable replaceSceneContent(String fxml) throws Exception {
FXMLLoader loader = new FXMLLoader();
InputStream in = Main.class.getResourceAsStream(fxml);
loader.setBuilderFactory(new JavaFXBuilderFactory());
loader.setLocation(Main.class.getResource(fxml));
AnchorPane page;
try {
page = (AnchorPane) loader.load(in);
} finally {
in.close();
}
Scene scene = new Scene(page, 800, 600);
stage.setScene(scene);
stage.sizeToScene();
return (Initializable) loader.getController();
}
}
|
riship99/codeWith-hacktoberfest
|
HouseRobber/CPP/HouseRobber.cpp
|
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> nums(n, 0);
vector<int> dp(n, 0);
int i;
for (i = 0; i < n; i++)
cin >> nums[i];
if (n == 0)
cout << 0;
else if (n == 1)
cout << nums[0];
else if (n == 2)
cout << max(nums[0], nums[1]);
else
{
dp[0] = nums[0];
dp[1] = max(nums[0], nums[1]);
for (i = 2; i < n; i++)
dp[i] = max(nums[i] + dp[i - 2], dp[i - 1]);
cout << dp[n - 1];
}
return 0;
}
|
EOL/publishing
|
app/models/publishing/gets_licenses.rb
|
<filename>app/models/publishing/gets_licenses.rb
module Publishing::GetsLicenses
def get_license(url)
@licenses ||= {}
if url.blank?
return @resource.default_license&.id || License.public_domain.id
end
return @licenses[url] if @licenses.key?(url)
if (license = License.find_by_source_url(url))
return @licenses[url] = license.id
end
name =
if url =~ /creativecommons.*\/licenses/
"cc-" + url.split('/')[-2]
else
url.split('/').last.titleize
end
license = License.create(name: name, source_url: url, can_be_chosen_by_partners: false)
@licenses[url] = license.id
end
end
|
cclauss/personfinder
|
tests/test_jautils.py
|
<filename>tests/test_jautils.py<gh_stars>1-10
#!/usr/bin/python2.7
# encoding: utf-8
#
# Copyright 2011 Google Inc. All Rights Reserved.
"""Unittest for jautils.py module."""
__author__ = '<EMAIL> (<NAME>)'
import jautils
import unittest
class JaUtilsTests(unittest.TestCase):
def test_should_normalize(self):
assert jautils.should_normalize(u'abc') == False
assert jautils.should_normalize(u' ABC ') == False
assert jautils.should_normalize(u'ABC 012') == False
assert jautils.should_normalize(u'漢字') == False
assert jautils.should_normalize(u'ひらがな') == True
assert jautils.should_normalize(u'カタカナ') == True
assert jautils.should_normalize(u'カタカナ') == True
assert jautils.should_normalize(u'abc') == True
assert jautils.should_normalize(u' ABC ') == True
assert jautils.should_normalize(u'ひらがな カタカナ') == True
def test_normalize(self):
assert jautils.normalize(u'abc') == u'ABC'
assert jautils.normalize(u' ABC ') == u'ABC'
assert jautils.normalize(u'ABC 012') == u'ABC'
assert jautils.normalize(u'漢字') == u'漢字'
assert jautils.normalize(u'ひらがな') == u'ひらがな'
assert jautils.normalize(u'カタカナ') == u'かたかな'
assert jautils.normalize(u'カタカナ') == u'かたかな'
assert jautils.normalize(u'abc') == u'ABC'
assert jautils.normalize(u' ABC ') == u'ABC'
assert jautils.normalize(u'ひらがな カタカナ') == u'ひらがな かたかな'
assert jautils.normalize(u'キミヱ') == u'きみえ'
assert jautils.normalize(u"(abc) O'Hearn") == u'ABC OHEARN'
def test_katakana_to_hiragana(self):
assert jautils.katakana_to_hiragana(u'abc') == u'abc'
assert jautils.katakana_to_hiragana(u'漢字') == u'漢字'
assert jautils.katakana_to_hiragana(u'ひらがな') == u'ひらがな'
assert jautils.katakana_to_hiragana(u'カタカナ') == u'かたかな'
assert jautils.katakana_to_hiragana(u'カタカナ') == u'カタカナ'
assert jautils.katakana_to_hiragana(u'abc') == u'abc'
assert jautils.katakana_to_hiragana(u'キャラメル') == u'きゃらめる'
assert jautils.katakana_to_hiragana(u'ハードル') == u'はーどる'
assert jautils.katakana_to_hiragana(
u'カンダショウタロウ') == u'かんだしょうたろう'
assert jautils.katakana_to_hiragana(
u'エンドウイチオ') == u'えんどういちお'
assert jautils.katakana_to_hiragana(
u'ひらがな カタカナ') == u'ひらがな かたかな'
assert jautils.katakana_to_hiragana(
u'ァィゥェォッャュョヮヶヵ') == \
u'ぁぃぅぇぉっゃゅょゎヶヵ'
assert jautils.katakana_to_hiragana(
u'ガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポヴヰヱ') == \
u'がぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽゔゐゑ'
assert jautils.katakana_to_hiragana(
u'アイウエオカキクケコサシスセソタチツテトナニヌネノ') == \
u'あいうえおかきくけこさしすせそたちつてとなにぬねの'
assert jautils.katakana_to_hiragana(
u'ハヒフヘホマミムメモヤユヨラリルレロワヲンー') == \
u'はひふへほまみむめもやゆよらりるれろわをんー'
def test_normalize_hiragana(self):
assert jautils.normalize_hiragana(u'ぢづゐゑ') == u'じずいえ'
def test_hiragana_to_romaji(self):
assert jautils.hiragana_to_romaji(u'abc') == u'abc'
assert jautils.hiragana_to_romaji(u'漢字') == u'漢字'
assert jautils.hiragana_to_romaji(u'ひらがな') == u'HIRAGANA'
assert jautils.hiragana_to_romaji(u'カタカナ') == u'カタカナ'
assert jautils.hiragana_to_romaji(u'カタカナ') == u'カタカナ'
assert jautils.hiragana_to_romaji(u'abc') == u'abc'
assert jautils.hiragana_to_romaji(u'きゃらめる') == u'KYARAMERU'
assert jautils.hiragana_to_romaji(u'はーどる') == u'HA-DORU'
assert jautils.hiragana_to_romaji(
u'かんだしょうたろう') == u'KANDASHOTARO'
assert jautils.hiragana_to_romaji(
u'えんどういちお') == u'ENDOICHIO'
assert jautils.hiragana_to_romaji(
u'ひらがな カタカナ') == u'HIRAGANA カタカナ'
def test_get_additional_tokens(self):
assert jautils.get_additional_tokens([u'ABC']) == set()
assert jautils.get_additional_tokens(set([u'ABC'])) == set()
assert jautils.get_additional_tokens([u'ABC', u'ひらがな']) == \
set([u'HIRAGANA'])
assert jautils.get_additional_tokens([u'やまだ', u'たろう']) == \
set([u'YAMADA', u'TARO', u'やまだたろう', u'たろうやまだ'])
assert jautils.get_additional_tokens([u'はい', u'やまだ', u'たろう']) == \
set([u'HAI', u'YAMADA', u'TARO'])
def test_sorted_by_popularity(self):
assert jautils.sorted_by_popularity(
[u'山', u'田', u'xxx', u'yyy', u'zzz']) == \
[u'xxx', u'yyy', u'zzz', u'山', u'田']
assert jautils.sorted_by_popularity(
[u'山', u'田', u'はなこ']) == \
[u'はなこ', u'山', u'田']
assert jautils.sorted_by_popularity(
[u'山', u'田', u'龍', u'太', u'郎']) == \
[u'龍', u'太', u'郎', u'山', u'田']
if __name__ == '__main__':
unittest.main()
|
liyong03/YLCleaner
|
YLCleaner/Xcode-RuntimeHeaders/DevToolsCore/PBXAppleScriptBuildPhase.h
|
<filename>YLCleaner/Xcode-RuntimeHeaders/DevToolsCore/PBXAppleScriptBuildPhase.h<gh_stars>1-10
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by <NAME>.
*/
#import <DevToolsCore/PBXBuildPhase.h>
@class NSString;
@interface PBXAppleScriptBuildPhase : PBXBuildPhase
{
BOOL _isSharedContext;
NSString *_contextName;
}
+ (id)archivableAttributes;
+ (id)allowedFileTypes;
+ (id)defaultName;
+ (id)identifier;
- (Class)dependencyGraphSnapshotClass;
- (void)setDefaultAttributesForNewBuildFile:(id)arg1;
- (void)setContextName:(id)arg1;
- (id)contextName;
- (void)setIsDefaultContext:(BOOL)arg1;
- (BOOL)isDefaultContext;
- (void)setIsSharedContext:(BOOL)arg1;
- (BOOL)isSharedContext;
- (void)dealloc;
- (id)init;
- (id)initWithName:(id)arg1;
@end
|
LaudaDev/upp-javna-nabavka
|
src/main/java/activiti/spring/javnaNabavka/deploy/DataInit.java
|
package activiti.spring.javnaNabavka.deploy;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import org.activiti.engine.IdentityService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.User;
import net.sourceforge.yamlbeans.YamlException;
import net.sourceforge.yamlbeans.YamlReader;
/**
* Ucitava korisnike i grupe iz yml fajlova
* Vise o koriscenoj biblioteci: http://yamlbeans.sourceforge.net/
* @author xyz
*
*/
public class DataInit {
private static final String groupsPath ="./src/main/resources/properties/groups.yml";
private static final String usersPath ="./src/main/resources/properties/users.yml";
private static ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
private static IdentityService identityService = processEngine.getIdentityService();
private static Scanner scanner;
/**
* Kreira grupe na osnovu podataka iz yml fajla
*/
@SuppressWarnings("rawtypes")
private static void initGroupsYml(){
YamlReader reader = null;
Map map;
Group newGroup;
try {
reader = new YamlReader(new FileReader(groupsPath));
while (true) {
map = (Map) reader.read();
if (map == null)
break;
newGroup = identityService.newGroup((String) map.get("id"));
newGroup.setName((String) map.get("name"));
newGroup.setType((String) map.get("type"));
identityService.saveGroup(newGroup);
}
} catch (FileNotFoundException e1) {
e1.printStackTrace();
} catch (YamlException e) {
e.printStackTrace();
}
}
/**
* Kreira korisnike i clanstva grupama na osnovu podataka iz yml fajla
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
private static void initUsersYml(){
YamlReader reader = null;
Map map;
User newUser;
try {
reader = new YamlReader(new FileReader(usersPath));
while (true) {
map = (Map) reader.read();
if (map == null)
break;
newUser = identityService.newUser((String) map.get("id"));
newUser.setFirstName((String) map.get("firstName"));
newUser.setLastName((String) map.get("lastName"));
newUser.setEmail((String) map.get("email"));
newUser.setPassword((String) map.get("password"));
identityService.saveUser(newUser);
for (HashMap recordMap : (List<HashMap>) map.get("groups"))
identityService.createMembership(newUser.getId(),(String) recordMap.get("id"));
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (YamlException e) {
e.printStackTrace();
}
}
public static void main(String[] args){
List<Group> groups = identityService.createGroupQuery().list();
List<User> users = identityService.createUserQuery().list();
boolean exists = groups.size() != 0 || users.size() != 0;
if (exists) {
scanner = new Scanner(System.in);
System.out.println("Obrisi postojece korisnike i grupe? [d/n]");
Character ans = scanner.next().charAt(0);
if (ans == 'd') {
for (User u: users)
identityService.deleteUser(u.getId());
for (Group g: groups)
identityService.deleteGroup(g.getId());
}
}
initGroupsYml();
initUsersYml();
System.out.println("Broj grupa: " + identityService.createGroupQuery().count());
System.out.println("Broj korisnika: " + identityService.createUserQuery().count());
System.out.println("Broj korisnika u grupi narucilac: " + identityService.createUserQuery().memberOfGroup("narucilac").count());
System.out.println("Broj korisnika u grupi ponudjac: " + identityService.createUserQuery().memberOfGroup("ponudjac").count());
System.out.println("Broj korisnika u grupi komisija: " + identityService.createUserQuery().memberOfGroup("komisija").count());
System.out.println("Broj korisnika u grupi strucnoLiceZaKomisiju: " + identityService.createUserQuery().memberOfGroup("strucnoLiceZaKomisiju").count());
System.out.println("Broj korisnika u grupi stranoLice: " + identityService.createUserQuery().memberOfGroup("stranoLice").count());
System.out.println("Broj korisnika u grupi pravnik: " + identityService.createUserQuery().memberOfGroup("pravnik").count());
}
}
|
victorguz/piecesphp-modified
|
src/statics/login-and-recovery/js/other-problems.js
|
$(document).ready(function (e) {
let delayHide = 500
let delayShow = 500
let container = $('.form-container')
let systemMail = container.attr('data-system-mail')
if (typeof systemMail == 'string' && systemMail.trim().length > 0) {
systemMail = systemMail.trim()
} else {
systemMail = '<EMAIL>'
}
let containerForm = container.find('[claim]')
let finishContainer = container.find('[finish]')
let messageBox = container.find('[message]')
let form = containerForm.find('form')
let headerMain = $('.container .topbar.one')
let headerFinish = $('.container .topbar.two')
let lang = pcsphpGlobals.lang == pcsphpGlobals.defaultLang ? '' : pcsphpGlobals.lang + '/'
finishContainer.hide()
form.on('submit', function (e) {
e.preventDefault()
let formData = new FormData(form[0])
let request = postRequest(lang + 'users/other-problems', formData)
form.find('.field').addClass('disabled')
request.done(function (res) {
if (res.send_mail === true) {
headerMain.hide(delayHide)
containerForm.hide(delayHide)
headerFinish.show(delayShow)
finishContainer.show(delayShow)
messageBox.html(
formatStr(
_i18n('userProblems', 'Será solucionada muy pronto, por favor verifique su correo en las próximas horas. <br> El correo puede estar en "No deseado", por favor revise la carpeta de Spam. El remitente del correo es <strong>%r</strong>.'),
[
systemMail,
]
)
)
form[0].reset()
} else {
messageBox.html(res.message)
}
})
request.fail(function (jqXHR) {
console.error(jqXHR)
messageBox.html(_i18n('errors', 'unexpected_error_try_later'))
})
request.always(function () {
form.find('.field').removeClass('disabled')
})
return false
})
})
|
dm-drogeriemarkt/selavi
|
src/main/java/de/dm/microservices/controller/ServiceController.java
|
<filename>src/main/java/de/dm/microservices/controller/ServiceController.java
package de.dm.microservices.controller;
import de.dm.microservices.business.ServiceRegistryContentProvider;
import de.dm.microservices.domain.ConsumeDto;
import de.dm.microservices.business.MicroserviceConditioningService;
import de.dm.microservices.domain.MicroserviceDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Collection;
@RestController
@RequestMapping("/services")
public class ServiceController {
private final MicroserviceConditioningService microserviceConditioningService;
private final ServiceRegistryContentProvider serviceRegistryContentProvider;
@Autowired
public ServiceController(MicroserviceConditioningService microserviceConditioningService, ServiceRegistryContentProvider serviceRegistryContentProvider) {
this.microserviceConditioningService = microserviceConditioningService;
this.serviceRegistryContentProvider = serviceRegistryContentProvider;
}
@ApiOperation(value = "Get the names of all available deployment stages (eg, 'dev', 'rls', 'prod', ...)")
@RequestMapping(value = "/stages", method = RequestMethod.GET)
public Collection<String> getAllStageNames() {
return serviceRegistryContentProvider.getAllStageNames();
}
@ApiOperation(value = "Read all microservices from the specified stage of the registry and enrich them with saved additional properties from db.")
@RequestMapping(value = "/{stage}", method = RequestMethod.GET)
public Collection<MicroserviceDto> readAllServices(@PathVariable String stage) {
return microserviceConditioningService.getAllMicroserviceDtos(stage);
}
@ApiOperation(value = "Add a new service as node to add properties and relations to other services.")
@RequestMapping(value = "/{stage}", method = RequestMethod.POST)
public void addNewService(@PathVariable String stage, @RequestBody MicroserviceDto dto) {
microserviceConditioningService.addNewService(stage, dto);
}
@ApiOperation(value = "Add a new property or update an existing. Properties internal properties are not allowed to be set.")
@RequestMapping(value = "/{stage}/{serviceName}/properties", method = RequestMethod.PUT)
public void updateService(@PathVariable String stage, @PathVariable String serviceName, @RequestBody MicroserviceDto dto) {
microserviceConditioningService.updateService(stage, dto);
}
@ApiOperation(value = "Delete a service node. Only manually added and not from the registry loaded are allowed to delete.")
@RequestMapping(value = "/{stage}/{serviceName}", method = RequestMethod.DELETE)
public void deleteService(@PathVariable String stage, @PathVariable String serviceName) {
microserviceConditioningService.deleteService(stage, serviceName);
}
@ApiOperation(value = "Add a new relation between two services.")
@RequestMapping(value = "/{stage}/{serviceName}/relations", method = RequestMethod.POST)
public void addNewRelation(@PathVariable String stage, @PathVariable String serviceName, @RequestBody ConsumeDto consumeDto) {
microserviceConditioningService.addNewRelation(stage, serviceName, consumeDto);
}
@ApiOperation(value = "Delete a relation between two services. If the last relation ist removed, the 'consumes' property will also removed.")
@RequestMapping(value = "/{stage}/{serviceName}/relations/{relatedServiceName}", method = RequestMethod.DELETE)
public void deleteRelation(@PathVariable String stage, @PathVariable String serviceName, @PathVariable String relatedServiceName) {
microserviceConditioningService.deleteRelation(stage, serviceName, relatedServiceName);
}
@ApiOperation(value = "Edit a relation between two services.")
@RequestMapping(value = "/{serviceName}/relations/{consumeDto}", method = RequestMethod.PUT)
public void editRelation(@PathVariable String stage, @PathVariable String serviceName, @RequestBody ConsumeDto consumeDto) {
microserviceConditioningService.editRelation(stage, serviceName, consumeDto);
}
}
|
amitjain-3/working_add
|
deepracer_follow_the_leader_ws/build/deepracer_interfaces_pkg/rosidl_typesupport_fastrtps_c/deepracer_interfaces_pkg/srv/detail/set_status_led_solid_srv__type_support_c.cpp
|
// generated from rosidl_typesupport_fastrtps_c/resource/idl__type_support_c.cpp.em
// with input from deepracer_interfaces_pkg:srv/SetStatusLedSolidSrv.idl
// generated code does not contain a copyright notice
#include "deepracer_interfaces_pkg/srv/detail/set_status_led_solid_srv__rosidl_typesupport_fastrtps_c.h"
#include <cassert>
#include <limits>
#include <string>
#include "rosidl_typesupport_fastrtps_c/identifier.h"
#include "rosidl_typesupport_fastrtps_c/wstring_conversion.hpp"
#include "rosidl_typesupport_fastrtps_cpp/message_type_support.h"
#include "deepracer_interfaces_pkg/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
#include "deepracer_interfaces_pkg/srv/detail/set_status_led_solid_srv__struct.h"
#include "deepracer_interfaces_pkg/srv/detail/set_status_led_solid_srv__functions.h"
#include "fastcdr/Cdr.h"
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# ifdef __clang__
# pragma clang diagnostic ignored "-Wdeprecated-register"
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
# endif
#endif
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
// includes and forward declarations of message dependencies and their conversion functions
#if defined(__cplusplus)
extern "C"
{
#endif
#include "rosidl_runtime_c/string.h" // color
#include "rosidl_runtime_c/string_functions.h" // color
// forward declare type support functions
using _SetStatusLedSolidSrv_Request__ros_msg_type = deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Request;
static bool _SetStatusLedSolidSrv_Request__cdr_serialize(
const void * untyped_ros_message,
eprosima::fastcdr::Cdr & cdr)
{
if (!untyped_ros_message) {
fprintf(stderr, "ros message handle is null\n");
return false;
}
const _SetStatusLedSolidSrv_Request__ros_msg_type * ros_message = static_cast<const _SetStatusLedSolidSrv_Request__ros_msg_type *>(untyped_ros_message);
// Field name: led_index
{
cdr << ros_message->led_index;
}
// Field name: color
{
const rosidl_runtime_c__String * str = &ros_message->color;
if (str->capacity == 0 || str->capacity <= str->size) {
fprintf(stderr, "string capacity not greater than size\n");
return false;
}
if (str->data[str->size] != '\0') {
fprintf(stderr, "string not null-terminated\n");
return false;
}
cdr << str->data;
}
// Field name: hold
{
cdr << ros_message->hold;
}
return true;
}
static bool _SetStatusLedSolidSrv_Request__cdr_deserialize(
eprosima::fastcdr::Cdr & cdr,
void * untyped_ros_message)
{
if (!untyped_ros_message) {
fprintf(stderr, "ros message handle is null\n");
return false;
}
_SetStatusLedSolidSrv_Request__ros_msg_type * ros_message = static_cast<_SetStatusLedSolidSrv_Request__ros_msg_type *>(untyped_ros_message);
// Field name: led_index
{
cdr >> ros_message->led_index;
}
// Field name: color
{
std::string tmp;
cdr >> tmp;
if (!ros_message->color.data) {
rosidl_runtime_c__String__init(&ros_message->color);
}
bool succeeded = rosidl_runtime_c__String__assign(
&ros_message->color,
tmp.c_str());
if (!succeeded) {
fprintf(stderr, "failed to assign string into field 'color'\n");
return false;
}
}
// Field name: hold
{
cdr >> ros_message->hold;
}
return true;
}
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_deepracer_interfaces_pkg
size_t get_serialized_size_deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Request(
const void * untyped_ros_message,
size_t current_alignment)
{
const _SetStatusLedSolidSrv_Request__ros_msg_type * ros_message = static_cast<const _SetStatusLedSolidSrv_Request__ros_msg_type *>(untyped_ros_message);
(void)ros_message;
size_t initial_alignment = current_alignment;
const size_t padding = 4;
const size_t wchar_size = 4;
(void)padding;
(void)wchar_size;
// field.name led_index
{
size_t item_size = sizeof(ros_message->led_index);
current_alignment += item_size +
eprosima::fastcdr::Cdr::alignment(current_alignment, item_size);
}
// field.name color
current_alignment += padding +
eprosima::fastcdr::Cdr::alignment(current_alignment, padding) +
(ros_message->color.size + 1);
// field.name hold
{
size_t item_size = sizeof(ros_message->hold);
current_alignment += item_size +
eprosima::fastcdr::Cdr::alignment(current_alignment, item_size);
}
return current_alignment - initial_alignment;
}
static uint32_t _SetStatusLedSolidSrv_Request__get_serialized_size(const void * untyped_ros_message)
{
return static_cast<uint32_t>(
get_serialized_size_deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Request(
untyped_ros_message, 0));
}
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_deepracer_interfaces_pkg
size_t max_serialized_size_deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Request(
bool & full_bounded,
size_t current_alignment)
{
size_t initial_alignment = current_alignment;
const size_t padding = 4;
const size_t wchar_size = 4;
(void)padding;
(void)wchar_size;
(void)full_bounded;
// member: led_index
{
size_t array_size = 1;
current_alignment += array_size * sizeof(uint32_t) +
eprosima::fastcdr::Cdr::alignment(current_alignment, sizeof(uint32_t));
}
// member: color
{
size_t array_size = 1;
full_bounded = false;
for (size_t index = 0; index < array_size; ++index) {
current_alignment += padding +
eprosima::fastcdr::Cdr::alignment(current_alignment, padding) +
1;
}
}
// member: hold
{
size_t array_size = 1;
current_alignment += array_size * sizeof(uint32_t) +
eprosima::fastcdr::Cdr::alignment(current_alignment, sizeof(uint32_t));
}
return current_alignment - initial_alignment;
}
static size_t _SetStatusLedSolidSrv_Request__max_serialized_size(bool & full_bounded)
{
return max_serialized_size_deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Request(
full_bounded, 0);
}
static message_type_support_callbacks_t __callbacks_SetStatusLedSolidSrv_Request = {
"deepracer_interfaces_pkg::srv",
"SetStatusLedSolidSrv_Request",
_SetStatusLedSolidSrv_Request__cdr_serialize,
_SetStatusLedSolidSrv_Request__cdr_deserialize,
_SetStatusLedSolidSrv_Request__get_serialized_size,
_SetStatusLedSolidSrv_Request__max_serialized_size
};
static rosidl_message_type_support_t _SetStatusLedSolidSrv_Request__type_support = {
rosidl_typesupport_fastrtps_c__identifier,
&__callbacks_SetStatusLedSolidSrv_Request,
get_message_typesupport_handle_function,
};
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, deepracer_interfaces_pkg, srv, SetStatusLedSolidSrv_Request)() {
return &_SetStatusLedSolidSrv_Request__type_support;
}
#if defined(__cplusplus)
}
#endif
// already included above
// #include <cassert>
// already included above
// #include <limits>
// already included above
// #include <string>
// already included above
// #include "rosidl_typesupport_fastrtps_c/identifier.h"
// already included above
// #include "rosidl_typesupport_fastrtps_c/wstring_conversion.hpp"
// already included above
// #include "rosidl_typesupport_fastrtps_cpp/message_type_support.h"
// already included above
// #include "deepracer_interfaces_pkg/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
// already included above
// #include "deepracer_interfaces_pkg/srv/detail/set_status_led_solid_srv__struct.h"
// already included above
// #include "deepracer_interfaces_pkg/srv/detail/set_status_led_solid_srv__functions.h"
// already included above
// #include "fastcdr/Cdr.h"
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-parameter"
# ifdef __clang__
# pragma clang diagnostic ignored "-Wdeprecated-register"
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
# endif
#endif
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
// includes and forward declarations of message dependencies and their conversion functions
#if defined(__cplusplus)
extern "C"
{
#endif
// forward declare type support functions
using _SetStatusLedSolidSrv_Response__ros_msg_type = deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Response;
static bool _SetStatusLedSolidSrv_Response__cdr_serialize(
const void * untyped_ros_message,
eprosima::fastcdr::Cdr & cdr)
{
if (!untyped_ros_message) {
fprintf(stderr, "ros message handle is null\n");
return false;
}
const _SetStatusLedSolidSrv_Response__ros_msg_type * ros_message = static_cast<const _SetStatusLedSolidSrv_Response__ros_msg_type *>(untyped_ros_message);
// Field name: error
{
cdr << ros_message->error;
}
return true;
}
static bool _SetStatusLedSolidSrv_Response__cdr_deserialize(
eprosima::fastcdr::Cdr & cdr,
void * untyped_ros_message)
{
if (!untyped_ros_message) {
fprintf(stderr, "ros message handle is null\n");
return false;
}
_SetStatusLedSolidSrv_Response__ros_msg_type * ros_message = static_cast<_SetStatusLedSolidSrv_Response__ros_msg_type *>(untyped_ros_message);
// Field name: error
{
cdr >> ros_message->error;
}
return true;
}
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_deepracer_interfaces_pkg
size_t get_serialized_size_deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Response(
const void * untyped_ros_message,
size_t current_alignment)
{
const _SetStatusLedSolidSrv_Response__ros_msg_type * ros_message = static_cast<const _SetStatusLedSolidSrv_Response__ros_msg_type *>(untyped_ros_message);
(void)ros_message;
size_t initial_alignment = current_alignment;
const size_t padding = 4;
const size_t wchar_size = 4;
(void)padding;
(void)wchar_size;
// field.name error
{
size_t item_size = sizeof(ros_message->error);
current_alignment += item_size +
eprosima::fastcdr::Cdr::alignment(current_alignment, item_size);
}
return current_alignment - initial_alignment;
}
static uint32_t _SetStatusLedSolidSrv_Response__get_serialized_size(const void * untyped_ros_message)
{
return static_cast<uint32_t>(
get_serialized_size_deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Response(
untyped_ros_message, 0));
}
ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_deepracer_interfaces_pkg
size_t max_serialized_size_deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Response(
bool & full_bounded,
size_t current_alignment)
{
size_t initial_alignment = current_alignment;
const size_t padding = 4;
const size_t wchar_size = 4;
(void)padding;
(void)wchar_size;
(void)full_bounded;
// member: error
{
size_t array_size = 1;
current_alignment += array_size * sizeof(uint32_t) +
eprosima::fastcdr::Cdr::alignment(current_alignment, sizeof(uint32_t));
}
return current_alignment - initial_alignment;
}
static size_t _SetStatusLedSolidSrv_Response__max_serialized_size(bool & full_bounded)
{
return max_serialized_size_deepracer_interfaces_pkg__srv__SetStatusLedSolidSrv_Response(
full_bounded, 0);
}
static message_type_support_callbacks_t __callbacks_SetStatusLedSolidSrv_Response = {
"deepracer_interfaces_pkg::srv",
"SetStatusLedSolidSrv_Response",
_SetStatusLedSolidSrv_Response__cdr_serialize,
_SetStatusLedSolidSrv_Response__cdr_deserialize,
_SetStatusLedSolidSrv_Response__get_serialized_size,
_SetStatusLedSolidSrv_Response__max_serialized_size
};
static rosidl_message_type_support_t _SetStatusLedSolidSrv_Response__type_support = {
rosidl_typesupport_fastrtps_c__identifier,
&__callbacks_SetStatusLedSolidSrv_Response,
get_message_typesupport_handle_function,
};
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, deepracer_interfaces_pkg, srv, SetStatusLedSolidSrv_Response)() {
return &_SetStatusLedSolidSrv_Response__type_support;
}
#if defined(__cplusplus)
}
#endif
#include "rosidl_typesupport_fastrtps_cpp/service_type_support.h"
#include "rosidl_typesupport_cpp/service_type_support.hpp"
// already included above
// #include "rosidl_typesupport_fastrtps_c/identifier.h"
// already included above
// #include "deepracer_interfaces_pkg/msg/rosidl_typesupport_fastrtps_c__visibility_control.h"
#include "deepracer_interfaces_pkg/srv/set_status_led_solid_srv.h"
#if defined(__cplusplus)
extern "C"
{
#endif
static service_type_support_callbacks_t SetStatusLedSolidSrv__callbacks = {
"deepracer_interfaces_pkg::srv",
"SetStatusLedSolidSrv",
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, deepracer_interfaces_pkg, srv, SetStatusLedSolidSrv_Request)(),
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, deepracer_interfaces_pkg, srv, SetStatusLedSolidSrv_Response)(),
};
static rosidl_service_type_support_t SetStatusLedSolidSrv__handle = {
rosidl_typesupport_fastrtps_c__identifier,
&SetStatusLedSolidSrv__callbacks,
get_service_typesupport_handle_function,
};
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, deepracer_interfaces_pkg, srv, SetStatusLedSolidSrv)() {
return &SetStatusLedSolidSrv__handle;
}
#if defined(__cplusplus)
}
#endif
|
Delvers-of-Fate/delverengine
|
Dungeoneer/src/com/interrupt/dungeoneer/entities/projectiles/Projectile.java
|
<gh_stars>1-10
package com.interrupt.dungeoneer.entities.projectiles;
import java.util.Random;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.collision.Ray;
import com.badlogic.gdx.utils.Array;
import com.interrupt.dungeoneer.GameManager;
import com.interrupt.dungeoneer.collision.Collidor;
import com.interrupt.dungeoneer.entities.Actor;
import com.interrupt.dungeoneer.entities.Entity;
import com.interrupt.dungeoneer.entities.Particle;
import com.interrupt.dungeoneer.entities.Player;
import com.interrupt.dungeoneer.entities.ProjectedDecal;
import com.interrupt.dungeoneer.entities.items.Weapon.DamageType;
import com.interrupt.dungeoneer.game.Game;
import com.interrupt.dungeoneer.game.Level;
import com.interrupt.dungeoneer.game.Options;
import com.interrupt.dungeoneer.gfx.drawables.DrawableSprite;
import com.interrupt.dungeoneer.tiles.Tile;
public class Projectile extends Entity {
public int origtex;
public float speed = 0.3f;
public transient Entity owner = null;
public int damage = 3;
public float knockback = 0.1f;
public Float destroyTimer = null;
public Float destroyDelay = null;
public DamageType damageType;
public boolean destroyOnEntityHit = true;
private transient boolean didCollide = false;
public ProjectedDecal hitDecal = new ProjectedDecal(ArtType.sprite, 19, 0.6f);
public String hitSound = "mg_green_impact_01.mp3,mg_green_impact_02.mp3,mg_green_impact_03.mp3,mg_green_impact_04.mp3";
private boolean sweepCollision = true;
private transient Array<Entity> hasHit = new Array<Entity>();
public boolean makeHitParticles = true;
public Projectile() { canStepUpOn = false; }
public Projectile(float x, float y, float z, int tex, float xa, float za, int damage, DamageType damageType, Entity owner) {
super(x, y, tex, true);
this.z = z + 0.1f;
artType = ArtType.sprite;
origtex = tex;
floating = false;
isSolid = false;
this.xa = xa;
this.ya = za;
this.owner = owner;
this.damage = damage;
this.damageType = damageType;
if(owner == null || (owner instanceof Player)) ignorePlayerCollision = true;
collision.set(0.1f, 0.1f, 0.5f);
canStepUpOn = false;
}
@Override
public void tick(Level level, float delta)
{
// center projectiles within the collision box
yOffset = -0.5f + collision.z / 2f;
if(xa == 0 && ya == 0) return;
if(destroyTimer != null) {
if(destroyTimer > 0) {
destroyTimer -= 1 * delta;
onTick(delta);
}
else {
onDestroy();
isActive = false;
}
return;
}
// Add gravity
if(!floating) za -= 0.0035f * delta;
didCollide = false;
float collisionSweeps = 1f;
if(sweepCollision) {
float moveMax = Math.max(Math.abs(za * delta), Math.max(Math.abs(xa * delta), Math.abs(ya * delta)));
collisionSweeps = (collision.x * 2f) / moveMax;
collisionSweeps = Math.round(1f / collisionSweeps);
if(collisionSweeps != 0)
collisionSweeps = 1f / collisionSweeps;
else
collisionSweeps = 1;
}
for(float i = collisionSweeps; i <= 1; i += collisionSweeps) {
float nextx = x + (xa * delta) * i;
float nexty = y + (ya * delta) * i;
float nextz = z + (za * delta) * i;
if (level.isFree(nextx, nexty, nextz, collision, 0, false, null)) {
Entity encroaching = level.checkEntityCollision(nextx, y, nextz, collision, null, this);
if(encroaching instanceof Projectile && ((Projectile) encroaching).owner == owner) {
// ignore this
break;
}
else if(encroaching != null && owner != encroaching && !hasHit.contains(encroaching, true)) {
encroached(encroaching);
if(!encroaching.isDynamic || destroyOnEntityHit) {
didCollide = true;
break;
}
}
}
else {
encroached(nextx, nexty);
didCollide = true;
break;
}
}
lastZ = z;
if(!didCollide) {
x += xa * delta;
y += ya * delta;
z += za * delta;
}
if(isActive) {
onTick(delta);
// should we make a water splash?
Tile cTile = level.getTile((int)Math.floor(x), (int)Math.floor(y));
if(cTile.data.isWater && z < cTile.floorHeight + 0.32f)
{
if(lastZ >= cTile.floorHeight + 0.32f) {
splash(level, cTile.floorHeight + 0.5f, true, cTile);
}
}
}
// drawable stuff
if(drawable != null && drawable instanceof DrawableSprite) {
DrawableSprite drbl = (DrawableSprite) drawable;
drbl.tex = tex;
drbl.artType = artType;
drbl.fullbrite = fullbrite;
drbl.yOffset = yOffset;
drbl.color = color;
}
if(drawable == null) {
drawable = new DrawableSprite(tex, artType);
}
tickAttached(level, delta);
}
public void encroached(Player player)
{
if(isActive && player != owner) {
hitEffect();
player.hit(xa, ya, damage, knockback, damageType, owner);
if(destroyOnEntityHit)
destroy();
else
hasHit.add(player);
}
}
public void encroached(Entity hit)
{
if(isActive && hit != owner)
{
hitEffect();
hit.hit(xa, ya, damage, knockback, damageType, owner);
if(destroyOnEntityHit || !(hit instanceof Actor))
destroy();
else
hasHit.add(hit);
}
}
@Override
public void hit(float xa, float ya, int damage, float force, DamageType damageType, Entity instigator) {
if(destroyOnEntityHit) {
hitEffect();
destroy();
}
}
public void encroached(float hitx, float hity)
{
hitEffect();
destroy();
}
// Override this for stuff like dynamic lighting
public void onTick(float delta) { }
// Override this to make explosion effects
public void hitEffect()
{
if(!isActive) return;
if(makeHitParticles) {
Level level = Game.GetLevel();
Random r = new Random();
int particleCount = 6;
particleCount *= Options.instance.gfxQuality;
for(int i = 0; i < particleCount; i++)
{
level.SpawnNonCollidingEntity( new Particle(x - xa, y - ya, z + 0.1f - za * 2, r.nextFloat() * 0.01f - 0.005f, r.nextFloat() * 0.01f - 0.005f, r.nextFloat() * 0.01f - 0.005f, 0, Color.GRAY, false)) ;
}
}
makeHitDecal();
}
public void makeHitDecal() {
if(hitDecal != null) {
Vector3 intersectionHolder = new Vector3();
Vector3 normalHolder = new Vector3();
// try to find the hit normal
Ray ray = new Ray(new Vector3(x,z + yOffset,y), new Vector3((float)xa, (float)za, (float)ya).nor());
if(Collidor.intersectRayTriangles(ray, GameManager.renderer.GetCollisionTrianglesAlong(ray, 2f), intersectionHolder, normalHolder)) {
hitDecal.direction = new Vector3(normalHolder.x,normalHolder.z,normalHolder.y).scl(-1f);
hitDecal.x = intersectionHolder.x + normalHolder.x * 0.1f;
hitDecal.y = intersectionHolder.z + normalHolder.z * 0.1f;
hitDecal.z = intersectionHolder.y + normalHolder.y * 0.1f;
hitDecal.start = 0.001f;
hitDecal.end = 0.5f;
hitDecal.roll = Game.rand.nextFloat() * 360f;
}
else {
hitDecal.direction = new Vector3((float)xa, (float)ya, (float)za).nor();
hitDecal.x = x;
hitDecal.y = y;
hitDecal.z = z + yOffset;
hitDecal.roll = Game.rand.nextFloat() * 360f;
hitDecal.end = 1f;
hitDecal.start = 0.01f;
}
Game.instance.level.entities.add(hitDecal);
}
}
public void destroy() {
isSolid = false;
if(destroyDelay != null) destroyTimer = destroyDelay;
else {
onDestroy();
isActive = false;
}
}
@Override
public void updateDrawable() {
yOffset = -0.5f + collision.z / 2f;
super.updateDrawable();
}
// Override this to hide lights and stuff
public void onDestroy() {
}
}
|
semyont/datacollector
|
mapreduce-protolib/src/main/java/com/streamsets/pipeline/stage/destination/mapreduce/jobtype/avroparquet/AvroParquetConvertCreator.java
|
<reponame>semyont/datacollector<filename>mapreduce-protolib/src/main/java/com/streamsets/pipeline/stage/destination/mapreduce/jobtype/avroparquet/AvroParquetConvertCreator.java
/**
* Copyright 2016 StreamSets Inc.
*
* Licensed under the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.streamsets.pipeline.stage.destination.mapreduce.jobtype.avroparquet;
import com.streamsets.pipeline.stage.destination.mapreduce.MapreduceUtils;
import org.apache.avro.mapred.FsInput;
import org.apache.hadoop.conf.Configurable;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.output.NullOutputFormat;
import org.apache.parquet.SemanticVersion;
import org.apache.parquet.avro.AvroParquetWriter;
import org.apache.parquet.bytes.BytesInput;
import org.apache.parquet.column.ParquetProperties;
import org.apache.parquet.format.CompressionCodec;
import org.apache.parquet.hadoop.ParquetWriter;
import java.util.concurrent.Callable;
public class AvroParquetConvertCreator implements Configurable, Callable<Job> {
Configuration conf;
@Override
public void setConf(Configuration configuration) {
this.conf = configuration;
}
@Override
public Configuration getConf() {
return conf;
}
@Override
public Job call() throws Exception {
// We're explicitly disabling speculative execution
conf.set("mapreduce.map.speculative", "false");
MapreduceUtils.addJarsToJob(conf,
SemanticVersion.class,
ParquetWriter.class,
AvroParquetWriter.class,
FsInput.class,
CompressionCodec.class,
ParquetProperties.class,
BytesInput.class
);
Job job = Job.getInstance(conf);
// IO formats
job.setInputFormatClass(AvroParquetInputFormat.class);
job.setOutputFormatClass(NullOutputFormat.class);
// Mapper & job output
job.setMapperClass(AvroParquetConvertMapper.class);
job.setOutputKeyClass(NullWritable.class);
job.setOutputValueClass(NullWritable.class);
// It's map only job
job.setNumReduceTasks(0);
// General configuration
job.setJarByClass(getClass());
return job;
}
}
|
oliveiradev27/JSONPlaceholder-Android-Client
|
app/src/main/java/br/dev/oliveira/jsonplaceholderclient/utils/network/HttpRequest.java
|
package br.dev.oliveira.jsonplaceholderclient.utils.network;
import android.content.Context;
import android.util.Log;
import com.android.volley.AuthFailureError;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import java.io.UnsupportedEncodingException;
import br.dev.oliveira.jsonplaceholderclient.constants.NetworkConstants;
import br.dev.oliveira.jsonplaceholderclient.listeners.OnResponseRequestListener;
public class HttpRequest {
private static RequestQueue mRequestQueue;
private HttpRequest() {
}
public static void initialize(Context context) {
if (mRequestQueue == null)
mRequestQueue = Volley.newRequestQueue(context);
}
public static void doPost(
final String url,
final String requestBody,
final OnResponseRequestListener listener) {
//final String body = "{\"name\": \"morpheus\", \"job\": \"leader\"}";
StringRequest stringRequest = new StringRequest(
Request.Method.POST,
NetworkConstants.ROOT + url,
//"https://reqres.in/api/users",
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
listener.onSuccess(response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
listener.onError(error);
error.printStackTrace();
}
}) {
@Override
public String getBodyContentType() {
return "application/json; charset=UTF-8";
}
@Override
public byte[] getBody() throws AuthFailureError {
try {
Log.d("JSONPlaceholder", "Json enviado na requisição: " + requestBody);
return requestBody.getBytes("utf-8");
//return body.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return null;
}
}
};
mRequestQueue.add(stringRequest);
}
public static void doGet(final String url, final OnResponseRequestListener listener) {
StringRequest stringRequest = new StringRequest(
Request.Method.GET,
NetworkConstants.ROOT + url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
listener.onSuccess(response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
listener.onError(error);
error.printStackTrace();
}
});
mRequestQueue.add(stringRequest);
}
public static void doPut(
final String url,
final String requestBody,
final OnResponseRequestListener listener
) {
StringRequest stringRequest = new StringRequest(
Request.Method.PUT,
NetworkConstants.ROOT + url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
listener.onSuccess(response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
listener.onError(error);
error.printStackTrace();
}
}) {
@Override
public String getBodyContentType() {
return NetworkConstants.CONTENT_TYPE;
}
@Override
public byte[] getBody() throws AuthFailureError {
final byte[] body = requestBody.getBytes();
if (body != null) {
return body;
}
return super.getBody();
}
};
mRequestQueue.add(stringRequest);
}
public static void doDelete(final String url, final OnResponseRequestListener listener) {
StringRequest stringRequest = new StringRequest(
Request.Method.DELETE,
NetworkConstants.ROOT + url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
listener.onSuccess(response);
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
listener.onError(error);
error.printStackTrace();
}
});
mRequestQueue.add(stringRequest);
}
}
|
leanovate/jbj
|
core/src/test/scala/de/leanovate/jbj/core/tests/classes/InheritanceSpec.scala
|
<reponame>leanovate/jbj
/* _ _ _ *\
** (_) |__ (_) License: MIT (2013) **
** | | _ \| | http://opensource.org/licenses/MIT **
** | | |_) | | **
** _/ |____// | Author: <NAME> **
\* |__/ |__/ (Tests based on PHP) */
package de.leanovate.jbj.core.tests.classes
import de.leanovate.jbj.core.tests.TestJbjExecutor
import org.specs2.mutable.SpecificationWithJUnit
class InheritanceSpec extends SpecificationWithJUnit with TestJbjExecutor {
"Inheritance" should {
"Classes inheritance test" in {
// classes/inheritance
script(
"""<?php
|
|/* Inheritance test. Pretty nifty if I do say so myself! */
|
|class foo {
| public $a;
| public $b;
| function display() {
| echo "This is class foo\n";
| echo "a = ".$this->a."\n";
| echo "b = ".$this->b."\n";
| }
| function mul() {
| return $this->a*$this->b;
| }
|};
|
|class bar extends foo {
| public $c;
| function display() { /* alternative display function for class bar */
| echo "This is class bar\n";
| echo "a = ".$this->a."\n";
| echo "b = ".$this->b."\n";
| echo "c = ".$this->c."\n";
| }
|};
|
|
|$foo1 = new foo;
|$foo1->a = 2;
|$foo1->b = 5;
|$foo1->display();
|echo $foo1->mul()."\n";
|
|echo "-----\n";
|
|$bar1 = new bar;
|$bar1->a = 4;
|$bar1->b = 3;
|$bar1->c = 12;
|$bar1->display();
|echo $bar1->mul()."\n";""".stripMargin
).result must haveOutput(
"""This is class foo
|a = 2
|b = 5
|10
|-----
|This is class bar
|a = 4
|b = 3
|c = 12
|12
|""".stripMargin
)
}
"ZE2 Constructor precedence" in {
// classes/inheritance_002.phpt
script(
"""<?php
|class Base_php4 {
| function Base_php4() {
| var_dump('Base constructor');
| }
|}
|
|class Child_php4 extends Base_php4 {
| function Child_php4() {
| var_dump('Child constructor');
| parent::Base_php4();
| }
|}
|
|class Base_php5 {
| function __construct() {
| var_dump('Base constructor');
| }
| }
|
|class Child_php5 extends Base_php5 {
| function __construct() {
| var_dump('Child constructor');
| parent::__construct();
| }
| }
|
|class Child_mx1 extends Base_php4 {
| function __construct() {
| var_dump('Child constructor');
| parent::Base_php4();
| }
|}
|
|class Child_mx2 extends Base_php5 {
| function Child_mx2() {
| var_dump('Child constructor');
| parent::__construct();
| }
|}
|
|echo "### PHP 4 style\n";
|$c4= new Child_php4();
|
|echo "### PHP 5 style\n";
|$c5= new Child_php5();
|
|echo "### Mixed style 1\n";
|$cm= new Child_mx1();
|
|echo "### Mixed style 2\n";
|$cm= new Child_mx2();
|?>
|""".stripMargin
).result must haveOutput(
"""### PHP 4 style
|string(17) "Child constructor"
|string(16) "Base constructor"
|### PHP 5 style
|string(17) "Child constructor"
|string(16) "Base constructor"
|### Mixed style 1
|string(17) "Child constructor"
|string(16) "Base constructor"
|### Mixed style 2
|string(17) "Child constructor"
|string(16) "Base constructor"
|""".stripMargin
)
}
"ZE2 method inheritance without interfaces" in {
// classes/inheritance_003.phpt
script(
"""<?php
|
|class A
|{
| function f($x) {}
|}
|
|class B extends A
|{
| function f() {}
|}
|
|?>
|===DONE===
|""".stripMargin
).result must haveOutput(
"""
|Strict Standards: Declaration of B::f() should be compatible with A::f($x) in /classes/InheritanceSpec.inlinePhp on line 10
|===DONE===
|""".stripMargin
)
}
"ZE2 method inheritance without interfaces" in {
// classes/inheritance_004.phpt
script(
"""<?php
|
|class A
|{
| function f() {}
|}
|
|class B extends A
|{
| function f($x) {}
|}
|
|?>
|===DONE===
|""".stripMargin
).result must haveOutput(
"""
|Strict Standards: Declaration of B::f() should be compatible with A::f() in /classes/InheritanceSpec.inlinePhp on line 10
|===DONE===
|""".stripMargin
)
}
"Check for inherited old-style constructor." in {
// classes/inheritance_005.phpt
script(
"""<?php
| class A
| {
| function A()
| {
| echo "In " . __METHOD__ . "\n";
| }
| }
|
| class B extends A
| {
| }
|
| class C extends B
| {
| }
|
|
| echo "About to construct new B:\n";
| $b = new B;
|
| echo "Is B::B() callable?\n";
| var_dump(is_callable(array($b, "B")));
|
| echo "Is B::A() callable?\n";
| var_dump(is_callable(array($b, "A")));
|
| echo "About to construct new C:\n";
| $c = new C;
|
| echo "Is C::A() callable?\n";
| var_dump(is_callable(array($c, "A")));
|
| echo "Is C::B() callable?\n";
| var_dump(is_callable(array($c, "B")));
|
| echo "Is C::C() callable?\n";
| var_dump(is_callable(array($c, "C")));
|?>
|""".stripMargin
).result must haveOutput(
"""About to construct new B:
|In A::A
|Is B::B() callable?
|bool(false)
|Is B::A() callable?
|bool(true)
|About to construct new C:
|In A::A
|Is C::A() callable?
|bool(true)
|Is C::B() callable?
|bool(false)
|Is C::C() callable?
|bool(false)
|""".stripMargin
)
}
"Private property inheritance check" in {
// classes/inheritance_006.phpt
script(
"""<?php
|Class A {
| private $c;
|}
|
|Class B extends A {
| private $c;
|}
|
|Class C extends B {
|}
|
|var_dump(new C);
|?>
|""".stripMargin
).result must haveOutput(
"""object(C)#1 (2) {
| ["c":"B":private]=>
| NULL
| ["c":"A":private]=>
| NULL
|}
|""".stripMargin
)
}
}
}
|
amorriscode/tavern
|
web/src/components/Modal/Modal.js
|
<gh_stars>1-10
import { useState, useEffect, useRef } from 'react'
import { RiCloseLine } from 'react-icons/ri'
import useOnClickOutside from 'src/hooks/useOnClickOutside'
import Portal from 'src/components/Portal'
const Modal = ({ children, open, onModalClose }) => {
const ref = useRef(null)
const [isOpen, setIsOpen] = useState(false)
useEffect(() => {
setIsOpen(open)
}, [open])
const handleClose = () => {
setIsOpen(false)
if (onModalClose) {
onModalClose()
}
}
useOnClickOutside(ref, handleClose)
return (
<>
{isOpen && (
<Portal selector="body">
<div className="z-50 fixed top-0 bottom-0 left-0 right-0 flex justify-center items-center px-5 bg-black bg-opacity-5">
<div
className="p-10 bg-white rounded-sm border-2 border-brand-purple relative"
ref={ref}
>
<RiCloseLine
className="absolute top-0 right-0 m-1 hover:cursor-pointer hover:text-gray-600 text-2xl"
onClick={handleClose}
/>
{children}
</div>
</div>
</Portal>
)}
</>
)
}
export default Modal
|
unendin/allennlp
|
tests/models/coreference_resolution/coref_test.py
|
<reponame>unendin/allennlp
# pylint: disable=no-self-use,invalid-name
import torch
from torch.autograd import Variable
from allennlp.common.testing import ModelTestCase
class CorefTest(ModelTestCase):
def setUp(self):
super(CorefTest, self).setUp()
self.set_up_model('tests/fixtures/coref/experiment.json',
'tests/fixtures/coref/coref.gold_conll')
def test_coref_model_can_train_save_and_load(self):
self.ensure_model_can_train_save_and_load(self.param_file)
def test_decode(self):
spans = torch.LongTensor([[1, 2],
[3, 4],
[3, 7],
[5, 6],
[14, 56],
[17, 80]])
antecedent_indices = torch.LongTensor([[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0],
[2, 1, 0, 0, 0, 0],
[3, 2, 1, 0, 0, 0],
[4, 3, 2, 1, 0, 0]])
spans = Variable(spans.unsqueeze(0))
antecedent_indices = Variable(antecedent_indices)
# Indices into ``antecedent_indices`` indicating the predicted antecedent
# index in ``top_spans``.
predicted_antecedents = torch.LongTensor([-1, 0, -1, -1, 1, 3])
predicted_antecedents = Variable(predicted_antecedents.unsqueeze(0))
output_dict = {
"top_spans": spans,
"antecedent_indices": antecedent_indices,
"predicted_antecedents": predicted_antecedents
}
output = self.model.decode(output_dict)
clusters = output["clusters"][0]
gold1 = [(1, 2), (3, 4), (17, 80)]
gold2 = [(3, 7), (14, 56)]
assert len(clusters) == 2
assert gold1 in clusters
assert gold2 in clusters
|
anthonykempka/Integrity-Instruments-Products
|
Software/Device-Drivers/USBM400_SYS/bulkdev.c
|
/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
bulkdev.c
Abstract:
This file contains dispatch routines for create,
close and selective suspend.
The selective suspend feature is enabled if
the SSRegistryEnable key in the registry is set to 1.
Environment:
Kernel mode
Notes:
Copyright (c) 2000 Microsoft Corporation.
All Rights Reserved.
--*/
#include "bulkusb.h"
#include "bulkpnp.h"
#include "bulkpwr.h"
#include "bulkdev.h"
#include "bulkusr.h"
#include "bulkwmi.h"
#include "bulkrwr.h"
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, BulkUsb_DispatchCreate)
#pragma alloc_text(PAGE, BulkUsb_DispatchClose)
#endif
NTSTATUS
BulkUsb_DispatchCreate(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
/*++
Routine Description:
Dispatch routine for create.
Arguments:
DeviceObject - pointer to device object
Irp - I/O request packet.
Return Value:
NT status value
--*/
{
ULONG i;
NTSTATUS ntStatus;
PFILE_OBJECT fileObject;
PDEVICE_EXTENSION deviceExtension;
PIO_STACK_LOCATION irpStack;
PBULKUSB_PIPE_CONTEXT pipeContext;
PUSBD_INTERFACE_INFORMATION interface;
PAGED_CODE();
BulkUsb_DbgPrint(3, ("BulkUsb_DispatchCreate - begins\n"));
//
// initialize variables
//
irpStack = IoGetCurrentIrpStackLocation(Irp);
fileObject = irpStack->FileObject;
deviceExtension = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
if(deviceExtension->DeviceState != Working) {
ntStatus = STATUS_INVALID_DEVICE_STATE;
goto BulkUsb_DispatchCreate_Exit;
}
if(deviceExtension->UsbInterface) {
interface = deviceExtension->UsbInterface;
}
else {
BulkUsb_DbgPrint(1, ("UsbInterface not found\n"));
ntStatus = STATUS_INVALID_DEVICE_STATE;
goto BulkUsb_DispatchCreate_Exit;
}
//
// FsContext is Null for the device
//
if(fileObject) {
fileObject->FsContext = NULL;
}
else {
ntStatus = STATUS_INVALID_PARAMETER;
goto BulkUsb_DispatchCreate_Exit;
}
if(0 == fileObject->FileName.Length) {
//
// opening a device as opposed to pipe.
//
ntStatus = STATUS_SUCCESS;
InterlockedIncrement(&deviceExtension->OpenHandleCount);
//
// the device is idle if it has no open handles or pending PnP Irps
// since we just received an open handle request, cancel idle req.
//
if(deviceExtension->SSEnable) {
CancelSelectSuspend(deviceExtension);
}
goto BulkUsb_DispatchCreate_Exit;
}
pipeContext = BulkUsb_PipeWithName(DeviceObject, &fileObject->FileName);
if(pipeContext == NULL) {
ntStatus = STATUS_INVALID_PARAMETER;
goto BulkUsb_DispatchCreate_Exit;
}
ntStatus = STATUS_INVALID_PARAMETER;
for(i=0; i<interface->NumberOfPipes; i++) {
if(pipeContext == &deviceExtension->PipeContext[i]) {
//
// found a match
//
BulkUsb_DbgPrint(3, ("open pipe %d\n", i));
fileObject->FsContext = &interface->Pipes[i];
ASSERT(fileObject->FsContext);
pipeContext->PipeOpen = TRUE;
ntStatus = STATUS_SUCCESS;
//
// increment OpenHandleCounts
//
InterlockedIncrement(&deviceExtension->OpenHandleCount);
//
// the device is idle if it has no open handles or pending PnP Irps
// since we just received an open handle request, cancel idle req.
//
if(deviceExtension->SSEnable) {
CancelSelectSuspend(deviceExtension);
}
}
}
BulkUsb_DispatchCreate_Exit:
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
BulkUsb_DbgPrint(3, ("BulkUsb_DispatchCreate - ends\n"));
return ntStatus;
}
NTSTATUS
BulkUsb_DispatchClose(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
/*++
Routine Description:
Dispatch routine for close.
Arguments:
DeviceObject - pointer to device object
Irp - I/O request packet
Return Value:
NT status value
--*/
{
NTSTATUS ntStatus;
PFILE_OBJECT fileObject;
PDEVICE_EXTENSION deviceExtension;
PIO_STACK_LOCATION irpStack;
PBULKUSB_PIPE_CONTEXT pipeContext;
PUSBD_PIPE_INFORMATION pipeInformation;
PAGED_CODE();
//
// initialize variables
//
irpStack = IoGetCurrentIrpStackLocation(Irp);
fileObject = irpStack->FileObject;
pipeContext = NULL;
pipeInformation = NULL;
deviceExtension = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
BulkUsb_DbgPrint(3, ("BulkUsb_DispatchClose - begins\n"));
if(fileObject && fileObject->FsContext) {
pipeInformation = fileObject->FsContext;
if(0 != fileObject->FileName.Length) {
pipeContext = BulkUsb_PipeWithName(DeviceObject,
&fileObject->FileName);
}
if(pipeContext && pipeContext->PipeOpen) {
pipeContext->PipeOpen = FALSE;
}
}
//
// set ntStatus to STATUS_SUCCESS
//
ntStatus = STATUS_SUCCESS;
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
InterlockedDecrement(&deviceExtension->OpenHandleCount);
BulkUsb_DbgPrint(3, ("BulkUsb_DispatchClose - ends\n"));
return ntStatus;
}
NTSTATUS
BulkUsb_DispatchDevCtrl(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)
/*++
Routine Description:
Dispatch routine for IRP_MJ_DEVICE_CONTROL
Arguments:
DeviceObject - pointer to device object
Irp - I/O request packet
Return Value:
NT status value
--*/
{
ULONG code;
PVOID ioBuffer;
ULONG inputBufferLength;
ULONG outputBufferLength;
ULONG info;
NTSTATUS ntStatus;
PDEVICE_EXTENSION deviceExtension;
PIO_STACK_LOCATION irpStack;
//
// initialize variables
//
info = 0;
irpStack = IoGetCurrentIrpStackLocation(Irp);
code = irpStack->Parameters.DeviceIoControl.IoControlCode;
deviceExtension = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
ioBuffer = Irp->AssociatedIrp.SystemBuffer;
inputBufferLength = irpStack->Parameters.DeviceIoControl.InputBufferLength;
outputBufferLength = irpStack->Parameters.DeviceIoControl.OutputBufferLength;
if(deviceExtension->DeviceState != Working) {
BulkUsb_DbgPrint(1, ("Invalid device state\n"));
Irp->IoStatus.Status = ntStatus = STATUS_INVALID_DEVICE_STATE;
Irp->IoStatus.Information = info;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return ntStatus;
}
BulkUsb_DbgPrint(3, ("BulkUsb_DispatchDevCtrl::"));
BulkUsb_IoIncrement(deviceExtension);
//
// It is true that the client driver cancelled the selective suspend
// request in the dispatch routine for create.
// But there is no guarantee that it has indeed been completed.
// so wait on the NoIdleReqPendEvent and proceed only if this event
// is signalled.
//
BulkUsb_DbgPrint(3, ("Waiting on the IdleReqPendEvent\n"));
//
// make sure that the selective suspend request has been completed.
//
if(deviceExtension->SSEnable) {
KeWaitForSingleObject(&deviceExtension->NoIdleReqPendEvent,
Executive,
KernelMode,
FALSE,
NULL);
}
switch(code) {
case IOCTL_BULKUSB_RESET_PIPE:
{
PFILE_OBJECT fileObject;
PUSBD_PIPE_INFORMATION pipe;
pipe = NULL;
fileObject = NULL;
//
// FileObject is the address of the kernel file object to
// which the IRP is directed. Drivers use the FileObject
// to correlate IRPs in a queue.
//
fileObject = irpStack->FileObject;
if(fileObject == NULL) {
ntStatus = STATUS_INVALID_PARAMETER;
break;
}
pipe = (PUSBD_PIPE_INFORMATION) fileObject->FsContext;
if(pipe == NULL) {
ntStatus = STATUS_INVALID_PARAMETER;
}
else {
ntStatus = BulkUsb_ResetPipe(DeviceObject, pipe);
}
break;
}
case IOCTL_BULKUSB_GET_CONFIG_DESCRIPTOR:
{
ULONG length;
if(deviceExtension->UsbConfigurationDescriptor) {
length = deviceExtension->UsbConfigurationDescriptor->wTotalLength;
if(outputBufferLength >= length) {
RtlCopyMemory(ioBuffer,
deviceExtension->UsbConfigurationDescriptor,
length);
info = length;
ntStatus = STATUS_SUCCESS;
}
else {
ntStatus = STATUS_BUFFER_TOO_SMALL;
}
}
else {
ntStatus = STATUS_UNSUCCESSFUL;
}
break;
}
case IOCTL_BULKUSB_RESET_DEVICE:
ntStatus = BulkUsb_ResetDevice(DeviceObject);
break;
default :
ntStatus = STATUS_INVALID_DEVICE_REQUEST;
break;
}
Irp->IoStatus.Status = ntStatus;
Irp->IoStatus.Information = info;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
BulkUsb_DbgPrint(3, ("BulkUsb_DispatchDevCtrl::"));
BulkUsb_IoDecrement(deviceExtension);
return ntStatus;
}
NTSTATUS
BulkUsb_ResetPipe(
IN PDEVICE_OBJECT DeviceObject,
IN PUSBD_PIPE_INFORMATION PipeInfo
)
/*++
Routine Description:
This routine synchronously submits a URB_FUNCTION_RESET_PIPE
request down the stack.
Arguments:
DeviceObject - pointer to device object
PipeInfo - pointer to PipeInformation structure
to retrieve the pipe handle
Return Value:
NT status value
--*/
{
PURB urb;
NTSTATUS ntStatus;
PDEVICE_EXTENSION deviceExtension;
//
// initialize variables
//
urb = NULL;
deviceExtension = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
urb = ExAllocatePool(NonPagedPool,
sizeof(struct _URB_PIPE_REQUEST));
if(urb) {
urb->UrbHeader.Length = (USHORT) sizeof(struct _URB_PIPE_REQUEST);
urb->UrbHeader.Function = URB_FUNCTION_RESET_PIPE;
urb->UrbPipeRequest.PipeHandle = PipeInfo->PipeHandle;
ntStatus = CallUSBD(DeviceObject, urb);
ExFreePool(urb);
}
else {
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
}
if(NT_SUCCESS(ntStatus)) {
BulkUsb_DbgPrint(3, ("BulkUsb_ResetPipe - success\n"));
ntStatus = STATUS_SUCCESS;
}
else {
BulkUsb_DbgPrint(1, ("BulkUsb_ResetPipe - failed\n"));
}
return ntStatus;
}
NTSTATUS
BulkUsb_ResetDevice(
IN PDEVICE_OBJECT DeviceObject
)
/*++
Routine Description:
This routine invokes BulkUsb_ResetParentPort to reset the device
Arguments:
DeviceObject - pointer to device object
Return Value:
NT status value
--*/
{
NTSTATUS ntStatus;
ULONG portStatus;
BulkUsb_DbgPrint(3, ("BulkUsb_ResetDevice - begins\n"));
ntStatus = BulkUsb_GetPortStatus(DeviceObject, &portStatus);
if((NT_SUCCESS(ntStatus)) &&
(!(portStatus & USBD_PORT_ENABLED)) &&
(portStatus & USBD_PORT_CONNECTED)) {
ntStatus = BulkUsb_ResetParentPort(DeviceObject);
}
BulkUsb_DbgPrint(3, ("BulkUsb_ResetDevice - ends\n"));
return ntStatus;
}
NTSTATUS
BulkUsb_GetPortStatus(
IN PDEVICE_OBJECT DeviceObject,
IN OUT PULONG PortStatus
)
/*++
Routine Description:
This routine retrieves the status value
Arguments:
DeviceObject - pointer to device object
PortStatus - port status
Return Value:
NT status value
--*/
{
NTSTATUS ntStatus;
KEVENT event;
PIRP irp;
IO_STATUS_BLOCK ioStatus;
PIO_STACK_LOCATION nextStack;
PDEVICE_EXTENSION deviceExtension;
//
// initialize variables
//
deviceExtension = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
*PortStatus = 0;
BulkUsb_DbgPrint(3, ("BulkUsb_GetPortStatus - begins\n"));
KeInitializeEvent(&event, NotificationEvent, FALSE);
irp = IoBuildDeviceIoControlRequest(
IOCTL_INTERNAL_USB_GET_PORT_STATUS,
deviceExtension->TopOfStackDeviceObject,
NULL,
0,
NULL,
0,
TRUE,
&event,
&ioStatus);
if(NULL == irp) {
BulkUsb_DbgPrint(1, ("memory alloc for irp failed\n"));
return STATUS_INSUFFICIENT_RESOURCES;
}
nextStack = IoGetNextIrpStackLocation(irp);
ASSERT(nextStack != NULL);
nextStack->Parameters.Others.Argument1 = PortStatus;
ntStatus = IoCallDriver(deviceExtension->TopOfStackDeviceObject, irp);
if(STATUS_PENDING == ntStatus) {
KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, NULL);
}
else {
ioStatus.Status = ntStatus;
}
ntStatus = ioStatus.Status;
BulkUsb_DbgPrint(3, ("BulkUsb_GetPortStatus - ends\n"));
return ntStatus;
}
NTSTATUS
BulkUsb_ResetParentPort(
IN PDEVICE_OBJECT DeviceObject
)
/*++
Routine Description:
This routine sends an IOCTL_INTERNAL_USB_RESET_PORT
synchronously down the stack.
Arguments:
Return Value:
--*/
{
NTSTATUS ntStatus;
KEVENT event;
PIRP irp;
IO_STATUS_BLOCK ioStatus;
PIO_STACK_LOCATION nextStack;
PDEVICE_EXTENSION deviceExtension;
//
// initialize variables
//
deviceExtension = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
BulkUsb_DbgPrint(3, ("BulkUsb_ResetParentPort - begins\n"));
KeInitializeEvent(&event, NotificationEvent, FALSE);
irp = IoBuildDeviceIoControlRequest(
IOCTL_INTERNAL_USB_RESET_PORT,
deviceExtension->TopOfStackDeviceObject,
NULL,
0,
NULL,
0,
TRUE,
&event,
&ioStatus);
if(NULL == irp) {
BulkUsb_DbgPrint(1, ("memory alloc for irp failed\n"));
return STATUS_INSUFFICIENT_RESOURCES;
}
nextStack = IoGetNextIrpStackLocation(irp);
ASSERT(nextStack != NULL);
ntStatus = IoCallDriver(deviceExtension->TopOfStackDeviceObject, irp);
if(STATUS_PENDING == ntStatus) {
KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, NULL);
}
else {
ioStatus.Status = ntStatus;
}
ntStatus = ioStatus.Status;
BulkUsb_DbgPrint(3, ("BulkUsb_ResetParentPort - ends\n"));
return ntStatus;
}
NTSTATUS
SubmitIdleRequestIrp(
IN PDEVICE_EXTENSION DeviceExtension
)
/*++
Routine Description:
This routine builds an idle request irp with an associated callback routine
and a completion routine in the driver and passes the irp down the stack.
Arguments:
DeviceExtension - pointer to device extension
Return Value:
NT status value
--*/
{
PIRP irp;
NTSTATUS ntStatus;
KIRQL oldIrql;
PUSB_IDLE_CALLBACK_INFO idleCallbackInfo;
PIO_STACK_LOCATION nextStack;
//
// initialize variables
//
irp = NULL;
idleCallbackInfo = NULL;
BulkUsb_DbgPrint(3, ("SubmitIdleRequest - begins\n"));
ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);
if(PowerDeviceD0 != DeviceExtension->DevPower) {
ntStatus = STATUS_POWER_STATE_INVALID;
goto SubmitIdleRequestIrp_Exit;
}
KeAcquireSpinLock(&DeviceExtension->IdleReqStateLock, &oldIrql);
if(InterlockedExchange(&DeviceExtension->IdleReqPend, 1)) {
BulkUsb_DbgPrint(1, ("Idle request pending..\n"));
KeReleaseSpinLock(&DeviceExtension->IdleReqStateLock, oldIrql);
ntStatus = STATUS_DEVICE_BUSY;
goto SubmitIdleRequestIrp_Exit;
}
//
// clear the NoIdleReqPendEvent because we are about
// to submit an idle request. Since we are so early
// to clear this event, make sure that if we fail this
// request we set back the event.
//
KeClearEvent(&DeviceExtension->NoIdleReqPendEvent);
idleCallbackInfo = ExAllocatePool(NonPagedPool,
sizeof(struct _USB_IDLE_CALLBACK_INFO));
if(idleCallbackInfo) {
idleCallbackInfo->IdleCallback = IdleNotificationCallback;
idleCallbackInfo->IdleContext = (PVOID)DeviceExtension;
ASSERT(DeviceExtension->IdleCallbackInfo == NULL);
DeviceExtension->IdleCallbackInfo = idleCallbackInfo;
//
// we use IoAllocateIrp to create an irp to selectively suspend the
// device. This irp lies pending with the hub driver. When appropriate
// the hub driver will invoked callback, where we power down. The completion
// routine is invoked when we power back.
//
irp = IoAllocateIrp(DeviceExtension->TopOfStackDeviceObject->StackSize,
FALSE);
if(irp == NULL) {
BulkUsb_DbgPrint(1, ("cannot build idle request irp\n"));
KeSetEvent(&DeviceExtension->NoIdleReqPendEvent,
IO_NO_INCREMENT,
FALSE);
InterlockedExchange(&DeviceExtension->IdleReqPend, 0);
KeReleaseSpinLock(&DeviceExtension->IdleReqStateLock, oldIrql);
ExFreePool(idleCallbackInfo);
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
goto SubmitIdleRequestIrp_Exit;
}
nextStack = IoGetNextIrpStackLocation(irp);
nextStack->MajorFunction =
IRP_MJ_INTERNAL_DEVICE_CONTROL;
nextStack->Parameters.DeviceIoControl.IoControlCode =
IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION;
nextStack->Parameters.DeviceIoControl.Type3InputBuffer =
idleCallbackInfo;
nextStack->Parameters.DeviceIoControl.InputBufferLength =
sizeof(struct _USB_IDLE_CALLBACK_INFO);
IoSetCompletionRoutine(irp,
IdleNotificationRequestComplete,
DeviceExtension,
TRUE,
TRUE,
TRUE);
DeviceExtension->PendingIdleIrp = irp;
//
// we initialize the count to 2.
// The reason is, if the CancelSelectSuspend routine manages
// to grab the irp from the device extension, then the last of the
// CancelSelectSuspend routine/IdleNotificationRequestComplete routine
// to execute will free this irp. We need to have this schema so that
// 1. completion routine does not attempt to touch the irp freed by
// CancelSelectSuspend routine.
// 2. CancelSelectSuspend routine doesnt wait for ever for the completion
// routine to complete!
//
DeviceExtension->FreeIdleIrpCount = 2;
KeReleaseSpinLock(&DeviceExtension->IdleReqStateLock, oldIrql);
//
// check if the device is idle.
// A check here ensures that a race condition did not
// completely reverse the call sequence of SubmitIdleRequestIrp
// and CancelSelectiveSuspend
//
if(!CanDeviceSuspend(DeviceExtension) ||
PowerDeviceD0 != DeviceExtension->DevPower) {
//
// IRPs created using IoBuildDeviceIoControlRequest should be
// completed by calling IoCompleteRequest and not merely
// deallocated.
//
BulkUsb_DbgPrint(1, ("Device is not idle\n"));
KeAcquireSpinLock(&DeviceExtension->IdleReqStateLock, &oldIrql);
DeviceExtension->IdleCallbackInfo = NULL;
DeviceExtension->PendingIdleIrp = NULL;
KeSetEvent(&DeviceExtension->NoIdleReqPendEvent,
IO_NO_INCREMENT,
FALSE);
InterlockedExchange(&DeviceExtension->IdleReqPend, 0);
KeReleaseSpinLock(&DeviceExtension->IdleReqStateLock, oldIrql);
if(idleCallbackInfo) {
ExFreePool(idleCallbackInfo);
}
//
// it is still safe to touch the local variable "irp" here.
// the irp has not been passed down the stack, the irp has
// no cancellation routine. The worse position is that the
// CancelSelectSuspend has run after we released the spin
// lock above. It is still essential to free the irp.
//
if(irp) {
IoFreeIrp(irp);
}
ntStatus = STATUS_UNSUCCESSFUL;
goto SubmitIdleRequestIrp_Exit;
}
BulkUsb_DbgPrint(3, ("Cancel the timers\n"));
//
// Cancel the timer so that the DPCs are no longer fired.
// Thus, we are making judicious usage of our resources.
// we do not need DPCs because we already have an idle irp pending.
// The timers are re-initialized in the completion routine.
//
KeCancelTimer(&DeviceExtension->Timer);
ntStatus = IoCallDriver(DeviceExtension->TopOfStackDeviceObject, irp);
if(!NT_SUCCESS(ntStatus)) {
BulkUsb_DbgPrint(1, ("IoCallDriver failed\n"));
goto SubmitIdleRequestIrp_Exit;
}
}
else {
BulkUsb_DbgPrint(1, ("Memory allocation for idleCallbackInfo failed\n"));
KeSetEvent(&DeviceExtension->NoIdleReqPendEvent,
IO_NO_INCREMENT,
FALSE);
InterlockedExchange(&DeviceExtension->IdleReqPend, 0);
KeReleaseSpinLock(&DeviceExtension->IdleReqStateLock, oldIrql);
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
}
SubmitIdleRequestIrp_Exit:
BulkUsb_DbgPrint(3, ("SubmitIdleRequest - ends\n"));
return ntStatus;
}
VOID
IdleNotificationCallback(
IN PDEVICE_EXTENSION DeviceExtension
)
/*++
Routine Description:
"A pointer to a callback function in your driver is passed down the stack with
this IOCTL, and it is this callback function that is called by USBHUB when it
safe for your device to power down."
"When the callback in your driver is called, all you really need to do is to
to first ensure that a WaitWake Irp has been submitted for your device, if
remote wake is possible for your device and then request a SetD2 (or DeviceWake)"
Arguments:
DeviceExtension - pointer to device extension
Return Value:
NT status value
--*/
{
NTSTATUS ntStatus;
POWER_STATE powerState;
KEVENT irpCompletionEvent;
PIRP_COMPLETION_CONTEXT irpContext;
BulkUsb_DbgPrint(3, ("IdleNotificationCallback - begins\n"));
//
// Dont idle, if the device was just disconnected or being stopped
// i.e. return for the following DeviceState(s)
// NotStarted, Stopped, PendingStop, PendingRemove, SurpriseRemoved, Removed
//
if(DeviceExtension->DeviceState != Working) {
return;
}
//
// If there is not already a WW IRP pending, submit one now
//
if(DeviceExtension->WaitWakeEnable) {
IssueWaitWake(DeviceExtension);
}
//
// power down the device
//
irpContext = (PIRP_COMPLETION_CONTEXT)
ExAllocatePool(NonPagedPool,
sizeof(IRP_COMPLETION_CONTEXT));
if(!irpContext) {
BulkUsb_DbgPrint(1, ("Failed to alloc memory for irpContext\n"));
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
}
else {
//
// increment the count. In the HoldIoRequestWorkerRoutine, the
// count is decremented twice (one for the system Irp and the
// other for the device Irp. An increment here compensates for
// the sytem irp..The decrement corresponding to this increment
// is in the completion function
//
BulkUsb_DbgPrint(3, ("IdleNotificationCallback::"));
BulkUsb_IoIncrement(DeviceExtension);
powerState.DeviceState = DeviceExtension->PowerDownLevel;
KeInitializeEvent(&irpCompletionEvent, NotificationEvent, FALSE);
irpContext->DeviceExtension = DeviceExtension;
irpContext->Event = &irpCompletionEvent;
ntStatus = PoRequestPowerIrp(
DeviceExtension->PhysicalDeviceObject,
IRP_MN_SET_POWER,
powerState,
(PREQUEST_POWER_COMPLETE) PoIrpCompletionFunc,
irpContext,
NULL);
if(STATUS_PENDING == ntStatus) {
BulkUsb_DbgPrint(3, ("IdleNotificationCallback::"
"waiting for the power irp to complete\n"));
KeWaitForSingleObject(&irpCompletionEvent,
Executive,
KernelMode,
FALSE,
NULL);
}
}
if(!NT_SUCCESS(ntStatus)) {
if(irpContext) {
ExFreePool(irpContext);
}
}
BulkUsb_DbgPrint(3, ("IdleNotificationCallback - ends\n"));
}
NTSTATUS
IdleNotificationRequestComplete(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN PVOID Context
)
/*++
Routine Description:
Completion routine for idle notification irp
Arguments:
DeviceObject - pointer to device object
Irp - I/O request packet
DeviceExtension - pointer to device extension
Return Value:
NT status value
--*/
{
NTSTATUS ntStatus;
POWER_STATE powerState;
KIRQL oldIrql;
LARGE_INTEGER dueTime;
PIRP idleIrp;
PUSB_IDLE_CALLBACK_INFO idleCallbackInfo;
PDEVICE_EXTENSION DeviceExtension = (PDEVICE_EXTENSION)Context;
UNREFERENCED_PARAMETER( DeviceObject );
BulkUsb_DbgPrint(3, ("IdleNotificationRequestCompete - begins\n"));
idleIrp = NULL;
//
// check the Irp status
//
ntStatus = Irp->IoStatus.Status;
if(!NT_SUCCESS(ntStatus) && ntStatus != STATUS_NOT_SUPPORTED) {
BulkUsb_DbgPrint(1, ("Idle irp completes with error::"));
switch(ntStatus) {
case STATUS_INVALID_DEVICE_REQUEST:
BulkUsb_DbgPrint(1, ("STATUS_INVALID_DEVICE_REQUEST\n"));
break;
case STATUS_CANCELLED:
BulkUsb_DbgPrint(1, ("STATUS_CANCELLED\n"));
break;
case STATUS_POWER_STATE_INVALID:
BulkUsb_DbgPrint(1, ("STATUS_POWER_STATE_INVALID\n"));
goto IdleNotificationRequestComplete_Exit;
case STATUS_DEVICE_BUSY:
BulkUsb_DbgPrint(1, ("STATUS_DEVICE_BUSY\n"));
break;
default:
BulkUsb_DbgPrint(1, ("default: status = %X\n", ntStatus));
break;
}
//
// if in error, issue a SetD0 (only when not in D0)
//
if(PowerDeviceD0 != DeviceExtension->DevPower) {
BulkUsb_DbgPrint(3, ("IdleNotificationRequestComplete::"));
BulkUsb_IoIncrement(DeviceExtension);
powerState.DeviceState = PowerDeviceD0;
ntStatus = PoRequestPowerIrp(
DeviceExtension->PhysicalDeviceObject,
IRP_MN_SET_POWER,
powerState,
(PREQUEST_POWER_COMPLETE) PoIrpAsyncCompletionFunc,
DeviceExtension,
NULL);
if(!NT_SUCCESS(ntStatus)) {
BulkUsb_DbgPrint(1, ("PoRequestPowerIrp failed\n"));
}
}
}
IdleNotificationRequestComplete_Exit:
KeAcquireSpinLock(&DeviceExtension->IdleReqStateLock, &oldIrql);
idleCallbackInfo = DeviceExtension->IdleCallbackInfo;
DeviceExtension->IdleCallbackInfo = NULL;
idleIrp = (PIRP) InterlockedExchangePointer(
&DeviceExtension->PendingIdleIrp,
NULL);
InterlockedExchange(&DeviceExtension->IdleReqPend, 0);
KeReleaseSpinLock(&DeviceExtension->IdleReqStateLock, oldIrql);
if(idleCallbackInfo) {
ExFreePool(idleCallbackInfo);
}
//
// since the irp was created using IoAllocateIrp,
// the Irp needs to be freed using IoFreeIrp.
// Also return STATUS_MORE_PROCESSING_REQUIRED so that
// the kernel does not reference this in the near future.
//
if(idleIrp) {
BulkUsb_DbgPrint(3, ("completion routine has a valid irp and frees it\n"));
IoFreeIrp(Irp);
KeSetEvent(&DeviceExtension->NoIdleReqPendEvent,
IO_NO_INCREMENT,
FALSE);
}
else {
//
// The CancelSelectiveSuspend routine has grabbed the Irp from the device
// extension. Now the last one to decrement the FreeIdleIrpCount should
// free the irp.
//
if(0 == InterlockedDecrement(&DeviceExtension->FreeIdleIrpCount)) {
BulkUsb_DbgPrint(3, ("completion routine frees the irp\n"));
IoFreeIrp(Irp);
KeSetEvent(&DeviceExtension->NoIdleReqPendEvent,
IO_NO_INCREMENT,
FALSE);
}
}
if(DeviceExtension->SSEnable) {
BulkUsb_DbgPrint(3, ("Set the timer to fire DPCs\n"));
dueTime.QuadPart = -10000 * IDLE_INTERVAL; // 5000 ms
KeSetTimerEx(&DeviceExtension->Timer,
dueTime,
IDLE_INTERVAL, // 5000 ms
&DeviceExtension->DeferredProcCall);
BulkUsb_DbgPrint(3, ("IdleNotificationRequestCompete - ends\n"));
}
return STATUS_MORE_PROCESSING_REQUIRED;
}
VOID
CancelSelectSuspend(
IN PDEVICE_EXTENSION DeviceExtension
)
/*++
Routine Description:
This routine is invoked to cancel selective suspend request.
Arguments:
DeviceExtension - pointer to device extension
Return Value:
None.
--*/
{
PIRP irp;
KIRQL oldIrql;
irp = NULL;
BulkUsb_DbgPrint(3, ("CancelSelectSuspend - begins\n"));
KeAcquireSpinLock(&DeviceExtension->IdleReqStateLock, &oldIrql);
if(!CanDeviceSuspend(DeviceExtension))
{
BulkUsb_DbgPrint(3, ("Device is not idle\n"));
irp = (PIRP) InterlockedExchangePointer(
&DeviceExtension->PendingIdleIrp,
NULL);
}
KeReleaseSpinLock(&DeviceExtension->IdleReqStateLock, oldIrql);
//
// since we have a valid Irp ptr,
// we can call IoCancelIrp on it,
// without the fear of the irp
// being freed underneath us.
//
if(irp) {
//
// This routine has the irp pointer.
// It is safe to call IoCancelIrp because we know that
// the compleiton routine will not free this irp unless...
//
//
if(IoCancelIrp(irp)) {
BulkUsb_DbgPrint(3, ("IoCancelIrp returns TRUE\n"));
}
else {
BulkUsb_DbgPrint(3, ("IoCancelIrp returns FALSE\n"));
}
//
// ....we decrement the FreeIdleIrpCount from 2 to 1.
// if completion routine runs ahead of us, then this routine
// decrements the FreeIdleIrpCount from 1 to 0 and hence shall
// free the irp.
//
if(0 == InterlockedDecrement(&DeviceExtension->FreeIdleIrpCount)) {
BulkUsb_DbgPrint(3, ("CancelSelectSuspend frees the irp\n"));
IoFreeIrp(irp);
KeSetEvent(&DeviceExtension->NoIdleReqPendEvent,
IO_NO_INCREMENT,
FALSE);
}
}
BulkUsb_DbgPrint(3, ("CancelSelectSuspend - ends\n"));
return;
}
VOID
PoIrpCompletionFunc(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR MinorFunction,
IN POWER_STATE PowerState,
IN PVOID Context,
IN PIO_STATUS_BLOCK IoStatus
)
/*++
Routine Description:
Completion routine for power irp PoRequested in
IdleNotificationCallback.
Arguments:
DeviceObject - pointer to device object
MinorFunciton - minor function for the irp.
PowerState - irp power state
Context - context passed to the completion function
IoStatus - status block.
Return Value:
None
--*/
{
PIRP_COMPLETION_CONTEXT irpContext;
UNREFERENCED_PARAMETER( DeviceObject );
UNREFERENCED_PARAMETER( MinorFunction );
UNREFERENCED_PARAMETER( PowerState );
UNREFERENCED_PARAMETER( IoStatus );
//
// initialize variables
//
irpContext = NULL;
if(Context) {
irpContext = (PIRP_COMPLETION_CONTEXT) Context;
}
//
// all we do is set the event and decrement the count
//
if(irpContext) {
KeSetEvent(irpContext->Event, 0, FALSE);
BulkUsb_DbgPrint(3, ("PoIrpCompletionFunc::"));
BulkUsb_IoDecrement(irpContext->DeviceExtension);
ExFreePool(irpContext);
}
return;
}
VOID
PoIrpAsyncCompletionFunc(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR MinorFunction,
IN POWER_STATE PowerState,
IN PVOID Context,
IN PIO_STATUS_BLOCK IoStatus
)
/*++
Routine Description:
Completion routine for power irp PoRequested in IdleNotification
RequestComplete routine.
Arguments:
DeviceObject - pointer to device object
MinorFunciton - minor function for the irp.
PowerState - irp power state
Context - context passed to the completion function
IoStatus - status block.
Return Value:
None
--*/
{
PDEVICE_EXTENSION DeviceExtension;
UNREFERENCED_PARAMETER( DeviceObject );
UNREFERENCED_PARAMETER( MinorFunction );
UNREFERENCED_PARAMETER( PowerState );
UNREFERENCED_PARAMETER( IoStatus );
//
// initialize variables
//
DeviceExtension = (PDEVICE_EXTENSION) Context;
//
// all we do is decrement the count
//
BulkUsb_DbgPrint(3, ("PoIrpAsyncCompletionFunc::"));
BulkUsb_IoDecrement(DeviceExtension);
return;
}
VOID
WWIrpCompletionFunc(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR MinorFunction,
IN POWER_STATE PowerState,
IN PVOID Context,
IN PIO_STATUS_BLOCK IoStatus
)
/*++
Routine Description:
Completion routine for PoRequest wait wake irp
Arguments:
DeviceObject - pointer to device object
MinorFunciton - minor function for the irp.
PowerState - irp power state
Context - context passed to the completion function
IoStatus - status block.
Return Value:
None
--*/
{
PDEVICE_EXTENSION DeviceExtension;
UNREFERENCED_PARAMETER( DeviceObject );
UNREFERENCED_PARAMETER( MinorFunction );
UNREFERENCED_PARAMETER( PowerState );
UNREFERENCED_PARAMETER( IoStatus );
//
// initialize variables
//
DeviceExtension = (PDEVICE_EXTENSION) Context;
//
// all we do is decrement the count
//
BulkUsb_DbgPrint(3, ("WWIrpCompletionFunc::"));
BulkUsb_IoDecrement(DeviceExtension);
return;
}
|
li-liangshan/comics
|
comics-core/src/main/java/com/lls/comics/codec/DefaultComicCodec.java
|
<gh_stars>1-10
package com.lls.comics.codec;
import com.lls.comics.common.ComicsConstants;
import com.lls.comics.common.URL;
import com.lls.comics.common.URLParamType;
import com.lls.comics.core.extension.ExtensionLoader;
import com.lls.comics.core.extension.SpiMeta;
import com.lls.comics.exception.ComicsException;
import com.lls.comics.rpc.DefaultRequest;
import com.lls.comics.rpc.DefaultResponse;
import com.lls.comics.rpc.Request;
import com.lls.comics.rpc.Response;
import com.lls.comics.serializer.Serializer;
import com.lls.comics.util.ByteUtils;
import com.lls.comics.util.ReflectUtils;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
/************************************
* DefaultComicCodec
* @author liliangshan
* @date 2019-01-31
************************************/
@SpiMeta(name = "comics")
public class DefaultComicCodec extends AbstractCodec {
private static final int HEADER_LENGTH = 16;
private static final short MAGIC = (short) 0xF0F0;
private static final byte MASK = 0x07;
@Override
protected byte[] encodeRequest(URL url, Request request) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ObjectOutput output = createObjectOutput(outputStream);
output.writeUTF(request.getInterfaceName());
output.writeUTF(request.getMethodName());
output.writeUTF(request.getArgumentDesc());
Serializer serializer = getSerializer(url);
if (request.getArguments() != null && request.getArguments().length > 0) {
for (Object object : request.getArguments()) {
serialize(output, object, serializer);
}
}
if (request.getAttachments() == null || request.getAttachments().isEmpty()) {
output.writeInt(0);
} else {
output.writeInt(request.getAttachments().size());
for (Map.Entry<String, String> entry : request.getAttachments().entrySet()) {
output.writeUTF(entry.getKey());
output.writeUTF(entry.getValue());
}
}
output.flush();
byte[] body = outputStream.toByteArray();
byte flag = ComicsConstants.FLAG_REQUEST;
output.close();
return encode(body, flag, request.getRequestId());
}
/**
* 数据协议:
*
* <pre>
*
* header: 16个字节
*
* 0-15 bit : magic
* 16-23 bit : flag , 其中: 21-22 bit: event 可支持4种event,比如normal, exception等, 23 bit : 0 is request , 1 is response
* 24-87 bit : request id
* 88-119 bit : body content length
* 120-127 : reserve content
* </pre>
*
* @param body body
* @param flag flag
* @param requestId requestId
* @return bytes
* @throws IOException e
*/
private byte[] encode(byte[] body, byte flag, long requestId) throws IOException {
byte[] header = new byte[HEADER_LENGTH];
int offset = 0;
// 0~15bit: magic
ByteUtils.short2bytes(MAGIC, header, offset);
offset += 2;
// 16~23bit: flag
header[offset++] = flag;
// 24~87bit: requestId
ByteUtils.long2bytes(requestId, header, offset);
offset += 8;
// 88~119bit
ByteUtils.int2bytes(body.length, header, offset);
byte[] data = new byte[header.length + body.length];
System.arraycopy(header, 0, data, 0, header.length);
System.arraycopy(body, 0, data, header.length, body.length);
return data;
}
@Override
protected byte[] encodeResponse(URL url, Response response) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ObjectOutput output = createObjectOutput(outputStream);
output.writeLong(response.getCreatedTimeMills());
byte flag;
Serializer serializer = getSerializer(url);
if (response.getException() != null) {
output.writeUTF(response.getException().getClass().getName());
serialize(output, response.getValue(), serializer);
flag = ComicsConstants.FLAG_RESPONSE_EXCEPTION;
} else if (response.getValue() == null) {
flag = ComicsConstants.FLAG_RESPONSE_VOID;
} else {
output.writeUTF(response.getValue().getClass().getName());
serialize(output, response.getValue(), serializer);
flag = ComicsConstants.FLAG_RESPONSE;
}
output.flush();
byte[] body = outputStream.toByteArray();
output.close();
return encode(body, flag, response.getRequestId());
}
@Override
protected Object decodeRequest(byte[] body, long requestId, URL url) throws IOException, ClassNotFoundException {
ByteArrayInputStream inputStream = new ByteArrayInputStream(body);
ObjectInput input = createObjectInput(inputStream);
String interfaceName = input.readUTF();
String methodName = input.readUTF();
String argumentDesc = input.readUTF();
DefaultRequest request = new DefaultRequest();
request.setInterfaceName(interfaceName);
request.setMethodName(methodName);
request.setArgumentDesc(argumentDesc);
request.setRequestId(requestId);
Serializer serializer = getSerializer(url);
request.setArguments(this.decodeRequestArguments(input, argumentDesc, serializer));
request.setAttachments(this.decodeRequestAttachments(input));
input.close();
return request;
}
@Override
protected Object decodeResponse(byte[] body, byte dataType, long requestId, URL url) throws IOException, ClassNotFoundException {
ByteArrayInputStream inputStream = new ByteArrayInputStream(body);
ObjectInput input = createObjectInput(inputStream);
long createdTimeMills = input.readLong();
DefaultResponse response = new DefaultResponse();
response.setCreatedTimeMills(createdTimeMills);
response.setRequestId(requestId);
if (dataType == ComicsConstants.FLAG_RESPONSE_VOID) {
return response;
}
String className = input.readUTF();
Class<?> clz = ReflectUtils.forName(className);
Serializer serializer = getSerializer(url);
Object result = deserialize((byte[]) input.readObject(), clz, serializer);
if (dataType == ComicsConstants.FLAG_RESPONSE) {
response.setValue(result);
} else if (dataType == ComicsConstants.FLAG_RESPONSE_EXCEPTION) {
response.setException((Exception) result);
} else {
throw new ComicsException("decode error: response dataType not support ");
}
response.setRequestId(requestId);
input.close();
return response;
}
@Override
protected void beforeDecodeValidation(byte[] body) {
if (body.length <= HEADER_LENGTH) {
throw new ComicsException("decode error, due to bytes format.");
}
short type = ByteUtils.bytes2short(body, 0);
if (type != MAGIC) {
throw new ComicsException("decode error, due to magic value");
}
int bodyLength = ByteUtils.bytes2int(body, 11);
if (body.length != (HEADER_LENGTH + bodyLength)) {
throw new ComicsException("decode error, due to content length.");
}
}
@Override
protected byte[] getBody(byte[] body) {
int bodyLength = ByteUtils.bytes2int(body, 11);
byte[] bytes = new byte[bodyLength];
System.arraycopy(body, HEADER_LENGTH, bytes, 0, bodyLength);
return bytes;
}
@Override
protected byte getDataType(byte[] body) {
byte flag = body[3];
return (byte) (flag & MASK);
}
@Override
protected long getRequestId(byte[] body) {
return ByteUtils.bytes2long(body, 4);
}
@Override
protected Serializer getSerializer(URL url) {
String serializerName = url.getArgument(URLParamType.SERIALIZER.getName(), URLParamType.SERIALIZER.getValue());
return ExtensionLoader.getExtensionLoader(Serializer.class).getExtension(serializerName);
}
private Object[] decodeRequestArguments(ObjectInput input, String argumentDesc, Serializer serializer) throws IOException,
ClassNotFoundException {
if (argumentDesc == null || argumentDesc.isEmpty()) {
return null;
}
Class<?>[] classTypes = ReflectUtils.forNames(argumentDesc);
Object[] arguments = new Object[classTypes.length];
for (int i = 0; i < classTypes.length; i++) {
arguments[i] = deserialize((byte[]) input.readObject(), classTypes[i], serializer);
}
return arguments;
}
private Map<String, String> decodeRequestAttachments(ObjectInput input) throws IOException, ClassNotFoundException {
int size = input.readInt();
if (size <= 0) {
return null;
}
Map<String, String> attachments = new HashMap<>(size);
for (int i = 0; i < size; i++) {
attachments.put(input.readUTF(), input.readUTF());
}
return attachments;
}
}
|
naz013/Reminder
|
app/src/androidTest/java/com/elementary/tasks/core/InitTest.java
|
package com.elementary.tasks.core;
import androidx.test.espresso.DataInteraction;
import androidx.test.espresso.ViewInteraction;
import androidx.test.rule.ActivityTestRule;
import androidx.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import com.elementary.tasks.R;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.Espresso.pressBack;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard;
import static androidx.test.espresso.action.ViewActions.replaceText;
import static androidx.test.espresso.action.ViewActions.scrollTo;
import static androidx.test.espresso.action.ViewActions.swipeLeft;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withClassName;
import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.anything;
import static org.hamcrest.Matchers.is;
@LargeTest
@RunWith(AndroidJUnit4.class)
public class InitTest {
@Rule
public ActivityTestRule<SplashScreen> mActivityTestRule = new ActivityTestRule<>(SplashScreen.class);
@Test
public void initTest() {
// Added a sleep statement to match the app's execution delay.
// The recommended way to handle such scenarios is to use Espresso idling resources:
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
try {
Thread.sleep(60000);
} catch (InterruptedException e) {
e.printStackTrace();
}
ViewInteraction appCompatImageButton = onView(
allOf(withId(R.id.next_button), withContentDescription("Next"),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
1),
isDisplayed()));
appCompatImageButton.perform(click());
ViewInteraction viewPager = onView(
allOf(withId(R.id.viewPager),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
3),
isDisplayed()));
viewPager.perform(swipeLeft());
// Added a sleep statement to match the app's execution delay.
// The recommended way to handle such scenarios is to use Espresso idling resources:
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
try {
Thread.sleep(60000);
} catch (InterruptedException e) {
e.printStackTrace();
}
ViewInteraction appCompatImageButton2 = onView(
allOf(withId(R.id.next_button), withContentDescription("Next"),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
1),
isDisplayed()));
appCompatImageButton2.perform(click());
ViewInteraction viewPager2 = onView(
allOf(withId(R.id.viewPager),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
3),
isDisplayed()));
viewPager2.perform(swipeLeft());
ViewInteraction appCompatImageButton3 = onView(
allOf(withId(R.id.next_button), withContentDescription("Next"),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
1),
isDisplayed()));
appCompatImageButton3.perform(click());
ViewInteraction viewPager3 = onView(
allOf(withId(R.id.viewPager),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
3),
isDisplayed()));
viewPager3.perform(swipeLeft());
ViewInteraction viewPager4 = onView(
allOf(withId(R.id.viewPager),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
3),
isDisplayed()));
viewPager4.perform(swipeLeft());
ViewInteraction appCompatImageButton4 = onView(
allOf(withId(R.id.next_button), withContentDescription("Next"),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
1),
isDisplayed()));
appCompatImageButton4.perform(click());
// Added a sleep statement to match the app's execution delay.
// The recommended way to handle such scenarios is to use Espresso idling resources:
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
try {
Thread.sleep(3575204);
} catch (InterruptedException e) {
e.printStackTrace();
}
ViewInteraction appCompatTextView = onView(
allOf(withId(R.id.skip_button), withText("Skip"),
childAtPosition(
childAtPosition(
withId(android.R.id.content),
0),
5),
isDisplayed()));
appCompatTextView.perform(click());
ViewInteraction appCompatButton = onView(
allOf(withId(android.R.id.button2), withText("Open app"),
childAtPosition(
childAtPosition(
withClassName(is("android.widget.ScrollView")),
0),
2)));
appCompatButton.perform(scrollTo(), click());
// Added a sleep statement to match the app's execution delay.
// The recommended way to handle such scenarios is to use Espresso idling resources:
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
try {
Thread.sleep(3584534);
} catch (InterruptedException e) {
e.printStackTrace();
}
ViewInteraction floatingActionButton = onView(
allOf(withId(R.id.fab), withContentDescription("Add"),
childAtPosition(
childAtPosition(
withId(R.id.drawer_layout),
0),
1),
isDisplayed()));
floatingActionButton.perform(click());
// Added a sleep statement to match the app's execution delay.
// The recommended way to handle such scenarios is to use Espresso idling resources:
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
try {
Thread.sleep(3570140);
} catch (InterruptedException e) {
e.printStackTrace();
}
ViewInteraction appCompatTextView2 = onView(
allOf(withId(R.id.tv_dismiss), withText("GOT IT"),
childAtPosition(
allOf(withId(R.id.content_box),
childAtPosition(
withClassName(is("uk.co.deanwild.materialshowcaseview.MaterialShowcaseView")),
0)),
2),
isDisplayed()));
appCompatTextView2.perform(click());
// Added a sleep statement to match the app's execution delay.
// The recommended way to handle such scenarios is to use Espresso idling resources:
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
try {
Thread.sleep(350);
} catch (InterruptedException e) {
e.printStackTrace();
}
ViewInteraction appCompatTextView3 = onView(
allOf(withId(R.id.tv_dismiss), withText("GOT IT"),
childAtPosition(
allOf(withId(R.id.content_box),
childAtPosition(
withClassName(is("uk.co.deanwild.materialshowcaseview.MaterialShowcaseView")),
0)),
2),
isDisplayed()));
appCompatTextView3.perform(click());
// Added a sleep statement to match the app's execution delay.
// The recommended way to handle such scenarios is to use Espresso idling resources:
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
try {
Thread.sleep(350);
} catch (InterruptedException e) {
e.printStackTrace();
}
ViewInteraction appCompatTextView4 = onView(
allOf(withId(R.id.tv_dismiss), withText("GOT IT"),
childAtPosition(
allOf(withId(R.id.content_box),
childAtPosition(
withClassName(is("uk.co.deanwild.materialshowcaseview.MaterialShowcaseView")),
0)),
2),
isDisplayed()));
appCompatTextView4.perform(click());
// Added a sleep statement to match the app's execution delay.
// The recommended way to handle such scenarios is to use Espresso idling resources:
// https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html
try {
Thread.sleep(350);
} catch (InterruptedException e) {
e.printStackTrace();
}
ViewInteraction appCompatTextView5 = onView(
allOf(withId(R.id.tv_dismiss), withText("GOT IT"),
childAtPosition(
allOf(withId(R.id.content_box),
childAtPosition(
withClassName(is("uk.co.deanwild.materialshowcaseview.MaterialShowcaseView")),
0)),
2),
isDisplayed()));
appCompatTextView5.perform(click());
ViewInteraction appCompatSpinner = onView(
allOf(withId(R.id.navSpinner),
childAtPosition(
allOf(withId(R.id.toolbar),
childAtPosition(
withId(R.id.appBar),
0)),
0),
isDisplayed()));
appCompatSpinner.perform(click());
DataInteraction relativeLayout = onData(anything())
.inAdapterView(childAtPosition(
withClassName(is("android.widget.PopupWindow$PopupBackgroundView")),
0))
.atPosition(1);
relativeLayout.perform(click());
ViewInteraction roboButton = onView(
allOf(withText("2"),
childAtPosition(
childAtPosition(
withId(R.id.timerPickerView),
2),
1)));
roboButton.perform(scrollTo(), click());
ViewInteraction roboButton2 = onView(
allOf(withText("0"),
childAtPosition(
childAtPosition(
withId(R.id.timerPickerView),
5),
1)));
roboButton2.perform(scrollTo(), click());
ViewInteraction roboEditText = onView(
allOf(withId(R.id.taskSummary),
childAtPosition(
childAtPosition(
withId(R.id.appBar),
1),
0),
isDisplayed()));
roboEditText.perform(click());
ViewInteraction roboEditText2 = onView(
allOf(withId(R.id.taskSummary),
childAtPosition(
childAtPosition(
withId(R.id.appBar),
1),
0),
isDisplayed()));
roboEditText2.perform(replaceText("test"), closeSoftKeyboard());
pressBack();
ViewInteraction actionMenuItemView = onView(
allOf(withId(R.id.action_add), withText("Save"),
childAtPosition(
childAtPosition(
withId(R.id.toolbar),
2),
0),
isDisplayed()));
actionMenuItemView.perform(click());
}
private static Matcher<View> childAtPosition(
final Matcher<View> parentMatcher, final int position) {
return new TypeSafeMatcher<View>() {
@Override
public void describeTo(Description description) {
description.appendText("Child at position " + position + " in parent ");
parentMatcher.describeTo(description);
}
@Override
public boolean matchesSafely(View view) {
ViewParent parent = view.getParent();
return parent instanceof ViewGroup && parentMatcher.matches(parent)
&& view.equals(((ViewGroup) parent).getChildAt(position));
}
};
}
}
|
ylipacbio/pbtranscript
|
pbtranscript/io/DazzIDHandler.py
|
<reponame>ylipacbio/pbtranscript<filename>pbtranscript/io/DazzIDHandler.py
#!/usr/bin/env python
"""
class DazzIDHandler, which
(1) converts an arbitrary fasta file to a daligner-compatible fasta file.
(2) maintain mapping between read ids in daligner-compatible fasta file
and its original name in input file.
(3) makes a dazz database so that input fasta file can run daligner later
"""
import logging
import os.path as op
from cPickle import load, dump
from pbcore.io import FastaWriter
from pbtranscript.io.ContigSetReaderWrapper import ContigSetReaderWrapper
from pbtranscript.Utils import execute, realpath, nfs_exists
__author__ = '<EMAIL>'
log = logging.getLogger(__name__)
class DazzIDHandler(object):
"""
For any kind of input fasta, convert & maintain ID mapping
<input>.fasta --> <input>.dazz.fasta, <input>.dazz.fasta.pickle
If the input is fastq, automatically output as fasta since dalign only takes fasta
By default, converted is False, so go ahead with converting.
Otherwise, just read the mapping pickle.
NOTE: Consistent with dazz's indexing, the IDs will be 1-based!!!!
e.g.:
cat <input>.fasta
>movie/1001/200_300
AA...GG
>movie/2013/1_1000
GC...GC
cat <input>.dazz.fasta
>prolog/1/0_100
AA...GG
>prolog/2/0_999
GC...GC
dump <input>.dazz.fasta.pickle
{1: movie/1001/200_300, 2:movie/2013/1_1000}
"""
dazz_movie_name = 'prolog'
def __init__(self, input_filename, converted=False, dazz_dir=None):
"""
input_filename - input FASTA/FASTQ/ContigSet file
converted - whether or not input file has been converted to
daligner compatible FASTA file.
dazz_dir - if None, save all dazz.fasta, dazz.pickle, db files
in the same directory as inputfile.
if a valid path, save all output files to dazz_dir.
"""
self.dazz_dir = dazz_dir
self.input_filename = realpath(input_filename)
self.validate_file_type(self.input_filename)
# index --> original sequence ID ex: 1 --> movie/zmw/start_end_CCS
self.dazz_mapping = {}
if converted and not nfs_exists(self.db_filename):
log.warning(str(self.input_filename) +
" should have been converted to daligner-compatible" +
" format, but in fact it is not. Converting ...")
converted = False
if not converted:
self.convert_to_dazz_fasta()
self.make_db()
else:
self.read_dazz_pickle()
def validate_file_type(self, filename):
"""Return input file type, either "fasta" or "fastq" or "xml",
no other file type is allowed."""
i = filename.rfind('.')
file_suffix = filename[i + 1:].lower()
if not file_suffix in ('fa', 'fasta', 'fastq', 'xml'):
raise ValueError("%s " % (self.__class__.__name__) +
"can only take .fa, .fasta, .fq, .fastq" +
"or contigset.xml as input!")
@property
def dazz_filename(self):
"""Return converted daligner-compatible fasta file name.
e.g., *.dazz.fasta
"""
i = self.input_filename.rfind('.')
filename = self.input_filename[:i] + '.dazz.fasta'
if self.dazz_dir is not None:
return op.join(self.dazz_dir, op.basename(filename))
else:
return filename
@property
def pickle_filename(self):
"""Return name of a pickle file which maps sequence names
in the original fasta file to corresponding ids in
daligner-compatibile fasta file.
e.g., *.dazz.fasta.pickle
"""
return self.dazz_filename + '.pickle'
@property
def db_filename(self):
"""Return file name of daligner database created taking
daligner compatible fasta file as input.
e.g., *.dazz.fasta.db
"""
return self.dazz_filename + '.db'
def convert_to_dazz_fasta(self):
"""
Convert input fasta/fastq file to daligner-compatibe fasta with ids:
<prefix>/<index>/0_<seqlen>
Also write out mappings to pickle
"""
log.debug("Converting %s to daligner compatible fasta %s.",
self.input_filename, self.dazz_filename)
reader = ContigSetReaderWrapper(self.input_filename)
with FastaWriter(self.dazz_filename) as f:
i = 1
for r in reader:
f.writeRecord("{p}/{i}/0_{len}".format(p=self.dazz_movie_name,
i=i, len=len(r.sequence)),
r.sequence[:])
self.dazz_mapping[i] = r.name
i += 1
reader.close()
with open(self.pickle_filename, 'w') as f:
dump(self.dazz_mapping, f)
def read_dazz_pickle(self):
"""Read dazz mapping from pickle file."""
log.debug("Reading daligner compatible fasta ids from pickle %s",
self.pickle_filename)
try:
with open(self.pickle_filename) as f:
self.dazz_mapping = load(f)
except IOError:
log.debug("Could not open ", str(self.pickle_filename),
", input fasta may not be converted.", )
def make_db(self):
"""Make dazz database for input file.
1. fasta2DB
2. DBsplit
3. get & store number of blocks
*.dazz.fasta.db will be created.
"""
log.debug("Making DAZZ database for %s.", self.dazz_filename)
if not op.exists(self.dazz_filename):
raise RuntimeError("%s hasn't been converted to daligner-compatible format." %
self.input_filename)
if op.exists(self.db_filename):
cmd = "DBrm %s" % self.dazz_filename
execute(cmd=cmd)
cmd = "fasta2DB %s %s " % (self.dazz_filename, self.dazz_filename)
execute(cmd=cmd)
cmd = "DBsplit -s200 %s" % self.dazz_filename
execute(cmd)
def keys(self):
"""Return all dazz ids in input FASTA/FASTQ."""
return self.dazz_mapping.keys()
@property
def num_blocks(self):
"""Return number of blocks in DAZZ DB."""
if not op.exists(self.db_filename):
self.make_db()
bs = [line.strip() for line in open(self.db_filename, 'r')
if line.strip().startswith("blocks =")]
if len(bs) == 1:
return int(bs[0].split('=')[1])
raise ValueError("Could not get number of blocks in DAZZ DB %s"
% self.db_filename)
def __getitem__(self, key):
"""
key should be a single integer from the id
e.g.: prolog/1/0_1324 --> key should be 1
"""
return self.dazz_mapping[key]
|
crpurcell/MQ_DPI_Release
|
Shark_Training/pyimagesearch/nn/conv/dogcatnet.py
|
#=============================================================================#
# #
# MODIFIED: 04-Sep-2018 by <NAME> #
# #
#=============================================================================#
from keras.models import Sequential
from keras.layers.convolutional import Conv2D
from keras.layers.convolutional import MaxPooling2D
from keras.layers.core import Activation
from keras.layers.core import Flatten
from keras.layers.core import Dropout
from keras.layers.core import Dense
from keras import backend as K
#-----------------------------------------------------------------------------#
class DogCatNet:
@staticmethod
def build(width, height, depth):
# Initialize the model and channel order
model = Sequential()
inputShape = (height, width, depth)
chanDim = -1
if K.image_data_format() == "channels_first":
inputShape = (depth, height, width)
chanDim = 1
# First CONV(32) => RELU => POOL(2) layer set
model.add(Conv2D(32, (3, 3), input_shape=inputShape))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
# Second CONV(32) => RELU => POOL(2) layer set
model.add(Conv2D(32, (3, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
# Third CONV(64) => RELU => POOL(2) layer set
model.add(Conv2D(64, (3, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
# FC(64) => RELU => DROP(0.5)
model.add(Flatten())
model.add(Dense(64))
model.add(Activation('relu'))
model.add(Dropout(0.5))
# Sigmoid classifier
model.add(Dense(1))
model.add(Activation('sigmoid'))
return model
|
PoKeumCho/SScommu
|
java/com/sscommu/pokeumcho/EditGeneralActivity.java
|
package com.sscommu.pokeumcho;
/**
* Android Upload Image To Server
* [참고] https://androidjson.com/android-upload-image-server-using-php-mysql/
*/
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.MediaStore;
import android.provider.OpenableColumns;
import android.util.Base64;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.Toast;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class EditGeneralActivity extends AppCompatActivity
implements View.OnClickListener {
private static final int MAX_IMAGES = 5;
private static final String IMAGE_NAME = "image_name_"; // _0부터 시작
private static final String IMAGE_PATH = "image_path_"; // _0부터 시작
private static final String IMAGE_WIDTH = "image_width_"; // _0부터 시작
private static final String IMAGE_HEIGHT = "image_height_"; // _0부터 시작
private User mUser;
private SharedPreferences mPrefs;
private GeneralCategory mGeneralCategory;
private ArrayList<UploadImage> mUploadImages;
private Button btnUploadImage;
private ConstraintLayout[] mImageLayoutArray;
private ImageView[] mImageViewArray;
private ImageButton[] mBtnDeleteArray;
private ImageButton[] mBtnRotateArray;
ActivityResultLauncher<Intent> myActivityResultLauncher;
ProgressDialog mProgressDialog;
private EditText editText;
private String mText;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_edit_general);
setTitle("글 쓰기");
mPrefs = getSharedPreferences("SScommu", MODE_PRIVATE);
mUser = new User();
mUser.setId(mPrefs.getString("USER_ID", ""));
mUser.setNickname(mPrefs.getString("USER_NICKNAME", ""));
mUser.setAccountImgId(mPrefs.getInt("USER_ACCOUNT_IMG_ID", 0));
Intent intent = getIntent();
int categoryId = intent.getIntExtra("CATEGORY_ID", 0);
if (categoryId == 0) {
finish();
}
mGeneralCategory = new GeneralCategory();
mGeneralCategory.setId(categoryId);
mGeneralCategory.setUserId(intent.getStringExtra("CATEGORY_USERID"));
mGeneralCategory.setName(intent.getStringExtra("CATEGORY_NAME"));
mGeneralCategory.setInfo(intent.getStringExtra("CATEGORY_INFO"));
// To create a back button in the title bar
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
editText = findViewById(R.id.editText);
// Add a Floating Action Button
FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String text = editText.getText().toString().trim();
if (text.equals("")) {
Snackbar.make(view,
"내용을 입력하세요.",
Snackbar.LENGTH_SHORT).show();
editText.setText(text);
} else {
mText = text;
UploadToServerFunction();
}
}
});
/** 이미지 업로드 */
mUploadImages = new ArrayList<UploadImage>();
myActivityResultLauncher = registerForActivityResult(
new ActivityResultContracts.StartActivityForResult(),
new ActivityResultCallback<ActivityResult>() {
@Override
public void onActivityResult(ActivityResult result) {
customActivityResult(result);
}
});
btnUploadImage = findViewById(R.id.btnUploadImage);
btnUploadImage.setOnClickListener(this);
initiateUploadArray();
for (ConstraintLayout layout: mImageLayoutArray) {
layout.setVisibility(View.GONE);
}
for (ImageButton button: mBtnDeleteArray) {
button.setOnClickListener(this);
}
for (ImageButton button: mBtnRotateArray) {
button.setOnClickListener(this);
}
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.btnUploadImage:
if (mUploadImages.size() < MAX_IMAGES) {
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
myActivityResultLauncher.launch(intent);
} else {
Snackbar.make(view,
R.string.edit_general_activity_upload_image_info,
Snackbar.LENGTH_SHORT)
.show();
}
break;
/** 업로드한 이미지 삭제 */
case R.id.btnDelete_1:
deleteUploadImage(0);
break;
case R.id.btnDelete_2:
deleteUploadImage(1);
break;
case R.id.btnDelete_3:
deleteUploadImage(2);
break;
case R.id.btnDelete_4:
deleteUploadImage(3);
break;
case R.id.btnDelete_5:
deleteUploadImage(4);
break;
/** 업로드한 이미지 회전 */
case R.id.btnRotate_1:
rotateUploadImage(0);
break;
case R.id.btnRotate_2:
rotateUploadImage(1);
break;
case R.id.btnRotate_3:
rotateUploadImage(2);
break;
case R.id.btnRotate_4:
rotateUploadImage(3);
break;
case R.id.btnRotate_5:
rotateUploadImage(4);
break;
}
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
// Back button in the title bar
case android.R.id.home:
finish();
return true;
}
return false;
}
/** 업로드한 이미지 삭제 */
private void deleteUploadImage(int position) {
mUploadImages.remove(position);
for (int i = 0; i < MAX_IMAGES; i++) {
if (i < mUploadImages.size()) {
mImageLayoutArray[i].setVisibility(View.VISIBLE);
mImageViewArray[i].setImageBitmap(mUploadImages.get(i).getBitmap());
} else {
mImageLayoutArray[i].setVisibility(View.GONE);
}
}
}
/** 업로드한 이미지 회전 */
private void rotateUploadImage(int position) {
mUploadImages.get(position).rotateBitmap();
mImageViewArray[position].setImageBitmap(
mUploadImages.get(position).getBitmap());
}
/** 이미지 회전 Dialog 를 띄우고 이를 Activity 화면에 반영한다. */
private void uploadImageProcess(UploadImage uploadImage) {
DialogRotateImage dialog =
new DialogRotateImage(uploadImage,
mUploadImages,
mImageLayoutArray[mUploadImages.size()],
mImageViewArray[mUploadImages.size()]);
dialog.show(getSupportFragmentManager(), "123");
}
/** 이미지 업로드 */
private void customActivityResult(ActivityResult result) {
UploadImage uploadImage;
if (result.getResultCode() == Activity.RESULT_OK) {
Intent data = result.getData();
if (data != null && data.getData() != null) {
Uri uri = data.getData();
String mimeType = getContentResolver().getType(uri);
Cursor returnCursor =
getContentResolver().query(uri,
null, null, null, null);
/*
* Get the column indexes of the data in the Cursor,
* move to the first row in the Cursor, get the data,
*/
int nameIndex = returnCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
int sizeIndex = returnCursor.getColumnIndex(OpenableColumns.SIZE);
returnCursor.moveToFirst();
String name = returnCursor.getString(nameIndex);
Long size = returnCursor.getLong(sizeIndex);
try {
Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);
uploadImage = new UploadImage(bitmap, mimeType, name, size);
uploadImageProcess(uploadImage);
} catch (IOException e) {
// Handle exceptions
}
}
}
}
public void UploadToServerFunction() {
final ArrayList<String> ConvertImages = new ArrayList<>();
ByteArrayOutputStream byteArrayOutputStreamObject ;
byteArrayOutputStreamObject = new ByteArrayOutputStream();
for (UploadImage uploadImage: mUploadImages) {
// 업로드하는 이미지는 모두 JPEG 로 변환되어 저장된다.
uploadImage.compress(Bitmap.CompressFormat.JPEG,
100, byteArrayOutputStreamObject);
uploadImage.changeFileExtension("jpeg");
byte[] byteArrayVar = byteArrayOutputStreamObject.toByteArray();
ConvertImages.add(Base64.encodeToString(byteArrayVar, Base64.DEFAULT));
byteArrayOutputStreamObject.reset();
}
class AsyncTaskUploadClass extends AsyncTask<Void,Void,String> {
@Override
protected void onPreExecute() {
super.onPreExecute();
mProgressDialog = ProgressDialog.show(
EditGeneralActivity.this,
"업로드 중입니다.",
"잠시만 기다려 주세요.",
false,false);
}
@Override
protected void onPostExecute(String jsonString) {
super.onPostExecute(jsonString);
// Dismiss the progress dialog after done uploading.
mProgressDialog.dismiss();
try {
// Parsing String with JSONTokener to JSONObject
JSONTokener tokener = new JSONTokener(jsonString);
JSONObject response = new JSONObject(tokener);
if (!response.getBoolean("result")) {
Toast.makeText(EditGeneralActivity.this,
"FAIL", Toast.LENGTH_SHORT).show();
}
} catch (JSONException exc) {
// Handle exceptions
Toast.makeText(EditGeneralActivity.this,
"FAIL", Toast.LENGTH_SHORT).show();
}
finish();
}
@Override
protected String doInBackground(Void... params) {
String result;
Map<String, String> queryMap = new HashMap();
queryMap.put("id", mUser.getId());
queryMap.put("categoryid", String.valueOf(mGeneralCategory.getId()));
queryMap.put("text", mText);
int index = 0;
for (UploadImage uploadImage: mUploadImages) {
queryMap.put(IMAGE_NAME + String.valueOf(index), uploadImage.getName());
queryMap.put(IMAGE_PATH + String.valueOf(index), ConvertImages.get(index));
queryMap.put(IMAGE_WIDTH + String.valueOf(index),
String.valueOf(uploadImage.getBitmap().getWidth()));
queryMap.put(IMAGE_HEIGHT + String.valueOf(index),
String.valueOf(uploadImage.getBitmap().getHeight()));
index++;
}
SimpleHttpJSON simpleHttpJSON = new SimpleHttpJSON("editGeneral", queryMap);
try {
result = simpleHttpJSON.sendPost();
} catch (Exception exc) {
result = "";
}
return result;
}
}
if (isNetworkAvailable()) {
AsyncTaskUploadClass asyncTaskUploadObj = new AsyncTaskUploadClass();
asyncTaskUploadObj.execute();
} else {
Toast.makeText(EditGeneralActivity.this,
R.string.network_not_available, Toast.LENGTH_SHORT).show();
}
}
private boolean isNetworkAvailable() {
ConnectivityManager connectivityManager
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
}
private void initiateUploadArray() {
mImageLayoutArray = new ConstraintLayout[] {
findViewById(R.id.imageLayout_1),
findViewById(R.id.imageLayout_2),
findViewById(R.id.imageLayout_3),
findViewById(R.id.imageLayout_4),
findViewById(R.id.imageLayout_5)
};
mImageViewArray = new ImageView[] {
findViewById(R.id.imageView_1),
findViewById(R.id.imageView_2),
findViewById(R.id.imageView_3),
findViewById(R.id.imageView_4),
findViewById(R.id.imageView_5)
};
mBtnDeleteArray = new ImageButton[] {
findViewById(R.id.btnDelete_1),
findViewById(R.id.btnDelete_2),
findViewById(R.id.btnDelete_3),
findViewById(R.id.btnDelete_4),
findViewById(R.id.btnDelete_5),
};
mBtnRotateArray = new ImageButton[] {
findViewById(R.id.btnRotate_1),
findViewById(R.id.btnRotate_2),
findViewById(R.id.btnRotate_3),
findViewById(R.id.btnRotate_4),
findViewById(R.id.btnRotate_5),
};
}
}
|
leusonmario/2022PhDThesis
|
elasticsearch/f3d63095dbcc985e24162fbac4ee0d6914dc757d/randoop_5/RegressionTest3.java
|
<filename>elasticsearch/f3d63095dbcc985e24162fbac4ee0d6914dc757d/randoop_5/RegressionTest3.java
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class RegressionTest3 {
public static boolean debug = false;
@Test
public void test01501() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01501");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween((-1), (int) 'a');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01502() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01502");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween(0, (int) (byte) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01503() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01503");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomAsciiOfLengthBetween(100, (int) ' ');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01504() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01504");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
synonymsAnalysisTest0.tearDown();
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path13 = synonymsAnalysisTest0.getDataPath("<unknown>");
org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: resource not found: <unknown>");
} catch (java.lang.RuntimeException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
}
@Test
public void test01505() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01505");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((int) (short) 1, (int) (byte) 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01506() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01506");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService2 = null;
synonymsAnalysisTest0.analysisService = analysisService2;
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.Terms terms6 = null;
org.apache.lucene.index.Terms terms7 = null;
synonymsAnalysisTest0.assertTermsEquals("enwiki.random.lines.txt", indexReader5, terms6, terms7, true);
synonymsAnalysisTest0.tearDown();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.testSynonymsAnalysis();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
}
@Test
public void test01507() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01507");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween((int) '#', 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 35, 0");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01508() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01508");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newStringField(random0, "", "<unknown>", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01509() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01509");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
org.elasticsearch.index.analysis.AnalysisService analysisService3 = null;
synonymsAnalysisTest0.analysisService = analysisService3;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest5 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest5.setUp();
org.apache.lucene.index.IndexReader indexReader8 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
synonymsAnalysisTest5.assertDocsSkippingEquals("hi!", indexReader8, 0, postingsEnum10, postingsEnum11, true);
org.elasticsearch.index.analysis.AnalysisService analysisService14 = synonymsAnalysisTest5.analysisService;
org.junit.rules.RuleChain ruleChain15 = synonymsAnalysisTest5.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.PostingsEnum postingsEnum19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
synonymsAnalysisTest5.assertPositionsSkippingEquals("tests.badapples", indexReader17, (int) (short) 10, postingsEnum19, postingsEnum20);
org.junit.rules.RuleChain ruleChain22 = synonymsAnalysisTest5.failureAndSuccessEvents;
org.elasticsearch.index.analysis.AnalysisService analysisService23 = synonymsAnalysisTest5.analysisService;
org.elasticsearch.index.analysis.AnalysisService analysisService24 = synonymsAnalysisTest5.getanalysisService();
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) analysisService24);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.resetCheckIndexStatus();
org.apache.lucene.index.IndexReader indexReader29 = null;
org.apache.lucene.index.TermsEnum termsEnum30 = null;
org.apache.lucene.index.TermsEnum termsEnum31 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsEnumEquals("tests.nightly", indexReader29, termsEnum30, termsEnum31, false);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService14);
org.junit.Assert.assertNotNull(ruleChain15);
org.junit.Assert.assertNotNull(ruleChain22);
org.junit.Assert.assertNull(analysisService23);
org.junit.Assert.assertNull(analysisService24);
}
@Test
public void test01510() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01510");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.getlogger();
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment4 = synonymsAnalysisTest0.newNodeEnvironment();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
}
@Test
public void test01511() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01511");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween((-1), (int) (byte) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: min must be >= 0: -1");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01512() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01512");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
org.apache.lucene.util.LuceneTestCase.classRules = testRule9;
org.junit.Assert.assertNotNull(testRule9);
}
@Test
public void test01513() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01513");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.failfast");
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.elasticsearch.index.analysis.AnalysisService analysisService5 = null;
synonymsAnalysisTest0.analysisService = analysisService5;
org.apache.lucene.index.Terms terms8 = null;
org.apache.lucene.index.Terms terms9 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsStatisticsEquals("enwiki.random.lines.txt", terms8, terms9);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01514() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01514");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween((int) '4', (int) 'a');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01515() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01515");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path1 = org.apache.lucene.util.LuceneTestCase.createTempDir("random");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01516() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01516");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomAsciiOfLengthBetween((int) (short) -1, (int) 'a');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01517() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01517");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.elasticsearch.common.logging.ESLogger eSLogger12 = synonymsAnalysisTest0.getlogger();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest13 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest13.setUp();
org.apache.lucene.index.IndexReader indexReader16 = null;
org.apache.lucene.index.PostingsEnum postingsEnum18 = null;
org.apache.lucene.index.PostingsEnum postingsEnum19 = null;
synonymsAnalysisTest13.assertDocsSkippingEquals("hi!", indexReader16, 0, postingsEnum18, postingsEnum19, true);
org.elasticsearch.index.analysis.AnalysisService analysisService22 = synonymsAnalysisTest13.analysisService;
synonymsAnalysisTest13.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService24 = synonymsAnalysisTest13.analysisService;
org.elasticsearch.index.analysis.AnalysisService analysisService25 = null;
synonymsAnalysisTest13.analysisService = analysisService25;
synonymsAnalysisTest13.setIndexWriterMaxDocs((int) (byte) -1);
synonymsAnalysisTest13.overrideTestDefaultQueryCache();
synonymsAnalysisTest13.setIndexWriterMaxDocs(2);
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 2);
org.elasticsearch.common.settings.Settings settings33 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment34 = synonymsAnalysisTest0.newNodeEnvironment(settings33);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNotNull(eSLogger12);
org.junit.Assert.assertNull(analysisService22);
org.junit.Assert.assertNull(analysisService24);
}
@Test
public void test01518() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01518");
char[] charArray2 = new char[] { 'a' };
char[][] charArray3 = new char[][] { charArray2 };
// The following exception was thrown during execution in test generation
try {
java.util.List<char[]> charArrayList4 = org.elasticsearch.test.ESTestCase.randomSubsetOf((int) (byte) -1, charArray3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: fromIndex(0) > toIndex(-1)");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charArray2);
org.junit.Assert.assertEquals(java.lang.String.copyValueOf(charArray2), "a");
org.junit.Assert.assertEquals(java.lang.String.valueOf(charArray2), "a");
org.junit.Assert.assertEquals(java.util.Arrays.toString(charArray2), "[a]");
org.junit.Assert.assertNotNull(charArray3);
}
@Test
public void test01519() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01519");
org.junit.Assert.assertEquals("europarl.lines.txt.gz", (float) 2, (float) 100, (float) 100L);
}
@Test
public void test01520() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01520");
java.util.concurrent.ExecutorService executorService1 = null;
java.util.concurrent.ExecutorService[] executorServiceArray2 = new java.util.concurrent.ExecutorService[] { executorService1 };
boolean boolean3 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
boolean boolean4 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
java.util.concurrent.ExecutorService executorService6 = null;
java.util.concurrent.ExecutorService[] executorServiceArray7 = new java.util.concurrent.ExecutorService[] { executorService6 };
boolean boolean8 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
boolean boolean9 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray7, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray2, (java.lang.Object[]) executorServiceArray7);
java.io.PrintStream printStream13 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("tests.maxfailures", (java.lang.Object[]) executorServiceArray7, printStream13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray2);
org.junit.Assert.assertTrue("'" + boolean3 + "' != '" + true + "'", boolean3 == true);
org.junit.Assert.assertTrue("'" + boolean4 + "' != '" + true + "'", boolean4 == true);
org.junit.Assert.assertNotNull(executorServiceArray7);
org.junit.Assert.assertTrue("'" + boolean8 + "' != '" + true + "'", boolean8 == true);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
}
@Test
public void test01521() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01521");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false);
synonymsAnalysisTest0.assertPathHasBeenCleared("hi!");
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.junit.rules.RuleChain ruleChain25 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader27 = null;
org.apache.lucene.index.IndexReader indexReader28 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("tests.monster", indexReader27, indexReader28);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain25);
}
@Test
public void test01522() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01522");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.PostingsEnum postingsEnum14 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.badapples", indexReader12, (int) (short) 10, postingsEnum14, postingsEnum15);
java.lang.String str17 = synonymsAnalysisTest0.getTestName();
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
java.nio.file.Path path19 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path19);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain10);
org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>");
}
@Test
public void test01523() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01523");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLength((int) '#');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01524() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01524");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLength((int) (short) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01525() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01525");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween(4, 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01526() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01526");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(100, 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01527() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01527");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("<unknown>", "");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01528() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01528");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest5 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest5.setUp();
org.apache.lucene.index.IndexReader indexReader8 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
synonymsAnalysisTest5.assertDocsSkippingEquals("hi!", indexReader8, 0, postingsEnum10, postingsEnum11, true);
org.elasticsearch.index.analysis.AnalysisService analysisService14 = synonymsAnalysisTest5.analysisService;
org.junit.rules.RuleChain ruleChain15 = synonymsAnalysisTest5.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.PostingsEnum postingsEnum19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
synonymsAnalysisTest5.assertPositionsSkippingEquals("tests.badapples", indexReader17, (int) (short) 10, postingsEnum19, postingsEnum20);
org.junit.rules.RuleChain ruleChain22 = synonymsAnalysisTest5.failureAndSuccessEvents;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain22;
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.elasticsearch.index.analysis.AnalysisService analysisService25 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader27 = null;
org.apache.lucene.index.IndexReader indexReader28 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermVectorsEquals("<unknown>", indexReader27, indexReader28);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNull(analysisService14);
org.junit.Assert.assertNotNull(ruleChain15);
org.junit.Assert.assertNotNull(ruleChain22);
org.junit.Assert.assertNull(analysisService25);
}
@Test
public void test01529() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01529");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween((int) (short) 0, (int) (byte) 1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01530() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01530");
org.junit.Assert.assertEquals((float) 10, 0.0f, 10.0f);
}
@Test
public void test01531() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01531");
org.junit.Assert.assertNotEquals((long) '4', 100L);
}
@Test
public void test01532() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01532");
org.apache.lucene.document.FieldType fieldType2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newField("tests.monster", "<unknown>", fieldType2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01533() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01533");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.nightly");
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.IndexReader indexReader13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("tests.weekly", indexReader12, indexReader13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01534() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01534");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService2 = synonymsAnalysisTest1.getanalysisService();
org.apache.lucene.index.PostingsEnum postingsEnum4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
synonymsAnalysisTest1.assertDocsEnumEquals("tests.nightly", postingsEnum4, postingsEnum5, false);
org.elasticsearch.index.analysis.AnalysisService analysisService8 = synonymsAnalysisTest1.analysisService;
java.lang.Object obj9 = null;
org.junit.Assert.assertEquals("hi!", (java.lang.Object) analysisService8, obj9);
org.junit.Assert.assertNull(analysisService2);
org.junit.Assert.assertNull(analysisService8);
}
@Test
public void test01535() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01535");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("", indexReader6, fields7, fields8, true);
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.IndexReader indexReader13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("enwiki.random.lines.txt", indexReader12, indexReader13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01536() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01536");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) (short) 1);
synonymsAnalysisTest0.ensureCleanedUp();
org.elasticsearch.common.settings.Settings settings6 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment7 = synonymsAnalysisTest0.newNodeEnvironment(settings6);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01537() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01537");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween((int) '#', 2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 35, 2");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01538() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01538");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.tearDown();
synonymsAnalysisTest0.setIndexWriterMaxDocs(2);
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger7 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.IndexReader indexReader10 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("tests.monster", indexReader9, indexReader10);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
org.junit.Assert.assertNotNull(eSLogger7);
}
@Test
public void test01539() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01539");
java.util.Random random0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
synonymsAnalysisTest2.assertDocsEnumEquals("tests.badapples", postingsEnum4, postingsEnum5, true);
synonymsAnalysisTest2.assertPathHasBeenCleared("tests.monster");
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.PostingsEnum postingsEnum13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum14 = null;
synonymsAnalysisTest2.assertPositionsSkippingEquals("tests.weekly", indexReader11, (int) (short) 100, postingsEnum13, postingsEnum14);
org.elasticsearch.index.analysis.AnalysisService analysisService16 = null;
synonymsAnalysisTest2.setanalysisService(analysisService16);
org.apache.lucene.document.FieldType fieldType18 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field19 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.slow", (java.lang.Object) analysisService16, fieldType18);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01540() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01540");
org.apache.lucene.store.Directory directory0 = null;
// The following exception was thrown during execution in test generation
try {
boolean boolean2 = org.apache.lucene.util.LuceneTestCase.slowFileExists(directory0, "hi!");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01541() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01541");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) (short) 1, 1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01542() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01542");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(5, (int) 'a');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01543() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01543");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest5 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest5.setUp();
org.apache.lucene.index.IndexReader indexReader8 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
synonymsAnalysisTest5.assertDocsSkippingEquals("hi!", indexReader8, 0, postingsEnum10, postingsEnum11, true);
org.elasticsearch.index.analysis.AnalysisService analysisService14 = synonymsAnalysisTest5.analysisService;
org.junit.rules.RuleChain ruleChain15 = synonymsAnalysisTest5.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.PostingsEnum postingsEnum19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
synonymsAnalysisTest5.assertPositionsSkippingEquals("tests.badapples", indexReader17, (int) (short) 10, postingsEnum19, postingsEnum20);
org.junit.rules.RuleChain ruleChain22 = synonymsAnalysisTest5.failureAndSuccessEvents;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain22;
org.apache.lucene.index.IndexableField indexableField25 = null;
org.apache.lucene.index.IndexableField indexableField26 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("random", indexableField25, indexableField26);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNull(analysisService14);
org.junit.Assert.assertNotNull(ruleChain15);
org.junit.Assert.assertNotNull(ruleChain22);
}
@Test
public void test01544() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01544");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest1.analysisService;
synonymsAnalysisTest1.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest1.resetCheckIndexStatus();
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest1);
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest16 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest16.setUp();
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
synonymsAnalysisTest16.assertDocsSkippingEquals("hi!", indexReader19, 0, postingsEnum21, postingsEnum22, true);
org.elasticsearch.index.analysis.AnalysisService analysisService25 = synonymsAnalysisTest16.analysisService;
org.junit.rules.RuleChain ruleChain26 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.elasticsearch.common.logging.ESLogger eSLogger27 = synonymsAnalysisTest16.logger;
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) synonymsAnalysisTest16);
org.apache.lucene.index.IndexReader indexReader30 = null;
org.apache.lucene.index.IndexReader indexReader31 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest16.assertDeletedDocsEquals("tests.badapples", indexReader30, indexReader31);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNull(analysisService25);
org.junit.Assert.assertNotNull(ruleChain26);
org.junit.Assert.assertNotNull(eSLogger27);
}
@Test
public void test01545() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01545");
short[] shortArray2 = new short[] {};
short[] shortArray3 = new short[] {};
short[] shortArray4 = new short[] {};
short[] shortArray5 = new short[] {};
short[] shortArray6 = new short[] {};
short[][] shortArray7 = new short[][] { shortArray2, shortArray3, shortArray4, shortArray5, shortArray6 };
short[] shortArray8 = new short[] {};
short[] shortArray9 = new short[] {};
short[] shortArray10 = new short[] {};
short[] shortArray11 = new short[] {};
short[] shortArray12 = new short[] {};
short[][] shortArray13 = new short[][] { shortArray8, shortArray9, shortArray10, shortArray11, shortArray12 };
short[] shortArray14 = new short[] {};
short[] shortArray15 = new short[] {};
short[] shortArray16 = new short[] {};
short[] shortArray17 = new short[] {};
short[] shortArray18 = new short[] {};
short[][] shortArray19 = new short[][] { shortArray14, shortArray15, shortArray16, shortArray17, shortArray18 };
short[] shortArray20 = new short[] {};
short[] shortArray21 = new short[] {};
short[] shortArray22 = new short[] {};
short[] shortArray23 = new short[] {};
short[] shortArray24 = new short[] {};
short[][] shortArray25 = new short[][] { shortArray20, shortArray21, shortArray22, shortArray23, shortArray24 };
short[] shortArray26 = new short[] {};
short[] shortArray27 = new short[] {};
short[] shortArray28 = new short[] {};
short[] shortArray29 = new short[] {};
short[] shortArray30 = new short[] {};
short[][] shortArray31 = new short[][] { shortArray26, shortArray27, shortArray28, shortArray29, shortArray30 };
short[][][] shortArray32 = new short[][][] { shortArray7, shortArray13, shortArray19, shortArray25, shortArray31 };
java.util.List<short[][]> shortArrayList33 = org.elasticsearch.test.ESTestCase.randomSubsetOf(2, shortArray32);
java.io.PrintStream printStream34 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("europarl.lines.txt.gz", (java.lang.Object[]) shortArray32, printStream34);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(shortArray2);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray2), "[]");
org.junit.Assert.assertNotNull(shortArray3);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray3), "[]");
org.junit.Assert.assertNotNull(shortArray4);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray4), "[]");
org.junit.Assert.assertNotNull(shortArray5);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray5), "[]");
org.junit.Assert.assertNotNull(shortArray6);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray6), "[]");
org.junit.Assert.assertNotNull(shortArray7);
org.junit.Assert.assertNotNull(shortArray8);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray8), "[]");
org.junit.Assert.assertNotNull(shortArray9);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray9), "[]");
org.junit.Assert.assertNotNull(shortArray10);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray10), "[]");
org.junit.Assert.assertNotNull(shortArray11);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray11), "[]");
org.junit.Assert.assertNotNull(shortArray12);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray12), "[]");
org.junit.Assert.assertNotNull(shortArray13);
org.junit.Assert.assertNotNull(shortArray14);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray14), "[]");
org.junit.Assert.assertNotNull(shortArray15);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray15), "[]");
org.junit.Assert.assertNotNull(shortArray16);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray16), "[]");
org.junit.Assert.assertNotNull(shortArray17);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray17), "[]");
org.junit.Assert.assertNotNull(shortArray18);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray18), "[]");
org.junit.Assert.assertNotNull(shortArray19);
org.junit.Assert.assertNotNull(shortArray20);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray20), "[]");
org.junit.Assert.assertNotNull(shortArray21);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray21), "[]");
org.junit.Assert.assertNotNull(shortArray22);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray22), "[]");
org.junit.Assert.assertNotNull(shortArray23);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray23), "[]");
org.junit.Assert.assertNotNull(shortArray24);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray24), "[]");
org.junit.Assert.assertNotNull(shortArray25);
org.junit.Assert.assertNotNull(shortArray26);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray26), "[]");
org.junit.Assert.assertNotNull(shortArray27);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray27), "[]");
org.junit.Assert.assertNotNull(shortArray28);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray28), "[]");
org.junit.Assert.assertNotNull(shortArray29);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray29), "[]");
org.junit.Assert.assertNotNull(shortArray30);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray30), "[]");
org.junit.Assert.assertNotNull(shortArray31);
org.junit.Assert.assertNotNull(shortArray32);
org.junit.Assert.assertNotNull(shortArrayList33);
}
@Test
public void test01546() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01546");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.iterations((int) (byte) 100, 3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 100, 3");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01547() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01547");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLengthBetween((-1), 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01548() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01548");
org.junit.Assert.assertEquals((double) 10L, (double) 10L, (double) 2);
}
@Test
public void test01549() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01549");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween(4, 3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01550() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01550");
org.apache.lucene.search.QueryCachingPolicy queryCachingPolicy0 = org.apache.lucene.util.LuceneTestCase.MAYBE_CACHE_POLICY;
org.apache.lucene.search.QueryCachingPolicy queryCachingPolicy1 = org.apache.lucene.util.LuceneTestCase.MAYBE_CACHE_POLICY;
org.apache.lucene.search.QueryCachingPolicy queryCachingPolicy2 = org.apache.lucene.util.LuceneTestCase.MAYBE_CACHE_POLICY;
org.apache.lucene.search.QueryCachingPolicy[] queryCachingPolicyArray3 = new org.apache.lucene.search.QueryCachingPolicy[] { queryCachingPolicy0, queryCachingPolicy1, queryCachingPolicy2 };
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.search.QueryCachingPolicy queryCachingPolicy4 = org.elasticsearch.test.ESTestCase.randomFrom(queryCachingPolicyArray3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(queryCachingPolicy0);
org.junit.Assert.assertNotNull(queryCachingPolicy1);
org.junit.Assert.assertNotNull(queryCachingPolicy2);
org.junit.Assert.assertNotNull(queryCachingPolicyArray3);
}
@Test
public void test01551() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01551");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.junit.rules.RuleChain ruleChain5 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
org.apache.lucene.index.IndexReader indexReader8 = null;
org.apache.lucene.index.IndexReader indexReader9 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("tests.failfast", indexReader8, indexReader9);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(ruleChain5);
}
@Test
public void test01552() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01552");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.assumeFalse("tests.failfast", true);
org.junit.Assert.fail("Expected exception of type com.carrotsearch.randomizedtesting.InternalAssumptionViolatedException; message: tests.failfast");
} catch (org.junit.internal.AssumptionViolatedException e) {
// Expected exception.
}
}
@Test
public void test01553() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01553");
org.apache.lucene.document.FieldType fieldType2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newField("tests.monster", "enwiki.random.lines.txt", fieldType2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01554() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01554");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
synonymsAnalysisTest0.tearDown();
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.IndexReader indexReader16 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("tests.failfast", indexReader15, indexReader16);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01555() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01555");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
synonymsAnalysisTest1.ensureCheckIndexPassed();
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService5 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.Fields fields8 = null;
org.apache.lucene.index.Fields fields9 = null;
synonymsAnalysisTest1.assertFieldsEquals("tests.weekly", indexReader7, fields8, fields9, false);
synonymsAnalysisTest1.overrideTestDefaultQueryCache();
java.lang.String str13 = synonymsAnalysisTest1.getTestName();
synonymsAnalysisTest1.setIndexWriterMaxDocs((int) '4');
synonymsAnalysisTest1.tearDown();
org.junit.Assert.assertNotNull("enwiki.random.lines.txt", (java.lang.Object) synonymsAnalysisTest1);
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.IndexReader indexReader20 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertNormsEquals("tests.failfast", indexReader19, indexReader20);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService5);
org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>");
}
@Test
public void test01556() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01556");
org.apache.lucene.search.QueryCachingPolicy queryCachingPolicy1 = org.apache.lucene.util.LuceneTestCase.MAYBE_CACHE_POLICY;
org.apache.lucene.search.QueryCachingPolicy[] queryCachingPolicyArray2 = new org.apache.lucene.search.QueryCachingPolicy[] { queryCachingPolicy1 };
// The following exception was thrown during execution in test generation
try {
java.util.List<org.apache.lucene.search.QueryCachingPolicy> queryCachingPolicyList3 = org.elasticsearch.test.ESTestCase.randomSubsetOf((int) 'a', queryCachingPolicyArray2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: Can't pick 97 random objects from a list of 1 objects");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(queryCachingPolicy1);
org.junit.Assert.assertNotNull(queryCachingPolicyArray2);
}
@Test
public void test01557() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01557");
java.lang.CharSequence[] charSequenceArray12 = new java.lang.CharSequence[] { "", "<unknown>", "tests.maxfailures", "hi!", "tests.nightly", "tests.monster", "tests.failfast", "tests.maxfailures", "<unknown>", "tests.awaitsfix", "tests.slow", "tests.weekly" };
java.util.ArrayList<java.lang.CharSequence> charSequenceList13 = new java.util.ArrayList<java.lang.CharSequence>();
boolean boolean14 = java.util.Collections.addAll((java.util.Collection<java.lang.CharSequence>) charSequenceList13, charSequenceArray12);
// The following exception was thrown during execution in test generation
try {
java.lang.CharSequence charSequence15 = org.elasticsearch.test.ESTestCase.randomFrom((java.util.List<java.lang.CharSequence>) charSequenceList13);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charSequenceArray12);
org.junit.Assert.assertTrue("'" + boolean14 + "' != '" + true + "'", boolean14 == true);
}
@Test
public void test01558() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01558");
org.junit.Assert.assertNotEquals((long) 100, (long) 0);
}
@Test
public void test01559() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01559");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCleanedUp();
org.apache.lucene.index.Fields fields14 = null;
org.apache.lucene.index.Fields fields15 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("tests.awaitsfix", fields14, fields15);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
}
@Test
public void test01560() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01560");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.tearDown();
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray4 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
}
@Test
public void test01561() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01561");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.apache.lucene.index.IndexReader indexReader14 = null;
org.apache.lucene.index.Fields fields15 = null;
org.apache.lucene.index.Fields fields16 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader14, fields15, fields16, true);
org.apache.lucene.index.IndexReader indexReader20 = null;
org.apache.lucene.index.IndexReader indexReader21 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("tests.badapples", indexReader20, indexReader21);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNull(analysisService11);
}
@Test
public void test01562() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01562");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.setanalysisService(analysisService7);
java.lang.String str9 = synonymsAnalysisTest0.getTestName();
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.elasticsearch.common.logging.ESLogger eSLogger12 = synonymsAnalysisTest0.getlogger();
org.apache.lucene.index.Fields fields14 = null;
org.apache.lucene.index.Fields fields15 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("tests.failfast", fields14, fields15);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>");
org.junit.Assert.assertNotNull(ruleChain10);
org.junit.Assert.assertNotNull(eSLogger12);
}
@Test
public void test01563() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01563");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLength(100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01564() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01564");
java.lang.Runnable runnable0 = null;
java.util.concurrent.TimeUnit timeUnit2 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.test.ESTestCase.assertBusy(runnable0, (long) 5, timeUnit2);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01565() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01565");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.elasticsearch.common.settings.Settings settings13 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment14 = synonymsAnalysisTest0.newNodeEnvironment(settings13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNull(analysisService11);
}
@Test
public void test01566() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01566");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
synonymsAnalysisTest0.resetCheckIndexStatus();
org.apache.lucene.index.Terms terms13 = null;
org.apache.lucene.index.Terms terms14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsStatisticsEquals("random", terms13, terms14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
}
@Test
public void test01567() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01567");
java.lang.Object obj0 = null;
org.junit.Assert.assertNull(obj0);
}
@Test
public void test01568() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01568");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.IndexReader indexReader5 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("tests.badapples", indexReader4, indexReader5);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01569() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01569");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.elasticsearch.common.logging.ESLogger eSLogger16 = synonymsAnalysisTest0.logger;
org.junit.rules.TestRule testRule17 = synonymsAnalysisTest0.ruleChain;
org.apache.lucene.index.IndexableField indexableField19 = null;
org.apache.lucene.index.IndexableField indexableField20 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("tests.badapples", indexableField19, indexableField20);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(eSLogger16);
org.junit.Assert.assertNotNull(testRule17);
}
@Test
public void test01570() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01570");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between(1, 5);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01571() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01571");
org.junit.Assert.assertNotEquals((-1L), 0L);
}
@Test
public void test01572() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01572");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween((int) '4', (int) (byte) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 52, 10");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01573() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01573");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLengthBetween((int) (short) 1, 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01574() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01574");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween((int) (short) 0, (int) '4');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01575() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01575");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.index.MergePolicy mergePolicy1 = org.apache.lucene.util.LuceneTestCase.newLogMergePolicy(2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01576() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01576");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.IndexReader indexReader10 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("tests.maxfailures", indexReader9, indexReader10);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService7);
}
@Test
public void test01577() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01577");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.getlogger();
org.apache.lucene.index.Fields fields5 = null;
org.apache.lucene.index.Fields fields6 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("tests.slow", fields5, fields6);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(eSLogger3);
}
@Test
public void test01578() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01578");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween((int) '#', 3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01579() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01579");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
synonymsAnalysisTest1.ensureCheckIndexPassed();
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService5 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.Fields fields8 = null;
org.apache.lucene.index.Fields fields9 = null;
synonymsAnalysisTest1.assertFieldsEquals("tests.weekly", indexReader7, fields8, fields9, false);
synonymsAnalysisTest1.overrideTestDefaultQueryCache();
org.junit.Assert.assertNotEquals("tests.weekly", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) 4);
synonymsAnalysisTest1.setIndexWriterMaxDocs((int) (byte) 10);
org.apache.lucene.index.IndexReader indexReader18 = null;
org.apache.lucene.index.IndexReader indexReader19 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertReaderStatisticsEquals("tests.maxfailures", indexReader18, indexReader19);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService5);
}
@Test
public void test01580() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01580");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLength((int) '#');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01581() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01581");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between((int) 'a', (int) (short) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01582() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01582");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.PostingsEnum postingsEnum19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.maxfailures", indexReader17, 0, postingsEnum19, postingsEnum20);
org.elasticsearch.index.analysis.AnalysisService analysisService22 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
java.nio.file.Path path24 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path24);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService22);
}
@Test
public void test01583() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01583");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest1.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest4 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest4.setUp();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
synonymsAnalysisTest4.assertDocsSkippingEquals("hi!", indexReader7, 0, postingsEnum9, postingsEnum10, true);
org.elasticsearch.index.analysis.AnalysisService analysisService13 = synonymsAnalysisTest4.analysisService;
org.junit.rules.RuleChain ruleChain14 = synonymsAnalysisTest4.failureAndSuccessEvents;
synonymsAnalysisTest1.failureAndSuccessEvents = ruleChain14;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest16 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest16.setUp();
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
synonymsAnalysisTest16.assertDocsSkippingEquals("hi!", indexReader19, 0, postingsEnum21, postingsEnum22, true);
org.elasticsearch.index.analysis.AnalysisService analysisService25 = synonymsAnalysisTest16.analysisService;
org.junit.rules.RuleChain ruleChain26 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader28 = null;
org.apache.lucene.index.PostingsEnum postingsEnum30 = null;
org.apache.lucene.index.PostingsEnum postingsEnum31 = null;
synonymsAnalysisTest16.assertPositionsSkippingEquals("tests.badapples", indexReader28, (int) (short) 10, postingsEnum30, postingsEnum31);
org.junit.rules.RuleChain ruleChain33 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.junit.Assert.assertNotEquals("tests.slow", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) synonymsAnalysisTest16);
org.apache.lucene.index.IndexReader indexReader36 = null;
org.apache.lucene.index.IndexReader indexReader37 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest16.assertStoredFieldsEquals("hi!", indexReader36, indexReader37);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNull(analysisService13);
org.junit.Assert.assertNotNull(ruleChain14);
org.junit.Assert.assertNull(analysisService25);
org.junit.Assert.assertNotNull(ruleChain26);
org.junit.Assert.assertNotNull(ruleChain33);
}
@Test
public void test01584() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01584");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.Terms terms10 = null;
org.apache.lucene.index.Terms terms11 = null;
synonymsAnalysisTest0.assertTermsEquals("", indexReader9, terms10, terms11, false);
org.elasticsearch.common.settings.Settings settings14 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment15 = synonymsAnalysisTest0.newNodeEnvironment(settings14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01585() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01585");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.Terms terms13 = null;
org.apache.lucene.index.Terms terms14 = null;
synonymsAnalysisTest0.assertTermsEquals("europarl.lines.txt.gz", indexReader12, terms13, terms14, false);
org.elasticsearch.index.analysis.AnalysisService analysisService17 = null;
synonymsAnalysisTest0.analysisService = analysisService17;
org.elasticsearch.common.logging.ESLogger eSLogger19 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.IndexReader indexReader21 = null;
org.apache.lucene.index.IndexReader indexReader22 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("", indexReader21, indexReader22);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNotNull(eSLogger19);
}
@Test
public void test01586() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01586");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLength((int) (byte) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01587() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01587");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLengthBetween((int) (short) 1, (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01588() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01588");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
synonymsAnalysisTest0.assertPathHasBeenCleared("<unknown>");
org.elasticsearch.index.analysis.AnalysisService analysisService5 = null;
synonymsAnalysisTest0.setanalysisService(analysisService5);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexableField indexableField9 = null;
org.apache.lucene.index.IndexableField indexableField10 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("tests.monster", indexableField9, indexableField10);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService7);
}
@Test
public void test01589() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01589");
org.junit.Assert.assertEquals("tests.failfast", (long) (byte) 10, (long) (byte) 10);
}
@Test
public void test01590() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01590");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newStringField(random0, "hi!", "tests.maxfailures", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01591() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01591");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
synonymsAnalysisTest0.ensureCleanedUp();
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.IndexReader indexReader7 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("", indexReader6, indexReader7);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01592() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01592");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newStringField(random0, "tests.weekly", "tests.maxfailures", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01593() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01593");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest2.assertDocsSkippingEquals("hi!", indexReader5, 0, postingsEnum7, postingsEnum8, true);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest2.analysisService;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.Fields fields14 = null;
org.apache.lucene.index.Fields fields15 = null;
synonymsAnalysisTest2.assertFieldsEquals("random", indexReader13, fields14, fields15, true);
java.lang.String str18 = synonymsAnalysisTest2.getTestName();
org.elasticsearch.common.logging.ESLogger eSLogger19 = synonymsAnalysisTest2.logger;
org.junit.Assert.assertNotEquals("tests.awaitsfix", (java.lang.Object) "tests.nightly", (java.lang.Object) eSLogger19);
org.junit.Assert.assertNull(analysisService11);
org.junit.Assert.assertEquals("'" + str18 + "' != '" + "<unknown>" + "'", str18, "<unknown>");
org.junit.Assert.assertNotNull(eSLogger19);
}
@Test
public void test01594() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01594");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum4 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.nightly", postingsEnum3, postingsEnum4, false);
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.elasticsearch.common.settings.Settings settings8 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment9 = synonymsAnalysisTest0.newNodeEnvironment(settings8);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01595() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01595");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.elasticsearch.common.logging.ESLogger eSLogger4 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.IndexableField indexableField6 = null;
org.apache.lucene.index.IndexableField indexableField7 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("", indexableField6, indexableField7);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger4);
}
@Test
public void test01596() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01596");
java.lang.Runnable runnable0 = null;
java.util.concurrent.TimeUnit timeUnit2 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.test.ESTestCase.assertBusy(runnable0, (long) 0, timeUnit2);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01597() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01597");
org.apache.lucene.document.FieldType fieldType2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newField("tests.badapples", "tests.weekly", fieldType2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01598() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01598");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("tests.weekly", "hi!");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01599() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01599");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest10 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest10.setUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest10.assertDocsSkippingEquals("hi!", indexReader13, 0, postingsEnum15, postingsEnum16, true);
org.elasticsearch.index.analysis.AnalysisService analysisService19 = synonymsAnalysisTest10.analysisService;
org.apache.lucene.index.IndexReader indexReader21 = null;
org.apache.lucene.index.Fields fields22 = null;
org.apache.lucene.index.Fields fields23 = null;
synonymsAnalysisTest10.assertFieldsEquals("random", indexReader21, fields22, fields23, true);
org.apache.lucene.index.IndexReader indexReader27 = null;
org.apache.lucene.index.Terms terms28 = null;
org.apache.lucene.index.Terms terms29 = null;
synonymsAnalysisTest10.assertTermsEquals("tests.weekly", indexReader27, terms28, terms29, false);
synonymsAnalysisTest10.assertPathHasBeenCleared("hi!");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest34 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest34.setUp();
org.apache.lucene.index.IndexReader indexReader37 = null;
org.apache.lucene.index.PostingsEnum postingsEnum39 = null;
org.apache.lucene.index.PostingsEnum postingsEnum40 = null;
synonymsAnalysisTest34.assertDocsSkippingEquals("hi!", indexReader37, 0, postingsEnum39, postingsEnum40, true);
org.elasticsearch.index.analysis.AnalysisService analysisService43 = synonymsAnalysisTest34.analysisService;
org.junit.rules.RuleChain ruleChain44 = synonymsAnalysisTest34.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader46 = null;
org.apache.lucene.index.PostingsEnum postingsEnum48 = null;
org.apache.lucene.index.PostingsEnum postingsEnum49 = null;
synonymsAnalysisTest34.assertPositionsSkippingEquals("tests.badapples", indexReader46, (int) (short) 10, postingsEnum48, postingsEnum49);
org.junit.rules.RuleChain ruleChain51 = synonymsAnalysisTest34.failureAndSuccessEvents;
synonymsAnalysisTest10.failureAndSuccessEvents = ruleChain51;
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) ruleChain51);
org.elasticsearch.common.logging.ESLogger eSLogger54 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
synonymsAnalysisTest0.tearDown();
org.apache.lucene.index.IndexReader indexReader58 = null;
org.apache.lucene.index.IndexReader indexReader59 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("tests.slow", indexReader58, indexReader59);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService19);
org.junit.Assert.assertNull(analysisService43);
org.junit.Assert.assertNotNull(ruleChain44);
org.junit.Assert.assertNotNull(ruleChain51);
org.junit.Assert.assertNotNull(eSLogger54);
}
@Test
public void test01600() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01600");
java.util.Random random0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest2.assertDocsSkippingEquals("hi!", indexReader5, 0, postingsEnum7, postingsEnum8, true);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest2.analysisService;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.Fields fields14 = null;
org.apache.lucene.index.Fields fields15 = null;
synonymsAnalysisTest2.assertFieldsEquals("random", indexReader13, fields14, fields15, true);
synonymsAnalysisTest2.overrideTestDefaultQueryCache();
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest2, (java.lang.Object) "tests.badapples");
org.apache.lucene.document.FieldType fieldType21 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field22 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.failfast", (java.lang.Object) synonymsAnalysisTest2, fieldType21);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService11);
}
@Test
public void test01601() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01601");
java.util.concurrent.ExecutorService executorService2 = null;
java.util.concurrent.ExecutorService[] executorServiceArray3 = new java.util.concurrent.ExecutorService[] { executorService2 };
boolean boolean4 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray3);
boolean boolean5 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray3);
java.util.concurrent.ExecutorService executorService7 = null;
java.util.concurrent.ExecutorService[] executorServiceArray8 = new java.util.concurrent.ExecutorService[] { executorService7 };
boolean boolean9 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray8);
boolean boolean10 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray8);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray8, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray3, (java.lang.Object[]) executorServiceArray8);
java.util.concurrent.ExecutorService executorService15 = null;
java.util.concurrent.ExecutorService[] executorServiceArray16 = new java.util.concurrent.ExecutorService[] { executorService15 };
boolean boolean17 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray16);
boolean boolean18 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray16);
java.util.concurrent.ExecutorService executorService20 = null;
java.util.concurrent.ExecutorService[] executorServiceArray21 = new java.util.concurrent.ExecutorService[] { executorService20 };
boolean boolean22 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray21);
boolean boolean23 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray21);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray21, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray16, (java.lang.Object[]) executorServiceArray21);
java.util.concurrent.ExecutorService executorService27 = null;
java.util.concurrent.ExecutorService[] executorServiceArray28 = new java.util.concurrent.ExecutorService[] { executorService27 };
boolean boolean29 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray28);
boolean boolean30 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray28);
java.util.concurrent.ExecutorService executorService32 = null;
java.util.concurrent.ExecutorService[] executorServiceArray33 = new java.util.concurrent.ExecutorService[] { executorService32 };
boolean boolean34 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray33);
boolean boolean35 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray33);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray33, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray28, (java.lang.Object[]) executorServiceArray33);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray21, (java.lang.Object[]) executorServiceArray33);
org.junit.Assert.assertNotSame((java.lang.Object) "tests.awaitsfix", (java.lang.Object) executorServiceArray21);
org.junit.Assert.assertEquals("random", (java.lang.Object[]) executorServiceArray3, (java.lang.Object[]) executorServiceArray21);
boolean boolean42 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray21);
java.io.PrintStream printStream43 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("tests.monster", (java.lang.Object[]) executorServiceArray21, printStream43);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray3);
org.junit.Assert.assertTrue("'" + boolean4 + "' != '" + true + "'", boolean4 == true);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + true + "'", boolean5 == true);
org.junit.Assert.assertNotNull(executorServiceArray8);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
org.junit.Assert.assertTrue("'" + boolean10 + "' != '" + true + "'", boolean10 == true);
org.junit.Assert.assertNotNull(executorServiceArray16);
org.junit.Assert.assertTrue("'" + boolean17 + "' != '" + true + "'", boolean17 == true);
org.junit.Assert.assertTrue("'" + boolean18 + "' != '" + true + "'", boolean18 == true);
org.junit.Assert.assertNotNull(executorServiceArray21);
org.junit.Assert.assertTrue("'" + boolean22 + "' != '" + true + "'", boolean22 == true);
org.junit.Assert.assertTrue("'" + boolean23 + "' != '" + true + "'", boolean23 == true);
org.junit.Assert.assertNotNull(executorServiceArray28);
org.junit.Assert.assertTrue("'" + boolean29 + "' != '" + true + "'", boolean29 == true);
org.junit.Assert.assertTrue("'" + boolean30 + "' != '" + true + "'", boolean30 == true);
org.junit.Assert.assertNotNull(executorServiceArray33);
org.junit.Assert.assertTrue("'" + boolean34 + "' != '" + true + "'", boolean34 == true);
org.junit.Assert.assertTrue("'" + boolean35 + "' != '" + true + "'", boolean35 == true);
org.junit.Assert.assertTrue("'" + boolean42 + "' != '" + true + "'", boolean42 == true);
}
@Test
public void test01602() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01602");
java.util.concurrent.ExecutorService executorService3 = null;
java.util.concurrent.ExecutorService[] executorServiceArray4 = new java.util.concurrent.ExecutorService[] { executorService3 };
boolean boolean5 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray4);
boolean boolean6 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray4);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray4, (java.lang.Object) (-1.0f));
boolean boolean9 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray4);
java.util.concurrent.ExecutorService executorService10 = null;
java.util.concurrent.ExecutorService[] executorServiceArray11 = new java.util.concurrent.ExecutorService[] { executorService10 };
boolean boolean12 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray11);
boolean boolean13 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray11);
java.util.concurrent.ExecutorService executorService15 = null;
java.util.concurrent.ExecutorService[] executorServiceArray16 = new java.util.concurrent.ExecutorService[] { executorService15 };
boolean boolean17 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray16);
boolean boolean18 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray16);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray16, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray11, (java.lang.Object[]) executorServiceArray16);
java.util.concurrent.ExecutorService executorService22 = null;
java.util.concurrent.ExecutorService[] executorServiceArray23 = new java.util.concurrent.ExecutorService[] { executorService22 };
boolean boolean24 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray23);
boolean boolean25 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray23);
java.util.concurrent.ExecutorService executorService27 = null;
java.util.concurrent.ExecutorService[] executorServiceArray28 = new java.util.concurrent.ExecutorService[] { executorService27 };
boolean boolean29 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray28);
boolean boolean30 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray28);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray28, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray23, (java.lang.Object[]) executorServiceArray28);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray16, (java.lang.Object[]) executorServiceArray28);
org.junit.Assert.assertEquals("tests.weekly", (java.lang.Object[]) executorServiceArray4, (java.lang.Object[]) executorServiceArray16);
boolean boolean36 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray16);
java.io.PrintStream printStream37 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("europarl.lines.txt.gz", (java.lang.Object[]) executorServiceArray16, printStream37);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray4);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + true + "'", boolean5 == true);
org.junit.Assert.assertTrue("'" + boolean6 + "' != '" + true + "'", boolean6 == true);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
org.junit.Assert.assertNotNull(executorServiceArray11);
org.junit.Assert.assertTrue("'" + boolean12 + "' != '" + true + "'", boolean12 == true);
org.junit.Assert.assertTrue("'" + boolean13 + "' != '" + true + "'", boolean13 == true);
org.junit.Assert.assertNotNull(executorServiceArray16);
org.junit.Assert.assertTrue("'" + boolean17 + "' != '" + true + "'", boolean17 == true);
org.junit.Assert.assertTrue("'" + boolean18 + "' != '" + true + "'", boolean18 == true);
org.junit.Assert.assertNotNull(executorServiceArray23);
org.junit.Assert.assertTrue("'" + boolean24 + "' != '" + true + "'", boolean24 == true);
org.junit.Assert.assertTrue("'" + boolean25 + "' != '" + true + "'", boolean25 == true);
org.junit.Assert.assertNotNull(executorServiceArray28);
org.junit.Assert.assertTrue("'" + boolean29 + "' != '" + true + "'", boolean29 == true);
org.junit.Assert.assertTrue("'" + boolean30 + "' != '" + true + "'", boolean30 == true);
org.junit.Assert.assertTrue("'" + boolean36 + "' != '" + true + "'", boolean36 == true);
}
@Test
public void test01603() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01603");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between((int) (short) 10, 2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01604() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01604");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("tests.maxfailures", "tests.awaitsfix");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01605() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01605");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService2 = null;
synonymsAnalysisTest0.analysisService = analysisService2;
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.maxfailures");
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("tests.monster", fields7, fields8);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
}
@Test
public void test01606() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01606");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newTextField("tests.badapples", "europarl.lines.txt.gz", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01607() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01607");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService3 = null;
synonymsAnalysisTest0.analysisService = analysisService3;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.awaitsfix", indexReader6, fields7, fields8, true);
org.apache.lucene.index.IndexableField indexableField12 = null;
org.apache.lucene.index.IndexableField indexableField13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("", indexableField12, indexableField13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
}
@Test
public void test01608() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01608");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
java.lang.Object obj4 = null;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, obj4);
org.junit.rules.TestRule testRule6 = synonymsAnalysisTest0.ruleChain;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
org.elasticsearch.common.logging.ESLogger eSLogger9 = synonymsAnalysisTest0.logger;
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path11 = synonymsAnalysisTest0.getDataPath("europarl.lines.txt.gz");
org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: resource not found: europarl.lines.txt.gz");
} catch (java.lang.RuntimeException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(testRule6);
org.junit.Assert.assertNotNull(eSLogger9);
}
@Test
public void test01609() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01609");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
org.elasticsearch.index.analysis.AnalysisService analysisService3 = null;
synonymsAnalysisTest0.analysisService = analysisService3;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.IndexReader indexReader7 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("<unknown>", indexReader6, indexReader7);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01610() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01610");
org.junit.Assert.assertTrue("tests.nightly", true);
}
@Test
public void test01611() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01611");
java.text.Collator collator0 = null;
// The following exception was thrown during execution in test generation
try {
int int3 = org.apache.lucene.util.LuceneTestCase.collate(collator0, "<unknown>", "tests.nightly");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01612() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01612");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween(0, (-1));
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01613() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01613");
org.junit.Assert.assertNotEquals((long) 10, (long) 4);
}
@Test
public void test01614() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01614");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) 10);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.IndexReader indexReader12 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("<unknown>", indexReader11, indexReader12);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
}
@Test
public void test01615() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01615");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.ensureCleanedUp();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.IndexReader indexReader8 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("", indexReader7, indexReader8);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01616() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01616");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.tearDown();
synonymsAnalysisTest0.setIndexWriterMaxDocs(2);
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.maxfailures", postingsEnum8, postingsEnum9, true);
org.elasticsearch.common.logging.ESLogger eSLogger12 = synonymsAnalysisTest0.getlogger();
java.util.concurrent.ExecutorService executorService13 = null;
java.util.concurrent.ExecutorService[] executorServiceArray14 = new java.util.concurrent.ExecutorService[] { executorService13 };
boolean boolean15 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray14);
boolean boolean16 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray14);
java.util.concurrent.ExecutorService executorService18 = null;
java.util.concurrent.ExecutorService[] executorServiceArray19 = new java.util.concurrent.ExecutorService[] { executorService18 };
boolean boolean20 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray19);
boolean boolean21 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray19);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray19, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray14, (java.lang.Object[]) executorServiceArray19);
java.util.concurrent.ExecutorService executorService25 = null;
java.util.concurrent.ExecutorService[] executorServiceArray26 = new java.util.concurrent.ExecutorService[] { executorService25 };
boolean boolean27 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray26);
boolean boolean28 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray26);
java.util.concurrent.ExecutorService executorService30 = null;
java.util.concurrent.ExecutorService[] executorServiceArray31 = new java.util.concurrent.ExecutorService[] { executorService30 };
boolean boolean32 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray31);
boolean boolean33 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray31);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray31, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray26, (java.lang.Object[]) executorServiceArray31);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray19, (java.lang.Object[]) executorServiceArray31);
boolean boolean38 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray19);
org.junit.Assert.assertNotEquals((java.lang.Object) eSLogger12, (java.lang.Object) boolean38);
org.junit.Assert.assertNotNull(eSLogger2);
org.junit.Assert.assertNotNull(eSLogger12);
org.junit.Assert.assertNotNull(executorServiceArray14);
org.junit.Assert.assertTrue("'" + boolean15 + "' != '" + true + "'", boolean15 == true);
org.junit.Assert.assertTrue("'" + boolean16 + "' != '" + true + "'", boolean16 == true);
org.junit.Assert.assertNotNull(executorServiceArray19);
org.junit.Assert.assertTrue("'" + boolean20 + "' != '" + true + "'", boolean20 == true);
org.junit.Assert.assertTrue("'" + boolean21 + "' != '" + true + "'", boolean21 == true);
org.junit.Assert.assertNotNull(executorServiceArray26);
org.junit.Assert.assertTrue("'" + boolean27 + "' != '" + true + "'", boolean27 == true);
org.junit.Assert.assertTrue("'" + boolean28 + "' != '" + true + "'", boolean28 == true);
org.junit.Assert.assertNotNull(executorServiceArray31);
org.junit.Assert.assertTrue("'" + boolean32 + "' != '" + true + "'", boolean32 == true);
org.junit.Assert.assertTrue("'" + boolean33 + "' != '" + true + "'", boolean33 == true);
org.junit.Assert.assertTrue("'" + boolean38 + "' != '" + true + "'", boolean38 == true);
}
@Test
public void test01617() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01617");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newTextField(random0, "tests.monster", "tests.badapples", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01618() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01618");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.setanalysisService(analysisService7);
java.lang.String str9 = synonymsAnalysisTest0.getTestName();
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.PostingsEnum postingsEnum14 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("", indexReader12, 0, postingsEnum14, postingsEnum15);
org.apache.lucene.index.IndexReader indexReader18 = null;
org.apache.lucene.index.IndexReader indexReader19 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("tests.maxfailures", indexReader18, indexReader19);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>");
org.junit.Assert.assertNotNull(ruleChain10);
}
@Test
public void test01619() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01619");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.elasticsearch.index.analysis.AnalysisService analysisService16 = null;
synonymsAnalysisTest0.setanalysisService(analysisService16);
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.IndexReader indexReader20 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermVectorsEquals("tests.nightly", indexReader19, indexReader20);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01620() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01620");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLength((int) (short) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01621() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01621");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween((int) (byte) 1, (int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01622() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01622");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
org.elasticsearch.common.logging.ESLogger eSLogger9 = synonymsAnalysisTest0.logger;
org.elasticsearch.common.settings.Settings settings10 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment11 = synonymsAnalysisTest0.newNodeEnvironment(settings10);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger9);
}
@Test
public void test01623() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01623");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest1.analysisService;
synonymsAnalysisTest1.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum17 = null;
org.apache.lucene.index.PostingsEnum postingsEnum18 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("", indexReader15, (int) '4', postingsEnum17, postingsEnum18, false);
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
org.apache.lucene.index.PostingsEnum postingsEnum23 = null;
synonymsAnalysisTest1.assertDocsEnumEquals("random", postingsEnum22, postingsEnum23, false);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest26 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest26.setUp();
org.apache.lucene.index.IndexReader indexReader29 = null;
org.apache.lucene.index.PostingsEnum postingsEnum31 = null;
org.apache.lucene.index.PostingsEnum postingsEnum32 = null;
synonymsAnalysisTest26.assertDocsSkippingEquals("hi!", indexReader29, 0, postingsEnum31, postingsEnum32, true);
org.elasticsearch.index.analysis.AnalysisService analysisService35 = synonymsAnalysisTest26.analysisService;
org.junit.rules.RuleChain ruleChain36 = synonymsAnalysisTest26.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader38 = null;
org.apache.lucene.index.PostingsEnum postingsEnum40 = null;
org.apache.lucene.index.PostingsEnum postingsEnum41 = null;
synonymsAnalysisTest26.assertPositionsSkippingEquals("tests.badapples", indexReader38, (int) (short) 10, postingsEnum40, postingsEnum41);
org.junit.rules.RuleChain ruleChain43 = synonymsAnalysisTest26.failureAndSuccessEvents;
org.elasticsearch.index.analysis.AnalysisService analysisService44 = synonymsAnalysisTest26.analysisService;
org.junit.Assert.assertNotSame("tests.nightly", (java.lang.Object) false, (java.lang.Object) analysisService44);
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNull(analysisService35);
org.junit.Assert.assertNotNull(ruleChain36);
org.junit.Assert.assertNotNull(ruleChain43);
org.junit.Assert.assertNull(analysisService44);
}
@Test
public void test01624() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01624");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.elasticsearch.index.analysis.AnalysisService analysisService11 = null;
synonymsAnalysisTest0.setanalysisService(analysisService11);
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray13 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01625() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01625");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between(0, (int) (short) 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01626() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01626");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService11 = null;
synonymsAnalysisTest0.setanalysisService(analysisService11);
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path14 = synonymsAnalysisTest0.getDataPath("tests.failfast");
org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: resource not found: tests.failfast");
} catch (java.lang.RuntimeException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01627() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01627");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
synonymsAnalysisTest0.resetCheckIndexStatus();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.IndexReader indexReader14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("hi!", indexReader13, indexReader14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain10);
}
@Test
public void test01628() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01628");
org.junit.Assert.assertEquals("tests.awaitsfix", (float) (byte) 100, (float) 'a', (float) 3);
}
@Test
public void test01629() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01629");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) '4', 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01630() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01630");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false);
org.apache.lucene.index.IndexReader indexReader23 = null;
org.apache.lucene.index.IndexReader indexReader24 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("tests.slow", indexReader23, indexReader24);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01631() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01631");
java.lang.Runnable runnable0 = null;
java.util.concurrent.TimeUnit timeUnit2 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.test.ESTestCase.assertBusy(runnable0, (long) 4, timeUnit2);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01632() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01632");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray7 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01633() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01633");
org.junit.Assert.assertNotEquals((double) (byte) -1, (double) 3, (double) (short) 0);
}
@Test
public void test01634() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01634");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest1.logger;
synonymsAnalysisTest1.tearDown();
synonymsAnalysisTest1.setIndexWriterMaxDocs(0);
java.util.concurrent.ExecutorService[] executorServiceArray8 = new java.util.concurrent.ExecutorService[] {};
boolean boolean9 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray8);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest10 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest10.setUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest10.assertDocsSkippingEquals("hi!", indexReader13, 0, postingsEnum15, postingsEnum16, true);
org.elasticsearch.index.analysis.AnalysisService analysisService19 = null;
synonymsAnalysisTest10.setanalysisService(analysisService19);
org.elasticsearch.common.logging.ESLogger eSLogger21 = synonymsAnalysisTest10.logger;
org.junit.Assert.assertNotEquals("tests.monster", (java.lang.Object) executorServiceArray8, (java.lang.Object) synonymsAnalysisTest10);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest23 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum25 = null;
org.apache.lucene.index.PostingsEnum postingsEnum26 = null;
synonymsAnalysisTest23.assertDocsEnumEquals("tests.badapples", postingsEnum25, postingsEnum26, true);
synonymsAnalysisTest23.ensureAllSearchContextsReleased();
synonymsAnalysisTest23.setIndexWriterMaxDocs((int) (short) 10);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest33 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest33.setUp();
org.apache.lucene.index.IndexReader indexReader36 = null;
org.apache.lucene.index.PostingsEnum postingsEnum38 = null;
org.apache.lucene.index.PostingsEnum postingsEnum39 = null;
synonymsAnalysisTest33.assertDocsSkippingEquals("hi!", indexReader36, 0, postingsEnum38, postingsEnum39, true);
org.elasticsearch.index.analysis.AnalysisService analysisService42 = null;
synonymsAnalysisTest33.setanalysisService(analysisService42);
org.elasticsearch.common.logging.ESLogger eSLogger44 = synonymsAnalysisTest33.logger;
java.lang.Object obj45 = null;
org.junit.Assert.assertNotEquals("tests.maxfailures", (java.lang.Object) synonymsAnalysisTest33, obj45);
org.junit.rules.TestRule testRule47 = synonymsAnalysisTest33.ruleChain;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest48 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest48.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger50 = synonymsAnalysisTest48.logger;
synonymsAnalysisTest48.tearDown();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest[] synonymsAnalysisTestArray52 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest[] { synonymsAnalysisTest23, synonymsAnalysisTest33, synonymsAnalysisTest48 };
java.util.Set<org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest> synonymsAnalysisTestSet53 = org.apache.lucene.util.LuceneTestCase.asSet(synonymsAnalysisTestArray52);
java.util.Set<org.apache.lucene.util.LuceneTestCase> luceneTestCaseSet54 = org.apache.lucene.util.LuceneTestCase.asSet((org.apache.lucene.util.LuceneTestCase[]) synonymsAnalysisTestArray52);
java.util.Set<org.apache.lucene.util.LuceneTestCase> luceneTestCaseSet55 = org.apache.lucene.util.LuceneTestCase.asSet((org.apache.lucene.util.LuceneTestCase[]) synonymsAnalysisTestArray52);
org.junit.Assert.assertNotEquals((java.lang.Object) "tests.monster", (java.lang.Object) luceneTestCaseSet55);
org.junit.Assert.assertNotSame("tests.awaitsfix", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) "tests.monster");
org.apache.lucene.index.IndexReader indexReader59 = null;
org.apache.lucene.index.IndexReader indexReader60 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertNormsEquals("tests.monster", indexReader59, indexReader60);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNotNull(executorServiceArray8);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
org.junit.Assert.assertNotNull(eSLogger21);
org.junit.Assert.assertNotNull(eSLogger44);
org.junit.Assert.assertNotNull(testRule47);
org.junit.Assert.assertNotNull(eSLogger50);
org.junit.Assert.assertNotNull(synonymsAnalysisTestArray52);
org.junit.Assert.assertNotNull(synonymsAnalysisTestSet53);
org.junit.Assert.assertNotNull(luceneTestCaseSet54);
org.junit.Assert.assertNotNull(luceneTestCaseSet55);
}
@Test
public void test01635() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01635");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.AnalysisService analysisService12 = null;
synonymsAnalysisTest0.analysisService = analysisService12;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (byte) -1);
java.lang.String str16 = synonymsAnalysisTest0.getTestName();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest18 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest18.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger20 = synonymsAnalysisTest18.logger;
java.lang.Object obj21 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest22 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService23 = synonymsAnalysisTest22.getanalysisService();
synonymsAnalysisTest22.overrideTestDefaultQueryCache();
synonymsAnalysisTest22.overrideTestDefaultQueryCache();
synonymsAnalysisTest22.setUp();
org.junit.Assert.assertNotEquals(obj21, (java.lang.Object) synonymsAnalysisTest22);
org.elasticsearch.index.analysis.AnalysisService analysisService28 = synonymsAnalysisTest22.getanalysisService();
org.elasticsearch.common.logging.ESLogger eSLogger29 = synonymsAnalysisTest22.logger;
org.junit.Assert.assertNotSame("tests.monster", (java.lang.Object) synonymsAnalysisTest18, (java.lang.Object) eSLogger29);
org.apache.lucene.index.IndexReader indexReader32 = null;
org.apache.lucene.index.Terms terms33 = null;
org.apache.lucene.index.Terms terms34 = null;
synonymsAnalysisTest18.assertTermsEquals("<unknown>", indexReader32, terms33, terms34, false);
org.apache.lucene.index.IndexReader indexReader38 = null;
org.apache.lucene.index.PostingsEnum postingsEnum40 = null;
org.apache.lucene.index.PostingsEnum postingsEnum41 = null;
synonymsAnalysisTest18.assertDocsSkippingEquals("tests.slow", indexReader38, (int) ' ', postingsEnum40, postingsEnum41, false);
org.junit.Assert.assertNotSame((java.lang.Object) str16, (java.lang.Object) synonymsAnalysisTest18);
org.apache.lucene.index.IndexReader indexReader46 = null;
org.apache.lucene.index.IndexReader indexReader47 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest18.assertNormsEquals("tests.failfast", indexReader46, indexReader47);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService11);
org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>");
org.junit.Assert.assertNotNull(eSLogger20);
org.junit.Assert.assertNull(analysisService23);
org.junit.Assert.assertNull(analysisService28);
org.junit.Assert.assertNotNull(eSLogger29);
}
@Test
public void test01636() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01636");
char[] charArray3 = new char[] { '#', '#', ' ' };
char[] charArray7 = new char[] { '#', '#', ' ' };
char[] charArray11 = new char[] { '#', '#', ' ' };
char[][] charArray12 = new char[][] { charArray3, charArray7, charArray11 };
// The following exception was thrown during execution in test generation
try {
char[] charArray13 = org.elasticsearch.test.ESTestCase.randomFrom(charArray12);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charArray3);
org.junit.Assert.assertEquals(java.lang.String.copyValueOf(charArray3), "## ");
org.junit.Assert.assertEquals(java.lang.String.valueOf(charArray3), "## ");
org.junit.Assert.assertEquals(java.util.Arrays.toString(charArray3), "[#, #, ]");
org.junit.Assert.assertNotNull(charArray7);
org.junit.Assert.assertEquals(java.lang.String.copyValueOf(charArray7), "## ");
org.junit.Assert.assertEquals(java.lang.String.valueOf(charArray7), "## ");
org.junit.Assert.assertEquals(java.util.Arrays.toString(charArray7), "[#, #, ]");
org.junit.Assert.assertNotNull(charArray11);
org.junit.Assert.assertEquals(java.lang.String.copyValueOf(charArray11), "## ");
org.junit.Assert.assertEquals(java.lang.String.valueOf(charArray11), "## ");
org.junit.Assert.assertEquals(java.util.Arrays.toString(charArray11), "[#, #, ]");
org.junit.Assert.assertNotNull(charArray12);
}
@Test
public void test01637() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01637");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("tests.maxfailures", "tests.weekly");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01638() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01638");
java.util.concurrent.ExecutorService executorService1 = null;
java.util.concurrent.ExecutorService[] executorServiceArray2 = new java.util.concurrent.ExecutorService[] { executorService1 };
boolean boolean3 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
boolean boolean4 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
java.util.concurrent.ExecutorService executorService6 = null;
java.util.concurrent.ExecutorService[] executorServiceArray7 = new java.util.concurrent.ExecutorService[] { executorService6 };
boolean boolean8 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
boolean boolean9 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray7, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray2, (java.lang.Object[]) executorServiceArray7);
java.util.concurrent.ExecutorService executorService13 = null;
java.util.concurrent.ExecutorService[] executorServiceArray14 = new java.util.concurrent.ExecutorService[] { executorService13 };
boolean boolean15 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray14);
boolean boolean16 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray14);
java.util.concurrent.ExecutorService executorService18 = null;
java.util.concurrent.ExecutorService[] executorServiceArray19 = new java.util.concurrent.ExecutorService[] { executorService18 };
boolean boolean20 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray19);
boolean boolean21 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray19);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray19, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray14, (java.lang.Object[]) executorServiceArray19);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray7, (java.lang.Object[]) executorServiceArray19);
boolean boolean26 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
java.util.concurrent.ExecutorService executorService27 = null;
java.util.concurrent.ExecutorService[] executorServiceArray28 = new java.util.concurrent.ExecutorService[] { executorService27 };
boolean boolean29 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray28);
boolean boolean30 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray28);
java.util.concurrent.ExecutorService executorService32 = null;
java.util.concurrent.ExecutorService[] executorServiceArray33 = new java.util.concurrent.ExecutorService[] { executorService32 };
boolean boolean34 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray33);
boolean boolean35 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray33);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray33, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray28, (java.lang.Object[]) executorServiceArray33);
java.util.concurrent.ExecutorService executorService40 = null;
java.util.concurrent.ExecutorService[] executorServiceArray41 = new java.util.concurrent.ExecutorService[] { executorService40 };
boolean boolean42 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray41);
boolean boolean43 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray41);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray41, (java.lang.Object) (-1.0f));
boolean boolean46 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray41);
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray33, (java.lang.Object[]) executorServiceArray41);
java.util.concurrent.ExecutorService executorService49 = null;
java.util.concurrent.ExecutorService[] executorServiceArray50 = new java.util.concurrent.ExecutorService[] { executorService49 };
boolean boolean51 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray50);
boolean boolean52 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray50);
java.util.concurrent.ExecutorService executorService54 = null;
java.util.concurrent.ExecutorService[] executorServiceArray55 = new java.util.concurrent.ExecutorService[] { executorService54 };
boolean boolean56 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray55);
boolean boolean57 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray55);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray55, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray50, (java.lang.Object[]) executorServiceArray55);
java.util.concurrent.ExecutorService executorService62 = null;
java.util.concurrent.ExecutorService[] executorServiceArray63 = new java.util.concurrent.ExecutorService[] { executorService62 };
boolean boolean64 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray63);
boolean boolean65 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray63);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray63, (java.lang.Object) (-1.0f));
boolean boolean68 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray63);
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray55, (java.lang.Object[]) executorServiceArray63);
org.junit.Assert.assertNotSame("<unknown>", (java.lang.Object) executorServiceArray63, (java.lang.Object) (byte) 0);
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray41, (java.lang.Object[]) executorServiceArray63);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray7, (java.lang.Object[]) executorServiceArray41);
java.util.concurrent.ExecutorService executorService74 = null;
java.util.concurrent.ExecutorService[] executorServiceArray75 = new java.util.concurrent.ExecutorService[] { executorService74 };
boolean boolean76 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray75);
boolean boolean77 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray75);
java.util.concurrent.ExecutorService executorService79 = null;
java.util.concurrent.ExecutorService[] executorServiceArray80 = new java.util.concurrent.ExecutorService[] { executorService79 };
boolean boolean81 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray80);
boolean boolean82 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray80);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray80, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray75, (java.lang.Object[]) executorServiceArray80);
java.util.concurrent.ExecutorService executorService87 = null;
java.util.concurrent.ExecutorService[] executorServiceArray88 = new java.util.concurrent.ExecutorService[] { executorService87 };
boolean boolean89 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray88);
boolean boolean90 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray88);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray88, (java.lang.Object) (-1.0f));
boolean boolean93 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray88);
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray80, (java.lang.Object[]) executorServiceArray88);
org.junit.Assert.assertNotEquals((java.lang.Object) executorServiceArray41, (java.lang.Object) executorServiceArray80);
java.io.PrintStream printStream96 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("tests.slow", (java.lang.Object[]) executorServiceArray41, printStream96);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray2);
org.junit.Assert.assertTrue("'" + boolean3 + "' != '" + true + "'", boolean3 == true);
org.junit.Assert.assertTrue("'" + boolean4 + "' != '" + true + "'", boolean4 == true);
org.junit.Assert.assertNotNull(executorServiceArray7);
org.junit.Assert.assertTrue("'" + boolean8 + "' != '" + true + "'", boolean8 == true);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
org.junit.Assert.assertNotNull(executorServiceArray14);
org.junit.Assert.assertTrue("'" + boolean15 + "' != '" + true + "'", boolean15 == true);
org.junit.Assert.assertTrue("'" + boolean16 + "' != '" + true + "'", boolean16 == true);
org.junit.Assert.assertNotNull(executorServiceArray19);
org.junit.Assert.assertTrue("'" + boolean20 + "' != '" + true + "'", boolean20 == true);
org.junit.Assert.assertTrue("'" + boolean21 + "' != '" + true + "'", boolean21 == true);
org.junit.Assert.assertTrue("'" + boolean26 + "' != '" + true + "'", boolean26 == true);
org.junit.Assert.assertNotNull(executorServiceArray28);
org.junit.Assert.assertTrue("'" + boolean29 + "' != '" + true + "'", boolean29 == true);
org.junit.Assert.assertTrue("'" + boolean30 + "' != '" + true + "'", boolean30 == true);
org.junit.Assert.assertNotNull(executorServiceArray33);
org.junit.Assert.assertTrue("'" + boolean34 + "' != '" + true + "'", boolean34 == true);
org.junit.Assert.assertTrue("'" + boolean35 + "' != '" + true + "'", boolean35 == true);
org.junit.Assert.assertNotNull(executorServiceArray41);
org.junit.Assert.assertTrue("'" + boolean42 + "' != '" + true + "'", boolean42 == true);
org.junit.Assert.assertTrue("'" + boolean43 + "' != '" + true + "'", boolean43 == true);
org.junit.Assert.assertTrue("'" + boolean46 + "' != '" + true + "'", boolean46 == true);
org.junit.Assert.assertNotNull(executorServiceArray50);
org.junit.Assert.assertTrue("'" + boolean51 + "' != '" + true + "'", boolean51 == true);
org.junit.Assert.assertTrue("'" + boolean52 + "' != '" + true + "'", boolean52 == true);
org.junit.Assert.assertNotNull(executorServiceArray55);
org.junit.Assert.assertTrue("'" + boolean56 + "' != '" + true + "'", boolean56 == true);
org.junit.Assert.assertTrue("'" + boolean57 + "' != '" + true + "'", boolean57 == true);
org.junit.Assert.assertNotNull(executorServiceArray63);
org.junit.Assert.assertTrue("'" + boolean64 + "' != '" + true + "'", boolean64 == true);
org.junit.Assert.assertTrue("'" + boolean65 + "' != '" + true + "'", boolean65 == true);
org.junit.Assert.assertTrue("'" + boolean68 + "' != '" + true + "'", boolean68 == true);
org.junit.Assert.assertNotNull(executorServiceArray75);
org.junit.Assert.assertTrue("'" + boolean76 + "' != '" + true + "'", boolean76 == true);
org.junit.Assert.assertTrue("'" + boolean77 + "' != '" + true + "'", boolean77 == true);
org.junit.Assert.assertNotNull(executorServiceArray80);
org.junit.Assert.assertTrue("'" + boolean81 + "' != '" + true + "'", boolean81 == true);
org.junit.Assert.assertTrue("'" + boolean82 + "' != '" + true + "'", boolean82 == true);
org.junit.Assert.assertNotNull(executorServiceArray88);
org.junit.Assert.assertTrue("'" + boolean89 + "' != '" + true + "'", boolean89 == true);
org.junit.Assert.assertTrue("'" + boolean90 + "' != '" + true + "'", boolean90 == true);
org.junit.Assert.assertTrue("'" + boolean93 + "' != '" + true + "'", boolean93 == true);
}
@Test
public void test01639() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01639");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) '#', (int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01640() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01640");
java.lang.CharSequence[] charSequenceArray3 = new java.lang.CharSequence[] { "tests.failfast", "hi!", "tests.awaitsfix" };
java.util.ArrayList<java.lang.CharSequence> charSequenceList4 = new java.util.ArrayList<java.lang.CharSequence>();
boolean boolean5 = java.util.Collections.addAll((java.util.Collection<java.lang.CharSequence>) charSequenceList4, charSequenceArray3);
// The following exception was thrown during execution in test generation
try {
java.lang.CharSequence charSequence6 = org.elasticsearch.test.ESTestCase.randomFrom((java.util.List<java.lang.CharSequence>) charSequenceList4);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charSequenceArray3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + true + "'", boolean5 == true);
}
@Test
public void test01641() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01641");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
java.lang.Object obj4 = null;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, obj4);
org.junit.rules.TestRule testRule6 = synonymsAnalysisTest0.ruleChain;
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.analysisService = analysisService7;
java.nio.file.Path path9 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path9);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(testRule6);
}
@Test
public void test01642() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01642");
short[] shortArray2 = new short[] {};
short[] shortArray3 = new short[] {};
short[] shortArray4 = new short[] {};
short[] shortArray5 = new short[] {};
short[] shortArray6 = new short[] {};
short[][] shortArray7 = new short[][] { shortArray2, shortArray3, shortArray4, shortArray5, shortArray6 };
short[] shortArray8 = new short[] {};
short[] shortArray9 = new short[] {};
short[] shortArray10 = new short[] {};
short[] shortArray11 = new short[] {};
short[] shortArray12 = new short[] {};
short[][] shortArray13 = new short[][] { shortArray8, shortArray9, shortArray10, shortArray11, shortArray12 };
short[] shortArray14 = new short[] {};
short[] shortArray15 = new short[] {};
short[] shortArray16 = new short[] {};
short[] shortArray17 = new short[] {};
short[] shortArray18 = new short[] {};
short[][] shortArray19 = new short[][] { shortArray14, shortArray15, shortArray16, shortArray17, shortArray18 };
short[] shortArray20 = new short[] {};
short[] shortArray21 = new short[] {};
short[] shortArray22 = new short[] {};
short[] shortArray23 = new short[] {};
short[] shortArray24 = new short[] {};
short[][] shortArray25 = new short[][] { shortArray20, shortArray21, shortArray22, shortArray23, shortArray24 };
short[] shortArray26 = new short[] {};
short[] shortArray27 = new short[] {};
short[] shortArray28 = new short[] {};
short[] shortArray29 = new short[] {};
short[] shortArray30 = new short[] {};
short[][] shortArray31 = new short[][] { shortArray26, shortArray27, shortArray28, shortArray29, shortArray30 };
short[][][] shortArray32 = new short[][][] { shortArray7, shortArray13, shortArray19, shortArray25, shortArray31 };
java.util.List<short[][]> shortArrayList33 = org.elasticsearch.test.ESTestCase.randomSubsetOf(2, shortArray32);
java.io.PrintStream printStream34 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("tests.slow", (java.lang.Object[]) shortArray32, printStream34);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(shortArray2);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray2), "[]");
org.junit.Assert.assertNotNull(shortArray3);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray3), "[]");
org.junit.Assert.assertNotNull(shortArray4);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray4), "[]");
org.junit.Assert.assertNotNull(shortArray5);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray5), "[]");
org.junit.Assert.assertNotNull(shortArray6);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray6), "[]");
org.junit.Assert.assertNotNull(shortArray7);
org.junit.Assert.assertNotNull(shortArray8);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray8), "[]");
org.junit.Assert.assertNotNull(shortArray9);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray9), "[]");
org.junit.Assert.assertNotNull(shortArray10);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray10), "[]");
org.junit.Assert.assertNotNull(shortArray11);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray11), "[]");
org.junit.Assert.assertNotNull(shortArray12);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray12), "[]");
org.junit.Assert.assertNotNull(shortArray13);
org.junit.Assert.assertNotNull(shortArray14);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray14), "[]");
org.junit.Assert.assertNotNull(shortArray15);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray15), "[]");
org.junit.Assert.assertNotNull(shortArray16);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray16), "[]");
org.junit.Assert.assertNotNull(shortArray17);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray17), "[]");
org.junit.Assert.assertNotNull(shortArray18);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray18), "[]");
org.junit.Assert.assertNotNull(shortArray19);
org.junit.Assert.assertNotNull(shortArray20);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray20), "[]");
org.junit.Assert.assertNotNull(shortArray21);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray21), "[]");
org.junit.Assert.assertNotNull(shortArray22);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray22), "[]");
org.junit.Assert.assertNotNull(shortArray23);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray23), "[]");
org.junit.Assert.assertNotNull(shortArray24);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray24), "[]");
org.junit.Assert.assertNotNull(shortArray25);
org.junit.Assert.assertNotNull(shortArray26);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray26), "[]");
org.junit.Assert.assertNotNull(shortArray27);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray27), "[]");
org.junit.Assert.assertNotNull(shortArray28);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray28), "[]");
org.junit.Assert.assertNotNull(shortArray29);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray29), "[]");
org.junit.Assert.assertNotNull(shortArray30);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray30), "[]");
org.junit.Assert.assertNotNull(shortArray31);
org.junit.Assert.assertNotNull(shortArray32);
org.junit.Assert.assertNotNull(shortArrayList33);
}
@Test
public void test01643() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01643");
java.util.Random random0 = null;
org.apache.lucene.util.BytesRef bytesRef2 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newStringField(random0, "", bytesRef2, store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01644() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01644");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest2.assertDocsSkippingEquals("hi!", indexReader5, 0, postingsEnum7, postingsEnum8, true);
org.junit.rules.TestRule testRule11 = synonymsAnalysisTest2.ruleChain;
synonymsAnalysisTest2.ensureAllSearchContextsReleased();
org.junit.Assert.assertNotEquals("tests.awaitsfix", (java.lang.Object) (-1), (java.lang.Object) synonymsAnalysisTest2);
synonymsAnalysisTest2.ensureCheckIndexPassed();
org.apache.lucene.index.IndexReader indexReader16 = null;
org.apache.lucene.index.IndexReader indexReader17 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest2.assertDeletedDocsEquals("<unknown>", indexReader16, indexReader17);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule11);
}
@Test
public void test01645() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01645");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest2.assertDocsSkippingEquals("hi!", indexReader5, 0, postingsEnum7, postingsEnum8, true);
org.junit.rules.TestRule testRule11 = synonymsAnalysisTest2.ruleChain;
synonymsAnalysisTest2.ensureAllSearchContextsReleased();
org.junit.Assert.assertNotEquals("tests.awaitsfix", (java.lang.Object) (-1), (java.lang.Object) synonymsAnalysisTest2);
org.elasticsearch.index.analysis.AnalysisService analysisService14 = null;
synonymsAnalysisTest2.analysisService = analysisService14;
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest2.assertTermsEquals("tests.badapples", indexReader17, terms18, terms19, true);
org.apache.lucene.index.IndexReader indexReader23 = null;
org.apache.lucene.index.TermsEnum termsEnum24 = null;
org.apache.lucene.index.TermsEnum termsEnum25 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest2.assertTermsEnumEquals("", indexReader23, termsEnum24, termsEnum25, false);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule11);
}
@Test
public void test01646() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01646");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween((int) (byte) -1, (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01647() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01647");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.iterations(100, (int) '4');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 100, 52");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01648() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01648");
float[] floatArray2 = new float[] { 0, 10L };
float[] floatArray5 = new float[] { 0, 10L };
float[] floatArray8 = new float[] { 0, 10L };
float[] floatArray11 = new float[] { 0, 10L };
float[] floatArray14 = new float[] { 0, 10L };
float[] floatArray17 = new float[] { 0, 10L };
float[][] floatArray18 = new float[][] { floatArray2, floatArray5, floatArray8, floatArray11, floatArray14, floatArray17 };
// The following exception was thrown during execution in test generation
try {
float[] floatArray19 = org.elasticsearch.test.ESTestCase.randomFrom(floatArray18);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(floatArray2);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray2), "[0.0, 10.0]");
org.junit.Assert.assertNotNull(floatArray5);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray5), "[0.0, 10.0]");
org.junit.Assert.assertNotNull(floatArray8);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray8), "[0.0, 10.0]");
org.junit.Assert.assertNotNull(floatArray11);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray11), "[0.0, 10.0]");
org.junit.Assert.assertNotNull(floatArray14);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray14), "[0.0, 10.0]");
org.junit.Assert.assertNotNull(floatArray17);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray17), "[0.0, 10.0]");
org.junit.Assert.assertNotNull(floatArray18);
}
@Test
public void test01649() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01649");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.index.MergePolicy mergePolicy1 = org.apache.lucene.util.LuceneTestCase.newLogMergePolicy((int) (byte) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01650() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01650");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray6 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01651() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01651");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
org.elasticsearch.common.logging.ESLogger eSLogger9 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService10 = null;
synonymsAnalysisTest0.analysisService = analysisService10;
org.elasticsearch.common.settings.Settings settings12 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment13 = synonymsAnalysisTest0.newNodeEnvironment(settings12);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger9);
}
@Test
public void test01652() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01652");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.IndexReader indexReader14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermVectorsEquals("tests.weekly", indexReader13, indexReader14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
}
@Test
public void test01653() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01653");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
java.lang.String str16 = synonymsAnalysisTest0.getTestName();
org.elasticsearch.common.logging.ESLogger eSLogger17 = synonymsAnalysisTest0.logger;
java.lang.Class<?> wildcardClass18 = eSLogger17.getClass();
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>");
org.junit.Assert.assertNotNull(eSLogger17);
org.junit.Assert.assertNotNull(wildcardClass18);
}
@Test
public void test01654() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01654");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomAsciiOfLengthBetween(0, (int) (short) 1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01655() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01655");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween(3, (int) (short) 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01656() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01656");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.common.logging.ESLogger eSLogger7 = synonymsAnalysisTest0.getlogger();
org.elasticsearch.common.logging.ESLogger eSLogger8 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.IndexReader indexReader10 = null;
org.apache.lucene.index.IndexReader indexReader11 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("", indexReader10, indexReader11);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger7);
org.junit.Assert.assertNotNull(eSLogger8);
}
@Test
public void test01657() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01657");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
synonymsAnalysisTest1.ensureCheckIndexPassed();
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService5 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.Fields fields8 = null;
org.apache.lucene.index.Fields fields9 = null;
synonymsAnalysisTest1.assertFieldsEquals("tests.weekly", indexReader7, fields8, fields9, false);
synonymsAnalysisTest1.overrideTestDefaultQueryCache();
org.junit.Assert.assertNotEquals("tests.weekly", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) 4);
synonymsAnalysisTest1.setIndexWriterMaxDocs((int) (byte) 10);
synonymsAnalysisTest1.tearDown();
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.IndexReader indexReader20 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertFieldInfosEquals("tests.badapples", indexReader19, indexReader20);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService5);
}
@Test
public void test01658() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01658");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.elasticsearch.common.logging.ESLogger eSLogger5 = synonymsAnalysisTest0.getlogger();
org.elasticsearch.common.logging.ESLogger eSLogger6 = synonymsAnalysisTest0.getlogger();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
java.lang.Class<?> wildcardClass8 = synonymsAnalysisTest0.getClass();
org.junit.Assert.assertNotNull(eSLogger5);
org.junit.Assert.assertNotNull(eSLogger6);
org.junit.Assert.assertNotNull(wildcardClass8);
}
@Test
public void test01659() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01659");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.iterations((int) (byte) 10, (int) 'a');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01660() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01660");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.setanalysisService(analysisService7);
java.lang.Class<?> wildcardClass9 = synonymsAnalysisTest0.getClass();
org.junit.Assert.assertNotNull(wildcardClass9);
}
@Test
public void test01661() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01661");
org.junit.Assert.assertEquals("", (float) (short) 0, (float) 0, (float) (-1));
}
@Test
public void test01662() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01662");
java.util.Random random0 = null;
org.apache.lucene.util.BytesRef bytesRef2 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newStringField(random0, "tests.badapples", bytesRef2, store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01663() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01663");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.tearDown();
synonymsAnalysisTest0.setIndexWriterMaxDocs(2);
synonymsAnalysisTest0.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.IndexReader indexReader10 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("<unknown>", indexReader9, indexReader10);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
org.junit.Assert.assertNull(analysisService7);
}
@Test
public void test01664() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01664");
org.junit.Assert.assertNotEquals((long) 1, (long) (short) -1);
}
@Test
public void test01665() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01665");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.PostingsEnum postingsEnum13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum14 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.monster", postingsEnum13, postingsEnum14, false);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest18 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest18.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger20 = synonymsAnalysisTest18.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest21 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest21.setUp();
org.apache.lucene.index.IndexReader indexReader24 = null;
org.apache.lucene.index.PostingsEnum postingsEnum26 = null;
org.apache.lucene.index.PostingsEnum postingsEnum27 = null;
synonymsAnalysisTest21.assertDocsSkippingEquals("hi!", indexReader24, 0, postingsEnum26, postingsEnum27, true);
org.elasticsearch.index.analysis.AnalysisService analysisService30 = synonymsAnalysisTest21.analysisService;
org.junit.rules.RuleChain ruleChain31 = synonymsAnalysisTest21.failureAndSuccessEvents;
synonymsAnalysisTest18.failureAndSuccessEvents = ruleChain31;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest33 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest33.setUp();
org.apache.lucene.index.IndexReader indexReader36 = null;
org.apache.lucene.index.PostingsEnum postingsEnum38 = null;
org.apache.lucene.index.PostingsEnum postingsEnum39 = null;
synonymsAnalysisTest33.assertDocsSkippingEquals("hi!", indexReader36, 0, postingsEnum38, postingsEnum39, true);
org.elasticsearch.index.analysis.AnalysisService analysisService42 = synonymsAnalysisTest33.analysisService;
org.junit.rules.RuleChain ruleChain43 = synonymsAnalysisTest33.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader45 = null;
org.apache.lucene.index.PostingsEnum postingsEnum47 = null;
org.apache.lucene.index.PostingsEnum postingsEnum48 = null;
synonymsAnalysisTest33.assertPositionsSkippingEquals("tests.badapples", indexReader45, (int) (short) 10, postingsEnum47, postingsEnum48);
org.junit.rules.RuleChain ruleChain50 = synonymsAnalysisTest33.failureAndSuccessEvents;
org.junit.Assert.assertNotEquals("tests.slow", (java.lang.Object) synonymsAnalysisTest18, (java.lang.Object) synonymsAnalysisTest33);
synonymsAnalysisTest18.resetCheckIndexStatus();
org.elasticsearch.common.logging.ESLogger eSLogger53 = synonymsAnalysisTest18.logger;
synonymsAnalysisTest18.ensureAllSearchContextsReleased();
org.elasticsearch.common.logging.ESLogger eSLogger55 = synonymsAnalysisTest18.logger;
org.junit.Assert.assertNotEquals((java.lang.Object) "tests.monster", (java.lang.Object) synonymsAnalysisTest18);
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNull(analysisService11);
org.junit.Assert.assertNotNull(eSLogger20);
org.junit.Assert.assertNull(analysisService30);
org.junit.Assert.assertNotNull(ruleChain31);
org.junit.Assert.assertNull(analysisService42);
org.junit.Assert.assertNotNull(ruleChain43);
org.junit.Assert.assertNotNull(ruleChain50);
org.junit.Assert.assertNotNull(eSLogger53);
org.junit.Assert.assertNotNull(eSLogger55);
}
@Test
public void test01666() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01666");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween((int) (byte) -1, 2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01667() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01667");
// The following exception was thrown during execution in test generation
try {
int int1 = org.apache.lucene.util.LuceneTestCase.atLeast((int) (short) 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01668() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01668");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
org.junit.rules.RuleChain ruleChain4 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.elasticsearch.common.logging.ESLogger eSLogger5 = synonymsAnalysisTest0.getlogger();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.IndexReader indexReader8 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("", indexReader7, indexReader8);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(ruleChain4);
org.junit.Assert.assertNotNull(eSLogger5);
}
@Test
public void test01669() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01669");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.index.MergePolicy mergePolicy1 = org.apache.lucene.util.LuceneTestCase.newLogMergePolicy((int) '4');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01670() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01670");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest3 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest3.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger5 = synonymsAnalysisTest3.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest6 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest6.setUp();
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
synonymsAnalysisTest6.assertDocsSkippingEquals("hi!", indexReader9, 0, postingsEnum11, postingsEnum12, true);
org.elasticsearch.index.analysis.AnalysisService analysisService15 = synonymsAnalysisTest6.analysisService;
org.junit.rules.RuleChain ruleChain16 = synonymsAnalysisTest6.failureAndSuccessEvents;
synonymsAnalysisTest3.failureAndSuccessEvents = ruleChain16;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest18 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest18.setUp();
org.apache.lucene.index.IndexReader indexReader21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum23 = null;
org.apache.lucene.index.PostingsEnum postingsEnum24 = null;
synonymsAnalysisTest18.assertDocsSkippingEquals("hi!", indexReader21, 0, postingsEnum23, postingsEnum24, true);
org.elasticsearch.index.analysis.AnalysisService analysisService27 = synonymsAnalysisTest18.analysisService;
org.junit.rules.RuleChain ruleChain28 = synonymsAnalysisTest18.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader30 = null;
org.apache.lucene.index.PostingsEnum postingsEnum32 = null;
org.apache.lucene.index.PostingsEnum postingsEnum33 = null;
synonymsAnalysisTest18.assertPositionsSkippingEquals("tests.badapples", indexReader30, (int) (short) 10, postingsEnum32, postingsEnum33);
org.junit.rules.RuleChain ruleChain35 = synonymsAnalysisTest18.failureAndSuccessEvents;
org.junit.Assert.assertNotEquals("tests.slow", (java.lang.Object) synonymsAnalysisTest3, (java.lang.Object) synonymsAnalysisTest18);
synonymsAnalysisTest3.resetCheckIndexStatus();
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) synonymsAnalysisTest3);
org.apache.lucene.index.IndexReader indexReader40 = null;
org.apache.lucene.index.IndexReader indexReader41 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("tests.nightly", indexReader40, indexReader41);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(eSLogger5);
org.junit.Assert.assertNull(analysisService15);
org.junit.Assert.assertNotNull(ruleChain16);
org.junit.Assert.assertNull(analysisService27);
org.junit.Assert.assertNotNull(ruleChain28);
org.junit.Assert.assertNotNull(ruleChain35);
}
@Test
public void test01671() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01671");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.elasticsearch.common.logging.ESLogger eSLogger4 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Terms terms7 = null;
org.apache.lucene.index.Terms terms8 = null;
synonymsAnalysisTest0.assertTermsEquals("hi!", indexReader6, terms7, terms8, false);
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.testSynonymsAnalysis();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger4);
}
@Test
public void test01672() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01672");
java.util.concurrent.ExecutorService executorService1 = null;
java.util.concurrent.ExecutorService[] executorServiceArray2 = new java.util.concurrent.ExecutorService[] { executorService1 };
boolean boolean3 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
org.junit.Assert.assertNotNull("tests.monster", (java.lang.Object) boolean3);
org.junit.Assert.assertNotNull(executorServiceArray2);
org.junit.Assert.assertTrue("'" + boolean3 + "' != '" + true + "'", boolean3 == true);
}
@Test
public void test01673() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01673");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("", "hi!", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01674() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01674");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((int) (short) -1, (int) (byte) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01675() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01675");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) 10);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.TermsEnum termsEnum12 = null;
org.apache.lucene.index.TermsEnum termsEnum13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsEnumEquals("", indexReader11, termsEnum12, termsEnum13, true);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
}
@Test
public void test01676() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01676");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
java.lang.Object obj4 = null;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, obj4);
org.junit.rules.TestRule testRule6 = synonymsAnalysisTest0.ruleChain;
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.analysisService = analysisService7;
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.AnalysisService analysisService10 = null;
synonymsAnalysisTest0.analysisService = analysisService10;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.IndexReader indexReader14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertNormsEquals("", indexReader13, indexReader14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(testRule6);
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01677() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01677");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.index.MergePolicy mergePolicy2 = org.apache.lucene.util.LuceneTestCase.newLogMergePolicy(true, (int) ' ');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01678() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01678");
java.lang.CharSequence[] charSequenceArray7 = new java.lang.CharSequence[] { "random", "tests.awaitsfix", "tests.badapples", "hi!", "hi!" };
java.util.List<java.lang.CharSequence> charSequenceList8 = org.elasticsearch.test.ESTestCase.randomSubsetOf((int) (short) 1, charSequenceArray7);
java.lang.CharSequence[] charSequenceArray15 = new java.lang.CharSequence[] { "random", "tests.awaitsfix", "tests.badapples", "hi!", "hi!" };
java.util.List<java.lang.CharSequence> charSequenceList16 = org.elasticsearch.test.ESTestCase.randomSubsetOf((int) (short) 1, charSequenceArray15);
java.lang.CharSequence[] charSequenceArray23 = new java.lang.CharSequence[] { "random", "tests.awaitsfix", "tests.badapples", "hi!", "hi!" };
java.util.List<java.lang.CharSequence> charSequenceList24 = org.elasticsearch.test.ESTestCase.randomSubsetOf((int) (short) 1, charSequenceArray23);
java.lang.CharSequence[] charSequenceArray31 = new java.lang.CharSequence[] { "random", "tests.awaitsfix", "tests.badapples", "hi!", "hi!" };
java.util.List<java.lang.CharSequence> charSequenceList32 = org.elasticsearch.test.ESTestCase.randomSubsetOf((int) (short) 1, charSequenceArray31);
java.util.Collection[] collectionArray34 = new java.util.Collection[4];
@SuppressWarnings("unchecked")
java.util.Collection<java.lang.CharSequence>[] charSequenceCollectionArray35 = (java.util.Collection<java.lang.CharSequence>[]) collectionArray34;
charSequenceCollectionArray35[0] = charSequenceList8;
charSequenceCollectionArray35[1] = charSequenceList16;
charSequenceCollectionArray35[2] = charSequenceList24;
charSequenceCollectionArray35[3] = charSequenceList32;
java.util.Set<java.util.Collection<java.lang.CharSequence>> charSequenceCollectionSet44 = org.apache.lucene.util.LuceneTestCase.asSet(charSequenceCollectionArray35);
java.util.Set[] setArray46 = new java.util.Set[1];
@SuppressWarnings("unchecked")
java.util.Set<java.util.Collection<java.lang.CharSequence>>[] charSequenceCollectionSetArray47 = (java.util.Set<java.util.Collection<java.lang.CharSequence>>[]) setArray46;
charSequenceCollectionSetArray47[0] = charSequenceCollectionSet44;
java.util.Set<java.util.Set<java.util.Collection<java.lang.CharSequence>>> charSequenceCollectionSetSet50 = org.apache.lucene.util.LuceneTestCase.asSet(charSequenceCollectionSetArray47);
// The following exception was thrown during execution in test generation
try {
java.util.List<java.util.Set<java.util.Collection<java.lang.CharSequence>>> charSequenceCollectionSetList51 = org.elasticsearch.test.ESTestCase.randomSubsetOf(10, charSequenceCollectionSetArray47);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: Can't pick 10 random objects from a list of 1 objects");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charSequenceArray7);
org.junit.Assert.assertNotNull(charSequenceList8);
org.junit.Assert.assertNotNull(charSequenceArray15);
org.junit.Assert.assertNotNull(charSequenceList16);
org.junit.Assert.assertNotNull(charSequenceArray23);
org.junit.Assert.assertNotNull(charSequenceList24);
org.junit.Assert.assertNotNull(charSequenceArray31);
org.junit.Assert.assertNotNull(charSequenceList32);
org.junit.Assert.assertNotNull(collectionArray34);
org.junit.Assert.assertNotNull(charSequenceCollectionArray35);
org.junit.Assert.assertNotNull(charSequenceCollectionSet44);
org.junit.Assert.assertNotNull(setArray46);
org.junit.Assert.assertNotNull(charSequenceCollectionSetArray47);
org.junit.Assert.assertNotNull(charSequenceCollectionSetSet50);
}
@Test
public void test01679() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01679");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween(4, 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01680() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01680");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) 10);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest0.analysisService;
org.junit.rules.TestRule testRule11 = synonymsAnalysisTest0.ruleChain;
org.apache.lucene.index.Fields fields13 = null;
org.apache.lucene.index.Fields fields14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("", fields13, fields14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNotNull(testRule11);
}
@Test
public void test01681() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01681");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest0.getanalysisService();
org.elasticsearch.common.logging.ESLogger eSLogger8 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("enwiki.random.lines.txt", postingsEnum11, postingsEnum12, false);
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.TermsEnum termsEnum17 = null;
org.apache.lucene.index.TermsEnum termsEnum18 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("tests.nightly", termsEnum17, termsEnum18);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService7);
org.junit.Assert.assertNotNull(eSLogger8);
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01682() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01682");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((int) '#', (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01683() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01683");
java.lang.String[] strArray4 = new java.lang.String[] { "tests.slow", "europarl.lines.txt.gz", "tests.slow" };
java.util.Set<java.lang.Comparable<java.lang.String>> strComparableSet5 = org.apache.lucene.util.LuceneTestCase.asSet((java.lang.Comparable<java.lang.String>[]) strArray4);
java.io.PrintStream printStream6 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("tests.awaitsfix", (java.lang.Object[]) strArray4, printStream6);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(strArray4);
org.junit.Assert.assertNotNull(strComparableSet5);
}
@Test
public void test01684() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01684");
java.text.Collator collator0 = null;
// The following exception was thrown during execution in test generation
try {
int int3 = org.apache.lucene.util.LuceneTestCase.collate(collator0, "tests.nightly", "europarl.lines.txt.gz");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01685() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01685");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.getlogger();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.Fields fields4 = null;
org.apache.lucene.index.Fields fields5 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.maxfailures", indexReader3, fields4, fields5, true);
org.elasticsearch.index.analysis.AnalysisService analysisService8 = null;
synonymsAnalysisTest0.setanalysisService(analysisService8);
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path11 = synonymsAnalysisTest0.getDataPath("random");
org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: resource not found: random");
} catch (java.lang.RuntimeException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
}
@Test
public void test01686() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01686");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.getlogger();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.Fields fields4 = null;
org.apache.lucene.index.Fields fields5 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.maxfailures", indexReader3, fields4, fields5, true);
org.elasticsearch.index.analysis.AnalysisService analysisService8 = null;
synonymsAnalysisTest0.setanalysisService(analysisService8);
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Terms terms12 = null;
org.apache.lucene.index.Terms terms13 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.awaitsfix", indexReader11, terms12, terms13, true);
org.apache.lucene.index.Fields fields17 = null;
org.apache.lucene.index.Fields fields18 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("tests.awaitsfix", fields17, fields18);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
}
@Test
public void test01687() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01687");
java.util.concurrent.ExecutorService executorService4 = null;
java.util.concurrent.ExecutorService[] executorServiceArray5 = new java.util.concurrent.ExecutorService[] { executorService4 };
boolean boolean6 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray5);
boolean boolean7 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray5);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray5, (java.lang.Object) (-1.0f));
boolean boolean10 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray5);
java.util.concurrent.ExecutorService executorService11 = null;
java.util.concurrent.ExecutorService[] executorServiceArray12 = new java.util.concurrent.ExecutorService[] { executorService11 };
boolean boolean13 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray12);
boolean boolean14 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray12);
java.util.concurrent.ExecutorService executorService16 = null;
java.util.concurrent.ExecutorService[] executorServiceArray17 = new java.util.concurrent.ExecutorService[] { executorService16 };
boolean boolean18 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray17);
boolean boolean19 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray17);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray17, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray12, (java.lang.Object[]) executorServiceArray17);
java.util.concurrent.ExecutorService executorService23 = null;
java.util.concurrent.ExecutorService[] executorServiceArray24 = new java.util.concurrent.ExecutorService[] { executorService23 };
boolean boolean25 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray24);
boolean boolean26 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray24);
java.util.concurrent.ExecutorService executorService28 = null;
java.util.concurrent.ExecutorService[] executorServiceArray29 = new java.util.concurrent.ExecutorService[] { executorService28 };
boolean boolean30 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray29);
boolean boolean31 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray29);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray29, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray24, (java.lang.Object[]) executorServiceArray29);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray17, (java.lang.Object[]) executorServiceArray29);
org.junit.Assert.assertEquals("tests.weekly", (java.lang.Object[]) executorServiceArray5, (java.lang.Object[]) executorServiceArray17);
java.util.concurrent.ExecutorService executorService38 = null;
java.util.concurrent.ExecutorService[] executorServiceArray39 = new java.util.concurrent.ExecutorService[] { executorService38 };
boolean boolean40 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray39);
java.util.concurrent.ExecutorService executorService42 = null;
java.util.concurrent.ExecutorService[] executorServiceArray43 = new java.util.concurrent.ExecutorService[] { executorService42 };
boolean boolean44 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray43);
boolean boolean45 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray43);
java.util.concurrent.ExecutorService executorService47 = null;
java.util.concurrent.ExecutorService[] executorServiceArray48 = new java.util.concurrent.ExecutorService[] { executorService47 };
boolean boolean49 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray48);
boolean boolean50 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray48);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray48, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray43, (java.lang.Object[]) executorServiceArray48);
java.lang.Object obj54 = null;
org.junit.Assert.assertNotEquals("tests.nightly", (java.lang.Object) executorServiceArray43, obj54);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray39, (java.lang.Object[]) executorServiceArray43);
java.util.concurrent.ExecutorService executorService57 = null;
java.util.concurrent.ExecutorService[] executorServiceArray58 = new java.util.concurrent.ExecutorService[] { executorService57 };
boolean boolean59 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray58);
boolean boolean60 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray58);
java.util.concurrent.ExecutorService executorService62 = null;
java.util.concurrent.ExecutorService[] executorServiceArray63 = new java.util.concurrent.ExecutorService[] { executorService62 };
boolean boolean64 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray63);
boolean boolean65 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray63);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray63, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray58, (java.lang.Object[]) executorServiceArray63);
java.util.concurrent.ExecutorService executorService69 = null;
java.util.concurrent.ExecutorService[] executorServiceArray70 = new java.util.concurrent.ExecutorService[] { executorService69 };
boolean boolean71 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray70);
boolean boolean72 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray70);
java.util.concurrent.ExecutorService executorService74 = null;
java.util.concurrent.ExecutorService[] executorServiceArray75 = new java.util.concurrent.ExecutorService[] { executorService74 };
boolean boolean76 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray75);
boolean boolean77 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray75);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray75, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray70, (java.lang.Object[]) executorServiceArray75);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray63, (java.lang.Object[]) executorServiceArray75);
boolean boolean82 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray63);
org.junit.Assert.assertArrayEquals("tests.failfast", (java.lang.Object[]) executorServiceArray43, (java.lang.Object[]) executorServiceArray63);
org.junit.Assert.assertEquals("tests.failfast", (java.lang.Object[]) executorServiceArray17, (java.lang.Object[]) executorServiceArray63);
java.io.PrintStream printStream85 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("tests.maxfailures", (java.lang.Object[]) executorServiceArray17, printStream85);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray5);
org.junit.Assert.assertTrue("'" + boolean6 + "' != '" + true + "'", boolean6 == true);
org.junit.Assert.assertTrue("'" + boolean7 + "' != '" + true + "'", boolean7 == true);
org.junit.Assert.assertTrue("'" + boolean10 + "' != '" + true + "'", boolean10 == true);
org.junit.Assert.assertNotNull(executorServiceArray12);
org.junit.Assert.assertTrue("'" + boolean13 + "' != '" + true + "'", boolean13 == true);
org.junit.Assert.assertTrue("'" + boolean14 + "' != '" + true + "'", boolean14 == true);
org.junit.Assert.assertNotNull(executorServiceArray17);
org.junit.Assert.assertTrue("'" + boolean18 + "' != '" + true + "'", boolean18 == true);
org.junit.Assert.assertTrue("'" + boolean19 + "' != '" + true + "'", boolean19 == true);
org.junit.Assert.assertNotNull(executorServiceArray24);
org.junit.Assert.assertTrue("'" + boolean25 + "' != '" + true + "'", boolean25 == true);
org.junit.Assert.assertTrue("'" + boolean26 + "' != '" + true + "'", boolean26 == true);
org.junit.Assert.assertNotNull(executorServiceArray29);
org.junit.Assert.assertTrue("'" + boolean30 + "' != '" + true + "'", boolean30 == true);
org.junit.Assert.assertTrue("'" + boolean31 + "' != '" + true + "'", boolean31 == true);
org.junit.Assert.assertNotNull(executorServiceArray39);
org.junit.Assert.assertTrue("'" + boolean40 + "' != '" + true + "'", boolean40 == true);
org.junit.Assert.assertNotNull(executorServiceArray43);
org.junit.Assert.assertTrue("'" + boolean44 + "' != '" + true + "'", boolean44 == true);
org.junit.Assert.assertTrue("'" + boolean45 + "' != '" + true + "'", boolean45 == true);
org.junit.Assert.assertNotNull(executorServiceArray48);
org.junit.Assert.assertTrue("'" + boolean49 + "' != '" + true + "'", boolean49 == true);
org.junit.Assert.assertTrue("'" + boolean50 + "' != '" + true + "'", boolean50 == true);
org.junit.Assert.assertNotNull(executorServiceArray58);
org.junit.Assert.assertTrue("'" + boolean59 + "' != '" + true + "'", boolean59 == true);
org.junit.Assert.assertTrue("'" + boolean60 + "' != '" + true + "'", boolean60 == true);
org.junit.Assert.assertNotNull(executorServiceArray63);
org.junit.Assert.assertTrue("'" + boolean64 + "' != '" + true + "'", boolean64 == true);
org.junit.Assert.assertTrue("'" + boolean65 + "' != '" + true + "'", boolean65 == true);
org.junit.Assert.assertNotNull(executorServiceArray70);
org.junit.Assert.assertTrue("'" + boolean71 + "' != '" + true + "'", boolean71 == true);
org.junit.Assert.assertTrue("'" + boolean72 + "' != '" + true + "'", boolean72 == true);
org.junit.Assert.assertNotNull(executorServiceArray75);
org.junit.Assert.assertTrue("'" + boolean76 + "' != '" + true + "'", boolean76 == true);
org.junit.Assert.assertTrue("'" + boolean77 + "' != '" + true + "'", boolean77 == true);
org.junit.Assert.assertTrue("'" + boolean82 + "' != '" + true + "'", boolean82 == true);
}
@Test
public void test01688() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01688");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false);
org.elasticsearch.index.analysis.AnalysisService analysisService22 = null;
synonymsAnalysisTest0.setanalysisService(analysisService22);
org.apache.lucene.index.IndexReader indexReader25 = null;
org.apache.lucene.index.PostingsEnum postingsEnum27 = null;
org.apache.lucene.index.PostingsEnum postingsEnum28 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.awaitsfix", indexReader25, 3, postingsEnum27, postingsEnum28);
org.elasticsearch.common.logging.ESLogger eSLogger30 = synonymsAnalysisTest0.getlogger();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest31 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest31.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService33 = synonymsAnalysisTest31.getanalysisService();
org.elasticsearch.index.analysis.AnalysisService analysisService34 = null;
synonymsAnalysisTest31.analysisService = analysisService34;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest36 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService37 = synonymsAnalysisTest36.getanalysisService();
synonymsAnalysisTest36.overrideTestDefaultQueryCache();
synonymsAnalysisTest36.tearDown();
java.lang.Object obj40 = null;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest36, obj40);
org.junit.rules.TestRule testRule42 = synonymsAnalysisTest36.ruleChain;
org.elasticsearch.index.analysis.AnalysisService analysisService43 = null;
synonymsAnalysisTest36.analysisService = analysisService43;
org.elasticsearch.index.analysis.AnalysisService analysisService45 = synonymsAnalysisTest36.analysisService;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest46 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest46.setUp();
org.apache.lucene.index.IndexReader indexReader49 = null;
org.apache.lucene.index.PostingsEnum postingsEnum51 = null;
org.apache.lucene.index.PostingsEnum postingsEnum52 = null;
synonymsAnalysisTest46.assertDocsSkippingEquals("hi!", indexReader49, 0, postingsEnum51, postingsEnum52, true);
org.elasticsearch.index.analysis.AnalysisService analysisService55 = synonymsAnalysisTest46.analysisService;
org.junit.rules.RuleChain ruleChain56 = synonymsAnalysisTest46.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader58 = null;
org.apache.lucene.index.PostingsEnum postingsEnum60 = null;
org.apache.lucene.index.PostingsEnum postingsEnum61 = null;
synonymsAnalysisTest46.assertPositionsSkippingEquals("tests.badapples", indexReader58, (int) (short) 10, postingsEnum60, postingsEnum61);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest63 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest63.setUp();
org.apache.lucene.index.IndexReader indexReader66 = null;
org.apache.lucene.index.PostingsEnum postingsEnum68 = null;
org.apache.lucene.index.PostingsEnum postingsEnum69 = null;
synonymsAnalysisTest63.assertDocsSkippingEquals("hi!", indexReader66, 0, postingsEnum68, postingsEnum69, true);
org.elasticsearch.index.analysis.AnalysisService analysisService72 = synonymsAnalysisTest63.analysisService;
org.junit.rules.RuleChain ruleChain73 = synonymsAnalysisTest63.failureAndSuccessEvents;
synonymsAnalysisTest46.failureAndSuccessEvents = ruleChain73;
synonymsAnalysisTest36.failureAndSuccessEvents = ruleChain73;
synonymsAnalysisTest31.failureAndSuccessEvents = ruleChain73;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain73;
org.apache.lucene.index.IndexReader indexReader79 = null;
org.apache.lucene.index.IndexReader indexReader80 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("hi!", indexReader79, indexReader80);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(eSLogger30);
org.junit.Assert.assertNull(analysisService33);
org.junit.Assert.assertNull(analysisService37);
org.junit.Assert.assertNotNull(testRule42);
org.junit.Assert.assertNull(analysisService45);
org.junit.Assert.assertNull(analysisService55);
org.junit.Assert.assertNotNull(ruleChain56);
org.junit.Assert.assertNull(analysisService72);
org.junit.Assert.assertNotNull(ruleChain73);
}
@Test
public void test01689() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01689");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment4 = synonymsAnalysisTest0.newNodeEnvironment();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01690() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01690");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(1, (int) (short) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01691() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01691");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((int) ' ', 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01692() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01692");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.elasticsearch.common.logging.ESLogger eSLogger4 = synonymsAnalysisTest0.logger;
java.lang.String str5 = synonymsAnalysisTest0.getTestName();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.IndexReader indexReader8 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("tests.maxfailures", indexReader7, indexReader8);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger4);
org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>");
}
@Test
public void test01693() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01693");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between((-1), (int) (short) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01694() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01694");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween(10, 2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01695() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01695");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest1.analysisService;
org.junit.rules.RuleChain ruleChain11 = synonymsAnalysisTest1.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest1.assertPositionsSkippingEquals("tests.badapples", indexReader13, (int) (short) 10, postingsEnum15, postingsEnum16);
java.lang.String str18 = synonymsAnalysisTest1.getTestName();
org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) str18);
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNotNull(ruleChain11);
org.junit.Assert.assertEquals("'" + str18 + "' != '" + "<unknown>" + "'", str18, "<unknown>");
}
@Test
public void test01696() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01696");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.setUp();
java.nio.file.Path path5 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path5);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01697() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01697");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLength((int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01698() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01698");
org.junit.Assert.assertNotEquals("europarl.lines.txt.gz", (long) 10, 0L);
}
@Test
public void test01699() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01699");
org.junit.Assert.assertEquals((float) 10L, (float) 'a', (float) (short) 100);
}
@Test
public void test01700() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01700");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.elasticsearch.common.logging.ESLogger eSLogger4 = synonymsAnalysisTest0.logger;
java.lang.String str5 = synonymsAnalysisTest0.getTestName();
org.elasticsearch.index.analysis.AnalysisService analysisService6 = null;
synonymsAnalysisTest0.analysisService = analysisService6;
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.IndexReader indexReader10 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermVectorsEquals("tests.monster", indexReader9, indexReader10);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger4);
org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>");
}
@Test
public void test01701() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01701");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between((int) (short) 100, (int) (short) 1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01702() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01702");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.setanalysisService(analysisService7);
java.lang.String str9 = synonymsAnalysisTest0.getTestName();
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.apache.lucene.index.Fields fields13 = null;
org.apache.lucene.index.Fields fields14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("<unknown>", fields13, fields14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>");
org.junit.Assert.assertNotNull(ruleChain10);
}
@Test
public void test01703() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01703");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.getlogger();
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.IndexReader indexReader7 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("tests.weekly", indexReader6, indexReader7);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(eSLogger3);
}
@Test
public void test01704() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01704");
java.util.Random random0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest2.assertDocsSkippingEquals("hi!", indexReader5, 0, postingsEnum7, postingsEnum8, true);
org.apache.lucene.document.FieldType fieldType11 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field12 = org.apache.lucene.util.LuceneTestCase.newField(random0, "", (java.lang.Object) "hi!", fieldType11);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01705() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01705");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("<unknown>", "<unknown>", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01706() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01706");
java.util.concurrent.ExecutorService executorService2 = null;
java.util.concurrent.ExecutorService[] executorServiceArray3 = new java.util.concurrent.ExecutorService[] { executorService2 };
boolean boolean4 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray3);
boolean boolean5 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray3);
java.util.concurrent.ExecutorService executorService7 = null;
java.util.concurrent.ExecutorService[] executorServiceArray8 = new java.util.concurrent.ExecutorService[] { executorService7 };
boolean boolean9 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray8);
boolean boolean10 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray8);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray8, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray3, (java.lang.Object[]) executorServiceArray8);
java.util.concurrent.ExecutorService executorService14 = null;
java.util.concurrent.ExecutorService[] executorServiceArray15 = new java.util.concurrent.ExecutorService[] { executorService14 };
boolean boolean16 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray15);
boolean boolean17 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray15);
java.util.concurrent.ExecutorService executorService19 = null;
java.util.concurrent.ExecutorService[] executorServiceArray20 = new java.util.concurrent.ExecutorService[] { executorService19 };
boolean boolean21 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray20);
boolean boolean22 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray20);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray20, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray15, (java.lang.Object[]) executorServiceArray20);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray8, (java.lang.Object[]) executorServiceArray20);
org.junit.Assert.assertNotSame((java.lang.Object) "tests.awaitsfix", (java.lang.Object) executorServiceArray8);
java.util.concurrent.ExecutorService executorService28 = null;
java.util.concurrent.ExecutorService[] executorServiceArray29 = new java.util.concurrent.ExecutorService[] { executorService28 };
boolean boolean30 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray29);
boolean boolean31 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray29);
java.util.concurrent.ExecutorService executorService33 = null;
java.util.concurrent.ExecutorService[] executorServiceArray34 = new java.util.concurrent.ExecutorService[] { executorService33 };
boolean boolean35 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray34);
boolean boolean36 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray34);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray34, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray29, (java.lang.Object[]) executorServiceArray34);
java.util.concurrent.ExecutorService executorService40 = null;
java.util.concurrent.ExecutorService[] executorServiceArray41 = new java.util.concurrent.ExecutorService[] { executorService40 };
boolean boolean42 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray41);
boolean boolean43 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray41);
java.util.concurrent.ExecutorService executorService45 = null;
java.util.concurrent.ExecutorService[] executorServiceArray46 = new java.util.concurrent.ExecutorService[] { executorService45 };
boolean boolean47 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray46);
boolean boolean48 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray46);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray46, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray41, (java.lang.Object[]) executorServiceArray46);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray34, (java.lang.Object[]) executorServiceArray46);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray8, (java.lang.Object[]) executorServiceArray46);
boolean boolean54 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray8);
java.util.concurrent.ExecutorService executorService56 = null;
java.util.concurrent.ExecutorService[] executorServiceArray57 = new java.util.concurrent.ExecutorService[] { executorService56 };
boolean boolean58 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray57);
boolean boolean59 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray57);
java.util.concurrent.ExecutorService executorService61 = null;
java.util.concurrent.ExecutorService[] executorServiceArray62 = new java.util.concurrent.ExecutorService[] { executorService61 };
boolean boolean63 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray62);
boolean boolean64 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray62);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray62, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray57, (java.lang.Object[]) executorServiceArray62);
java.util.concurrent.ExecutorService executorService69 = null;
java.util.concurrent.ExecutorService[] executorServiceArray70 = new java.util.concurrent.ExecutorService[] { executorService69 };
boolean boolean71 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray70);
boolean boolean72 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray70);
java.util.concurrent.ExecutorService executorService74 = null;
java.util.concurrent.ExecutorService[] executorServiceArray75 = new java.util.concurrent.ExecutorService[] { executorService74 };
boolean boolean76 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray75);
boolean boolean77 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray75);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray75, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray70, (java.lang.Object[]) executorServiceArray75);
java.util.concurrent.ExecutorService executorService81 = null;
java.util.concurrent.ExecutorService[] executorServiceArray82 = new java.util.concurrent.ExecutorService[] { executorService81 };
boolean boolean83 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray82);
boolean boolean84 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray82);
java.util.concurrent.ExecutorService executorService86 = null;
java.util.concurrent.ExecutorService[] executorServiceArray87 = new java.util.concurrent.ExecutorService[] { executorService86 };
boolean boolean88 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray87);
boolean boolean89 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray87);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray87, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray82, (java.lang.Object[]) executorServiceArray87);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray75, (java.lang.Object[]) executorServiceArray87);
org.junit.Assert.assertNotSame((java.lang.Object) "tests.awaitsfix", (java.lang.Object) executorServiceArray75);
org.junit.Assert.assertEquals("random", (java.lang.Object[]) executorServiceArray57, (java.lang.Object[]) executorServiceArray75);
boolean boolean96 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray75);
org.junit.Assert.assertEquals("random", (java.lang.Object[]) executorServiceArray8, (java.lang.Object[]) executorServiceArray75);
boolean boolean98 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray8);
org.junit.Assert.assertNotNull(executorServiceArray3);
org.junit.Assert.assertTrue("'" + boolean4 + "' != '" + true + "'", boolean4 == true);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + true + "'", boolean5 == true);
org.junit.Assert.assertNotNull(executorServiceArray8);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
org.junit.Assert.assertTrue("'" + boolean10 + "' != '" + true + "'", boolean10 == true);
org.junit.Assert.assertNotNull(executorServiceArray15);
org.junit.Assert.assertTrue("'" + boolean16 + "' != '" + true + "'", boolean16 == true);
org.junit.Assert.assertTrue("'" + boolean17 + "' != '" + true + "'", boolean17 == true);
org.junit.Assert.assertNotNull(executorServiceArray20);
org.junit.Assert.assertTrue("'" + boolean21 + "' != '" + true + "'", boolean21 == true);
org.junit.Assert.assertTrue("'" + boolean22 + "' != '" + true + "'", boolean22 == true);
org.junit.Assert.assertNotNull(executorServiceArray29);
org.junit.Assert.assertTrue("'" + boolean30 + "' != '" + true + "'", boolean30 == true);
org.junit.Assert.assertTrue("'" + boolean31 + "' != '" + true + "'", boolean31 == true);
org.junit.Assert.assertNotNull(executorServiceArray34);
org.junit.Assert.assertTrue("'" + boolean35 + "' != '" + true + "'", boolean35 == true);
org.junit.Assert.assertTrue("'" + boolean36 + "' != '" + true + "'", boolean36 == true);
org.junit.Assert.assertNotNull(executorServiceArray41);
org.junit.Assert.assertTrue("'" + boolean42 + "' != '" + true + "'", boolean42 == true);
org.junit.Assert.assertTrue("'" + boolean43 + "' != '" + true + "'", boolean43 == true);
org.junit.Assert.assertNotNull(executorServiceArray46);
org.junit.Assert.assertTrue("'" + boolean47 + "' != '" + true + "'", boolean47 == true);
org.junit.Assert.assertTrue("'" + boolean48 + "' != '" + true + "'", boolean48 == true);
org.junit.Assert.assertTrue("'" + boolean54 + "' != '" + true + "'", boolean54 == true);
org.junit.Assert.assertNotNull(executorServiceArray57);
org.junit.Assert.assertTrue("'" + boolean58 + "' != '" + true + "'", boolean58 == true);
org.junit.Assert.assertTrue("'" + boolean59 + "' != '" + true + "'", boolean59 == true);
org.junit.Assert.assertNotNull(executorServiceArray62);
org.junit.Assert.assertTrue("'" + boolean63 + "' != '" + true + "'", boolean63 == true);
org.junit.Assert.assertTrue("'" + boolean64 + "' != '" + true + "'", boolean64 == true);
org.junit.Assert.assertNotNull(executorServiceArray70);
org.junit.Assert.assertTrue("'" + boolean71 + "' != '" + true + "'", boolean71 == true);
org.junit.Assert.assertTrue("'" + boolean72 + "' != '" + true + "'", boolean72 == true);
org.junit.Assert.assertNotNull(executorServiceArray75);
org.junit.Assert.assertTrue("'" + boolean76 + "' != '" + true + "'", boolean76 == true);
org.junit.Assert.assertTrue("'" + boolean77 + "' != '" + true + "'", boolean77 == true);
org.junit.Assert.assertNotNull(executorServiceArray82);
org.junit.Assert.assertTrue("'" + boolean83 + "' != '" + true + "'", boolean83 == true);
org.junit.Assert.assertTrue("'" + boolean84 + "' != '" + true + "'", boolean84 == true);
org.junit.Assert.assertNotNull(executorServiceArray87);
org.junit.Assert.assertTrue("'" + boolean88 + "' != '" + true + "'", boolean88 == true);
org.junit.Assert.assertTrue("'" + boolean89 + "' != '" + true + "'", boolean89 == true);
org.junit.Assert.assertTrue("'" + boolean96 + "' != '" + true + "'", boolean96 == true);
org.junit.Assert.assertTrue("'" + boolean98 + "' != '" + true + "'", boolean98 == true);
}
@Test
public void test01707() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01707");
java.util.Random random0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest2.assertDocsSkippingEquals("hi!", indexReader5, 0, postingsEnum7, postingsEnum8, true);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest2.analysisService;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.Fields fields14 = null;
org.apache.lucene.index.Fields fields15 = null;
synonymsAnalysisTest2.assertFieldsEquals("random", indexReader13, fields14, fields15, true);
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.Terms terms20 = null;
org.apache.lucene.index.Terms terms21 = null;
synonymsAnalysisTest2.assertTermsEquals("tests.weekly", indexReader19, terms20, terms21, false);
org.apache.lucene.document.FieldType fieldType24 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field25 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.maxfailures", (java.lang.Object) indexReader19, fieldType24);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService11);
}
@Test
public void test01708() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01708");
org.junit.Assert.assertNotEquals("", (long) 10, 0L);
}
@Test
public void test01709() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01709");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("tests.monster", "europarl.lines.txt.gz");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01710() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01710");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
org.elasticsearch.index.analysis.AnalysisService analysisService2 = null;
synonymsAnalysisTest0.analysisService = analysisService2;
org.elasticsearch.common.settings.Settings settings4 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment5 = synonymsAnalysisTest0.newNodeEnvironment(settings4);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01711() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01711");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newStringField(random0, "tests.weekly", "tests.badapples", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01712() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01712");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.IndexReader indexReader6 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("tests.nightly", indexReader5, indexReader6);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01713() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01713");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService4 = null;
synonymsAnalysisTest0.setanalysisService(analysisService4);
org.elasticsearch.common.logging.ESLogger eSLogger6 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.IndexReader indexReader8 = null;
org.apache.lucene.index.IndexReader indexReader9 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermVectorsEquals("tests.slow", indexReader8, indexReader9);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNotNull(eSLogger6);
}
@Test
public void test01714() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01714");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((-1), 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01715() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01715");
java.lang.CharSequence[] charSequenceArray2 = new java.lang.CharSequence[] { "tests.slow", "tests.nightly" };
java.util.ArrayList<java.lang.CharSequence> charSequenceList3 = new java.util.ArrayList<java.lang.CharSequence>();
boolean boolean4 = java.util.Collections.addAll((java.util.Collection<java.lang.CharSequence>) charSequenceList3, charSequenceArray2);
// The following exception was thrown during execution in test generation
try {
java.lang.CharSequence charSequence5 = org.elasticsearch.test.ESTestCase.randomFrom((java.util.List<java.lang.CharSequence>) charSequenceList3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charSequenceArray2);
org.junit.Assert.assertTrue("'" + boolean4 + "' != '" + true + "'", boolean4 == true);
}
@Test
public void test01716() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01716");
java.lang.CharSequence[] charSequenceArray11 = new java.lang.CharSequence[] { "", "tests.monster", "random", "enwiki.random.lines.txt", "hi!", "tests.failfast", "tests.failfast", "enwiki.random.lines.txt", "europarl.lines.txt.gz", "tests.failfast", "enwiki.random.lines.txt" };
java.util.ArrayList<java.lang.CharSequence> charSequenceList12 = new java.util.ArrayList<java.lang.CharSequence>();
boolean boolean13 = java.util.Collections.addAll((java.util.Collection<java.lang.CharSequence>) charSequenceList12, charSequenceArray11);
// The following exception was thrown during execution in test generation
try {
java.lang.CharSequence charSequence14 = org.elasticsearch.test.ESTestCase.randomFrom((java.util.List<java.lang.CharSequence>) charSequenceList12);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charSequenceArray11);
org.junit.Assert.assertTrue("'" + boolean13 + "' != '" + true + "'", boolean13 == true);
}
@Test
public void test01717() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01717");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
java.lang.Object obj4 = null;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, obj4);
org.junit.rules.TestRule testRule6 = synonymsAnalysisTest0.ruleChain;
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.analysisService = analysisService7;
org.apache.lucene.index.TermsEnum termsEnum10 = null;
org.apache.lucene.index.TermsEnum termsEnum11 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("<unknown>", termsEnum10, termsEnum11);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(testRule6);
}
@Test
public void test01718() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01718");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.Fields fields13 = null;
org.apache.lucene.index.Fields fields14 = null;
synonymsAnalysisTest1.assertFieldsEquals("random", indexReader12, fields13, fields14, true);
org.apache.lucene.index.IndexReader indexReader18 = null;
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
synonymsAnalysisTest1.assertPositionsSkippingEquals("tests.maxfailures", indexReader18, 0, postingsEnum20, postingsEnum21);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest23 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum25 = null;
org.apache.lucene.index.PostingsEnum postingsEnum26 = null;
synonymsAnalysisTest23.assertDocsEnumEquals("tests.badapples", postingsEnum25, postingsEnum26, true);
synonymsAnalysisTest23.ensureAllSearchContextsReleased();
org.elasticsearch.common.logging.ESLogger eSLogger30 = synonymsAnalysisTest23.getlogger();
java.lang.String str31 = synonymsAnalysisTest23.getTestName();
org.junit.Assert.assertNotSame("random", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) str31);
org.apache.lucene.index.IndexReader indexReader34 = null;
org.apache.lucene.index.PostingsEnum postingsEnum36 = null;
org.apache.lucene.index.PostingsEnum postingsEnum37 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("<unknown>", indexReader34, 5, postingsEnum36, postingsEnum37, false);
org.apache.lucene.index.IndexableField indexableField41 = null;
org.apache.lucene.index.IndexableField indexableField42 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertStoredFieldEquals("tests.slow", indexableField41, indexableField42);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNotNull(eSLogger30);
org.junit.Assert.assertEquals("'" + str31 + "' != '" + "<unknown>" + "'", str31, "<unknown>");
}
@Test
public void test01719() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01719");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.weekly", indexReader9, (int) (short) 100, postingsEnum11, postingsEnum12);
org.elasticsearch.index.analysis.AnalysisService analysisService14 = null;
synonymsAnalysisTest0.setanalysisService(analysisService14);
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.elasticsearch.index.analysis.AnalysisService analysisService17 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.IndexReader indexReader20 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermVectorsEquals("europarl.lines.txt.gz", indexReader19, indexReader20);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService17);
}
@Test
public void test01720() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01720");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newTextField("tests.failfast", "", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01721() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01721");
java.util.Random random0 = null;
java.lang.Object obj2 = null;
org.apache.lucene.document.FieldType fieldType3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.badapples", obj2, fieldType3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01722() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01722");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomAsciiOfLength((int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01723() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01723");
org.junit.Assert.assertNotEquals((long) (byte) 0, (long) (-1));
}
@Test
public void test01724() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01724");
org.junit.Assert.assertNotEquals(1L, (long) (byte) 0);
}
@Test
public void test01725() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01725");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.setanalysisService(analysisService7);
java.lang.String str9 = synonymsAnalysisTest0.getTestName();
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray10 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>");
}
@Test
public void test01726() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01726");
// The following exception was thrown during execution in test generation
try {
int int1 = org.elasticsearch.test.ESTestCase.randomInt(100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01727() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01727");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.setanalysisService(analysisService7);
org.apache.lucene.index.Fields fields10 = null;
org.apache.lucene.index.Fields fields11 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("hi!", fields10, fields11);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01728() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01728");
org.junit.Assert.assertEquals((double) (short) -1, (double) 10, (double) (byte) 100);
}
@Test
public void test01729() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01729");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = null;
synonymsAnalysisTest0.setanalysisService(analysisService9);
org.elasticsearch.common.logging.ESLogger eSLogger11 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("tests.maxfailures", indexReader13, 100, postingsEnum15, postingsEnum16, false);
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.testSynonymsAnalysis();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger11);
}
@Test
public void test01730() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01730");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
java.lang.String str12 = synonymsAnalysisTest0.getTestName();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
synonymsAnalysisTest0.tearDown();
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.IndexReader indexReader18 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("europarl.lines.txt.gz", indexReader17, indexReader18);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertEquals("'" + str12 + "' != '" + "<unknown>" + "'", str12, "<unknown>");
}
@Test
public void test01731() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01731");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.Fields fields13 = null;
org.apache.lucene.index.Fields fields14 = null;
synonymsAnalysisTest1.assertFieldsEquals("random", indexReader12, fields13, fields14, true);
org.apache.lucene.index.IndexReader indexReader18 = null;
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
synonymsAnalysisTest1.assertPositionsSkippingEquals("tests.maxfailures", indexReader18, 0, postingsEnum20, postingsEnum21);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest23 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum25 = null;
org.apache.lucene.index.PostingsEnum postingsEnum26 = null;
synonymsAnalysisTest23.assertDocsEnumEquals("tests.badapples", postingsEnum25, postingsEnum26, true);
synonymsAnalysisTest23.ensureAllSearchContextsReleased();
org.elasticsearch.common.logging.ESLogger eSLogger30 = synonymsAnalysisTest23.getlogger();
java.lang.String str31 = synonymsAnalysisTest23.getTestName();
org.junit.Assert.assertNotSame("random", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) str31);
org.apache.lucene.index.IndexReader indexReader34 = null;
org.apache.lucene.index.PostingsEnum postingsEnum36 = null;
org.apache.lucene.index.PostingsEnum postingsEnum37 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("<unknown>", indexReader34, 5, postingsEnum36, postingsEnum37, false);
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray41 = synonymsAnalysisTest1.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNotNull(eSLogger30);
org.junit.Assert.assertEquals("'" + str31 + "' != '" + "<unknown>" + "'", str31, "<unknown>");
}
@Test
public void test01732() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01732");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.PostingsEnum postingsEnum14 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.badapples", indexReader12, (int) (short) 10, postingsEnum14, postingsEnum15);
java.lang.String str17 = synonymsAnalysisTest0.getTestName();
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.apache.lucene.index.IndexReader indexReader20 = null;
org.apache.lucene.index.IndexReader indexReader21 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("tests.badapples", indexReader20, indexReader21);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain10);
org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>");
}
@Test
public void test01733() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01733");
org.apache.lucene.util.LuceneTestCase.assumeFalse("<unknown>", false);
}
@Test
public void test01734() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01734");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService2 = null;
synonymsAnalysisTest0.analysisService = analysisService2;
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.Terms terms6 = null;
org.apache.lucene.index.Terms terms7 = null;
synonymsAnalysisTest0.assertTermsEquals("enwiki.random.lines.txt", indexReader5, terms6, terms7, true);
synonymsAnalysisTest0.tearDown();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.IndexReader indexReader14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("hi!", indexReader13, indexReader14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
}
@Test
public void test01735() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01735");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.assumeTrue("tests.failfast", false);
org.junit.Assert.fail("Expected exception of type com.carrotsearch.randomizedtesting.InternalAssumptionViolatedException; message: tests.failfast");
} catch (org.junit.internal.AssumptionViolatedException e) {
// Expected exception.
}
}
@Test
public void test01736() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01736");
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray3 = org.elasticsearch.test.ESTestCase.generateRandomStringArray((int) (byte) 0, 2, false);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01737() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01737");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.resetCheckIndexStatus();
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
java.lang.String str14 = synonymsAnalysisTest0.getTestName();
org.apache.lucene.index.IndexReader indexReader16 = null;
org.apache.lucene.index.IndexReader indexReader17 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("tests.weekly", indexReader16, indexReader17);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertEquals("'" + str14 + "' != '" + "<unknown>" + "'", str14, "<unknown>");
}
@Test
public void test01738() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01738");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) 10);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest10 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest10.setUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest10.assertDocsSkippingEquals("hi!", indexReader13, 0, postingsEnum15, postingsEnum16, true);
org.elasticsearch.index.analysis.AnalysisService analysisService19 = null;
synonymsAnalysisTest10.setanalysisService(analysisService19);
org.elasticsearch.common.logging.ESLogger eSLogger21 = synonymsAnalysisTest10.logger;
java.lang.Object obj22 = null;
org.junit.Assert.assertNotEquals("tests.maxfailures", (java.lang.Object) synonymsAnalysisTest10, obj22);
org.junit.rules.TestRule testRule24 = synonymsAnalysisTest10.ruleChain;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest25 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest25.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger27 = synonymsAnalysisTest25.logger;
synonymsAnalysisTest25.tearDown();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest[] synonymsAnalysisTestArray29 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest[] { synonymsAnalysisTest0, synonymsAnalysisTest10, synonymsAnalysisTest25 };
java.util.Set<org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest> synonymsAnalysisTestSet30 = org.apache.lucene.util.LuceneTestCase.asSet(synonymsAnalysisTestArray29);
java.util.Set<org.apache.lucene.util.LuceneTestCase> luceneTestCaseSet31 = org.apache.lucene.util.LuceneTestCase.asSet((org.apache.lucene.util.LuceneTestCase[]) synonymsAnalysisTestArray29);
java.util.Set<org.elasticsearch.test.ESTestCase> eSTestCaseSet32 = org.apache.lucene.util.LuceneTestCase.asSet((org.elasticsearch.test.ESTestCase[]) synonymsAnalysisTestArray29);
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest33 = org.elasticsearch.test.ESTestCase.randomFrom(synonymsAnalysisTestArray29);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger21);
org.junit.Assert.assertNotNull(testRule24);
org.junit.Assert.assertNotNull(eSLogger27);
org.junit.Assert.assertNotNull(synonymsAnalysisTestArray29);
org.junit.Assert.assertNotNull(synonymsAnalysisTestSet30);
org.junit.Assert.assertNotNull(luceneTestCaseSet31);
org.junit.Assert.assertNotNull(eSTestCaseSet32);
}
@Test
public void test01739() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01739");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomAsciiOfLength(2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01740() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01740");
java.util.concurrent.ExecutorService executorService1 = null;
java.util.concurrent.ExecutorService[] executorServiceArray2 = new java.util.concurrent.ExecutorService[] { executorService1 };
java.util.concurrent.ExecutorService[][] executorServiceArray3 = new java.util.concurrent.ExecutorService[][] { executorServiceArray2 };
// The following exception was thrown during execution in test generation
try {
java.util.List<java.util.concurrent.ExecutorService[]> executorServiceArrayList4 = org.elasticsearch.test.ESTestCase.randomSubsetOf(4, executorServiceArray3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: Can't pick 4 random objects from a list of 1 objects");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray2);
org.junit.Assert.assertNotNull(executorServiceArray3);
}
@Test
public void test01741() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01741");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(5, 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01742() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01742");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween(4, 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 4, 0");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01743() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01743");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomAsciiOfLengthBetween((int) (byte) 10, (int) (byte) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01744() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01744");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.elasticsearch.index.analysis.AnalysisService analysisService11 = null;
synonymsAnalysisTest0.setanalysisService(analysisService11);
org.apache.lucene.index.Terms terms14 = null;
org.apache.lucene.index.Terms terms15 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsStatisticsEquals("tests.weekly", terms14, terms15);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01745() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01745");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.PostingsEnum postingsEnum14 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.badapples", indexReader12, (int) (short) 10, postingsEnum14, postingsEnum15);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest17 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest17.setUp();
org.apache.lucene.index.IndexReader indexReader20 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
org.apache.lucene.index.PostingsEnum postingsEnum23 = null;
synonymsAnalysisTest17.assertDocsSkippingEquals("hi!", indexReader20, 0, postingsEnum22, postingsEnum23, true);
org.elasticsearch.index.analysis.AnalysisService analysisService26 = synonymsAnalysisTest17.analysisService;
org.junit.rules.RuleChain ruleChain27 = synonymsAnalysisTest17.failureAndSuccessEvents;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain27;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader32 = null;
org.apache.lucene.index.IndexReader indexReader33 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("tests.monster", indexReader32, indexReader33);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain10);
org.junit.Assert.assertNull(analysisService26);
org.junit.Assert.assertNotNull(ruleChain27);
}
@Test
public void test01746() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01746");
org.junit.Assert.assertEquals(10.0d, (double) 5, (double) ' ');
}
@Test
public void test01747() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01747");
org.junit.Assert.assertEquals("hi!", (float) 100, (float) (short) 100, (float) (short) 0);
}
@Test
public void test01748() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01748");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("tests.slow", "tests.badapples");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01749() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01749");
java.text.Collator collator0 = null;
// The following exception was thrown during execution in test generation
try {
int int3 = org.apache.lucene.util.LuceneTestCase.collate(collator0, "", "tests.slow");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01750() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01750");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false);
synonymsAnalysisTest0.assertPathHasBeenCleared("hi!");
org.elasticsearch.index.analysis.AnalysisService analysisService24 = synonymsAnalysisTest0.getanalysisService();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest25 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest25.setUp();
synonymsAnalysisTest25.ensureCheckIndexPassed();
org.junit.Assert.assertNotSame((java.lang.Object) analysisService24, (java.lang.Object) synonymsAnalysisTest25);
org.elasticsearch.common.logging.ESLogger eSLogger29 = synonymsAnalysisTest25.getlogger();
synonymsAnalysisTest25.restoreIndexWriterMaxDocs();
org.apache.lucene.index.IndexReader indexReader32 = null;
org.apache.lucene.index.PostingsEnum postingsEnum34 = null;
org.apache.lucene.index.PostingsEnum postingsEnum35 = null;
synonymsAnalysisTest25.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader32, 5, postingsEnum34, postingsEnum35);
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest25.match("tests.failfast", "hi!", "<unknown>");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService24);
org.junit.Assert.assertNotNull(eSLogger29);
}
@Test
public void test01751() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01751");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.apache.lucene.index.PostingsEnum postingsEnum14 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("enwiki.random.lines.txt", postingsEnum14, postingsEnum15, false);
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.Fields fields20 = null;
org.apache.lucene.index.Fields fields21 = null;
synonymsAnalysisTest0.assertFieldsEquals("europarl.lines.txt.gz", indexReader19, fields20, fields21, true);
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.match("tests.awaitsfix", "tests.failfast", "tests.monster");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNull(analysisService11);
}
@Test
public void test01752() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01752");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = null;
synonymsAnalysisTest0.setanalysisService(analysisService9);
org.apache.lucene.index.Terms terms12 = null;
org.apache.lucene.index.Terms terms13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsStatisticsEquals("enwiki.random.lines.txt", terms12, terms13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01753() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01753");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService4 = null;
synonymsAnalysisTest0.setanalysisService(analysisService4);
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("<unknown>", indexReader7, (-1), postingsEnum9, postingsEnum10, true);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.apache.lucene.index.IndexReader indexReader16 = null;
org.apache.lucene.index.Fields fields17 = null;
org.apache.lucene.index.Fields fields18 = null;
synonymsAnalysisTest0.assertFieldsEquals("<unknown>", indexReader16, fields17, fields18, false);
java.lang.String str21 = synonymsAnalysisTest0.getTestName();
org.apache.lucene.index.IndexReader indexReader23 = null;
org.apache.lucene.index.IndexReader indexReader24 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertNormsEquals("hi!", indexReader23, indexReader24);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertEquals("'" + str21 + "' != '" + "<unknown>" + "'", str21, "<unknown>");
}
@Test
public void test01754() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01754");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween(5, (int) 'a');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01755() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01755");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.assumeTrue("tests.badapples", false);
org.junit.Assert.fail("Expected exception of type com.carrotsearch.randomizedtesting.InternalAssumptionViolatedException; message: tests.badapples");
} catch (org.junit.internal.AssumptionViolatedException e) {
// Expected exception.
}
}
@Test
public void test01756() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01756");
org.junit.Assert.assertEquals((long) (byte) 10, (long) (byte) 10);
}
@Test
public void test01757() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01757");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((-1), (int) '#');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01758() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01758");
java.util.concurrent.ExecutorService executorService3 = null;
java.util.concurrent.ExecutorService[] executorServiceArray4 = new java.util.concurrent.ExecutorService[] { executorService3 };
boolean boolean5 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray4);
boolean boolean6 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray4);
java.util.concurrent.ExecutorService executorService8 = null;
java.util.concurrent.ExecutorService[] executorServiceArray9 = new java.util.concurrent.ExecutorService[] { executorService8 };
boolean boolean10 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray9);
boolean boolean11 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray9);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray9, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray4, (java.lang.Object[]) executorServiceArray9);
java.util.concurrent.ExecutorService executorService16 = null;
java.util.concurrent.ExecutorService[] executorServiceArray17 = new java.util.concurrent.ExecutorService[] { executorService16 };
boolean boolean18 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray17);
boolean boolean19 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray17);
java.util.concurrent.ExecutorService executorService21 = null;
java.util.concurrent.ExecutorService[] executorServiceArray22 = new java.util.concurrent.ExecutorService[] { executorService21 };
boolean boolean23 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray22);
boolean boolean24 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray22);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray22, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray17, (java.lang.Object[]) executorServiceArray22);
java.util.concurrent.ExecutorService executorService28 = null;
java.util.concurrent.ExecutorService[] executorServiceArray29 = new java.util.concurrent.ExecutorService[] { executorService28 };
boolean boolean30 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray29);
boolean boolean31 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray29);
java.util.concurrent.ExecutorService executorService33 = null;
java.util.concurrent.ExecutorService[] executorServiceArray34 = new java.util.concurrent.ExecutorService[] { executorService33 };
boolean boolean35 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray34);
boolean boolean36 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray34);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray34, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray29, (java.lang.Object[]) executorServiceArray34);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray22, (java.lang.Object[]) executorServiceArray34);
org.junit.Assert.assertNotSame((java.lang.Object) "tests.awaitsfix", (java.lang.Object) executorServiceArray22);
org.junit.Assert.assertEquals("random", (java.lang.Object[]) executorServiceArray4, (java.lang.Object[]) executorServiceArray22);
java.util.concurrent.ExecutorService executorService44 = null;
java.util.concurrent.ExecutorService[] executorServiceArray45 = new java.util.concurrent.ExecutorService[] { executorService44 };
boolean boolean46 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray45);
boolean boolean47 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray45);
java.util.concurrent.ExecutorService executorService49 = null;
java.util.concurrent.ExecutorService[] executorServiceArray50 = new java.util.concurrent.ExecutorService[] { executorService49 };
boolean boolean51 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray50);
boolean boolean52 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray50);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray50, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray45, (java.lang.Object[]) executorServiceArray50);
java.util.concurrent.ExecutorService executorService56 = null;
java.util.concurrent.ExecutorService[] executorServiceArray57 = new java.util.concurrent.ExecutorService[] { executorService56 };
boolean boolean58 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray57);
boolean boolean59 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray57);
java.util.concurrent.ExecutorService executorService61 = null;
java.util.concurrent.ExecutorService[] executorServiceArray62 = new java.util.concurrent.ExecutorService[] { executorService61 };
boolean boolean63 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray62);
boolean boolean64 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray62);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray62, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray57, (java.lang.Object[]) executorServiceArray62);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray50, (java.lang.Object[]) executorServiceArray62);
org.junit.Assert.assertNotSame((java.lang.Object) "tests.awaitsfix", (java.lang.Object) executorServiceArray50);
java.util.concurrent.ExecutorService executorService70 = null;
java.util.concurrent.ExecutorService[] executorServiceArray71 = new java.util.concurrent.ExecutorService[] { executorService70 };
boolean boolean72 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray71);
boolean boolean73 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray71);
java.util.concurrent.ExecutorService executorService75 = null;
java.util.concurrent.ExecutorService[] executorServiceArray76 = new java.util.concurrent.ExecutorService[] { executorService75 };
boolean boolean77 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray76);
boolean boolean78 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray76);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray76, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray71, (java.lang.Object[]) executorServiceArray76);
java.util.concurrent.ExecutorService executorService82 = null;
java.util.concurrent.ExecutorService[] executorServiceArray83 = new java.util.concurrent.ExecutorService[] { executorService82 };
boolean boolean84 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray83);
boolean boolean85 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray83);
java.util.concurrent.ExecutorService executorService87 = null;
java.util.concurrent.ExecutorService[] executorServiceArray88 = new java.util.concurrent.ExecutorService[] { executorService87 };
boolean boolean89 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray88);
boolean boolean90 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray88);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray88, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray83, (java.lang.Object[]) executorServiceArray88);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray76, (java.lang.Object[]) executorServiceArray88);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray50, (java.lang.Object[]) executorServiceArray88);
org.junit.Assert.assertArrayEquals("enwiki.random.lines.txt", (java.lang.Object[]) executorServiceArray4, (java.lang.Object[]) executorServiceArray88);
java.io.PrintStream printStream97 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("tests.failfast", (java.lang.Object[]) executorServiceArray88, printStream97);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray4);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + true + "'", boolean5 == true);
org.junit.Assert.assertTrue("'" + boolean6 + "' != '" + true + "'", boolean6 == true);
org.junit.Assert.assertNotNull(executorServiceArray9);
org.junit.Assert.assertTrue("'" + boolean10 + "' != '" + true + "'", boolean10 == true);
org.junit.Assert.assertTrue("'" + boolean11 + "' != '" + true + "'", boolean11 == true);
org.junit.Assert.assertNotNull(executorServiceArray17);
org.junit.Assert.assertTrue("'" + boolean18 + "' != '" + true + "'", boolean18 == true);
org.junit.Assert.assertTrue("'" + boolean19 + "' != '" + true + "'", boolean19 == true);
org.junit.Assert.assertNotNull(executorServiceArray22);
org.junit.Assert.assertTrue("'" + boolean23 + "' != '" + true + "'", boolean23 == true);
org.junit.Assert.assertTrue("'" + boolean24 + "' != '" + true + "'", boolean24 == true);
org.junit.Assert.assertNotNull(executorServiceArray29);
org.junit.Assert.assertTrue("'" + boolean30 + "' != '" + true + "'", boolean30 == true);
org.junit.Assert.assertTrue("'" + boolean31 + "' != '" + true + "'", boolean31 == true);
org.junit.Assert.assertNotNull(executorServiceArray34);
org.junit.Assert.assertTrue("'" + boolean35 + "' != '" + true + "'", boolean35 == true);
org.junit.Assert.assertTrue("'" + boolean36 + "' != '" + true + "'", boolean36 == true);
org.junit.Assert.assertNotNull(executorServiceArray45);
org.junit.Assert.assertTrue("'" + boolean46 + "' != '" + true + "'", boolean46 == true);
org.junit.Assert.assertTrue("'" + boolean47 + "' != '" + true + "'", boolean47 == true);
org.junit.Assert.assertNotNull(executorServiceArray50);
org.junit.Assert.assertTrue("'" + boolean51 + "' != '" + true + "'", boolean51 == true);
org.junit.Assert.assertTrue("'" + boolean52 + "' != '" + true + "'", boolean52 == true);
org.junit.Assert.assertNotNull(executorServiceArray57);
org.junit.Assert.assertTrue("'" + boolean58 + "' != '" + true + "'", boolean58 == true);
org.junit.Assert.assertTrue("'" + boolean59 + "' != '" + true + "'", boolean59 == true);
org.junit.Assert.assertNotNull(executorServiceArray62);
org.junit.Assert.assertTrue("'" + boolean63 + "' != '" + true + "'", boolean63 == true);
org.junit.Assert.assertTrue("'" + boolean64 + "' != '" + true + "'", boolean64 == true);
org.junit.Assert.assertNotNull(executorServiceArray71);
org.junit.Assert.assertTrue("'" + boolean72 + "' != '" + true + "'", boolean72 == true);
org.junit.Assert.assertTrue("'" + boolean73 + "' != '" + true + "'", boolean73 == true);
org.junit.Assert.assertNotNull(executorServiceArray76);
org.junit.Assert.assertTrue("'" + boolean77 + "' != '" + true + "'", boolean77 == true);
org.junit.Assert.assertTrue("'" + boolean78 + "' != '" + true + "'", boolean78 == true);
org.junit.Assert.assertNotNull(executorServiceArray83);
org.junit.Assert.assertTrue("'" + boolean84 + "' != '" + true + "'", boolean84 == true);
org.junit.Assert.assertTrue("'" + boolean85 + "' != '" + true + "'", boolean85 == true);
org.junit.Assert.assertNotNull(executorServiceArray88);
org.junit.Assert.assertTrue("'" + boolean89 + "' != '" + true + "'", boolean89 == true);
org.junit.Assert.assertTrue("'" + boolean90 + "' != '" + true + "'", boolean90 == true);
}
@Test
public void test01759() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01759");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
synonymsAnalysisTest1.ensureCheckIndexPassed();
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService5 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.Fields fields8 = null;
org.apache.lucene.index.Fields fields9 = null;
synonymsAnalysisTest1.assertFieldsEquals("tests.weekly", indexReader7, fields8, fields9, false);
org.elasticsearch.index.analysis.AnalysisService analysisService12 = synonymsAnalysisTest1.analysisService;
org.junit.Assert.assertNotSame((java.lang.Object) (short) 10, (java.lang.Object) synonymsAnalysisTest1);
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.IndexReader indexReader16 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertReaderStatisticsEquals("tests.weekly", indexReader15, indexReader16);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService5);
org.junit.Assert.assertNull(analysisService12);
}
@Test
public void test01760() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01760");
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray3 = org.elasticsearch.test.ESTestCase.generateRandomStringArray(3, 0, false);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01761() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01761");
org.junit.Assert.assertNotEquals("<unknown>", (double) 3, (double) 10L, (double) 1);
}
@Test
public void test01762() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01762");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.getlogger();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.Fields fields4 = null;
org.apache.lucene.index.Fields fields5 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.nightly", indexReader3, fields4, fields5, false);
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment8 = synonymsAnalysisTest0.newNodeEnvironment();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
}
@Test
public void test01763() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01763");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = null;
synonymsAnalysisTest0.setanalysisService(analysisService9);
org.elasticsearch.common.logging.ESLogger eSLogger11 = synonymsAnalysisTest0.logger;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.match("tests.weekly", "enwiki.random.lines.txt", "tests.awaitsfix");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger11);
}
@Test
public void test01764() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01764");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween(1, 1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01765() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01765");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((int) (short) 1, 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01766() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01766");
org.junit.Assert.assertEquals((float) (byte) 10, (float) (byte) 10, (-1.0f));
}
@Test
public void test01767() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01767");
// The following exception was thrown during execution in test generation
try {
int int1 = org.apache.lucene.util.LuceneTestCase.atLeast(10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01768() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01768");
org.junit.Assert.assertNotEquals("tests.badapples", (long) '#', (long) ' ');
}
@Test
public void test01769() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01769");
java.lang.CharSequence[] charSequenceArray7 = new java.lang.CharSequence[] { "hi!", "enwiki.random.lines.txt", "tests.nightly", "random", "enwiki.random.lines.txt", "tests.maxfailures", "tests.maxfailures" };
java.util.ArrayList<java.lang.CharSequence> charSequenceList8 = new java.util.ArrayList<java.lang.CharSequence>();
boolean boolean9 = java.util.Collections.addAll((java.util.Collection<java.lang.CharSequence>) charSequenceList8, charSequenceArray7);
// The following exception was thrown during execution in test generation
try {
java.lang.CharSequence charSequence10 = org.elasticsearch.test.ESTestCase.randomFrom((java.util.List<java.lang.CharSequence>) charSequenceList8);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charSequenceArray7);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
}
@Test
public void test01770() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01770");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.AnalysisService analysisService12 = null;
synonymsAnalysisTest0.analysisService = analysisService12;
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum17 = null;
org.apache.lucene.index.PostingsEnum postingsEnum18 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("<unknown>", indexReader15, (int) (byte) 10, postingsEnum17, postingsEnum18, false);
org.apache.lucene.index.TermsEnum termsEnum22 = null;
org.apache.lucene.index.TermsEnum termsEnum23 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("random", termsEnum22, termsEnum23);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService11);
}
@Test
public void test01771() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01771");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLengthBetween(0, (int) 'a');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01772() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01772");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
synonymsAnalysisTest0.assertPathHasBeenCleared("<unknown>");
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Terms terms7 = null;
org.apache.lucene.index.Terms terms8 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.failfast", indexReader6, terms7, terms8, true);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray12 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01773() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01773");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.weekly", indexReader9, (int) (short) 100, postingsEnum11, postingsEnum12);
org.elasticsearch.index.analysis.AnalysisService analysisService14 = null;
synonymsAnalysisTest0.setanalysisService(analysisService14);
org.apache.lucene.index.IndexableField indexableField17 = null;
org.apache.lucene.index.IndexableField indexableField18 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("tests.monster", indexableField17, indexableField18);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01774() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01774");
// The following exception was thrown during execution in test generation
try {
int int1 = org.elasticsearch.test.ESTestCase.randomInt((int) (byte) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01775() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01775");
java.lang.Runnable runnable0 = null;
java.util.concurrent.TimeUnit timeUnit2 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.test.ESTestCase.assertBusy(runnable0, (long) 10, timeUnit2);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01776() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01776");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(10, 5);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01777() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01777");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween((int) (short) 1, (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01778() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01778");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
java.lang.String str1 = synonymsAnalysisTest0.getTestName();
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.IndexReader indexReader6 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("tests.awaitsfix", indexReader5, indexReader6);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>");
}
@Test
public void test01779() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01779");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.junit.rules.RuleChain ruleChain5 = synonymsAnalysisTest0.failureAndSuccessEvents;
synonymsAnalysisTest0.resetCheckIndexStatus();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest7 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest7.setUp();
org.apache.lucene.index.IndexReader indexReader10 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
org.apache.lucene.index.PostingsEnum postingsEnum13 = null;
synonymsAnalysisTest7.assertDocsSkippingEquals("hi!", indexReader10, 0, postingsEnum12, postingsEnum13, true);
org.elasticsearch.index.analysis.AnalysisService analysisService16 = synonymsAnalysisTest7.analysisService;
org.junit.rules.RuleChain ruleChain17 = synonymsAnalysisTest7.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
synonymsAnalysisTest7.assertPositionsSkippingEquals("tests.badapples", indexReader19, (int) (short) 10, postingsEnum21, postingsEnum22);
org.junit.rules.RuleChain ruleChain24 = synonymsAnalysisTest7.failureAndSuccessEvents;
org.apache.lucene.util.LuceneTestCase.classRules = ruleChain24;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain24;
org.apache.lucene.index.IndexReader indexReader28 = null;
org.apache.lucene.index.IndexReader indexReader29 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("tests.maxfailures", indexReader28, indexReader29);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(ruleChain5);
org.junit.Assert.assertNull(analysisService16);
org.junit.Assert.assertNotNull(ruleChain17);
org.junit.Assert.assertNotNull(ruleChain24);
}
@Test
public void test01780() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01780");
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray3 = org.elasticsearch.test.ESTestCase.generateRandomStringArray((int) (short) 1, (int) (byte) 0, false);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01781() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01781");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.elasticsearch.index.analysis.AnalysisService analysisService16 = null;
synonymsAnalysisTest0.setanalysisService(analysisService16);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.match("tests.slow", "enwiki.random.lines.txt", "europarl.lines.txt.gz");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01782() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01782");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomAsciiOfLengthBetween(4, (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01783() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01783");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.weekly", indexReader9, (int) (short) 100, postingsEnum11, postingsEnum12);
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.junit.rules.RuleChain ruleChain15 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.elasticsearch.index.analysis.AnalysisService analysisService16 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.IndexReader indexReader18 = null;
org.apache.lucene.index.IndexReader indexReader19 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertNormsEquals("tests.awaitsfix", indexReader18, indexReader19);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(ruleChain15);
org.junit.Assert.assertNull(analysisService16);
}
@Test
public void test01784() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01784");
java.lang.Runnable runnable0 = null;
java.util.concurrent.TimeUnit timeUnit2 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.test.ESTestCase.assertBusy(runnable0, (long) 2, timeUnit2);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01785() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01785");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.iterations((-1), 3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: min must be >= 0: -1");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01786() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01786");
java.util.Random random0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest2.assertDocsSkippingEquals("hi!", indexReader5, 0, postingsEnum7, postingsEnum8, true);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest2.analysisService;
org.junit.rules.RuleChain ruleChain12 = synonymsAnalysisTest2.failureAndSuccessEvents;
org.elasticsearch.common.logging.ESLogger eSLogger13 = synonymsAnalysisTest2.logger;
org.apache.lucene.document.FieldType fieldType14 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field15 = org.apache.lucene.util.LuceneTestCase.newField(random0, "random", (java.lang.Object) eSLogger13, fieldType14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService11);
org.junit.Assert.assertNotNull(ruleChain12);
org.junit.Assert.assertNotNull(eSLogger13);
}
@Test
public void test01787() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01787");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween((int) (short) -1, (int) ' ');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01788() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01788");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest1.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest4 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest4.setUp();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
synonymsAnalysisTest4.assertDocsSkippingEquals("hi!", indexReader7, 0, postingsEnum9, postingsEnum10, true);
org.elasticsearch.index.analysis.AnalysisService analysisService13 = synonymsAnalysisTest4.analysisService;
org.junit.rules.RuleChain ruleChain14 = synonymsAnalysisTest4.failureAndSuccessEvents;
synonymsAnalysisTest1.failureAndSuccessEvents = ruleChain14;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest16 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest16.setUp();
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
synonymsAnalysisTest16.assertDocsSkippingEquals("hi!", indexReader19, 0, postingsEnum21, postingsEnum22, true);
org.elasticsearch.index.analysis.AnalysisService analysisService25 = synonymsAnalysisTest16.analysisService;
org.junit.rules.RuleChain ruleChain26 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader28 = null;
org.apache.lucene.index.PostingsEnum postingsEnum30 = null;
org.apache.lucene.index.PostingsEnum postingsEnum31 = null;
synonymsAnalysisTest16.assertPositionsSkippingEquals("tests.badapples", indexReader28, (int) (short) 10, postingsEnum30, postingsEnum31);
org.junit.rules.RuleChain ruleChain33 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.junit.Assert.assertNotEquals("tests.slow", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) synonymsAnalysisTest16);
org.apache.lucene.index.IndexReader indexReader36 = null;
org.apache.lucene.index.IndexReader indexReader37 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertFieldInfosEquals("tests.failfast", indexReader36, indexReader37);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNull(analysisService13);
org.junit.Assert.assertNotNull(ruleChain14);
org.junit.Assert.assertNull(analysisService25);
org.junit.Assert.assertNotNull(ruleChain26);
org.junit.Assert.assertNotNull(ruleChain33);
}
@Test
public void test01789() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01789");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between((int) (byte) 10, 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01790() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01790");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.TermsEnum termsEnum6 = null;
org.apache.lucene.index.TermsEnum termsEnum7 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("tests.badapples", termsEnum6, termsEnum7);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01791() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01791");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomAsciiOfLengthBetween((int) (short) 1, (int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01792() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01792");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between((int) (byte) 0, 5);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01793() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01793");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((int) '#', (int) (short) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01794() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01794");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.elasticsearch.common.logging.ESLogger eSLogger5 = synonymsAnalysisTest0.getlogger();
org.elasticsearch.common.logging.ESLogger eSLogger6 = synonymsAnalysisTest0.getlogger();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
java.nio.file.Path path8 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path8);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger5);
org.junit.Assert.assertNotNull(eSLogger6);
}
@Test
public void test01795() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01795");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.common.logging.ESLogger eSLogger7 = synonymsAnalysisTest0.getlogger();
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.apache.lucene.index.Fields fields10 = null;
org.apache.lucene.index.Fields fields11 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("hi!", fields10, fields11);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger7);
}
@Test
public void test01796() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01796");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum4 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.nightly", postingsEnum3, postingsEnum4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.AnalysisService analysisService8 = null;
synonymsAnalysisTest0.setanalysisService(analysisService8);
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path11 = synonymsAnalysisTest0.getDataPath("europarl.lines.txt.gz");
org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: resource not found: europarl.lines.txt.gz");
} catch (java.lang.RuntimeException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNull(analysisService7);
}
@Test
public void test01797() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01797");
java.util.concurrent.ExecutorService executorService1 = null;
java.util.concurrent.ExecutorService[] executorServiceArray2 = new java.util.concurrent.ExecutorService[] { executorService1 };
boolean boolean3 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
boolean boolean4 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
java.util.concurrent.ExecutorService executorService6 = null;
java.util.concurrent.ExecutorService[] executorServiceArray7 = new java.util.concurrent.ExecutorService[] { executorService6 };
boolean boolean8 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
boolean boolean9 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray7, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray2, (java.lang.Object[]) executorServiceArray7);
java.util.concurrent.ExecutorService executorService14 = null;
java.util.concurrent.ExecutorService[] executorServiceArray15 = new java.util.concurrent.ExecutorService[] { executorService14 };
boolean boolean16 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray15);
boolean boolean17 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray15);
java.util.concurrent.ExecutorService executorService19 = null;
java.util.concurrent.ExecutorService[] executorServiceArray20 = new java.util.concurrent.ExecutorService[] { executorService19 };
boolean boolean21 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray20);
boolean boolean22 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray20);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray20, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray15, (java.lang.Object[]) executorServiceArray20);
java.util.concurrent.ExecutorService executorService26 = null;
java.util.concurrent.ExecutorService[] executorServiceArray27 = new java.util.concurrent.ExecutorService[] { executorService26 };
boolean boolean28 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray27);
boolean boolean29 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray27);
java.util.concurrent.ExecutorService executorService31 = null;
java.util.concurrent.ExecutorService[] executorServiceArray32 = new java.util.concurrent.ExecutorService[] { executorService31 };
boolean boolean33 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray32);
boolean boolean34 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray32);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray32, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray27, (java.lang.Object[]) executorServiceArray32);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray20, (java.lang.Object[]) executorServiceArray32);
org.junit.Assert.assertNotSame((java.lang.Object) "tests.awaitsfix", (java.lang.Object) executorServiceArray20);
java.util.concurrent.ExecutorService executorService40 = null;
java.util.concurrent.ExecutorService[] executorServiceArray41 = new java.util.concurrent.ExecutorService[] { executorService40 };
boolean boolean42 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray41);
boolean boolean43 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray41);
java.util.concurrent.ExecutorService executorService45 = null;
java.util.concurrent.ExecutorService[] executorServiceArray46 = new java.util.concurrent.ExecutorService[] { executorService45 };
boolean boolean47 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray46);
boolean boolean48 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray46);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray46, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray41, (java.lang.Object[]) executorServiceArray46);
java.util.concurrent.ExecutorService executorService52 = null;
java.util.concurrent.ExecutorService[] executorServiceArray53 = new java.util.concurrent.ExecutorService[] { executorService52 };
boolean boolean54 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray53);
boolean boolean55 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray53);
java.util.concurrent.ExecutorService executorService57 = null;
java.util.concurrent.ExecutorService[] executorServiceArray58 = new java.util.concurrent.ExecutorService[] { executorService57 };
boolean boolean59 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray58);
boolean boolean60 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray58);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray58, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray53, (java.lang.Object[]) executorServiceArray58);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray46, (java.lang.Object[]) executorServiceArray58);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray20, (java.lang.Object[]) executorServiceArray58);
org.junit.Assert.assertArrayEquals("tests.monster", (java.lang.Object[]) executorServiceArray7, (java.lang.Object[]) executorServiceArray20);
org.junit.Assert.assertNotNull((java.lang.Object) "tests.monster");
org.junit.Assert.assertNotNull(executorServiceArray2);
org.junit.Assert.assertTrue("'" + boolean3 + "' != '" + true + "'", boolean3 == true);
org.junit.Assert.assertTrue("'" + boolean4 + "' != '" + true + "'", boolean4 == true);
org.junit.Assert.assertNotNull(executorServiceArray7);
org.junit.Assert.assertTrue("'" + boolean8 + "' != '" + true + "'", boolean8 == true);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
org.junit.Assert.assertNotNull(executorServiceArray15);
org.junit.Assert.assertTrue("'" + boolean16 + "' != '" + true + "'", boolean16 == true);
org.junit.Assert.assertTrue("'" + boolean17 + "' != '" + true + "'", boolean17 == true);
org.junit.Assert.assertNotNull(executorServiceArray20);
org.junit.Assert.assertTrue("'" + boolean21 + "' != '" + true + "'", boolean21 == true);
org.junit.Assert.assertTrue("'" + boolean22 + "' != '" + true + "'", boolean22 == true);
org.junit.Assert.assertNotNull(executorServiceArray27);
org.junit.Assert.assertTrue("'" + boolean28 + "' != '" + true + "'", boolean28 == true);
org.junit.Assert.assertTrue("'" + boolean29 + "' != '" + true + "'", boolean29 == true);
org.junit.Assert.assertNotNull(executorServiceArray32);
org.junit.Assert.assertTrue("'" + boolean33 + "' != '" + true + "'", boolean33 == true);
org.junit.Assert.assertTrue("'" + boolean34 + "' != '" + true + "'", boolean34 == true);
org.junit.Assert.assertNotNull(executorServiceArray41);
org.junit.Assert.assertTrue("'" + boolean42 + "' != '" + true + "'", boolean42 == true);
org.junit.Assert.assertTrue("'" + boolean43 + "' != '" + true + "'", boolean43 == true);
org.junit.Assert.assertNotNull(executorServiceArray46);
org.junit.Assert.assertTrue("'" + boolean47 + "' != '" + true + "'", boolean47 == true);
org.junit.Assert.assertTrue("'" + boolean48 + "' != '" + true + "'", boolean48 == true);
org.junit.Assert.assertNotNull(executorServiceArray53);
org.junit.Assert.assertTrue("'" + boolean54 + "' != '" + true + "'", boolean54 == true);
org.junit.Assert.assertTrue("'" + boolean55 + "' != '" + true + "'", boolean55 == true);
org.junit.Assert.assertNotNull(executorServiceArray58);
org.junit.Assert.assertTrue("'" + boolean59 + "' != '" + true + "'", boolean59 == true);
org.junit.Assert.assertTrue("'" + boolean60 + "' != '" + true + "'", boolean60 == true);
}
@Test
public void test01798() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01798");
org.apache.lucene.util.LuceneTestCase.assumeFalse("hi!", false);
}
@Test
public void test01799() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01799");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.elasticsearch.index.analysis.AnalysisService analysisService16 = null;
synonymsAnalysisTest0.setanalysisService(analysisService16);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.apache.lucene.index.IndexReader indexReader20 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
org.apache.lucene.index.PostingsEnum postingsEnum23 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.slow", indexReader20, 100, postingsEnum22, postingsEnum23);
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path26 = synonymsAnalysisTest0.getDataPath("random");
org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: resource not found: random");
} catch (java.lang.RuntimeException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01800() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01800");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) 'a', 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01801() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01801");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.getlogger();
org.elasticsearch.index.analysis.AnalysisService analysisService2 = null;
synonymsAnalysisTest0.setanalysisService(analysisService2);
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path5 = synonymsAnalysisTest0.getDataPath("hi!");
org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: resource not found: hi!");
} catch (java.lang.RuntimeException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
}
@Test
public void test01802() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01802");
org.junit.Assert.assertNotEquals("tests.monster", (double) ' ', (double) (byte) 100, (double) (-1));
}
@Test
public void test01803() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01803");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false);
org.elasticsearch.index.analysis.AnalysisService analysisService22 = null;
synonymsAnalysisTest0.setanalysisService(analysisService22);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest24 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest24.setUp();
synonymsAnalysisTest24.ensureCheckIndexPassed();
synonymsAnalysisTest24.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService28 = synonymsAnalysisTest24.analysisService;
org.apache.lucene.index.IndexReader indexReader30 = null;
org.apache.lucene.index.Fields fields31 = null;
org.apache.lucene.index.Fields fields32 = null;
synonymsAnalysisTest24.assertFieldsEquals("tests.weekly", indexReader30, fields31, fields32, false);
org.elasticsearch.index.analysis.AnalysisService analysisService35 = synonymsAnalysisTest24.analysisService;
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) analysisService35);
org.apache.lucene.index.IndexableField indexableField38 = null;
org.apache.lucene.index.IndexableField indexableField39 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("enwiki.random.lines.txt", indexableField38, indexableField39);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService28);
org.junit.Assert.assertNull(analysisService35);
}
@Test
public void test01804() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01804");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.IndexReader indexReader14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermVectorsEquals("hi!", indexReader13, indexReader14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService11);
}
@Test
public void test01805() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01805");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService4 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.Fields fields7 = null;
org.apache.lucene.index.Fields fields8 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.weekly", indexReader6, fields7, fields8, false);
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.Terms terms13 = null;
org.apache.lucene.index.Terms terms14 = null;
synonymsAnalysisTest0.assertTermsEquals("europarl.lines.txt.gz", indexReader12, terms13, terms14, false);
org.elasticsearch.index.analysis.AnalysisService analysisService17 = null;
synonymsAnalysisTest0.setanalysisService(analysisService17);
org.junit.rules.RuleChain ruleChain19 = synonymsAnalysisTest0.failureAndSuccessEvents;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment20 = synonymsAnalysisTest0.newNodeEnvironment();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService4);
org.junit.Assert.assertNotNull(ruleChain19);
}
@Test
public void test01806() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01806");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newTextField(random0, "random", "", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01807() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01807");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.setanalysisService(analysisService7);
java.lang.String str9 = synonymsAnalysisTest0.getTestName();
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.IndexReader indexReader13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("", indexReader12, indexReader13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>");
org.junit.Assert.assertNotNull(ruleChain10);
}
@Test
public void test01808() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01808");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("tests.slow", "tests.weekly", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01809() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01809");
org.junit.Assert.assertNotNull((java.lang.Object) (-1L));
}
@Test
public void test01810() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01810");
java.text.Collator collator0 = null;
// The following exception was thrown during execution in test generation
try {
int int3 = org.apache.lucene.util.LuceneTestCase.collate(collator0, "tests.nightly", "<unknown>");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01811() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01811");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomAsciiOfLength((int) (short) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01812() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01812");
float[] floatArray1 = new float[] {};
float[] floatArray2 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray1, floatArray2, (float) (short) 0);
float[] floatArray5 = new float[] {};
float[] floatArray6 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray5, floatArray6, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray1, floatArray6, (float) 10);
float[] floatArray11 = new float[] {};
float[] floatArray12 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray11, floatArray12, (float) (short) 0);
float[] floatArray15 = new float[] {};
float[] floatArray16 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray15, floatArray16, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray11, floatArray16, (float) 10);
float[] floatArray21 = new float[] {};
float[] floatArray22 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray21, floatArray22, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray16, floatArray21, (float) 5);
org.junit.Assert.assertArrayEquals(floatArray1, floatArray21, (float) (short) 10);
float[] floatArray30 = new float[] {};
float[] floatArray31 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray30, floatArray31, (float) (short) 0);
float[] floatArray34 = new float[] {};
float[] floatArray35 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray34, floatArray35, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray30, floatArray35, (float) 10);
float[] floatArray40 = new float[] {};
float[] floatArray41 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray40, floatArray41, (float) (short) 0);
float[] floatArray44 = new float[] {};
float[] floatArray45 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray44, floatArray45, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray40, floatArray45, (float) 10);
org.junit.Assert.assertArrayEquals("tests.maxfailures", floatArray30, floatArray45, (float) (byte) 10);
org.junit.Assert.assertArrayEquals(floatArray21, floatArray30, (float) (short) 10);
float[] floatArray54 = new float[] {};
float[] floatArray55 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray54, floatArray55, (float) (short) 0);
float[] floatArray58 = new float[] {};
float[] floatArray59 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray58, floatArray59, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray54, floatArray59, (float) 10);
float[] floatArray64 = new float[] {};
float[] floatArray65 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray64, floatArray65, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray59, floatArray64, (float) 5);
org.junit.Assert.assertArrayEquals("europarl.lines.txt.gz", floatArray30, floatArray59, (float) (byte) 0);
org.junit.Assert.assertNotNull(floatArray1);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray1), "[]");
org.junit.Assert.assertNotNull(floatArray2);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray2), "[]");
org.junit.Assert.assertNotNull(floatArray5);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray5), "[]");
org.junit.Assert.assertNotNull(floatArray6);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray6), "[]");
org.junit.Assert.assertNotNull(floatArray11);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray11), "[]");
org.junit.Assert.assertNotNull(floatArray12);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray12), "[]");
org.junit.Assert.assertNotNull(floatArray15);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray15), "[]");
org.junit.Assert.assertNotNull(floatArray16);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray16), "[]");
org.junit.Assert.assertNotNull(floatArray21);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray21), "[]");
org.junit.Assert.assertNotNull(floatArray22);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray22), "[]");
org.junit.Assert.assertNotNull(floatArray30);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray30), "[]");
org.junit.Assert.assertNotNull(floatArray31);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray31), "[]");
org.junit.Assert.assertNotNull(floatArray34);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray34), "[]");
org.junit.Assert.assertNotNull(floatArray35);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray35), "[]");
org.junit.Assert.assertNotNull(floatArray40);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray40), "[]");
org.junit.Assert.assertNotNull(floatArray41);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray41), "[]");
org.junit.Assert.assertNotNull(floatArray44);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray44), "[]");
org.junit.Assert.assertNotNull(floatArray45);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray45), "[]");
org.junit.Assert.assertNotNull(floatArray54);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray54), "[]");
org.junit.Assert.assertNotNull(floatArray55);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray55), "[]");
org.junit.Assert.assertNotNull(floatArray58);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray58), "[]");
org.junit.Assert.assertNotNull(floatArray59);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray59), "[]");
org.junit.Assert.assertNotNull(floatArray64);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray64), "[]");
org.junit.Assert.assertNotNull(floatArray65);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray65), "[]");
}
@Test
public void test01813() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01813");
org.junit.Assert.assertNotEquals(100L, (long) 0);
}
@Test
public void test01814() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01814");
java.util.concurrent.ExecutorService executorService0 = null;
java.util.concurrent.ExecutorService[] executorServiceArray1 = new java.util.concurrent.ExecutorService[] { executorService0 };
boolean boolean2 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray1);
boolean boolean3 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray1);
java.util.concurrent.ExecutorService executorService5 = null;
java.util.concurrent.ExecutorService[] executorServiceArray6 = new java.util.concurrent.ExecutorService[] { executorService5 };
boolean boolean7 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray6);
boolean boolean8 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray6);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray6, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray1, (java.lang.Object[]) executorServiceArray6);
java.util.concurrent.ExecutorService executorService12 = null;
java.util.concurrent.ExecutorService[] executorServiceArray13 = new java.util.concurrent.ExecutorService[] { executorService12 };
boolean boolean14 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray13);
boolean boolean15 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray13);
java.util.concurrent.ExecutorService executorService17 = null;
java.util.concurrent.ExecutorService[] executorServiceArray18 = new java.util.concurrent.ExecutorService[] { executorService17 };
boolean boolean19 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray18);
boolean boolean20 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray18);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray18, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray13, (java.lang.Object[]) executorServiceArray18);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray6, (java.lang.Object[]) executorServiceArray18);
java.util.concurrent.ExecutorService executorService25 = null;
java.util.concurrent.ExecutorService[] executorServiceArray26 = new java.util.concurrent.ExecutorService[] { executorService25 };
boolean boolean27 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray26);
boolean boolean28 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray26);
java.util.concurrent.ExecutorService executorService30 = null;
java.util.concurrent.ExecutorService[] executorServiceArray31 = new java.util.concurrent.ExecutorService[] { executorService30 };
boolean boolean32 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray31);
boolean boolean33 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray31);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray31, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray26, (java.lang.Object[]) executorServiceArray31);
java.util.concurrent.ExecutorService executorService37 = null;
java.util.concurrent.ExecutorService[] executorServiceArray38 = new java.util.concurrent.ExecutorService[] { executorService37 };
boolean boolean39 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray38);
boolean boolean40 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray38);
java.util.concurrent.ExecutorService executorService42 = null;
java.util.concurrent.ExecutorService[] executorServiceArray43 = new java.util.concurrent.ExecutorService[] { executorService42 };
boolean boolean44 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray43);
boolean boolean45 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray43);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray43, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray38, (java.lang.Object[]) executorServiceArray43);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray31, (java.lang.Object[]) executorServiceArray43);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray6, (java.lang.Object[]) executorServiceArray31);
java.util.concurrent.ExecutorService executorService53 = null;
java.util.concurrent.ExecutorService[] executorServiceArray54 = new java.util.concurrent.ExecutorService[] { executorService53 };
boolean boolean55 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray54);
boolean boolean56 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray54);
java.util.concurrent.ExecutorService executorService58 = null;
java.util.concurrent.ExecutorService[] executorServiceArray59 = new java.util.concurrent.ExecutorService[] { executorService58 };
boolean boolean60 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray59);
boolean boolean61 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray59);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray59, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray54, (java.lang.Object[]) executorServiceArray59);
org.junit.Assert.assertNotSame("hi!", (java.lang.Object) "tests.weekly", (java.lang.Object) executorServiceArray54);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray6, (java.lang.Object[]) executorServiceArray54);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest67 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum69 = null;
org.apache.lucene.index.PostingsEnum postingsEnum70 = null;
synonymsAnalysisTest67.assertDocsEnumEquals("tests.badapples", postingsEnum69, postingsEnum70, true);
synonymsAnalysisTest67.ensureAllSearchContextsReleased();
synonymsAnalysisTest67.setIndexWriterMaxDocs((int) (short) 10);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest77 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest77.setUp();
org.apache.lucene.index.IndexReader indexReader80 = null;
org.apache.lucene.index.PostingsEnum postingsEnum82 = null;
org.apache.lucene.index.PostingsEnum postingsEnum83 = null;
synonymsAnalysisTest77.assertDocsSkippingEquals("hi!", indexReader80, 0, postingsEnum82, postingsEnum83, true);
org.elasticsearch.index.analysis.AnalysisService analysisService86 = null;
synonymsAnalysisTest77.setanalysisService(analysisService86);
org.elasticsearch.common.logging.ESLogger eSLogger88 = synonymsAnalysisTest77.logger;
java.lang.Object obj89 = null;
org.junit.Assert.assertNotEquals("tests.maxfailures", (java.lang.Object) synonymsAnalysisTest77, obj89);
org.junit.rules.TestRule testRule91 = synonymsAnalysisTest77.ruleChain;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest92 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest92.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger94 = synonymsAnalysisTest92.logger;
synonymsAnalysisTest92.tearDown();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest[] synonymsAnalysisTestArray96 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest[] { synonymsAnalysisTest67, synonymsAnalysisTest77, synonymsAnalysisTest92 };
java.util.Set<org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest> synonymsAnalysisTestSet97 = org.apache.lucene.util.LuceneTestCase.asSet(synonymsAnalysisTestArray96);
java.util.Set<org.apache.lucene.util.LuceneTestCase> luceneTestCaseSet98 = org.apache.lucene.util.LuceneTestCase.asSet((org.apache.lucene.util.LuceneTestCase[]) synonymsAnalysisTestArray96);
org.junit.Assert.assertNotEquals((java.lang.Object) executorServiceArray6, (java.lang.Object) synonymsAnalysisTestArray96);
org.junit.Assert.assertNotNull(executorServiceArray1);
org.junit.Assert.assertTrue("'" + boolean2 + "' != '" + true + "'", boolean2 == true);
org.junit.Assert.assertTrue("'" + boolean3 + "' != '" + true + "'", boolean3 == true);
org.junit.Assert.assertNotNull(executorServiceArray6);
org.junit.Assert.assertTrue("'" + boolean7 + "' != '" + true + "'", boolean7 == true);
org.junit.Assert.assertTrue("'" + boolean8 + "' != '" + true + "'", boolean8 == true);
org.junit.Assert.assertNotNull(executorServiceArray13);
org.junit.Assert.assertTrue("'" + boolean14 + "' != '" + true + "'", boolean14 == true);
org.junit.Assert.assertTrue("'" + boolean15 + "' != '" + true + "'", boolean15 == true);
org.junit.Assert.assertNotNull(executorServiceArray18);
org.junit.Assert.assertTrue("'" + boolean19 + "' != '" + true + "'", boolean19 == true);
org.junit.Assert.assertTrue("'" + boolean20 + "' != '" + true + "'", boolean20 == true);
org.junit.Assert.assertNotNull(executorServiceArray26);
org.junit.Assert.assertTrue("'" + boolean27 + "' != '" + true + "'", boolean27 == true);
org.junit.Assert.assertTrue("'" + boolean28 + "' != '" + true + "'", boolean28 == true);
org.junit.Assert.assertNotNull(executorServiceArray31);
org.junit.Assert.assertTrue("'" + boolean32 + "' != '" + true + "'", boolean32 == true);
org.junit.Assert.assertTrue("'" + boolean33 + "' != '" + true + "'", boolean33 == true);
org.junit.Assert.assertNotNull(executorServiceArray38);
org.junit.Assert.assertTrue("'" + boolean39 + "' != '" + true + "'", boolean39 == true);
org.junit.Assert.assertTrue("'" + boolean40 + "' != '" + true + "'", boolean40 == true);
org.junit.Assert.assertNotNull(executorServiceArray43);
org.junit.Assert.assertTrue("'" + boolean44 + "' != '" + true + "'", boolean44 == true);
org.junit.Assert.assertTrue("'" + boolean45 + "' != '" + true + "'", boolean45 == true);
org.junit.Assert.assertNotNull(executorServiceArray54);
org.junit.Assert.assertTrue("'" + boolean55 + "' != '" + true + "'", boolean55 == true);
org.junit.Assert.assertTrue("'" + boolean56 + "' != '" + true + "'", boolean56 == true);
org.junit.Assert.assertNotNull(executorServiceArray59);
org.junit.Assert.assertTrue("'" + boolean60 + "' != '" + true + "'", boolean60 == true);
org.junit.Assert.assertTrue("'" + boolean61 + "' != '" + true + "'", boolean61 == true);
org.junit.Assert.assertNotNull(eSLogger88);
org.junit.Assert.assertNotNull(testRule91);
org.junit.Assert.assertNotNull(eSLogger94);
org.junit.Assert.assertNotNull(synonymsAnalysisTestArray96);
org.junit.Assert.assertNotNull(synonymsAnalysisTestSet97);
org.junit.Assert.assertNotNull(luceneTestCaseSet98);
}
@Test
public void test01815() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01815");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newTextField("europarl.lines.txt.gz", "", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01816() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01816");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between((int) (byte) -1, (int) '4');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01817() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01817");
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray3 = org.elasticsearch.test.ESTestCase.generateRandomStringArray((int) (short) -1, 0, false);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01818() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01818");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.assumeTrue("tests.monster", false);
org.junit.Assert.fail("Expected exception of type com.carrotsearch.randomizedtesting.InternalAssumptionViolatedException; message: tests.monster");
} catch (org.junit.internal.AssumptionViolatedException e) {
// Expected exception.
}
}
@Test
public void test01819() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01819");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.junit.rules.TestRule testRule10 = synonymsAnalysisTest1.ruleChain;
org.junit.Assert.assertNotSame((java.lang.Object) (short) 10, (java.lang.Object) synonymsAnalysisTest1);
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest1.assertPositionsSkippingEquals("tests.badapples", indexReader13, (int) (short) 10, postingsEnum15, postingsEnum16);
org.apache.lucene.index.IndexableField indexableField19 = null;
org.apache.lucene.index.IndexableField indexableField20 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertStoredFieldEquals("tests.slow", indexableField19, indexableField20);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule10);
}
@Test
public void test01820() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01820");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.IndexReader indexReader13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertNormsEquals("", indexReader12, indexReader13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01821() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01821");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
org.elasticsearch.common.settings.Settings settings3 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment4 = synonymsAnalysisTest0.newNodeEnvironment(settings3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
}
@Test
public void test01822() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01822");
java.util.Random random0 = null;
float[] floatArray2 = new float[] {};
float[] floatArray3 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray2, floatArray3, (float) (short) 0);
float[] floatArray6 = new float[] {};
float[] floatArray7 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray6, floatArray7, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray2, floatArray7, (float) 10);
float[] floatArray12 = new float[] {};
float[] floatArray13 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray12, floatArray13, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray7, floatArray12, (float) 5);
org.apache.lucene.document.FieldType fieldType18 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field19 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.weekly", (java.lang.Object) floatArray12, fieldType18);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(floatArray2);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray2), "[]");
org.junit.Assert.assertNotNull(floatArray3);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray3), "[]");
org.junit.Assert.assertNotNull(floatArray6);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray6), "[]");
org.junit.Assert.assertNotNull(floatArray7);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray7), "[]");
org.junit.Assert.assertNotNull(floatArray12);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray12), "[]");
org.junit.Assert.assertNotNull(floatArray13);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray13), "[]");
}
@Test
public void test01823() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01823");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween(3, (int) '4');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01824() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01824");
org.junit.Assert.assertEquals("tests.maxfailures", (double) 5, (double) 0, (double) '#');
}
@Test
public void test01825() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01825");
short[] shortArray1 = null;
short[] shortArray2 = null;
org.junit.Assert.assertArrayEquals("tests.weekly", shortArray1, shortArray2);
}
@Test
public void test01826() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01826");
// The following exception was thrown during execution in test generation
try {
int int1 = org.elasticsearch.test.ESTestCase.randomInt((int) (short) 1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01827() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01827");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.IndexReader indexReader13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("tests.slow", indexReader12, indexReader13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService10);
}
@Test
public void test01828() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01828");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLengthBetween((int) '#', (int) '4');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01829() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01829");
org.apache.lucene.util.BytesRef bytesRef1 = null;
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("europarl.lines.txt.gz", bytesRef1, store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01830() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01830");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
java.lang.Object obj4 = null;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, obj4);
org.junit.rules.TestRule testRule6 = synonymsAnalysisTest0.ruleChain;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
java.nio.file.Path path9 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path9);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(testRule6);
}
@Test
public void test01831() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01831");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
java.lang.Object obj4 = null;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, obj4);
org.junit.rules.TestRule testRule6 = synonymsAnalysisTest0.ruleChain;
org.apache.lucene.index.IndexReader indexReader8 = null;
org.apache.lucene.index.Fields fields9 = null;
org.apache.lucene.index.Fields fields10 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.monster", indexReader8, fields9, fields10, true);
org.apache.lucene.index.IndexReader indexReader14 = null;
org.apache.lucene.index.IndexReader indexReader15 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertNormsEquals("<unknown>", indexReader14, indexReader15);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(testRule6);
}
@Test
public void test01832() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01832");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(2, (int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01833() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01833");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newTextField(random0, "enwiki.random.lines.txt", "<unknown>", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01834() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01834");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.iterations(4, 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01835() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01835");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newStringField(random0, "tests.maxfailures", "tests.awaitsfix", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01836() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01836");
org.junit.Assert.assertNotEquals((double) 'a', (double) 4, (double) (byte) 0);
}
@Test
public void test01837() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01837");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newTextField("tests.monster", "tests.slow", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01838() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01838");
org.junit.Assert.assertTrue("europarl.lines.txt.gz", true);
}
@Test
public void test01839() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01839");
java.util.Locale[] localeArray0 = new java.util.Locale[] {};
// The following exception was thrown during execution in test generation
try {
java.util.Locale locale1 = org.elasticsearch.test.ESTestCase.randomFrom(localeArray0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(localeArray0);
}
@Test
public void test01840() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01840");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false);
synonymsAnalysisTest0.assertPathHasBeenCleared("hi!");
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.junit.rules.RuleChain ruleChain25 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader27 = null;
org.apache.lucene.index.IndexReader indexReader28 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("tests.weekly", indexReader27, indexReader28);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain25);
}
@Test
public void test01841() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01841");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between(2, 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01842() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01842");
java.util.Random random0 = null;
java.lang.Object obj2 = null;
org.apache.lucene.document.FieldType fieldType3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.weekly", obj2, fieldType3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01843() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01843");
org.junit.Assert.assertNotNull("tests.awaitsfix", (java.lang.Object) '#');
}
@Test
public void test01844() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01844");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) (byte) 1, 2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01845() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01845");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.assumeFalse("<unknown>", true);
org.junit.Assert.fail("Expected exception of type com.carrotsearch.randomizedtesting.InternalAssumptionViolatedException; message: <unknown>");
} catch (org.junit.internal.AssumptionViolatedException e) {
// Expected exception.
}
}
@Test
public void test01846() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01846");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
org.elasticsearch.common.logging.ESLogger eSLogger4 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.IndexReader indexReader8 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderEquals("random", indexReader7, indexReader8);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(eSLogger4);
}
@Test
public void test01847() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01847");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(3, 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01848() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01848");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("tests.awaitsfix", "tests.slow", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01849() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01849");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService4 = null;
synonymsAnalysisTest0.setanalysisService(analysisService4);
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("<unknown>", indexReader7, (-1), postingsEnum9, postingsEnum10, true);
org.junit.rules.RuleChain ruleChain13 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.TermsEnum termsEnum15 = null;
org.apache.lucene.index.TermsEnum termsEnum16 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("tests.slow", termsEnum15, termsEnum16);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNotNull(ruleChain13);
}
@Test
public void test01850() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01850");
org.junit.Assert.assertEquals((double) 1, (double) 1.0f, (double) (short) 0);
}
@Test
public void test01851() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01851");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.apache.lucene.index.IndexReader indexReader10 = null;
org.apache.lucene.index.Fields fields11 = null;
org.apache.lucene.index.Fields fields12 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.monster", indexReader10, fields11, fields12, false);
org.junit.rules.RuleChain ruleChain15 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.TermsEnum termsEnum18 = null;
org.apache.lucene.index.TermsEnum termsEnum19 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsEnumEquals("tests.maxfailures", indexReader17, termsEnum18, termsEnum19, true);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(ruleChain15);
}
@Test
public void test01852() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01852");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomAsciiOfLength((int) '#');
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01853() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01853");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) (short) 1);
synonymsAnalysisTest0.ensureCleanedUp();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest6 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest6.setUp();
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
synonymsAnalysisTest6.assertDocsSkippingEquals("hi!", indexReader9, 0, postingsEnum11, postingsEnum12, true);
org.elasticsearch.index.analysis.AnalysisService analysisService15 = synonymsAnalysisTest6.analysisService;
org.junit.rules.RuleChain ruleChain16 = synonymsAnalysisTest6.failureAndSuccessEvents;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain16;
org.elasticsearch.index.analysis.AnalysisService analysisService18 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.TermsEnum termsEnum20 = null;
org.apache.lucene.index.TermsEnum termsEnum21 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("tests.slow", termsEnum20, termsEnum21);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService15);
org.junit.Assert.assertNotNull(ruleChain16);
org.junit.Assert.assertNull(analysisService18);
}
@Test
public void test01854() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01854");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newTextField("enwiki.random.lines.txt", "tests.monster", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01855() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01855");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = null;
synonymsAnalysisTest1.setanalysisService(analysisService10);
org.elasticsearch.common.logging.ESLogger eSLogger12 = synonymsAnalysisTest1.logger;
java.lang.Object obj13 = null;
org.junit.Assert.assertNotEquals("tests.maxfailures", (java.lang.Object) synonymsAnalysisTest1, obj13);
org.junit.rules.TestRule testRule15 = synonymsAnalysisTest1.ruleChain;
org.apache.lucene.util.LuceneTestCase.classRules = testRule15;
org.junit.Assert.assertNotNull(eSLogger12);
org.junit.Assert.assertNotNull(testRule15);
}
@Test
public void test01856() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01856");
java.lang.Runnable runnable0 = null;
java.util.concurrent.TimeUnit timeUnit2 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.test.ESTestCase.assertBusy(runnable0, (long) 100, timeUnit2);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01857() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01857");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.Fields fields4 = null;
org.apache.lucene.index.Fields fields5 = null;
synonymsAnalysisTest1.assertFieldsEquals("tests.failfast", indexReader3, fields4, fields5, false);
org.elasticsearch.index.analysis.AnalysisService analysisService8 = null;
synonymsAnalysisTest1.setanalysisService(analysisService8);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest1.analysisService;
synonymsAnalysisTest1.restoreIndexWriterMaxDocs();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.Fields fields14 = null;
org.apache.lucene.index.Fields fields15 = null;
synonymsAnalysisTest1.assertFieldsEquals("", indexReader13, fields14, fields15, false);
org.junit.Assert.assertNotNull("random", (java.lang.Object) "");
org.junit.Assert.assertNull(analysisService10);
}
@Test
public void test01858() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01858");
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray3 = org.elasticsearch.test.ESTestCase.generateRandomStringArray(2, (int) (byte) 0, true);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01859() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01859");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.junit.rules.TestRule testRule3 = synonymsAnalysisTest0.ruleChain;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest4 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest4.setUp();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
synonymsAnalysisTest4.assertDocsSkippingEquals("hi!", indexReader7, 0, postingsEnum9, postingsEnum10, true);
org.elasticsearch.index.analysis.AnalysisService analysisService13 = synonymsAnalysisTest4.analysisService;
org.junit.rules.RuleChain ruleChain14 = synonymsAnalysisTest4.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader16 = null;
org.apache.lucene.index.PostingsEnum postingsEnum18 = null;
org.apache.lucene.index.PostingsEnum postingsEnum19 = null;
synonymsAnalysisTest4.assertPositionsSkippingEquals("tests.badapples", indexReader16, (int) (short) 10, postingsEnum18, postingsEnum19);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest21 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest21.setUp();
org.apache.lucene.index.IndexReader indexReader24 = null;
org.apache.lucene.index.PostingsEnum postingsEnum26 = null;
org.apache.lucene.index.PostingsEnum postingsEnum27 = null;
synonymsAnalysisTest21.assertDocsSkippingEquals("hi!", indexReader24, 0, postingsEnum26, postingsEnum27, true);
org.elasticsearch.index.analysis.AnalysisService analysisService30 = synonymsAnalysisTest21.analysisService;
org.junit.rules.RuleChain ruleChain31 = synonymsAnalysisTest21.failureAndSuccessEvents;
synonymsAnalysisTest4.failureAndSuccessEvents = ruleChain31;
org.apache.lucene.util.LuceneTestCase.classRules = ruleChain31;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain31;
org.apache.lucene.index.IndexReader indexReader36 = null;
org.apache.lucene.index.PostingsEnum postingsEnum38 = null;
org.apache.lucene.index.PostingsEnum postingsEnum39 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.badapples", indexReader36, 0, postingsEnum38, postingsEnum39);
org.apache.lucene.index.IndexReader indexReader42 = null;
org.apache.lucene.index.IndexReader indexReader43 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertNormsEquals("tests.weekly", indexReader42, indexReader43);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule3);
org.junit.Assert.assertNull(analysisService13);
org.junit.Assert.assertNotNull(ruleChain14);
org.junit.Assert.assertNull(analysisService30);
org.junit.Assert.assertNotNull(ruleChain31);
}
@Test
public void test01860() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01860");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = null;
synonymsAnalysisTest0.setanalysisService(analysisService9);
org.apache.lucene.index.TermsEnum termsEnum12 = null;
org.apache.lucene.index.TermsEnum termsEnum13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("tests.monster", termsEnum12, termsEnum13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01861() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01861");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween((int) (byte) 100, (int) (short) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 100, -1");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01862() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01862");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(3, (int) (short) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01863() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01863");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest10 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest10.setUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest10.assertDocsSkippingEquals("hi!", indexReader13, 0, postingsEnum15, postingsEnum16, true);
org.elasticsearch.index.analysis.AnalysisService analysisService19 = synonymsAnalysisTest10.analysisService;
org.apache.lucene.index.IndexReader indexReader21 = null;
org.apache.lucene.index.Fields fields22 = null;
org.apache.lucene.index.Fields fields23 = null;
synonymsAnalysisTest10.assertFieldsEquals("random", indexReader21, fields22, fields23, true);
org.apache.lucene.index.IndexReader indexReader27 = null;
org.apache.lucene.index.Terms terms28 = null;
org.apache.lucene.index.Terms terms29 = null;
synonymsAnalysisTest10.assertTermsEquals("tests.weekly", indexReader27, terms28, terms29, false);
synonymsAnalysisTest10.assertPathHasBeenCleared("hi!");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest34 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest34.setUp();
org.apache.lucene.index.IndexReader indexReader37 = null;
org.apache.lucene.index.PostingsEnum postingsEnum39 = null;
org.apache.lucene.index.PostingsEnum postingsEnum40 = null;
synonymsAnalysisTest34.assertDocsSkippingEquals("hi!", indexReader37, 0, postingsEnum39, postingsEnum40, true);
org.elasticsearch.index.analysis.AnalysisService analysisService43 = synonymsAnalysisTest34.analysisService;
org.junit.rules.RuleChain ruleChain44 = synonymsAnalysisTest34.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader46 = null;
org.apache.lucene.index.PostingsEnum postingsEnum48 = null;
org.apache.lucene.index.PostingsEnum postingsEnum49 = null;
synonymsAnalysisTest34.assertPositionsSkippingEquals("tests.badapples", indexReader46, (int) (short) 10, postingsEnum48, postingsEnum49);
org.junit.rules.RuleChain ruleChain51 = synonymsAnalysisTest34.failureAndSuccessEvents;
synonymsAnalysisTest10.failureAndSuccessEvents = ruleChain51;
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) ruleChain51);
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.tearDown();
org.apache.lucene.index.PostingsEnum postingsEnum57 = null;
org.apache.lucene.index.PostingsEnum postingsEnum58 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("hi!", postingsEnum57, postingsEnum58, false);
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService19);
org.junit.Assert.assertNull(analysisService43);
org.junit.Assert.assertNotNull(ruleChain44);
org.junit.Assert.assertNotNull(ruleChain51);
}
@Test
public void test01864() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01864");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLengthBetween((int) (byte) 1, 3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01865() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01865");
java.lang.CharSequence[] charSequenceArray10 = new java.lang.CharSequence[] { "enwiki.random.lines.txt", "enwiki.random.lines.txt", "hi!", "tests.slow", "<unknown>", "tests.monster", "tests.monster", "tests.awaitsfix", "tests.awaitsfix", "tests.awaitsfix" };
java.util.ArrayList<java.lang.CharSequence> charSequenceList11 = new java.util.ArrayList<java.lang.CharSequence>();
boolean boolean12 = java.util.Collections.addAll((java.util.Collection<java.lang.CharSequence>) charSequenceList11, charSequenceArray10);
// The following exception was thrown during execution in test generation
try {
java.lang.CharSequence charSequence13 = org.elasticsearch.test.ESTestCase.randomFrom((java.util.List<java.lang.CharSequence>) charSequenceList11);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(charSequenceArray10);
org.junit.Assert.assertTrue("'" + boolean12 + "' != '" + true + "'", boolean12 == true);
}
@Test
public void test01866() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01866");
java.lang.Object obj1 = null;
org.junit.Assert.assertNull("europarl.lines.txt.gz", obj1);
}
@Test
public void test01867() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01867");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween((int) '4', (-1));
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 52, -1");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01868() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01868");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.assumeFalse("tests.badapples", true);
org.junit.Assert.fail("Expected exception of type com.carrotsearch.randomizedtesting.InternalAssumptionViolatedException; message: tests.badapples");
} catch (org.junit.internal.AssumptionViolatedException e) {
// Expected exception.
}
}
@Test
public void test01869() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01869");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest3 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest3.setUp();
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
synonymsAnalysisTest3.assertDocsSkippingEquals("hi!", indexReader6, 0, postingsEnum8, postingsEnum9, true);
org.elasticsearch.index.analysis.AnalysisService analysisService12 = synonymsAnalysisTest3.analysisService;
org.junit.rules.RuleChain ruleChain13 = synonymsAnalysisTest3.failureAndSuccessEvents;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain13;
java.lang.String str15 = synonymsAnalysisTest0.getTestName();
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.IndexReader indexReader18 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertNormsEquals("tests.nightly", indexReader17, indexReader18);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
org.junit.Assert.assertNull(analysisService12);
org.junit.Assert.assertNotNull(ruleChain13);
org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>");
}
@Test
public void test01870() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01870");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService2 = null;
synonymsAnalysisTest0.analysisService = analysisService2;
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.Terms terms6 = null;
org.apache.lucene.index.Terms terms7 = null;
synonymsAnalysisTest0.assertTermsEquals("enwiki.random.lines.txt", indexReader5, terms6, terms7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest0.getanalysisService();
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray11 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
org.junit.Assert.assertNull(analysisService10);
}
@Test
public void test01871() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01871");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.Fields fields13 = null;
org.apache.lucene.index.Fields fields14 = null;
synonymsAnalysisTest1.assertFieldsEquals("random", indexReader12, fields13, fields14, true);
org.apache.lucene.index.IndexReader indexReader18 = null;
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
synonymsAnalysisTest1.assertPositionsSkippingEquals("tests.maxfailures", indexReader18, 0, postingsEnum20, postingsEnum21);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest23 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum25 = null;
org.apache.lucene.index.PostingsEnum postingsEnum26 = null;
synonymsAnalysisTest23.assertDocsEnumEquals("tests.badapples", postingsEnum25, postingsEnum26, true);
synonymsAnalysisTest23.ensureAllSearchContextsReleased();
org.elasticsearch.common.logging.ESLogger eSLogger30 = synonymsAnalysisTest23.getlogger();
java.lang.String str31 = synonymsAnalysisTest23.getTestName();
org.junit.Assert.assertNotSame("random", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) str31);
org.apache.lucene.index.IndexReader indexReader34 = null;
org.apache.lucene.index.Fields fields35 = null;
org.apache.lucene.index.Fields fields36 = null;
synonymsAnalysisTest1.assertFieldsEquals("", indexReader34, fields35, fields36, false);
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray39 = synonymsAnalysisTest1.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNotNull(eSLogger30);
org.junit.Assert.assertEquals("'" + str31 + "' != '" + "<unknown>" + "'", str31, "<unknown>");
}
@Test
public void test01872() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01872");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) (byte) 1, (int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01873() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01873");
org.apache.lucene.document.FieldType fieldType2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newField("hi!", "hi!", fieldType2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01874() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01874");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("tests.maxfailures", "enwiki.random.lines.txt");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01875() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01875");
java.util.concurrent.ExecutorService executorService1 = null;
java.util.concurrent.ExecutorService[] executorServiceArray2 = new java.util.concurrent.ExecutorService[] { executorService1 };
boolean boolean3 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
java.util.concurrent.ExecutorService executorService5 = null;
java.util.concurrent.ExecutorService[] executorServiceArray6 = new java.util.concurrent.ExecutorService[] { executorService5 };
boolean boolean7 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray6);
boolean boolean8 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray6);
java.util.concurrent.ExecutorService executorService10 = null;
java.util.concurrent.ExecutorService[] executorServiceArray11 = new java.util.concurrent.ExecutorService[] { executorService10 };
boolean boolean12 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray11);
boolean boolean13 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray11);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray11, (java.lang.Object) (-1.0f));
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray6, (java.lang.Object[]) executorServiceArray11);
java.lang.Object obj17 = null;
org.junit.Assert.assertNotEquals("tests.nightly", (java.lang.Object) executorServiceArray6, obj17);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray2, (java.lang.Object[]) executorServiceArray6);
java.io.PrintStream printStream20 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("", (java.lang.Object[]) executorServiceArray6, printStream20);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray2);
org.junit.Assert.assertTrue("'" + boolean3 + "' != '" + true + "'", boolean3 == true);
org.junit.Assert.assertNotNull(executorServiceArray6);
org.junit.Assert.assertTrue("'" + boolean7 + "' != '" + true + "'", boolean7 == true);
org.junit.Assert.assertTrue("'" + boolean8 + "' != '" + true + "'", boolean8 == true);
org.junit.Assert.assertNotNull(executorServiceArray11);
org.junit.Assert.assertTrue("'" + boolean12 + "' != '" + true + "'", boolean12 == true);
org.junit.Assert.assertTrue("'" + boolean13 + "' != '" + true + "'", boolean13 == true);
}
@Test
public void test01876() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01876");
java.util.concurrent.ExecutorService executorService1 = null;
java.util.concurrent.ExecutorService[] executorServiceArray2 = new java.util.concurrent.ExecutorService[] { executorService1 };
boolean boolean3 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
boolean boolean4 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray2);
java.util.concurrent.ExecutorService executorService6 = null;
java.util.concurrent.ExecutorService[] executorServiceArray7 = new java.util.concurrent.ExecutorService[] { executorService6 };
boolean boolean8 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
boolean boolean9 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray7);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray7, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray2, (java.lang.Object[]) executorServiceArray7);
java.util.concurrent.ExecutorService executorService13 = null;
java.util.concurrent.ExecutorService[] executorServiceArray14 = new java.util.concurrent.ExecutorService[] { executorService13 };
boolean boolean15 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray14);
boolean boolean16 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray14);
java.util.concurrent.ExecutorService executorService18 = null;
java.util.concurrent.ExecutorService[] executorServiceArray19 = new java.util.concurrent.ExecutorService[] { executorService18 };
boolean boolean20 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray19);
boolean boolean21 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray19);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray19, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray14, (java.lang.Object[]) executorServiceArray19);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray7, (java.lang.Object[]) executorServiceArray19);
java.util.concurrent.ExecutorService executorService27 = null;
java.util.concurrent.ExecutorService[] executorServiceArray28 = new java.util.concurrent.ExecutorService[] { executorService27 };
boolean boolean29 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray28);
java.util.concurrent.ExecutorService executorService30 = null;
java.util.concurrent.ExecutorService[] executorServiceArray31 = new java.util.concurrent.ExecutorService[] { executorService30 };
boolean boolean32 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray31);
boolean boolean33 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray31);
java.util.concurrent.ExecutorService executorService35 = null;
java.util.concurrent.ExecutorService[] executorServiceArray36 = new java.util.concurrent.ExecutorService[] { executorService35 };
boolean boolean37 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray36);
boolean boolean38 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray36);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray36, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray31, (java.lang.Object[]) executorServiceArray36);
java.util.concurrent.ExecutorService executorService42 = null;
java.util.concurrent.ExecutorService[] executorServiceArray43 = new java.util.concurrent.ExecutorService[] { executorService42 };
boolean boolean44 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray43);
boolean boolean45 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray43);
java.util.concurrent.ExecutorService executorService47 = null;
java.util.concurrent.ExecutorService[] executorServiceArray48 = new java.util.concurrent.ExecutorService[] { executorService47 };
boolean boolean49 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray48);
boolean boolean50 = org.elasticsearch.test.ESTestCase.terminate(executorServiceArray48);
org.junit.Assert.assertNotEquals("hi!", (java.lang.Object) executorServiceArray48, (java.lang.Object) (-1.0f));
org.junit.Assert.assertEquals((java.lang.Object[]) executorServiceArray43, (java.lang.Object[]) executorServiceArray48);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray36, (java.lang.Object[]) executorServiceArray48);
org.junit.Assert.assertArrayEquals("random", (java.lang.Object[]) executorServiceArray28, (java.lang.Object[]) executorServiceArray36);
org.junit.Assert.assertArrayEquals((java.lang.Object[]) executorServiceArray19, (java.lang.Object[]) executorServiceArray36);
java.io.PrintStream printStream57 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.dumpArray("enwiki.random.lines.txt", (java.lang.Object[]) executorServiceArray36, printStream57);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray2);
org.junit.Assert.assertTrue("'" + boolean3 + "' != '" + true + "'", boolean3 == true);
org.junit.Assert.assertTrue("'" + boolean4 + "' != '" + true + "'", boolean4 == true);
org.junit.Assert.assertNotNull(executorServiceArray7);
org.junit.Assert.assertTrue("'" + boolean8 + "' != '" + true + "'", boolean8 == true);
org.junit.Assert.assertTrue("'" + boolean9 + "' != '" + true + "'", boolean9 == true);
org.junit.Assert.assertNotNull(executorServiceArray14);
org.junit.Assert.assertTrue("'" + boolean15 + "' != '" + true + "'", boolean15 == true);
org.junit.Assert.assertTrue("'" + boolean16 + "' != '" + true + "'", boolean16 == true);
org.junit.Assert.assertNotNull(executorServiceArray19);
org.junit.Assert.assertTrue("'" + boolean20 + "' != '" + true + "'", boolean20 == true);
org.junit.Assert.assertTrue("'" + boolean21 + "' != '" + true + "'", boolean21 == true);
org.junit.Assert.assertNotNull(executorServiceArray28);
org.junit.Assert.assertTrue("'" + boolean29 + "' != '" + true + "'", boolean29 == true);
org.junit.Assert.assertNotNull(executorServiceArray31);
org.junit.Assert.assertTrue("'" + boolean32 + "' != '" + true + "'", boolean32 == true);
org.junit.Assert.assertTrue("'" + boolean33 + "' != '" + true + "'", boolean33 == true);
org.junit.Assert.assertNotNull(executorServiceArray36);
org.junit.Assert.assertTrue("'" + boolean37 + "' != '" + true + "'", boolean37 == true);
org.junit.Assert.assertTrue("'" + boolean38 + "' != '" + true + "'", boolean38 == true);
org.junit.Assert.assertNotNull(executorServiceArray43);
org.junit.Assert.assertTrue("'" + boolean44 + "' != '" + true + "'", boolean44 == true);
org.junit.Assert.assertTrue("'" + boolean45 + "' != '" + true + "'", boolean45 == true);
org.junit.Assert.assertNotNull(executorServiceArray48);
org.junit.Assert.assertTrue("'" + boolean49 + "' != '" + true + "'", boolean49 == true);
org.junit.Assert.assertTrue("'" + boolean50 + "' != '" + true + "'", boolean50 == true);
}
@Test
public void test01877() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01877");
java.util.Random random0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setIndexWriterMaxDocs((int) '4');
org.elasticsearch.common.logging.ESLogger eSLogger5 = synonymsAnalysisTest2.getlogger();
org.apache.lucene.document.FieldType fieldType6 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field7 = org.apache.lucene.util.LuceneTestCase.newField(random0, "enwiki.random.lines.txt", (java.lang.Object) synonymsAnalysisTest2, fieldType6);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger5);
}
@Test
public void test01878() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01878");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newTextField("tests.weekly", "tests.maxfailures", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01879() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01879");
org.junit.Assert.assertNotEquals((long) '4', (long) (short) 1);
}
@Test
public void test01880() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01880");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
java.lang.String str1 = synonymsAnalysisTest0.getTestName();
synonymsAnalysisTest0.ensureCleanedUp();
org.elasticsearch.index.analysis.AnalysisService analysisService3 = synonymsAnalysisTest0.analysisService;
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray4 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>");
org.junit.Assert.assertNull(analysisService3);
}
@Test
public void test01881() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01881");
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray3 = org.elasticsearch.test.ESTestCase.generateRandomStringArray(3, 10, false);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01882() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01882");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.Terms terms17 = null;
org.apache.lucene.index.Terms terms18 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsStatisticsEquals("hi!", terms17, terms18);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01883() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01883");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum4 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.nightly", postingsEnum3, postingsEnum4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.common.logging.ESLogger eSLogger8 = synonymsAnalysisTest0.getlogger();
org.apache.lucene.index.IndexReader indexReader10 = null;
org.apache.lucene.index.IndexReader indexReader11 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("tests.nightly", indexReader10, indexReader11);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNull(analysisService7);
org.junit.Assert.assertNotNull(eSLogger8);
}
@Test
public void test01884() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01884");
short[] shortArray2 = new short[] {};
short[] shortArray3 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray2, shortArray3);
short[] shortArray6 = new short[] {};
short[] shortArray7 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray6, shortArray7);
short[] shortArray10 = new short[] {};
short[] shortArray11 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray10, shortArray11);
org.junit.Assert.assertArrayEquals(shortArray7, shortArray10);
short[] shortArray15 = new short[] {};
short[] shortArray16 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray15, shortArray16);
org.junit.Assert.assertArrayEquals(shortArray10, shortArray15);
short[] shortArray20 = new short[] {};
short[] shortArray21 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray20, shortArray21);
short[] shortArray24 = new short[] {};
short[] shortArray25 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray24, shortArray25);
short[] shortArray28 = new short[] {};
short[] shortArray29 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray28, shortArray29);
org.junit.Assert.assertArrayEquals(shortArray25, shortArray28);
org.junit.Assert.assertArrayEquals(shortArray20, shortArray28);
org.junit.Assert.assertArrayEquals(shortArray15, shortArray20);
short[] shortArray35 = new short[] {};
short[] shortArray36 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray35, shortArray36);
short[] shortArray39 = new short[] {};
short[] shortArray40 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray39, shortArray40);
org.junit.Assert.assertArrayEquals(shortArray36, shortArray39);
short[] shortArray44 = new short[] {};
short[] shortArray45 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray44, shortArray45);
org.junit.Assert.assertArrayEquals(shortArray39, shortArray44);
org.junit.Assert.assertArrayEquals(shortArray20, shortArray44);
short[] shortArray50 = new short[] {};
short[] shortArray51 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray50, shortArray51);
short[] shortArray54 = new short[] {};
short[] shortArray55 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray54, shortArray55);
org.junit.Assert.assertArrayEquals(shortArray51, shortArray54);
short[] shortArray59 = new short[] {};
short[] shortArray60 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray59, shortArray60);
org.junit.Assert.assertArrayEquals(shortArray54, shortArray59);
short[] shortArray64 = new short[] {};
short[] shortArray65 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray64, shortArray65);
short[] shortArray68 = new short[] {};
short[] shortArray69 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray68, shortArray69);
org.junit.Assert.assertArrayEquals(shortArray65, shortArray68);
short[] shortArray73 = new short[] {};
short[] shortArray74 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray73, shortArray74);
org.junit.Assert.assertArrayEquals(shortArray68, shortArray73);
short[] shortArray78 = new short[] {};
short[] shortArray79 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray78, shortArray79);
short[] shortArray82 = new short[] {};
short[] shortArray83 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray82, shortArray83);
short[] shortArray86 = new short[] {};
short[] shortArray87 = new short[] {};
org.junit.Assert.assertArrayEquals("tests.maxfailures", shortArray86, shortArray87);
org.junit.Assert.assertArrayEquals(shortArray83, shortArray86);
org.junit.Assert.assertArrayEquals(shortArray78, shortArray86);
org.junit.Assert.assertArrayEquals(shortArray73, shortArray78);
org.junit.Assert.assertArrayEquals(shortArray59, shortArray73);
org.junit.Assert.assertArrayEquals(shortArray20, shortArray73);
org.junit.Assert.assertArrayEquals("tests.failfast", shortArray3, shortArray73);
org.junit.Assert.assertNotNull(shortArray2);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray2), "[]");
org.junit.Assert.assertNotNull(shortArray3);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray3), "[]");
org.junit.Assert.assertNotNull(shortArray6);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray6), "[]");
org.junit.Assert.assertNotNull(shortArray7);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray7), "[]");
org.junit.Assert.assertNotNull(shortArray10);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray10), "[]");
org.junit.Assert.assertNotNull(shortArray11);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray11), "[]");
org.junit.Assert.assertNotNull(shortArray15);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray15), "[]");
org.junit.Assert.assertNotNull(shortArray16);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray16), "[]");
org.junit.Assert.assertNotNull(shortArray20);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray20), "[]");
org.junit.Assert.assertNotNull(shortArray21);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray21), "[]");
org.junit.Assert.assertNotNull(shortArray24);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray24), "[]");
org.junit.Assert.assertNotNull(shortArray25);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray25), "[]");
org.junit.Assert.assertNotNull(shortArray28);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray28), "[]");
org.junit.Assert.assertNotNull(shortArray29);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray29), "[]");
org.junit.Assert.assertNotNull(shortArray35);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray35), "[]");
org.junit.Assert.assertNotNull(shortArray36);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray36), "[]");
org.junit.Assert.assertNotNull(shortArray39);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray39), "[]");
org.junit.Assert.assertNotNull(shortArray40);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray40), "[]");
org.junit.Assert.assertNotNull(shortArray44);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray44), "[]");
org.junit.Assert.assertNotNull(shortArray45);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray45), "[]");
org.junit.Assert.assertNotNull(shortArray50);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray50), "[]");
org.junit.Assert.assertNotNull(shortArray51);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray51), "[]");
org.junit.Assert.assertNotNull(shortArray54);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray54), "[]");
org.junit.Assert.assertNotNull(shortArray55);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray55), "[]");
org.junit.Assert.assertNotNull(shortArray59);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray59), "[]");
org.junit.Assert.assertNotNull(shortArray60);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray60), "[]");
org.junit.Assert.assertNotNull(shortArray64);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray64), "[]");
org.junit.Assert.assertNotNull(shortArray65);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray65), "[]");
org.junit.Assert.assertNotNull(shortArray68);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray68), "[]");
org.junit.Assert.assertNotNull(shortArray69);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray69), "[]");
org.junit.Assert.assertNotNull(shortArray73);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray73), "[]");
org.junit.Assert.assertNotNull(shortArray74);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray74), "[]");
org.junit.Assert.assertNotNull(shortArray78);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray78), "[]");
org.junit.Assert.assertNotNull(shortArray79);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray79), "[]");
org.junit.Assert.assertNotNull(shortArray82);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray82), "[]");
org.junit.Assert.assertNotNull(shortArray83);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray83), "[]");
org.junit.Assert.assertNotNull(shortArray86);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray86), "[]");
org.junit.Assert.assertNotNull(shortArray87);
org.junit.Assert.assertEquals(java.util.Arrays.toString(shortArray87), "[]");
}
@Test
public void test01885() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01885");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
synonymsAnalysisTest1.ensureCheckIndexPassed();
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService5 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.Fields fields8 = null;
org.apache.lucene.index.Fields fields9 = null;
synonymsAnalysisTest1.assertFieldsEquals("tests.weekly", indexReader7, fields8, fields9, false);
org.elasticsearch.index.analysis.AnalysisService analysisService12 = synonymsAnalysisTest1.analysisService;
synonymsAnalysisTest1.restoreIndexWriterMaxDocs();
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.Fields fields16 = null;
org.apache.lucene.index.Fields fields17 = null;
synonymsAnalysisTest1.assertFieldsEquals("tests.weekly", indexReader15, fields16, fields17, true);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest20 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest20.setUp();
org.apache.lucene.index.IndexReader indexReader23 = null;
org.apache.lucene.index.PostingsEnum postingsEnum25 = null;
org.apache.lucene.index.PostingsEnum postingsEnum26 = null;
synonymsAnalysisTest20.assertDocsSkippingEquals("hi!", indexReader23, 0, postingsEnum25, postingsEnum26, true);
org.elasticsearch.index.analysis.AnalysisService analysisService29 = synonymsAnalysisTest20.analysisService;
synonymsAnalysisTest20.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService31 = synonymsAnalysisTest20.analysisService;
org.elasticsearch.index.analysis.AnalysisService analysisService32 = null;
synonymsAnalysisTest20.analysisService = analysisService32;
org.elasticsearch.index.analysis.AnalysisService analysisService34 = synonymsAnalysisTest20.getanalysisService();
org.junit.Assert.assertNotSame("tests.monster", (java.lang.Object) "tests.weekly", (java.lang.Object) analysisService34);
org.junit.Assert.assertNull(analysisService5);
org.junit.Assert.assertNull(analysisService12);
org.junit.Assert.assertNull(analysisService29);
org.junit.Assert.assertNull(analysisService31);
org.junit.Assert.assertNull(analysisService34);
}
@Test
public void test01886() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01886");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) (short) 10, (-1));
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01887() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01887");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newTextField(random0, "tests.badapples", "", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01888() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01888");
java.util.Random random0 = null;
// The following exception was thrown during execution in test generation
try {
int int2 = org.apache.lucene.util.LuceneTestCase.atLeast(random0, (int) 'a');
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01889() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01889");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween(0, 2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01890() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01890");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false);
synonymsAnalysisTest0.assertPathHasBeenCleared("hi!");
org.elasticsearch.index.analysis.AnalysisService analysisService24 = synonymsAnalysisTest0.getanalysisService();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest25 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest25.setUp();
synonymsAnalysisTest25.ensureCheckIndexPassed();
org.junit.Assert.assertNotSame((java.lang.Object) analysisService24, (java.lang.Object) synonymsAnalysisTest25);
org.elasticsearch.common.logging.ESLogger eSLogger29 = synonymsAnalysisTest25.getlogger();
synonymsAnalysisTest25.restoreIndexWriterMaxDocs();
org.apache.lucene.index.IndexReader indexReader32 = null;
org.apache.lucene.index.PostingsEnum postingsEnum34 = null;
org.apache.lucene.index.PostingsEnum postingsEnum35 = null;
synonymsAnalysisTest25.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader32, (int) (short) 0, postingsEnum34, postingsEnum35);
org.apache.lucene.index.IndexReader indexReader38 = null;
org.apache.lucene.index.IndexReader indexReader39 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest25.assertTermVectorsEquals("tests.awaitsfix", indexReader38, indexReader39);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService24);
org.junit.Assert.assertNotNull(eSLogger29);
}
@Test
public void test01891() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01891");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("europarl.lines.txt.gz", "europarl.lines.txt.gz", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01892() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01892");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = null;
synonymsAnalysisTest0.setanalysisService(analysisService9);
synonymsAnalysisTest0.ensureCleanedUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.IndexReader indexReader14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("tests.awaitsfix", indexReader13, indexReader14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01893() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01893");
java.util.Random random0 = null;
org.apache.lucene.document.Field.Store store3 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field4 = org.apache.lucene.util.LuceneTestCase.newStringField(random0, "tests.slow", "tests.monster", store3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01894() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01894");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween(4, (int) (short) 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 4, 0");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01895() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01895");
java.lang.Object obj0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService2 = synonymsAnalysisTest1.getanalysisService();
synonymsAnalysisTest1.overrideTestDefaultQueryCache();
synonymsAnalysisTest1.overrideTestDefaultQueryCache();
synonymsAnalysisTest1.setUp();
org.junit.Assert.assertNotEquals(obj0, (java.lang.Object) synonymsAnalysisTest1);
org.apache.lucene.index.IndexReader indexReader8 = null;
org.apache.lucene.index.IndexReader indexReader9 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertTermVectorsEquals("random", indexReader8, indexReader9);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService2);
}
@Test
public void test01896() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01896");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest10 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest10.setUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest10.assertDocsSkippingEquals("hi!", indexReader13, 0, postingsEnum15, postingsEnum16, true);
org.elasticsearch.index.analysis.AnalysisService analysisService19 = synonymsAnalysisTest10.analysisService;
org.apache.lucene.index.IndexReader indexReader21 = null;
org.apache.lucene.index.Fields fields22 = null;
org.apache.lucene.index.Fields fields23 = null;
synonymsAnalysisTest10.assertFieldsEquals("random", indexReader21, fields22, fields23, true);
org.apache.lucene.index.IndexReader indexReader27 = null;
org.apache.lucene.index.Terms terms28 = null;
org.apache.lucene.index.Terms terms29 = null;
synonymsAnalysisTest10.assertTermsEquals("tests.weekly", indexReader27, terms28, terms29, false);
synonymsAnalysisTest10.assertPathHasBeenCleared("hi!");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest34 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest34.setUp();
org.apache.lucene.index.IndexReader indexReader37 = null;
org.apache.lucene.index.PostingsEnum postingsEnum39 = null;
org.apache.lucene.index.PostingsEnum postingsEnum40 = null;
synonymsAnalysisTest34.assertDocsSkippingEquals("hi!", indexReader37, 0, postingsEnum39, postingsEnum40, true);
org.elasticsearch.index.analysis.AnalysisService analysisService43 = synonymsAnalysisTest34.analysisService;
org.junit.rules.RuleChain ruleChain44 = synonymsAnalysisTest34.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader46 = null;
org.apache.lucene.index.PostingsEnum postingsEnum48 = null;
org.apache.lucene.index.PostingsEnum postingsEnum49 = null;
synonymsAnalysisTest34.assertPositionsSkippingEquals("tests.badapples", indexReader46, (int) (short) 10, postingsEnum48, postingsEnum49);
org.junit.rules.RuleChain ruleChain51 = synonymsAnalysisTest34.failureAndSuccessEvents;
synonymsAnalysisTest10.failureAndSuccessEvents = ruleChain51;
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) ruleChain51);
org.elasticsearch.common.logging.ESLogger eSLogger54 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.apache.lucene.index.Terms terms57 = null;
org.apache.lucene.index.Terms terms58 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsStatisticsEquals("hi!", terms57, terms58);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService19);
org.junit.Assert.assertNull(analysisService43);
org.junit.Assert.assertNotNull(ruleChain44);
org.junit.Assert.assertNotNull(ruleChain51);
org.junit.Assert.assertNotNull(eSLogger54);
}
@Test
public void test01897() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01897");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("europarl.lines.txt.gz", "tests.badapples", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01898() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01898");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newTextField("europarl.lines.txt.gz", "tests.weekly", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01899() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01899");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.IndexReader indexReader14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("hi!", indexReader13, indexReader14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
}
@Test
public void test01900() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01900");
java.lang.String[] strArray7 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray13 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray19 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray25 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray31 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[][] strArray32 = new java.lang.String[][] { strArray7, strArray13, strArray19, strArray25, strArray31 };
java.util.List<java.lang.String[]> strArrayList33 = org.elasticsearch.test.ESTestCase.randomSubsetOf(5, strArray32);
// The following exception was thrown during execution in test generation
try {
java.util.List<java.lang.CharSequence[]> charSequenceArrayList34 = org.elasticsearch.test.ESTestCase.randomSubsetOf((int) (short) 100, (java.lang.CharSequence[][]) strArray32);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: Can't pick 100 random objects from a list of 5 objects");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(strArray7);
org.junit.Assert.assertNotNull(strArray13);
org.junit.Assert.assertNotNull(strArray19);
org.junit.Assert.assertNotNull(strArray25);
org.junit.Assert.assertNotNull(strArray31);
org.junit.Assert.assertNotNull(strArray32);
org.junit.Assert.assertNotNull(strArrayList33);
}
@Test
public void test01901() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01901");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
org.apache.lucene.index.TermsEnum termsEnum4 = null;
org.apache.lucene.index.TermsEnum termsEnum5 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("random", termsEnum4, termsEnum5);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01902() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01902");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLength(4);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01903() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01903");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newTextField("", "enwiki.random.lines.txt", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01904() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01904");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.getlogger();
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.testSynonymsAnalysis();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
org.junit.Assert.assertNotNull(eSLogger3);
}
@Test
public void test01905() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01905");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) (byte) 100, (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01906() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01906");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
synonymsAnalysisTest0.ensureCleanedUp();
org.junit.rules.TestRule testRule12 = synonymsAnalysisTest0.ruleChain;
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.slow");
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray15 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain10);
org.junit.Assert.assertNotNull(testRule12);
}
@Test
public void test01907() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01907");
java.lang.Runnable runnable0 = null;
java.util.concurrent.TimeUnit timeUnit2 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.test.ESTestCase.assertBusy(runnable0, (long) (short) 100, timeUnit2);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01908() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01908");
org.junit.Assert.assertFalse("<unknown>", false);
}
@Test
public void test01909() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01909");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.PostingsEnum postingsEnum14 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.badapples", indexReader12, (int) (short) 10, postingsEnum14, postingsEnum15);
org.junit.rules.RuleChain ruleChain17 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.elasticsearch.index.analysis.AnalysisService analysisService18 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexableField indexableField20 = null;
org.apache.lucene.index.IndexableField indexableField21 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("tests.badapples", indexableField20, indexableField21);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain10);
org.junit.Assert.assertNotNull(ruleChain17);
org.junit.Assert.assertNull(analysisService18);
}
@Test
public void test01910() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01910");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.tearDown();
synonymsAnalysisTest0.setIndexWriterMaxDocs(2);
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader8 = null;
org.apache.lucene.index.IndexReader indexReader9 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("tests.failfast", indexReader8, indexReader9);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
}
@Test
public void test01911() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01911");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.getlogger();
org.elasticsearch.index.analysis.AnalysisService analysisService2 = null;
synonymsAnalysisTest0.setanalysisService(analysisService2);
java.nio.file.Path path4 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path4);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
}
@Test
public void test01912() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01912");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) 10);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.TermsEnum termsEnum13 = null;
org.apache.lucene.index.TermsEnum termsEnum14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsEnumEquals("enwiki.random.lines.txt", indexReader12, termsEnum13, termsEnum14, false);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
org.junit.Assert.assertNull(analysisService10);
}
@Test
public void test01913() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01913");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
java.lang.String str1 = synonymsAnalysisTest0.getTestName();
java.lang.String str2 = synonymsAnalysisTest0.getTestName();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest4 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest4.assertDocsEnumEquals("tests.badapples", postingsEnum6, postingsEnum7, true);
synonymsAnalysisTest4.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest4.getanalysisService();
org.elasticsearch.common.logging.ESLogger eSLogger12 = synonymsAnalysisTest4.logger;
org.elasticsearch.common.logging.ESLogger[] eSLoggerArray13 = new org.elasticsearch.common.logging.ESLogger[] { eSLogger3, eSLogger12 };
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest14 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
java.lang.String str15 = synonymsAnalysisTest14.getTestName();
java.lang.String str16 = synonymsAnalysisTest14.getTestName();
org.elasticsearch.common.logging.ESLogger eSLogger17 = synonymsAnalysisTest14.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest18 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
synonymsAnalysisTest18.assertDocsEnumEquals("tests.badapples", postingsEnum20, postingsEnum21, true);
synonymsAnalysisTest18.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService25 = synonymsAnalysisTest18.getanalysisService();
org.elasticsearch.common.logging.ESLogger eSLogger26 = synonymsAnalysisTest18.logger;
org.elasticsearch.common.logging.ESLogger[] eSLoggerArray27 = new org.elasticsearch.common.logging.ESLogger[] { eSLogger17, eSLogger26 };
org.elasticsearch.common.logging.ESLogger[][] eSLoggerArray28 = new org.elasticsearch.common.logging.ESLogger[][] { eSLoggerArray13, eSLoggerArray27 };
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.common.logging.ESLogger[] eSLoggerArray29 = org.elasticsearch.test.ESTestCase.randomFrom(eSLoggerArray28);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>");
org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>");
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNull(analysisService11);
org.junit.Assert.assertNotNull(eSLogger12);
org.junit.Assert.assertNotNull(eSLoggerArray13);
org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>");
org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>");
org.junit.Assert.assertNotNull(eSLogger17);
org.junit.Assert.assertNull(analysisService25);
org.junit.Assert.assertNotNull(eSLogger26);
org.junit.Assert.assertNotNull(eSLoggerArray27);
org.junit.Assert.assertNotNull(eSLoggerArray28);
}
@Test
public void test01914() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01914");
java.util.Random random0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest2 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest2.setUp();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest2.assertDocsSkippingEquals("hi!", indexReader5, 0, postingsEnum7, postingsEnum8, true);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = synonymsAnalysisTest2.analysisService;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.Fields fields14 = null;
org.apache.lucene.index.Fields fields15 = null;
synonymsAnalysisTest2.assertFieldsEquals("random", indexReader13, fields14, fields15, true);
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
synonymsAnalysisTest2.assertPositionsSkippingEquals("tests.maxfailures", indexReader19, 0, postingsEnum21, postingsEnum22);
org.apache.lucene.document.FieldType fieldType24 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field25 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.awaitsfix", (java.lang.Object) postingsEnum21, fieldType24);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService11);
}
@Test
public void test01915() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01915");
org.junit.Assert.assertNotEquals("random", 0L, (long) (-1));
}
@Test
public void test01916() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01916");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest1.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest4 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest4.setUp();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
synonymsAnalysisTest4.assertDocsSkippingEquals("hi!", indexReader7, 0, postingsEnum9, postingsEnum10, true);
org.elasticsearch.index.analysis.AnalysisService analysisService13 = synonymsAnalysisTest4.analysisService;
org.junit.rules.RuleChain ruleChain14 = synonymsAnalysisTest4.failureAndSuccessEvents;
synonymsAnalysisTest1.failureAndSuccessEvents = ruleChain14;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest16 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest16.setUp();
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
synonymsAnalysisTest16.assertDocsSkippingEquals("hi!", indexReader19, 0, postingsEnum21, postingsEnum22, true);
org.elasticsearch.index.analysis.AnalysisService analysisService25 = synonymsAnalysisTest16.analysisService;
org.junit.rules.RuleChain ruleChain26 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader28 = null;
org.apache.lucene.index.PostingsEnum postingsEnum30 = null;
org.apache.lucene.index.PostingsEnum postingsEnum31 = null;
synonymsAnalysisTest16.assertPositionsSkippingEquals("tests.badapples", indexReader28, (int) (short) 10, postingsEnum30, postingsEnum31);
org.junit.rules.RuleChain ruleChain33 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.junit.Assert.assertNotEquals("tests.slow", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) synonymsAnalysisTest16);
synonymsAnalysisTest1.resetCheckIndexStatus();
org.elasticsearch.common.logging.ESLogger eSLogger36 = synonymsAnalysisTest1.logger;
org.apache.lucene.index.IndexReader indexReader38 = null;
org.apache.lucene.index.IndexReader indexReader39 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest1.assertReaderEquals("", indexReader38, indexReader39);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNull(analysisService13);
org.junit.Assert.assertNotNull(ruleChain14);
org.junit.Assert.assertNull(analysisService25);
org.junit.Assert.assertNotNull(ruleChain26);
org.junit.Assert.assertNotNull(ruleChain33);
org.junit.Assert.assertNotNull(eSLogger36);
}
@Test
public void test01917() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01917");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) 10);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest0.analysisService;
org.junit.rules.TestRule testRule11 = synonymsAnalysisTest0.ruleChain;
org.apache.lucene.index.TermsEnum termsEnum13 = null;
org.apache.lucene.index.TermsEnum termsEnum14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermStatsEquals("tests.badapples", termsEnum13, termsEnum14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNotNull(testRule11);
}
@Test
public void test01918() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01918");
org.junit.Assert.assertNotEquals("", (double) (short) 0, (double) (short) 100, (double) 0);
}
@Test
public void test01919() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01919");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween(10, (int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01920() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01920");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService13 = null;
synonymsAnalysisTest0.setanalysisService(analysisService13);
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.testSynonymsAnalysis();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01921() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01921");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.index.MergePolicy mergePolicy2 = org.apache.lucene.util.LuceneTestCase.newLogMergePolicy(true, (int) (short) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01922() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01922");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest1.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest4 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest4.setUp();
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
synonymsAnalysisTest4.assertDocsSkippingEquals("hi!", indexReader7, 0, postingsEnum9, postingsEnum10, true);
org.elasticsearch.index.analysis.AnalysisService analysisService13 = synonymsAnalysisTest4.analysisService;
org.junit.rules.RuleChain ruleChain14 = synonymsAnalysisTest4.failureAndSuccessEvents;
synonymsAnalysisTest1.failureAndSuccessEvents = ruleChain14;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest16 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest16.setUp();
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
synonymsAnalysisTest16.assertDocsSkippingEquals("hi!", indexReader19, 0, postingsEnum21, postingsEnum22, true);
org.elasticsearch.index.analysis.AnalysisService analysisService25 = synonymsAnalysisTest16.analysisService;
org.junit.rules.RuleChain ruleChain26 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader28 = null;
org.apache.lucene.index.PostingsEnum postingsEnum30 = null;
org.apache.lucene.index.PostingsEnum postingsEnum31 = null;
synonymsAnalysisTest16.assertPositionsSkippingEquals("tests.badapples", indexReader28, (int) (short) 10, postingsEnum30, postingsEnum31);
org.junit.rules.RuleChain ruleChain33 = synonymsAnalysisTest16.failureAndSuccessEvents;
org.junit.Assert.assertNotEquals("tests.slow", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) synonymsAnalysisTest16);
org.apache.lucene.index.IndexReader indexReader36 = null;
org.apache.lucene.index.IndexReader indexReader37 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest16.assertDocValuesEquals("tests.weekly", indexReader36, indexReader37);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNull(analysisService13);
org.junit.Assert.assertNotNull(ruleChain14);
org.junit.Assert.assertNull(analysisService25);
org.junit.Assert.assertNotNull(ruleChain26);
org.junit.Assert.assertNotNull(ruleChain33);
}
@Test
public void test01923() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01923");
java.lang.Exception exception1 = null;
org.apache.lucene.util.LuceneTestCase.assumeNoException("europarl.lines.txt.gz", exception1);
}
@Test
public void test01924() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01924");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setUp();
org.elasticsearch.index.analysis.AnalysisService analysisService11 = null;
synonymsAnalysisTest0.setanalysisService(analysisService11);
org.elasticsearch.common.logging.ESLogger eSLogger13 = synonymsAnalysisTest0.getlogger();
synonymsAnalysisTest0.tearDown();
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray15 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(eSLogger13);
}
@Test
public void test01925() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01925");
org.junit.Assert.assertNotEquals("tests.weekly", (long) 3, (long) 'a');
}
@Test
public void test01926() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01926");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.common.logging.ESLogger eSLogger1 = synonymsAnalysisTest0.getlogger();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.Fields fields4 = null;
org.apache.lucene.index.Fields fields5 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.maxfailures", indexReader3, fields4, fields5, true);
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.Terms terms10 = null;
org.apache.lucene.index.Terms terms11 = null;
synonymsAnalysisTest0.assertTermsEquals("tests.nightly", indexReader9, terms10, terms11, true);
org.elasticsearch.index.analysis.AnalysisService analysisService14 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.setUp();
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.match("tests.weekly", "tests.weekly", "");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger1);
org.junit.Assert.assertNull(analysisService14);
}
@Test
public void test01927() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01927");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger5 = synonymsAnalysisTest0.logger;
java.lang.Class<?> wildcardClass6 = eSLogger5.getClass();
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(eSLogger5);
org.junit.Assert.assertNotNull(wildcardClass6);
}
@Test
public void test01928() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01928");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) "tests.badapples");
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService20 = null;
synonymsAnalysisTest0.analysisService = analysisService20;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.testSynonymsAnalysis();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01929() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01929");
org.junit.Assert.assertNotEquals("tests.awaitsfix", (long) 2, (long) 1);
}
@Test
public void test01930() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01930");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
synonymsAnalysisTest1.ensureCheckIndexPassed();
synonymsAnalysisTest1.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService5 = synonymsAnalysisTest1.analysisService;
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.Fields fields8 = null;
org.apache.lucene.index.Fields fields9 = null;
synonymsAnalysisTest1.assertFieldsEquals("tests.weekly", indexReader7, fields8, fields9, false);
synonymsAnalysisTest1.overrideTestDefaultQueryCache();
org.junit.Assert.assertNotEquals("tests.weekly", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) 4);
org.elasticsearch.common.settings.Settings settings15 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment16 = synonymsAnalysisTest1.newNodeEnvironment(settings15);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService5);
}
@Test
public void test01931() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01931");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.resetCheckIndexStatus();
org.apache.lucene.index.IndexReader indexReader14 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
org.apache.lucene.index.PostingsEnum postingsEnum17 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("tests.weekly", indexReader14, (int) (short) 100, postingsEnum16, postingsEnum17, false);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.apache.lucene.index.IndexReader indexReader22 = null;
org.apache.lucene.index.IndexReader indexReader23 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("<unknown>", indexReader22, indexReader23);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01932() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01932");
org.junit.Assert.assertNotEquals("<unknown>", (long) (byte) 1, (long) 'a');
}
@Test
public void test01933() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01933");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("tests.monster", "tests.slow", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01934() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01934");
org.apache.lucene.util.BytesRef bytesRef1 = null;
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("tests.slow", bytesRef1, store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01935() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01935");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
java.lang.Object obj4 = null;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, obj4);
org.junit.rules.TestRule testRule6 = synonymsAnalysisTest0.ruleChain;
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.analysisService = analysisService7;
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger10 = synonymsAnalysisTest0.getlogger();
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.match("", "", "");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(testRule6);
org.junit.Assert.assertNotNull(eSLogger10);
}
@Test
public void test01936() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01936");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfCodepointLengthBetween((int) '#', 4);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01937() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01937");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
java.lang.String str16 = synonymsAnalysisTest0.getTestName();
org.elasticsearch.common.logging.ESLogger eSLogger17 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.Fields fields19 = null;
org.apache.lucene.index.Fields fields20 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("random", fields19, fields20);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>");
org.junit.Assert.assertNotNull(eSLogger17);
}
@Test
public void test01938() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01938");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLength(100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01939() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01939");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum4 = null;
synonymsAnalysisTest1.assertDocsEnumEquals("tests.badapples", postingsEnum3, postingsEnum4, true);
synonymsAnalysisTest1.assertPathHasBeenCleared("tests.monster");
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest1.ruleChain;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest10 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest10.setUp();
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest10.assertDocsSkippingEquals("hi!", indexReader13, 0, postingsEnum15, postingsEnum16, true);
org.elasticsearch.index.analysis.AnalysisService analysisService19 = synonymsAnalysisTest10.analysisService;
org.junit.rules.RuleChain ruleChain20 = synonymsAnalysisTest10.failureAndSuccessEvents;
org.apache.lucene.util.LuceneTestCase.classRules = ruleChain20;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest22 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest22.setUp();
synonymsAnalysisTest22.ensureCheckIndexPassed();
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest22, (java.lang.Object) (short) 1);
synonymsAnalysisTest22.ensureCleanedUp();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest28 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest28.setUp();
org.apache.lucene.index.IndexReader indexReader31 = null;
org.apache.lucene.index.PostingsEnum postingsEnum33 = null;
org.apache.lucene.index.PostingsEnum postingsEnum34 = null;
synonymsAnalysisTest28.assertDocsSkippingEquals("hi!", indexReader31, 0, postingsEnum33, postingsEnum34, true);
org.elasticsearch.index.analysis.AnalysisService analysisService37 = synonymsAnalysisTest28.analysisService;
org.junit.rules.RuleChain ruleChain38 = synonymsAnalysisTest28.failureAndSuccessEvents;
synonymsAnalysisTest22.failureAndSuccessEvents = ruleChain38;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest40 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest40.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger42 = synonymsAnalysisTest40.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest43 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest43.setUp();
org.apache.lucene.index.IndexReader indexReader46 = null;
org.apache.lucene.index.PostingsEnum postingsEnum48 = null;
org.apache.lucene.index.PostingsEnum postingsEnum49 = null;
synonymsAnalysisTest43.assertDocsSkippingEquals("hi!", indexReader46, 0, postingsEnum48, postingsEnum49, true);
org.elasticsearch.index.analysis.AnalysisService analysisService52 = synonymsAnalysisTest43.analysisService;
org.junit.rules.RuleChain ruleChain53 = synonymsAnalysisTest43.failureAndSuccessEvents;
synonymsAnalysisTest40.failureAndSuccessEvents = ruleChain53;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest55 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest55.setUp();
org.apache.lucene.index.IndexReader indexReader58 = null;
org.apache.lucene.index.PostingsEnum postingsEnum60 = null;
org.apache.lucene.index.PostingsEnum postingsEnum61 = null;
synonymsAnalysisTest55.assertDocsSkippingEquals("hi!", indexReader58, 0, postingsEnum60, postingsEnum61, true);
org.junit.rules.TestRule testRule64 = synonymsAnalysisTest55.ruleChain;
org.junit.rules.TestRule[] testRuleArray65 = new org.junit.rules.TestRule[] { testRule9, ruleChain20, ruleChain38, ruleChain53, testRule64 };
java.util.List<org.junit.rules.TestRule> testRuleList66 = org.elasticsearch.test.ESTestCase.randomSubsetOf((int) (byte) 1, testRuleArray65);
java.util.Set<org.junit.rules.TestRule> testRuleSet67 = org.apache.lucene.util.LuceneTestCase.asSet(testRuleArray65);
// The following exception was thrown during execution in test generation
try {
org.junit.rules.TestRule testRule68 = org.elasticsearch.test.ESTestCase.randomFrom(testRuleArray65);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
org.junit.Assert.assertNull(analysisService19);
org.junit.Assert.assertNotNull(ruleChain20);
org.junit.Assert.assertNull(analysisService37);
org.junit.Assert.assertNotNull(ruleChain38);
org.junit.Assert.assertNotNull(eSLogger42);
org.junit.Assert.assertNull(analysisService52);
org.junit.Assert.assertNotNull(ruleChain53);
org.junit.Assert.assertNotNull(testRule64);
org.junit.Assert.assertNotNull(testRuleArray65);
org.junit.Assert.assertNotNull(testRuleList66);
org.junit.Assert.assertNotNull(testRuleSet67);
}
@Test
public void test01940() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01940");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("random", "tests.failfast", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01941() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01941");
java.util.concurrent.ExecutorService executorService0 = null;
java.util.concurrent.ExecutorService[] executorServiceArray1 = new java.util.concurrent.ExecutorService[] { executorService0 };
java.util.concurrent.ExecutorService executorService2 = null;
java.util.concurrent.ExecutorService[] executorServiceArray3 = new java.util.concurrent.ExecutorService[] { executorService2 };
java.util.concurrent.ExecutorService executorService4 = null;
java.util.concurrent.ExecutorService[] executorServiceArray5 = new java.util.concurrent.ExecutorService[] { executorService4 };
java.util.concurrent.ExecutorService[][] executorServiceArray6 = new java.util.concurrent.ExecutorService[][] { executorServiceArray1, executorServiceArray3, executorServiceArray5 };
// The following exception was thrown during execution in test generation
try {
java.util.concurrent.ExecutorService[] executorServiceArray7 = org.elasticsearch.test.ESTestCase.randomFrom(executorServiceArray6);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(executorServiceArray1);
org.junit.Assert.assertNotNull(executorServiceArray3);
org.junit.Assert.assertNotNull(executorServiceArray5);
org.junit.Assert.assertNotNull(executorServiceArray6);
}
@Test
public void test01942() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01942");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("random", indexReader5, 3, postingsEnum7, postingsEnum8, false);
org.elasticsearch.index.analysis.AnalysisService analysisService11 = null;
synonymsAnalysisTest0.setanalysisService(analysisService11);
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray13 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01943() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01943");
org.junit.Assert.assertNotEquals((double) 10.0f, (double) 0.0f, (double) 4);
}
@Test
public void test01944() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01944");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
java.lang.String str1 = synonymsAnalysisTest0.getTestName();
synonymsAnalysisTest0.ensureCleanedUp();
org.elasticsearch.index.analysis.AnalysisService analysisService3 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader5 = null;
org.apache.lucene.index.Terms terms6 = null;
org.apache.lucene.index.Terms terms7 = null;
synonymsAnalysisTest0.assertTermsEquals("", indexReader5, terms6, terms7, true);
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.TermsEnum termsEnum12 = null;
org.apache.lucene.index.TermsEnum termsEnum13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsEnumEquals("tests.badapples", indexReader11, termsEnum12, termsEnum13, false);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>");
org.junit.Assert.assertNull(analysisService3);
}
@Test
public void test01945() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01945");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween((int) (byte) 10, 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01946() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01946");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.junit.rules.TestRule testRule8 = synonymsAnalysisTest0.ruleChain;
org.apache.lucene.index.IndexReader indexReader10 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
org.apache.lucene.index.PostingsEnum postingsEnum13 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.maxfailures", indexReader10, (int) '4', postingsEnum12, postingsEnum13);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
org.apache.lucene.index.IndexReader indexReader17 = null;
org.apache.lucene.index.Terms terms18 = null;
org.apache.lucene.index.Terms terms19 = null;
synonymsAnalysisTest0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false);
org.apache.lucene.index.IndexReader indexReader23 = null;
org.apache.lucene.index.IndexReader indexReader24 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("tests.maxfailures", indexReader23, indexReader24);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule8);
}
@Test
public void test01947() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01947");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
java.nio.file.Path path3 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path3);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01948() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01948");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
java.lang.String str1 = synonymsAnalysisTest0.getTestName();
synonymsAnalysisTest0.ensureCleanedUp();
org.elasticsearch.index.analysis.AnalysisService analysisService3 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.ensureCleanedUp();
org.elasticsearch.index.analysis.AnalysisService analysisService5 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum8 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.awaitsfix", postingsEnum7, postingsEnum8, true);
org.apache.lucene.index.IndexReader indexReader12 = null;
org.apache.lucene.index.IndexReader indexReader13 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldsEquals("tests.maxfailures", indexReader12, indexReader13);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>");
org.junit.Assert.assertNull(analysisService3);
org.junit.Assert.assertNull(analysisService5);
}
@Test
public void test01949() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01949");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) 100.0f);
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService4 = null;
synonymsAnalysisTest0.setanalysisService(analysisService4);
org.apache.lucene.index.IndexReader indexReader7 = null;
org.apache.lucene.index.PostingsEnum postingsEnum9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum10 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("<unknown>", indexReader7, (-1), postingsEnum9, postingsEnum10, true);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment15 = synonymsAnalysisTest0.newNodeEnvironment();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger3);
}
@Test
public void test01950() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01950");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.resetCheckIndexStatus();
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
synonymsAnalysisTest0.ensureAllSearchContextsReleased();
synonymsAnalysisTest0.resetCheckIndexStatus();
org.elasticsearch.common.settings.Settings settings16 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment17 = synonymsAnalysisTest0.newNodeEnvironment(settings16);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01951() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01951");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader11 = null;
org.apache.lucene.index.Fields fields12 = null;
org.apache.lucene.index.Fields fields13 = null;
synonymsAnalysisTest0.assertFieldsEquals("random", indexReader11, fields12, fields13, true);
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.apache.lucene.index.IndexReader indexReader19 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum22 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("", indexReader19, (int) (byte) 100, postingsEnum21, postingsEnum22, true);
org.apache.lucene.index.IndexReader indexReader26 = null;
org.apache.lucene.index.PostingsEnum postingsEnum28 = null;
org.apache.lucene.index.PostingsEnum postingsEnum29 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("random", indexReader26, 2, postingsEnum28, postingsEnum29);
org.apache.lucene.index.IndexReader indexReader32 = null;
org.apache.lucene.index.IndexReader indexReader33 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("", indexReader32, indexReader33);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01952() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01952");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween((int) '4', (int) (short) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01953() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01953");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.scaledRandomIntBetween((int) '#', 3);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 35, 3");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
}
@Test
public void test01954() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01954");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLengthBetween((int) (short) 100, (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01955() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01955");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.IndexReader indexReader2 = null;
org.apache.lucene.index.Fields fields3 = null;
org.apache.lucene.index.Fields fields4 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader2, fields3, fields4, false);
org.elasticsearch.index.analysis.AnalysisService analysisService7 = null;
synonymsAnalysisTest0.setanalysisService(analysisService7);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = null;
synonymsAnalysisTest0.analysisService = analysisService9;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
org.apache.lucene.index.PostingsEnum postingsEnum13 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.slow", postingsEnum12, postingsEnum13, false);
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.match("tests.monster", "random", "enwiki.random.lines.txt");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01956() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01956");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
org.elasticsearch.index.analysis.AnalysisService analysisService3 = null;
synonymsAnalysisTest0.analysisService = analysisService3;
org.apache.lucene.index.IndexReader indexReader6 = null;
org.apache.lucene.index.IndexReader indexReader7 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("tests.badapples", indexReader6, indexReader7);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
}
@Test
public void test01957() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01957");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfLengthBetween((int) (short) 100, (int) (byte) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01958() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01958");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween(4, 0);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01959() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01959");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
org.elasticsearch.common.logging.ESLogger eSLogger3 = synonymsAnalysisTest0.getlogger();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.tearDown();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest6 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest6.getanalysisService();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest9 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest9.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger11 = synonymsAnalysisTest9.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest12 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest12.setUp();
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum17 = null;
org.apache.lucene.index.PostingsEnum postingsEnum18 = null;
synonymsAnalysisTest12.assertDocsSkippingEquals("hi!", indexReader15, 0, postingsEnum17, postingsEnum18, true);
org.elasticsearch.index.analysis.AnalysisService analysisService21 = synonymsAnalysisTest12.analysisService;
org.junit.rules.RuleChain ruleChain22 = synonymsAnalysisTest12.failureAndSuccessEvents;
synonymsAnalysisTest9.failureAndSuccessEvents = ruleChain22;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest24 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest24.setUp();
org.apache.lucene.index.IndexReader indexReader27 = null;
org.apache.lucene.index.PostingsEnum postingsEnum29 = null;
org.apache.lucene.index.PostingsEnum postingsEnum30 = null;
synonymsAnalysisTest24.assertDocsSkippingEquals("hi!", indexReader27, 0, postingsEnum29, postingsEnum30, true);
org.elasticsearch.index.analysis.AnalysisService analysisService33 = synonymsAnalysisTest24.analysisService;
org.junit.rules.RuleChain ruleChain34 = synonymsAnalysisTest24.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader36 = null;
org.apache.lucene.index.PostingsEnum postingsEnum38 = null;
org.apache.lucene.index.PostingsEnum postingsEnum39 = null;
synonymsAnalysisTest24.assertPositionsSkippingEquals("tests.badapples", indexReader36, (int) (short) 10, postingsEnum38, postingsEnum39);
org.junit.rules.RuleChain ruleChain41 = synonymsAnalysisTest24.failureAndSuccessEvents;
org.junit.Assert.assertNotEquals("tests.slow", (java.lang.Object) synonymsAnalysisTest9, (java.lang.Object) synonymsAnalysisTest24);
synonymsAnalysisTest9.resetCheckIndexStatus();
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest6, (java.lang.Object) synonymsAnalysisTest9);
org.junit.rules.RuleChain ruleChain45 = synonymsAnalysisTest9.failureAndSuccessEvents;
synonymsAnalysisTest0.failureAndSuccessEvents = ruleChain45;
org.apache.lucene.index.IndexableField indexableField48 = null;
org.apache.lucene.index.IndexableField indexableField49 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("tests.failfast", indexableField48, indexableField49);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
org.junit.Assert.assertNotNull(eSLogger3);
org.junit.Assert.assertNull(analysisService7);
org.junit.Assert.assertNotNull(eSLogger11);
org.junit.Assert.assertNull(analysisService21);
org.junit.Assert.assertNotNull(ruleChain22);
org.junit.Assert.assertNull(analysisService33);
org.junit.Assert.assertNotNull(ruleChain34);
org.junit.Assert.assertNotNull(ruleChain41);
org.junit.Assert.assertNotNull(ruleChain45);
}
@Test
public void test01960() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01960");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.junit.rules.TestRule testRule9 = synonymsAnalysisTest0.ruleChain;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.IndexReader indexReader16 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldInfosEquals("europarl.lines.txt.gz", indexReader15, indexReader16);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(testRule9);
}
@Test
public void test01961() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01961");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger2 = synonymsAnalysisTest0.logger;
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.Fields fields5 = null;
org.apache.lucene.index.Fields fields6 = null;
synonymsAnalysisTest0.assertFieldsEquals("", indexReader4, fields5, fields6, true);
org.apache.lucene.index.Terms terms10 = null;
org.apache.lucene.index.Terms terms11 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsStatisticsEquals("random", terms10, terms11);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(eSLogger2);
}
@Test
public void test01962() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01962");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
org.junit.rules.RuleChain ruleChain10 = synonymsAnalysisTest0.failureAndSuccessEvents;
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum17 = null;
org.apache.lucene.index.PostingsEnum postingsEnum18 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.badapples", indexReader15, (int) (short) 100, postingsEnum17, postingsEnum18);
org.apache.lucene.index.IndexReader indexReader21 = null;
org.apache.lucene.index.TermsEnum termsEnum22 = null;
org.apache.lucene.index.TermsEnum termsEnum23 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertTermsEnumEquals("hi!", indexReader21, termsEnum22, termsEnum23, false);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain10);
}
@Test
public void test01963() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01963");
org.apache.lucene.document.Field.Store store2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newStringField("enwiki.random.lines.txt", "tests.weekly", store2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01964() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01964");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.failfast");
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
synonymsAnalysisTest0.setIndexWriterMaxDocs(1);
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray8 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01965() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01965");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.resetCheckIndexStatus();
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
org.apache.lucene.index.IndexReader indexReader15 = null;
org.apache.lucene.index.Fields fields16 = null;
org.apache.lucene.index.Fields fields17 = null;
synonymsAnalysisTest0.assertFieldsEquals("tests.failfast", indexReader15, fields16, fields17, false);
synonymsAnalysisTest0.setIndexWriterMaxDocs(1);
org.elasticsearch.index.analysis.AnalysisService analysisService22 = null;
synonymsAnalysisTest0.setanalysisService(analysisService22);
org.elasticsearch.common.settings.Settings settings24 = null;
// The following exception was thrown during execution in test generation
try {
org.elasticsearch.env.NodeEnvironment nodeEnvironment25 = synonymsAnalysisTest0.newNodeEnvironment(settings24);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
}
@Test
public void test01966() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01966");
java.util.Random random0 = null;
java.lang.String[] strArray8 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray14 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray20 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray26 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray32 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[][] strArray33 = new java.lang.String[][] { strArray8, strArray14, strArray20, strArray26, strArray32 };
java.util.List<java.lang.String[]> strArrayList34 = org.elasticsearch.test.ESTestCase.randomSubsetOf(5, strArray33);
org.apache.lucene.document.FieldType fieldType35 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field36 = org.apache.lucene.util.LuceneTestCase.newField(random0, "europarl.lines.txt.gz", (java.lang.Object) 5, fieldType35);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(strArray8);
org.junit.Assert.assertNotNull(strArray14);
org.junit.Assert.assertNotNull(strArray20);
org.junit.Assert.assertNotNull(strArray26);
org.junit.Assert.assertNotNull(strArray32);
org.junit.Assert.assertNotNull(strArray33);
org.junit.Assert.assertNotNull(strArrayList34);
}
@Test
public void test01967() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01967");
java.lang.String[] strArray7 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray13 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray19 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray25 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[] strArray31 = new java.lang.String[] { "tests.badapples", "tests.maxfailures", "tests.weekly", "tests.monster", "tests.failfast" };
java.lang.String[][] strArray32 = new java.lang.String[][] { strArray7, strArray13, strArray19, strArray25, strArray31 };
java.util.List<java.lang.String[]> strArrayList33 = org.elasticsearch.test.ESTestCase.randomSubsetOf(5, strArray32);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest35 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest35.setUp();
org.elasticsearch.common.logging.ESLogger eSLogger37 = synonymsAnalysisTest35.logger;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest38 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest38.setUp();
org.apache.lucene.index.IndexReader indexReader41 = null;
org.apache.lucene.index.PostingsEnum postingsEnum43 = null;
org.apache.lucene.index.PostingsEnum postingsEnum44 = null;
synonymsAnalysisTest38.assertDocsSkippingEquals("hi!", indexReader41, 0, postingsEnum43, postingsEnum44, true);
org.elasticsearch.index.analysis.AnalysisService analysisService47 = synonymsAnalysisTest38.analysisService;
org.junit.rules.RuleChain ruleChain48 = synonymsAnalysisTest38.failureAndSuccessEvents;
synonymsAnalysisTest35.failureAndSuccessEvents = ruleChain48;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest50 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest50.setUp();
org.apache.lucene.index.IndexReader indexReader53 = null;
org.apache.lucene.index.PostingsEnum postingsEnum55 = null;
org.apache.lucene.index.PostingsEnum postingsEnum56 = null;
synonymsAnalysisTest50.assertDocsSkippingEquals("hi!", indexReader53, 0, postingsEnum55, postingsEnum56, true);
org.elasticsearch.index.analysis.AnalysisService analysisService59 = synonymsAnalysisTest50.analysisService;
org.junit.rules.RuleChain ruleChain60 = synonymsAnalysisTest50.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader62 = null;
org.apache.lucene.index.PostingsEnum postingsEnum64 = null;
org.apache.lucene.index.PostingsEnum postingsEnum65 = null;
synonymsAnalysisTest50.assertPositionsSkippingEquals("tests.badapples", indexReader62, (int) (short) 10, postingsEnum64, postingsEnum65);
org.junit.rules.RuleChain ruleChain67 = synonymsAnalysisTest50.failureAndSuccessEvents;
org.junit.Assert.assertNotEquals("tests.slow", (java.lang.Object) synonymsAnalysisTest35, (java.lang.Object) synonymsAnalysisTest50);
org.junit.Assert.assertNotEquals("tests.weekly", (java.lang.Object) 5, (java.lang.Object) synonymsAnalysisTest35);
org.apache.lucene.index.IndexReader indexReader71 = null;
org.apache.lucene.index.TermsEnum termsEnum72 = null;
org.apache.lucene.index.TermsEnum termsEnum73 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest35.assertTermsEnumEquals("tests.slow", indexReader71, termsEnum72, termsEnum73, false);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(strArray7);
org.junit.Assert.assertNotNull(strArray13);
org.junit.Assert.assertNotNull(strArray19);
org.junit.Assert.assertNotNull(strArray25);
org.junit.Assert.assertNotNull(strArray31);
org.junit.Assert.assertNotNull(strArray32);
org.junit.Assert.assertNotNull(strArrayList33);
org.junit.Assert.assertNotNull(eSLogger37);
org.junit.Assert.assertNull(analysisService47);
org.junit.Assert.assertNotNull(ruleChain48);
org.junit.Assert.assertNull(analysisService59);
org.junit.Assert.assertNotNull(ruleChain60);
org.junit.Assert.assertNotNull(ruleChain67);
}
@Test
public void test01968() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01968");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.PostingsEnum postingsEnum11 = null;
org.apache.lucene.index.PostingsEnum postingsEnum12 = null;
synonymsAnalysisTest0.assertPositionsSkippingEquals("tests.weekly", indexReader9, (int) (short) 100, postingsEnum11, postingsEnum12);
synonymsAnalysisTest0.ensureCheckIndexPassed();
org.junit.rules.RuleChain ruleChain15 = synonymsAnalysisTest0.failureAndSuccessEvents;
org.elasticsearch.index.analysis.AnalysisService analysisService16 = synonymsAnalysisTest0.analysisService;
org.apache.lucene.index.IndexReader indexReader18 = null;
org.apache.lucene.index.PostingsEnum postingsEnum20 = null;
org.apache.lucene.index.PostingsEnum postingsEnum21 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("tests.badapples", indexReader18, (int) (short) -1, postingsEnum20, postingsEnum21, true);
java.nio.file.Path path24 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertPathHasBeenCleared(path24);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(ruleChain15);
org.junit.Assert.assertNull(analysisService16);
}
@Test
public void test01969() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01969");
org.junit.Assert.assertEquals("tests.awaitsfix", (double) 0L, (double) 1.0f, (double) 100.0f);
}
@Test
public void test01970() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01970");
java.util.Random random0 = null;
// The following exception was thrown during execution in test generation
try {
int int2 = org.apache.lucene.util.LuceneTestCase.atLeast(random0, (int) '4');
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01971() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01971");
float[] floatArray1 = new float[] {};
float[] floatArray2 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray1, floatArray2, (float) (short) 0);
float[] floatArray5 = new float[] {};
float[] floatArray6 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray5, floatArray6, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray1, floatArray6, (float) 10);
float[] floatArray11 = new float[] {};
float[] floatArray12 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray11, floatArray12, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray6, floatArray11, (float) 5);
float[] floatArray17 = new float[] {};
float[] floatArray18 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray17, floatArray18, (float) (short) 0);
org.junit.Assert.assertArrayEquals("random", floatArray11, floatArray17, 100.0f);
float[] floatArray23 = new float[] {};
float[] floatArray24 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray23, floatArray24, (float) (short) 0);
float[] floatArray27 = new float[] {};
float[] floatArray28 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray27, floatArray28, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray23, floatArray28, (float) 10);
float[] floatArray33 = new float[] {};
float[] floatArray34 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray33, floatArray34, (float) (short) 0);
float[] floatArray37 = new float[] {};
float[] floatArray38 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray37, floatArray38, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray33, floatArray38, (float) 10);
float[] floatArray43 = new float[] {};
float[] floatArray44 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray43, floatArray44, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray38, floatArray43, (float) 5);
org.junit.Assert.assertArrayEquals(floatArray23, floatArray43, (float) (short) 10);
float[] floatArray52 = new float[] {};
float[] floatArray53 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray52, floatArray53, (float) (short) 0);
float[] floatArray56 = new float[] {};
float[] floatArray57 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray56, floatArray57, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray52, floatArray57, (float) 10);
float[] floatArray62 = new float[] {};
float[] floatArray63 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray62, floatArray63, (float) (short) 0);
float[] floatArray66 = new float[] {};
float[] floatArray67 = new float[] {};
org.junit.Assert.assertArrayEquals(floatArray66, floatArray67, (float) (short) 0);
org.junit.Assert.assertArrayEquals(floatArray62, floatArray67, (float) 10);
org.junit.Assert.assertArrayEquals("tests.maxfailures", floatArray52, floatArray67, (float) (byte) 10);
org.junit.Assert.assertArrayEquals(floatArray43, floatArray52, (float) (short) 10);
org.junit.Assert.assertArrayEquals(floatArray17, floatArray52, (float) (short) -1);
org.junit.Assert.assertNotNull(floatArray1);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray1), "[]");
org.junit.Assert.assertNotNull(floatArray2);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray2), "[]");
org.junit.Assert.assertNotNull(floatArray5);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray5), "[]");
org.junit.Assert.assertNotNull(floatArray6);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray6), "[]");
org.junit.Assert.assertNotNull(floatArray11);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray11), "[]");
org.junit.Assert.assertNotNull(floatArray12);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray12), "[]");
org.junit.Assert.assertNotNull(floatArray17);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray17), "[]");
org.junit.Assert.assertNotNull(floatArray18);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray18), "[]");
org.junit.Assert.assertNotNull(floatArray23);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray23), "[]");
org.junit.Assert.assertNotNull(floatArray24);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray24), "[]");
org.junit.Assert.assertNotNull(floatArray27);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray27), "[]");
org.junit.Assert.assertNotNull(floatArray28);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray28), "[]");
org.junit.Assert.assertNotNull(floatArray33);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray33), "[]");
org.junit.Assert.assertNotNull(floatArray34);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray34), "[]");
org.junit.Assert.assertNotNull(floatArray37);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray37), "[]");
org.junit.Assert.assertNotNull(floatArray38);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray38), "[]");
org.junit.Assert.assertNotNull(floatArray43);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray43), "[]");
org.junit.Assert.assertNotNull(floatArray44);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray44), "[]");
org.junit.Assert.assertNotNull(floatArray52);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray52), "[]");
org.junit.Assert.assertNotNull(floatArray53);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray53), "[]");
org.junit.Assert.assertNotNull(floatArray56);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray56), "[]");
org.junit.Assert.assertNotNull(floatArray57);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray57), "[]");
org.junit.Assert.assertNotNull(floatArray62);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray62), "[]");
org.junit.Assert.assertNotNull(floatArray63);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray63), "[]");
org.junit.Assert.assertNotNull(floatArray66);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray66), "[]");
org.junit.Assert.assertNotNull(floatArray67);
org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray67), "[]");
}
@Test
public void test01972() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01972");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomRealisticUnicodeOfCodepointLengthBetween((int) '#', 5);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01973() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01973");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum2 = null;
org.apache.lucene.index.PostingsEnum postingsEnum3 = null;
synonymsAnalysisTest0.assertDocsEnumEquals("tests.badapples", postingsEnum2, postingsEnum3, true);
synonymsAnalysisTest0.assertPathHasBeenCleared("tests.monster");
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.Terms terms10 = null;
org.apache.lucene.index.Terms terms11 = null;
synonymsAnalysisTest0.assertTermsEquals("", indexReader9, terms10, terms11, false);
org.apache.lucene.index.IndexableField indexableField15 = null;
org.apache.lucene.index.IndexableField indexableField16 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertStoredFieldEquals("random", indexableField15, indexableField16);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01974() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01974");
org.junit.Assert.assertNotEquals((long) (byte) 100, (long) (byte) 0);
}
@Test
public void test01975() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01975");
org.junit.Assert.assertNotEquals((double) 1.0f, 0.0d, (double) (byte) 0);
}
@Test
public void test01976() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01976");
// The following exception was thrown during execution in test generation
try {
java.lang.String str1 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLength(4);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01977() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01977");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("tests.slow", "europarl.lines.txt.gz");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01978() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01978");
java.text.Collator collator0 = null;
// The following exception was thrown during execution in test generation
try {
int int3 = org.apache.lucene.util.LuceneTestCase.collate(collator0, "", "random");
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
}
@Test
public void test01979() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01979");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween((int) (short) -1, 1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01980() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01980");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest1 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest1.setUp();
org.apache.lucene.index.IndexReader indexReader4 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
org.apache.lucene.index.PostingsEnum postingsEnum7 = null;
synonymsAnalysisTest1.assertDocsSkippingEquals("hi!", indexReader4, 0, postingsEnum6, postingsEnum7, true);
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest1.analysisService;
org.junit.rules.RuleChain ruleChain11 = synonymsAnalysisTest1.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest1.assertPositionsSkippingEquals("tests.badapples", indexReader13, (int) (short) 10, postingsEnum15, postingsEnum16);
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest18 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest18.setUp();
org.apache.lucene.index.IndexReader indexReader21 = null;
org.apache.lucene.index.PostingsEnum postingsEnum23 = null;
org.apache.lucene.index.PostingsEnum postingsEnum24 = null;
synonymsAnalysisTest18.assertDocsSkippingEquals("hi!", indexReader21, 0, postingsEnum23, postingsEnum24, true);
org.elasticsearch.index.analysis.AnalysisService analysisService27 = synonymsAnalysisTest18.analysisService;
org.junit.rules.RuleChain ruleChain28 = synonymsAnalysisTest18.failureAndSuccessEvents;
synonymsAnalysisTest1.failureAndSuccessEvents = ruleChain28;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest30 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest30.setUp();
synonymsAnalysisTest30.ensureCheckIndexPassed();
synonymsAnalysisTest30.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService34 = synonymsAnalysisTest30.analysisService;
org.apache.lucene.index.IndexReader indexReader36 = null;
org.apache.lucene.index.Fields fields37 = null;
org.apache.lucene.index.Fields fields38 = null;
synonymsAnalysisTest30.assertFieldsEquals("tests.weekly", indexReader36, fields37, fields38, false);
synonymsAnalysisTest30.overrideTestDefaultQueryCache();
java.lang.String str42 = synonymsAnalysisTest30.getTestName();
synonymsAnalysisTest30.setIndexWriterMaxDocs((int) '4');
org.junit.Assert.assertNotEquals("tests.monster", (java.lang.Object) synonymsAnalysisTest1, (java.lang.Object) synonymsAnalysisTest30);
org.apache.lucene.index.Terms terms47 = null;
org.apache.lucene.index.Terms terms48 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest30.assertTermsStatisticsEquals("", terms47, terms48);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService10);
org.junit.Assert.assertNotNull(ruleChain11);
org.junit.Assert.assertNull(analysisService27);
org.junit.Assert.assertNotNull(ruleChain28);
org.junit.Assert.assertNull(analysisService34);
org.junit.Assert.assertEquals("'" + str42 + "' != '" + "<unknown>" + "'", str42, "<unknown>");
}
@Test
public void test01981() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01981");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService1 = synonymsAnalysisTest0.getanalysisService();
synonymsAnalysisTest0.overrideTestDefaultQueryCache();
synonymsAnalysisTest0.tearDown();
org.apache.lucene.index.Fields fields5 = null;
org.apache.lucene.index.Fields fields6 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertFieldStatisticsEquals("random", fields5, fields6);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService1);
}
@Test
public void test01982() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01982");
// The following exception was thrown during execution in test generation
try {
java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("tests.badapples", "tests.awaitsfix");
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01983() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01983");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.randomIntBetween((int) (short) -1, (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01984() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01984");
org.junit.Assert.assertNotEquals((double) 5, (double) (short) 100, (double) (short) 10);
}
@Test
public void test01985() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01985");
java.util.Random random0 = null;
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest3 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest3.setUp();
synonymsAnalysisTest3.ensureCheckIndexPassed();
synonymsAnalysisTest3.ensureAllSearchContextsReleased();
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest3.analysisService;
org.apache.lucene.index.IndexReader indexReader9 = null;
org.apache.lucene.index.Fields fields10 = null;
org.apache.lucene.index.Fields fields11 = null;
synonymsAnalysisTest3.assertFieldsEquals("tests.weekly", indexReader9, fields10, fields11, false);
synonymsAnalysisTest3.overrideTestDefaultQueryCache();
java.lang.String str15 = synonymsAnalysisTest3.getTestName();
synonymsAnalysisTest3.assertPathHasBeenCleared("<unknown>");
synonymsAnalysisTest3.tearDown();
java.lang.Class<?> wildcardClass19 = synonymsAnalysisTest3.getClass();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest20 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest20.setUp();
org.apache.lucene.index.IndexReader indexReader23 = null;
org.apache.lucene.index.PostingsEnum postingsEnum25 = null;
org.apache.lucene.index.PostingsEnum postingsEnum26 = null;
synonymsAnalysisTest20.assertDocsSkippingEquals("hi!", indexReader23, 0, postingsEnum25, postingsEnum26, true);
org.elasticsearch.index.analysis.AnalysisService analysisService29 = synonymsAnalysisTest20.analysisService;
synonymsAnalysisTest20.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest20.resetCheckIndexStatus();
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest20);
org.junit.Assert.assertNotSame("europarl.lines.txt.gz", (java.lang.Object) synonymsAnalysisTest3, (java.lang.Object) synonymsAnalysisTest20);
org.junit.rules.TestRule testRule35 = synonymsAnalysisTest20.ruleChain;
synonymsAnalysisTest20.ensureAllSearchContextsReleased();
org.apache.lucene.document.FieldType fieldType37 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field38 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.weekly", (java.lang.Object) synonymsAnalysisTest20, fieldType37);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService7);
org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>");
org.junit.Assert.assertNotNull(wildcardClass19);
org.junit.Assert.assertNull(analysisService29);
org.junit.Assert.assertNotNull(testRule35);
}
@Test
public void test01986() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01986");
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray3 = org.elasticsearch.test.ESTestCase.generateRandomStringArray(1, (int) ' ', true);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01987() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01987");
// The following exception was thrown during execution in test generation
try {
int int1 = org.elasticsearch.test.ESTestCase.randomInt((int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01988() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01988");
// The following exception was thrown during execution in test generation
try {
java.lang.String str2 = org.elasticsearch.test.ESTestCase.randomUnicodeOfLengthBetween(1, (int) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01989() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01989");
org.junit.Assert.assertEquals((-1.0d), (double) (short) 10, (double) ' ');
}
@Test
public void test01990() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01990");
org.junit.Assert.assertEquals("tests.awaitsfix", (float) (short) -1, (float) (byte) -1, (float) '#');
}
@Test
public void test01991() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01991");
// The following exception was thrown during execution in test generation
try {
int int2 = org.elasticsearch.test.ESTestCase.between((int) (short) -1, (int) (byte) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01992() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01992");
long[] longArray1 = null;
long[] longArray2 = null;
org.junit.Assert.assertArrayEquals("hi!", longArray1, longArray2);
}
@Test
public void test01993() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01993");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
synonymsAnalysisTest0.ensureCheckIndexPassed();
synonymsAnalysisTest0.ensureCleanedUp();
org.junit.Assert.assertNotNull((java.lang.Object) synonymsAnalysisTest0);
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.testSynonymsAnalysis();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01994() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01994");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
java.lang.String str1 = synonymsAnalysisTest0.getTestName();
synonymsAnalysisTest0.ensureCleanedUp();
org.elasticsearch.index.analysis.AnalysisService analysisService3 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.ensureCleanedUp();
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest6 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.elasticsearch.index.analysis.AnalysisService analysisService7 = synonymsAnalysisTest6.getanalysisService();
synonymsAnalysisTest6.overrideTestDefaultQueryCache();
synonymsAnalysisTest6.overrideTestDefaultQueryCache();
org.elasticsearch.index.analysis.AnalysisService analysisService10 = synonymsAnalysisTest6.analysisService;
org.junit.Assert.assertNotEquals((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) synonymsAnalysisTest6);
org.apache.lucene.index.IndexReader indexReader13 = null;
org.apache.lucene.index.IndexReader indexReader14 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDocValuesEquals("europarl.lines.txt.gz", indexReader13, indexReader14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>");
org.junit.Assert.assertNull(analysisService3);
org.junit.Assert.assertNull(analysisService7);
org.junit.Assert.assertNull(analysisService10);
}
@Test
public void test01995() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01995");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.resetCheckIndexStatus();
org.elasticsearch.common.logging.ESLogger eSLogger13 = synonymsAnalysisTest0.logger;
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader16 = null;
org.apache.lucene.index.IndexReader indexReader17 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertReaderStatisticsEquals("tests.slow", indexReader16, indexReader17);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(eSLogger13);
}
@Test
public void test01996() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01996");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest13 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
org.apache.lucene.index.PostingsEnum postingsEnum15 = null;
org.apache.lucene.index.PostingsEnum postingsEnum16 = null;
synonymsAnalysisTest13.assertDocsEnumEquals("tests.badapples", postingsEnum15, postingsEnum16, true);
synonymsAnalysisTest13.assertPathHasBeenCleared("tests.monster");
org.apache.lucene.index.IndexReader indexReader22 = null;
org.apache.lucene.index.PostingsEnum postingsEnum24 = null;
org.apache.lucene.index.PostingsEnum postingsEnum25 = null;
synonymsAnalysisTest13.assertPositionsSkippingEquals("tests.weekly", indexReader22, (int) (short) 100, postingsEnum24, postingsEnum25);
synonymsAnalysisTest13.ensureCheckIndexPassed();
org.junit.rules.RuleChain ruleChain28 = synonymsAnalysisTest13.failureAndSuccessEvents;
org.elasticsearch.index.analysis.AnalysisService analysisService29 = synonymsAnalysisTest13.getanalysisService();
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest30 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest30.setUp();
org.apache.lucene.index.IndexReader indexReader33 = null;
org.apache.lucene.index.PostingsEnum postingsEnum35 = null;
org.apache.lucene.index.PostingsEnum postingsEnum36 = null;
synonymsAnalysisTest30.assertDocsSkippingEquals("hi!", indexReader33, 0, postingsEnum35, postingsEnum36, true);
org.elasticsearch.index.analysis.AnalysisService analysisService39 = synonymsAnalysisTest30.analysisService;
org.apache.lucene.index.IndexReader indexReader41 = null;
org.apache.lucene.index.Fields fields42 = null;
org.apache.lucene.index.Fields fields43 = null;
synonymsAnalysisTest30.assertFieldsEquals("random", indexReader41, fields42, fields43, true);
org.apache.lucene.index.IndexReader indexReader47 = null;
org.apache.lucene.index.Terms terms48 = null;
org.apache.lucene.index.Terms terms49 = null;
synonymsAnalysisTest30.assertTermsEquals("tests.weekly", indexReader47, terms48, terms49, false);
synonymsAnalysisTest30.assertPathHasBeenCleared("hi!");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest54 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest54.setUp();
org.apache.lucene.index.IndexReader indexReader57 = null;
org.apache.lucene.index.PostingsEnum postingsEnum59 = null;
org.apache.lucene.index.PostingsEnum postingsEnum60 = null;
synonymsAnalysisTest54.assertDocsSkippingEquals("hi!", indexReader57, 0, postingsEnum59, postingsEnum60, true);
org.elasticsearch.index.analysis.AnalysisService analysisService63 = synonymsAnalysisTest54.analysisService;
org.junit.rules.RuleChain ruleChain64 = synonymsAnalysisTest54.failureAndSuccessEvents;
org.apache.lucene.index.IndexReader indexReader66 = null;
org.apache.lucene.index.PostingsEnum postingsEnum68 = null;
org.apache.lucene.index.PostingsEnum postingsEnum69 = null;
synonymsAnalysisTest54.assertPositionsSkippingEquals("tests.badapples", indexReader66, (int) (short) 10, postingsEnum68, postingsEnum69);
org.junit.rules.RuleChain ruleChain71 = synonymsAnalysisTest54.failureAndSuccessEvents;
synonymsAnalysisTest30.failureAndSuccessEvents = ruleChain71;
org.apache.lucene.util.LuceneTestCase.classRules = ruleChain71;
synonymsAnalysisTest13.failureAndSuccessEvents = ruleChain71;
org.junit.Assert.assertNotSame((java.lang.Object) synonymsAnalysisTest0, (java.lang.Object) synonymsAnalysisTest13);
org.apache.lucene.index.IndexReader indexReader77 = null;
org.apache.lucene.index.IndexReader indexReader78 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest13.assertReaderEquals("tests.weekly", indexReader77, indexReader78);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNotNull(ruleChain28);
org.junit.Assert.assertNull(analysisService29);
org.junit.Assert.assertNull(analysisService39);
org.junit.Assert.assertNull(analysisService63);
org.junit.Assert.assertNotNull(ruleChain64);
org.junit.Assert.assertNotNull(ruleChain71);
}
@Test
public void test01997() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01997");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setUp();
org.apache.lucene.index.IndexReader indexReader3 = null;
org.apache.lucene.index.PostingsEnum postingsEnum5 = null;
org.apache.lucene.index.PostingsEnum postingsEnum6 = null;
synonymsAnalysisTest0.assertDocsSkippingEquals("hi!", indexReader3, 0, postingsEnum5, postingsEnum6, true);
org.elasticsearch.index.analysis.AnalysisService analysisService9 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) (short) -1);
synonymsAnalysisTest0.resetCheckIndexStatus();
org.elasticsearch.index.analysis.AnalysisService analysisService13 = null;
synonymsAnalysisTest0.analysisService = analysisService13;
org.elasticsearch.index.analysis.AnalysisService analysisService15 = synonymsAnalysisTest0.analysisService;
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
org.apache.lucene.index.IndexReader indexReader18 = null;
org.apache.lucene.index.IndexReader indexReader19 = null;
// The following exception was thrown during execution in test generation
try {
synonymsAnalysisTest0.assertDeletedDocsEquals("hi!", indexReader18, indexReader19);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNull(analysisService9);
org.junit.Assert.assertNull(analysisService15);
}
@Test
public void test01998() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01998");
org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest synonymsAnalysisTest0 = new org.elasticsearch.index.analysis.synonyms.SynonymsAnalysisTest();
synonymsAnalysisTest0.setIndexWriterMaxDocs((int) '4');
synonymsAnalysisTest0.restoreIndexWriterMaxDocs();
// The following exception was thrown during execution in test generation
try {
java.lang.String[] strArray4 = synonymsAnalysisTest0.tmpPaths();
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test01999() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test01999");
org.apache.lucene.document.FieldType fieldType2 = null;
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.document.Field field3 = org.apache.lucene.util.LuceneTestCase.newField("hi!", "tests.badapples", fieldType2);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalStateException; message: No context information for thread: Thread[id=1, name=main, state=RUNNABLE, group=main]. Is this thread running under a class com.carrotsearch.randomizedtesting.RandomizedRunner runner context? Add @RunWith(class com.carrotsearch.randomizedtesting.RandomizedRunner.class) to your test class. Make sure your code accesses random contexts within @BeforeClass and @AfterClass boundary (for example, static test class initializers are not permitted to access random contexts).");
} catch (java.lang.IllegalStateException e) {
// Expected exception.
}
}
@Test
public void test02000() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest3.test02000");
// The following exception was thrown during execution in test generation
try {
org.apache.lucene.util.LuceneTestCase.assumeFalse("tests.awaitsfix", true);
org.junit.Assert.fail("Expected exception of type com.carrotsearch.randomizedtesting.InternalAssumptionViolatedException; message: tests.awaitsfix");
} catch (org.junit.internal.AssumptionViolatedException e) {
// Expected exception.
}
}
}
|
eltld/ezEngine
|
Tools/EditorPluginScene/Objects/TestObjects.h
|
<reponame>eltld/ezEngine
#pragma once
#include <ToolsFoundation/Object/DocumentObjectBase.h>
#include <ToolsFoundation/Reflection/ReflectedTypeDirectAccessor.h>
|
calmsacibis995/minix
|
sys/arch/evbarm/include/asm.h
|
/* $NetBSD: asm.h,v 1.1 2001/11/25 15:56:03 thorpej Exp $ */
#include <arm/asm.h>
|
DengXiaoBai/ChatKit
|
ChatKit/Classes/VO/MessageObject/SKSRealTimeVideoOrVoiceMessageObject.h
|
//
// SKSRealTimeVideoAudioMessageObject.h
// AtFirstSight
//
// Created by iCrany on 2016/11/10.
// Copyright (c) 2016 Sachsen. All rights reserved.
//
#import "SKSChatMessageObject.h"
NS_ASSUME_NONNULL_BEGIN
@interface SKSRealTimeVideoOrVoiceMessageObject : NSObject<SKSChatMessageObject>
/**
实时视频或语音回话的唯一标识
*/
@property(nonatomic, assign) int64_t sessionId;
/**
实时视频或语音的呼叫状态
*/
@property(nonatomic, assign) SKSMessageCallState callState;
/**
实时视频或语音的通话时长
*/
@property(nonatomic, assign) int32_t duration;
/**
消息体所在的消息对象, 实现 SKSChatMessageObject 协议
*/
@property (nonatomic, nullable, weak) SKSChatMessage *message;
/**
实时视频或语音实例构造函数
@param sessionId 实时视频会话的唯一标识
@param callState 实时视频的呼叫状态
@param duration 实时视频的通话时长
@return 实时视频对象实例
*/
- (instancetype)initWithSessionId:(int64_t)sessionId
callState:(SKSMessageCallState)callState
duration:(int32_t)duration;
/**
实时视频或语音聊天中的 Icon 图片以供视图计算大小
@return 实时视频聊天 Icon 对象
*/
- (UIImage *)realTimeVideoOrVoiceIconImage;
/**
实时视频或语音中的文案展示
@discussion 根据视频持续时间的长度来计算该字符串出来的, 子类重写覆盖该方法即可
@return 实时视频中的文案内容
*/
- (NSString *)realTimeVideoOrVoiceIconDescription;
@end
NS_ASSUME_NONNULL_END
|
dariasor/FirTree
|
java/src/firtree/CoorAscentOnLeaves.java
|
<reponame>dariasor/FirTree
package firtree;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import firtree.metric.GAUCScorer;
import firtree.metric.MetricScorer;
import firtree.metric.NDCGScorer;
import firtree.utilities.FileUtils;
import firtree.utilities.Instance;
import firtree.utilities.RankList;
import mltk.cmdline.Argument;
import mltk.cmdline.CmdLineParser;
import mltk.core.io.AttrInfo;
import mltk.core.io.AttributesReader;
import mltk.core.io.InstancesReader;
import mltk.util.tuple.IntPair;
/**
* Optimize any metrics by a coordinate ascent algorithm customized for FirTree models
*
* @author <NAME>
*/
public class CoorAscentOnLeaves {
static class Options {
// The following arguments come from OrdLeastSquaresOnLeaves
// @Argument(name="-d", description="FirTree directory output by InteractionTreeLearnerGAMMC", required=true)
// String dir = ""; // Usually path up to "FirTree" inclusive
@Argument(name="-l", description="(cropped) treelog.txt which specifies a tree structure", required=true)
String logPath = "";
@Argument(name = "-r", description = "attribute file", required = true)
String attPath = "";
// This argument comes from InteractionTreeLearnerGAMMC but is required
@Argument(name = "-g", description = "name of the attribute with the group id", required = true)
String group = "";
@Argument(name = "-y", description = "polynomial degree")
int polyDegree = 2;
@Argument(name = "-m", description = "Prefix of name of output parameter files (default: ca)")
String modelPrefix = "ca_params_y2";
@Argument(name = "-a", description = "(params|minmax)")
String algorithm = "params";
@Argument(name = "-i", description = "Initialize model parameters by OLS or an existing model")
String modelInitial = "";
// This argument comes from InteractionTreeLearnerGAMMC
@Argument(name = "-c", description = "(gauc|ndcg) - metric to optimize (default: gauc)")
String metricStr = "gauc";
}
public static void main(String[] args) throws Exception {
Options opts = new Options();
CmdLineParser parser = new CmdLineParser(CoorAscentOnLeaves.class, opts);
try {
parser.parse(args);
} catch (IllegalArgumentException e) {
parser.printUsage();
System.exit(1);
}
long start = System.currentTimeMillis();
// XW. OLS is better than uniform in initializing parameters of CA (manually call OLS)
if (! opts.modelInitial.equals("")) {
String dir = Paths.get(opts.logPath).getParent().toString();
for (File nodeFile : new File(dir).listFiles()) {
if (nodeFile.getName().startsWith("Node_Root")) {
String nodeDir = nodeFile.toString();
Path modelSrc = Paths.get(nodeDir, opts.modelInitial + ".txt");
Path modelTgt = Paths.get(nodeDir, opts.modelPrefix + ".txt");
if (modelSrc.toFile().exists()) {
timeStamp(String.format("Copy model parameters from %s to %s", modelSrc, modelTgt));
Files.copy(modelSrc, modelTgt, StandardCopyOption.REPLACE_EXISTING);
}
Path constSrc = Paths.get(nodeDir, opts.modelInitial + "_const.txt");
Path constTgt = Paths.get(nodeDir, opts.modelPrefix + "_const.txt");
if (constSrc.toFile().exists()) {
timeStamp(String.format("Copy const parameters from %s to %s", constSrc, constTgt));
Files.copy(constSrc, constTgt, StandardCopyOption.REPLACE_EXISTING);
}
}
}
} else {
OrdLeastSquaresOnLeaves.main(args);
}
// Load attribute file
AttrInfo ainfo = AttributesReader.read(opts.attPath);
// Load tree structure and initial parameter values
FirTree model = new FirTree(ainfo, opts.logPath, opts.polyDegree, opts.modelPrefix);
for (int i = 0; i < model.nodeAttIdList.size(); i ++) {
for (int j = 0; j < model.nodeAttIdList.get(i).size(); j ++) {
if (model.nodeAttIdList.get(i).get(j) != model.lr_attr_ids.get(i).get(j)) {
System.err.printf("Incosistent attribute order between treelog.txt and parameter files %d %d\n",
model.nodeAttIdList.get(i).get(j), model.lr_attr_ids.get(i).get(j));
System.err.printf("%d %d %d -> %s\n", i, j, model.nodeAttIdList.get(i).get(j), ainfo.idToName(model.nodeAttIdList.get(i).get(j)));
System.err.printf("%d %d %d -> %s\n", i, j, model.lr_attr_ids.get(i).get(j), ainfo.idToName(model.lr_attr_ids.get(i).get(j)));
System.exit(1);
}
}
}
// Load training data
Map<String, RankList> rankLists = loadRankList(opts, ainfo, model);
MetricScorer scorer;
if (opts.metricStr.equals("gauc")) {
scorer = new GAUCScorer();
} else {
int k = 4;
if (opts.metricStr.contains("@")) {
k = Integer.parseInt(opts.metricStr.split("@")[1]);
}
scorer = new NDCGScorer(k);
}
if (opts.algorithm.equals("params")) {
timeStamp("Tune values of model parameters");
// Tune parameter values of leaf nodes of type MODEL
tuneParams(opts, model, rankLists, scorer);
} else if (opts.algorithm.equals("minmax")) {
timeStamp("Tune min and max values of features");
// Tune min and max values of features
tuneMinMax(opts, model, rankLists, scorer);
}
long end = System.currentTimeMillis();
System.out.println("Finished all in " + (end - start) / 1000.0 + " (s).");
}
protected static int indexMax = 5000;
protected static int indexNum = 50;
protected static double minGainBound = 0.00001;
protected static void tuneMinMax(
Options opts,
FirTree model,
Map<String, RankList> rankLists,
MetricScorer scorer
) throws Exception {
timeStamp("Start to tune min and max values");
boolean verbose = false; // Print debugging information, which is verbose
boolean correct = false; // Use time-consuming but correct implementation
double tolerance = 5 * Math.pow(10, -3);
// Save the original min and max values to end of coefficients
model.bakMinmax();
int nIter = 0;
while (true) {
// Reset cached predictions helps prevent numerical issues
double scoreTrain = getScore(model, rankLists, scorer);
timeStamp(String.format("Training %s is %f at the start of iteration %d",
scorer.name(), scoreTrain, nIter));
//System.exit(0);
double startScoreTrain = scoreTrain;
// Reset cached predictions is disabled
List<IntPair> idPairs = model.getBoundIdPairs();
for (int i = 0; i < idPairs.size(); i ++) {
IntPair idPair = idPairs.get(i);
int activeNode = idPair.v1;
int activeAtt = idPair.v2;
double bestMin = model.getMinValue(activeNode, activeAtt);
double bestMax = model.getMaxValue(activeNode, activeAtt);
double bestScoreTrain = scoreTrain;
int minIndex = model.getMinIndex(activeNode, activeAtt);
int maxIndex = model.getMaxIndex(activeNode, activeAtt);
int attId = model.lr_attr_ids.get(activeNode).get(activeAtt);
int indexUnit = Math.max(1, model.attIdToValList.get(attId).size() / indexMax);
if (verbose) {
System.out.printf(" #%d node, #%d att is %s (id:%d which is not col)\n",
activeNode, activeAtt, model.ainfo.idToName(attId), attId);
System.out.printf(" #%d is min %.0f, #%d is max %.0f, index unit:%d\n",
minIndex, bestMin, maxIndex, bestMax, indexUnit);
}
double prevMin = bestMin;
for (int j = 0; j < indexNum; j ++) {
int curIndex = minIndex + j * indexUnit;
double currMin = model.attIdToValList.get(attId).get(curIndex);
if (currMin >= bestMax) {
break;
}
double minDelta = currMin - prevMin;
///* Ablative Debug Start
if (correct) {
// This code snippet is time-consuming
model.setMinValue(activeNode, activeAtt, minDelta);
scoreTrain = getScore(model, rankLists, scorer);
} else {
scoreTrain = getScore(
model, rankLists, scorer, activeNode, activeAtt, minDelta, "min");
}
//*/ Ablative Debug End
///*
if (verbose && false) {
System.out.printf(" #%02d %07d %07d=%07d %.16f (min)\n", j, curIndex,
(int) currMin, (int) model.getMinValue(activeNode, activeAtt), scoreTrain);
}
//*/
if (scoreTrain > bestScoreTrain) {
bestMin = model.getMinValue(activeNode, activeAtt);
bestScoreTrain = scoreTrain;
}
prevMin = currMin;
}
// Set the active attribute to the best min value
double minDelta = bestMin - model.getMinValue(activeNode, activeAtt);
///* Ablative Debug Start
if (true) {
// This code snippet is time-consuming
model.setMinValue(activeNode, activeAtt, minDelta);
scoreTrain = getScore(model, rankLists, scorer);
} else {
scoreTrain = getScore(
model, rankLists, scorer, activeNode, activeAtt, minDelta, "min");
}
if (Math.abs(scoreTrain - bestScoreTrain) > tolerance) {
System.err.printf("%s: estimated %f v.s. real %f if setting min to %f\n",
scorer.name(), bestScoreTrain, scoreTrain, bestMin);
System.exit(1);
}
//*/ Ablative Debug End
///*
if (verbose) {
System.out.printf(" min:%07d score:%.16f (best)\n", (int) bestMin, scoreTrain);
}
//*/
double prevMax = bestMax;
for (int j = 0; j < indexNum; j ++) {
int curIndex = maxIndex - j * indexUnit;
double currMax = model.attIdToValList.get(attId).get(curIndex);
if (currMax <= bestMin) {
break;
}
double maxDelta = currMax - prevMax;
///* Ablative Debug Start
if (correct) {
// This code snippet is time-consuming
model.setMaxValue(activeNode, activeAtt, maxDelta);
scoreTrain = getScore(model, rankLists, scorer);
} else {
scoreTrain = getScore(
model, rankLists, scorer, activeNode, activeAtt, maxDelta, "max");
}
//*/ Ablative Debug End
if (verbose && false) {
System.out.printf(" #%02d %07d %07d=%07d %.16f (max)\n", j, curIndex,
(int) currMax, (int) model.getMaxValue(activeNode, activeAtt), scoreTrain);
}
//*/
if (scoreTrain > bestScoreTrain) {
bestMax = model.getMaxValue(activeNode, activeAtt);
bestScoreTrain = scoreTrain;
}
prevMax = currMax;
}
// Set the active attribute to the best max value
double maxDelta = bestMax - model.getMaxValue(activeNode, activeAtt);
///* Ablative Debug Start
if (true) {
// This code snippet is time-consuming
model.setMaxValue(activeNode, activeAtt, maxDelta);
scoreTrain = getScore(model, rankLists, scorer);
} else {
scoreTrain = getScore(
model, rankLists, scorer, activeNode, activeAtt, maxDelta, "max");
}
if (Math.abs(scoreTrain - bestScoreTrain) > 5 * Math.pow(10, -3)) {
System.err.printf("%s: estimated %f v.s. real %f if setting min to %f\n",
scorer.name(), bestScoreTrain, scoreTrain, bestMax);
System.exit(1);
}
//*/ Ablative Debug End
///*
if (verbose) {
System.out.printf(" max:%07d score:%.16f (best)\n", (int) bestMax, scoreTrain);
}
//*/
//break;
}// for (int i = 0; i < idPairs.size(); i ++)
// Save model parameters at each iteration because training takes too long
model.save(nIter);
double gainTrain = scoreTrain - startScoreTrain;
timeStamp(String.format(" Increase training %s by %f (from %f to %f)",
scorer.name(), gainTrain, startScoreTrain, scoreTrain));
nIter += 1;
if (gainTrain < minGainBound) {
break;
}
//break;
} // while (true)
model.save(-1);
}
protected static double getScore(
FirTree model,
Map<String, RankList> rankLists,
MetricScorer scorer,
int activeNode,
int activeAtt,
double delta,
String type
) {
double total = 0;
double weight = 0;
if (type.equals("min")) {
model.setMinValue(activeNode, activeAtt, delta);
} else if (type.equals("max")) {
model.setMaxValue(activeNode, activeAtt, delta);
} else {
System.err.printf("Unknown type %s in CoorAscentOnLeaves.getScore\n", type);
System.exit(1);
}
for (RankList rankList : rankLists.values()) {
if (isActive(rankList, activeNode)) {
// There is one of the rank list's instances that falls in the active node
for (Instance instance : rankList.getInstances()) {
///* Ablative Debug Start
model.predict(instance, activeNode, activeAtt, delta, type);
//*/
/*// This code snippet is time-consuming
model.predict(instance);
*/// Ablative Debug End
}
// Set is easily forgot
rankList.setScore(scorer.score(rankList));
}
double score = rankList.getScore();
if (! Double.isNaN(score)) {
// If tp_fn and fp_tn are never 0 when computing AUC
total += score;
weight += rankList.getWeight();
}
}
return total / weight;
}
// The hyper-parameters of training model parameters by coordinate ascent
// delta = [ deltaUnit * deltaBase^0, ..., deltaUnit * deltaBase^deltaMaxPower ]
public static double deltaUnit = 0.001;
public static double deltaRatio = 0.01;
// (1 + 0.01 * (pow(2.0, 10 + 1) - 1)) = 21.5
/*//
public static double deltaBase = 2.0;
public static double deltaMaxPower = 10; // A smaller value speeds up training
public static double minGainTrain = 0.0001; // A larger value speeds up training
*///
// (1 + 0.01 * (pow(1.1, 80 + 1) - 1)) = 23.5
public static double deltaBase = 1.1;
public static double deltaMaxPower = 80; // A smaller value speeds up training
public static double minGainTrain = 0.00001; // A larger value speeds up training
protected static void tuneParams(
Options opts,
FirTree model,
Map<String, RankList> rankLists,
MetricScorer scorer
) throws Exception {
timeStamp("Start to tune parameters of linear models");
// Create log directory and delete all previous log files
String dir = Paths.get(opts.logPath).getParent().toString();
String logPath = dir + "/CA_" + opts.modelPrefix + "_y" + opts.polyDegree + "_PLOTS";
File logDir = new File(logPath);
if (! logDir.exists()) {
logDir.mkdirs();
} else {
for (File logFile : logDir.listFiles()) {
logFile.delete();
}
}
int nIter = 0;
while (true) {
// Reset cached predictions helps prevent numerical issues
double scoreTrain = getScore(model, rankLists, scorer);
System.out.printf("Training %s is %f at the start of iteration %d\n",
scorer.name(), scoreTrain, nIter);
//System.exit(0);
double startScoreTrain = scoreTrain;
// Reset cached predictions is disabled
List<IntPair> idPairs = model.getParamIdPairs();
for (int i = 0; i < idPairs.size(); i ++) {
IntPair idPair = idPairs.get(i);
int activeNode = idPair.v1;
int activeParam = idPair.v2;
double origParamValue = model.getParamValue(activeNode, activeParam);
double bestParamValue = origParamValue;
double bestScoreTrain = scoreTrain;
// Log parameter value and score
String strToWrite = String.format("Step\tValue\t%s\n", scorer.name());
String strBest = String.format("%d\t%s\t%s\n", 0, origParamValue, scoreTrain);
strToWrite += strBest;
double posDelta = initDelta(origParamValue, 1);
for (int j = 0; j < deltaMaxPower + 1; j ++) {
double paramDelta = posDelta;
///* Ablative Debug Start
scoreTrain = getScore(
model, rankLists, scorer, activeNode, activeParam, paramDelta);
//*/
/*// This code snippet is time-consuming
model.setParamValue(activeNode, activeParam, paramDelta);
scoreTrain = getScore(model, rankLists, scorer);
*/// Ablative Debug End
// Log parameter value and score
String strCur = String.format(
"%d\t%s\t%s\n",
+ j + 1,
model.getParamValue(activeNode, activeParam),
scoreTrain
);
strToWrite += strCur;
if (scoreTrain > bestScoreTrain) {
bestParamValue = model.getParamValue(activeNode, activeParam);
bestScoreTrain = scoreTrain;
strBest = strCur;
}
posDelta *= deltaBase;
}
double negDelta = initDelta(origParamValue, -1);
for (int j = 0; j < deltaMaxPower + 1; j ++) {
double paramDelta = negDelta;
if (j == 0) {
// Need to first restore active parameter's value to its original value
paramDelta += origParamValue - model.getParamValue(activeNode, activeParam);
}
///* Ablative Debug Start
scoreTrain = getScore(
model, rankLists, scorer, activeNode, activeParam, paramDelta);
//*/
/*// This code snippet is time-consuming
model.setParamValue(activeNode, activeParam, paramDelta);
scoreTrain = getScore(model, rankLists, scorer);
*/// Ablative Debug End
// Log parameter value and score
String strCur = String.format(
"%d\t%s\t%s\n",
- j - 1,
model.getParamValue(activeNode, activeParam),
scoreTrain
);
strToWrite += strCur;
if (scoreTrain > bestScoreTrain) {
bestParamValue = model.getParamValue(activeNode, activeParam);
bestScoreTrain = scoreTrain;
strBest = strCur;
}
negDelta *= deltaBase;
}
// Remove features easily causes numerical issues
// Set the active parameter to the best value
double paramDelta = bestParamValue - model.getParamValue(activeNode, activeParam);
///* Ablative Debug Start
scoreTrain = getScore(
model, rankLists, scorer, activeNode, activeParam, paramDelta);
//*/
/*// This code snippet is time-consuming
model.setParamValue(activeNode, activeParam, paramDelta);
scoreTrain = getScore(model, rankLists, scorer);
*/// Ablative Debug End
System.out.printf("\t%s:%f orig:%+.12f best:%+.12f (%02d, %02d)\n",
scorer.name(), scoreTrain,
origParamValue, bestParamValue,
activeNode, activeParam
);
// Write parameter values and scores to file
String nodeName = model.getNodeName(activeNode);
String paramName = model.getParamName(activeNode, activeParam);
String logName = String.format(
"Iter-%02d_Pair-%03d_%s_%s", nIter, i, nodeName, paramName);
strToWrite += strBest;
String logFile = logPath + File.separator + logName + ".tsv";
FileUtils.write(logFile, "ASCII", strToWrite);
} // for (int i = 0; i < idPairs.size(); i ++)
// Save model parameters at each iteration because training takes too long
model.save(nIter);
double gainTrain = scoreTrain - startScoreTrain;
System.out.printf("\tIncrease training %s by %f (from %f to %f)\n",
scorer.name(), gainTrain, startScoreTrain, scoreTrain);
nIter += 1;
if (gainTrain < minGainTrain) {
break;
}
//break;
} // while (true)
model.save(-1);
}
protected static double getScore(
FirTree model,
Map<String, RankList> rankLists,
MetricScorer scorer,
int activeNode,
int activeParam,
double paramDelta
) {
double total = 0;
double weight = 0;
model.setParamValue(activeNode, activeParam, paramDelta);
for (RankList rankList : rankLists.values()) {
if (isActive(rankList, activeNode)) {
// There is one of the rank list's instances that falls in the active node
for (Instance instance : rankList.getInstances()) {
///* Ablative Debug Start
model.predict(instance, activeNode, activeParam, paramDelta);
//*/
/*// This code snippet is time-consuming
model.predict(instance);
*/// Ablative Debug End
}
// Set is easily forgot
rankList.setScore(scorer.score(rankList));
}
double score = rankList.getScore();
if (! Double.isNaN(score)) {
// If tp_fn and fp_tn are never 0 when computing AUC
total += score;
weight += rankList.getWeight();
}
}
return total / weight;
}
protected static double getScore(
FirTree model,
Map<String, RankList> rankLists,
MetricScorer scorer
) {
double total = 0;
double weight = 0;
for (RankList rankList : rankLists.values()) {
for (Instance instance : rankList.getInstances()) {
model.predict(instance);
}
// Set is easily forgot
rankList.setScore(scorer.score(rankList));
double score = rankList.getScore();
if (! Double.isNaN(score)) {
// If tp_fn and fp_tn are never 0 when computing AUC
total += score;
weight += rankList.getWeight();
}
}
return total / weight;
}
protected static boolean isActive(RankList rankList, int activeNode) {
for (Instance instance : rankList.getInstances()) {
if (instance.getNodeIndex() == activeNode)
return true;
}
return false;
}
protected static double initDelta(double origParamValue, int sign) {
double absDelta = deltaUnit;
if (origParamValue != 0.0 && absDelta > 0.5 * Math.abs(origParamValue)) {
absDelta = deltaRatio * Math.abs(origParamValue);
}
return absDelta * sign;
}
protected static Map<String, RankList> loadRankList(
Options opts,
AttrInfo ainfo,
FirTree model
) throws Exception {
timeStamp("Scan data into rank lists");
String dir = Paths.get(opts.logPath).getParent().toString();
Map<String, RankList> rankLists = new HashMap<>();
List<String> allLeaves = model.getAllLeaves();
for (String leafName : allLeaves) {
String dataPath = Paths.get(dir, "Node_" + leafName, "fir.dta").toString();
Map<String, Integer> nameToId = new HashMap<>();
int leafIndex = model.nodeIndexes.get(leafName);
List<Integer> attIdList = model.nodeAttIdList.get(leafIndex);
for (int i = 0; i < attIdList.size(); i ++) {
nameToId.put(ainfo.idToName(attIdList.get(i)), i);
}
BufferedReader br = new BufferedReader(new FileReader(dataPath));
for (String line = br.readLine(); line != null; line = br.readLine()) {
String[] data = line.split("\t");
Instance instance = new Instance(
InstancesReader.parseDenseInstance(data, ainfo, attIdList, false),
nameToId
);
String groupId = data[ainfo.nameToCol.get(opts.group)];
instance.setGroupId(groupId);
// Predict index of the node (must be a leaf) the instance falls in
int nodeIndex = model.indexLeaf(data); // model.indexLeaf(instance, data);
String nodeName = model.getNodeName(nodeIndex);
if (! nodeName.equals(leafName)) {
System.err.printf("Not all instances in directory %s fall in node %s\n", leafName, nodeName);
System.exit(1);
}
instance.setNodeIndex(nodeIndex);
// Add the instance to the rank list with the same groupId
if (! rankLists.containsKey(groupId)) {
rankLists.put(groupId, new RankList(groupId));
}
rankLists.get(groupId).add(instance);
if (Math.abs(model.predict(line) - model.predict(instance)) > Math.pow(10, -10)) {
System.err.println("Diffferent versions of FirTree.predict are inconsistent");
System.exit(1);
}
model.addAttIdToValSet(attIdList, data);
}
br.close();
}
// Set the weight of a rank list
for (RankList rankList : rankLists.values())
rankList.setWeight();
model.addAttIdToValList();
return rankLists;
}
static String getNodeDir(String dir, String node) {
return Paths.get(dir, "Node_" + node).toString();
}
static List<Path> getDataPaths(String dir, String node) {
List<Path> dataPaths = new ArrayList<Path>();
String left = getNodeDir(dir, node) + "_L";
String right = getNodeDir(dir, node) + "_R";
if (new File(left).exists()) {
if (new File(right).exists()) {
dataPaths.addAll(getDataPaths(dir, node + "_L"));
dataPaths.addAll(getDataPaths(dir, node + "_R"));
} else {
System.err.printf("%s does not exist\n", right);
System.exit(1);
}
} else {
if (new File(right).exists()) {
System.err.printf("%s does not exist\n", left);
System.exit(1);
} else {
Path dataPath = Paths.get(getNodeDir(dir, node), "fir.dta");
if (! new File(dataPath.toString()).exists()) {
System.err.printf("%s does not exist\n", dataPath);
System.exit(1);
}
dataPaths.add(dataPath);
}
}
return dataPaths;
}
static void timeStamp(String msg) {
Date date = new Date();
System.out.println("TIMESTAMP >>>> ".concat(date.toString()).concat(": ").concat(msg));
}
}
|
expedicion/repo_06
|
section 05/src/example_28/LoopContinue3.java
|
package example_28;
/**
* Created by Nostromo on 2018-02-11.
*/
public class LoopContinue3 {
}
|
chs6558/chs6558.github.io
|
node_modules/styled-icons/fa-solid/Upload/Upload.esm.js
|
<filename>node_modules/styled-icons/fa-solid/Upload/Upload.esm.js<gh_stars>0
export * from '@styled-icons/fa-solid/Upload';
|
mikejohanson/azure-mobile-apps-node
|
test/express/files/api/authapi.js
|
var api = module.exports = {
get: function (req, res, next) {
res.status(200).end();
},
delete: function(req, res, next) {
res.status(200).end();
},
post: function (req, res, next) {
res.status(200).end();
}
};
api.authorize = true;
api.post.disable = true;
|
joys-stack/Study
|
study-platform/src/api/public.js
|
import req from '../lib/req.js'
// 函数命名规范 请求方式 get/post/delete/put + 路由名称 小驼峰的命名方式
// 例:get priv/appAll 函数的名称为 getAppAll
/** ********************************************系统共用********************************************/
/**
* 【系统共用】用户登录
* @param {Object} param 参数
* @Author Joy
* @Description 登录
* @CreateDate 2021-11-24
* @ModifyAuthor
* @ModifyDate
* @ModifyDescription
*/
export function postLogin(param) {
return new Promise((resolve, reject) => {
const url = 'public/login'
req.post(url, param).then(reponse => {
resolve(reponse)
}).catch(error => {
reject(error)
})
})
}
|
tejdas/dovemq-amqp
|
functional-test/src/main/java/net/dovemq/transport/session/SysTestCommandReceiverFactory.java
|
<reponame>tejdas/dovemq-amqp<filename>functional-test/src/main/java/net/dovemq/transport/session/SysTestCommandReceiverFactory.java
/**
* Copyright 2012 <NAME>
*
* 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/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.dovemq.transport.session;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import net.dovemq.transport.link.CAMQPLinkMessageHandler;
import net.dovemq.transport.link.CAMQPLinkMessageHandlerFactory;
import net.dovemq.transport.protocol.data.CAMQPControlAttach;
public class SysTestCommandReceiverFactory implements
CAMQPLinkMessageHandlerFactory {
private final Set<SysBaseLinkReceiver> linkReceivers = Collections.synchronizedSet(new HashSet<SysBaseLinkReceiver>());
private void add(SysBaseLinkReceiver linkReceiver) {
linkReceivers.add(linkReceiver);
}
void remove(SysBaseLinkReceiver linkReceiver) {
linkReceivers.remove(linkReceiver);
}
public boolean isDone() {
synchronized (linkReceivers) {
for (SysBaseLinkReceiver linkReceiver : linkReceivers) {
if (!linkReceiver.isDone())
return false;
}
}
return true;
}
protected static Collection<String> getAvailableFactoryList() {
return Arrays.asList("SysTestCommandReceiver",
"SysTestDelayedAckLinkReceiver");
}
private String commandReceiverClassName = null;
protected String getCommandReceiverClassName() {
return commandReceiverClassName;
}
protected SysTestCommandReceiverFactory(String className) {
commandReceiverClassName = className;
}
CAMQPLinkMessageHandler currentCommandReceiver = null;
@Override
public CAMQPLinkMessageHandler linkAccepted(CAMQPSessionInterface session,
CAMQPControlAttach attach) {
SysBaseLinkReceiver linkReceiver = null;
if (commandReceiverClassName.equalsIgnoreCase("SysTestCommandReceiver")) {
linkReceiver = new SysTestCommandReceiver(session);
} else if (commandReceiverClassName.equalsIgnoreCase("SysTestDelayedAckLinkReceiver")) {
linkReceiver = new SysDelayedAckLinkReceiver(session);
new Thread((SysDelayedAckLinkReceiver) linkReceiver).start();
} else {
System.out.println("Unknown CAMQPCommandReceiver");
return null;
}
add(linkReceiver);
linkReceiver.registerFactory(this);
return linkReceiver;
}
}
|
wangcy6/weekly_read
|
code_reading/oceanbase-master/src/share/sequence/ob_sequence_cache.h
|
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*/
#ifndef _OB_SHARE_SEQ_SEQUENCE_CACHE_H_
#define _OB_SHARE_SEQ_SEQUENCE_CACHE_H_
#include "lib/utility/ob_macro_utils.h"
#include "lib/hash/ob_link_hashmap.h"
#include "lib/number/ob_number_v2.h"
#include "share/sequence/ob_sequence_dml_proxy.h"
#include "share/sequence/ob_sequence_option.h"
namespace oceanbase {
namespace common {
class ObMySQLProxy;
class ObMySQLTransaction;
} // namespace common
namespace share {
namespace schema {
class ObSchemaGetterGuard;
class ObSequenceSchema;
class ObMultiVersionSchemaService;
} // namespace schema
struct SequenceCacheNode {
SequenceCacheNode() : start_(), end_()
{}
void reset()
{}
TO_STRING_KV(K_(start), K_(end));
int set_start(const common::number::ObNumber& start)
{
return start_.set(start);
}
int set_end(const common::number::ObNumber& end)
{
return end_.set(end);
}
const common::number::ObNumber& start() const
{
return start_.val();
}
const common::number::ObNumber& end() const
{
return end_.val();
}
private:
ObSequenceValue start_;
ObSequenceValue end_;
};
// a wrapper class, adaptor for ObLinkHashMap
struct CacheItemKey {
public:
CacheItemKey() : key_(0)
{}
CacheItemKey(const uint64_t key) : key_(key)
{}
~CacheItemKey() = default;
bool operator==(const CacheItemKey& other) const
{
return other.key_ == key_;
}
int compare(const CacheItemKey& other)
{
return (key_ < other.key_) ? -1 : (key_ > other.key_) ? 1 : 0;
}
uint64_t hash() const
{
uint64_t hash_val = 0;
hash_val = common::murmurhash(&key_, sizeof(key_), hash_val);
return hash_val;
}
TO_STRING_KV(K_(key));
uint64_t key_;
};
struct ObSequenceCacheItem : public common::LinkHashValue<CacheItemKey> {
public:
ObSequenceCacheItem()
: prefetching_(false),
with_prefetch_node_(false),
base_on_last_number_(false),
last_refresh_ts_(0),
last_number_()
{}
int combine_prefetch_node()
{
int ret = common::OB_SUCCESS;
if (OB_LIKELY(with_prefetch_node_)) {
if (curr_node_.end() != prefetch_node_.start()) {
// use prefetched node since can't merge curr node and prefetch node
ret = curr_node_.set_start(prefetch_node_.start());
}
curr_node_.set_end(prefetch_node_.end());
// can prefect new node
with_prefetch_node_ = false;
}
return ret;
}
int set_last_number(const common::number::ObNumber& num)
{
return last_number_.set(num);
}
common::number::ObNumber& last_number()
{
return last_number_.val();
}
const common::number::ObNumber& last_number() const
{
return last_number_.val();
}
public:
SequenceCacheNode curr_node_;
SequenceCacheNode prefetch_node_;
// avoid concurrent prefetch
bool prefetching_;
// mark prefetch_node filled
bool with_prefetch_node_;
bool base_on_last_number_;
int64_t last_refresh_ts_;
lib::ObMutex alloc_mutex_;
private:
ObSequenceValue last_number_;
public:
TO_STRING_KV(K_(curr_node), K_(prefetch_node), K_(prefetching), K_(with_prefetch_node), K_(last_refresh_ts),
K_(last_number), K_(base_on_last_number));
};
class ObSequenceCache {
public:
// map sequence_id => sequence cache
typedef common::ObLinkHashMap<CacheItemKey, ObSequenceCacheItem> NodeMap;
public:
ObSequenceCache();
virtual ~ObSequenceCache() = default;
static ObSequenceCache& get_instance();
int init(share::schema::ObMultiVersionSchemaService& schema_service, common::ObMySQLProxy& sql_proxy);
int nextval(const share::schema::ObSequenceSchema& schema, common::ObIAllocator& allocator, ObSequenceValue& nextval);
int remove(uint64_t sequence_id);
private:
/* functions */
int get_item(CacheItemKey& key, ObSequenceCacheItem*& item);
int prefetch_sequence_cache(const schema::ObSequenceSchema& schema, ObSequenceCacheItem& cache);
int find_sequence_cache(const schema::ObSequenceSchema& schema, ObSequenceCacheItem& cache);
int move_next(const schema::ObSequenceSchema& schema, ObSequenceCacheItem& cache, common::ObIAllocator& allocator,
ObSequenceValue& nextval);
int need_refill_cache(const schema::ObSequenceSchema& schema, ObSequenceCacheItem& cache,
common::ObIAllocator& allocator, bool& need_refill);
int refill_sequence_cache(
const schema::ObSequenceSchema& schema, common::ObIAllocator& allocator, ObSequenceCacheItem& cache);
/* variables */
ObSequenceDMLProxy dml_proxy_;
bool inited_;
lib::ObMutex cache_mutex_;
NodeMap sequence_cache_;
DISALLOW_COPY_AND_ASSIGN(ObSequenceCache);
};
} // namespace share
} // namespace oceanbase
#endif /* _OB_SHARE_SEQ_SEQUENCE_CACHE_H_ */
//// end of header file
|
ffteja/cgal
|
QP_solver/examples/QP_solver/solve_convex_hull_containment_lp3.h
|
<filename>QP_solver/examples/QP_solver/solve_convex_hull_containment_lp3.h<gh_stars>1000+
// example: function to check whether a point is in the convex
// hull of other points; this version uses a maker
#include <CGAL/boost/iterator/transform_iterator.hpp>
#include <CGAL/Kernel_traits.h>
#include <CGAL/QP_options.h>
#include <CGAL/QP_models.h>
#include <CGAL/QP_functions.h>
// unary function to get homogeneous begin-iterator of point
template <class Point_d>
struct Homogeneous_begin {
typedef typename Point_d::Homogeneous_const_iterator result_type;
result_type operator() (const Point_d& p) const {
return p.homogeneous_begin();
}
};
// function to test whether point is in the convex hull of other points;
// the type ET is an exact type used for the computations
template <class Point_d, class RandomAccessIterator, class ET>
CGAL::Quadratic_program_solution<ET>
solve_convex_hull_containment_lp (const Point_d& p,
RandomAccessIterator begin,
RandomAccessIterator end, const ET& dummy,
const CGAL::Quadratic_program_options& o)
{
// construct program and solve it
return CGAL::solve_nonnegative_linear_program
(CGAL::make_nonnegative_linear_program_from_iterators
(static_cast<int>(end-begin), // n
p.dimension()+1, // m
boost::transform_iterator
<Homogeneous_begin<Point_d>, RandomAccessIterator>(begin), // A
typename Point_d::Homogeneous_const_iterator (p.homogeneous_begin()),// b
CGAL::Const_oneset_iterator<CGAL::Comparison_result>(CGAL::EQUAL), // ~
CGAL::Const_oneset_iterator
<typename CGAL::Kernel_traits<Point_d>::Kernel::RT> (0)), // c
dummy, o);
}
|
Jumpscale/jumpscale_portal8
|
apps/gridportal/base/Grid/.macros/wiki/jumpscript/1_jumpscript.py
|
<reponame>Jumpscale/jumpscale_portal8<filename>apps/gridportal/base/Grid/.macros/wiki/jumpscript/1_jumpscript.py
def main(j, args, params, tags, tasklet):
params.merge(args)
doc = params.doc
# tags = params.tags
actor=j.apps.actorsloader.getActor("system","gridmanager")
organization = args.getTag("organization")
name = args.getTag("jsname")
out = ''
missing = False
for k,v in {'organization':organization, 'name':name}.items():
if not v:
out += 'Missing param %s.\n' % k
missing = True
if not missing:
obj = actor.getJumpscript(organization=organization, name=name)
out = ['||Property||Value||']
for k,v in obj.items():
if k in ('args', 'roles'):
v = ' ,'.join(v)
if k == 'source':
continue
v = j.data.text.toStr(v)
out.append("|%s|%s|" % (k.capitalize(), v.replace('\n', '') if v else v))
out.append('\n{{code:\n%s\n}}' % obj['source'])
out = '\n'.join(out)
doc.applyTemplate({'name': name})
params.result = (out, doc)
return params
def match(j, args, params, tags, tasklet):
return True
|
alexn1/QForms
|
src/frontend/editor/ModelController/PageLinkController/PageLinkController.js
|
<filename>src/frontend/editor/ModelController/PageLinkController/PageLinkController.js
class PageLinkController extends ModelController {
constructor(model, parent) {
super(model, parent);
this.node = true;
this.pageController = null;
this.items = null;
}
getTitle() {
if (this.pageController) return this.pageController.getTitle();
return super.getTitle();
}
getStyle() {
return {
// fontWeight: 'bold',
color: 'red'
};
}
hasPage() {
return this.pageController != null;
}
async loadPage() {
console.log('PageLinkController.loadPage', this.getTitle());
if (this.pageController) throw new Error('page already loaded');
const pageLink = this.model;
const pageData = await EditorFrontHostApp.fetchPageData(pageLink.getFileName());
// page
const page = new PageEditor(pageData, pageLink);
page.init();
// pageController
const pageController = new PageController(page, this);
pageController.init();
this.setPageController(pageController);
// console.log('pageController:', pageController);
this.view.rerender();
}
getActions() {
return this.pageController.getActions();
}
getPropList() {
return this.pageController.getPropList();
}
async setProperty(name, value) {
this.pageController.setProperty(name, value);
}
setPageController(pageController) {
if (this.pageController) throw new Error('pageLinkController already has pageController');
this.pageController = pageController;
this.items = pageController.items;
}
remove() {
console.log('PageLinkController.remove', this.getTitle());
this.parent.removePageLink(this);
}
}
|
lfpratik/dccnsys
|
wwwdccn/submissions/migrations/0005_artifact.py
|
<gh_stars>10-100
# Generated by Django 2.2.4 on 2019-08-29 17:36
from django.db import migrations, models
import django.db.models.deletion
import submissions.models
class Migration(migrations.Migration):
dependencies = [
('conferences', '0011_artifactdescriptor'),
('submissions', '0004_submission_filled_details'),
]
operations = [
migrations.CreateModel(
name='Artifact',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('file', models.FileField(blank=True, upload_to=submissions.models.get_attachment_full_path)),
('descriptor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='instances', to='conferences.ArtifactDescriptor')),
('submission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='artifacts', to='submissions.Submission')),
],
),
]
|
rlaj/tmc
|
source/dist/views/lb/par3-closest-players.js
|
define('views/lb/par3-closest-players',['require','jquery','underscore','backbone','views/lb/par3-closest-player-row','utils/lb/par3-window-size','utils/lb/lb-common','utils/lb/lb-sticky-nav','utils/pubsub'],function(require) {
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Par3ClosestRow = require('views/lb/par3-closest-player-row'),
Par3Win = require('utils/lb/par3-window-size'),
LBCommon = require('utils/lb/lb-common'),
LBStickyNav = require('utils/lb/lb-sticky-nav'),
PubSub = require('utils/pubsub')
;
var Par3ClosestPlayersView = Backbone.View.extend({
events: {
// 'click .headerRow .sort_item': 'sortPlayersBy'
},
initialize: function(opts) {
this.logger = new eventsCore.util.Logger('Par3ClosestPlayersView');
this.logger.info('Initialize');
this.options = opts;
this.prRows = [];
// collection
this.par3_closest_collection = this.options.collection;
this.lbstickyNav = new LBStickyNav({
el: this.$('.headerRow')
});
// save dom el reference
this.$closestPlayerContainer;
// dispose and writeHtml after score refresh
this.listenTo(PubSub, 'par3closestscores:refresh', this.disposePlayerRows_reRender);
// listener - window size
this.listenTo(PubSub, 'windowsize:lbLargeSkeuomorphic:enter windowsize:lbSmallSkeuomorphic:enter', this.enterSkeuomorphic);
},
render: function() {
// save dom el reference
this.$closestPlayerContainer = this.$('#closestTableData');
this.$closestPlayerContainer.html('');
this.writeHtml();
return this;
},
onDispose: function() {
this.prRows.forEach(function(row) {
row.prRow.dispose();
});
},
disposePlayerRows_reRender: function() {
this.onDispose();
this.prRows = [];
this.writeHtml();
},
writeHtml: function() {
var prRowObjs = this.buildAllPlayers();
this.$closestPlayerContainer.html(prRowObjs);
LBCommon.addBottomBorders(this.$closestPlayerContainer);
// event for .js to enable isInview()
PubSub.trigger('writeHtml:complete');
},
buildAllPlayers: function() {
var players_list = [];
this.par3_closest_collection.forEach(function(player) {
var html = '';
var obj = this.createNewPrRow(player);
this.prRows.push({pid: player.id, prRow: obj });
html = obj.$el;
players_list.push(html);
}.bind(this));
return players_list;
},
// playerRow for All Players
createNewPrRow: function(player) {
var klass = (player.attributes.id !== '') ? 'hoverable' : '';
var obj = new Par3ClosestRow({
model: player,
prefix: 'closest',
klass: klass
}).render();
return obj;
},
// for listener to call skeuomorphic view specific functions
enterSkeuomorphic: function() {
// this.isInView();
},
resetSticky: function() {
if(Par3Win.size() !== Par3Win.sizes.smskeuomorphic && Par3Win.size() !== Par3Win.sizes.lgskeuomorphic) {
this.lbstickyNav.resizeListener();
} else {
this.lbstickyNav.render();
}
}
});
return Par3ClosestPlayersView;
});
|
jamalgithub/workdev
|
SpringSample-01/src/main/java/com/denofprogramming/service/MessageOfTheDayService.java
|
package com.denofprogramming.service;
public interface MessageOfTheDayService {
String getMessage();
}
|
17621368758/tranpathPY
|
basicInfo/migrations/0003_dicwareclass.py
|
<gh_stars>1-10
# Generated by Django 2.1.2 on 2018-10-24 09:28
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('system', '0031_syslog'),
('basicInfo', '0002_probrand'),
]
operations = [
migrations.CreateModel(
name='DicWareclass',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('parentId', models.IntegerField(null=True, verbose_name='父类ID')),
('name', models.CharField(max_length=50, verbose_name='类目名称')),
('sorts', models.IntegerField(null=True, verbose_name='排序')),
('memo', models.CharField(max_length=500, null=True, verbose_name='备注')),
('addtime', models.DateTimeField(auto_now_add=True, null=True, verbose_name='添加时间')),
('updatetime', models.DateTimeField(null=True, verbose_name='最后修改时间')),
('deletetime', models.DateTimeField(null=True, verbose_name='删除时间')),
('SellerId', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dicWareclass_SellerId', to='system.Seller', verbose_name='所属商家(sellers.id)永远为0')),
('adder', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dicWareclass_adder', to='system.User', verbose_name='添加人(user.id)')),
('deleter', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dicWareclass_deleter', to='system.User', verbose_name='删除人')),
('updater', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='dicWareclass_updater', to='system.User', verbose_name='最后修改人(user.id)')),
],
),
]
|
lmzbonack/SpecialHandling
|
specialhandling/app/tests/unit/mixins/filtersMixin.test.js
|
<gh_stars>0
import { mount } from '@vue/test-utils';
import filtersMixin from '../../../mixins/filters';
describe('filtersMixin.test.js', () => {
let wrapper;
const Component = {
render () {},
mixins: [filtersMixin]
};
beforeEach(() => {
wrapper = mount(Component, {
propsData: {
gridApi: {
setFilterModel: jest.fn(),
onFilterChanged: jest.fn()
},
rowData: []
},
data () {
return {
grid: {
externalFilters: {
hasCheckNumber: 'all',
user: ''
}
},
filters: {
contacted: {
value: ''
},
picked_up: {
value: ''
}
}
};
}
});
});
// Events
it('emits `close`', () => {
expect(wrapper.emitted().close).toBeFalsy();
wrapper.vm.close();
expect(wrapper.emitted().close).toBeTruthy();
});
it('emits `filterByHasCheckNumber`', () => {
expect(wrapper.emitted().filterByHasCheckNumber).toBeFalsy();
wrapper.vm.filterByHasCheckNumber('true');
expect(wrapper.emitted().filterByHasCheckNumber).toBeTruthy();
expect(wrapper.emitted().filterByHasCheckNumber[0]).toEqual(['true']);
});
it('emits `filterByUser`', () => {
expect(wrapper.emitted().filterByUser).toBeFalsy();
wrapper.vm.filterByUser('<NAME>');
expect(wrapper.emitted().filterByUser).toBeTruthy();
expect(wrapper.emitted().filterByUser[0]).toEqual(['<NAME>']);
});
// Methods
// filterByContacted
test('`filterByContacted` method returns correct results', () => {
expect(wrapper.vm.filters.contacted.value).toBe('');
wrapper.vm.filterByContacted('true');
expect(wrapper.vm.filters.contacted.value).toBe('true');
wrapper.vm.filterByContacted('false');
expect(wrapper.vm.filters.contacted.value).toBe('false');
wrapper.vm.filterByContacted('all');
expect(wrapper.vm.filters.contacted.value).toBe('none');
});
test('`filterByPickedUp` method returns the correct results', () => {
expect(wrapper.vm.filters.picked_up.value).toBe('');
wrapper.vm.filterByPickedUp('true');
expect(wrapper.vm.filters.picked_up.value).toBe('true');
wrapper.vm.filterByPickedUp('false');
expect(wrapper.vm.filters.picked_up.value).toBe('false');
wrapper.vm.filterByPickedUp('all');
expect(wrapper.vm.filters.picked_up.value).toBe('none');
});
});
|
Isaac-DeFrain/rchain
|
rosette/isode/rbltsap/tsaprovider.c
|
/* tsaprovider.c - implement the transport service */
#ifndef lint
static char *rcsid = "$Header: /mcc/project/carnot/root/master/pub-ess/isode/rbltsap/tsaprovider.c,v 1.1.1.1 1993/02/12 01:26:28 tomlic Exp $";
#endif
/*
* $Header: /mcc/project/carnot/root/master/pub-ess/isode/rbltsap/tsaprovider.c,v 1.1.1.1 1993/02/12 01:26:28 tomlic Exp $
*
*
* $Log: tsaprovider.c,v $
* Revision 1.1.1.1 1993/02/12 01:26:28 tomlic
* pub release of rosette
*
* Revision 1.3 1993/01/21 20:27:58 carnot
* added HPUX code for async i/o
*
* Revision 1.2 1993/01/19 21:03:01 carnot
* Touch up for release 2.0
*
* Revision 8.0 91/07/17 13:04:53 isode
* Release 7.0
*
*
*/
/*
* NOTICE
*
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
* this agreement.
*
*/
/* LINTLIBRARY */
#include <stdio.h>
#include <signal.h>
#include "tpkt.h"
#include "mpkt.h"
#include "isoservent.h"
#include "tailor.h"
#include "sys.file.h"
#include <sys/stat.h>
#define selmask(fd,m,n) \
{ \
FD_SET (fd, &(m)); \
if ((fd) >= (n)) \
(n) = (fd) + 1; \
}
/* DATA */
static int once_only = 0;
static struct tsapblk tsapque;
static struct tsapblk *THead = &tsapque;
static int TWakeUp ();
#ifndef SIGPOLL
static int TPid = NOTOK;
#endif
extern int xselect_blocking_on_intr;
/* T-DATA.REQUEST */
int TDataRequest (sd, data, cc, td)
int sd;
char *data;
int cc;
struct TSAPdisconnect *td;
{
SBV smask,
imask;
SFP istat;
int result;
struct udvec uvs[2];
register struct udvec *uv = uvs;
register struct tsapblk *tb;
missingP (data);
if (cc <= 0)
return tsaplose (td, DR_PARAMETER, NULLCP,
"illegal value for TSDU length (%d)", cc);
missingP (td);
smask = sigioblock ();
tsapPsig (tb, sd);
if ((istat = signal (SIGINT, SIG_DFL)) != SIG_DFL) {
(void) signal (SIGINT, istat);
imask = siginblock ();
}
uv -> uv_base = data, uv -> uv_len = cc, uv++;
uv -> uv_base = NULL;
result = (*tb -> tb_writePfnx) (tb, uvs, 0, td);
if (istat != SIG_DFL)
(void) siginmask (imask);
(void) sigiomask (smask);
return result;
}
/* T-EXPEDITED-DATA.REQUEST */
int TExpdRequest (sd, data, cc, td)
int sd;
char *data;
int cc;
struct TSAPdisconnect *td;
{
SBV smask,
imask;
SFP istat;
int result;
struct udvec uvs[2];
register struct udvec *uv = uvs;
register struct tsapblk *tb;
missingP (data);
toomuchP (data, cc, TX_SIZE, "expedited");
if (cc <= 0)
return tsaplose (td, DR_PARAMETER, NULLCP,
"illegal value for XSDU length (%d)", cc);
missingP (td);
smask = sigioblock ();
tsapPsig (tb, sd);
if ((istat = signal (SIGINT, SIG_DFL)) != SIG_DFL) {
(void) signal (SIGINT, istat);
imask = siginblock ();
}
uv -> uv_base = data, uv -> uv_len = cc, uv++;
uv -> uv_base = NULL;
if (tb -> tb_flags & TB_EXPD)
result = (*tb -> tb_writePfnx) (tb, uvs, 1, td);
else
result = tsaplose (td, DR_OPERATION, NULLCP,
"expedited service unavailable");
if (istat != SIG_DFL)
(void) siginmask (imask);
(void) sigiomask (smask);
return result;
}
/* T-WRITE.REQUEST (pseudo; write user data vectors) */
int TWriteRequest (sd, uv, td)
int sd;
struct udvec *uv;
struct TSAPdisconnect *td;
{
register int n;
SBV smask,
imask;
SFP istat;
int result;
register struct tsapblk *tb;
register struct udvec *vv;
missingP (uv);
n = 0;
for (vv = uv; vv -> uv_base; vv++)
n += vv -> uv_len;
if (n == 0)
return tsaplose (td, DR_PARAMETER, NULLCP, "zero-length TSDU");
missingP (td);
smask = sigioblock ();
tsapPsig (tb, sd);
if ((istat = signal (SIGINT, SIG_DFL)) != SIG_DFL) {
(void) signal (SIGINT, istat);
imask = siginblock ();
}
result = (*tb -> tb_writePfnx) (tb, uv, 0, td);
if (istat != SIG_DFL)
(void) siginmask (imask);
(void) sigiomask (smask);
return result;
}
/* T-READ.REQUEST (pseudo; synchronous read) */
int TReadRequest (sd, tx, secs, td)
int sd;
register struct TSAPdata *tx;
int secs;
register struct TSAPdisconnect *td;
{
SBV smask,
imask;
SFP istat;
int nfds,
oob,
result;
fd_set ifds,
efds,
mask;
register struct tsapblk *tb;
missingP (tx);
missingP (td);
smask = sigioblock ();
tsapPsig (tb, sd);
if ((istat = signal (SIGINT, SIG_DFL)) != SIG_DFL) {
(void) signal (SIGINT, istat);
imask = siginblock ();
}
nfds = 0;
FD_ZERO (&mask);
selmask (tb -> tb_fd, mask, nfds);
for (;;) {
ifds = efds = mask; /* struct copy */
if (tb -> tb_checkfnx == NULLIFP || (*tb -> tb_checkfnx) (tb) != OK)
switch ((*tb -> tb_selectfnx) (nfds, &ifds, NULLFD, &efds, secs)) {
case NOTOK: /* let read function find error... */
ifds = mask;
FD_ZERO(&efds);
break;
case OK:
result = tsaplose (td, DR_TIMER, NULLCP, NULLCP);
goto out;
default:
break;
}
else
FD_ZERO (&efds);
if ((oob = FD_ISSET (tb -> tb_fd, &efds))
|| FD_ISSET (tb -> tb_fd, &ifds))
result = (*tb -> tb_readPfnx) (tb, tx, td, secs != NOTOK, oob);
else
result = DONE;
if (result != DONE)
break;
if (secs != NOTOK) {
result = tsaplose (td, DR_TIMER, NULLCP, NULLCP);
break;
}
}
out: ;
if (istat != SIG_DFL)
(void) siginmask (imask);
(void) sigiomask (smask);
return result;
}
/* T-DISCONNECT.REQUEST */
int TDiscRequest (sd, data, cc, td)
int sd;
char *data;
int cc;
register struct TSAPdisconnect *td;
{
SBV smask;
int result;
register struct tsapblk *tb;
toomuchP (data, cc, TD_SIZE, "disconnect");
smask = sigioblock ();
if ((tb = findtblk (sd)) == NULL) {
(void) sigiomask (smask);
return tsaplose (td, DR_PARAMETER, NULLCP,
"invalid transport descriptor");
}
result = (*tb -> tb_discPfnx) (tb, data, cc, td);
(void) sigiomask (smask);
return result;
}
/* set asynchronous event indications */
static SFD DATAser ();
int TSetIndications (sd, data, disc, td)
int sd;
IFP data,
disc;
struct TSAPdisconnect *td;
{
SBV smask;
int result;
register struct tsapblk *tb;
if (data || disc) {
missingP (data);
missingP (disc);
}
_iosignals_set = 1;
smask = sigioblock ();
tsapPsig (tb, sd);
if (tb -> tb_DataIndication = data) {
tb -> tb_flags |= TB_ASYN;
xselect_blocking_on_intr = 1;
}
else {
tb -> tb_flags &= ~TB_ASYN;
xselect_blocking_on_intr = 0;
}
tb -> tb_DiscIndication = disc;
result = TWakeUp (tb, td);
/* Kick the signal handling routine once to make it hand up the
* indications that were queued in the kernel when TSetIndications
* was called.
* TBD: We could be more efficient by only doing this for only
* one file descriptor.
*/
#ifdef RBL
(void) DATAser(0, tb -> tb_fd, ((void *) NULL));
#else
(void) DATAser(0, 0L, ((struct sigcontext *) NULL));
#endif
(void) sigiomask (smask);
return result;
}
/* map transport descriptors for select() */
int TSelectMask (sd, mask, nfds, td)
int sd;
fd_set *mask;
int *nfds;
register struct TSAPdisconnect *td;
{
SBV smask;
register struct tsapblk *tb;
missingP (mask);
missingP (nfds);
smask = sigioblock ();
if ((tb = findtblk (sd)) == NULL) {
(void) sigiomask (smask);
return tsaplose (td, DR_PARAMETER, NULLCP,
"invalid transport descriptor");
}
if (tb -> tb_checkfnx && (*tb -> tb_checkfnx) (tb) == OK) {
(void) sigiomask (smask);
return tsaplose (td, DR_WAITING, NULLCP, NULLCP);
}
selmask (tb -> tb_fd, *mask, *nfds);
(void) sigiomask (smask);
return OK;
}
/* NSAP interface: N-DATA.INDICATION */
#ifdef RBL
static SFD DATAser (type, sd, RBL_ioPool_Ob)
int type;
int sd;
void* RBL_ioPool_Ob;
{
int n,
nfds,
oob;
fd_set ifds,
efds;
IFP disc;
register struct tsapblk *tb;
struct TSAPdata txs;
register struct TSAPdata *tx = &txs;
struct TSAPdisconnect tds;
register struct TSAPdisconnect *td = &tds;
if ((tb = findtblk (sd)) == NULL)
return;
if (!(tb -> tb_flags & TB_ASYN))
return;
for (;;) {
FD_ZERO (&ifds);
selmask (sd, ifds, nfds);
efds = ifds; /* struct copy */
n = (*tb -> tb_selectfnx) (nfds, &ifds, NULLFD, &efds, 0);
if ((n > 0) &&
((oob = FD_ISSET (sd, &efds)) || FD_ISSET (sd, &ifds))) {
disc = tb -> tb_DiscIndication;
switch ((*tb -> tb_readPfnx) (tb, tx, td, 1, oob)) {
case NOTOK:
(*disc) (sd, td);
break;
case OK:
(*tb -> tb_DataIndication) (sd, tx);
break;
case DONE: /* partially assembled TSDU */
break;
}
}
else
break; /* might need to check for errors on select here */
}
}
/* */
#include <fcntl.h>
#include <sys/ioctl.h>
#ifdef HPUX
#define NONBLOCK O_NONBLOCK
#else
#define NONBLOCK (FASYNC | FNDELAY)
#endif
extern void AddIsodeIoHandler ();
static int TWakeUp (tb, td)
register struct tsapblk *tb;
struct TSAPdisconnect *td;
{
int result;
int pgrp;
if (tb -> tb_flags & TB_ASYN) {
AddIsodeIoHandler(tb -> tb_fd, DATAser);
/* enable process SIGIO's for this fd */
pgrp = -getpid ();
if (ioctl (tb -> tb_fd, SIOCSPGRP, (char *) &pgrp) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "ioctl SIOCSPGRP %d", pgrp);
/* set fd non-blocking and asynchronous */
if ((result = fcntl (tb -> tb_fd, F_GETFL, 0x00)) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_GETFL");
result |= NONBLOCK;
if (fcntl (tb -> tb_fd, F_SETFL, result) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_SETFL 0x%x", result);
#ifdef HPUX
/* HPUX requires an ioctl to turn async on */
result = 1;
if (ioctl(tb -> tb_fd, FIOASYNC, &result) == -1)
return tsaplose (td, DR_CONGEST, "failed", "ioctl FIOASYNC %d", result);
#endif
}
else {
/* set fd blocking and synchronous */
if ((result = fcntl (tb -> tb_fd, F_GETFL, 0x00)) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_GETFL");
result &= ~NONBLOCK;
if (fcntl (tb -> tb_fd, F_SETFL, result) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_SETFL 0x%x", result);
#ifdef HPUX
/* HPUX requires an ioctl to turn async off */
result = 0;
if (ioctl(tb -> tb_fd, FIOASYNC, &result) == -1)
return tsaplose (td, DR_CONGEST, "failed", "ioctl FIOASYNC %d", result);
#endif
}
return OK;
}
#else
#ifdef SVR4
static SFD DATAser (sig)
int sig;
#else
/* ARGSUSED */
static SFD DATAser (sig, code, sc)
int sig;
long code;
struct sigcontext *sc;
#endif
{
int n,
nfds,
oob,
sd;
fd_set ifds,
efds,
imask,
emask;
#ifndef BSDSIGS
SBV smask;
#endif
IFP disc;
register struct tsapblk *tb,
*tb2;
struct TSAPdata txs;
register struct TSAPdata *tx = &txs;
struct TSAPdisconnect tds;
register struct TSAPdisconnect *td = &tds;
#ifndef BSDSIGS
(void) signal (SIGEMT, DATAser);
smask = sigioblock ();
#endif
for (;;) {
n = 0;
FD_ZERO (&ifds);
FD_ZERO (&efds);
for (tb = THead -> tb_forw; tb != THead; tb = tb -> tb_forw)
if (tb -> tb_fd != NOTOK && (tb -> tb_flags & TB_ASYN)) {
nfds = 0;
FD_ZERO (&imask);
selmask (tb -> tb_fd, imask, nfds);
emask = imask; /* struct copy */
if ((*tb -> tb_selectfnx) (nfds, &imask, NULLFD, &emask, 0)
> OK) {
if (FD_ISSET (tb -> tb_fd, &imask))
FD_SET (tb -> tb_fd, &ifds);
if (FD_ISSET (tb -> tb_fd, &emask))
FD_SET (tb -> tb_fd, &efds);
n++;
}
}
if (n == 0)
break;
for (tb = THead -> tb_forw; tb != THead; tb = tb2) {
tb2 = tb -> tb_forw;
sd = tb -> tb_fd;
if ((oob = FD_ISSET (sd, &efds)) || FD_ISSET (sd, &ifds)) {
disc = tb -> tb_DiscIndication;
switch ((*tb -> tb_readPfnx) (tb, tx, td, 1, oob)) {
case NOTOK:
(*disc) (sd, td);
break;
case OK:
(*tb -> tb_DataIndication) (sd, tx);
break;
case DONE: /* partially assembled TSDU */
break;
}
}
}
}
#ifndef SIGPOLL
(void) kill (TPid, SIGEMT);
#endif
#ifndef BSDSIGS
(void) sigiomask (smask);
#endif
}
/* */
#ifndef SIGPOLL
static int TWakeUp (tb, td)
register struct tsapblk *tb;
struct TSAPdisconnect *td;
{
int i,
nfds;
fd_set mask;
char buf1[10],
buf2[10],
buf3[10];
register struct isoservent *is;
static int inited = 0;
if (TPid > OK) {
(void) kill (TPid, SIGTERM);
TPid = NOTOK;
}
nfds = 0;
FD_ZERO (&mask);
for (tb = THead -> tb_forw; tb != THead; tb = tb -> tb_forw)
if (tb -> tb_fd != NOTOK && (tb -> tb_flags & TB_ASYN))
selmask (tb -> tb_fd, mask, nfds);
if (nfds == 0)
return OK;
if (nfds > sizeof (int) * 8)
return tsaplose (td, DR_CONGEST, NULLCP, "you lose");
if (!inited) {
#ifndef BSDSIGS
int smask = sigsetmask (sigblock (0) & ~sigmask (SIGEMT));
#endif
(void) signal (SIGEMT, DATAser);
#ifndef BSDSIGS
(void) sigiomask (smask);
#endif
inited++;
}
if ((is = getisoserventbyname ("isore", "tsap")) == NULL)
return tsaplose (td, DR_CONGEST, NULLCP,
"ISO service tsap/isore not found");
(void) sprintf (buf1, "%d", nfds);
*is -> is_tail++ = buf1;
(void) sprintf (buf2, "0x%x", mask.fds_bits[0]);
*is -> is_tail++ = buf2;
(void) sprintf (buf3, "%d", getpid ());
*is -> is_tail++ = buf3;
*is -> is_tail = NULL;
for (i = 0; i < 5; i++)
switch (TPid = vfork ()) {
case NOTOK:
continue;
case OK:
(void) signal (SIGEMT, SIG_DFL);
(void) execv (*is -> is_vec, is -> is_vec);
_exit (1);
default:
return OK;
}
return tsaplose (td, DR_CONGEST, "isore", "unable to fork");
}
#else
#ifdef BSDSIGS
#include <fcntl.h>
#include <sys/ioctl.h>
#else
#include <sys/stropts.h>
#endif
static int TWakeUp (tb, td)
register struct tsapblk *tb;
struct TSAPdisconnect *td;
{
int result;
#ifndef SUNOS4
int pgrp;
#endif
static int inited = 0;
if (tb -> tb_flags & TB_ASYN) {
if (!inited) {
(void) signal (SIGPOLL, DATAser);
inited++;
}
#ifdef BSDSIGS
#ifdef SUNOS4
if (fcntl (tb -> tb_fd, F_SETOWN, getpid ()) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_SETOWN");
#else
pgrp = -getpid ();
if (ioctl (tb -> tb_fd, SIOCSPGRP, (char *) &pgrp) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "ioctl SIOCSPGRP %d",
pgrp);
#endif
if ((result = fcntl (tb -> tb_fd, F_GETFL, 0x00)) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_GETFL");
result |= FASYNC;
if (fcntl (tb -> tb_fd, F_SETFL, result) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_SETFL 0x%x",
result);
#else
#ifdef notdef
if (ioctl (tb -> tb_fd, I_GETSIG, &result) == NOTOK)
result = 0;
result |= S_INPUT;
if (ioctl (tb -> tb_fd, I_SETSIG, result) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "ioctl I_SETSIG 0x%x",
result);
#else
return tsaplose (td, DR_CONGEST, NULLCP,
"asynchronous operations not yet supported under SVR3");
#endif
#endif
}
else {
#ifdef BSDSIGS
if ((result = fcntl (tb -> tb_fd, F_GETFL, 0x00)) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_GETFL");
result &= ~FASYNC;
if (fcntl (tb -> tb_fd, F_SETFL, result) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "fcntl F_SETFL 0x%x",
result);
#else
if (ioctl (tb -> tb_fd, I_GETSIG, &result) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "ioctl I_GETSIG");
result &= ~S_INPUT;
if (ioctl (tb -> tb_fd, I_SETSIG, result) == NOTOK)
return tsaplose (td, DR_CONGEST, "failed", "ioctl I_SETSIG 0x%x",
result);
#endif
}
return OK;
}
#endif
#endif /* RBL */
/* INTERNAL */
struct tsapblk *newtblk () {
register struct tsapblk *tb;
tb = (struct tsapblk *) calloc (1, sizeof *tb);
if (tb == NULL)
return NULL;
tb -> tb_fd = NOTOK;
tb -> tb_qbuf.qb_forw = tb -> tb_qbuf.qb_back = &tb -> tb_qbuf;
tb -> tb_qwrites.qb_forw = tb -> tb_qwrites.qb_back = &tb -> tb_qwrites;
if (once_only == 0) {
THead -> tb_forw = THead -> tb_back = THead;
once_only++;
}
insque (tb, THead -> tb_back);
return tb;
}
freetblk (tb)
register struct tsapblk *tb;
{
SBV smask;
#ifndef SIGPOLL
struct TSAPdisconnect tds;
#endif
if (tb == NULL)
return;
smask = sigioblock ();
if (tb -> tb_fd != NOTOK) {
(void) (*tb -> tb_closefnx) (tb -> tb_fd);
#ifdef MGMT
if (tb -> tb_manfnx)
(*tb -> tb_manfnx) (DISCREQ, tb);
#endif
}
if (tb -> tb_retry)
freetpkt (tb -> tb_retry);
if (tb -> tb_calling)
free ((char *) tb -> tb_calling);
if (tb -> tb_called)
free ((char *) tb -> tb_called);
if (tb -> tb_data)
free (tb -> tb_data);
#ifndef SIGPOLL
if ((tb -> tb_flags & TB_ASYN) && TPid > OK) {
(void) kill (TPid, SIGTERM);
TPid = NOTOK;
}
#endif
QBFREE (&tb -> tb_qbuf);
if (tb -> tb_queuePfnx)
(*tb -> tb_queuePfnx) (tb, 0, (struct TSAPdisconnect *) 0);
QBFREE (&tb -> tb_qwrites);
remque (tb);
free ((char *) tb);
#ifndef SIGPOLL
for (tb = THead -> tb_forw; tb != THead; tb = tb -> tb_forw)
if (tb -> tb_fd != NOTOK && (tb -> tb_flags & TB_ASYN)) {
(void) TWakeUp (tb, &tds);
break;
}
#endif
(void) sigiomask (smask);
}
/* */
struct tsapblk *findtblk (sd)
register int sd;
{
register struct tsapblk *tb;
if (once_only == 0)
return NULL;
for (tb = THead -> tb_forw; tb != THead; tb = tb -> tb_forw)
if (tb -> tb_fd == sd)
return tb;
return NULL;
}
/* */
int copyTSAPaddrX (in, out)
struct tsapADDR *in;
struct TSAPaddr *out;
{
bzero ((char *) out, sizeof *out);
bcopy (in -> ta_selector, out -> ta_selector,
out -> ta_selectlen = in -> ta_selectlen);
if (in -> ta_present) {
out -> ta_addrs[0] = in -> ta_addr; /* struct copy */
out -> ta_naddr = 1;
}
}
int copyTSAPaddrY (in, out)
struct TSAPaddr *in;
struct tsapADDR *out;
{
bzero ((char *) out, sizeof *out);
bcopy (in -> ta_selector, out -> ta_selector,
out -> ta_selectlen = in -> ta_selectlen);
if (out -> ta_present = (in -> ta_naddr >= 1) ? 1 : 0)
out -> ta_addr = in -> ta_addrs[0]; /* struct copy */
}
|
CM-Archive/android_external_libvpx
|
vpx_mem/memory_manager/include/heapmm.h
|
<reponame>CM-Archive/android_external_libvpx
/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/* This code is in the public domain.
** Version: 1.1 Author: <NAME>
*/
/* External header file for Heap Memory Manager. See documentation in
** heapmm.html.
*/
#undef HMM_PROCESS
/* Include once per configuration in a particular translation unit. */
#ifndef HMM_CNFG_NUM
/* Default configuration. */
#ifndef HMM_INC_CNFG_DFLT
#define HMM_INC_CNFG_DFLT
#define HMM_PROCESS
#endif
#elif HMM_CNFG_NUM == 0
/* Test configuration. */
#ifndef HMM_INC_CNFG_0
#define HMM_INC_CNFG_0
#define HMM_PROCESS
#endif
#elif HMM_CNFG_NUM == 1
#ifndef HMM_INC_CNFG_1
#define HMM_INC_CNFG_1
#define HMM_PROCESS
#endif
#elif HMM_CNFG_NUM == 2
#ifndef HMM_INC_CNFG_2
#define HMM_INC_CNFG_2
#define HMM_PROCESS
#endif
#elif HMM_CNFG_NUM == 3
#ifndef HMM_INC_CNFG_3
#define HMM_INC_CNFG_3
#define HMM_PROCESS
#endif
#elif HMM_CNFG_NUM == 4
#ifndef HMM_INC_CNFG_4
#define HMM_INC_CNFG_4
#define HMM_PROCESS
#endif
#elif HMM_CNFG_NUM == 5
#ifndef HMM_INC_CNFG_5
#define HMM_INC_CNFG_5
#define HMM_PROCESS
#endif
#endif
#ifdef HMM_PROCESS
#include "hmm_cnfg.h"
/* Heap descriptor. */
typedef struct HMM_UNIQUE(structure)
{
/* private: */
/* Pointer to (payload of) root node in AVL tree. This field should
** really be the AVL tree descriptor (type avl_avl). But (in the
** instantiation of the AVL tree generic package used in package) the
** AVL tree descriptor simply contains a pointer to the root. So,
** whenever a pointer to the AVL tree descriptor is needed, I use the
** cast:
**
** (avl_avl *) &(heap_desc->avl_tree_root)
**
** (where heap_desc is a pointer to a heap descriptor). This trick
** allows me to avoid including cavl_if.h in this external header. */
void *avl_tree_root;
/* Pointer to first byte of last block freed, after any coalescing. */
void *last_freed;
/* public: */
HMM_UNIQUE(size_bau) num_baus_can_shrink;
void *end_of_shrinkable_chunk;
}
HMM_UNIQUE(descriptor);
/* Prototypes for externally-callable functions. */
void HMM_UNIQUE(init)(HMM_UNIQUE(descriptor) *desc);
void *HMM_UNIQUE(alloc)(
HMM_UNIQUE(descriptor) *desc, HMM_UNIQUE(size_aau) num_addr_align_units);
/* NOT YET IMPLEMENTED */
void *HMM_UNIQUE(greedy_alloc)(
HMM_UNIQUE(descriptor) *desc, HMM_UNIQUE(size_aau) needed_addr_align_units,
HMM_UNIQUE(size_aau) coveted_addr_align_units);
int HMM_UNIQUE(resize)(
HMM_UNIQUE(descriptor) *desc, void *mem,
HMM_UNIQUE(size_aau) num_addr_align_units);
/* NOT YET IMPLEMENTED */
int HMM_UNIQUE(greedy_resize)(
HMM_UNIQUE(descriptor) *desc, void *mem,
HMM_UNIQUE(size_aau) needed_addr_align_units,
HMM_UNIQUE(size_aau) coveted_addr_align_units);
void HMM_UNIQUE(free)(HMM_UNIQUE(descriptor) *desc, void *mem);
HMM_UNIQUE(size_aau) HMM_UNIQUE(true_size)(void *mem);
HMM_UNIQUE(size_aau) HMM_UNIQUE(largest_available)(
HMM_UNIQUE(descriptor) *desc);
void HMM_UNIQUE(new_chunk)(
HMM_UNIQUE(descriptor) *desc, void *start_of_chunk,
HMM_UNIQUE(size_bau) num_block_align_units);
void HMM_UNIQUE(grow_chunk)(
HMM_UNIQUE(descriptor) *desc, void *end_of_chunk,
HMM_UNIQUE(size_bau) num_block_align_units);
/* NOT YET IMPLEMENTED */
void HMM_UNIQUE(shrink_chunk)(
HMM_UNIQUE(descriptor) *desc,
HMM_UNIQUE(size_bau) num_block_align_units);
#endif /* defined HMM_PROCESS */
|
paulxi/LeetCodeJava
|
src/test/java/com/leetcode/algorithm/medium/nextclosesttime/SolutionTest.java
|
<reponame>paulxi/LeetCodeJava
package com.leetcode.algorithm.medium.nextclosesttime;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class SolutionTest {
@Test
public void testCase1() {
Solution solution = new Solution();
assertEquals("19:39", solution.nextClosestTime("19:34"));
}
@Test
public void testCase2() {
Solution solution = new Solution();
assertEquals("22:22", solution.nextClosestTime("23:59"));
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.